Views
No views yet
vllm-patches/PATCHES.md):1V=/usr/local/lib/python3.12/dist-packages/vllm
2docker run --rm --gpus all --ipc=host -p 8000:8000 \
3 -v /path/to/MiniMax-M3-AWQ-int4:/model:ro \
4 -v /path/to/vllm-patches/A_wna16_marlin.py:$V/model_executor/layers/quantization/compressed_tensors/compressed_tensors_moe/compressed_tensors_moe_wna16_marlin.py:ro \
5 -v /path/to/vllm-patches/B_int_wna16.py:$V/model_executor/layers/fused_moe/oracle/int_wna16.py:ro \
6 -v /path/to/vllm-patches/C_config.py:$V/model_executor/layers/fused_moe/config.py:ro \
7 vllm/vllm-openai:minimax-m3 \
8 --model /model \
9 --served-model-name m3 \
10 --tensor-parallel-size 8 \
11 --block-size 128 \
12 --enable-expert-parallel \
13 --enable-prefix-caching \
14 --reasoning-parser minimax_m3 \
15 --enable-auto-tool-choice --tool-call-parser minimax_m3 \
16 --trust-remote-code \
17 --max-model-len 262144 \
18 --gpu-memory-utilization 0.95--block-size 128 is mandatory — MSA's index cache requires page-128 alignment; other block sizes break M3.--tensor-parallel-size 4 (see the context note below).temperature 1.0, top_p 0.95, top_k 40.minimax_m3 reasoning parser).--max-model-len can be raised toward the native 1,048,576 as VRAM allows.| file | what |
|---|---|
model-000{01..16}-of-00016.safetensors | int4 weights (W4A16) |
config.json, recipe.yaml | quant config + the quantization recipe |
configuration_minimax_m3_vl.py, processing_minimax.py, … | model code (--trust-remote-code) |
tokenizer*, chat_template.jinja, preprocessor_config.json | tokenizer + chat / vision preprocessing |
vllm-patches/A_wna16_marlin.py, vllm-patches/B_int_wna16.py, vllm-patches/C_config.py | the three vLLM serving patches — mount over the image copies |
vllm-patches/launch_m3_awq.sh, vllm-patches/PATCHES.md | ready-to-run launch script + patch writeup |
lm_head, and the vision tower are left untouched.(1+w) convention, so the AWQ smoothing fold is applied accordingly (getting this wrong is the classic way to make M3 incoherent). The full recipe is in recipe.yaml.(up+1)·glu activation; the stock fused-MoE int4 kernel doesn't carry the clamp limit, so served experts compute the wrong activation (coherent-looking greedy output, corrupt distribution). The patches plumb the clamp through the Marlin path.vllm-patches/PATCHES.md.--max-model-len (roughly independent of batch size). On 8× A100 you can run one TP-8 replica at long context (128K–512K+), or two TP-4 replicas but each caps around ~64K before the index workspace + weights crowd out the KV cache. Choose by whether you want context or concurrency.fp8_e5m2, not fp8 (e4m3), on A100. The default --kv-cache-dtype fp8 (e4m3) routes to a FlashInfer page-128 kernel that needs trtllm-gen (Blackwell / SM100+) and fails at init on Ampere — and A100's Triton can't compile e4m3 regardless. The e5m2 path does work, with a small set of additional serving patches (patches/), giving ~1.5× KV capacity with CUDA graphs on, at a modest quality cost (≈ +0.017 held-out KL-divergence over bf16 KV): --kv-cache-dtype fp8_e5m2 --disable-custom-all-reduce. Plain bf16/auto stays the zero-patch default; reach for e5m2 when you want more context or concurrency per GPU.