Text Generation
Transformers
Safetensors
English
Chinese
mimo_v2
agent
long-context
code
mxfp4
fp4-quantization
dflash
speculative-decoding
block-diffusion
conversational
custom_code
8-bit precision
fp8
Instructions to use dshive/MiMo-V2.5-Pro-FP4-DFlash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dshive/MiMo-V2.5-Pro-FP4-DFlash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dshive/MiMo-V2.5-Pro-FP4-DFlash", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("dshive/MiMo-V2.5-Pro-FP4-DFlash", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use dshive/MiMo-V2.5-Pro-FP4-DFlash with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dshive/MiMo-V2.5-Pro-FP4-DFlash" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dshive/MiMo-V2.5-Pro-FP4-DFlash", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/dshive/MiMo-V2.5-Pro-FP4-DFlash
- SGLang
How to use dshive/MiMo-V2.5-Pro-FP4-DFlash 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 "dshive/MiMo-V2.5-Pro-FP4-DFlash" \ --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": "dshive/MiMo-V2.5-Pro-FP4-DFlash", "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 "dshive/MiMo-V2.5-Pro-FP4-DFlash" \ --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": "dshive/MiMo-V2.5-Pro-FP4-DFlash", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use dshive/MiMo-V2.5-Pro-FP4-DFlash with Docker Model Runner:
docker model run hf.co/dshive/MiMo-V2.5-Pro-FP4-DFlash
| { | |
| "architectures": [ | |
| "DFlashDraftModel" | |
| ], | |
| "model_type": "qwen3", | |
| "auto_map": { | |
| "AutoModel": "dflash.DFlashDraftModel" | |
| }, | |
| "hidden_size": 6144, | |
| "intermediate_size": 16384, | |
| "num_hidden_layers": 5, | |
| "num_attention_heads": 128, | |
| "num_key_value_heads": 8, | |
| "head_dim": 128, | |
| "v_head_dim": 128, | |
| "partial_rotary_factor": 0.5, | |
| "block_size": 8, | |
| "dflash_config": { | |
| "target_layer_ids": [ | |
| 0, | |
| 15, | |
| 31, | |
| 47, | |
| 69 | |
| ], | |
| "mask_token_id": 151669, | |
| "num_anchors": 4096, | |
| "block_size": 8, | |
| "loss_decay_gamma": 7.0, | |
| "use_swa": true, | |
| "swa_window_size": 1024, | |
| "backbone_rotary_base": 5000000, | |
| "attention_value_scale": 0.612, | |
| "attention_sink_bias": true | |
| }, | |
| "num_target_layers": 70, | |
| "vocab_size": 152064, | |
| "max_position_embeddings": 262144, | |
| "rope_theta": 10000, | |
| "sliding_window": 1024, | |
| "rms_norm_eps": 1e-05, | |
| "torch_dtype": "bfloat16", | |
| "hidden_act": "silu", | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 151643, | |
| "eos_token_id": 151645, | |
| "tie_word_embeddings": false, | |
| "use_cache": true | |
| } |