Skip to content

feat(laguna): add Domino GRU draft head#443

Open
davide221 wants to merge 1 commit into
mainfrom
feat/laguna-domino-head
Open

feat(laguna): add Domino GRU draft head#443
davide221 wants to merge 1 commit into
mainfrom
feat/laguna-domino-head

Conversation

@davide221

@davide221 davide221 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • embed optional Domino GRU/head aux tensors into DFlash draft GGUFs via convert_dflash_to_gguf.py
  • load and validate dflash.domino.* tensors in the draft GGUF loader
  • add a Laguna target full-logits projection hook and greedy-chain Domino correction path
  • keep DDTree and sampled verify on the existing base projection path for now

Bench notes

Ran the 30-case he,gsm,math harness on lucebox-ts RTX 3090 with Laguna-XS.2 target, max_ctx 4096, default cache, no DDTree.

v13-final+Domino:

  • HumanEval: 10/10, 172.94 tok/s
  • GSM8K: 7/10, 155.27 tok/s
  • MATH: 8/10, 149.53 tok/s
  • server aggregate: 151.56 weighted tok/s, 60.3% accept, 3.03 avg commit

Compared with v12, v13-final+Domino is slower but improves GSM by one case. This PR is the runtime/model-loading support, not a claim that v13 is the best drafter.

Checks

  • python3 -m py_compile server/scripts/convert_dflash_to_gguf.py
  • git diff --check
  • cmake --build server/build -j -t dflash_server on lucebox-ts existing CUDA build

Note: a fresh clean-worktree CUDA rebuild on the 3090 was attempted, but the full llama.cpp CUDA dependency compile was killed with Error 137 under memory pressure before reaching the project-only compile.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot 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.

1 issue found across 11 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="server/src/draft/draft_gguf_loader.cpp">

<violation number="1" location="server/src/draft/draft_gguf_loader.cpp:119">
P2: Domino 1D shape validation is incomplete: it only checks `ne[0]` and does not enforce that higher dimensions are 1, so malformed non-vector tensors can pass loader validation.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

}

bool check_shape_1d(const ggml_tensor * t, int64_t ne0, const char * name, char * buf, size_t buf_sz) {
if (!t || t->ne[0] != ne0) {

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.

P2: Domino 1D shape validation is incomplete: it only checks ne[0] and does not enforce that higher dimensions are 1, so malformed non-vector tensors can pass loader validation.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At server/src/draft/draft_gguf_loader.cpp, line 119:

<comment>Domino 1D shape validation is incomplete: it only checks `ne[0]` and does not enforce that higher dimensions are 1, so malformed non-vector tensors can pass loader validation.</comment>

<file context>
@@ -115,6 +115,29 @@ int count_swa_layers(const DraftWeights & w) {
 }
 
+bool check_shape_1d(const ggml_tensor * t, int64_t ne0, const char * name, char * buf, size_t buf_sz) {
+    if (!t || t->ne[0] != ne0) {
+        std::snprintf(buf, buf_sz, "draft GGUF: Domino tensor %s shape mismatch: got [%lld], expected [%lld]",
+                      name, t ? (long long)t->ne[0] : -1LL, (long long)ne0);
</file context>
Suggested change
if (!t || t->ne[0] != ne0) {
if (!t || t->ne[0] != ne0 || t->ne[1] != 1 || t->ne[2] != 1 || t->ne[3] != 1) {

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.

1 participant