Repository navigation
feat(drama3): batch CUDA prompt prefill in bounded rounds - #1120
plotarmordev wants to merge 1 commit into
Conversation
|
Thanks @plotarmordev. 18.2 s to 0.76 s for first audio is a big win, and we want it in. The plan:
No action needed from you unless you'd rather we kept 64 rows as the opt-in example. - Synthema, Ash's AI Assistant. |
|
Landed on main as beff255, with a maintainer child (a6cbfbb) that keeps one prompt row a chunk as the CUDA default, as planned, thank you @plotarmordev. Default audio stays byte-identical to stock. - Synthema, Ash's AI Assistant. |
|
This shipped in TensorFold 1.1.4: https://github.com/ashhart/TensorFold/releases/tag/v1.1.4 Thank you @plotarmordev for the contribution. - Synthema, Ash's AI Assistant. |
What this changes
Batch CUDA prompt prefill into bounded chunks through the existing lane rounds, with fixed prompt-offset boundaries and a scheduler return after each chunk. The default is 128 rows;
TF_DRAMA_PREFILL_ROWS=1restores single-row behaviour, and the generation tool's--max-rowscontrols ordinary CUDA prefill.Receipt
Feature
307583a2acccbe60c2c7bcd31149e44841ab4678ondrama3/prefill-rows, based ond1018b31. Public native-CUDA generation receipt: one GB10, built-in voice, a 645-row public text prompt, 1024 generated frames and 4 repeats per arm. Framework versions and checkpoint revision are not recorded in the public summary. Metal was not qualified.tools/bench_concurrent.py --alone --serialortoken_shaagainst"draft": false:Public PCM hashes show single-row patch equals stock; default equals explicit 128 equals the repeated 128 run byte-for-byte. Batched PCM differs from single-row PCM: the default changes output bytes versus 1.1.1. Dense projections switch from GEMV reductions to tiled GEMM reductions, and attention QK, softmax and weighted-value sums are regrouped; BF16 inputs/outputs and FP32 accumulation are retained. This is not a claim of chunk-invariant bits or audio-quality equivalence. If the maintainer prefers opt-in batching rather than a changed default, that policy would preserve release output behaviour by default.
tools/bench_openai.py:Not run; the native generation receipt below measures first audio and total generation time, not OpenAI decode throughput.
ttft_sfromtools/bench_cache.py --require-coldon a long prompt, or "n/a" with the reason when the change cannot reach prompt processing:Cold-cache serving TTFT was not measured; native first-audio medians are reported below instead.
CPU qualification for
307583a2: the final combined build reported 230/230 steps succeeded, 753/755 tests passed and 2 skipped, with other successful tests cached; the changed Drama host artifact passed 29/29. Python comparator tests passed 5/5. Earlier invocations reported 3026/3040 passed with 14 skipped, then 2166/2176 passed with 10 skipped; these are separate invocation counts, not additive totals. The public summary reports all repetition, metric and output-equality checks passing. Both public replay runs, at 64 and 128 rows, fail with the separate codec chunk-widthReplayMismatch; no replay pass is claimed. Replay at these capacities needs the separate poison-ordering fix PR (drama3/replay-stock-fix,3aa77ad3).No new build or test run for this draft. Metal, other CUDA hardware, oracle fidelity, audio quality, concurrent/draft exactness and cold-cache serving benchmarks are not established by this public native-generation receipt. No GPU kernel was edited.
Medians from the public summary; device peak is the reported device allocation peak, not host memory:
Checklist
"draft": false, a resumed prompt equals a fresh one, and concurrent equals solo.SUMMARYline is in the receipt.