YuLan-Mini is a lightweight language model with 2.4 billion parameters. It achieves performance comparable to industry-leading models trained on significantly more data, despite being pre-trained on only 1.08T tokens. The model excels particularly in the domains of mathematics and code. To facilitate reproducibility, we will open-source the relevant pre-training resources.
*: For easier inference and deployment, we merged the re-parameterized added parameters and scaling factors into the final released models (YuLan-Mini and YuLan-Mini-Intermediate-4K), enabling it to run on the Llama architecture. However, these parameters are still retained in the intermediate checkpoints from the training process.
Pre-train your own LLM. You can use our data and curriculum to train a model that's just as powerful as YuLan-Mini.
Perform your own learning rate annealing. During the annealing phase, YuLan-Mini's learning ability is at its peak. You can resume training from the checkpoint before annealing and use your own dataset for learning rate annealing.
Fine-tune the Instruct version of the LLM. You can use the YuLan-Mini base model to train your own Instruct version.
Training dynamics research. You can use YuLan-Mini's intermediate checkpoints to explore internal changes during the pre-training process.
Synthesize your own data. You can use YuLan-Mini's data pipeline to clean and generate your own dataset.
Quick Start 💻
Below is a simple example for inference using Huggingface:
Huggingface Inference Example
python
1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
34# Load model and tokenizer5tokenizer = AutoTokenizer.from_pretrained("yulan-team/YuLan-Mini")6model = AutoModelForCausalLM.from_pretrained("yulan-team/YuLan-Mini", torch_dtype=torch.bfloat16)78# Input text9input_text ="Renmin University of China is"10inputs = tokenizer(input_text, return_tensors="pt")1112# Completion13output = model.generate(inputs["input_ids"], max_new_tokens=100)14print(tokenizer.decode(output[0], skip_special_tokens=True))
The code in this repository is released under the MIT License.
Policies regarding the use of model weights, intermediate optimizer states, and training data will be announced in future updates.
Limitations: Despite our efforts to mitigate safety concerns and encourage the generation of ethical and lawful text, the probabilistic nature of language models may still lead to unexpected outputs. For instance, responses might contain bias, discrimination, or other harmful content. Please refrain from disseminating such content. We are not liable for any consequences arising from the spread of harmful information.
Citation
If you find YuLan-Mini helpful for your research or development, please cite our technical report:
@misc{hu2024yulanmini,
title={YuLan-Mini: An Open Data-efficient Language Model},
author={Yiwen Hu and Huatong Song and Jia Deng and Jiapeng Wang and Jie Chen and Kun Zhou and Yutao Zhu and Jinhao Jiang and Zican Dong and Wayne Xin Zhao and Ji-Rong Wen},
year={2024},
eprint={2412.17743},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2412.17743},
}