meta-pytorch/attention-gym
Helpful tools and examples for working with flex-attention observed · 2026-09-03
Health v2 · maintenance only
91/100
- Activity 100
- Release rhythm 100
- Longevity 54
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 4
- age_days: 763
- days_rel: 0
- days_push: 0
- n_releases_24m: 6
Adoption not part of the score
1234 stars · 79 forks observed · 2026-09-03
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Attention Gym is a collection of tools, examples, and reference implementations for working with PyTorch's FlexAttention API. It provides attention mask and score-mod utilities, attention variant implementations, and performance comparisons for researchers and developers.
Use cases
- experiment with attention mechanisms using flex-attention
- create sliding window or document attention masks in pytorch
- benchmark different attention variants
- learn how to use flex_attention in my model
- reference implementations of linear attention
When to choose
- you use PyTorch 2.5+ FlexAttention and want ready-made mask/score-mod examples
- you are researching or comparing attention mechanisms
- you want utility functions for building and combining block masks
When to avoid
- you need a stable API with backward compatibility guarantees
- you don't use PyTorch or FlexAttention
- you need production-hardened attention kernels rather than examples
Facets
library · maturity active
machine-learning deep-learning developer-tools benchmarking deep-learning machine-learning large-language-models developer-tools python cross-platform flex-attention pytorch attention-mechanisms transformers research gpu linux
1 source
- readme: https://github.com/meta-pytorch/attention-gym · fetched 2026-09-03 · 445133a79bad
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| meta-pytorch/attention-gym | main | 91 |
For agents
markdown · JSON · MCP: product_card(name="meta-pytorch/attention-gym")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem