Instructions to use satgeze/Qwen3.6-27B-DSpark with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use satgeze/Qwen3.6-27B-DSpark with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="satgeze/Qwen3.6-27B-DSpark", filename="Qwen3.6-27B-DSpark.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 satgeze/Qwen3.6-27B-DSpark 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 satgeze/Qwen3.6-27B-DSpark # Run inference directly in the terminal: llama cli -hf satgeze/Qwen3.6-27B-DSpark
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf satgeze/Qwen3.6-27B-DSpark # Run inference directly in the terminal: llama cli -hf satgeze/Qwen3.6-27B-DSpark
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 satgeze/Qwen3.6-27B-DSpark # Run inference directly in the terminal: ./llama-cli -hf satgeze/Qwen3.6-27B-DSpark
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 satgeze/Qwen3.6-27B-DSpark # Run inference directly in the terminal: ./build/bin/llama-cli -hf satgeze/Qwen3.6-27B-DSpark
Use Docker
docker model run hf.co/satgeze/Qwen3.6-27B-DSpark
- LM Studio
- Jan
- Ollama
How to use satgeze/Qwen3.6-27B-DSpark with Ollama:
ollama run hf.co/satgeze/Qwen3.6-27B-DSpark
- Unsloth Studio
How to use satgeze/Qwen3.6-27B-DSpark 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 satgeze/Qwen3.6-27B-DSpark 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 satgeze/Qwen3.6-27B-DSpark to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for satgeze/Qwen3.6-27B-DSpark to start chatting
- Pi
How to use satgeze/Qwen3.6-27B-DSpark with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf satgeze/Qwen3.6-27B-DSpark
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "satgeze/Qwen3.6-27B-DSpark" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use satgeze/Qwen3.6-27B-DSpark with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf satgeze/Qwen3.6-27B-DSpark
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:8080/v1 hermes config set model.default satgeze/Qwen3.6-27B-DSpark
Run Hermes
hermes
- Atomic Chat new
- OpenClaw new
How to use satgeze/Qwen3.6-27B-DSpark with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf satgeze/Qwen3.6-27B-DSpark
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:8080/v1 \ --custom-model-id "satgeze/Qwen3.6-27B-DSpark" \ --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"
- Docker Model Runner
How to use satgeze/Qwen3.6-27B-DSpark with Docker Model Runner:
docker model run hf.co/satgeze/Qwen3.6-27B-DSpark
- Lemonade
How to use satgeze/Qwen3.6-27B-DSpark with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull satgeze/Qwen3.6-27B-DSpark
Run and chat with the model
lemonade run user.Qwen3.6-27B-DSpark-{{QUANT_TAG}}List all available models
lemonade list
Card: measured CUDA + SPEED-Bench + Apple Silicon results, recipe, findings, credits
Browse files
README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: Qwen/Qwen3.6-27B
|
| 4 |
+
tags:
|
| 5 |
+
- speculative-decoding
|
| 6 |
+
- dspark
|
| 7 |
+
- dflash
|
| 8 |
+
- draft-model
|
| 9 |
+
- llama.cpp
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Qwen3.6-27B DSpark drafter (block-15, warm-started)
|
| 13 |
+
|
| 14 |
+
A DSpark speculative-decoding drafter head for **Qwen3.6-27B**, trained with
|
| 15 |
+
[DeepSpec](https://github.com/deepseek-ai/DeepSpec) in online mode against the target's own
|
| 16 |
+
regenerated responses, warm-started from the z-lab DFlash head for this target. Served with
|
| 17 |
+
llama.cpp (`--spec-type draft-dspark`) it delivers **1.6-2.7× decode speedup** on an RTX Pro 6000
|
| 18 |
+
Blackwell at Q8_0, with **zero quality change** (speculative decoding is lossless: every accepted
|
| 19 |
+
token is verified by the target).
|
| 20 |
+
|
| 21 |
+
## Measured results (llama.cpp, RTX Pro 6000 Blackwell, target Qwen3.6-27B-Q8_0, greedy, 200-token completions)
|
| 22 |
+
|
| 23 |
+
| metric | value |
|
| 24 |
+
|---|---|
|
| 25 |
+
| draft acceptance (code prompt) | 0.292 |
|
| 26 |
+
| draft acceptance (counting) | 0.305 |
|
| 27 |
+
| mean accepted length | 5.35-5.53 (block size 15) |
|
| 28 |
+
| target baseline decode | 51.0 t/s |
|
| 29 |
+
| with DSpark | 129.5-136.1 t/s (**2.54-2.67×**) |
|
| 30 |
+
|
| 31 |
+
### SPEED-Bench (qualitative set, coding+writing, temperature 0, concurrency 1)
|
| 32 |
+
|
| 33 |
+
| output len | coding | writing | baseline | speedup |
|
| 34 |
+
|---|---|---|---|---|
|
| 35 |
+
| 256 | 99.7 t/s | 97.8 t/s | 50.9 / 50.8 t/s | **1.96× / 1.93×** |
|
| 36 |
+
| 1024 | 112.1 t/s | 81.0 t/s | 50.7 / 50.6 t/s | **2.21× / 1.60×** |
|
| 37 |
+
|
| 38 |
+
Aggregate draft acceptance across the diverse SPEED-Bench prompts: 0.19-0.20: the honest
|
| 39 |
+
"varied real prompts" number, vs 0.29-0.31 on narrow greedy probes. Both are reported; when you
|
| 40 |
+
compare drafter heads, make sure you compare the same kind of probe.
|
| 41 |
+
|
| 42 |
+
### Apple Silicon (M3 Max 128GB, Metal, same GGUFs, same probes)
|
| 43 |
+
|
| 44 |
+
| metric | value |
|
| 45 |
+
|---|---|
|
| 46 |
+
| draft acceptance (code prompt) | 0.2922 (161/551: identical accepted count to CUDA) |
|
| 47 |
+
| draft acceptance (counting) | 0.2945 |
|
| 48 |
+
| target baseline decode | 12.3-12.4 t/s |
|
| 49 |
+
| with DSpark | 17.1-17.3 t/s (**1.39×**) |
|
| 50 |
+
|
| 51 |
+
Acceptance is backend-independent (matches CUDA to the third decimal on byte-identical GGUFs).
|
| 52 |
+
The economics flip with target scale: this same pipeline's 0.8B head is a net *slowdown* on
|
| 53 |
+
Metal (draft overhead dominates a fast tiny target), while at 27B the head pays for itself:
|
| 54 |
+
1.39× on a MacBook is the difference between 12 and 17 tokens per second where it is actually
|
| 55 |
+
felt.
|
| 56 |
+
|
| 57 |
+
## Recipe (reproducible)
|
| 58 |
+
|
| 59 |
+
- Data: 12,000 prompts (mlabonne/open-perfectblend), responses regenerated by the target itself
|
| 60 |
+
(llama-server, Q8_0 GGUF, 16 parallel slots, thinking disabled, max 2048 tokens), 11.4K valid.
|
| 61 |
+
- Training: DeepSpec online mode (no precomputed cache; target forward runs per epoch on-GPU),
|
| 62 |
+
`Qwen3DSparkTrainer`, block_size 15, 5 draft layers, target extract layers [1, 16, 31, 46, 61],
|
| 63 |
+
markov_rank 256, num_anchors 128, lr 6e-4, global batch 128 (micro-batch 1), 3 epochs
|
| 64 |
+
(269 steps), bf16, single 96GB GPU, ~5.5h. Loss 2.04 → 1.04.
|
| 65 |
+
- Warm-start: drafter initialized from z-lab's DFlash head for this target (shape-tolerant
|
| 66 |
+
load), the same trick fal used: it is worth several points of acceptance at this data scale
|
| 67 |
+
vs cold start.
|
| 68 |
+
- Conversion: llama.cpp branch [satindergrewal/llama.cpp:dspark-qwen35](https://github.com/satindergrewal/llama.cpp/tree/dspark-qwen35)
|
| 69 |
+
(qwen3.5/3.6-family DSpark support on top of PR #25173):
|
| 70 |
+
`convert_hf_to_gguf.py <ckpt> --target-model-dir <hf-target> --outfile head.gguf --outtype bf16`
|
| 71 |
+
- Serve: `llama-server -m Qwen3.6-27B-Q8_0.gguf -md head.gguf --spec-type draft-dspark --spec-draft-n-max 15 -fa on --jinja`
|
| 72 |
+
|
| 73 |
+
## Findings worth more than the head
|
| 74 |
+
|
| 75 |
+
1. **Warm-starting from a published DFlash/EAGLE head is the single highest-leverage trick at
|
| 76 |
+
small data scale.** This 12K-sample head reaches mean accepted length 5.4; our identically-sized
|
| 77 |
+
cold-start 0.8B head managed 1.8-2.05. The community scaling curve says ~250K+ samples from
|
| 78 |
+
scratch to match this.
|
| 79 |
+
2. **Bigger targets make speculation pay.** At 27B the verify pass amortizes (mainline batch
|
| 80 |
+
scaling is essentially linear), so acceptance 0.19-0.31 already buys 1.6-2.7×. The same head
|
| 81 |
+
quality on a 0.8B target is a net slowdown: speculation value scales with target cost.
|
| 82 |
+
3. **Trainer fix shipped along the way:** DeepSpec's checkpoint saver asserted micro-step
|
| 83 |
+
alignment at end-of-data, which crashes any run whose dataset×epochs isn't divisible by the
|
| 84 |
+
global batch (and online mode's valid-sample counts vary per epoch, so this is unavoidable).
|
| 85 |
+
Patched to align the final save down to the last completed optimizer step:
|
| 86 |
+
[satindergrewal/DeepSpec](https://github.com/satindergrewal/DeepSpec) `qwen35-lane`.
|
| 87 |
+
|
| 88 |
+
## Files
|
| 89 |
+
|
| 90 |
+
`model.safetensors` (drafter, bf16), `Qwen3.6-27B-DSpark.gguf` (block-15 head, ready for
|
| 91 |
+
llama.cpp `-md`), training config, this card.
|
| 92 |
+
|
| 93 |
+
## Credits
|
| 94 |
+
|
| 95 |
+
DeepSeek (DeepSpec toolkit and the DSpark method), z-lab (DFlash warm-start weights), wjinxu
|
| 96 |
+
(llama.cpp DSpark PR #25173), ruixiang63 (DFlash/EAGLE3 foundation in llama.cpp), Ofir408
|
| 97 |
+
(DeepSpec online-training mode PR #23), hikarioyama (warm-start recipe), Qwen team (target model),
|
| 98 |
+
mlabonne (open-perfectblend prompts).
|