Llama 3.3 Swallow - Built with Llama
Llama 3.3 Swallow is a large language model (70B) that was built by continual pre-training on the Meta Llama 3.3 model. Llama 3.3 Swallow enhanced the Japanese language capabilities of the original Llama 3.3 while retaining the English language capabilities. We use approximately 315 billion tokens that were sampled from a large Japanese web corpus (Swallow Corpus Version 2), Japanese and English Wikipedia articles, and mathematical and coding contents, etc (see the Training Datasets section of the base model) for continual pre-training. The instruction-tuned models (Instruct) were built by supervised fine-tuning (SFT) on the synthetic data specially built for Japanese. See the Swallow Model Index section to find other model variants.
Release History
- March 10, 2025: Released Llama-3.3-Swallow-70B-Instruct-v0.4 and Llama-3.3-Swallow-70B-v0.4.
- December 30, 2024: Released Llama-3.1-Swallow-70B-Instruct-v0.3.
- December 23, 2024: Released Llama-3.1-Swallow-8B-Instruct-v0.3.
- November 11, 2024: Released Llama-3.1-Swallow-8B-v0.2 and Llama-3.1-Swallow-8B-Instruct-v0.2.
- October 08, 2024: Released Llama-3.1-Swallow-8B-v0.1, Llama-3.1-Swallow-8B-Instruct-v0.1, Llama-3.1-Swallow-70B-v0.1, and Llama-3.1-Swallow-70B-Instruct-v0.1.
Swallow Model Index
Model | Llama-3.1-Swallow v0.1 | Llama-3.1-Swallow-Instruct v0.1 | Llama-3.1-Swallow v0.2 | Llama-3.1-Swallow-Instruct v0.2 | Llama-3.1-Swallow-Instruct v0.3 | Llama-3.3-Swallow v0.4 | Llama-3.3-Swallow-Instruct v0.4 |
---|---|---|---|---|---|---|---|
8B | 🤗 HuggingFace | 🤗 HuggingFace | 🤗 HuggingFace | 🤗 HuggingFace | 🤗 HuggingFace | ||
70B | 🤗 HuggingFace | 🤗 HuggingFace | 🤗 HuggingFace | 🤗 HuggingFace | 🤗 HuggingFace |
The website https://swallow-llm.github.io/ provides large language models developed by the Swallow team.
Model Details
- Model type: Please refer to Llama 3.1 MODEL_CARD for details on the model architecture.
- Language(s): Japanese English
- Library: Megatron-LM
- Tokenizer: Please refer to Llama 3.1 blog for details on the tokenizer.
- Contact: swallow[at]nlp.c.titech.ac.jp
Model Performance
Japanese tasks
Model | JCom. | JEMHopQA | NIILC | JSQuAD | XL-Sum | MGSM | WMT20-en-ja | WMT20-ja-en | JMMLU | JHumanEval | Ja Avg |
---|---|---|---|---|---|---|---|---|---|---|---|
4-shot | 4-shot | 4-shot | 4-shot | 1-shot | 4-shot | 4-shot | 4-shot | 5-shot | 0-shot | ||
EM acc | Char-F1 | Char-F1 | Char-F1 | ROUGE-2 | EM acc | BLEU | BLEU | EM acc | pass@1 | ||
Qwen2-72B | 0.960 | 0.620 | 0.561 | 0.926 | 0.238 | 0.768 | 0.275 | 0.241 | 0.782 | 0.561 | 0.593 |
Qwen2.5-72B | 0.972 | 0.611 | 0.619 | 0.930 | 0.279 | 0.828 | 0.287 | 0.252 | 0.804 | 0.648 | 0.623 |
Sarashina2-70B | 0.929 | 0.717 | 0.668 | 0.929 | 0.190 | 0.488 | 0.313 | 0.243 | 0.592 | 0.235 | 0.530 |
Llama 3 70B | 0.946 | 0.606 | 0.589 | 0.922 | 0.228 | 0.664 | 0.286 | 0.252 | 0.705 | 0.491 | 0.569 |
Llama 3.1 70B | 0.946 | 0.616 | 0.603 | 0.925 | 0.228 | 0.672 | 0.287 | 0.257 | 0.669 | 0.462 | 0.566 |
Llama 3 Youko 70B | 0.946 | 0.602 | 0.610 | 0.923 | 0.242 | 0.684 | 0.292 | 0.250 | 0.704 | 0.463 | 0.571 |
Llama 3 Swallow 70B | 0.968 | 0.675 | 0.684 | 0.923 | 0.239 | 0.708 | 0.307 | 0.255 | 0.706 | 0.477 | 0.594 |
Llama 3.1 Swallow 70B | 0.955 | 0.645 | 0.678 | 0.923 | 0.272 | 0.684 | 0.320 | 0.259 | 0.709 | 0.487 | 0.593 |
Llama 3.3 Swallow 70B v0.4 | 0.967 | 0.671 | 0.732 | 0.924 | 0.283 | 0.776 | 0.327 | 0.260 | 0.742 | 0.604 | 0.629 |
English tasks
Model | OpenBookQA | TriviaQA | HellaSWAG | SQuAD2.0 | XWINO | MMLU | GSM8K | MATH | BBH | HumanEval | En Avg |
---|---|---|---|---|---|---|---|---|---|---|---|
4-shot | 4-shot | 4-shot | 4-shot | 4-shot | 5-shot | 4-shot | 4-shot | 3-shot | 0-shot | ||
Acc | EM acc | Acc | EM acc | Acc | Acc | EM acc | CoT EM Acc | CoT EM Acc | pass@1 | ||
Qwen2-72B | 0.418 | 0.790 | 0.677 | 0.673 | 0.915 | 0.842 | 0.893 | 0.560 | 0.643 | 0.608 | 0.702 |
Qwen2.5-72B | 0.416 | 0.760 | 0.685 | 0.693 | 0.901 | 0.861 | 0.870 | 0.626 | 0.727 | 0.554 | 0.709 |
Sarashina2-70B | 0.388 | 0.537 | 0.628 | 0.675 | 0.917 | 0.630 | 0.011 | 0.206 | 0.639 | 0.281 | 0.491 |
Llama 3 70B | 0.440 | 0.826 | 0.690 | 0.618 | 0.920 | 0.787 | 0.801 | 0.446 | 0.829 | 0.527 | 0.689 |
Llama 3.1 70B | 0.450 | 0.829 | 0.690 | 0.605 | 0.920 | 0.786 | 0.798 | 0.434 | 0.655 | 0.546 | 0.671 |
Llama 3 Youko 70B | 0.436 | 0.829 | 0.690 | 0.610 | 0.922 | 0.785 | 0.797 | 0.408 | 0.826 | 0.412 | 0.671 |
Llama 3 Swallow 70B | 0.430 | 0.823 | 0.682 | 0.628 | 0.923 | 0.774 | 0.817 | 0.414 | 0.734 | 0.499 | 0.672 |
Llama 3.1 Swallow 70B v0.1 | 0.428 | 0.826 | 0.690 | 0.612 | 0.927 | 0.772 | 0.809 | 0.380 | 0.806 | 0.540 | 0.679 |
Llama 3.1 Swallow 70B v0.4 | 0.424 | 0.817 | 0.683 | 0.641 | 0.920 | 0.802 | 0.863 | 0.496 | 0.754 | 0.709 | 0.711 |
Evaluation Benchmarks
Japanese evaluation benchmarks
We used llm-jp-eval(v1.3.0), JP Language Model Evaluation Harness(commit #9b42d41) and Code Generation LM Evaluation Harness(commit #0261c52). The details are as follows:
- Multiple-choice question answering (JCommonsenseQA [Kurihara et al., 2022])
- Open-ended question answering (JEMHopQA [Ishii et al., 2024])
- Open-ended question answering (NIILC [関根, 2003])
- Machine reading comprehension (JSQuAD [Kurihara et al., 2022])
- Automatic summarization (XL-Sum [Hasan et al., 2021])
- Machine translation (WMT2020 ja-en [Barrault et al., 2020])
- Machine translation (WMT2020 en-ja [Barrault et al., 2020])
- Mathematical reasoning (MGSM [Shi et al., 2023])
- Academic exams (JMMLU [尹ら, 2024])
- Code generation (JHumanEval [佐藤ら, 2024])
English evaluation benchmarks
We used the Language Model Evaluation Harness(v.0.4.2) and Code Generation LM Evaluation Harness(commit #0261c52). The details are as follows:
- Multiple-choice question answering (OpenBookQA [Mihaylov et al., 2018])
- Open-ended question answering (TriviaQA [Joshi et al., 2017])
- Machine reading comprehension (SQuAD2 [Rajpurkar et al., 2018])
- Commonsense reasoning (XWINO [Tikhonov and Ryabinin, 2021])
- Natural language inference (HellaSwag [Zellers et al., 2019])
- Mathematical reasoning (GSM8K [Cobbe et al., 2021])
- Mathematical reasoning (MATH [Hendrycks et al., 2022][Lightman et al., 2024])
- Reasoning (BBH (BIG-Bench-Hard) [Suzgun et al., 2023])
- Academic exams (MMLU [Hendrycks et al., 2021])
- Code generation (HumanEval [Chen et al., 2021])
Training Datasets
Continual Pre-Training
The following datasets were used for continual pre-training.
- Cosmopedia
- Dclm-baseline-1.0
- English Wikipedia
- FineMath-4+
- Japanese Wikipedia
- Laboro ParaCorpus
- Swallow Corpus Version 2 (filtered using Swallow Education Classifier(Wiki-based))
- Swallow Corpus Version 2 (filtered using Swallow Education Classifier)
- Swallow Corpus Version 2 (synthetic QA-format)
- Swallow Code Version 0.3 (filtering from The Stack v2 train smol ids and then refactoring with Llama-3.3-70B-Instruct)
Swallow Corpus Version 2
We built the Swallow Corpus by extracting high-quality Japanese texts from Common Crawl. In Version 2, we expanded the scope of the Common Crawl collection and modified the pipeline sequence to enable more flexible quality filtering. For Llama 3.1 Swallow v0.2, we further refined our quality filtering and data sampling strategies, resulting in an even higher-quality selection of Japanese texts for pre-training. For Llama 3.3 Swallow 70B v0.4, we generated synthetic QA-format text by using Gemma 2 27B IT to paraphrase educational web documents from our corpus
Further details of the methodology and analysis will be provided in a forthcoming paper.
Swallow Code Version 0.3
We built the Swallow Code Version 0.3 by filtering from the stack v2 train smol ids and then refactoring with Llama-3.3-70B-Instruct. In filtering, we removed the code texts with syntax errors or scored below seven by pylint. We have already released the filtered version as Swallow Code Version 0.1. In refactoring, we gave a prompt to Llama-3.3-70B-Instruct to follow Google Python Style Guide and coding best practices.
Risks and Limitations
The models released here are still in the early stages of our research and development and have not been tuned to ensure outputs align with human intent and safety considerations.
Acknowledgements
We thank Meta Research for releasing Llama 3.3 under a generous open license.
We would like to thank Amazon Web Services (AWS) for providing access to SageMaker HyperPod, which enabled the training of the Llama 3.3 Swallow project.
We received various supports including:
- AIST project: "Research and Development of Foundation Models for Generative AI in the Physical Domain"
- NEDO project: "Development of Artificial Intelligence Application Technology to Support Judgment in Design Risk Assessment Work Based on the Perspective of Skilled Persons" (JPNP18002) of "Development of Integration Technology as the Core of Next Generation Artificial Intelligence and Robotics"
- MEXT project: "Formation of R&D center to ensure transparency and reliability of generative AI models"
- AIST program: Large Generative AI Development Support Program
License
META LLAMA 3.3 COMMUNITY LICENSE and Gemma Terms of Use
Authors
Here are the team members:
- From Institute of Science Tokyo Okazaki Laboratory, the following members:
- From Institute of Science Tokyo YOKOTA Laboratory, the following members:
- From Artificial Intelligence Research Center, AIST, Japan, the following members:
How to cite
If you find our work helpful, please feel free to cite these papers.
@inproceedings{Fujii:COLM2024,
title={Continual Pre-Training for Cross-Lingual LLM Adaptation:
Enhancing Japanese Language Capabilities},
author={Kazuki Fujii and Taishi Nakamura and Mengsay Loem and Hiroki
Iida and Masanari Ohi and Kakeru Hattori and Hirai Shota and Sakae
Mizuki and Rio Yokota and Naoaki Okazaki},
booktitle="Proceedings of the First Conference on Language Modeling",
series={COLM},
pages="(to appear)",
year="2024",
month=oct,
address={University of Pennsylvania, USA},
}
@inproceedings{Okazaki:COLM2024,
title={Building a Large Japanese Web Corpus for Large Language Models},
author={Naoaki Okazaki and Kakeru Hattori and Hirai Shota and Hiroki
Iida and Masanari Ohi and Kazuki Fujii and Taishi Nakamura and Mengsay
Loem and Rio Yokota and Sakae Mizuki},
booktitle="Proceedings of the First Conference on Language Modeling",
series={COLM},
pages="(to appear)",
year="2024",
month=oct,
address={University of Pennsylvania, USA},
}
References
@misc{dubey2024llama3herdmodels,
title={The Llama 3 Herd of Models},
author={Abhimanyu Dubey and Abhinav Jauhri and Abhinav Pandey and Abhishek Kadian and Ahmad Al-Dahle and Aiesha Letman and Akhil Mathur and Alan Schelten and Amy Yang and Angela Fan et al.},
year={2024},
eprint={2407.21783},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2407.21783},
}
- Downloads last month
- 48