Text Generation
Transformers
Safetensors
llama
eagle3
speculative-decoding
draft-model
gqa
vllm
torchspec
minimax
text-generation-inference
Instructions to use Inferact/MiniMax-M3-EAGLE3-GQA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Inferact/MiniMax-M3-EAGLE3-GQA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Inferact/MiniMax-M3-EAGLE3-GQA")# Load model directly from transformers import AutoTokenizer, LlamaForCausalLMEagle3 tokenizer = AutoTokenizer.from_pretrained("Inferact/MiniMax-M3-EAGLE3-GQA") model = LlamaForCausalLMEagle3.from_pretrained("Inferact/MiniMax-M3-EAGLE3-GQA") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Inferact/MiniMax-M3-EAGLE3-GQA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Inferact/MiniMax-M3-EAGLE3-GQA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Inferact/MiniMax-M3-EAGLE3-GQA", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Inferact/MiniMax-M3-EAGLE3-GQA
- SGLang
How to use Inferact/MiniMax-M3-EAGLE3-GQA 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 "Inferact/MiniMax-M3-EAGLE3-GQA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Inferact/MiniMax-M3-EAGLE3-GQA", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Inferact/MiniMax-M3-EAGLE3-GQA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Inferact/MiniMax-M3-EAGLE3-GQA", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Inferact/MiniMax-M3-EAGLE3-GQA with Docker Model Runner:
docker model run hf.co/Inferact/MiniMax-M3-EAGLE3-GQA
File size: 1,745 Bytes
4a97a1b c7b1d3b 9669248 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ---
license: mit
library_name: transformers
base_model: MiniMaxAI/Minimax-M3-preview
pipeline_tag: text-generation
tags:
- eagle3
- speculative-decoding
- draft-model
- gqa
- vllm
- torchspec
- minimax
---
## Model Overview
**Inferact/MiniMax-M3-EAGLE3-GQA** is a **grouped-query-attention (GQA)** EAGLE3 draft model for accelerating inference of [MiniMax-M3](https://huggingface.co/MiniMaxAI/MiniMax-M3), served with **[vLLM](https://github.com/vllm-project/vllm)** and trained with **[TorchSpec](https://github.com/lightseekorg/TorchSpec)**.
It is **retrained on the same datasets** as the multi-head-attention version [Inferact/MiniMax-M3-EAGLE3](https://huggingface.co/Inferact/MiniMax-M3-EAGLE3) — **kimi-mtp, OpenCodeInstruct, SWE-bench, and SWE-bench-Pro** — with the draft's attention changed from **MHA to GQA** (`num_key_value_heads: 64 → 4`) for **inference efficiency** (16× smaller draft KV cache) and **compatibility with the target model**.
The draft is a 1-layer dense Llama (`LlamaForCausalLMEagle3`) on MiniMax-M3's `hidden_size=6144` / `vocab_size=200064`; at serve time it shares the target's embedding and LM head (EAGLE3). See `config.json` for the full architecture.
---
## Performance
Mean accepted length and draft accept rate measured end-to-end against `MiniMaxAI/MiniMax-M3-MXFP8` served with vLLM at `tensor-parallel-size=4`, `num_speculative_tokens=3`, greedy sampling (`temperature=0`, `top_p=1.0`), `max-concurrency=16`.
| Dataset | n | Mean accepted length | Draft accept rate | Per-position accept rate (pos 1 / 2 / 3) |
|---|---:|---:|---:|---:|
| MT-Bench | 64 | 2.668 | 55.62% | 0.745 / 0.537 / 0.387 |
| SPEED-Bench (qualitative) | 64 | 2.561 | 52.04% | 0.719 / 0.500 / 0.342 |
|