BitCPM-CANN is the first end-to-end 1.58-bit (ternary) large language model training system natively built on Huawei Ascend NPU. The system integrates quantization-aware training (QAT) into the Megatron-LM framework with MindSpeed acceleration, covering the full training stack from custom ternary operators to distributed parallel training on Ascend 910B.
We train a family of four models—BitCPM-CANN-0.5B/1B/3B/8B—and evaluate them against their full-precision MiniCPM4 counterparts across 11 benchmarks. The 1B/3B/8B models retain 95.7%–97.2% of full-precision performance, while enabling approximately 6× memory reduction at inference time. QAT introduces only 5% training throughput overhead (148 vs. 155 TFLOP/s per NPU).
Since BitCPM-CANN models are in pseudo-quantized format, you can use them exactly like standard full-precision models:
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3torch.manual_seed(0)
4
5path = 'openbmb/BitCPM-CANN-3B'
6device = "cuda"
7tokenizer = AutoTokenizer.from_pretrained(path)
8model = AutoModelForCausalLM.from_pretrained(path, torch_dtype=torch.bfloat16, device_map=device, trust_remote_code=True)
9
10# User can directly use the chat interface
11responds, history = model.chat(tokenizer, "Write an article about Artificial Intelligence.", temperature=0.7, top_p=0.7)
12print(responds)
13
14# User can also use the generate interface
15# messages = [
16# {"role": "user", "content": "Write an article about Artificial Intelligence."},
17# ]
18# prompt_text = tokenizer.apply_chat_template(
19# messages,
20# tokenize=False,
21# add_generation_prompt=True,
22# )
23# model_inputs = tokenizer([prompt_text], return_tensors="pt").to(device)
24
25# model_outputs = model.generate(
26# **model_inputs,
27# max_new_tokens=1024,
28# top_p=0.7,
29# temperature=0.7
30# )
31# output_token_ids = [
32# model_outputs[i][len(model_inputs[i]):] for i in range(len(model_inputs['input_ids']))
33# ]
34
35# responses = tokenizer.batch_decode(output_token_ids, skip_special_tokens=True)[0]
36# print(responses)
BitCPM-CANN models are evaluated against their full-precision MiniCPM4 counterparts across 11 benchmarks spanning commonsense reasoning, domain knowledge, and mathematics & reasoning.
BitCPM-CANN uses a ternary quantizer that maps each weight group to {-1, 0, 1} scaled by a group-wise factor, trained with Straight-Through Estimator (STE) for gradient flow. The training follows a two-stage strategy: complete QAT followed by post-training distillation, which avoids amplifying training instability during early training.
For full technical details, please refer to our
Technical Report.
1@article{bitcpmcann,
2 title={{BitCPM-CANN}: Native 1.58-Bit Large Language Model Training on Ascend NPU},
3 author={BitCPM Team},
4 year={2026}
5}