MiniMaxAI
Collection
8 items • Updated
How to use exdysa/MiniMax-M2.7-REAP-139B-A10B-MLX-5bit with MLX:
# Make sure mlx-lm is installed
# pip install --upgrade mlx-lm
# Generate text with mlx-lm
from mlx_lm import load, generate
model, tokenizer = load("exdysa/MiniMax-M2.7-REAP-139B-A10B-MLX-5bit")
prompt = "Write a story about Einstein"
messages = [{"role": "user", "content": prompt}]
prompt = tokenizer.apply_chat_template(
messages, add_generation_prompt=True
)
text = generate(model, tokenizer, prompt=prompt, verbose=True)How to use exdysa/MiniMax-M2.7-REAP-139B-A10B-MLX-5bit with Pi:
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "exdysa/MiniMax-M2.7-REAP-139B-A10B-MLX-5bit"
# Install Pi:
npm install -g @mariozechner/pi-coding-agent
# Add to ~/.pi/agent/models.json:
{
"providers": {
"mlx-lm": {
"baseUrl": "http://localhost:8080/v1",
"api": "openai-completions",
"apiKey": "none",
"models": [
{
"id": "exdysa/MiniMax-M2.7-REAP-139B-A10B-MLX-5bit"
}
]
}
}
}# Start Pi in your project directory: pi
How to use exdysa/MiniMax-M2.7-REAP-139B-A10B-MLX-5bit with Hermes Agent:
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "exdysa/MiniMax-M2.7-REAP-139B-A10B-MLX-5bit"
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default exdysa/MiniMax-M2.7-REAP-139B-A10B-MLX-5bit
hermes
How to use exdysa/MiniMax-M2.7-REAP-139B-A10B-MLX-5bit with MLX LM:
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "exdysa/MiniMax-M2.7-REAP-139B-A10B-MLX-5bit"
# Install MLX LM
uv tool install mlx-lm
# Start the server
mlx_lm.server --model "exdysa/MiniMax-M2.7-REAP-139B-A10B-MLX-5bit"
# Calling the OpenAI-compatible server with curl
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "exdysa/MiniMax-M2.7-REAP-139B-A10B-MLX-5bit",
"messages": [
{"role": "user", "content": "Hello"}
]
}'Original Model Link : dervig/m51Lab-MiniMax-M2.7-REAP-139B-A10B
name: MiniMax-M2.7-REAP-139B-A10B-5bit
base_model: MiniMaxAI/MiniMax-M2.7
license: other
license_name: modified-mit
license_link: https://huggingface.co/MiniMaxAI/MiniMax-M2.7/blob/main/LICENSE
pipeline_tag: text-generation
tasks: text-generation
language: en
library_name: mlx
size: 95GB
tags:
- Cerebras
- MiniMaxAI
- M2.7
- REAP
- MLX
- static quantization
- 4-bit
- moe
- pruning
- text-generation
- mlx
This is a 230 billion parameter MiniMax M2.7 model with 40% of its experts pruned with REAP (Router-weighted Expert Activation Pruning), then converted to MLX with mlx_lm.
Conversion sequence using source version of mlx_lm@0.31.3 :
mlx_lm.convert --hf-path dervig/m51Lab-MiniMax-M2.7-REAP-139B-A10B --mlx-path ~/Downloads/MiniMax-M2.7-REAP-139B-A10B-MLX-5bit -q --q-bits 5
5-bit
Base model
MiniMaxAI/MiniMax-M2.7