Instructions to use oneiron-dev/granite-4.2-8b-dflash2-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 oneiron-dev/granite-4.2-8b-dflash2-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 oneiron-dev/granite-4.2-8b-dflash2-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf oneiron-dev/granite-4.2-8b-dflash2-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 oneiron-dev/granite-4.2-8b-dflash2-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf oneiron-dev/granite-4.2-8b-dflash2-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 oneiron-dev/granite-4.2-8b-dflash2-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf oneiron-dev/granite-4.2-8b-dflash2-GGUF:Q4_K_M
Use Docker
docker model run hf.co/oneiron-dev/granite-4.2-8b-dflash2-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use oneiron-dev/granite-4.2-8b-dflash2-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "oneiron-dev/granite-4.2-8b-dflash2-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": "oneiron-dev/granite-4.2-8b-dflash2-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/oneiron-dev/granite-4.2-8b-dflash2-GGUF:Q4_K_M
- Ollama
How to use oneiron-dev/granite-4.2-8b-dflash2-GGUF with Ollama:
ollama run hf.co/oneiron-dev/granite-4.2-8b-dflash2-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use oneiron-dev/granite-4.2-8b-dflash2-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf oneiron-dev/granite-4.2-8b-dflash2-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": "oneiron-dev/granite-4.2-8b-dflash2-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use oneiron-dev/granite-4.2-8b-dflash2-GGUF with Docker Model Runner:
docker model run hf.co/oneiron-dev/granite-4.2-8b-dflash2-GGUF:Q4_K_M
- Lemonade
How to use oneiron-dev/granite-4.2-8b-dflash2-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull oneiron-dev/granite-4.2-8b-dflash2-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.granite-4.2-8b-dflash2-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use oneiron-dev/granite-4.2-8b-dflash2-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 oneiron-dev/granite-4.2-8b-dflash2-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 oneiron-dev/granite-4.2-8b-dflash2-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use oneiron-dev/granite-4.2-8b-dflash2-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf oneiron-dev/granite-4.2-8b-dflash2-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 "oneiron-dev/granite-4.2-8b-dflash2-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"
Granite 4.2 8B DFlash2 draft (GGUF)
A 0.44 GB speculative-decoding draft for IBM Granite 4.2 8B in llama.cpp. Load it next to IBM's official Q4_K_M GGUF and llama.cpp decodes at 1.66ร plain decode speed (mean of per-prompt speed ratios over 52 held-out prompts, 13 in each of four categories; paired 95% interval 1.50โ1.82ร; one RTX 4090, greedy, one request at a time): tool calls 2.47ร, reasoning 1.61ร, code 1.57ร. Weighted by output tokens in the same run, the gain is 1.32ร (190.618 vs 144.377 total output tokens per second; the short tool-call outputs are 4% of the tokens, chat 30%). Open chat runs 0.97ร (slightly slower). This Q4_K_M draft is 1.08ร faster than the BF16 draft in the same run (1.06โ1.09ร); both files are here.
Serving several users: with -kvu --cache-ram 0 --no-cache-idle-slots and --spec-draft-n-max 2, the draft gives
1.26ร the total throughput of the best plain server at 4 concurrent requests, 1.14ร at 8 and 1.20ร under a
2 โ 8 โ 2 burst (prompts not used in training, one RTX 4090). Above 8 concurrent requests, run without the draft. See
Serving several users. Sampling keeps the gain (1.81ร at temperature 0.7, 1.79ร at 1.0), and
tool calls on 104 schemas the draft never saw run 3.00ร faster. Details under
Release checks.
hf download ibm-granite/granite-4.2-8b-GGUF \
granite-4.2-8b-Q4_K_M.gguf --local-dir .
hf download oneiron-dev/granite-4.2-8b-dflash2-GGUF \
granite-dflash2-Q4_K_M.gguf --local-dir .
llama-server -m granite-4.2-8b-Q4_K_M.gguf \
-md granite-dflash2-Q4_K_M.gguf -ngl 99 -ngld 99 -c 2048 -np 1 \
-fa on --jinja --spec-type draft-dflash2 --spec-draft-n-max 7 \
--spec-draft-p-min 0 --port 18080
Needs llama.cpp b12377 or later (the release that added
--spec-type draft-dflash2, PR #32016). No patch.
Files
| File | Bytes | Use |
|---|---|---|
granite-dflash2-Q4_K_M.gguf |
440,130,016 | Recommended. The same draft quantized to Q4_K_M with llama-quantize (llama.cpp 4c4a0f0, no imatrix). |
granite-dflash2-bf16.gguf |
1,484,839,392 | The DFlash2 draft (BF16). Both drafts borrow the target's embedding and output tables at runtime and ship neither. |
| Target, not included | 5,347,917,952 | IBM's granite-4.2-8b-Q4_K_M.gguf from ibm-granite/granite-4.2-8b-GGUF, tested at revision 93f3f6a8. |
SHA-256 of the Q4_K_M draft: 121a02fe27edc139a28d805b01572741a2e4312cf2be0a5da5637e4a801e59e3
SHA-256 of the BF16 draft: a5b22560a8b4115050187c69b9afa3d5d7da79edac927fcdc787f2fbae13558d
SHA-256 of the target: 16a9369d0805f80b7377d25d87f937a90c05dc04ad79173a52001e42c9aab311
Draft shape: 4 layers, block size 8, target taps [1, 10, 19, 28, 37], selector rank 256 / top 16, mask token
100264 (<|unused_11|>), context 2,048. Warm-initialised from target layers 36โ39 (MLPs and norms) and trained on
the target's own greedy replies to 3,200 prompts. The released checkpoint was chosen on validation only.
Result on the sealed test: Q4_K_M draft (26 Nov 2026)
The same 52 held-out prompts and decode settings as the BF16 release test below, three arms in one run: plain decode,
the BF16 draft and the Q4_K_M draft (24-prompt blocks, rotating arm order, a fresh server per block). One rented
RTX 4090, power limit not recorded, with upstream llama.cpp 4c4a0f0 built on that machine (CUDA, sm_89,
Release). The bar, set before the run:
Q4_K_M/BF16 โฅ 1.03 with a paired lower 95% bound > 1.00, and Q4_K_M/plain lower bound โฅ 1.25. Passed.
| Comparison | Ratio | Paired 95% interval |
|---|---|---|
| Q4_K_M draft / plain decode (mean per-prompt decode-rate ratio) | 1.656 | 1.497โ1.824 |
| BF16 draft / plain decode (same run) | 1.539 | 1.388โ1.703 |
| Q4_K_M draft / BF16 draft (ratio of the two means above) | 1.076 | 1.055โ1.093 |
| Category (13 prompts each) | Plain tok/s | BF16 draft tok/s | Q4_K_M draft tok/s | Q4_K_M / plain |
|---|---|---|---|---|
| tools | 142.1 | 330.1 | 351.5 | 2.47ร |
| reasoning | 144.2 | 213.3 | 232.3 | 1.61ร |
| code | 144.7 | 210.5 | 226.9 | 1.57ร |
| chat | 144.6 | 129.7 | 140.2 | 0.97ร (slightly slower) |
Both drafts propose the same tokens about equally well (pooled acceptance length 2.04 for each); the Q4_K_M draft is faster because its forward pass is cheaper. Output check: 36 of 52 greedy completions differed from plain decode at some token for each draft; every first differing token was a near-tie in the target's own top-2 (largest margin 0.423 < 0.5). The quantization type was chosen before this run, on 48 separate development prompts (Q4_K_M 1.073ร the BF16 draft [1.055, 1.087], Q8_0 1.052ร). These 52 prompts were measured once before, for the BF16 release; they played no part in training or in choosing the quantization. Absolute speeds differ between machines (the BF16 draft measured 1.63ร on our own RTX 4090 on 25 Nov and 1.54ร on the rented one), so compare files within one run.
Result on the sealed test: BF16 draft (25 Nov 2026)
One RTX 4090 (our own machine, power limit 400 W); the same llama.cpp build, target file and decode settings in all
three arms; only the speculative method changes: plain decode (--spec-type none), llama.cpp n-gram lookup
(--spec-type ngram-mod), and this draft (--spec-type draft-dflash2 --spec-draft-n-max 7 --spec-draft-p-min 0).
Metric: mean of per-prompt decode-rate ratios with a paired percentile 95% interval (10,000 bootstrap replicates, seed
12345). The release bar, set before the run:
draft/plain lower 95% bound โฅ 1.25ร and draft/n-gram mean > 1.00. Passed.
| Comparison | Mean per-prompt decode-rate ratio | Paired 95% interval |
|---|---|---|
| DFlash2 draft / plain decode | 1.631 | 1.465โ1.812 |
| DFlash2 draft / n-gram lookup | 1.649 | 1.480โ1.832 |
| n-gram lookup / plain decode | 0.989 | 0.983โ0.997 |
| Arm | Mean decode tok/s | Mean prefill ms | Pooled acceptance length | Peak VRAM (MiB) |
|---|---|---|---|---|
| plain Q4_K_M | 158.3 | 29.6 | โ | 5,778 |
| n-gram lookup | 156.5 | 29.7 | 13.15 (1,243 tokens proposed in total) | 5,778 |
| DFlash2 draft | 257.6 | 30.5 | 2.04 | 7,584 |
By category (mean decode tok/s; 13 prompts each):
| Category | Plain | DFlash2 | n-gram | DFlash2 / plain |
|---|---|---|---|---|
| tools | 156.2 | 393.5 | 153.2 | 2.52ร |
| reasoning | 158.9 | 247.0 | 157.6 | 1.55ร |
| code | 159.2 | 242.1 | 159.8 | 1.52ร |
| chat | 158.7 | 147.9 | 155.6 | 0.93ร (slower) |
Output check: 36 of 52 greedy draft completions differed from plain decode at some token (9 of 52 for n-gram). Every first differing token was a near-tie in the target's own top-2 (largest margin 0.423; the run's validity gate was every margin < 0.5).
Development result (not the release claim): on a different sealed set of 48 prompts the same training recipe measured 1.77ร [1.54, 2.02] over plain decode and 1.75ร over n-gram, with chat at 0.90ร.
Release checks (26-27 Nov 2026)
Three checks of the Q4_K_M draft where people run it, set and frozen before the runs. Hardware for every number in
this section: one RTX 4090 in our own machine (power limit 300 W), upstream llama.cpp 4c4a0f0 (CUDA, sm_89, Release),
IBM's granite-4.2-8b-Q4_K_M.gguf and granite-dflash2-Q4_K_M.gguf. Compare numbers within this section; other
sections used other machines.
Concurrency with the one-request flags: the gain is gone at 4 requests in flight. One llama-server with -np N -c 2048ยทN (continuous
batching), N requests kept in flight over 100 prompts, greedy. Total output rate = all completion tokens / wall time
from the first request to the last reply (it includes prompt processing).
| Requests in flight | Plain, total tok/s | With the draft, total tok/s | Draft / plain |
|---|---|---|---|
| 1 | 139.6 | 195.3 | 1.40ร |
| 2 | 249.2 | 305.5 | 1.23ร |
| 4 | 420.8 | 387.0 | 0.92ร (slower) |
| 8 | 673.7 | 483.6 | 0.72ร (slower) |
Plain decoding uses the GPU's spare capacity by batching requests; the draft's extra work then costs more than it saves. The flags in Serving several users turn this into a gain at 4 to 8 requests.
Sampling: the gain holds. The 52 held-out prompts, one request at a time, top-p 0.95, a fixed seed per prompt. Mean of paired per-prompt decode-rate ratios with a 95% bootstrap interval.
| Temperature | Draft / plain | 95% interval | Draft tokens accepted |
|---|---|---|---|
| 0 (greedy) | 1.78ร | 1.60โ1.96 | 14.9% |
| 0.7 | 1.81ร | 1.60โ2.02 | 14.4% |
| 1.0 | 1.79ร | 1.61โ1.99 | 14.6% |
Tool calls on schemas the draft never saw: 3.00ร (95% interval 2.90โ3.11; acceptance length 4.24). 104 items from
the Berkeley Function Calling Leaderboard v3 (52 simple, 52 multiple, Apache-2.0), the first 52 of each split;
none offers a function name from the 1,581 names in the draft's 3,200 training prompts. Greedy, one request at a
time, thinking off.
Compared with
Plain decode and llama.cpp n-gram lookup on the same build. A Hugging Face search on 24 Nov 2026 found no public
drafter for Granite 4.2 8B: none of the 102 models listing ibm-granite/granite-4.2-8b as base and none of the top
100 granite-4.2-8b name matches is a speculative draft (dflash, eagle, medusa, hydra, draft, speculative, mtp,
dspark, lookahead); the target has no built-in multi-token-prediction head.
Evaluation set
52 prompts, 13 per category (chat, code, tools, reasoning), SHA-256
cf6aa58cc9c660e3b64f507217930ff64a8a83600a8f22d78cee1f729bc559a6, from UltraChat train_sft (chat), MBPP test
(code), Hermes function-calling func_calling_singleturn (tools) and GSM8K train (reasoning) at pinned revisions.
They were never training examples, never used to choose a checkpoint and never timed before the release run. The
training-data builder read them once to remove near-duplicate training prompts, which can only make the test harder.
Requests: greedy (temperature 0), seed 42, concurrency 1, context 2,048, at most 768 new tokens, cache_prompt
false. Decode rate is llama-server's predicted_per_second, which includes draft and verify time.
Usage, exactly as benchmarked
The benchmarked build is upstream llama.cpp
4c4a0f0 (CUDA, sm_89,
Release). From that build's source directory:
hf download ibm-granite/granite-4.2-8b-GGUF granite-4.2-8b-Q4_K_M.gguf \
--revision 93f3f6a8938ee922b784cf4e5b4203cd3428df8f --local-dir .
hf download oneiron-dev/granite-4.2-8b-dflash2-GGUF granite-dflash2-Q4_K_M.gguf --local-dir .
./build/bin/llama-server -m granite-4.2-8b-Q4_K_M.gguf \
-ngl 99 -c 2048 -np 1 -b 512 -ub 512 -fa on --jinja --metrics \
--host 127.0.0.1 --port 18080 -md granite-dflash2-Q4_K_M.gguf -ngld 99 \
--spec-type draft-dflash2 --spec-draft-n-max 7 --spec-draft-p-min 0
A greedy request to either server (llama-server applies the Granite chat template). The release test sent chat, code and tool prompts with thinking off, as here, and reasoning prompts with thinking on (the template thinks by default):
curl -fsS http://127.0.0.1:18080/v1/chat/completions -H 'Content-Type: application/json' -d '{
"messages": [{"role": "user", "content": "Write a Python function that returns the n-th Fibonacci number."}],
"chat_template_kwargs": {"enable_thinking": false},
"temperature": 0.0,
"seed": 42,
"max_tokens": 256,
"cache_prompt": false
}'
timings.draft_n and timings.draft_n_accepted in the reply show the draft at work. For the BF16 draft, use
granite-dflash2-bf16.gguf in both commands.
Serving several users
One llama-server for up to 8 concurrent requests. Seven flags change from the command above: -kvu (one unified KV
cache, so llama.cpp runs one draft forward for all slots instead of one per slot), --cache-ram 0 --no-cache-idle-slots
(on one of our two RTX 4090 hosts, 5 of 52 test servers with the RAM prompt cache on stalled for seconds inside
that host's hourly disk I/O windows; the cache-off runs on the other host saw no stall over one second. Cache on and
off have not yet been compared on the same host through the same disk I/O window), and --spec-draft-n-max 2 (two drafted
tokens per step). The sizing changes are -c 16384 and -np 8; -bs turns on backend sampling (each output row is
sampled on the GPU), as on every measured serving server:
./build/bin/llama-server -m granite-4.2-8b-Q4_K_M.gguf \
-ngl 99 -c 16384 -np 8 -kvu --cache-ram 0 --no-cache-idle-slots \
-b 512 -ub 512 -bs -fa on --jinja --metrics \
--host 127.0.0.1 --port 18080 -md granite-dflash2-Q4_K_M.gguf -ngld 99 \
--spec-type draft-dflash2 --spec-draft-n-max 2 --spec-draft-p-min 0
With -kvu the 16,384-token cache (-c) is shared by the 8 slots, 2,048 tokens each on average; raise -c for
longer requests. Measured on a pack of 400 prompts (chat, code, reasoning and tool calls) that played no part in
training; greedy, no prompt reuse. The steady rows each used one 200-prompt half of the pack, three times. The first
and second burst jobs drew 211 and 209 prompts on the plain default server, 247 and 246 on the plain server with the
flags, 297 and 290 on the width-2 draft, and 280 and 276 on the width-3 draft (closed loop, so a faster arm admits more
requests). Width 2 was chosen over width 3 on that same half, and earlier runs had used the pack (width 3, and a
first width comparison). Total output tokens per second over all requests, means of three runs (two for the burst). Hardware for this
table: one RTX 4090 at 450 W, upstream llama.cpp 4c4a0f0 (CUDA, sm_89), IBM's granite-4.2-8b-Q4_K_M.gguf and
granite-dflash2-Q4_K_M.gguf.
| Requests in flight | Plain, default flags | Plain, same three flags | With the draft | Draft / best plain |
|---|---|---|---|---|
| 4 | 437.6 | 478.9 | 601.7 | 1.26ร (one-sided 95% bound over three runs of the same 200 prompts on one machine: 1.23) |
| 8 | 734.4 | 851.6 | 972.9 | 1.14ร (one-sided 95% bound over three runs of the same 200 prompts on one machine: 1.13) |
| 2 โ 8 โ 2 burst, 4 minutes | 469.2 | 562.5 | 676.6 | 1.20ร |
"Best plain" is the faster of the two plain servers in each run; it was always the one with the same three flags, so
part of the gain over a default plain server (1.37ร at 4, 1.32ร at 8) comes from the flags alone. At 4 requests a
width of 3 is a little faster (1.30ร) but falls to 1.06ร at 8; width 2 holds at both. Above 8 the draft stops paying:
in our runs (width 3, a second RTX 4090 at 450 W) it matched plain at 12 requests (1.00ร) and was slower at 16
(0.90โ0.94ร). There, run the same server without -md, -ngld and the --spec-* flags. The command in
Usage is the one-request command of the sealed test; at two requests a width-3 draft
with -kvu ran 1.21ร that command in one test on our other RTX 4090 (means of two runs each). Width 2 was not measured at one or two
requests, and the 3-8 range was measured at 4, 8 and the 2 โ 8 โ 2 burst.
Limits
Measured on one GPU type (RTX 4090), one runtime (the llama.cpp build above), one target quantization (IBM's Q4_K_M), greedy decoding at concurrency 1, outputs of at most 768 tokens. Expect no gain on open chat: there the drafts ran at or below plain decode (Q4_K_M 0.97ร; BF16 0.90โ0.93ร) because rejected proposals cost about what verification saves. The gain comes from structured output (tool calls, code, reasoning). Greedy output is not bit-identical to plain decode: near-tie tokens can flip under batched verification. VRAM use is higher with the BF16 draft loaded (7,584 MiB vs 5,778 MiB; not measured for the Q4_K_M draft). With the one-request flags, 4 or more concurrent requests lower total throughput (release checks); with the several-users flags the draft gains at 4 to 8 requests and not above. Not tested and not claimed: other models, target quantizations or formats (EXL3, MLX), longer contexts, CPU-only serving, Apple GPUs.
Licence
Apache-2.0 (see LICENSE). The draft is a derivative work of IBM Granite 4.2 8B (Apache-2.0). Training prompts came
from MIT, CC-BY-4.0 and Apache-2.0 datasets; attributions, revisions and the changes from upstream are in NOTICE.
No training or evaluation data is included.
Changelog
- 27 Nov 2026: added "Serving several users": with
-kvu, the RAM prompt cache off and draft width 2, the draft gives 1.26ร at 4 and 1.14ร at 8 concurrent requests and 1.20ร under a burst over the best plain server (prompts not used in training, one RTX 4090 at 450 W); above 8 concurrent requests, run without it. Files unchanged. - 27 Nov 2026: release checks added (concurrency, sampling, unseen tool schemas; one RTX 4090). The draft helps up to 2 requests in flight and lowers throughput at 4 or more; sampling keeps 1.8ร; unseen tool schemas run 3.0ร.
- 26 Nov 2026: added
granite-dflash2-Q4_K_M.gguf(0.44 GB). On the sealed test it is 1.08ร the BF16 draft and 1.66ร plain decode; the card now leads with it. The BF16 file is unchanged. - 26 Nov 2026: first release,
granite-dflash2-bf16.gguf.
Built by the team behind Oneiron.
- Downloads last month
- 201
4-bit
16-bit
Model tree for oneiron-dev/granite-4.2-8b-dflash2-GGUF
Base model
ibm-granite/granite-4.1-8b-base

