whatisgithub

What is wall-attention-release?

tilde-research/wall-attention-release — explained in plain English

Analysis updated 2026-05-18

37PythonAudience · researcherComplexity · 5/5LicenseSetup · hard

In one sentence

A Python library with custom GPU kernels that adds per-channel learned decay to transformer attention, letting a model control how fast it forgets each dimension of context.

Mindmap

mindmap
  root((Wall Attention))
    What it does
      Per-channel decay
      Learned forgetting
    Tech stack
      Python
      Triton kernels
      PyTorch
    Use cases
      Research experiments
      Faster training
      Efficient decoding
    Audience
      ML researchers
      Engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Swap in per-channel decay attention as a drop-in research experiment on top of existing transformer code

USE CASE 2

Train models faster using a fused Triton kernel that skips storing large intermediate matrices

USE CASE 3

Run efficient single-token decoding with a pre-processed key-value cache

USE CASE 4

Test grouped query attention with sliding window or attention sink variants

What is it built with?

PythonTritonPyTorchCUDA

How does it compare?

tilde-research/wall-attention-releasehao0321/video-autopilot-kitharahan/rtdmd
Stars373737
LanguagePythonPythonPython
Setup difficultyhardmoderatehard
Complexity5/53/55/5
Audienceresearchergeneralresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires a CUDA GPU and Triton, meant for ML researchers comfortable with custom kernels.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

Wall Attention is a Python library that implements a new variation on the attention mechanism used inside AI language models. In standard transformer models, the attention calculation computes a score for every pair of positions in a sequence based on a dot product of query and key vectors. Wall Attention modifies that score by applying a learned decay to each individual channel of the query-key product, letting the model independently control how much it forgets each dimension of context as distance grows. The authors describe this as a generalization of simpler decay approaches used in other recent architectures. The library ships two GPU kernels written using Triton, a Python-based GPU programming framework. The first handles training and the initial processing of a full input sequence (called prefill), using a fused computation similar to FlashAttention that avoids storing large intermediate matrices. The second handles the decode phase, where the model generates one token at a time. For decode, the library pre-processes the key-value cache so each new token costs only a small, fixed amount of work regardless of context length. Both kernels support grouped query attention (GQA), where the number of query heads can be higher than the number of key-value heads. Optional features include a scalar gate per head, an attention sink bias, and a sliding window to limit how far back attention looks. The library also supports variable-length sequence packing for efficient batch processing. The library is aimed at machine learning researchers and engineers who want to experiment with or build on this attention variant. Tests verify that the kernels match a reference PyTorch implementation and that gradients are numerically correct. The code is MIT licensed and links to a blog post from Tilde Research for additional theoretical background.

Copy-paste prompts

Prompt 1
Explain how Wall Attention's per-channel decay differs from standard transformer attention.
Prompt 2
Show me how to run the training kernel and check gradients against the PyTorch reference.
Prompt 3
How do I enable grouped query attention and a sliding window with this library?
Prompt 4
Walk me through how the decode-phase kernel keeps per-token cost constant as context grows.

Frequently asked questions

What is wall-attention-release?

A Python library with custom GPU kernels that adds per-channel learned decay to transformer attention, letting a model control how fast it forgets each dimension of context.

What language is wall-attention-release written in?

Mainly Python. The stack also includes Python, Triton, PyTorch.

What license does wall-attention-release use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is wall-attention-release to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is wall-attention-release for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.