Instructions to use Minerva-Laboratories/Mercurius-0.5-4B-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Minerva-Laboratories/Mercurius-0.5-4B-Preview with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Minerva-Laboratories/Mercurius-0.5-4B-Preview # Run inference directly in the terminal: llama cli -hf Minerva-Laboratories/Mercurius-0.5-4B-Preview
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Minerva-Laboratories/Mercurius-0.5-4B-Preview # Run inference directly in the terminal: llama cli -hf Minerva-Laboratories/Mercurius-0.5-4B-Preview
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Minerva-Laboratories/Mercurius-0.5-4B-Preview # Run inference directly in the terminal: ./build/bin/llama cli -hf Minerva-Laboratories/Mercurius-0.5-4B-Preview
Use Docker
docker model run hf.co/Minerva-Laboratories/Mercurius-0.5-4B-Preview
- Llama new
- LM Studio
- Jan
- Ollama
How to use Minerva-Laboratories/Mercurius-0.5-4B-Preview with Ollama:
ollama run hf.co/Minerva-Laboratories/Mercurius-0.5-4B-Preview
- Unsloth Desktop
- Pi
How to use Minerva-Laboratories/Mercurius-0.5-4B-Preview with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Minerva-Laboratories/Mercurius-0.5-4B-Preview
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Minerva-Laboratories/Mercurius-0.5-4B-Preview" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Minerva-Laboratories/Mercurius-0.5-4B-Preview with Docker Model Runner:
docker model run hf.co/Minerva-Laboratories/Mercurius-0.5-4B-Preview
- Lemonade
How to use Minerva-Laboratories/Mercurius-0.5-4B-Preview with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Minerva-Laboratories/Mercurius-0.5-4B-Preview
Run and chat with the model
lemonade run user.Mercurius-0.5-4B-Preview-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use Minerva-Laboratories/Mercurius-0.5-4B-Preview with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Minerva-Laboratories/Mercurius-0.5-4B-Preview
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:9931/v1 hermes config set model.default Minerva-Laboratories/Mercurius-0.5-4B-Preview
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Minerva-Laboratories/Mercurius-0.5-4B-Preview with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Minerva-Laboratories/Mercurius-0.5-4B-Preview
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:9931/v1 \ --custom-model-id "Minerva-Laboratories/Mercurius-0.5-4B-Preview" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Mercurius 0.5 4B Preview
Intermediate checkpoint of a Mercurius-Pipeline run. Training is paused at step 5825 of 6300, with quantization-aware training (QAT) active since step 4200.
- Student: Qwen3.5-4B converted to a hybrid architecture: 24 GDN-2 layers plus 8 MLA layers, with VeRA adapters.
- Teacher: Qwen3.6-35B-A3B, served by llama.cpp.
- KV cache: FoveaKV 2+2, 10% dynamic tokens (Dyn10).
- Corpus: 70.8M text tokens, 39.1M agentic-episode tokens and 10.4M math tokens.
- Code:
Minerva-Laboratories/Mercurius-Pipeline, branchfeat/native-foveakv-evaluation.
Files
| File | Description |
|---|---|
mercurius-0.5-4b-preview-foveakv-dyn10.gguf |
Deployable GGUF with packed Q4/Q8 weights and FoveaKV Dyn10 metadata. Requires the patched llama.cpp fork built by scripts/build_native_bench.sh. Stock llama.cpp will not load it correctly. |
model.safetensors |
Packed Q4/Q8 weights for the PyTorch pipeline (mercurius-packed-v1). Load it with config.json, the tokenizer files and export-manifest.json, which records the checksums. This is not a standard Transformers checkpoint. |
resume.pt |
Training resume state for the pipeline. It is not standalone: it needs the converted base model produced by the pipeline. |
Benchmarks
These results were measured with llama.cpp/CUDA and FoveaKV Dyn10, using the
qwen35_nonthinking_v1 decoding profile (temperature 0.7, top-p 0.8,
top-k 20, presence penalty 1.5), with a 32,768-token generation limit.
| Benchmark | Mercurius 5825 | Qwen3.5-4B, same protocol |
|---|---|---|
| HumanEval (164) | 68.90% | 84.15% |
| MBPP sanitized (257) | 71.21% | 79.38% |
| GSM8K (1,319) | 91.96% | 94.16% |
| RULER, 5 tasks at 32K (200) | 83.38% | partial |
| PG-19 perplexity at 65,536 (12 books) | 13.09 | partial |
GSM8K is in-domain, because its training split is part of the corpus. On some code prompts the checkpoint can produce long repetitive outputs.
This is an intermediate checkpoint, not a final release.
- Downloads last month
- 33