Instructions to use intel-ai/MiniMax-M2.7-NVFP4-AutoRound with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use intel-ai/MiniMax-M2.7-NVFP4-AutoRound with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="intel-ai/MiniMax-M2.7-NVFP4-AutoRound", trust_remote_code=True) 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("intel-ai/MiniMax-M2.7-NVFP4-AutoRound", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("intel-ai/MiniMax-M2.7-NVFP4-AutoRound", trust_remote_code=True, 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use intel-ai/MiniMax-M2.7-NVFP4-AutoRound with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "intel-ai/MiniMax-M2.7-NVFP4-AutoRound" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "intel-ai/MiniMax-M2.7-NVFP4-AutoRound", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/intel-ai/MiniMax-M2.7-NVFP4-AutoRound
- SGLang
How to use intel-ai/MiniMax-M2.7-NVFP4-AutoRound 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 "intel-ai/MiniMax-M2.7-NVFP4-AutoRound" \ --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": "intel-ai/MiniMax-M2.7-NVFP4-AutoRound", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "intel-ai/MiniMax-M2.7-NVFP4-AutoRound" \ --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": "intel-ai/MiniMax-M2.7-NVFP4-AutoRound", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use intel-ai/MiniMax-M2.7-NVFP4-AutoRound with Docker Model Runner:
docker model run hf.co/intel-ai/MiniMax-M2.7-NVFP4-AutoRound
Model Details
This model is an NVFP4 E5M3 W4A4 quantized version of MiniMaxAI/MiniMax-M2.7 (https://huggingface.co/MiniMaxAI/MiniMax-M2.7), generated by Intel AutoRound (https://github.com/intel/auto-round) using model-free quantization. Please follow the license of the original model.
NVFP4 E5M3 uses FP4 E2M1 elements for weights and activations, unsigned E5M3 block scales with group size 16, and no tensor-wise global scale. Activations use dynamic per-block scaling.
Selected Linear layers, including attention projections and MoE expert projections, are quantized. Excluded modules, including MoE routers, embeddings, and lm_head, retain their original precision.
KV cache and attention softmax are not part of this checkpoint's W4A4 quantization.
| Property | Value |
|---|---|
| Base model | MiniMaxAI/MiniMax-M2.7 |
| Quantization | NVFP4 E5M3 W4A4 |
| Weight / activation element | FP4 E2M1 |
| Block scale | Unsigned E5M3 |
| Group size | 16 |
| Tensor-wise global scale | None |
| Quantization workflow | Model-free |
| AutoRound version | 0.17.0 |
| Packing format | auto_round:llm_compressor_nvfp4_e5m3 |
How to Use
Environment
The checkpoint requires an inference implementation supporting AutoRound's nvfp4_v2 data type and E5M3 block scales.
The evaluated setup used vLLM 0.32.0 with the QDQ plugin from Intel Neural Compressor PR #2621 (https://github.com/intel/neural-compressor/pull/2621). Install the plugin in the same Python environment as vLLM:
git clone https://github.com/intel/neural-compressor.git
cd neural-compressor
python -m pip install --no-build-isolation -e benchmark/vllm-qdq-plugin/
This inference path uses FP4 Marlin kernels with activation quantize-dequantize (QDQ), rather than native NVFP4 hardware computation.
vLLM Usage
Replace the model path with your local checkpoint directory:
NCCL_NVLS_ENABLE=0 \
VLLM_QDQ=1 \
vllm serve /path/to/MiniMax-M2.7-NVFP4-E5M3-AutoRound \
--dtype bfloat16 \
--trust-remote-code \
--tool-call-parser minimax_m2 \
--enable-auto-tool-choice \
--reasoning-parser minimax_m2 \
--served-model-name minimax-m27 \
--enable-chunked-prefill \
--max-model-len 102400 \
--kv-cache-dtype fp8 \
--gpu-memory-utilization 0.85 \
--port 8001
Adjust context length and GPU memory utilization according to available hardware. FP8 KV cache is a runtime setting, separate from the checkpoint's weight and activation quantization.
Evaluation
The quantized scores below are calculated from five evaluation runs. For each benchmark, one highest and one lowest score are removed, and the remaining three scores are averaged.
Recovery is the quantized score divided by the supplied original-model baseline. Scores are percentages.
| Benchmark | Original Model | NVFP4 E5M3 | Recovery |
|---|---|---|---|
| AIME 2025 | 85.56 | 87.78 | 102.59% |
| GPQA Diamond | 88.72 | 88.38 | 99.62% |
| GSM8K | 96.36 | 96.34 | 99.98% |
| PIQA | 94.00 | 94.23 | 100.24% |
Generate the Model
auto_round MiniMaxAI/MiniMax-M2.7 \
--model_free \
--scheme NVFP4_E5M3 \
--format auto_round \
--output_dir ./MiniMax-M2.7-NVFP4-E5M3-AutoRound
Ethical Considerations and Limitations
The model can produce factually incorrect output, and should not be relied on to produce factually accurate information. Because of the limitations of the pretrained model and the finetuning datasets, it is possible that this model could generate lewd, biased or otherwise offensive outputs. Therefore, before deploying any applications of the model, developers should perform safety testing.
Caveats and Recommendations
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. Here are a couple of useful links to learn more about Intel's AI software:
Disclaimer
The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please consult an attorney before using this model for commercial purposes.
Cite
@article{cheng2023optimize,
title={Optimize weight rounding via signed gradient descent for the quantization of llms},
author={Cheng, Wenhua and Zhang, Weiwei and Shen, Haihao and Cai, Yiyang and He, Xin and Lv, Kaokao and Liu, Yi},
journal={arXiv preprint arXiv:2309.05516},
year={2023}
}
Signed-off-by: Heng, Guo heng.guo@intel.com
- Downloads last month
- -
Model tree for intel-ai/MiniMax-M2.7-NVFP4-AutoRound
Base model
MiniMaxAI/MiniMax-M2.7