{"adoption": {"forks": 79, "observed_at": "2026-09-03T02:15:14.903291+00:00", "stars": 1234}, "canonical_url": "https://ross.abutalabs.com/products/attention-gym", "card": {"archived": false, "artifact_type": "library", "description": "Helpful tools and examples for working with flex-attention", "domain": ["deep-learning", "machine-learning", "large-language-models", "developer-tools"], "enriched": true, "function": ["machine-learning", "deep-learning", "developer-tools", "benchmarking"], "health_score": 100, "homepage": null, "language": "Python", "license": "BSD-3-Clause", "license_family": "permissive", "maturity": "active", "member_repos": ["meta-pytorch/attention-gym"], "name": "meta-pytorch/attention-gym", "platform": ["python", "cross-platform"], "pushed_at": "2026-09-03T01:52:14+00:00", "repo": "meta-pytorch/attention-gym", "stars": 1234, "tags": ["flex-attention", "pytorch", "attention-mechanisms", "transformers", "research", "gpu", "linux"], "topics": [], "urls": [], "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"], "what_it_is": "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.", "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"], "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"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/attention-gym", "repo": "meta-pytorch/attention-gym", "role": "main", "score": 91}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-09-03T02:15:14.903291+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-30T06:15:16.367612+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "445133a79bad34b8d9241e5a5d099af28a1e4d6c86bd17492f69ae4f9e8f7dfc", "fetched_at": "2026-09-03T02:15:14.903291+00:00", "kind": "readme", "missing": false, "url": "https://github.com/meta-pytorch/attention-gym"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-09-03T02:15:14.903291+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-30T06:15:16.367612+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "445133a79bad34b8d9241e5a5d099af28a1e4d6c86bd17492f69ae4f9e8f7dfc", "fetched_at": "2026-09-03T02:15:14.903291+00:00", "kind": "readme", "missing": false, "url": "https://github.com/meta-pytorch/attention-gym"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-30T06:15:16.367612+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "445133a79bad34b8d9241e5a5d099af28a1e4d6c86bd17492f69ae4f9e8f7dfc", "fetched_at": "2026-09-03T02:15:14.903291+00:00", "kind": "readme", "missing": false, "url": "https://github.com/meta-pytorch/attention-gym"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-09-03T02:15:14.903291+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-09-03T02:15:14.903291+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-09-03T02:15:14.903291+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-30T06:15:16.367612+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "445133a79bad34b8d9241e5a5d099af28a1e4d6c86bd17492f69ae4f9e8f7dfc", "fetched_at": "2026-09-03T02:15:14.903291+00:00", "kind": "readme", "missing": false, "url": "https://github.com/meta-pytorch/attention-gym"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-09-03T02:15:14.903291+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-09-03T02:15:14.903291+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-30T06:15:16.367612+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "445133a79bad34b8d9241e5a5d099af28a1e4d6c86bd17492f69ae4f9e8f7dfc", "fetched_at": "2026-09-03T02:15:14.903291+00:00", "kind": "readme", "missing": false, "url": "https://github.com/meta-pytorch/attention-gym"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-09-03T02:15:14.903291+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-09-03T02:15:14.903291+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-09-03T02:15:14.903291+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-30T06:15:16.367612+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "445133a79bad34b8d9241e5a5d099af28a1e4d6c86bd17492f69ae4f9e8f7dfc", "fetched_at": "2026-09-03T02:15:14.903291+00:00", "kind": "readme", "missing": false, "url": "https://github.com/meta-pytorch/attention-gym"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-09-03T02:15:14.903291+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-09-03T02:15:14.903291+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-30T06:15:16.367612+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "445133a79bad34b8d9241e5a5d099af28a1e4d6c86bd17492f69ae4f9e8f7dfc", "fetched_at": "2026-09-03T02:15:14.903291+00:00", "kind": "readme", "missing": false, "url": "https://github.com/meta-pytorch/attention-gym"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-30T06:15:16.367612+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "445133a79bad34b8d9241e5a5d099af28a1e4d6c86bd17492f69ae4f9e8f7dfc", "fetched_at": "2026-09-03T02:15:14.903291+00:00", "kind": "readme", "missing": false, "url": "https://github.com/meta-pytorch/attention-gym"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-30T06:15:16.367612+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "445133a79bad34b8d9241e5a5d099af28a1e4d6c86bd17492f69ae4f9e8f7dfc", "fetched_at": "2026-09-03T02:15:14.903291+00:00", "kind": "readme", "missing": false, "url": "https://github.com/meta-pytorch/attention-gym"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-30T06:15:16.367612+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "445133a79bad34b8d9241e5a5d099af28a1e4d6c86bd17492f69ae4f9e8f7dfc", "fetched_at": "2026-09-03T02:15:14.903291+00:00", "kind": "readme", "missing": false, "url": "https://github.com/meta-pytorch/attention-gym"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 100, "longevity": 54, "rhythm": 100}, "computed_at": "2026-09-03T02:20:16.233290+00:00", "flags": [], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 763, "days_push": 0, "days_rel": 0, "gap_med": 4, "n_releases_24m": 6}, "score": 91, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 3, "stale_scrape": false}}