Repository navigation
Conversation
TF_GLM_KV_SHARE resumes a prompt on the KV pool's pages, but the stream's cached count stayed 0 when the pages were adopted without a state restore, so the reply's cached_tokens and prompt_tokens_cached_total missed the reuse. The prefix plan's from is now written to the stream where the plan is made, before the seat can overwrite it; the lane host's prefilled credits the same number. A host test resumes a second pass on the pages and asserts the cached rows, which is 0 before this change. Nothing about what is reused or how changes.
ashhart
marked this pull request as draft
November 5, 2026 04:19
Owner
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GLM-5.3-Flash on CUDA with
TF_GLM_KV_SHAREnow counts the rows a paged prompt resume reuses, socached_tokensandprompt_tokens_cached_totalshow it (#1899). On main a resume through pool pages reported 0 cached, so a client couldn't see its prompt was cached.The prefix plan's start goes to the stream where the plan is made, and opening clears the count before that plan so the seat no longer overwrites it. Counts only: nothing about what's reused or how changes. The host test fails with the line removed. Host tests only; no GPU run. With #2203's clamp, this finishes what #1899 asked for on the guard and counter, and the doubling itself didn't reproduce on main.