Text Generation
Transformers
English
reward-model
code
sovereign-ai
worm-sealed
local-first
rtx-3080
lean4
ere-gates
snapkitty
machine-learning
python
cuda
Instructions to use Snapkitty/sovereign-mimo-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Snapkitty/sovereign-mimo-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Snapkitty/sovereign-mimo-4b")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Snapkitty/sovereign-mimo-4b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Snapkitty/sovereign-mimo-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Snapkitty/sovereign-mimo-4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Snapkitty/sovereign-mimo-4b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Snapkitty/sovereign-mimo-4b
- SGLang
How to use Snapkitty/sovereign-mimo-4b 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 "Snapkitty/sovereign-mimo-4b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Snapkitty/sovereign-mimo-4b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Snapkitty/sovereign-mimo-4b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Snapkitty/sovereign-mimo-4b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Snapkitty/sovereign-mimo-4b with Docker Model Runner:
docker model run hf.co/Snapkitty/sovereign-mimo-4b
Download Modelfile from Snapkitty/sovereign-mimo-4b: direct link, hf CLI and curl.
- Browser
- Download file 761 Bytes
-
https://huggingface.co/Snapkitty/sovereign-mimo-4b/resolve/main/Modelfile
- Command line
-
hf download hf://Snapkitty/sovereign-mimo-4b/Modelfile
-
curl -L -o Modelfile https://huggingface.co/Snapkitty/sovereign-mimo-4b/resolve/main/Modelfile
761 Bytes
| # Sovereign MiMo-4B — Ollama Modelfile | |
| # Deploy instruct model locally on BBQBADDIE (RTX 3080, 10GB VRAM) | |
| FROM ./sovereign-mimo-4b-q4km.gguf | |
| TEMPLATE """{{ .System }} | |
| {{ .Prompt }}""" | |
| SYSTEM """You are Sovereign MiMo-4B, a sovereign instruct model. | |
| You are a general-purpose AI assistant that follows instructions precisely. | |
| You write code, answer questions, reason through problems, and execute tasks. | |
| Rules: | |
| - Be concise and direct. | |
| - Write correct, production-quality code when asked. | |
| - No markdown headers in responses unless specifically requested. | |
| - No unnecessary preamble or postamble. | |
| - If you don't know something, say so.""" | |
| PARAMETER temperature 0.7 | |
| PARAMETER top_k 50 | |
| PARAMETER top_p 0.9 | |
| PARAMETER repeat_penalty 1.1 | |
| PARAMETER num_ctx 8192 | |