Skip to content

docs: Q2_0 CUDA merged upstream; dspark drafter still fork-only - #141

Merged
khosravipasha merged 4 commits into
PrismML-Eng:mainfrom
epoyraz:docs/cuda-q2_0-merged-upstream
Aug 5, 2026
Merged

docs: Q2_0 CUDA merged upstream; dspark drafter still fork-only#141
khosravipasha merged 4 commits into
PrismML-Eng:mainfrom
epoyraz:docs/cuda-q2_0-merged-upstream

Conversation

@epoyraz

@epoyraz epoyraz commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

The ternary migration table still lists CUDA as 🔄 In review upstream, but ggml-org/llama.cpp#25707 ("CUDA: add Q2_0 support") was merged into mainline llama.cpp on 2026-07-30 (merge commit 9b2a088).

1. Mark CUDA merged

  • Backend table — CUDA row: 🔄 In review upstream✅ Merged in mainline llama.cpp. Same PR link, unchanged.
  • Summary paragraph below the table — it said "CUDA is the last one in review upstream; until it merges, use this demo". Now names all four merged backends and points at x86 AVX-512-VNNI as the only outstanding item (x86 already runs via the generic scalar CPU path from #24448). The demo's role is preserved but restated on its real terms: it still ships the fork binaries and the group-128 *-Q2_0.gguf files, which mainline cannot load.
  • Two stale backend enumerations in the same section — the *-Q2_0_g64.gguf "Runs on" cell ("CPU and Metal so far") and the group-64 download intro ("CPU or Metal"). Both predate the Vulkan merge (#25430) and would have read as contradicting the corrected table; both now say CPU, Metal, Vulkan, CUDA.
  • Intro line (§ Bonsai 27B) — dropped "with CUDA in review".

2. Say that the dspark drafter is still fork-only

The first commit alone would have made things worse: "CPU, Metal, Vulkan, and CUDA now run Q2_0 on mainline, no fork needed" reads as if the fork is now optional everywhere. It is not — speculative decoding still requires it, and neither README nor SPECULATIVE.md said so anywhere.

This is not hypothetical. On the upstream thread, @MaxKruse tried the drafter against the merged CUDA backend and hit:

gguf_init_from_reader: tensor 'dspark.fc.weight' has offset 337718592, expected 357584192
llama_model_load: error loading model: failed to load model from Ternary-Bonsai-27B-dspark-Q4_1.gguf
srv  load_model: failed to load draft model

Per @khosravipasha's reply on that thread, the dspark implementation is experimental, not ready to be upstreamed, and waiting on llama.cpp's own dspark support to merge and stabilize. So the second commit adds:

  • A paragraph after the "no fork needed" line scoping it to plain Q2_0 inference and stating that speculative decoding is fork-only, with the error string included so it is greppable.
  • The same note at the top of SPECULATIVE.md, which previously never mentioned mainline at all.
  • A one-line caveat on the README's speculative-decoding bullet.

Scope

Docs only — 2 files, no scripts, binaries, or release tags touched. The pinned fork release prism-b9596-9fcaed7 and the group-128 files setup.sh downloads are unaffected.

Two things left deliberately alone, since you mentioned a major fork refactor is planned once #25707 lands:

  • The *-PQ2_0.gguf row still says "Not supported yet / fork support planned" — that is presumably what the refactor decides.
  • No claim is made about when dspark reaches mainline, only that it is blocked on upstream's own implementation.

Happy to trim this to the one-line table fix if you would rather keep the PR minimal.

🤖 Generated with Claude Code

epoyraz and others added 2 commits July 31, 2026 11:03
ggml-org/llama.cpp#25707 ("CUDA: add Q2_0 support") was merged upstream on
2026-07-30 (9b2a088), so the ternary migration table no longer needs the
"in review" row.

Also refreshes the surrounding prose that enumerated which backends run
Q2_0 on mainline, which the merge (and the earlier Vulkan merge, #25430)
had left stale: CPU, Metal, Vulkan, and CUDA now all run the group-64
files on stock llama.cpp. x86 AVX-512-VNNI remains the only outstanding
item, and the demo still ships the fork binaries for the group-128
*-Q2_0.gguf files until the format migration completes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The Q2_0 CUDA merge covers normal decoding only. The paired
*dspark-Q4_1*.gguf drafter does not load on mainline llama.cpp, which
rejects it with "tensor 'dspark.fc.weight' has offset ..., expected ...";
a user hit exactly this on ggml-org/llama.cpp#25707 while testing the
merged CUDA backend.

Per the upstream reply on that thread, the dspark implementation is
experimental, not ready to be upstreamed, and waiting on llama.cpp's own
dspark support to merge and stabilize. Without this the preceding
"no fork needed" line reads as if the fork is now optional everywhere.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@epoyraz epoyraz changed the title docs: mark Q2_0 CUDA backend as merged in mainline llama.cpp docs: Q2_0 CUDA merged upstream; dspark drafter still fork-only Jul 31, 2026
@khosravipasha
khosravipasha requested a balanced review from Copilot August 5, 2026 01:01
@khosravipasha

Copy link
Copy Markdown
Collaborator

Thanks for the changes, will review and merge some portion of it. For the migration have not decided what's the most clean way yet.

@khosravipasha
khosravipasha self-requested a review August 5, 2026 01:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates documentation for upstream CUDA Q2_0 support and the bundled dspark drafter’s fork dependency.

Changes:

  • Marks CUDA Q2_0 support as merged upstream.
  • Expands supported backend listings.
  • Documents that the bundled dspark GGUF remains fork-only.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
README.md Updates backend status and speculative-decoding caveats.
SPECULATIVE.md Adds the bundled drafter’s mainline compatibility warning.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread SPECULATIVE.md Outdated

⚠️ **Highly experimental.** Try it for fun and only if you know what you are doing; expect it to change and be polished in later releases. The path is currently stable and fast on CUDA; Apple Silicon (Metal) support will be improved in a later release, so do not expect a speedup on Macs yet.

**Fork-only.** The drafter runs on this demo's llama.cpp [binaries](https://github.com/PrismML-Eng/llama.cpp/releases/tag/prism-b9596-9fcaed7), not on mainline `ggml-org/llama.cpp` — mainline rejects the drafter GGUF with `gguf_init_from_reader: tensor 'dspark.fc.weight' has offset ..., expected ...`. The upstream `Q2_0` backend work covers normal decoding only; our dspark implementation is experimental and not ready to upstream, and it is waiting on llama.cpp's own dspark support to merge and stabilize.
Comment thread README.md Outdated
**CPU, Metal, Vulkan, and CUDA now run `Q2_0` on mainline llama.cpp, no fork needed** (use a recent `ggml-org/llama.cpp` build with the `*-Q2_0_g64.gguf` files). Only the x86 AVX-512-VNNI optimization is still outstanding, and x86 already works today through the generic scalar CPU path. This demo continues to ship the fork [pre-built binaries](https://github.com/PrismML-Eng/llama.cpp/releases/tag/prism-b9596-9fcaed7) and the group-128 `*-Q2_0.gguf` files, so it keeps working out of the box until the format migration finishes and the group-64 files take over the plain `Q2_0` name. MLX 2-bit is supported in stock [MLX](https://github.com/ml-explore/mlx), no fork needed.

To run the smaller ternary models directly on stock `ggml-org/llama.cpp` (CPU or Metal), use the group-64 files:
That covers plain `Q2_0` inference. **Speculative decoding is still fork-only**: the paired `*dspark-Q4_1*.gguf` drafter does not load on mainline, which fails with `gguf_init_from_reader: tensor 'dspark.fc.weight' has offset ..., expected ...`. Our dspark implementation is experimental and not ready to upstream; it is waiting on llama.cpp's own dspark support to merge and stabilize. Run `BONSAI_SPECULATIVE=1` on this demo's binaries — see [SPECULATIVE.md](SPECULATIVE.md).
…our drafter fork-only due to packing (#26337)

@khosravipasha khosravipasha left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made some changes on our side and will merge.

@khosravipasha
khosravipasha merged commit 8ccc586 into PrismML-Eng:main Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants