27x faster Attention Residuals!!! π
We implemented Block AttnRes as a pip-installable package.
!pip install flash-attn-res
No annoying kernel nonsense.
No compile/autograd plumbing.
Call it like a regular PyTorch op.
It just works.
Methodology:
πΉ fused triton kernels
πΉ batched attention over residual blocks
πΉ online-softmax merge
πΉ flash attention-style split-KV reduction
Thanks @LLMenjoyer and @cartesia for the support and guidanceβοΈ
Introducing π¨ππππππππ πΉππππ ππππ: Rethinking depth-wise aggregation.
Residual connections have long relied on fixed, uniform accumulation. Inspired by the duality of time and depth, we introduce Attention Residuals, replacing standard depth-wise recurrence with learned, input-dependent attention over preceding layers.
πΉ Enables networks to selectively retrieve past representations, naturally mitigating dilution and hidden-state growth.
πΉ Introduces Block AttnRes, partitioning layers into compressed blocks to make cross-layer attention practical at scale.
πΉ Serves as an efficient drop-in replacement, demonstrating a 1.25x compute advantage with negligible (<2%) inference latency overhead.
πΉ Validated on the Kimi Linear architecture (48B total, 3B activated parameters), delivering consistent downstream performance gains.
πFull report:
https://t.co/u3EHICG05h
ALERTπ¨: Last night, Google just submitted their FIRST TPUv7 Agentic benchmark, and it delivers 1.42x π better perf per dollar than GB300 NVL72 FP4, even on an external non-Google workload cost basis!
TPUv7 is even 2.5x better than AMD MI355XποΈ (1/3)π§΅
Releasing FLAT: Flash Linear Attention on TPUs π
Pallas training kernels for Linear Attention, Mamba-2 and GLA. On one TPU v6e, forward + backward is up to 3x faster than FLA on an H100 for GLA, and 1.5x faster for Mamba-2.
π§΅
careful if you're an academic working with sensitive data!
in order to take advantage of the public research program, you *need* to share your data:
- full transcripts with their agent (the ONLY way to provision compute afaik)
- training artifacts your runs write
Computer-assisted proofs that the classical packings of 15, 16, 17, 18 and 20 equal circles in a circle are optimal, using GPT-6 Astra.
These were the remaining open cases for N β€ 20 (previously proved only for N β€ 14 and N = 19).
(1/n)
Our first TPU megakernel for Kimi K3 reaches 709 tokens/s on low-concurrency decode, against 450 tokens/s for our GB200 baseline, both with DSpark speculative decoding.
To our knowledge, this is the first TPU inference megakernel. The whole model runs in a single Pallas kernel, and without spec decoding it is roughly 1.4 to 2x the GB200 baseline at batch sizes 1 through 8.
We are open sourcing it today.
1/2
@henrylhtsang this is why i think metacognition and second-order thinking are incredibly important skills to have. you need to be able to look back and assess with full sincerity and honesty what you did, not "i did a lot therefore i made a lot of progress". then incorporate what i learned in
@AnkaReuel seems like people replying to this tweet don't understand. people don't want to work with those whose low-quality work will affect their reputation or cause a mess they'll have to clean up.
you put out slop -> people see you produce slop -> they won't want to work with you.
@googlecloud and Inferact are announcing today a partnership to make TPU a first-class citizen in @vllm_project.
This partnership puts both teams on one engineering roadmap to bring TPU to the broader open model ecosystem, optimizing vLLM as the agentic production serving engine for TPU:
β’ Production serving features and optimized kernels
β’ A native PyTorch path via TorchTPU
β’ Moving towards day-0 support for frontier model releases
We're also launching a community program: shared TPU capacity for open-source contributors, plus dedicated review and design help from the core vLLM maintainers at Inferact.
Everything this collaboration produces is open source. Read the full announcement: https://t.co/asTJSktyQK
@cloneofsimo@norxornor the ones doing actual good work also get crowded out by the folks with LLM psychosis so there's a need for semi-exclusive spaces
@cloneofsimo they talk about it in semi-exclusive discord servers. @norxornor is one. also, unfortunately, independent research is especially difficult nowadays as many ideas, no matter how well they seem to work, require validating at scale with infra and compute many don't have.
Two potential improvements to Kimi K3's quantile balancing (QB):
- logit space scores with a compact histogram instead of sigmoid space for better "conditioning", to improve balance and steerability, and
- a generalized slacked version of QB, to trade off perfect balance for loss improvements