We spent a while reading another framework's implementation closely, because its published numbers were better than ours and we wanted to know why.
The answer was that a good deal of the speed was bought. The stack uses agents to build many Triton fused kernels based on approximate computation, and layers a number of sparsification tricks on top: caching results, skipping certain steps. Each of these is a legitimate technique. Together, and ungated, they noticeably hurt accuracy: with a slightly more sensitive prompt, the gap between their output and ours becomes clear.
This is worth naming as a general hazard rather than as a complaint about one project. When an agent loop is scored on latency and the correctness check is loose, approximation is the path of least resistance, and the loop will find it. It is reward hacking with a plausible engineering story attached, which is the hardest kind to catch.
When the check is loose, approximation is the path of least resistance.
What we did with it
Rather than match the trade, we sorted the opportunities in that analysis into the ones that change the numbers and the ones that do not, and kept only the second kind.
Swipe the diagram sideways to see all of it →
1/0 Every speedup idea the analysis turned up.
Three pull requests came out of it, each measured on its own against main, on LTX-2.3 on B200:
- #29708 fuses the Q/K RMSNorm and split RoPE into one CUDA kernel, from a KDA-Pilot task whose name ends in
__bitwise; - #29390 computes the LTX-2.3 Ada values once per block, a fusion it adapts from NVlabs/Sana's
sol-engine, as its description credits; and - #29361 adds a CUDA fast path, from KDA-Pilot, for the residual-gate update that runs all through the transformer.
They save 9.2%, 10.0% and 3.1% of the time. Measured one at a time, they compose to about 21% less time, or 1.26× the speed, which is where the "more than 20%" we first reported comes from.That is arithmetic on three separate measurements, not one run with all three applied.
How lossless is lossless
Each pull request checks the decoded video against main, frame by frame.
Byte-identical video
2 of 3#29708 and #29390: SSIM 1.000 and PSNR infinite. #29708 is also torch.equal on every Q and K tensor.
Close, not identical: #29361
41.3 dBPSNR 41.3 dB and SSIM 0.985 against main.
So the honest version of our first claim is narrower: two of the three are lossless all the way to the pixels, and the third is close but not bit-for-bit.We first wrote "no accuracy loss at all". #29361's own video check says otherwise, so this section replaces that claim. Where on the scale it sits:
- 125 dB the later bar for the opt-in fast tier
- 241.3 dB #29361 against main
- 3→ ∞ #29708 and #29390: identical
The residual-gate kernel is also the one with the most to show at kernel level. Against the Triton path it replaces, it wins on every shape it was tuned for; against eager PyTorch, it wins on the large shapes and is slightly slower on the two smallest.
Where a deviation genuinely is worth having, it should be something the caller asks for. That is what the quality tier turned into a month later.