Downloads · 30 days
22
9% of all-time downloads
jburtoft/MiMo-V2-Flash-Neuron-BF16
MiMo-V2-Flash-Neuron-BF16 is a machine learning model from jburtoft. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for neuronx-distributed-inference. The card lists the license as apache-2.0.
Pre-compiled BF16 checkpoint for XiaomiMiMo/MiMo-V2-Flash on AWS Trainium2 (trn2.48xlarge).
Downloads · 30 days
22
9% of all-time downloads
All-time downloads
250
Public
Repo size
638 GB
Likes
0
Public
Click a slice to open those files.
.safetensors637 GB · 100%
From the Hugging Face model README
Pre-compiled BF16 checkpoint for XiaomiMiMo/MiMo-V2-Flash on AWS Trainium2 (trn2.48xlarge).
huggingface-cli download jburtoft/MiMo-V2-Flash-Neuron-BF16 \
--local-dir /opt/dlami/nvme/MiMo-V2-Flash-Neuron-BF16
git clone https://github.com/jimburtoft/neuronx-distributed-inference.git nxdi \
-b contrib/MiMo-V2-Flash-nki-moe
pip install -e nxdi
cd nxdi/contrib/models/MiMo-V2-Flash/src
python3 register_vllm.py \
--model /opt/dlami/nvme/MiMo-V2-Flash-Neuron-BF16 \
--served-model-name MiMo-V2-Flash-BF16 \
--tensor-parallel-size 64 \
--max-model-len 4096 \
--max-num-seqs 32 \
--swap-space 0 \
--no-enable-chunked-prefill \
--no-enable-prefix-caching \
--port 8000 \
--trust-remote-code \
--additional-config '{"override_neuron_config": {"tp_degree": 64, "logical_nc_config": 2, "fused_qkv": false, "sequence_parallel_enabled": false, "glu_mlp": true, "normalize_top_k_affinities": true, "save_sharded_checkpoint": true, "quantized": false, "router_config": {"act_fn": "sigmoid", "dtype": "float32"}, "moe_tp_degree": 1, "moe_ep_degree": 64, "batch_size": 32, "ctx_batch_size": 1, "tkg_batch_size": 32, "max_context_length": 4096, "seq_len": 4096, "is_continuous_batching": true, "enable_bucketing": true, "context_encoding_buckets": [128, 256, 512, 1024, 2048, 4096], "token_generation_buckets": [4096], "async_mode": true, "on_device_sampling_config": {"do_sample": false}}}'
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "MiMo-V2-Flash-BF16", "messages": [{"role": "user", "content": "Write hello world in Python"}], "max_tokens": 200, "temperature": 0}'
This checkpoint includes the fix for MiMo-V2-Flash noaux_tc routing bias. Without this fix, the e_score_correction_bias was silently dropped during weight loading, causing tokens to route to wrong MoE experts and producing degraded output.
The fix:
See PR #10 for details.
neuron-compiled-artifacts/
model.pt # Traced model (218 MB)
neuron_config.json # Neuron configuration
weights/
tp{0..63}_sharded_checkpoint.safetensors # 64 shards, ~594 GB total
src/
modeling_mimo_v2.py # NxDI model implementation
register_vllm.py # vLLM 0.16 registration script