LLaMA-3-MERaLiON-8B-Instruct
is a large language model (LLM) designed to excel in multilingual understanding and instruction-following tasks. This model builds on the Llama-3-8B architecture and continue pretrained from Llama-3-8B-Base, enhanced through an extensive and meticulously curated continued pretraining process and careful merging of model weights.
Developed by:
I
2
R, A*STAR
Model type:
Text Decoder
Language(s):
Multilingual, primarily English, Chinese and Indonesian
For details on background, pre-training, tuning experiments and evaluation, please refer to our
technical report
.
Acknowledgement
This research is supported by the National Research Foundation, Singapore and InfocommMedia Development Authority, Singapore under its National Large Language Models Funding Initiative. The computing resources and platforms are supported by Singapore NSCC Aspire2A+ and The TPU Research Cloud. We thank all contributors and collaborators who have made this effort possible.
Model Overview
MERaLiON-LLaMA-3-8B-Instruct is primarily trained on English, Chinese, and Indonesian, with a particular emphasis on elevating its understanding and generation capabilities in Chinese and Indonesian. By integrating corpus mixing strategies developed for regional multilingual datasets, we carefully diversified the training content through domain classification, hyperparameter tuning, and replay strategies. These measures not only help the model retain knowledge without catastrophic forgetting but also significantly enhance its performance in producing high-quality, contextually accurate responses within these Southeast Asian language contexts.
Key advancements include:
Extended Pretraining
: Continued pretraining on over 120 billion tokens of primarily English, Chinese, and Indonesian text.
SEA Multilingual Corpus Mixing
: Drawing on strategies from English, Chinese, Indonesian and Malay corpora to enhance language understanding and generation capabilities.
Domain-Diversified Pretraining Corpus
: Careful selection and classification of training data from a wide range of topics and genres.
Optimized Training Techniques
: Implementing replay strategies and carefully selected hyperparameters to ensure stability, maintain quality, and avoid catastrophic forgetting.
Instruction Tuning via Model Merging
: Rather than a standard instruction-tuning pipeline, this model was derived by merging the official Llama-3.1-8B-base and Llama-3.1-8B-instruct models to produce superior instruction-following capabilities without additional supervised instruction data.
Highlights
Enhanced Performance
: MERaLiON-LLaMA-3-8B-Instruct demonstrates improved results on benchmarks including cross-MMLU, cross-LogiQA, cross-XQuAD, IndoMMLU, and CNEval, surpassing the capabilities of the official Llama-3 models.
Extensive Multilingual Support
: Strong coverage of English, Chinese, and Indonesian text, coupled with strategies inspired by Southeast Asian multilingual approaches, ensures robust understanding of and responsiveness to diverse linguistic inputs.
Model Specifications
Model Type
: Decoder
Architecture
: Llama-3.1-8B
Context Length
: 8192 tokens
Languages
: English, Chinese, Indonesian
Benchmark Performance
This benchmark analysis organizes models into
LLaMA series
and
non-LLaMA series
, providing a clear contextual framework to evaluate performance within each category while accounting for variations in baseline performance.
MERaLiON-LLaMA-3-8B-Instruct
demonstrates notable advancements over official LLaMA-3 models, underscoring the effectiveness of continued pretraining strategies such as corpus mixing, replay for knowledge retention, and model merging. These techniques contribute to significant gains in multilingual reasoning, domain-specific tasks, and performance across
English
,
Chinese
and
Indonesian
.
To ensure fairness and consistency in evaluation, we employ a standardized benchmarking pipeline that leverages a LLM as a judge. This approach accommodates diverse model output formats, providing robust and unbiased comparisons across benchmarks.
Key highlights from the evaluations include
:
Cross-MMLU, Cross-LogiQA
: Enhanced reasoning and question-answering capabilities illustrate that continued pretraining improves multilingual understanding and accuracy over baseline Llama models.
IndoMMLU and CNEval
: Performance boosts in Indonesian and Chinese benchmarks highlight that careful corpus mixing and replay strategies help maintain and improve language-specific strengths.
These results collectively show how the MERaLiON-LLaMA-3-8B-Instruct model builds upon the strengths of official Llama-3.1 variants. We plan to apply these techniques to continue pretrain other open-source models in future releases.
The complete evaluation results are available
here
, and our SeaEval benchmark paper can be accessed
here
.
Instruction-Following
By merging the official Llama-3.1-8B-base and Llama-3.1-8B-instruct weights, we inherit strong instruction-following behavior without additional instruction-tuning steps. The model can follow various user prompts accurately and coherently, producing well-structured, contextually relevant responses.
Usage
MERaLiON-LLaMA-3-8B-Instruct can be deployed using the 🤗 Transformers library. With careful device mapping and dtype settings, users can achieve efficient and high-quality text generation.
Example:
import transformers
import torch
model_id = "MERaLiON/MERaLiON-LLaMA-3-8B-Instruct"
pipeline = transformers.pipeline(
"text-generation",
model=model_id,
model_kwargs={"torch_dtype": torch.bfloat16},
device_map="auto",
)
messages = [
{"role": "user", "content": "What is the sentiment of the following sentence?\nSentence: This book is incredibly dull.\nAnswer:"},
]
outputs = pipeline(
messages,
max_new_tokens=256,
)
print(outputs[0]["generated_text"][-1])
Note
: We use same chat format as official llama-3.1-8b-instruct.
Caveats and Limitations
Like many LLMs, MERaLiON-LLaMA-3-8B-Instruct may hallucinate or produce irrelevant or incorrect content. While we have taken steps to mitigate these issues, users are advised to critically evaluate outputs, especially in high-stakes applications. The model has not undergone explicit safety alignment and filtering; users should implement their own safeguards, content moderation, and evaluation strategies.
Safety and Liability
This model is not strongly safety-aligned. Users are responsible for implementing their own safety checks and mitigations. The authors and affiliated institutions are not liable for any damages or losses arising from the use of this model.
Technical Specifications
MERaLiON-LLaMA-3-8B-Instruct underwent continued pretraining using computational resources provided by Singapore NSCC Aspire2A+ and The TPU Research Cloud. We utilized diverse data sources and adaptive strategies to ensure stable training without catastrophic forgetting.
Compute and Training Platform
The training of
MERaLiON-LLaMA-3-8B-Instruct
was conducted using the
MaxText platform
, leveraging both NVIDIA H100 GPUs and TPU v4-128 chips. Specifically, we utilized 64 H100 GPUs, achieving approximately 400 TFLOPS per GPU, and TPU v4-128 configurations, attaining around 168 TFLOPS per TPU chip. These performance metrics were realized through optimized sharding, checkpoint strategies, and the selection of optimal batch sizes, ensuring efficient and effective model training.
Call for Contributions
We invite researchers, developers, and community members to contribute by:
Identifying and reporting issues or biases.
Providing additional pretraining or instruction data.
Suggesting enhancements to documentation or evaluation metrics.
Extending the model to support additional languages or domains.
Please visit our repository for more information and contribution guidelines.
Disclaimer
This repository contains the weights for a model not specifically aligned for safety. Users are advised to perform their own due diligence, safety fine-tuning, and compliance measures. The authors disclaim liability for any direct or indirect damages resulting from model use.
Runs of MERaLiON LLaMA-3-MERaLiON-8B-Instruct on huggingface.co
505
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About LLaMA-3-MERaLiON-8B-Instruct huggingface.co Model
More LLaMA-3-MERaLiON-8B-Instruct license Visit here:
LLaMA-3-MERaLiON-8B-Instruct huggingface.co is an AI model on huggingface.co that provides LLaMA-3-MERaLiON-8B-Instruct's model effect (), which can be used instantly with this MERaLiON LLaMA-3-MERaLiON-8B-Instruct model. huggingface.co supports a free trial of the LLaMA-3-MERaLiON-8B-Instruct model, and also provides paid use of the LLaMA-3-MERaLiON-8B-Instruct. Support call LLaMA-3-MERaLiON-8B-Instruct model through api, including Node.js, Python, http.
LLaMA-3-MERaLiON-8B-Instruct huggingface.co is an online trial and call api platform, which integrates LLaMA-3-MERaLiON-8B-Instruct's modeling effects, including api services, and provides a free online trial of LLaMA-3-MERaLiON-8B-Instruct, you can try LLaMA-3-MERaLiON-8B-Instruct online for free by clicking the link below.
MERaLiON LLaMA-3-MERaLiON-8B-Instruct online free url in huggingface.co:
LLaMA-3-MERaLiON-8B-Instruct is an open source model from GitHub that offers a free installation service, and any user can find LLaMA-3-MERaLiON-8B-Instruct on GitHub to install. At the same time, huggingface.co provides the effect of LLaMA-3-MERaLiON-8B-Instruct install, users can directly use LLaMA-3-MERaLiON-8B-Instruct installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
LLaMA-3-MERaLiON-8B-Instruct install url in huggingface.co: