Skip to content

feat: cherry-pick upstream DFlash spec-decode (#22105 + #25110 + companions)#201

Merged
TheTom merged 5 commits into
feature/turboquant-kv-cachefrom
cherry-dflash
Jul 9, 2026
Merged

feat: cherry-pick upstream DFlash spec-decode (#22105 + #25110 + companions)#201
TheTom merged 5 commits into
feature/turboquant-kv-cachefrom
cherry-dflash

Conversation

@TheTom

@TheTom TheTom commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Cherry-picks upstream DFlash speculative decoding onto the fork.

Commits (dependency order)

Conflict resolution (3 small files)

common/common.h need_n_rs_seq() upstream superset; common/speculative.cpp kept fork's has_mtp + added has_draft_dflash (dropped unused rename, -Werror); docs took upstream.

Validation

CUDA llama-cli compiles + links clean; test-llama-archs passes (DFlash arch registration). Turbo-heavy files auto-merged clean.

@github-actions github-actions Bot added documentation Improvements or additions to documentation testing model conversion labels Jul 1, 2026
TheTom and others added 3 commits July 2, 2026 11:49
…xtracted from upstream ggml-org#24707 minus the unrelated eagle3 fix)
* spec: add DFlash v2 support

* dflash: support sliding window attention per layer_types

* docs: add dflash section

---------

Co-authored-by: Kashif Rasul <kashif.rasul@gmail.com>
* dflash: refactor draft model conversion

* apply fix for eagle3 convert
liminfei-amd and others added 2 commits July 9, 2026 06:30
…gml-org#25215)

llm_graph_input_attn_kv::set_input and llm_graph_input_attn_kv_iswa::set_input
call set_input_k_rot / set_input_v_rot whenever the rotation tensor pointer is
non-null, but the tensor's buffer can be unallocated (NULL) when a graph only
stores K/V without attending -- e.g. DFlash speculative decoding's KV-injection
pass. set_input_k_rot then calls ggml_backend_buffer_is_host() on a NULL buffer
and aborts with GGML_ASSERT(buffer).

Guard the four k_rot/v_rot inputs with the same "&& ->buffer" check that the
adjacent kq_mask inputs already use in these two functions. When the buffer is
unallocated there is no data to upload, so skipping is correct.

Fixes ggml-org#25191

Signed-off-by: liminfei-amd <91481003+liminfei-amd@users.noreply.github.com>
(cherry picked from commit a410713)
* spec: support spec-draft-p-min in DFlash

* dflash: add n_min guard

* dflash: guard both n_min and n_max

(cherry picked from commit 152d337)
@TheTom TheTom changed the title eval: cherry-pick upstream DFlash spec-decode (#22105 + #25110, dep #24707) — CI check feat: cherry-pick upstream DFlash spec-decode (#22105 + #25110 + companions) Jul 9, 2026
@TheTom TheTom marked this pull request as ready for review July 9, 2026 13:39
@TheTom TheTom merged commit 206e18e into feature/turboquant-kv-cache Jul 9, 2026
9 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conversion documentation Improvements or additions to documentation model testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants