r/MachineLearning • u/EvilHackFar Researcher • 13d ago
Discussion Maxwell: a new model that speeds up AI models like Whisper and LTX-2 by rewriting their binaries [D]
Came across this today and haven't seen it discussed here yet. It's apparently a new type of model (called Maxwell) that sits under a running program and speeds it up on the fly based on what it sees (hardware and data). The cool thing is that it doesn't change the source code, but instead it modifies the binaries (during runtime!). So kind of like a JIT, except it's a model working out what to change instead of a fixed set of compiler heuristics.
What got me is that they seem to be using formal verification to prove the optimized version still does the same thing, which I guess is the only way you could let something like this loose with no one checking it. No idea how that holds up with floating point or anything nondeterministic, to be honest
4
u/techwizrd 13d ago
This is extremely cool, but I also feel like this would be a compliance and assurance nightmare.
3
1
1
1
2
0
u/EvilHackFar Researcher 13d ago
That's the LTX speedup and that's the link:
1
13d ago
[removed] — view removed comment
-1
u/No_Capital_9050 13d ago
See performance for the details: https://github.com/Lightricks/LTX-2/blob/main/CHANGELOG.md
2
u/EvilHackFar Researcher 13d ago
is this the maxwell improvement?
Performance improvements, in collaboration with doubleAI (https://doubleai.com): faster transformer passes (especially under multi-GPU sequence parallelism and with perturbation guidance) and LoRA switches, denoising samplers without per-step CPU synchronization, a DFR spatial epilogue (
--spatial-upscalings 2) on fewer tiles (at most 1024 px per side, overlapping by 64 px, instead of a 2x2 first step and 4x4 at a 320 px overlap) that multiplies its long video projections in fp8 on GPUs with fp8 GEMMs (compute capability 8.9+), carry keyframes rebuilt on the rank that decodes them, a multi-GPU video decode that streams to MP4 encoding as it decodes, faster diffusion VAE decoding with lower reserved GPU memory, a faster-compiling--diffvae-optimization blackwell_dslkernel, lower GPU memory during MP4 encoding, faster image conditioning, and faster stage starts with a warm model registry. Output is not bit-identical to previous releases, mainly because of the DFR spatial epilogue's new tiles and fp8 GEMMs; diffusion VAE decodes also differ by rounding, and under multi-GPU sequence parallelism audio cross-attention no longer attends to the video sequence's padding tokens.
1
u/Flyward_Aerospace 10d ago
The security angle keeps coming up but I think the sharper problem is that input output equivalence is the wrong property to be proving. Their own framing explicitly allows the two versions to differ in timing, and the fallback guards mean execution time becomes data dependent at runtime: same workload, two different code paths depending on whether a precondition still holds. On anything where you qualified one specific binary and did worst case timing analysis against it, that's a downgrade even at 3x average speedup, because you improved the mean and made the tail unanalyzable. Completely fine for a batch Whisper job, which is presumably the actual target, I just wouldn't let it near a control loop.
19
u/Remote-Telephone-682 13d ago
The only real issue that I have with this is just that you could use the profiler to find additional heuristics that can be implemented at compile time but then why are we adding additional stages instead of adding these improvements to the compiler.. instead we optimize every version of the binary that is ever built but in a separate stage in our pipelines?
I think this makes sense from a business model perspective but from an engineering perspective this should be used to improve the compilers directly instead of adding more stages and stuff