Instructions to use XiaomiMiMo/MiMo-7B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use XiaomiMiMo/MiMo-7B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="XiaomiMiMo/MiMo-7B-Base", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("XiaomiMiMo/MiMo-7B-Base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use XiaomiMiMo/MiMo-7B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "XiaomiMiMo/MiMo-7B-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "XiaomiMiMo/MiMo-7B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/XiaomiMiMo/MiMo-7B-Base
- SGLang
How to use XiaomiMiMo/MiMo-7B-Base 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 "XiaomiMiMo/MiMo-7B-Base" \ --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": "XiaomiMiMo/MiMo-7B-Base", "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 "XiaomiMiMo/MiMo-7B-Base" \ --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": "XiaomiMiMo/MiMo-7B-Base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use XiaomiMiMo/MiMo-7B-Base with Docker Model Runner:
docker model run hf.co/XiaomiMiMo/MiMo-7B-Base
Commit History
9 days ago
-
Update README.md
Verified signatured892dcc
-
Update README.md
Verified signaturec72df45
-
Update README.md
Verified signature95b45ad -
[Add] `tokenizer_class` in config to make it usable by the `pipeline` API (#8)
Verified signature- [Add] `tokenizer_class` in config to make it usable by the `pipeline` API (96b584d0919292252e93f13af17d9fef78a8b8f4) Co-authored-by: Aritra Roy Gosthipaty <ariG23498@users.noreply.huggingface.co>b344afe
-
Add library_name to the model (#2)
Verified signature- Add library_name to the model (12addaca31f69ad5345cc0afbdbcd65bc35a0db4) Co-authored-by: Vaibhav Srivastav <reach-vb@users.noreply.huggingface.co>791c993 -
Update README.md
Verified signaturedf8bd78
-
Update formulas in README.md
Verified signaturede1ddf6 -
init Xiaomi-MiMo
Verified signature3b8c4fd -
init Xiaomi-MiMo
Verified signature9a01f7f
-
init Xiaomi-MiMo
Verified signatureda3d5c4 -
initial commit
Verified signature2295e30