MiniCPM5-2B ยท AWQ INT8 (W8A16)

8-bit quantization of openbmb/MiniCPM5-2B for vLLM serving. Quantized by axteam.

Base model openbmb/MiniCPM5-2B
Method AWQ INT8 (W8A16)
Format compressed-tensors pack-quantized
Weights / activations W8A16 โ€” INT8 sym weights, group 32, BF16 activations
Architecture Dense (Llama-architecture) ยท text-only
Size on disk ~3.2 GB
Calibration 256 samples
License Apache-2.0

Quantization details

  • Scheme โ€” W8A16 โ€” INT8 sym weights, group 32, BF16 activations, stored as compressed-tensors pack-quantized.
  • Kept in BF16 โ€” token embeddings, the LM head, and all RMSNorms (about 21% of all parameters in this build).
  • Post-training quantization (no retraining). Tokenizer / chat_template identical to the original.

Benchmarks (measured)

Every column was measured with the same harness and settings โ€” lm-evaluation-harness on vLLM, greedy, few-shot completion (no chat template). Percentages are recovery vs. the BF16 original.

Benchmark BF16 (original) FP8-dynamic AWQ-8bit (this repo) NVFP4A16 NVFP4 AWQ-4bit
MMLU (5-shot) 59.74 59.56 (99.7%) 59.86 (100.2%) 56.81 (95.1%) 53.50 (89.5%) 56.31 (94.3%)
GSM8K (5-shot, strict) 73.01 71.27 (97.6%) 73.01 (100.0%) 65.20 (89.3%) 55.04 (75.4%) 65.96 (90.3%)
ARC-Challenge (0-shot) 43.94 44.20 (100.6%) 43.86 (99.8%) 43.43 (98.8%) 40.10 (91.3%) 44.88 (102.1%)
Winogrande (5-shot) 64.40 63.22 (98.2%) 64.40 (100.0%) 62.75 (97.4%) 59.04 (91.7%) 62.12 (96.4%)
KMMLU (5-shot, direct) 37.65 38.38 (101.9%) 38.27 (101.7%) 35.56 (94.4%) 34.06 (90.5%) 30.73 (81.6%)
HAE-RAE (0-shot) 39.05 38.13 (97.7%) 39.14 (100.2%) 35.38 (90.6%) 30.16 (77.2%) 36.94 (94.6%)
Average 52.97 52.46 (99.0%) 53.09 (100.2%) 49.85 (94.1%) 45.32 (85.6%) 49.49 (93.4%)

Evaluation (measured)

Fidelity to the BF16 original on an internal mixed EN/KO set (100 prompts, BF16 greedy answers scored under each build).

Metric This model BF16 original
Perplexity (lower = closer) 1.5988 1.5988 (-0.0%)
Top-1 next-token agreement 98.2% 98.9%

Requirements

Runtime vLLM โ€” the architecture is in vLLM; tested here with vLLM 0.32.0.
vLLM install vLLM 0.32 itself needs Python 3.11โ€“3.14, torch 2.13 (CUDA 13.0 build, so an NVIDIA driver with CUDA 13 support), transformers โ‰ฅ5.16.1,<5.20 and compressed-tensors 0.17.0 (both pinned by vLLM; 0.17.0 reads this checkpoint, which was saved with 0.19.0 โ€” do not upgrade it separately).
GPU NVIDIA Turing (sm75) or newer โ€” weight-only INT, no special tensor cores needed. V100 (sm70) is not supported. (Kernel choice per GPU from vLLM 0.32's selection code; only B200 was run here.)
Memory Weights: 3.2 GB. Add KV cache (grows with context length ร— concurrent requests) and a few GB for activations / CUDA graphs; use --tensor-parallel-size N when the weights do not fit one GPU.
Transformers (without vLLM) transformers>=4.56.0 + compressed-tensors>=0.15.0 (checked 4.56.0 / 4.56.2 / 4.57.6 with FP8, AWQ-4bit, NVFP4A16).
trust_remote_code not needed

Usage (vLLM)

Start an OpenAI-compatible server:

vllm serve axteam/MiniCPM5-2B-AWQ-8bit --max-model-len 32768

Query it:

curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d '{
  "model": "axteam/MiniCPM5-2B-AWQ-8bit",
  "messages": [{"role": "user", "content": "๋Œ€ํ•œ๋ฏผ๊ตญ์˜ ์ˆ˜๋„๋Š” ์–ด๋””์ธ๊ฐ€์š”?"}],
  "temperature": 1.0, "top_p": 0.95, "max_tokens": 512
}'

Offline inference in Python:

from vllm import LLM, SamplingParams

llm = LLM(model="axteam/MiniCPM5-2B-AWQ-8bit", max_model_len=32768)
params = SamplingParams(temperature=1.0, top_p=0.95, max_tokens=1024)
out = llm.chat([{"role": "user", "content": "Explain model quantization in two sentences."}], params)
print(out[0].outputs[0].text)

Recommended sampling (from the original generation_config.json): temperature=1.0, top_p=0.95. Thinking mode is on by default in the chat template; to turn it off pass chat_template_kwargs={"enable_thinking": False} (Python llm.chat(..., chat_template_kwargs=...), or "chat_template_kwargs": {"enable_thinking": false} in the request body).

Reducing KV-cache memory (optional, serve-time)

The KV cache is kept in BF16 by default. KV-cache precision is a runtime choice, independent of the weight quantization above; for long contexts or large batches FP8 roughly halves KV-cache memory:

vllm serve axteam/MiniCPM5-2B-AWQ-8bit --kv-cache-dtype fp8

License

Quantized derivative of openbmb/MiniCPM5-2B (Apache-2.0). Original weights & tokenizer belong to OpenBMB.


ํ•œ๊ตญ์–ด ์š”์•ฝ

openbmb/MiniCPM5-2B์˜ AWQ INT8 (W8A16) ์–‘์žํ™” ๋นŒ๋“œ ยท ์ œ์ž‘ axteam

๊ฐœ์š”

ํ•ญ๋ชฉ ๋‚ด์šฉ
์›๋ณธ ๋ชจ๋ธ openbmb/MiniCPM5-2B
์–‘์žํ™” ๋ฐฉ์‹ AWQ INT8 (W8A16)
์ €์žฅ ํ˜•์‹ compressed-tensors pack-quantized
๋ชจ๋ธ ๊ตฌ์กฐ Dense (Llama ๊ตฌ์กฐ) ยท ํ…์ŠคํŠธ ์ „์šฉ
์šฉ๋Ÿ‰ ์•ฝ 3.2 GB
๋ณด์ • ๋ฐ์ดํ„ฐ ์ƒ˜ํ”Œ 256๊ฐœ

์–‘์žํ™” ์ƒ์„ธ

  • ๊ฐ€์ค‘์น˜: INT8 ๋Œ€์นญ, ๊ทธ๋ฃน ํฌ๊ธฐ 32
  • ํ™œ์„ฑํ™”: BF16 (์–‘์žํ™”ํ•˜์ง€ ์•Š์Œ)
  • ์–‘์žํ™” ์ ˆ์ฐจ: PTQ(ํ•™์Šต ํ›„ ์–‘์žํ™”, ์žฌํ•™์Šต ์—†์Œ), AWQ ๋ฐฉ์‹ โ€” ๋ณด์ • ๋ฐ์ดํ„ฐ๋กœ ํ™œ์„ฑํ™”๊ฐ€ ํฐ ๊ฐ€์ค‘์น˜ ์ฑ„๋„์„ ์ฐพ์•„ ์ฑ„๋„๋ณ„ ์Šค์ผ€์ผ๋กœ ๋ณดํ˜ธํ•œ ๋’ค INT8๋กœ ๋ฐ˜์˜ฌ๋ฆผ
  • BF16 ์œ ์ง€: ํ† ํฐ ์ž„๋ฒ ๋”ฉ, LM ํ—ค๋“œ, ๋ชจ๋“  RMSNorm โ€” ์ „์ฒด ํŒŒ๋ผ๋ฏธํ„ฐ์˜ ์•ฝ 21%
  • ์›๋ณธ ํŒŒ์ผ: ํ† ํฌ๋‚˜์ด์ €ยทchat template์€ ์›๋ณธ๊ณผ ๋™์ผ

ํ’ˆ์งˆ (์‹ค์ธก)

  • ์›๋ณธ ๋Œ€๋น„ ์ถฉ์‹ค๋„: PPL 1.5988 (์›๋ณธ 1.5988, ยฑ0.0%, ๋‚ฎ์„์ˆ˜๋ก ์›๋ณธ์— ๊ฐ€๊นŒ์›€), ๋‹ค์Œ ํ† ํฐ top-1 ์ผ์น˜์œจ 98.2% (์›๋ณธ ์ž์ฒด ๊ธฐ์ค€๊ฐ’ 98.9%) โ€” ๋‚ด๋ถ€ ์˜์–ดยทํ•œ๊ตญ์–ด ํ˜ผํ•ฉ ํ”„๋กฌํ”„ํŠธ 100๊ฐœ, ์›๋ณธ(BF16)์˜ greedy ๋‹ต๋ณ€์„ ๊ธฐ์ค€ ํ…์ŠคํŠธ๋กœ ์ธก์ •
  • ๋ฒค์น˜๋งˆํฌ ํ‰๊ท : 53.09 (์›๋ณธ 52.97, 100.2%) โ€” MMLUยทGSM8KยทARC-ChallengeยทWinograndeยทKMMLUยทHAE-RAE 6์ข… ํ‰๊ท , lm-evaluation-harness + vLLM, chat template ์—†๋Š” few-shotยทgreedy, ๋ชจ๋“  ๋นŒ๋“œ๋ฅผ ๊ฐ™์€ ์„ค์ •์œผ๋กœ ์ธก์ •
  • ํ•œ๊ตญ์–ด ๋ฒค์น˜๋งˆํฌ: KMMLU 38.27 (์›๋ณธ 37.65, 101.7%) ยท HAE-RAE 39.14 (์›๋ณธ 39.05, 100.2%)

์š”๊ตฌ์‚ฌํ•ญ

  • ์‹คํ–‰ ์—”์ง„: vLLM, ์ด ๋นŒ๋“œ๋Š” vLLM 0.32.0์—์„œ ์‹คํ–‰ ํ™•์ธ
  • vLLM 0.32 ์„ค์น˜ ์กฐ๊ฑด: Python 3.11~3.14, torch 2.13(CUDA 13.0 ๋นŒ๋“œ, CUDA 13 ์ง€์› ๋“œ๋ผ์ด๋ฒ„ ํ•„์š”), transformers 5.16.1 ์ด์ƒ 5.20 ๋ฏธ๋งŒ, compressed-tensors 0.17.0 โ€” transformersยทcompressed-tensors๋Š” vLLM์ด ๋ฒ„์ „์„ ๊ณ ์ •ํ•˜๋ฏ€๋กœ compressed-tensors๋ฅผ ๋”ฐ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œํ•˜์ง€ ๋ง ๊ฒƒ (์ด ์ฒดํฌํฌ์ธํŠธ๋Š” 0.19.0์œผ๋กœ ์ €์žฅ๋์ง€๋งŒ 0.17.0์—์„œ๋„ ๋กœ๋“œ๋จ)
  • GPU: NVIDIA Turing(sm75) ์ด์ƒ, V100(sm70) ๋ฏธ์ง€์› โ€” ๊ฐ€์ค‘์น˜ ์ „์šฉ ์ •์ˆ˜ ํ˜•์‹์ด๋ผ FP8ยทFP4 ์ „์šฉ ํ…์„œ์ฝ”์–ด ๋ถˆํ•„์š” (GPU๋ณ„ ์ง€์› ์—ฌ๋ถ€๋Š” vLLM 0.32 ์ปค๋„ ์„ ํƒ ์ฝ”๋“œ ๊ธฐ์ค€, ์‹ค์ œ ์‹คํ–‰์€ B200์—์„œ๋งŒ ํ™•์ธ)
  • ๋ฉ”๋ชจ๋ฆฌ: ๊ฐ€์ค‘์น˜ 3.2 GB + KV ์บ์‹œ(์ปจํ…์ŠคํŠธ ๊ธธ์ด ร— ๋™์‹œ ์š”์ฒญ ์ˆ˜์— ๋น„๋ก€) + ํ™œ์„ฑํ™”ยทCUDA graph์šฉ ์ˆ˜ GB โ€” GPU ํ•œ ์žฅ์— ๋‹ค ๋“ค์–ด๊ฐ€์ง€ ์•Š์œผ๋ฉด --tensor-parallel-size N์œผ๋กœ ๋ถ„์‚ฐ
  • Transformers๋กœ ์ง์ ‘ ์‚ฌ์šฉ: transformers 4.56.0 ์ด์ƒ + compressed-tensors 0.15.0 ์ด์ƒ (4.56.0ยท4.56.2ยท4.57.6์—์„œ FP8ยทAWQ-4bitยทNVFP4A16 ํ™•์ธ)
  • trust_remote_code: ๋ถˆํ•„์š”

์‚ฌ์šฉ๋ฒ•

  • ์„œ๋ฒ„ ์‹คํ–‰: vllm serve axteam/MiniCPM5-2B-AWQ-8bit --max-model-len 32768 โ€” OpenAI ํ˜ธํ™˜ API
  • Python: LLM(model="axteam/MiniCPM5-2B-AWQ-8bit", max_model_len=32768).chat(...) โ€” ์ „์ฒด ์˜ˆ์‹œ๋Š” ์œ„ ์˜์–ด ๋ณธ๋ฌธ 'Usage (vLLM)' ์ ˆ ์ฐธ๊ณ 
  • ๊ถŒ์žฅ ์ƒ˜ํ”Œ๋ง: temperature=1.0, top_p=0.95 (์›๋ณธ generation_config.json ๊ธฐ์ค€)
  • thinking ๋ชจ๋“œ: ๊ธฐ๋ณธ ์ผœ์ง โ€” ๋„๋ ค๋ฉด chat_template_kwargs={"enable_thinking": False} ์ „๋‹ฌ(Python์€ llm.chat() ์ธ์ž, HTTP๋Š” ์š”์ฒญ ๋ณธ๋ฌธ์˜ "chat_template_kwargs": {"enable_thinking": false})
  • KV ์บ์‹œ ์ ˆ๊ฐ(์„ ํƒ): vllm serve์— --kv-cache-dtype fp8 ์ถ”๊ฐ€ โ€” ๊ธฐ๋ณธ BF16์ธ KV ์บ์‹œ๋ฅผ FP8๋กœ ์ €์žฅํ•ด KV ์บ์‹œ ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ์•ฝ ์ ˆ๋ฐ˜์œผ๋กœ ์ค„์ž„ (๊ธด ์ปจํ…์ŠคํŠธยท๋™์‹œ ์š”์ฒญ์ด ๋งŽ์„ ๋•Œ ์œ ๋ฆฌ, ๊ฐ€์ค‘์น˜ ์–‘์žํ™”์™€ ๋ณ„๊ฐœ์ธ ์‹คํ–‰ ์˜ต์…˜)

๋ผ์ด์„ ์Šค

  • ๋ผ์ด์„ ์Šค: Apache-2.0 โ€” ์›๋ณธ ๋ชจ๋ธ์˜ ๋ผ์ด์„ ์Šค๋ฅผ ๊ทธ๋Œ€๋กœ ๋”ฐ๋ฆ„
  • ๊ถŒ๋ฆฌ: ์›๋ณธ ๊ฐ€์ค‘์น˜ยทํ† ํฌ๋‚˜์ด์ €๋Š” OpenBMB ์†Œ์œ , ์ด ๋ฆฌํฌ๋Š” ์–‘์žํ™” ํŒŒ์ƒ๋ฌผ
Downloads last month
100
Safetensors
Model size
3B params
Tensor type
I32
ยท
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for axteam/MiniCPM5-2B-AWQ-8bit

Quantized
(130)
this model

Collection including axteam/MiniCPM5-2B-AWQ-8bit