This is a collaboration with Anunay Yadav, @razvan-pascanu.bsky.social and @caglarai.bsky.social . Great thanks to them! π Reach out if youβre interested in the paper or connecting! π§΅9/9
12.07.2025 10:04 β π 0 π 0 π¬ 0 π 0@xiuyingwei.bsky.social
PhD student @the Caglar Gulcehre Lab for AI Research (CLAIRE) @EPFL. Efficiency, foundation models. https://wimh966.github.io/
This is a collaboration with Anunay Yadav, @razvan-pascanu.bsky.social and @caglarai.bsky.social . Great thanks to them! π Reach out if youβre interested in the paper or connecting! π§΅9/9
12.07.2025 10:04 β π 0 π 0 π¬ 0 π 0For more discussion and results, please see our preprint: arxiv.org/abs/2507.04416
Code: github.com/CLAIRE-Labo/...
Website: claire-labo.github.io/RAT/ π§΅8/9
We also explored other different aspects of RAT, including parameter allocation, positional encodings, and especially the use of NoPE for length generalization ability, and even the retrieval ability with the RULER benchmark. π§΅7/9
12.07.2025 10:02 β π 0 π 0 π¬ 1 π 0Accuracy: We trained 1.3B models and evaluated them on six short-context reasoning tasks, 14 long-context tasks from LongBench, and four SFT tasks. By interleaving RATβs efficient long-range modeling with strong local interactions, we got top throughput and accuracy. π§΅6/9
12.07.2025 10:02 β π 0 π 0 π¬ 1 π 0Efficiency: Compared to the Attention, RAT has FLOPs and KV Cache reduced by chunk size L, thus enabling much faster training and generation speed. π§΅5/9
12.07.2025 10:01 β π 0 π 0 π¬ 1 π 0We then show RATβs strong efficiency and accuracy performance below. We even explore a hybrid model that interleaves RAT and local attention layers, where the two can complement each other effectively. π§΅4/9
12.07.2025 10:01 β π 0 π 0 π¬ 1 π 0In detail, gated recurrence first updates keys/values in each chunk. Softmax attention then queries final keys/values across all past chunks plus the current one. RAT is easy to implementβno custom CUDA/Triton, just PyTorch higher-order ops like flex attention. π§΅3/9
12.07.2025 10:01 β π 0 π 0 π¬ 1 π 0RAT splits long sequences into chunks. Inside each chunk, recurrence models local dependencies, softmax attention then operates on compressed chunk-level representations. By adjusting chunk size L, RAT moves between attention (L=1) and recurrence (L=T). π§΅2/9
12.07.2025 10:00 β π 0 π 0 π¬ 1 π 0We started by thinking that overusing attention on short-range context wastes its potential. Local patterns can be captured much more efficiently with lightweight recurrence. This motivates a new layer RAT that bridges the speed of RNNs and the global token access of softmax attention. π§΅1/9
12.07.2025 10:00 β π 0 π 0 π¬ 1 π 0β‘οΈπ§ Excited to share our recent work on long-context efficiency! We propose a new layer called RATβfast and lightweight like RNNs, yet powerful like Attention. πβ¨ This is the joint effort with Anunay Yadav, @razvan-pascanu.bsky.social @caglarai.bsky.social !
12.07.2025 09:59 β π 7 π 3 π¬ 1 π 1