explaingit

yifei-zuo/parallax

Analysis updated 2026-05-18

37PythonAudience · researcherComplexity · 5/5LicenseSetup · hard

TLDR

Research code for a faster alternative to standard AI attention, benchmarked against FlashAttention on NVIDIA GPUs for both training and text generation.

Mindmap

mindmap
  root((Parallax))
    What it does
      New attention mechanism
      Local Linear Attention based
    Components
      Training kernel
      Decoding kernel
      PyTorch reference
    Benchmarks
      Compared to FlashAttention 2
      Compared to FlashAttention 3
    Tech stack
      Python
      PyTorch
      Triton
      CUDA
    Audience
      ML researchers
      Model performance 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 a language model's attention mechanism for a faster alternative during training.

USE CASE 2

Benchmark decoding speed and accuracy against FlashAttention 2 and FlashAttention 3.

USE CASE 3

Study Local Linear Attention as a research alternative to standard Softmax Attention.

USE CASE 4

Adapt the PyTorch reference implementation to run on non-NVIDIA hardware.

What is it built with?

PythonPyTorchTritonCUDA

How does it compare?

yifei-zuo/parallaxhao0321/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+

Kernels are developed and tested on NVIDIA Hopper GPUs, a CUDA-capable machine is required to run the actual attention kernels.

In plain English

Parallax is a Python library that implements a new form of attention mechanism for AI language models, proposed in a 2026 research paper. Attention mechanisms are the core mathematical operation that allows AI models to decide which parts of text to pay attention to when generating or processing language. Parallax offers a modified version called Parameterized Local Linear Attention (LLA) that the authors claim has theoretical advantages over the approach most large models use today. Unlike some alternatives that trade accuracy for speed by reducing computations, Parallax keeps the same computational structure as standard attention. It still uses a KV cache during text generation, which is the memory that stores previous context. What it changes is the mathematical formula used to score which words relate to which other words. The README notes this is not a linear-complexity mechanism and should not be confused with approaches that simplify the math at the cost of accuracy. The library includes two main components: a training kernel built with Triton, a GPU programming tool, and a decoding kernel using CuTeDSL. Benchmark results in the README compare timing against two widely used alternatives called FA2 and FA3. For small batches, Parallax is faster across most tested configurations. For large batches, it roughly matches FA3. Installation requires Python and a compatible NVIDIA GPU. The README notes that the optimized kernels are tested on NVIDIA Hopper GPUs specifically, but a plain PyTorch version is included for correctness testing on other hardware. The repository also includes benchmarking scripts so researchers can reproduce the speed comparisons themselves. The intended audience is machine learning researchers and engineers who build or study transformer-based AI models and want to experiment with alternative attention formulations. The README links to an arXiv preprint for the underlying theory.

Copy-paste prompts

Prompt 1
Explain in simple terms what Local Linear Attention is and how Parallax differs from standard attention.
Prompt 2
Show me how to run the training example from Yifei-Zuo/Parallax using parallax_func.
Prompt 3
Walk me through running the decode benchmark script and comparing it against FlashAttention 3.
Prompt 4
Summarize the accuracy and speed tradeoffs Parallax reports against FA2 and FA3 in the README.

Frequently asked questions

What is parallax?

Research code for a faster alternative to standard AI attention, benchmarked against FlashAttention on NVIDIA GPUs for both training and text generation.

What language is parallax written in?

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

How hard is parallax to set up?

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

Who is parallax for?

Mainly researcher.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.