AstroLLaMA-3-8B-Base_Summary is a specialized base language model for astronomy, developed by fine-tuning Meta's LLaMA-3-8b architecture on summarized astronomical literature. This model was developed by the AstroMLab team. It is designed for next token prediction tasks and is not an instruct/chat model.
Model Details
Base Architecture
: LLaMA-3-8b
Training Data
: Summarized content from arXiv's astro-ph category papers
Data Processing
:
Optical character recognition (OCR) on PDF files using the Nougat tool
Summarization of OCR'd text using Qwen-2-8B and LLaMA-3.1-8B, reducing content to about 1,000-4,000 tokens per paper
Fine-tuning Method
: Continual Pre-Training (CPT) using the LMFlow framework
Training Details
:
Learning rate: 2 × 10⁻⁵
Total batch size: 96
Maximum token length: 512
Warmup ratio: 0.03
No gradient accumulation
BF16 format
Cosine decay schedule for learning rate reduction
Training duration: 1 epoch
Primary Use
: Next token prediction for astronomy-related text generation and analysis
Reference
: Pan et al. 2024 [Link to be added]
Generating text from a prompt
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Load the model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("AstroMLab/astrollama-3-8b-base_summary")
model = AutoModelForCausalLM.from_pretrained("AstroMLab/astrollama-3-8b-base_summary", device_map="auto")
# Create the pipeline with explicit truncationfrom transformers import pipeline
generator = pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
device_map="auto",
truncation=True,
max_length=512
)
# Example prompt from an astronomy paper
prompt = "In this letter, we report the discovery of the highest redshift, " \
"heavily obscured, radio-loud QSO candidate selected using JWST NIRCam/MIRI, " \
"mid-IR, sub-mm, and radio imaging in the COSMOS-Web field. "# Set seed for reproducibility
torch.manual_seed(42)
# Generate text
generated_text = generator(prompt, do_sample=True)
print(generated_text[0]['generated_text'])
Model Improvements and Performance
This model used the summarized content for training, which has led to improved performance compared to the AIC (Abstract, Introduction, Conclusion) version. The summarization process allows for the inclusion of more comprehensive information from each paper while maintaining a manageable token count.
Here's a performance comparison chart based upon the astronomical benchmarking Q&A as described in
Ting et al. 2024
, and Pan et al. 2024:
Model
Score (%)
LLaMA-3.1-8B
73.7
LLaMA-3-8B
72.9
AstroLLaMA-3-8B-Base_Summary (AstroMLab)
72.3
AstroLLaMA-3-8B-Base_AIC
72.3
Gemma-2-9B
71.5
Qwen-2.5-7B
70.4
Yi-1.5-9B
68.4
InternLM-2.5-7B
64.5
Mistral-7B-v0.3
63.9
ChatGLM3-6B
50.4
As shown, AstroLLaMA-3-8B-Base_Summary performs competitively, nearly matching the performance of the base LLaMA-3.1-8B model and outperforming the AIC version. This improvement demonstrates the importance of information density in the training data.
Notably, the instruct version of this model shows even more significant improvements, highlighting the effectiveness of the summarization approach in capturing and retaining key astronomical concepts. For detailed performance analysis of the instruct version, please refer to Pan et al. 2024.
While AstroLLaMA-3-8B performs competitively among models in its class, it does not surpass the performance of the base LLaMA-3-8B model. This underscores the challenges in developing specialized models and the need for more diverse and comprehensive training data.
This model is released primarily for reproducibility purposes, allowing researchers to track the development process and compare different iterations of AstroLLaMA models.
For optimal performance and the most up-to-date capabilities in astronomy-related tasks, we recommend using AstroSage-8B, where these limitations have been addressed. The newer model incorporates expanded training data beyond astro-ph and features a greatly expanded fine-tuning process, resulting in significantly improved performance.
Ethical Considerations
While this model is designed for scientific use, users should be mindful of potential misuse, such as generating misleading scientific content. Always verify model outputs against peer-reviewed sources for critical applications.
Citation
If you use this model in your research, please cite:
[Citation for Pan et al. 2024 to be added]
Runs of AstroMLab astrollama-3-8b-base_summary on huggingface.co
24
Total runs
2
24-hour runs
5
3-day runs
4
7-day runs
17
30-day runs
More Information About astrollama-3-8b-base_summary huggingface.co Model
More astrollama-3-8b-base_summary license Visit here:
astrollama-3-8b-base_summary huggingface.co is an AI model on huggingface.co that provides astrollama-3-8b-base_summary's model effect (), which can be used instantly with this AstroMLab astrollama-3-8b-base_summary model. huggingface.co supports a free trial of the astrollama-3-8b-base_summary model, and also provides paid use of the astrollama-3-8b-base_summary. Support call astrollama-3-8b-base_summary model through api, including Node.js, Python, http.
astrollama-3-8b-base_summary huggingface.co is an online trial and call api platform, which integrates astrollama-3-8b-base_summary's modeling effects, including api services, and provides a free online trial of astrollama-3-8b-base_summary, you can try astrollama-3-8b-base_summary online for free by clicking the link below.
AstroMLab astrollama-3-8b-base_summary online free url in huggingface.co:
astrollama-3-8b-base_summary is an open source model from GitHub that offers a free installation service, and any user can find astrollama-3-8b-base_summary on GitHub to install. At the same time, huggingface.co provides the effect of astrollama-3-8b-base_summary install, users can directly use astrollama-3-8b-base_summary installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
astrollama-3-8b-base_summary install url in huggingface.co: