GitHub Repo |
Technical Report
π Join us on Discord and WeChat
Overview
BitCPM-CANN-3B-unquantized is the unquantized QAT (Quantization-Aware Training) checkpoint of BitCPM-CANN-3B, designed for continued pre-training and fine-tuning. It preserves full-precision latent weights with ternary fake quantizers (weights β {-1, 0, 1} with group-wise scaling, trained via STE) defined in modeling.py, enabling the model to keep learning under quantization constraints. For technical details, see our Technical Report.
β οΈ This model is NOT for direct inference. For inference, use the pseudo-quantized version: openbmb/BitCPM-CANN-3B.
Continued Pre-training & Fine-tuning
The only requirement is that the forward pass must go through the bundled modeling.py (which contains the ternary fake quantizer). Load with trust_remote_code=True and do NOT replace or bypass the model's forward logic.
Option 1: DeepSpeed (Recommended)
We provide ready-to-use training scripts in the example directory (using the 1B model as an example):
- Continued pre-training:
example/run.sh + example/train.py
- SFT (Supervised Fine-tuning):
example/run_sft.sh + example/train_sft.py
Quick start:
Option 2: HuggingFace-compatible Frameworks
Any framework that supports HuggingFace model loading with custom code can be used, such as LLaMA Factory, HuggingFace Trainer, etc. The key is to ensure trust_remote_code=True:
Post-Training Conversion
After training, use qat-convert.py to fuse the fake quantizer and produce inference-ready pseudo-quantized weights:
The converted model can be loaded for inference in the same way as openbmb/BitCPM-CANN-3Bβno special quantization libraries required.
Workflow
BitCPM-CANN Model Family
Statement
- As a language model, BitCPM-CANN generates content by learning from a vast amount of text.
- However, it does not possess the ability to comprehend or express personal opinions or value judgments.
- Any content generated by BitCPM-CANN does not represent the viewpoints or positions of the model developers.
- Therefore, when using content generated by BitCPM-CANN, users should take full responsibility for evaluating and verifying it on their own.
LICENSE
- This repository and BitCPM-CANN models are released under the Apache-2.0 License.
Citation
- Please cite our technical report if you find our work valuable.