Repository navigation
Conversation
…gets room in a full guarded store (#3617) Under TF_QWEN27_MESSAGE_STARTS=1 the rewind state sits at the last user message's start: the state a next question with the same system prompt and tools resumes from. The guarded reservation made room for the endpoint alone, so once other conversations filled the store the rewind state was always trimmed and every new question re-read the whole prompt. Now, for a prompt whose rewind prefix came up in the last 16 lookups, the reservation also evicts for the rewind state right after the endpoint, never taking another conversation's rewind state, and fitting admits it next. A first-time prompt keeps main's plan, so one-off conversations add no pressure, and clients asking in turn cannot evict each other's rewind states. Unset or 0 leaves every plan as on main.
…y moved from hy4_flash to common/mla.cuh The mla image gains tf_mla_expand_v_256 (tf_mla::expand_v at 256-wide v heads, which hy4_flash already instantiates as tf_hy4_expand_v) and tf_mla_merge_sink, which merges the chunk tiles' partials with each head's fp32 sink counted once as a zero-value key. The merge's body is hy4_flash's tf_hy4_attend_merge, moved to common/mla.cuh as tf_mla::merge_sink, which takes each thread's column from its entry: with the column read inside the moved body, nvcc 13.0 gave tf_hy4_attend_merge other SASS at sm_120 and sm_121. hy4_flash keeps its image, entry name and --fmad=false and calls it there, so its outputs are unchanged. Mla.expandV takes 128- or 256-wide heads, Mla.mergeSink launches the merge, and geometry() takes the widths the kernels take (q_nope 128 or 192, v 128 or 256). Both entries are under the kernel contract against float64, with a planted control each, and tf-cuda-test mla-sink checks that the mla merge gives tf_hy4_attend_merge's bytes at hy4_flash's shapes, and that tf_hy4_attend_merge gives another build's bytes when given its hy4_mla_attention fatbin. GLM's path uses neither entry.
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.
CI for a landing train: #5136 #5084 stacked on main in that order. Nothing merges from this PR: each PR above lands on its own once this tip is green, and this PR is then closed.