← Lab
equalsplitcap
confirmedupstream bugC++ · llama.cppInference & servingJuly 13, 2026
the question
Does llama_batch_allocr::split_equal respect its own n_ubatch cap?
what came out
No. The accumulation guard uses > after the push, so the ubatch overshoots by exactly one: n_tokens = min(K, n_ubatch+1), confirmed on all 168 grid cells (32 overshoot by one token). The sibling splitters split_simple and split_seq use >= and never exceed the cap. The fix is one character.
method & receipts
- Result: confirmed
- Pre-registered — the prediction was written down and committed before the run.
- Reproducible — one script re-runs the whole thing from scratch.
- Tested — a correctness/benchmark suite ships alongside the code.
→ read the code and re-run it
github.com/v-code01/equalsplitcap