NVFP4 (W4A4) quantization of
WeiboAI/VibeThinker-3B — a 3B reasoning model optimized for math, coding, and STEM tasks.
1# Download from HuggingFace
2hf download r0b0tlab/VibeThinker-3B-NVFP4 --local-dir ./vibethinker-3b-nvfp4
3
4# Serve with vLLM 0.22.0+ (pip or Docker)
5vllm serve ./vibethinker-3b-nvfp4 \
6 --quantization modelopt \
7 --kv-cache-dtype fp8 \
8 --attention-backend flashinfer \
9 --gpu-memory-utilization 0.85 \
10 --max-model-len 32768 \
11 --enable-prefix-caching \
12 --enforce-eager \
13 --trust-remote-code
14
15# Or via Docker
16docker run --gpus all -v $(pwd):/mnt/model:ro \
17 -p 8000:8000 ghcr.io/r0b0tlab/vibethinker-3b-nvfp4
1uv venv .venv --python 3.12
2source .venv/bin/activate
3uv pip install torch --index-url https://download.pytorch.org/whl/cu130
4uv pip install "transformers>=5.4" safetensors accelerate datasets
5uv pip install "nvidia-modelopt[hf]>=0.44.0"
6
7python3 -c "
8import torch, modelopt.torch.quantization as mtq
9from transformers import AutoModelForCausalLM, AutoTokenizer
10from datasets import load_dataset
11from modelopt.torch.export import export_hf_checkpoint
12
13model = AutoModelForCausalLM.from_pretrained('WeiboAI/VibeThinker-3B',
14 torch_dtype=torch.bfloat16, device_map='cpu', low_cpu_mem_usage=True)
15for n, p in model.named_parameters(): p.data = p.data.to('cuda')
16for n, b in model.named_buffers(): b.data = b.data.to('cuda')
17tokenizer = AutoTokenizer.from_pretrained('WeiboAI/VibeThinker-3B')
18calib = load_dataset('abisee/cnn_dailymail', '3.0.0', split='train[:512]')
19def fwd(m):
20 for i in range(0, 512, 16):
21 b = calib[i:i+16]['article']
22 m(**tokenizer(b, return_tensors='pt', padding=True, truncation=True,
23 max_length=1024).to('cuda'))
24mtq.quantize(model, mtq.NVFP4_DEFAULT_CFG, fwd)
25with torch.inference_mode(): export_hf_checkpoint(model, export_dir='./output')
26print('Done!')
27"
1# 1. Download and serve (see Quick Start above)
2# 2. Test identity/reasoning
3curl http://localhost:8000/v1/chat/completions \
4 -H "Content-Type: application/json" \
5 -d '{"messages":[{"role":"user","content":"What is 15 * 7 + 3?"}],"max_tokens":256}'
6# Expected: 108 (correct arithmetic through <think> reasoning)
1{
2 "producer": {"name": "modelopt", "version": "0.44.0"},
3 "quantization": {
4 "quant_algo": "NVFP4",
5 "kv_cache_quant_algo": null,
6 "group_size": 16,
7 "exclude_modules": ["lm_head"]
8 }
9}
MIT (inherited from base model
WeiboAI/VibeThinker-3B).
Quantization artifact copyright 2026 r0b0tlab, distributed under the same MIT license.
Calibration data from
CNN/DailyMail (Apache 2.0).
1@misc{vibethinker2026,
2 title={VibeThinker: Optimizing Post-training for Small Model Reasoning},
3 author={WeiboAI},
4 year={2026},
5 url={https://huggingface.co/papers/2606.16140}
6}
7
8@misc{qwen2.5-coder2025,
9 title={Qwen2.5-Coder: Code is More Than Language},
10 author={Qwen Team, Alibaba Group},
11 year={2025},
12 url={https://huggingface.co/Qwen/Qwen2.5-Coder-3B}
13}
14
15@misc{modelopt2025,
16 title={NVIDIA TensorRT Model Optimizer},
17 author={NVIDIA},
18 year={2025},
19 url={https://github.com/NVIDIA/TensorRT-Model-Optimizer}
20}
21
22@misc{see2017cnndailymail,
23 title={Get To The Point: Summarization with Pointer-Generator Networks},
24 author={See, Abigail and Liu, Peter J. and Manning, Christopher D.},
25 year={2017},
26 journal={ACL},
27 url={https://huggingface.co/datasets/abisee/cnn_dailymail}
28}
29
30@misc{vllm2025,
31 title={vLLM: Easy, Fast, and Cheap LLM Serving},
32 author={vLLM Team},
33 year={2025},
34 url={https://github.com/vllm-project/vllm}
35}