Instructions to use vexp-ai/horizon-draft-0.5b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use vexp-ai/horizon-draft-0.5b with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="vexp-ai/horizon-draft-0.5b", filename="horizon-draft-0.5b-q8_0.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- 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 Studio
How to use vexp-ai/horizon-draft-0.5b with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for vexp-ai/horizon-draft-0.5b to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for vexp-ai/horizon-draft-0.5b to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for vexp-ai/horizon-draft-0.5b to start chatting
- Atomic Chat new
- 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
llm.create_chat_completion(
messages = "No input example has been defined for this model task."
)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
project: a verification-first layer for local LLMs, by the team behind
vexp.
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)
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.
- Downloads last month
- 163
Model tree for vexp-ai/horizon-draft-0.5b
Base model
Qwen/Qwen2.5-0.5B
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="vexp-ai/horizon-draft-0.5b", filename="horizon-draft-0.5b-q8_0.gguf", )