Instructions to use mlx-community/MiniMax-M2.1-8bit-gs32 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/MiniMax-M2.1-8bit-gs32 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("mlx-community/MiniMax-M2.1-8bit-gs32") 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) - Transformers
How to use mlx-community/MiniMax-M2.1-8bit-gs32 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mlx-community/MiniMax-M2.1-8bit-gs32", 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("mlx-community/MiniMax-M2.1-8bit-gs32", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("mlx-community/MiniMax-M2.1-8bit-gs32", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- vLLM
How to use mlx-community/MiniMax-M2.1-8bit-gs32 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mlx-community/MiniMax-M2.1-8bit-gs32" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlx-community/MiniMax-M2.1-8bit-gs32", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mlx-community/MiniMax-M2.1-8bit-gs32
- SGLang
How to use mlx-community/MiniMax-M2.1-8bit-gs32 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 "mlx-community/MiniMax-M2.1-8bit-gs32" \ --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": "mlx-community/MiniMax-M2.1-8bit-gs32", "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 "mlx-community/MiniMax-M2.1-8bit-gs32" \ --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": "mlx-community/MiniMax-M2.1-8bit-gs32", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Pi
How to use mlx-community/MiniMax-M2.1-8bit-gs32 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/MiniMax-M2.1-8bit-gs32"
Configure the model in Pi
# 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": "mlx-community/MiniMax-M2.1-8bit-gs32" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use mlx-community/MiniMax-M2.1-8bit-gs32 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "mlx-community/MiniMax-M2.1-8bit-gs32"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "mlx-community/MiniMax-M2.1-8bit-gs32" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlx-community/MiniMax-M2.1-8bit-gs32", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use mlx-community/MiniMax-M2.1-8bit-gs32 with Docker Model Runner:
docker model run hf.co/mlx-community/MiniMax-M2.1-8bit-gs32
- Hermes Agent
How to use mlx-community/MiniMax-M2.1-8bit-gs32 with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/MiniMax-M2.1-8bit-gs32"
Configure Hermes
# 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 mlx-community/MiniMax-M2.1-8bit-gs32
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use mlx-community/MiniMax-M2.1-8bit-gs32 with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "mlx-community/MiniMax-M2.1-8bit-gs32"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "mlx-community/MiniMax-M2.1-8bit-gs32" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Upload
Browse files- model-00016-of-00054.safetensors +3 -0
- model-00017-of-00054.safetensors +3 -0
- model-00018-of-00054.safetensors +3 -0
- model-00019-of-00054.safetensors +3 -0
- model-00020-of-00054.safetensors +3 -0
- model-00021-of-00054.safetensors +3 -0
- model-00022-of-00054.safetensors +3 -0
- model-00023-of-00054.safetensors +3 -0
- model-00024-of-00054.safetensors +3 -0
- model-00025-of-00054.safetensors +3 -0
- model-00026-of-00054.safetensors +3 -0
- model-00027-of-00054.safetensors +3 -0
- model-00028-of-00054.safetensors +3 -0
- model-00029-of-00054.safetensors +3 -0
- model-00030-of-00054.safetensors +3 -0
- model-00031-of-00054.safetensors +3 -0
- model-00032-of-00054.safetensors +3 -0
- model-00033-of-00054.safetensors +3 -0
- model-00034-of-00054.safetensors +3 -0
- model-00035-of-00054.safetensors +3 -0
model-00016-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:32ac20cae62c6b3050b93ae7e85f8846d6dbbb5e2b868626e30142f985d52828
|
| 3 |
+
size 5335284414
|
model-00017-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e3033d87b3e145a760a07f9de58674f668777470c9a9dfdde5a12e3e32fb43af
|
| 3 |
+
size 4278319945
|
model-00018-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8825298acf8c700a3a556c0fe723d6964ff4bc0ce6cb42d8d4d03ee8e4e6922f
|
| 3 |
+
size 5335284416
|
model-00019-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:819ed514fea62ddb79c474ccbddaca3cee204dca6ffabcb922f5380edbf5f254
|
| 3 |
+
size 4328779823
|
model-00020-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2f1737f167143726bdc27085c6c1c2957128d646d0ca4260bd41d675e6607f7e
|
| 3 |
+
size 5335284348
|
model-00021-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:417ceb46c05e567c6e9742115aa2822e1d87f47adae2afdaa917817cf46a380c
|
| 3 |
+
size 4278319919
|
model-00022-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:985d90be39349756873ea547c256d417f20d48619363540cc2f5de28007fe22f
|
| 3 |
+
size 5335284414
|
model-00023-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:36b5cb08d79f88b29be257073648776faf70f590d56dc05fc993c9b53aba3236
|
| 3 |
+
size 4278319941
|
model-00024-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d883fbb17e3acb94b91ff7c42ea4dc09f1b9d81b264bc0b1d6c9c64963c6f443
|
| 3 |
+
size 5335284416
|
model-00025-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:50d5428aea9cfa5d90ebb1a895000d5e706633518cb3311b94cc868a91cc397f
|
| 3 |
+
size 4328779803
|
model-00026-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8291147523dd14e478bd4a377a91522b0e71ac0d936f6636c8b87f6d45ef3151
|
| 3 |
+
size 5335284416
|
model-00027-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:53f79f697a96be0fd220088fc77853a20fa00eb448493f8adb1e35c7fa4ad7d7
|
| 3 |
+
size 4278319945
|
model-00028-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5c03c55aad44887b66d279856859409c294c59dab0bcbc7c34d1811313f88a1a
|
| 3 |
+
size 5335284414
|
model-00029-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:553ac30d6f0303569c5f0dbdeaaa3499dd24278a6ff05e52680f36f0a7e36939
|
| 3 |
+
size 4278319933
|
model-00030-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bb3654eb4bfd3574c3c19b0a652ebddaa58da6ba029e9ac3644fc1c9775433cb
|
| 3 |
+
size 5335284416
|
model-00031-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:801685bfa68a40824b3a56aa463dadeb3dfb5287da30962755c6eabd711ddece
|
| 3 |
+
size 4328779785
|
model-00032-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4f63ee6b5dfb53b8fcdf0a76b2bfd307e8fcc62d3e64883ecfb7edf8caf0f49e
|
| 3 |
+
size 5335284388
|
model-00033-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d8fb6a4906ccc23ae019425edafc38ae5b97ac3942a012e9f940179c3c1b5025
|
| 3 |
+
size 4278319899
|
model-00034-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fcc95413e851f9520c89ff9bec5c0b00616c173cf93f83076e728ea3dd0cbd09
|
| 3 |
+
size 5335284406
|
model-00035-of-00054.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:047a2fed683b68e947df0f11e8dd6eac2633773a2cff64ffbf08b24e1cf82cd9
|
| 3 |
+
size 4278319941
|