{"adoption": {"forks": 158, "observed_at": "2026-08-28T04:06:21.647845+00:00", "stars": 2169}, "canonical_url": "https://ross.abutalabs.com/products/moba", "card": {"archived": false, "artifact_type": "library", "description": "MoBA: Mixture of Block Attention for Long-Context LLMs", "domain": ["large-language-models", "deep-learning", "machine-learning"], "enriched": true, "function": ["llm-training", "llm-inference", "machine-learning", "deep-learning"], "health_score": 29, "homepage": null, "language": "Python", "license": "MIT", "license_family": "permissive", "maturity": "active", "member_repos": ["MoonshotAI/MoBA"], "name": "MoonshotAI/MoBA", "platform": ["python"], "pushed_at": "2025-04-03T07:28:06+00:00", "repo": "MoonshotAI/MoBA", "stars": 2169, "tags": ["sparse-attention", "mixture-of-experts", "flash-attention", "long-context", "transformer", "pytorch", "gpu", "linux"], "topics": ["flash-attention", "llm", "llm-serving", "llm-training", "moe", "pytorch", "transformer"], "urls": [], "use_cases": ["speed up long-context llm attention with sparse block attention", "train a transformer that switches between full and sparse attention", "implement mixture-of-experts style gating for attention", "reduce quadratic attention cost for long sequences", "research efficient attention mechanisms for llms"], "what_it_is": "MoBA (Mixture of Block Attention) is a PyTorch implementation of a trainable block-sparse attention mechanism for long-context large language models, applying MoE-style top-k gating to select relevant KV blocks. It can seamlessly switch between full and sparse attention and is deployed in Kimi's long-context serving.", "when_to_avoid": ["you need a drop-in speedup for an existing pretrained model without retraining", "you only run inference and cannot continue-train the model", "your sequences are short enough that full attention cost is acceptable"], "when_to_choose": ["you are training or continue-training an llm for long-context workloads and want efficient sparse attention", "you need a flexible attention layer that can toggle between full and sparse modes", "you want a production-proven approach (used by Kimi) with FlashAttention integration"]}, "data_as_of": "2026-08-30T08:39:29.467469+00:00", "members": [{"path": "/products/moba", "repo": "MoonshotAI/MoBA", "role": "main", "score": 27}], "provenance": {"archived": {"kind": "observed", "observed_at": "2026-08-28T04:06:21.647845+00:00", "source": "github"}, "artifact_type": {"confidence": null, "enriched_at": "2026-08-30T02:49:21.175735+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0aa294b46a88c3bf0544d20e61f085e44df4e6059f5370760573ca246677a372", "fetched_at": "2026-08-28T04:06:21.647845+00:00", "kind": "readme", "missing": false, "url": "https://github.com/MoonshotAI/MoBA"}], "taxonomy_version": 1}, "description": {"kind": "observed", "observed_at": "2026-08-28T04:06:21.647845+00:00", "source": "github"}, "domain": {"confidence": null, "enriched_at": "2026-08-30T02:49:21.175735+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0aa294b46a88c3bf0544d20e61f085e44df4e6059f5370760573ca246677a372", "fetched_at": "2026-08-28T04:06:21.647845+00:00", "kind": "readme", "missing": false, "url": "https://github.com/MoonshotAI/MoBA"}], "taxonomy_version": 1}, "enriched": {"inputs": [], "kind": "computed", "method": "enrichment_status"}, "function": {"confidence": null, "enriched_at": "2026-08-30T02:49:21.175735+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0aa294b46a88c3bf0544d20e61f085e44df4e6059f5370760573ca246677a372", "fetched_at": "2026-08-28T04:06:21.647845+00:00", "kind": "readme", "missing": false, "url": "https://github.com/MoonshotAI/MoBA"}], "taxonomy_version": 1}, "health_score": {"inputs": ["days_since_push", "days_since_release", "archived"], "kind": "computed", "method": "health_v1"}, "homepage": {"kind": "observed", "observed_at": "2026-08-28T04:06:21.647845+00:00", "source": "github"}, "language": {"kind": "observed", "observed_at": "2026-08-28T04:06:21.647845+00:00", "source": "github"}, "license": {"kind": "observed", "observed_at": "2026-08-28T04:06:21.647845+00:00", "source": "github"}, "license_family": {"inputs": ["license"], "kind": "computed", "method": "license_family"}, "maturity": {"confidence": null, "enriched_at": "2026-08-30T02:49:21.175735+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0aa294b46a88c3bf0544d20e61f085e44df4e6059f5370760573ca246677a372", "fetched_at": "2026-08-28T04:06:21.647845+00:00", "kind": "readme", "missing": false, "url": "https://github.com/MoonshotAI/MoBA"}], "taxonomy_version": 1}, "member_repos": {"kind": "observed", "observed_at": "2026-08-28T04:06:21.647845+00:00", "source": "github"}, "name": {"kind": "observed", "observed_at": "2026-08-28T04:06:21.647845+00:00", "source": "github"}, "platform": {"confidence": null, "enriched_at": "2026-08-30T02:49:21.175735+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0aa294b46a88c3bf0544d20e61f085e44df4e6059f5370760573ca246677a372", "fetched_at": "2026-08-28T04:06:21.647845+00:00", "kind": "readme", "missing": false, "url": "https://github.com/MoonshotAI/MoBA"}], "taxonomy_version": 1}, "pushed_at": {"kind": "observed", "observed_at": "2026-08-28T04:06:21.647845+00:00", "source": "github"}, "repo": {"kind": "observed", "observed_at": "2026-08-28T04:06:21.647845+00:00", "source": "github"}, "stars": {"kind": "observed", "observed_at": "2026-08-28T04:06:21.647845+00:00", "source": "github"}, "tags": {"confidence": null, "enriched_at": "2026-08-30T02:49:21.175735+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0aa294b46a88c3bf0544d20e61f085e44df4e6059f5370760573ca246677a372", "fetched_at": "2026-08-28T04:06:21.647845+00:00", "kind": "readme", "missing": false, "url": "https://github.com/MoonshotAI/MoBA"}], "taxonomy_version": 1}, "topics": {"kind": "observed", "observed_at": "2026-08-28T04:06:21.647845+00:00", "source": "github"}, "urls": {"kind": "observed", "observed_at": "2026-08-28T04:06:21.647845+00:00", "source": "github"}, "use_cases": {"confidence": null, "enriched_at": "2026-08-30T02:49:21.175735+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0aa294b46a88c3bf0544d20e61f085e44df4e6059f5370760573ca246677a372", "fetched_at": "2026-08-28T04:06:21.647845+00:00", "kind": "readme", "missing": false, "url": "https://github.com/MoonshotAI/MoBA"}], "taxonomy_version": 1}, "what_it_is": {"confidence": null, "enriched_at": "2026-08-30T02:49:21.175735+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0aa294b46a88c3bf0544d20e61f085e44df4e6059f5370760573ca246677a372", "fetched_at": "2026-08-28T04:06:21.647845+00:00", "kind": "readme", "missing": false, "url": "https://github.com/MoonshotAI/MoBA"}], "taxonomy_version": 1}, "when_to_avoid": {"confidence": null, "enriched_at": "2026-08-30T02:49:21.175735+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0aa294b46a88c3bf0544d20e61f085e44df4e6059f5370760573ca246677a372", "fetched_at": "2026-08-28T04:06:21.647845+00:00", "kind": "readme", "missing": false, "url": "https://github.com/MoonshotAI/MoBA"}], "taxonomy_version": 1}, "when_to_choose": {"confidence": null, "enriched_at": "2026-08-30T02:49:21.175735+00:00", "kind": "inferred", "prompt_version": 1, "sources": [{"content_hash": "0aa294b46a88c3bf0544d20e61f085e44df4e6059f5370760573ca246677a372", "fetched_at": "2026-08-28T04:06:21.647845+00:00", "kind": "readme", "missing": false, "url": "https://github.com/MoonshotAI/MoBA"}], "taxonomy_version": 1}}, "score": {"components": {"activity": 14, "longevity": 40, "rhythm": 35}, "computed_at": "2026-09-02T17:46:02.011165+00:00", "flags": ["no_releases"], "formula": "round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)", "inputs": {"age_days": 562, "days_push": 517, "days_rel": null, "gap_med": null, "n_releases_24m": 0}, "score": 27, "version": 2}, "staleness": {"enrichment_outdated": false, "low_confidence": false, "scrape_days": 9, "stale_scrape": false}}