This model is a continual pre-training of Llama-3.1-8B on a mix of the Python subset of The-Stack-v2-train-smol-ids (from SwallowCode, Experiment 1) and multilingual text datasets. The model was trained to evaluate the baseline performance of unfiltered Python code from The-Stack-v2 in the SwallowCode ablation experiments.
The model shows baseline performance on code generation tasks (HumanEval and HumanEval+) and maintains general capabilities on knowledge, reasoning, and common sense benchmarks. It serves as a reference point for comparing subsequent ablation experiments in the SwallowCode pipeline.
It was trained on 50 billion tokens using a mix of 16% SwallowCode (Experiment 1, Python subset) and 84% multilingual text, following the setup described in the SwallowCode paper. Training was performed using Megatron-LM.
# pip install -q transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model = "tokyotech-llm/<model-name>"
device = "cuda" # for GPU usage or "cpu" for CPU usage
tokenizer = AutoTokenizer.from_pretrained(model)
model = AutoModelForCausalLM.from_pretrained(model).to(device)
inputs = tokenizer.encode("def fibonacci(n):", return_tensors="pt").to(device)
outputs = model.generate(inputs, max_length=100)
print(tokenizer.decode(outputs[0]))
The training mix consists of:
Details are in the paper’s Appendix.
The model was evaluated using the setup described in the SwallowCode paper, with the lm-evaluation-harness and BigCodeBench. Benchmarks include code generation (HumanEval, HumanEval+) and general tasks (OpenBookQA, TriviaQA, HellaSwag, SQuAD 2.0, XWINO, MMLU, GSM8K, BBH). Results are reported for checkpoints at 10B, 20B, 30B, 40B, and 50B tokens.
@misc{fujii2025rewritingpretrainingdataboosts,
title={Rewriting Pre-Training Data Boosts LLM Performance in Math and Code},
author={Kazuki Fujii and Yukito Tajima and Sakae Mizuki and Hinari Shimada and Taihei Shiotani and Koshiro Saito and Masanari Ohi and Masaki Kawamura and Taishi Nakamura and Takumi Okamoto and Shigeki Ishida and Kakeru Hattori and Youmi Ma and Hiroya Takamura and Rio Yokota and Naoaki Okazaki},
year={2025},
eprint={2505.02881},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2505.02881},
}
15 commits
This model is a continual pre-training of Llama-3.1-8B on a mix of the Python subset of The-Stack-v2-train-smol-ids (from SwallowCode, Experiment 1) and multilingual text datasets. The model was trained to evaluate the baseline performance of unfiltered Python code from The-Stack-v2 in the SwallowCode ablation experiments.
The model shows baseline performance on code generation tasks (HumanEval and HumanEval+) and maintains general capabilities on knowledge, reasoning, and common sense benchmarks. It serves as a reference point for comparing subsequent ablation experiments in the SwallowCode pipeline.
It was trained on 50 billion tokens using a mix of 16% SwallowCode (Experiment 1, Python subset) and 84% multilingual text, following the setup described in the SwallowCode paper. Training was performed using Megatron-LM.
# pip install -q transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model = "tokyotech-llm/<model-name>"
device = "cuda" # for GPU usage or "cpu" for CPU usage
tokenizer = AutoTokenizer.from_pretrained(model)
model = AutoModelForCausalLM.from_pretrained(model).to(device)
inputs = tokenizer.encode("def fibonacci(n):", return_tensors="pt").to(device)
outputs = model.generate(inputs, max_length=100)
print(tokenizer.decode(outputs[0]))
The training mix consists of:
Details are in the paper’s Appendix.
The model was evaluated using the setup described in the SwallowCode paper, with the lm-evaluation-harness and BigCodeBench. Benchmarks include code generation (HumanEval, HumanEval+) and general tasks (OpenBookQA, TriviaQA, HellaSwag, SQuAD 2.0, XWINO, MMLU, GSM8K, BBH). Results are reported for checkpoints at 10B, 20B, 30B, 40B, and 50B tokens.
@misc{fujii2025rewritingpretrainingdataboosts,
title={Rewriting Pre-Training Data Boosts LLM Performance in Math and Code},
author={Kazuki Fujii and Yukito Tajima and Sakae Mizuki and Hinari Shimada and Taihei Shiotani and Koshiro Saito and Masanari Ohi and Masaki Kawamura and Taishi Nakamura and Takumi Okamoto and Shigeki Ishida and Kakeru Hattori and Youmi Ma and Hiroya Takamura and Rio Yokota and Naoaki Okazaki},
year={2025},
eprint={2505.02881},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2505.02881},
}
15 commits