MiniCPM-o-4_5 ยท FP8 (dynamic)
8-bit quantization of openbmb/MiniCPM-o-4_5 for vLLM serving. Quantized by axteam.
Revision 2026-11-01 (FP8 rebuild): the first upload also quantized the LM head (
llm.lm_head) and the audio projector (audio_projection_layer) to FP8, and vLLM 0.32 could not load it (no parameteraudio_projection_layer.linear1.weight_scale). This rebuild keeps both in BF16; on 2026-11-01 it was checked with vLLM 0.32.0 on text input โ it loads and answers short prompts the same way as the BF16 original (image input was checked later, on 2026-11-02; see Requirements). If you downloaded this repo before 2026-11-01 10:43:00 UTC (revision8efe6eb), download it again.
| Base model | openbmb/MiniCPM-o-4_5 |
| Method | FP8 (dynamic) |
| Format | compressed-tensors float-quantized (scheme FP8_DYNAMIC) |
| Weights / activations | W8A8 โ FP8 E4M3 weights (per-channel), dynamic per-token FP8 activations |
| Architecture | Omni (vision + audio + TTS) ยท multimodal |
| Size on disk | ~11.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
float-quantized(schemeFP8_DYNAMIC). - Kept in BF16 โ the vision encoder, the audio (whisper) encoder, the audio projector (
audio_projection_layer), the TTS modules, token embeddings, the LM head (llm.lm_head) and all RMSNorms (about 26% of all parameters in this build). FP8: the language-model attention & MLP projections. - Post-training quantization (no retraining). Tokenizer /
chat_templateidentical to the original.
Benchmarks (measured)
Every column was measured with the same harness and settings โ lm-evaluation-harness on vLLM, greedy, completion-style prompts without a chat template (0- or 5-shot, as listed in each row). MMLU here is lm-eval's generative variant (mmlu_generative: the model writes the answer letter and only an exact match on the first line counts), so it is not directly comparable with MMLU scores measured another way (e.g. log-likelihood scoring). Percentages are recovery vs. the BF16 original.
| Benchmark | BF16 (original) | FP8-dynamic (this repo) |
|---|---|---|
| MMLU (5-shot, generative) | 74.06 | 74.06 (100.0%) |
| GSM8K (5-shot, strict) | 81.73 | 82.49 (100.9%) |
| ARC-Challenge (0-shot) | 56.74 | 56.83 (100.2%) |
| Winogrande (5-shot) | 76.80 | 75.14 (97.8%) |
| KMMLU (5-shot, direct) | 30.25 | 30.57 (101.1%) |
| HAE-RAE (0-shot) | 22.18 | 22.82 (102.9%) |
| Average | 56.96 | 56.98 (100.0%) |
Requirements
| Runtime | vLLM โ the architecture is in vLLM; tested here with vLLM 0.32.0 (text input: short-prompt generation check on 2026-11-01; image input: image-description check on 2026-11-02; audio input not run). |
| 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, e.g. T4) or newer. FP8 math runs on Ada / Hopper / Blackwell (sm89+); on Turing and Ampere vLLM switches to weight-only FP8 automatically. V100 (sm70) is not supported. (Kernel choice per GPU from vLLM 0.32's selection code; only B200 was run here.) |
| Memory | Weights: 11.8 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) | No verified Transformers setup: the upstream code pins transformers==4.51.0, which cannot read compressed-tensors checkpoints (that needs โฅ4.56). |
| trust_remote_code | required (the repo ships its own code) |
Usage (vLLM)
Start an OpenAI-compatible server:
vllm serve axteam/MiniCPM-o-4_5-FP8-dynamic --max-model-len 32768 --trust-remote-code
Query it:
curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d '{
"model": "axteam/MiniCPM-o-4_5-FP8-dynamic",
"messages": [{"role": "user", "content": "๋ํ๋ฏผ๊ตญ์ ์๋๋ ์ด๋์ธ๊ฐ์?"}],
"temperature": 0.6, "top_p": 0.95, "top_k": 20, "max_tokens": 512
}'
Offline inference in Python:
from vllm import LLM, SamplingParams
llm = LLM(model="axteam/MiniCPM-o-4_5-FP8-dynamic", max_model_len=32768, trust_remote_code=True)
params = SamplingParams(temperature=0.6, top_p=0.95, top_k=20, max_tokens=1024)
out = llm.chat([{"role": "user", "content": "Explain model quantization in two sentences."}], params)
print(out[0].outputs[0].text)
# image input (URL or data: URI)
messages = [{"role": "user", "content": [
{"type": "image_url", "image_url": {"url": "https://example.com/your-image.png"}},
{"type": "text", "text": "Describe this image."},
]}]
out = llm.chat(messages, params)
print(out[0].outputs[0].text)
Recommended sampling (from the original
generation_config.json):temperature=0.6,top_p=0.95,top_k=20. Thinking mode is on by default in the chat template; to turn it off passchat_template_kwargs={"enable_thinking": False}(Pythonllm.chat(..., chat_template_kwargs=...), or"chat_template_kwargs": {"enable_thinking": false}in the request body). Text-only serving: add--limit-mm-per-prompt '{"image": 0, "video": 0}'to skip loading the vision encoder's memory budget.
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/MiniCPM-o-4_5-FP8-dynamic --kv-cache-dtype fp8 --trust-remote-code
License
Quantized derivative of openbmb/MiniCPM-o-4_5 (Apache-2.0). Original weights & tokenizer belong to OpenBMB.
ํ๊ตญ์ด ์์ฝ
openbmb/MiniCPM-o-4_5์ FP8 (W8A8) ์์ํ ๋น๋ ยท ์ ์ axteam
๊ฐ์
| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| ์๋ณธ ๋ชจ๋ธ | openbmb/MiniCPM-o-4_5 |
| ์์ํ ๋ฐฉ์ | FP8 ๋์ ์์ํ (W8A8) |
| ์ ์ฅ ํ์ | compressed-tensors float-quantized (scheme FP8_DYNAMIC) |
| ๋ชจ๋ธ ๊ตฌ์กฐ | ์ด๋ ๋ชจ๋ธ (๋น์ + ์ค๋์ค + TTS) ยท ๋ฉํฐ๋ชจ๋ฌ |
| ์ฉ๋ | ์ฝ 11.8 GB |
| ๋ณด์ ๋ฐ์ดํฐ | ์์ (๊ฐ์ค์น ์ค์ผ์ผ์ ๊ฐ์ค์น๋ง์ผ๋ก ๊ณ์ฐ, ํ์ฑํ ์ค์ผ์ผ์ ์คํ ์ ๊ณ์ฐ) |
์์ํ ์์ธ
- ๊ฐ์ค์น: FP8(E4M3), ์ถ๋ ฅ ์ฑ๋๋ณ ์ค์ผ์ผ
- ํ์ฑํ: ์คํ ์ ํ ํฐ๋ณ ๋์ FP8
- ์์ํ ์ ์ฐจ: PTQ(ํ์ต ํ ์์ํ, ์ฌํ์ต ์์), ๊ฐ์ค์น ์ค์ผ์ผ์ ๋ฏธ๋ฆฌ ๊ณ์ฐํ๊ณ ํ์ฑํ ์ค์ผ์ผ์ ์คํ ์ ํ ํฐ๋ง๋ค ๊ณ์ฐ
- BF16 ์ ์ง: ๋น์ ํ์, ์ค๋์ค ์ธ์ฝ๋(whisper), ์ค๋์ค ํฌ์์ธต(
audio_projection_layer), TTS ๋ชจ๋, ํ ํฐ ์๋ฒ ๋ฉ, LM ํค๋(llm.lm_head), ๋ชจ๋ RMSNorm โ ์ ์ฒด ํ๋ผ๋ฏธํฐ์ ์ฝ 26% - ์์ํ ๋์: ์ธ์ด๋ชจ๋ธ ์ดํ ์ ยทMLP ์ ํ์ธต(projection)
- ์๋ณธ ํ์ผ: ํ ํฌ๋์ด์ ยทchat template์ ์๋ณธ๊ณผ ๋์ผ
ํ์ง (์ค์ธก)
- ๋ฒค์น๋งํฌ ํ๊ท : 56.98 (์๋ณธ 56.96, 100.0%) โ MMLU(์์ฑํ)ยทGSM8KยทARC-ChallengeยทWinograndeยทKMMLUยทHAE-RAE 6์ข ํ๊ท , lm-evaluation-harness + vLLM, chat template ์๋ ์์ฑํ ํ๋กฌํํธ(๊ณผ์ ๋ณ 0ยท5-shot, ํ ์ฐธ๊ณ )ยทgreedy, ๋ชจ๋ ๋น๋๋ฅผ ๊ฐ์ ์ค์ ์ผ๋ก ์ธก์
- ํ๊ตญ์ด ๋ฒค์น๋งํฌ: KMMLU 30.57 (์๋ณธ 30.25, 101.1%) ยท HAE-RAE 22.82 (์๋ณธ 22.18, 102.9%)
- MMLU ๋ฐฉ์: lm-eval ์์ฑํ ๋ณํ(
mmlu_generative) โ ๋ชจ๋ธ์ด ๋ต ๊ธ์๋ฅผ ์์ฑํ๊ณ ์ฒซ ์ค์ด ์ ํํ ์ผ์นํด์ผ ์ ๋ต์ผ๋ก ์ฑ์ ํ๋ฏ๋ก, ๋ค๋ฅธ ๋ฐฉ์(์: log-likelihood ์ฑ์ )์ผ๋ก ์ฐ MMLU ์ ์์ ์ง์ ๋น๊ต ๋ถ๊ฐ
์๊ตฌ์ฌํญ
- ์คํ ์์ง: vLLM, ์ด ๋น๋๋ vLLM 0.32.0์์ ์คํ ํ์ธ (ํ ์คํธ ์ ๋ ฅ โ 2026-11-01 ์งง์ ์ง๋ฌธ ์์ฑ ์ ๊ฒ, ์ด๋ฏธ์ง ์ ๋ ฅ โ 2026-11-02 ๊ทธ๋ฆผ ์ค๋ช ์ ๊ฒ, ์ค๋์ค ์ ๋ ฅ์ ์คํ ๋ฏธํ์ธ)
- 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, ์: T4) ์ด์, V100(sm70) ๋ฏธ์ง์ โ FP8 ์ฐ์ฐ์ AdaยทHopperยทBlackwell(sm89 ์ด์)์์ ์ํ, TuringยทAmpere๋ vLLM์ด ๊ฐ์ค์น ์ ์ฉ FP8๋ก ์๋ ์ ํ (GPU๋ณ ์ง์ ์ฌ๋ถ๋ vLLM 0.32 ์ปค๋ ์ ํ ์ฝ๋ ๊ธฐ์ค, ์ค์ ์คํ์ B200์์๋ง ํ์ธ)
- ๋ฉ๋ชจ๋ฆฌ: ๊ฐ์ค์น 11.8 GB + KV ์บ์(์ปจํ
์คํธ ๊ธธ์ด ร ๋์ ์์ฒญ ์์ ๋น๋ก) + ํ์ฑํยทCUDA graph์ฉ ์ GB โ GPU ํ ์ฅ์ ๋ค ๋ค์ด๊ฐ์ง ์์ผ๋ฉด
--tensor-parallel-size N์ผ๋ก ๋ถ์ฐ - Transformers๋ก ์ง์ ์ฌ์ฉ: ๊ฒ์ฆ๋ ์กฐํฉ ์์ โ ์๋ณธ ์ฝ๋๋ transformers 4.51.0 ๊ณ ์ ์ธ๋ฐ, compressed-tensors ์ฒดํฌํฌ์ธํธ๋ 4.56 ์ด์์ด ํ์
- trust_remote_code: ํ์ (๋ฆฌํฌ์ ์์ฒด ์ฝ๋ ํฌํจ)
์ฌ์ฉ๋ฒ
- ์๋ฒ ์คํ:
vllm serve axteam/MiniCPM-o-4_5-FP8-dynamic --max-model-len 32768 --trust-remote-codeโ OpenAI ํธํ API - Python:
LLM(model="axteam/MiniCPM-o-4_5-FP8-dynamic", max_model_len=32768, trust_remote_code=True).chat(...)โ ์ ์ฒด ์์๋ ์ ์์ด ๋ณธ๋ฌธ 'Usage (vLLM)' ์ ์ฐธ๊ณ - ๊ถ์ฅ ์ํ๋ง:
temperature=0.6,top_p=0.95,top_k=20(์๋ณธgeneration_config.json๊ธฐ์ค) - thinking ๋ชจ๋: ๊ธฐ๋ณธ ์ผ์ง โ ๋๋ ค๋ฉด
chat_template_kwargs={"enable_thinking": False}์ ๋ฌ(Python์llm.chat()์ธ์, HTTP๋ ์์ฒญ ๋ณธ๋ฌธ์"chat_template_kwargs": {"enable_thinking": false}) - ์ด๋ฏธ์ง ์
๋ ฅ: ๋ฉ์์ง์
image_urlํญ๋ชฉ ์ฌ์ฉ - ํ
์คํธ๋ง ์ฌ์ฉํ ๋:
--limit-mm-per-prompt '{"image": 0, "video": 0}'โ ๋น์ ํ์์ฉ ๋ฉ๋ชจ๋ฆฌ ์์ฝ์ ์๋ตํด ๋ฉ๋ชจ๋ฆฌ ์ ์ฝ - KV ์บ์ ์ ๊ฐ(์ ํ):
vllm serve์--kv-cache-dtype fp8์ถ๊ฐ โ ๊ธฐ๋ณธ BF16์ธ KV ์บ์๋ฅผ FP8๋ก ์ ์ฅํด KV ์บ์ ๋ฉ๋ชจ๋ฆฌ๋ฅผ ์ฝ ์ ๋ฐ์ผ๋ก ์ค์ (๊ธด ์ปจํ ์คํธยท๋์ ์์ฒญ์ด ๋ง์ ๋ ์ ๋ฆฌ, ๊ฐ์ค์น ์์ํ์ ๋ณ๊ฐ์ธ ์คํ ์ต์ )
์ฐธ๊ณ
- ์์ ์ด๋ ฅ (2026-11-01, ์ฌ์์ํ): ์ฒ์ ์ฌ๋ฆฐ ๋น๋๋ LM ํค๋(
llm.lm_head)์ ์ค๋์ค ํฌ์์ธต(audio_projection_layer)๊น์ง FP8๋ก ๋ฐ๊ฟ vLLM 0.32์์ ๋ก๋๋์ง ์์์(audio_projection_layer.linear1.weight_scale๋ฅผ ๋ชจ๋ฆ) โ ๋ ์ธต์ BF16์ผ๋ก ๋๊ณ ๋ค์ ์์ํ, 2026-11-01 vLLM 0.32.0์์ ํ ์คํธ ์ ๋ ฅ์ผ๋ก ๋ก๋์ ์งง์ ์ง๋ฌธ ์์ฑ์ ํ์ธ(์๋ณธ BF16๊ณผ ๊ฐ์ ๋ต), ์ด๋ฏธ์ง ์ ๋ ฅ์ 2026-11-02์ ๋ฐ๋ก ํ์ธ โ 2026-11-01 10:43:00 UTC(๋ฆฌ๋น์ 8efe6eb) ์ด์ ์ ๋ฐ์๋ค๋ฉด ๋ค์ ๋ฐ์ ๊ฒ
๋ผ์ด์ ์ค
- ๋ผ์ด์ ์ค: Apache-2.0 โ ์๋ณธ ๋ชจ๋ธ์ ๋ผ์ด์ ์ค๋ฅผ ๊ทธ๋๋ก ๋ฐ๋ฆ
- ๊ถ๋ฆฌ: ์๋ณธ ๊ฐ์ค์นยทํ ํฌ๋์ด์ ๋ OpenBMB ์์ , ์ด ๋ฆฌํฌ๋ ์์ํ ํ์๋ฌผ