Instructions to use thu-pacman/PCMind-2.1-Kaiyuan-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use thu-pacman/PCMind-2.1-Kaiyuan-2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="thu-pacman/PCMind-2.1-Kaiyuan-2B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("thu-pacman/PCMind-2.1-Kaiyuan-2B", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("thu-pacman/PCMind-2.1-Kaiyuan-2B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use thu-pacman/PCMind-2.1-Kaiyuan-2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "thu-pacman/PCMind-2.1-Kaiyuan-2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thu-pacman/PCMind-2.1-Kaiyuan-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/thu-pacman/PCMind-2.1-Kaiyuan-2B
- SGLang
How to use thu-pacman/PCMind-2.1-Kaiyuan-2B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "thu-pacman/PCMind-2.1-Kaiyuan-2B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thu-pacman/PCMind-2.1-Kaiyuan-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "thu-pacman/PCMind-2.1-Kaiyuan-2B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "thu-pacman/PCMind-2.1-Kaiyuan-2B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use thu-pacman/PCMind-2.1-Kaiyuan-2B with Docker Model Runner:
docker model run hf.co/thu-pacman/PCMind-2.1-Kaiyuan-2B
PCMind-2.1-Kaiyuan-2B (θζ΅·-2.1-εΌε -2B)
PCMind-2.1-Kaiyuan-2B is a cutting-edge, fully open-source language model (i.e., open dataset) trained on a Ascend 910A cluster. With 1.4B non-embedding parameters and training on 2.2 trillion tokens, it achieves performance competitive with current state-of-the-art fully open models and even rivals some leading open-weight models of similar scale.
Other artifacts:
- The dataset used to train Kaiyuan-2B is published at https://huggingface.co/datasets/thu-pacman/PCMind-2.1-Kaiyuan-2B.
- The PCMind-2.1-Kaiyuan-2B Technical Report is published at https://arxiv.org/abs/2512.07612.
- The data preprocessing framework built on PySpark is published at https://github.com/thu-pacman/Kaiyuan-Spark.
- The training framework built on MindFormers is published at https://github.com/thu-pacman/kaiyuan-mindformers (
kaiyuanbranch).
Introduction
Our data preprocessing and pre-training pipeline is designed for enhanced training efficiency and model quality, achieved through several key innovations:
Dataset Quality Benchmarking: A quantile benchmarking approach applied to major open-source pretraining datasets (e.g., DCLM Baseline, Fineweb-Edu) reveals their quality distributions via small-scale training runs, informing better data selection.
Multi-Phase Pre-Training: The training progresses through 5 phases, strategically increasing the ratio of reasoning-intensive and knowledge-intensive samples while selectively repeating high-quality data portions.
Multi-Domain Curriculum Learning: We keep a stable data mixture across different datasets while ordering samples within each dataset by ascending quality. This curriculum is further leveraged through accommodated learning rate decay and model averaging.
High-Performance Data Preprocessing: We built an open-source, Spark-based framework optimized with Chukonu, delivering exceptional efficiency for large-scale deduplication and sorting tasks.
Architecture for Training Stability: Optimized for training on Ascend 910A clusters (FP16 precision, similar to V100), the Kaiyuan-2B architecture integrates QK norm, sandwich norm, and soft-capping techniques to ensure stable and robust pre-training.
Usage
The model architecture is similar to Qwen/Qwen3-1.7B,
and can be easily loaded by libraries like transformers.
Please use demo.py as an example.
Note: This is a pretrained base model only and has not undergone fine-tuning, reinforcement learning (RL), or any other post-training procedures. It is not ready for direct conversation. Users are recommended to employ few-shot prompting to guide model outputs, or to fine-tune the model for specific downstream applications.
Citation
Please cite our technical report if you use our model, dataset, or code.
@misc{luo2025pcmind21kaiyuan2btechnicalreport,
title={PCMind-2.1-Kaiyuan-2B Technical Report},
author={Kairong Luo and Zhenbo Sun and Xinyu Shi and Shengqi Chen and Bowen Yu and Yunyi Chen and Chenyi Dang and Hengtao Tao and Hui Wang and Fangming Liu and Kaifeng Lyu and Wenguang Chen},
year={2025},
eprint={2512.07612},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2512.07612},
}
License
All artifacts (including code, model weights, and training data) of Kaiyuan-2B are licensed under Apache-2.0 License with the following copyright notice:
Copyright 2025 Tsinghua University & Peng Cheng Laboratory
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- Downloads last month
- 582