Instructions to use amd/MiniMax-M3.1-Flash-MXFP4-QADv1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amd/MiniMax-M3.1-Flash-MXFP4-QADv1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="amd/MiniMax-M3.1-Flash-MXFP4-QADv1", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("amd/MiniMax-M3.1-Flash-MXFP4-QADv1", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("amd/MiniMax-M3.1-Flash-MXFP4-QADv1", trust_remote_code=True, device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use amd/MiniMax-M3.1-Flash-MXFP4-QADv1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "amd/MiniMax-M3.1-Flash-MXFP4-QADv1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amd/MiniMax-M3.1-Flash-MXFP4-QADv1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/amd/MiniMax-M3.1-Flash-MXFP4-QADv1
- SGLang
How to use amd/MiniMax-M3.1-Flash-MXFP4-QADv1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "amd/MiniMax-M3.1-Flash-MXFP4-QADv1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amd/MiniMax-M3.1-Flash-MXFP4-QADv1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "amd/MiniMax-M3.1-Flash-MXFP4-QADv1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amd/MiniMax-M3.1-Flash-MXFP4-QADv1", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use amd/MiniMax-M3.1-Flash-MXFP4-QADv1 with Docker Model Runner:
docker model run hf.co/amd/MiniMax-M3.1-Flash-MXFP4-QADv1
MiniMax-M3.1-Flash MXFP4 QADv1
Pure-MXFP4 MiniMax-M3.1-Flash checkpoint for AMD Instinct MI350/MI355. Drop-in replacement for amd/MiniMax-M3.1-Flash-Quark-MXFP4.
Model Overview
- Model Architecture: MiniMaxM3SparseForConditionalGeneration
- Input: Text, Image, Video
- Output: Text
- Supported Hardware Microarchitecture: AMD MI350/MI355
- Inference Engine: vLLM (same build and flags as
amd/MiniMax-M3.1-Flash-Quark-MXFP4) - Model Optimizer: AMD-Quark + GPTQ rounding + quantization-aware distillation (QAD)
- Routed-expert weight quantization: OCP MXFP4, Static (pure MXFP4, no mixed precision)
- Routed-expert activation quantization: OCP MXFP4, Dynamic
- All other layers: same precision/format as
amd/MiniMax-M3.1-Flash-Quark-MXFP4, with QAD-tuned values
Config, quantization config, tokenizer, processor files, safetensors shard layout, tensor names/dtypes/shapes, and the dspark draft model match the AMD MXFP4 release. Only weight values differ.
Method
- Pure MXFP4 routed experts (OCP MX, E2M1 values, E8M0 block-32 scales), same format and scales as
amd/MiniMax-M3.1-Flash-Quark-MXFP4. - GPTQ rounding of the routed-expert FP4 codes.
- QAD: on-policy distillation of non-expert weights from the official MiniMax NVFP4 release (
MiniMaxAI/MiniMax-M3.1-Flash), including agentic coding trajectories. Experts stay frozen on the GPTQ MXFP4 grid.
Evaluation (DeepSWE)
Same vLLM ROCm A4W4 setup for every model (customer a4w4_reproduce recipe). NVFP4 was run in emulation on MI350. DeepSWE: 113 tasks, 2 runs.
| Benchmark | Plain MXFP4 | NVFP4 | QADv1 (this model) | QADv1 vs plain MXFP4 [95% CI] |
|---|---|---|---|---|
| DeepSWE, whole benchmark (113 tasks, 2 runs) | 58.4% | 60.2% | 61.5% | +3.1 [β4.0, +10.2] |
Notes
- Point estimate is above plain MXFP4 and at/slightly above NVFP4; not statistically significant at this benchmark size.
Model serving
Serve exactly like amd/MiniMax-M3.1-Flash-Quark-MXFP4; only the model path changes.
vLLM
VLLM_ROCM_USE_AITER=1 \
vllm serve /path/to/MiniMax-M3.1-Flash-MXFP4-QADv1 \
--tensor-parallel-size 4 \
--reasoning-parser minimax_m3 \
--block-size 128 \
--speculative-config '{"method":"dspark","model":"/path/to/MiniMax-M3.1-Flash-MXFP4-QADv1/dspark","num_speculative_tokens":7,"attention_backend":"FLASHINFER_TS","kv_cache_dtype":"fp8","draft_sample_method":"probabilistic","rejection_sample_method":"block"}' \
--disable-hybrid-kv-cache-manager
Evaluation used "attention_backend":"TRITON_ATTN" with "num_speculative_tokens":3; outputs are expected to be identical.
Integrity
SHA256SUMS lists the sha256 of every file. Check with sha256sum -c SHA256SUMS.
License
Same as the base model; see LICENSE. Credits: MiniMax, AMD Quark / MXFP4 release.
- Downloads last month
- -
Model tree for amd/MiniMax-M3.1-Flash-MXFP4-QADv1
Base model
MiniMaxAI/MiniMax-M3.1-Flash