4. Quickstart
from transformers import AutoModelForCausalLM, AutoTokenizertokenizer = AutoTokenizer.from_pretrained( 'Nanbeige/Nanbeige4-3B-Base', use_fast=False, trust_remote_code=True)model = AutoModelForCausalLM.from_pretrained( 'Nanbeige/Nanbeige4-3B-Base', torch_dtype='auto', device_map='auto', trust_remote_code=True)prompt = "中国的首都是"input_ids = tokenizer(prompt, return_tensors='pt').input_idsoutput_ids = model.generate(input_ids.to('cuda'))resp = tokenizer.decode(output_ids[0][len(input_ids[0]):], skip_special_tokens=True)print(resp)
5. Limitations
While we place great emphasis on the safety of the model during the training process, striving to ensure that its outputs align with ethical and legal requirements, it may not completely avoid generating unexpected outputs due to the model's size and probabilistic nature. These outputs may include harmful content such as bias or discrimination. Please don't propagate such content. We do not assume any responsibility for the consequences resulting from the dissemination of inappropriate information.
6. Citation
If you find our model useful or want to use it in your projects, please cite as follows:
@misc{yang2025nanbeige43btechnicalreportexploring, title={Nanbeige4-3B Technical Report: Exploring the Frontier of Small Language Models}, author={Chen Yang and Guangyue Peng and Jiaying Zhu and Ran Le and Ruixiang Feng and Tao Zhang and Wei Ruan and Xiaoqi Liu and Xiaoxue Cheng and Xiyun Xu and Yang Song and Yanzipeng Gao and Yiming Jia and Yun Xing and Yuntao Wen and Zekai Wang and Zhenwei An and Zhicong Sun and Zongchao Chen}, year={2025}, eprint={2512.06266}, archivePrefix={arXiv}, primaryClass={cs.CL}, url={https://arxiv.org/abs/2512.06266}, }
If you have any questions, please raise an issue or contact us at nanbeige@126.com.