Skip to content

flashnext cuda: opt-in cache-only MTP work during prefill - #4529

Merged
ashhart merged 6 commits into
mainfrom
lead/flashnext-prefill-mtp-lean
Nov 25, 2026
Merged

ashhart merged 6 commits into
mainfrom
lead/flashnext-prefill-mtp-lean

Conversation

@ashhart

@ashhart ashhart commented Nov 22, 2026

Copy link
Copy Markdown
Owner

What this changes

From a read-only review of Flash Next prefill on a GB10: during prefill only the MTP layer's KV and indexer caches are read later, yet the MTP step also computed proposals and query-side work. With TF_FLASHNEXT_PREFILL_MTP_LEAN=1, prefill runs only the cache-writing part. Default off.

Checks

  • Host tests that poison the skipped outputs and still match; environment strict tests; fmt, ast-check, lean, 600-line cap.

Still to run

One GB10: pp 8K and 32K A-B-B-A with following decode tokens compared.

@ashhart
ashhart force-pushed the lead/flashnext-prefill-mtp-lean branch 4 times, most recently from 4cb9d57 to be4a654 Compare November 24, 2026 11:11
ashhart added a commit that referenced this pull request Nov 25, 2026
Main's zig/src/families/flashnext/cuda_batch.zig was 599 lines and #4529 adds six. Its scratch-size
test moves unchanged into cuda_paging_batch_test.zig, which it already imported; the private unused
ple import and the unreferenced proj_row constant (cuda_batch_state.zig keeps its own) go. No code
that runs changes; the gradient-serving pin is re-hashed.
@ashhart
ashhart force-pushed the lead/flashnext-prefill-mtp-lean branch from be4a654 to ee2e112 Compare November 25, 2026 11:15
Main's zig/src/families/flashnext/cuda_batch.zig was 599 lines and #4529 adds six. Its scratch-size
test moves unchanged into cuda_paging_batch_test.zig, which it already imported; the private unused
ple import and the unreferenced proj_row constant (cuda_batch_state.zig keeps its own) go. No code
that runs changes; the gradient-serving pin is re-hashed.
@ashhart
ashhart force-pushed the lead/flashnext-prefill-mtp-lean branch from ee2e112 to 86e2ebf Compare November 25, 2026 12:20
@ashhart
ashhart merged commit c358229 into main Nov 25, 2026
1 check failed
ashhart added a commit that referenced this pull request Nov 25, 2026
Main's zig/src/families/flashnext/cuda_batch.zig was 599 lines and #4529 adds six. Its scratch-size
test moves unchanged into cuda_paging_batch_test.zig, which it already imported; the private unused
ple import and the unreferenced proj_row constant (cuda_batch_state.zig keeps its own) go. No code
that runs changes; the gradient-serving pin is re-hashed.
@ashhart
ashhart deleted the lead/flashnext-prefill-mtp-lean branch November 25, 2026 12:20
ashhart added a commit to gilby/TensorFold that referenced this pull request Nov 25, 2026
ashhart added a commit that referenced this pull request Nov 25, 2026
ashhart added a commit to BlivionIaG/TensorFold that referenced this pull request Nov 25, 2026
ashhart added a commit that referenced this pull request Nov 25, 2026
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