BitCPM-CANN-1B-unquantized is the
unquantized QAT (Quantization-Aware Training) checkpoint
of BitCPM-CANN-1B, 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-1B
.
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
# Continued pre-trainingcd example && bash run.sh
# Supervised fine-tuningcd example && bash run_sft.sh
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
:
from transformers import AutoModelForCausalLM, AutoTokenizer
path = 'openbmb/BitCPM-CANN-1B-unquantized'
tokenizer = AutoTokenizer.from_pretrained(path, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
path,
torch_dtype=torch.bfloat16,
trust_remote_code=True
)
# Use with your preferred framework (LLaMA Factory, HF Trainer, etc.)# The ternary fake quantizer in modeling.py is applied automatically during forward pass.
Post-Training Conversion
After training, use
qat-convert.py
to fuse the fake quantizer and produce inference-ready pseudo-quantized weights:
BitCPM-CANN-1B-unquantized huggingface.co is an AI model on huggingface.co that provides BitCPM-CANN-1B-unquantized's model effect (), which can be used instantly with this openbmb BitCPM-CANN-1B-unquantized model. huggingface.co supports a free trial of the BitCPM-CANN-1B-unquantized model, and also provides paid use of the BitCPM-CANN-1B-unquantized. Support call BitCPM-CANN-1B-unquantized model through api, including Node.js, Python, http.
BitCPM-CANN-1B-unquantized huggingface.co is an online trial and call api platform, which integrates BitCPM-CANN-1B-unquantized's modeling effects, including api services, and provides a free online trial of BitCPM-CANN-1B-unquantized, you can try BitCPM-CANN-1B-unquantized online for free by clicking the link below.
openbmb BitCPM-CANN-1B-unquantized online free url in huggingface.co:
BitCPM-CANN-1B-unquantized is an open source model from GitHub that offers a free installation service, and any user can find BitCPM-CANN-1B-unquantized on GitHub to install. At the same time, huggingface.co provides the effect of BitCPM-CANN-1B-unquantized install, users can directly use BitCPM-CANN-1B-unquantized installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
BitCPM-CANN-1B-unquantized install url in huggingface.co: