Skip to content

ggml: allow backend inputs to not create another split - #28387

Open
am17an wants to merge 1 commit into
masterfrom
backend-allow-input
Open

ggml: allow backend inputs to not create another split#28387
am17an wants to merge 1 commit into
masterfrom
backend-allow-input

Conversation

@am17an

@am17an am17an commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Overview

After #22789, it is not necessary that inputs to a split be bounded by a number as it can grow dynamically. This helps in graphs which require a lot of inputs + spec-dec (e.g. DSV4-Flash with recurrent rollback). Using this and #26610, using DSV4 + Dspark I'm able to maintain a single split across the Meta backend (which does not cache uid except the last one) enabling ~30-35 toks/s of sustained throughput.

Additional information

Requirements

@ggerganov

Copy link
Copy Markdown
Member

For my understanding, how does enabling spec-dec contribute to the increased number of inputs?

@am17an

am17an commented Sep 4, 2026

Copy link
Copy Markdown
Contributor Author

It adds the "roll-back" inputs

llama.cpp/src/llama-graph.h

Lines 600 to 605 in 7d04ce4

ggml_tensor * state_persist_src_idxs = nullptr; // I32 [n_state_persist]
ggml_tensor * state_persist_dst_idxs = nullptr; // I32 [n_state_persist]
ggml_tensor * state_restore_src_idxs = nullptr; // I32 [n_state_restore]
ggml_tensor * state_restore_dst_idxs = nullptr; // I32 [n_state_restore]
ggml_tensor * state_snapshot_src_idxs = nullptr; // I32 [n_state_snapshot]
ggml_tensor * state_snapshot_dst_idxs = nullptr; // I32 [n_state_snapshot]

@am17an am17an mentioned this pull request Sep 4, 2026
@github-actions github-actions Bot added the ggml changes relating to the ggml tensor library for machine learning label Sep 4, 2026
@am17an am17an added the merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge. label Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning merge ready A maintainer can use this label to indicate that they consider the changes final and ready to merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants