Text Generation
Transformers
Safetensors
minimax_m2
minimax
Mixture of Experts
reap
pruning
conversational
custom_code
Instructions to use dervig/m51Lab-MiniMax-M2.7-REAP-139B-A10B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dervig/m51Lab-MiniMax-M2.7-REAP-139B-A10B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dervig/m51Lab-MiniMax-M2.7-REAP-139B-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("dervig/m51Lab-MiniMax-M2.7-REAP-139B-A10B", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("dervig/m51Lab-MiniMax-M2.7-REAP-139B-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 Settings
- vLLM
How to use dervig/m51Lab-MiniMax-M2.7-REAP-139B-A10B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dervig/m51Lab-MiniMax-M2.7-REAP-139B-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": "dervig/m51Lab-MiniMax-M2.7-REAP-139B-A10B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dervig/m51Lab-MiniMax-M2.7-REAP-139B-A10B
- SGLang
How to use dervig/m51Lab-MiniMax-M2.7-REAP-139B-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 "dervig/m51Lab-MiniMax-M2.7-REAP-139B-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": "dervig/m51Lab-MiniMax-M2.7-REAP-139B-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 "dervig/m51Lab-MiniMax-M2.7-REAP-139B-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": "dervig/m51Lab-MiniMax-M2.7-REAP-139B-A10B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dervig/m51Lab-MiniMax-M2.7-REAP-139B-A10B with Docker Model Runner:
docker model run hf.co/dervig/m51Lab-MiniMax-M2.7-REAP-139B-A10B
Add deployment pointer for 96 GB Mac
Browse files
README.md
CHANGED
|
@@ -79,6 +79,10 @@ Final HumanEval and sanity numbers will be added when the current benchmark run
|
|
| 79 |
|
| 80 |
**5 / 5 pass**. The model is fully usable in production.
|
| 81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
## Known minor imperfection
|
| 83 |
|
| 84 |
During integrity audit of the 62-layer bias-correction tensor fix, one layer (`layer 0`) had expert keep-indices that differed slightly from the REAP-retained set (86 of 154 positions). The magnitude of the resulting bias mismatch is bounded by the layer-0 bias natural variance (`max |Δ| = 0.75` on values in `[8.06, 8.88]`), so the impact on routing is negligible — confirmed by the 5/5 smoke test above. All other 61 layers are bit-perfect. Full analysis in the [reproducibility log](https://github.com/m51ai/m51Lab-MiniMax-M2.7-REAP/blob/main/docs/research_log.md).
|
|
|
|
| 79 |
|
| 80 |
**5 / 5 pass**. The model is fully usable in production.
|
| 81 |
|
| 82 |
+
### Deploying on 96 GB Apple Silicon
|
| 83 |
+
|
| 84 |
+
The GGUF variants in the [companion repo](https://huggingface.co/dervig/m51Lab-MiniMax-M2.7-REAP-139B-A10B-GGUF) are the practical choice for 96 GB Mac Studio / M4 Max. That card contains an explicit memory & context sizing guide — **note that at long context, KV cache quantization (`--cache-type-k q8_0`) is essential for this architecture** (~0.25 GB of FP16 KV cache per 1K tokens across 62 layers).
|
| 85 |
+
|
| 86 |
## Known minor imperfection
|
| 87 |
|
| 88 |
During integrity audit of the 62-layer bias-correction tensor fix, one layer (`layer 0`) had expert keep-indices that differed slightly from the REAP-retained set (86 of 154 positions). The magnitude of the resulting bias mismatch is bounded by the layer-0 bias natural variance (`max |Δ| = 0.75` on values in `[8.06, 8.88]`), so the impact on routing is negligible — confirmed by the 5/5 smoke test above. All other 61 layers are bit-perfect. Full analysis in the [reproducibility log](https://github.com/m51ai/m51Lab-MiniMax-M2.7-REAP/blob/main/docs/research_log.md).
|