How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="axteam/MiniCPM5-2B-FP8-dynamic")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("axteam/MiniCPM5-2B-FP8-dynamic")
model = AutoModelForCausalLM.from_pretrained("axteam/MiniCPM5-2B-FP8-dynamic", device_map="auto")
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=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

MiniCPM5-2B ยท FP8 (dynamic)

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

Base model openbmb/MiniCPM5-2B
Method FP8 (dynamic)
Format compressed-tensors FP8_DYNAMIC
Weights / activations W8A8 โ€” FP8 E4M3 weights (per-channel), dynamic per-token FP8 activations
Architecture Dense (Llama-architecture) ยท text-only
Size on disk ~2.8 GB
Calibration None (data-free)
License Apache-2.0

Quantization details

  • Scheme โ€” W8A8 โ€” FP8 E4M3 weights (per-channel), dynamic per-token FP8 activations, stored as compressed-tensors FP8_DYNAMIC.
  • Kept in BF16 โ€” token embeddings, the LM head, and all RMSNorms (a small fraction of parameters).
  • Post-training quantization (no retraining). Tokenizer / chat_template identical to the original.

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.6494 1.5988 (+3.2%)
Top-1 next-token agreement 92.9% 98.9%

Usage (vLLM)

vllm serve axteam/MiniCPM5-2B-FP8-dynamic

License

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


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

openbmb/MiniCPM5-2B ๋ฅผ FP8 (dynamic) ๋กœ ์–‘์žํ™”ํ•œ ์„œ๋น™์šฉ(8-bit) ๋ชจ๋ธ์ž…๋‹ˆ๋‹ค. ์ž‘์„ฑ: axteam.

  • ๋ฐฉ์‹ โ€” FP8 E4M3, ๊ฐ€์ค‘์น˜ ์ฑ„๋„๋ณ„ ์Šค์ผ€์ผ(์ •์ ยท๋ณด์ •๋ถˆํ•„์š”), ํ™œ์„ฑํ™” ๋™์  FP8. ํ˜•์‹ compressed-tensors FP8_DYNAMIC.
  • BF16 ์œ ์ง€ โ€” ํ† ํฐ ์ž„๋ฒ ๋”ฉยทLM ํ—ค๋“œยท๋ชจ๋“  norm.
  • PTQ(์žฌํ•™์Šต ์—†์Œ), ํ† ํฌ๋‚˜์ด์ €ยทchat_template ์›๋ณธ ๋™์ผ.
  • ํ’ˆ์งˆ(์‹ค์ธก) โ€” BF16 ๋Œ€๋น„ perplexity 1.6494(์›๋ณธ 1.5988, +3.2%), top-1 92.9%(์›๋ณธ 98.9%). ๋‚ด๋ถ€ ์˜/ํ•œ 100๋ฌธํ•ญ.
  • ์‚ฌ์šฉ โ€” vllm serve axteam/MiniCPM5-2B-FP8-dynamic. ๋ผ์ด์„ ์Šค Apache-2.0(์›๋ณธ OpenBMB).
Downloads last month
25
Safetensors
Model size
3B params
Tensor type
BF16
ยท
F8_E4M3
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for axteam/MiniCPM5-2B-FP8-dynamic

Quantized
(130)
this model

Collection including axteam/MiniCPM5-2B-FP8-dynamic