Repository navigation
Conversation
There was a problem hiding this comment.
I support this as a more general solution than #32752; we could merge for Inkling 2 and then potentially expand.
Tested locally on CUDA and macOS, results and comparisons with #32752 in this comment.
Keep one chunk when the mask of a full ubatch is in the budget. Otherwise use at most ub/16 tokens per chunk, with a minimum of 32 tokens.
|
@pcuenca I appreciate the feedback! I added a different heuristic that chooses smaller chunk size. New
Old
|
…ommit ebc0f11) Merge --no-ff de la tête de la PR amont ouverte ggml-org#32883 (sanmai, 3 commits importés verbatim) : sub-ubatch attention chunks, Inkling 2 en chunks, chunks plus petits à contexte court. Aucun conflit. Décision du propriétaire (2026-11-24) sur mesure : banc r3 [bon] — Inkling prod 1/49 → 49/49 couches GPU, tg 5,10 → 21,86 tok/s, prefill +73 % (llama-mix-notes, mesures/2026.md). Arbre de code identique au candidat mesuré (461b341e0) : build gate couverte. MIX.md : couche inscrite au moment du merge, premier calque de type « pr » avec sa règle de retrait ; AGENTS.md : forme de provenance pr:. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The drawback of this approach is that the graphs will have different number of nodes depending on the batch size. So far we've been trying hard to avoid this, but it seems to be getting unavoidable. Do we have any alternative ideas? How much does the chunking hurt the performance (not sure what is "decode hit rate" and how to read the data in the speed table)? |
Remplacé par le biais indexé GPU (couche suivante) : bancs r4 et r7 du 2026-11-24, prefill Inkling +61 % de plus que ggml-org#32883 et compute 774 au lieu de 1051 MiB. Les fichiers mix/ sont conservés ; MIX.md marque la couche RETIRÉE. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01QBjnvFeJ4P7Jp71oC6pzWf
|
After #32740 is adopted, this change will likely not be necessary anymore. |
|
#32740 is superior indeed. The decode hit rate is for the MoE cache, so the most gain with this approach are from more experts in VRAM. I did consider other approaches such as index FA; I'll pull down the benchmarks later as #32740 does not apply to QFN but this approach and alternatives still does, to my best understanding. Normalized to the same MoE cache size, any slowdowns or speedups from chunking are within noise.
|
|
I whipped up a compact bias prototype (4d5fc2a) and it blows the chunking out of the water at 200k context, not even mention short-context workloads.
That's for Inkling 2 Mini UD-Q8_K_XL with RTX 5090. |
Overview
The goal to reduce memory footprint of work buffers via sub-ubatch attention:
*as results are different with different ub
This is an early working prototype, and I mostly focused on Inkling 2 Mini as far as benchmarking, and QFN as far benchmarking and correctness.
Additional information
This expands on #30815. Support for other models is in:
There's a knob to change the chunk size outside of heuristics.
All benchmarks are on 5090 with 128 GB DDR4.
Inkling 2 Mini
To compare with #32752: compute buffer, GB.
Dry run with
llama-fit-params,-fa on, KV q8_0/q8_0, no-cmoe.Speed, t/s, best warm round. Context 10240,
-cmoe, KV q8_0/q5_1, largest MoE cache for 5090.QFN benchmarks
See #32884 for the actual code.
Requirements