Instructions to use cerebras/MiniMax-M2-REAP-162B-A10B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cerebras/MiniMax-M2-REAP-162B-A10B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cerebras/MiniMax-M2-REAP-162B-A10B", 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("cerebras/MiniMax-M2-REAP-162B-A10B", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("cerebras/MiniMax-M2-REAP-162B-A10B", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use cerebras/MiniMax-M2-REAP-162B-A10B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cerebras/MiniMax-M2-REAP-162B-A10B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cerebras/MiniMax-M2-REAP-162B-A10B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cerebras/MiniMax-M2-REAP-162B-A10B
- SGLang
How to use cerebras/MiniMax-M2-REAP-162B-A10B 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 "cerebras/MiniMax-M2-REAP-162B-A10B" \ --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": "cerebras/MiniMax-M2-REAP-162B-A10B", "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 "cerebras/MiniMax-M2-REAP-162B-A10B" \ --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": "cerebras/MiniMax-M2-REAP-162B-A10B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use cerebras/MiniMax-M2-REAP-162B-A10B with Docker Model Runner:
docker model run hf.co/cerebras/MiniMax-M2-REAP-162B-A10B
thinking disables tools
When I send tools to it, I get:
{
"error": {
"message": "1 validation error for list[function-wrap[__log_extra_fields__()]]\n Invalid JSON: expected value at line 1 column 1 [type=json_invalid, input_value='<think>The user is askin..., \"sort\": \"updated\"} }]', input_type=str]\n For further information visit https://errors.pydantic.dev/2.12/v/json_invalid",
"type": "BadRequestError",
"param": null,
"code": 400
}
}
note this: type=json_invalid, input_value='<think>The user is askin...,
So, thinking interferes with tools. Any solution to this?
do you believe it's a specific issue with the REAP checkpoint? have you tried with vanilla MiniMax?
hm... cannot try the original. Actually this is the only one that fits into 2x rtx 6000 pro blackwell (96GB VRAM each).
Interesting. The above happens on non-stream connections. On stream connections thinking tags are sent properly, but it does not send tools at all.
I am downloading a quant to check if a 4bit version of the original works.
Found this vllm bug: https://github.com/vllm-project/vllm/issues/28852 - I commented there.
Thank you @lazarevich for the fast reply.
@ktsaou i've been using noctrex/MiniMax-M2-MXFP4_MOE-GGUF, HEAVILY over the last week on 2x RTX PRO 6000 Blackwell and it fits nicely. Using llama.cpp, only 92% VRAM used with --ctx-size 204800. I didn't specify any kv cache values in the start command, so I don't know what's being used. It's been SOLID, but I'll also checkout this REAP version to see how it works. When I say I've been using it HEAVILY, I mean exactly that. Mostly with OpenCode but also Cline and some others like Claude Code with CCR.