Text Generation
Transformers
Safetensors
minimax_m2
mxfp4_16
Mixture of Experts
mixture-of-experts
custom_code
8-bit precision
fp8
quantization
compressed-tensors
iq4_nl
sparse-moe
256-experts
top-8
rdna4
amd
rocm
rx9700
gfx12xx
vllm22
tclaviger
r9700
minimax
200k-context
long-context
function-calling
tool-use
agent
llm
large-language-model
open-source
chat
conversational
reasoning
8-bit precision
Instructions to use djdeniro/MiniMax-M2.7-MXFP416 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use djdeniro/MiniMax-M2.7-MXFP416 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="djdeniro/MiniMax-M2.7-MXFP416", 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("djdeniro/MiniMax-M2.7-MXFP416", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("djdeniro/MiniMax-M2.7-MXFP416", 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 djdeniro/MiniMax-M2.7-MXFP416 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "djdeniro/MiniMax-M2.7-MXFP416" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "djdeniro/MiniMax-M2.7-MXFP416", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/djdeniro/MiniMax-M2.7-MXFP416
- SGLang
How to use djdeniro/MiniMax-M2.7-MXFP416 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 "djdeniro/MiniMax-M2.7-MXFP416" \ --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": "djdeniro/MiniMax-M2.7-MXFP416", "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 "djdeniro/MiniMax-M2.7-MXFP416" \ --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": "djdeniro/MiniMax-M2.7-MXFP416", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use djdeniro/MiniMax-M2.7-MXFP416 with Docker Model Runner:
docker model run hf.co/djdeniro/MiniMax-M2.7-MXFP416
Fix MTP info: not available in quantized variant; update performance
Browse files
README.md
CHANGED
|
@@ -39,7 +39,7 @@ The result fits in ~17.5 GiB per GPU (TP8) while retaining near-BF16 quality.
|
|
| 39 |
|
| 40 |
- **456B total params** (sparse), **~30B activated** per token
|
| 41 |
- **256 experts** per MoE layer, top-8 routing, 62 transformer layers
|
| 42 |
-
-
|
| 43 |
- **200k context window**
|
| 44 |
- Native tool-calling support
|
| 45 |
|
|
@@ -81,10 +81,9 @@ docker run --name minimax-mxfp416 \
|
|
| 81 |
-e ROCR_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 \
|
| 82 |
-e TRUST_REMOTE_CODE=1 \
|
| 83 |
-v /path/to/models:/app/models:ro \
|
| 84 |
-
-v /path/to/patches:/patches:ro \
|
| 85 |
-p 8000:8000 \
|
| 86 |
tcclaviger/vllm22:latest \
|
| 87 |
-
bash -c "cp /
|
| 88 |
pip install -q sentencepiece && \
|
| 89 |
exec vllm serve /app/models/MiniMax-M2.7-MXFP416 \
|
| 90 |
--served-model-name minimax-m2.7-mxfp416 \
|
|
|
|
| 39 |
|
| 40 |
- **456B total params** (sparse), **~30B activated** per token
|
| 41 |
- **256 experts** per MoE layer, top-8 routing, 62 transformer layers
|
| 42 |
+
- Config declares `use_mtp: True` (1 layer, 3 modules), but MTP weights were stripped during quantization — not available in this variant
|
| 43 |
- **200k context window**
|
| 44 |
- Native tool-calling support
|
| 45 |
|
|
|
|
| 81 |
-e ROCR_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 \
|
| 82 |
-e TRUST_REMOTE_CODE=1 \
|
| 83 |
-v /path/to/models:/app/models:ro \
|
|
|
|
| 84 |
-p 8000:8000 \
|
| 85 |
tcclaviger/vllm22:latest \
|
| 86 |
+
bash -c "cp /app/models/vllm22_minimax_m2.py /app/vllm/vllm/model_executor/models/minimax_m2.py && \
|
| 87 |
pip install -q sentencepiece && \
|
| 88 |
exec vllm serve /app/models/MiniMax-M2.7-MXFP416 \
|
| 89 |
--served-model-name minimax-m2.7-mxfp416 \
|