Instructions to use MiniMaxAI/MiniMax-M2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MiniMaxAI/MiniMax-M2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MiniMaxAI/MiniMax-M2", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MiniMaxAI/MiniMax-M2", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("MiniMaxAI/MiniMax-M2", trust_remote_code=True) 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use MiniMaxAI/MiniMax-M2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MiniMaxAI/MiniMax-M2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MiniMaxAI/MiniMax-M2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MiniMaxAI/MiniMax-M2
- SGLang
How to use MiniMaxAI/MiniMax-M2 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 "MiniMaxAI/MiniMax-M2" \ --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": "MiniMaxAI/MiniMax-M2", "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 "MiniMaxAI/MiniMax-M2" \ --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": "MiniMaxAI/MiniMax-M2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MiniMaxAI/MiniMax-M2 with Docker Model Runner:
docker model run hf.co/MiniMaxAI/MiniMax-M2
Add SWE-bench Verified evaluation result (69.4%)
#58 opened about 2 months ago
by
SaylorTwift
Install & run MiniMaxAI/MiniMax-M2 easily using llmpm
#56 opened 2 months ago
by
sarthak-saxena
Add Terminal-Bench evaluation result (30.0%)
#55 opened 3 months ago
by
burtenshaw
Add HLE evaluation result (12.5)
#54 opened 4 months ago
by
burtenshaw
Add MMLU-Pro evaluation result (82.0)
#53 opened 4 months ago
by
burtenshaw
Transformers v5 support
1
#52 opened 4 months ago
by
AntonV
Add KTransformers Support in README.md
1
#51 opened 5 months ago
by
oql
Accuracy Recovery Adapters
#49 opened 5 months ago
by
Manni1000
May I ask when the minimax m2.1 will be released
➕ 5
4
#48 opened 5 months ago
by
zhangjian95
vllm部署后推理时全是乱码
9
#47 opened 5 months ago
by
DeepBird
sglang inference error
#46 opened 5 months ago
by
birolkuyumcu
Inference speed issue with local deployment on H800
👀 1
1
#44 opened 6 months ago
by
jiutu
Token Count Calculation in SFT Data Distribution Curation
#42 opened 6 months ago
by
tcy006
Actual guide for fine-tuning?
1
#41 opened 6 months ago
by
openSourcerer9000
Model fails to load using transformers with trust_remote_code=True
1
#40 opened 6 months ago
by
Pratikk25
Ambiguity on interleaved thinking
6
#38 opened 6 months ago
by
jondurbin
Invalid reasoning-parser
8
#37 opened 6 months ago
by
willamazon1
Low generation speed.
2
#36 opened 6 months ago
by
Yurkoff
Question about XET storage: Why are some safetensors files 40 Bytes?
➕ 2
#35 opened 6 months ago
by
yingchaox
mtp or other speculative decoding method?
#34 opened 6 months ago
by
CHNtentes
Expanding context window via YARN
#33 opened 6 months ago
by
sixxio
MiniMax-M2全方位最新实测出炉(300+维度),欢迎进群交流讨论~
#31 opened 6 months ago
by
JEIN
Can it run on NVIDIA A100 80G * 8 ?
2
#30 opened 6 months ago
by
jetto98
Interleaved Thinking, minimax:tool_call parsing
👍 1
1
#29 opened 6 months ago
by
0xSero
mixed results
2
#28 opened 6 months ago
by
kingriel
Missing official chat_template / unclear initialization of <think> interleaving in MiniMax-M2 ?
#27 opened 7 months ago
by
Serveurperso
Request: DOI
#26 opened 7 months ago
by
sreeshanthpeddi
Request for 2000 Samples from training data for NVFP4 QUANTIZATION
❤️ 3
#25 opened 7 months ago
by
jasonface
what data and its volume were used to train the model?
👍 1
4
#21 opened 7 months ago
by
Pep0pi
230B vs 235B: Why no comparison against Qwen3-235B-A22B-Thinking-2507 ?
👍🤝 2
7
#20 opened 7 months ago
by
rtzurtz
AWQ Please
2
#18 opened 7 months ago
by
darkstar3537
GGUF support
👀➕ 7
2
#17 opened 7 months ago
by
geboh67859
Why does it keep trying to connect to huggingface?
1
#16 opened 7 months ago
by
surak
About the LCB evaluation
➕ 2
2
#13 opened 7 months ago
by
sayhitoday
YES!!
🚀 14
2
#12 opened 7 months ago
by
CyborgPaloma
Speculative decoding
👍 4
#9 opened 7 months ago
by
adsfdgfhgjhk11