Instructions to use Akicou/MiMo-V2.5-NE128-72-OP with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Akicou/MiMo-V2.5-NE128-72-OP with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Akicou/MiMo-V2.5-NE128-72-OP", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Akicou/MiMo-V2.5-NE128-72-OP", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Akicou/MiMo-V2.5-NE128-72-OP with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Akicou/MiMo-V2.5-NE128-72-OP" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Akicou/MiMo-V2.5-NE128-72-OP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Akicou/MiMo-V2.5-NE128-72-OP
- SGLang
How to use Akicou/MiMo-V2.5-NE128-72-OP 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 "Akicou/MiMo-V2.5-NE128-72-OP" \ --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": "Akicou/MiMo-V2.5-NE128-72-OP", "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 "Akicou/MiMo-V2.5-NE128-72-OP" \ --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": "Akicou/MiMo-V2.5-NE128-72-OP", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Akicou/MiMo-V2.5-NE128-72-OP with Docker Model Runner:
docker model run hf.co/Akicou/MiMo-V2.5-NE128-72-OP
MiMo-V2.5-NE128-72-OP
This is an offline seed-pruned version of XiaomiMiMo/MiMo-V2.5, produced with Akicou/ream.
It is not an official Xiaomi release.
Name decoding
MiMo-V2.5-NE128-72-OP means:
NE128: created with--n-experts 12872: seed72OP: offline pruning
Important: in this pruning script, --n-experts 128 means 128 experts were removed from each MoE layer. The resulting model keeps 128 / 256 routed experts per MoE layer.
What was changed
The base MiMo-V2.5 checkpoint was pruned directly at the safetensors level without loading the full Transformers model into memory and without GPU calibration.
Pruning details:
| Item | Value |
|---|---|
| Base model | XiaomiMiMo/MiMo-V2.5 |
| Method | Offline random seed expert pruning |
| Command flag | --n-experts 128 |
| Seed | 72 |
| Original routed experts per MoE layer | 256 |
| Experts removed per MoE layer | 128 |
| Routed experts retained per MoE layer | 128 |
| MoE layers processed | 47 |
| Dense layer | Layer 0 left unchanged |
| Config value | n_routed_experts: 128 |
| Output model safetensors payload | ~`163.50 GB` |
Only routed MoE experts and their router tensors were pruned/remapped. Non-MoE weights, tokenizer files, multimodal/audio files, and model code were copied from the base model.
How it was created
python examples/compress_model.py \
--model XiaomiMiMo/MiMo-V2.5 \
--output ./MiMo-V2.5-NE128-72-OP \
--offline-seed-prune \
--n-experts 128 \
--seed 72
Important notes
- This is random seed pruning, not calibrated saliency pruning.
- No benchmark evaluation is claimed here.
- Quality may be significantly worse than the original model.
- The model may require a recent
torch/transformersstack because the original MiMo-V2.5 code uses FP8/custom MoE integrations. - Use
trust_remote_code=Truewhen loading the model.
Basic text usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Akicou/MiMo-V2.5-NE128-72-OP"
tokenizer = AutoTokenizer.from_pretrained(
model_id,
trust_remote_code=True,
)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
low_cpu_mem_usage=True,
)
prompt = "What is a reaper?"
inputs = tokenizer(prompt, return_tensors="pt").to(next(model.parameters()).device)
with torch.no_grad():
output = model.generate(**inputs, max_new_tokens=128, do_sample=False)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Attribution
All architecture, tokenizer, multimodal/audio components, and original weights are from XiaomiMiMo/MiMo-V2.5. This repository only contains an offline-pruned derivative checkpoint.
- Downloads last month
- 7
Model tree for Akicou/MiMo-V2.5-NE128-72-OP
Base model
XiaomiMiMo/MiMo-V2.5