Text Generation
Transformers
Safetensors
llama
eagle3
speculative-decoding
draft-model
vllm
torchspec
minimax
text-generation-inference
Instructions to use Inferact/MiniMax-M3-EAGLE3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Inferact/MiniMax-M3-EAGLE3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Inferact/MiniMax-M3-EAGLE3")# Load model directly from transformers import AutoTokenizer, LlamaForCausalLMEagle3 tokenizer = AutoTokenizer.from_pretrained("Inferact/MiniMax-M3-EAGLE3") model = LlamaForCausalLMEagle3.from_pretrained("Inferact/MiniMax-M3-EAGLE3") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Inferact/MiniMax-M3-EAGLE3 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" # 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", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Inferact/MiniMax-M3-EAGLE3
- SGLang
How to use Inferact/MiniMax-M3-EAGLE3 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" \ --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", "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" \ --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", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Inferact/MiniMax-M3-EAGLE3 with Docker Model Runner:
docker model run hf.co/Inferact/MiniMax-M3-EAGLE3
Update README.md
Browse files
README.md
CHANGED
|
@@ -14,7 +14,7 @@ tags:
|
|
| 14 |
|
| 15 |
## Model Overview
|
| 16 |
|
| 17 |
-
**Inferact/MiniMax-M3-EAGLE3** is an EAGLE3 draft model for accelerating inference of [MiniMax-M3](https://huggingface.co/MiniMaxAI/
|
| 18 |
|
| 19 |
The draft is a **1-layer** dense Llama (`LlamaForCausalLMEagle3`, ~3.3 B params) operating 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.
|
| 20 |
|
|
@@ -22,7 +22,7 @@ The draft is a **1-layer** dense Llama (`LlamaForCausalLMEagle3`, ~3.3 B params)
|
|
| 22 |
|
| 23 |
## Performance
|
| 24 |
|
| 25 |
-
All numbers are measured end-to-end against `
|
| 26 |
|
| 27 |
| Category | Dataset | n | Mean Accept Length | Draft Accept Rate | Per-pos Accept Rate |
|
| 28 |
|---|---|---:|---:|---:|---|
|
|
@@ -68,31 +68,9 @@ Draft architecture, TTT depth, sequence length, cluster layout, and optimizer ar
|
|
| 68 |
### Launch Server (vLLM)
|
| 69 |
|
| 70 |
```bash
|
| 71 |
-
vllm serve
|
| 72 |
--tensor-parallel-size 4 \
|
| 73 |
--gpu-memory-utilization 0.90 \
|
| 74 |
-
--max-model-len 65536 \
|
| 75 |
--block-size 128 \
|
| 76 |
-
--enforce-eager \
|
| 77 |
-
--no-enable-prefix-caching \
|
| 78 |
--speculative-config '{"method": "eagle3", "model": "Inferact/MiniMax-M3-EAGLE3", "num_speculative_tokens": 3, "attention_backend": "FLASH_ATTN"}'
|
| 79 |
-
```
|
| 80 |
-
|
| 81 |
-
### Run Benchmarks
|
| 82 |
-
|
| 83 |
-
```bash
|
| 84 |
-
vllm-bench \
|
| 85 |
-
--backend openai-chat \
|
| 86 |
-
--base-url http://127.0.0.1:8000 \
|
| 87 |
-
--model Inferact/minimax-m3-final \
|
| 88 |
-
--dataset-name speed-bench \
|
| 89 |
-
--speed-bench-config throughput_16k \
|
| 90 |
-
--speed-bench-max-input-len 10240 \
|
| 91 |
-
--speed-bench-category low_entropy \
|
| 92 |
-
--num-warmups 5 \
|
| 93 |
-
--num-prompts 1000 \
|
| 94 |
-
--output-len 1536 \
|
| 95 |
-
--sweep-max-concurrency 64 \
|
| 96 |
-
--sweep-num-prompts-factor 1 \
|
| 97 |
-
--save-result
|
| 98 |
-
```
|
|
|
|
| 14 |
|
| 15 |
## Model Overview
|
| 16 |
|
| 17 |
+
**Inferact/MiniMax-M3-EAGLE3** is an EAGLE3 draft model for accelerating inference of [MiniMax-M3](https://huggingface.co/MiniMaxAI/MiniMax-M3). It is served end-to-end with **[vLLM](https://github.com/vllm-project/vllm)** and was trained using **[TorchSpec](https://github.com/lightseekorg/TorchSpec)** — a torch-native online speculative-decoding training framework that runs FSDP training and vLLM-based target inference concurrently, learning from **MiniMax-M3-regenerated responses and live vLLM-generated hidden states** to match the base model's exact token distribution.
|
| 18 |
|
| 19 |
The draft is a **1-layer** dense Llama (`LlamaForCausalLMEagle3`, ~3.3 B params) operating 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.
|
| 20 |
|
|
|
|
| 22 |
|
| 23 |
## Performance
|
| 24 |
|
| 25 |
+
All numbers are measured end-to-end against `MiniMaxAI/MiniMax-M3-MXFP8` served with vLLM at `tensor-parallel-size=4`, `num_speculative_tokens=3`, and `--enforce-eager`. Greedy draft sampling (`topk=1`).
|
| 26 |
|
| 27 |
| Category | Dataset | n | Mean Accept Length | Draft Accept Rate | Per-pos Accept Rate |
|
| 28 |
|---|---|---:|---:|---:|---|
|
|
|
|
| 68 |
### Launch Server (vLLM)
|
| 69 |
|
| 70 |
```bash
|
| 71 |
+
vllm serve MiniMaxAI/MiniMax-M3-MXFP8 \
|
| 72 |
--tensor-parallel-size 4 \
|
| 73 |
--gpu-memory-utilization 0.90 \
|
|
|
|
| 74 |
--block-size 128 \
|
|
|
|
|
|
|
| 75 |
--speculative-config '{"method": "eagle3", "model": "Inferact/MiniMax-M3-EAGLE3", "num_speculative_tokens": 3, "attention_backend": "FLASH_ATTN"}'
|
| 76 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|