Safetensors
GGUF
English
qwen2
speculative-decoding
draft-model
llama.cpp
code-generation
conversational
Instructions to use vexp-ai/horizon-draft-0.5b 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 vexp-ai/horizon-draft-0.5b 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 vexp-ai/horizon-draft-0.5b:Q8_0 # Run inference directly in the terminal: llama cli -hf vexp-ai/horizon-draft-0.5b:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf vexp-ai/horizon-draft-0.5b:Q8_0 # Run inference directly in the terminal: llama cli -hf vexp-ai/horizon-draft-0.5b:Q8_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf vexp-ai/horizon-draft-0.5b:Q8_0 # Run inference directly in the terminal: ./llama-cli -hf vexp-ai/horizon-draft-0.5b:Q8_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf vexp-ai/horizon-draft-0.5b:Q8_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf vexp-ai/horizon-draft-0.5b:Q8_0
Use Docker
docker model run hf.co/vexp-ai/horizon-draft-0.5b:Q8_0
- LM Studio
- Jan
- Ollama
How to use vexp-ai/horizon-draft-0.5b with Ollama:
ollama run hf.co/vexp-ai/horizon-draft-0.5b:Q8_0
- Unsloth Desktop
- Docker Model Runner
How to use vexp-ai/horizon-draft-0.5b with Docker Model Runner:
docker model run hf.co/vexp-ai/horizon-draft-0.5b:Q8_0
- Lemonade
How to use vexp-ai/horizon-draft-0.5b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull vexp-ai/horizon-draft-0.5b:Q8_0
Run and chat with the model
lemonade run user.horizon-draft-0.5b-Q8_0
List all available models
lemonade list
- Atomic Chat
|
Download README.md from vexp-ai/horizon-draft-0.5b: direct link, hf CLI and curl.
- Browser
- Download file 2.83 kB
-
https://huggingface.co/vexp-ai/horizon-draft-0.5b/resolve/main/README.md
- Command line
-
hf download hf://vexp-ai/horizon-draft-0.5b/README.md
-
curl -L -o README.md https://huggingface.co/vexp-ai/horizon-draft-0.5b/resolve/main/README.md
2.83 kB
| license: apache-2.0 | |
| license_note: derived from Qwen2.5-0.5B (Apache-2.0); base license retained | |
| base_model: Qwen/Qwen2.5-0.5B | |
| tags: | |
| - speculative-decoding | |
| - draft-model | |
| - llama.cpp | |
| - code-generation | |
| language: | |
| - en | |
| # Horizon Draft 0.5B | |
| A tiny **standalone draft model** for speculative decoding with | |
| `DeepSeek-R1-Distill-Qwen-7B` as the target, built for consumer CPUs and | |
| `llama.cpp -md`. Part of the [Horizon](https://github.com/Vexp-ai/horizon) | |
| project: a verification-first layer for local LLMs, by the team behind | |
| [vexp](https://vexp.dev). | |
| ## What it is | |
| - **Base:** Qwen2.5-0.5B, full-finetuned for one epoch (~2.5 h on a single | |
| 24 GB GPU, ~$3 of compute) on 30k reasoning traces distilled from | |
| DeepSeek-R1 (13k math, 13k code, 4k science), formatted with the | |
| **target's chat template**. | |
| - **Vocabulary-aligned with the target:** trained with the target's | |
| tokenizer and the embedding padded to n_vocab 152064, so it passes | |
| llama.cpp's strict speculative vocabulary check and drops straight into | |
| `-md`. A stock Qwen2.5-0.5B does not pair (different special tokens, | |
| 151936 vocab), and through permissive paths it reaches only τ≈1. | |
| ## Measured results (mainstream DDR4 desktop, Ryzen 9 3900X, 12 threads) | |
| | Config | Code generation | Reasoning segment | RSS | | |
| |---|---|---|---| | |
| | 7B Q4_K_M autoregressive | 8.1 t/s | 8.1 t/s | 7.7 GB | | |
| | + this drafter (Q8_0, γ=8) | **10.7-15.1 t/s (mean 13.3, 1.65×)** | 7.1-9.4 (neutral) | 8.3 GB | | |
| | + same-family 1.5B draft | 7.1-10.9 (no gain) | 5.3 (hurts) | 9.4 GB | | |
| Acceptance on three coding tasks: **36-56%** on code, 20-30% on | |
| chain-of-thought text. Two practical lessons we ship with the numbers: | |
| on CPU the draft must be nearly free (a 1.5B draft with similar acceptance | |
| gains nothing), and speculation pays on code, not on reasoning: enable it | |
| per segment. | |
| ## Usage (llama.cpp) | |
| ```bash | |
| llama-speculative -m DeepSeek-R1-Distill-Qwen-7B-Q4_K_M.gguf \ | |
| -md horizon-draft-0.5b-q8_0.gguf \ | |
| --spec-draft-n-max 8 -t 12 -n 512 --temp 0 -p "..." | |
| ``` | |
| Caveat: some recent `llama-server` builds silently skip speculative | |
| decoding (unified KV cache default) while still loading the draft. Verify | |
| acceptance stats are non-zero; the `llama-speculative` binary is the | |
| reliable path today. | |
| ## Limitations | |
| - Target-specific by design: it predicts DeepSeek-R1-Distill-Qwen-7B's | |
| output distribution. Pair it with other targets at your own risk. | |
| - Trained for one epoch on 30k traces: acceptance has headroom (more | |
| epochs, more diverse code styles, DSpark-style parallel drafting are the | |
| declared next steps). | |
| - Not an instruct model: do not use it standalone for generation. | |
| ## Reproduce | |
| Training script (`train/train_draft.py`), corpus recipe and the full | |
| measurement logs are in the | |
| [Horizon repository](https://github.com/Vexp-ai/horizon). | |