Instructions to use OsaurusAI/Raptor-0.7-4B-GGUF 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 OsaurusAI/Raptor-0.7-4B-GGUF 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 OsaurusAI/Raptor-0.7-4B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf OsaurusAI/Raptor-0.7-4B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf OsaurusAI/Raptor-0.7-4B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf OsaurusAI/Raptor-0.7-4B-GGUF:Q4_K_M
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 OsaurusAI/Raptor-0.7-4B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf OsaurusAI/Raptor-0.7-4B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/OsaurusAI/Raptor-0.7-4B-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use OsaurusAI/Raptor-0.7-4B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "OsaurusAI/Raptor-0.7-4B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "OsaurusAI/Raptor-0.7-4B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/OsaurusAI/Raptor-0.7-4B-GGUF:Q4_K_M
- Ollama
How to use OsaurusAI/Raptor-0.7-4B-GGUF with Ollama:
ollama run hf.co/OsaurusAI/Raptor-0.7-4B-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use OsaurusAI/Raptor-0.7-4B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf OsaurusAI/Raptor-0.7-4B-GGUF:Q4_K_M
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": "OsaurusAI/Raptor-0.7-4B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use OsaurusAI/Raptor-0.7-4B-GGUF with Docker Model Runner:
docker model run hf.co/OsaurusAI/Raptor-0.7-4B-GGUF:Q4_K_M
- Lemonade
How to use OsaurusAI/Raptor-0.7-4B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull OsaurusAI/Raptor-0.7-4B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Raptor-0.7-4B-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use OsaurusAI/Raptor-0.7-4B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf OsaurusAI/Raptor-0.7-4B-GGUF:Q4_K_M
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 OsaurusAI/Raptor-0.7-4B-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use OsaurusAI/Raptor-0.7-4B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf OsaurusAI/Raptor-0.7-4B-GGUF:Q4_K_M
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 "OsaurusAI/Raptor-0.7-4B-GGUF:Q4_K_M" \ --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"
Raptor 0.7 — GGUF
GGUF builds of Raptor 0.7, the local agent model for Osaurus, calibrated with an importance matrix.
Raptor 0.7 is a LoRA fine-tune of Spark-X2.6-4B (SparkLLM team, Apache-2.0), merged into the weights. Model details and benchmark results are on the BF16 source card.
| file | size | decode | mean KLD vs BF16, chat | same top-1, chat | mean KLD vs BF16, plain text |
|---|---|---|---|---|---|
Raptor-0.7-4B-Q8_0.gguf |
4.38 GB | 159 tok/s | 0.0061 | 98.3% | 0.0019 |
Raptor-0.7-4B-Q6_K.gguf |
3.69 GB | 173 tok/s | 0.0188 | 96.5% | 0.0059 |
Raptor-0.7-4B-Q4_K_M.gguf |
2.77 GB | 201 tok/s | 0.1517 | 88.7% | 0.0591 |
raptor-0.7-4b.imatrix.gguf |
3.6 MB | the importance matrix, for re-quantizing yourself |
- Decode speed is measured with
llama-bench(512-token prompt, 128 generated tokens) on a Mac Studio (M5 Ultra). Prefill is about 6,500–6,600 tok/s for all three files. - Q6_K and Q4_K_M were quantized with the importance matrix. Q8_0 can't use one: llama.cpp's Q8_0 quantizer ignores it.
On a Mac, Osaurus serves MLX, not GGUF; use OsaurusAI/Raptor-0.7-4B-JANG_6M there. These files are for llama.cpp-family runtimes and for Osaurus for Windows.
Runtime
spark2_5 is supported in upstream llama.cpp since 2026-09-06
(#27868). Older builds, and apps that bundle an older
llama.cpp, will refuse these files.
These files were checked against the BF16 weights in two ways:
- Architecture parity: the BF16 GGUF in llama.cpp produced the same greedy tokens as the reference BF16 runtime on held-out prompts in high, low and off. The comparison ran 48 tokens per prompt.
- Behaviour: every shipped file was checked through
llama-server --jinja:- correct answers with reasoning in high and low
- an empty reasoning trace with thinking off
- a tool call parsed to OpenAI JSON
- the tool-result turn answered correctly
Reasoning modes
Run llama-server with --jinja so the embedded chat template drives the reasoning and tool parsing.
| mode | how to select | notes |
|---|---|---|
| high (default) | nothing, or "chat_template_kwargs": {"reasoning_effort": "high"} |
careful mode, longer reasoning |
| low | "chat_template_kwargs": {"reasoning_effort": "low"} |
short reasoning |
| off | "chat_template_kwargs": {"enable_thinking": false} |
no reasoning, reasoning_content empty |
The generation prompt ends with <|Bot|><think>, so the opening <think> is in the prompt, not in the output.
llama.cpp separates the trace into reasoning_content and leaves content clean.
Serving contract
- Sampling defaults are stored inside the GGUF:
temp 1.0,top_p 0.95,top_k 0(disabled), no repetition penalty. They match the sourcegeneration_config.json. - Token ids: bos 0, eos 1, unk 5, pad 2.
add_bos_tokenandadd_eos_tokenare both false, because the template emits the sentence markers itself. - Tool calls come out as standard OpenAI
tool_calls. The model emits the dialect<tool_call>NAME<arg_key>k</arg_key><arg_value>v</arg_value></tool_call>, and llama.cpp converts it. - Tools render into the first system block, so changing the tool set means a full re-prefill.
How these files were made
Calibration
The importance matrix holds per-input-channel activation energy, E[x²], for every quantized linear layer. It comes from one capture of 7.60M tokens run through the model's own chat template. Every domain is in both reasoning efforts (low and high), plus reasoning off:
- Osaurus agent trajectories.
- Osaurus workflow trajectories: orchestrator, architect, configurator, import reader and step runner.
- The model's own sampled reasoning and tool-call replies (1.44M tokens).
- Finance: annual-report tables and 10-K filings.
- Document editing, and long documents / PDF text.
- Terminal sessions, coding, math and science, multilingual chat, and encyclopedic text.
This is the same capture that calibrated the MLX JANG_6M build.
Quantization recipe
Most of the error comes from attention, so attention is kept at higher precision than the stock mixes. Measured on this model:
- Q6_K: MLP at Q6_K; attention (
attn_qkv,attn_output) and the tied embedding / output head at Q8_0. - Q4_K_M: stock Q4_K_M MLP mix; attention at Q6_K.
- Q8_0: stock.
- All three: the per-head attention gate (
attn_gate, 16 rows per layer) stays in BF16.
Measured against the BF16 source
KLD is the mean per-token KL divergence against the BF16 GGUF, in nats. Both evaluation sets are disjoint from the calibration capture:
Chat: held-out prompts plus the BF16 model's own replies, in chat format. It covers:
- Osaurus agent and workflow tasks
- coding, terminal, finance, documents and reasoning
- all three reasoning modes
65,536 scored tokens (64 chunks of 2,048). Every position is scored, including prompt text.
Plain text: held-out encyclopedic and web text. 29,696 scored tokens (116 chunks of 512).
| arm | size | chat KLD | plain-text KLD |
|---|---|---|---|
| Q8_0 (shipped) | 4.38 GB | 0.0061 | 0.0019 |
| Q6_K, attention + embedding Q8_0, imatrix (shipped) | 3.69 GB | 0.0188 | 0.0059 |
| Q6_K, same mix, no imatrix | 3.69 GB | 0.0229 | 0.0067 |
| Q6_K stock mix, imatrix | 3.38 GB | 0.0363 | 0.0136 |
| Q6_K stock mix, no imatrix | 3.38 GB | 0.0391 | 0.0145 |
| Q4_K_M, attention Q6_K, imatrix (shipped) | 2.77 GB | 0.1517 | 0.0591 |
| Q4_K_M, same mix, no imatrix | 2.77 GB | 0.1662 | 0.0672 |
| Q4_K_M stock mix, imatrix | 2.60 GB | 0.2504 | 0.1071 |
| Q4_K_M stock mix, no imatrix | 2.60 GB | 0.2468 | 0.1127 |
- Attention mix. Keeping attention at higher precision roughly halves the divergence at both widths. It costs 9% more size at Q6_K and 7% at Q4_K_M.
- Importance matrix. It lowers the divergence on both evaluation sets at both widths with the shipped mixes.
- Not applied:
- GPTQ: llama.cpp's quantizers choose their own scales and rounding, so GPTQ's error compensation does not carry over into these formats. The MLX JANG_6M build is the GPTQ build.
- AWQ: on Raptor 0.6 (same architecture), an AWQ fold made Q6_K and Q4_K_M worse than plain + imatrix, measured with controls. It was not repeated here.
Known limits
This is a 4B agent model and it still makes mistakes:
- wrong tool names
- schema and JSON slips
- claims of success it has not earned
- invented identifiers
- arithmetic and recall errors
Keep your harness's approval step for destructive actions. Q4_K_M diverges noticeably more from BF16 than Q6_K and Q8_0 do. Prefer Q6_K or Q8_0 when memory allows. Known gaps of the model itself are listed on the BF16 source card.
Provenance
Quantized by Jinho Jang (eric@osaurus.ai) from
OsaurusAI/Raptor-0.7-4B-BF16 (rev 2323fe1, checkpoint
R14-u8). Converted and quantized with upstream llama.cpp (0fb8f15).
License
Raptor 0.7 is a derivative of XHToken/Spark-X2.6-4B by the SparkLLM
Team, released under the Apache License, Version 2.0. The full license text is in the LICENSE
file, carried over unchanged from the base model.
This model is distributed under the same Apache License, Version 2.0. In accordance with Section 4 of that license, the changes made to the original work are:
- A supervised fine-tune of the attention and MLP projections: rank-16 LoRA on
q_k_v_proj,out_proj,gate_proj,up_projanddown_proj, merged into the weights. - Conversion to GGUF and quantization to Q8_0, Q6_K and Q4_K_M, with an importance matrix for the k-quants.
The tokenizer, chat template and generation defaults are unchanged from the base model.
Osaurus, Raptor and the Osaurus banner are trademarks of Osaurus and are not covered by the Apache license.
If you use this model, please also credit the base model:
@misc{sparkx2.6,
title = {Spark-X2.6-4B&1.7B: Advancing the Frontier of On-Device Agents for Real-World Tasks},
author = {SparkLLM Team},
year = {2026}
}
- Downloads last month
- 45,061
