ducviet00 / mojo-cpu-attention
Paged CPU attention kernels written in Mojo, with flash-attn's API (flash_attn_with_kvcache / flash_attn_func)
Over time
2026-10-21 to 2026-10-31; peak 10,582 lines
2026-10-21 to 2026-10-31; 204 commits, counted up by commit date
- Opened 16
- Closed or merged 16
2026-10-27 to 2026-10-31; 16 issues and pull requests opened (0 issues, 16 pull requests), from GitHub by mojo_issues
Dependencies
Declared in its manifests at HEAD (toolchain left out): pytest, torch.
Similar repos
| Repo | Description | Similarity |
|---|---|---|
| amarbaro/mojo-vattn | Flash-attention forward kernel in Mojo for video DiT self-attention on RDNA3 (gfx1100) | 81% |
| CoffeeVampir3/Mojo-Deepseek-Flash-4.1-CPU | A model runner and server for deepseek flash using mojo running only on CPU. | 81% |
| nktkt/mojo-flash-attention | FlashAttention-style exact attention kernel in Mojo | 80% |
| advenn/mojo_net | Native Mojo networking libraries for Linux: raw-syscall layer, byte buffers and codecs, the TCP/socket library (net), and an experimental, frozen event loop (rt). | 79% |
| lee101/mojo-panel | Panel (time x entity) feature kernels in Mojo: SIMD rolling statistics, GPU cross-sectional ranking, NumPy fallback | 78% |
By the cosine of the embeddings of each repo's name, description and topics: bge-small-en-v1.5 at bbddccb7, from snapshot 3454761910736014829 of mojo.repo_embeddings, which mojo_embed writes.
Stars per month
- stars
- forks
0 stars over the months of GH Archive loaded so far (47; months in between aren't loaded yet), counted from its events.
Contributors per month
- contributors
- new
6 people authored or co-authored its commits (every commit reachable from HEAD, Co-authored-by trailers included, bots left out), counted by email.
Releases and tags
No published release in the GH Archive days loaded, and no git tag in the clone.
Issues and pull requests
0 open and 0 closed issues; 0 open, 16 merged and 0 closed pull requests, from GitHub by mojo_issues.
Pull requests
| # | Title | Opened | State | Comments |
|---|---|---|---|---|
| 16 | Mojo kernel: lean on the stdlib, name the repeated pieces | 2026-10-31 | merged | 0 |
| 15 | Install from git or a path: build the kernel during the package build, no Mojo at runtime | 2026-10-30 | merged | 0 |
| 14 | README and BENCHMARK.md: benchmarks at main (b3e10f8) | 2026-10-30 | merged | 0 |
| 13 | Simplify: one native call route per op, cleanup (5,300 -> 4,217 lines) | 2026-10-30 | merged | 0 |
| 12 | Remove the GQA/MQA paths from both kernels (MHA only) | 2026-10-30 | merged | 0 |
| 11 | Flash-attn-only API, pytest vs numpy float64, a simple fair benchmark | 2026-10-30 | merged | 2 |
| 10 | Decode: split work across threads by context length | 2026-10-30 | merged | 0 |
| 9 | Remove the C++ backend; benchmark against SDPA and vLLM | 2026-10-29 | merged | 1 |
| 8 | C4D decode losses: a measurement artifact; time large decode rows cold; faster store-only K | 2026-10-29 | merged | 0 |
| 7 | Hardware-agnostic speedups; benchmark on 16-vCPU boxes | 2026-10-29 | merged | 1 |
Migrations
| Date | What | From | To | Commit |
|---|---|---|---|---|
| 2026-10-21 | mojo_version | – | 1.1.0 | d3bd61aa5f |
| 2026-10-21 | tooling | none | uv | d3bd61aa5f |
| 2026-10-30 | mojo_version | 1.1.0 | 1.2.0 | dc014f0849 |
Commits
Commit types: Feature 0% · Fix 0% · Mojo version 0% · Refactor 0% · Performance 1% · Docs 31% · Tests 4% · Build and chores 0% · Merge 5% · Other 55%
| Date | Commit | Type | Subject | Lines of Mojo | Tooling | Mojo version |
|---|---|---|---|---|---|---|
| 2026-10-31 | 20e9e7f791 | Merge | Merge pull request #16 from ducviet00/mojo-stdlib-cleanup | 3,728 | uv | 1.2.0 |
| 2026-10-30 | 062f55c412 | Other | flash_attn_with_kvcache: accept flash-attn 2's block_table= and alibi_slopes | 3,806 | uv | 1.2.0 |
| 2026-10-30 | 5631527d64 | Merge | Merge pull request #15 from ducviet00/install-from-git | 3,806 | uv | 1.2.0 |
| 2026-10-30 | 74d9ab61a7 | Merge | Merge pull request #14 from ducviet00/bench-main | 3,806 | uv | 1.2.0 |
| 2026-10-30 | b3e10f820e | Merge | Merge pull request #11 from ducviet00/restructure | 3,806 | uv | 1.2.0 |
| 2026-10-30 | dc014f0849 | Merge | Merge pull request #9 from ducviet00/remove-cpp | 4,433 | uv | 1.2.0 |
| 2026-10-27 | 57543a9a23 | Feature | Add CPP Backends | 8,902 | uv | 1.1.0 |
| 2026-10-24 | 322cdc4c58 | Other | neon: a phase-ablation knob, and the measured non-results around it | 10,582 | uv | 1.1.0 |
| 2026-10-24 | f3cdc6621a | Other | neon: the dense policies initialise the accumulator in pv, so the driver's memset is dead work | 10,582 | uv | 1.1.0 |
| 2026-10-24 | 2bb794fa28 | Docs | docs: the aarch64 logits-round-trip removal is measured as 3-8% slower, with the mechanism | 10,582 | uv | 1.1.0 |
| 2026-10-24 | f750d746d8 | Docs | docs: the arm64 bounded-base variant, re-verified to the bound and reverted on a P@V handoff defect | 10,582 | uv | 1.1.0 |
| 2026-10-23 | 8e06e74397 | Docs | docs: name the one open ARM lead (the per-row psum flush) precisely | 10,582 | uv | 1.1.0 |
| 2026-10-23 | c7aea6e0e0 | Docs | docs: exact win counts in the cross-box summary | 10,582 | uv | 1.1.0 |
| 2026-10-23 | 0e68d613f2 | Docs | docs/arm: the ARM agent's final ledger (the bounded base's bound is correct; the defect is a per-row psum flush for nrows > 1) | 10,582 | uv | 1.1.0 |
| 2026-10-23 | a8ed58e410 | Docs | docs: Xeon tables (22/22 vs vLLM dense, 20/20 vs Mojo paged) and the cross-box scorecard | 10,582 | uv | 1.1.0 |
| 2026-10-23 | 063aceb96e | Other | amx: per-dtype kt (512 fp32 / 256 bf16), 64-row work items, one ldtilecfg per worker per call | 10,582 | uv | 1.1.0 |
| 2026-10-23 | c4ac957801 | Other | csrc: tidy the optional-policy hooks and comments | 10,582 | uv | 1.1.0 |
| 2026-10-23 | d11313ec4c | Docs | docs: point AGENTS.md at the C++ backend and its ledger | 10,582 | uv | 1.1.0 |
| 2026-10-23 | ed93550104 | Tests | tests: make the phase bench reproduce the bf16 P@V win (dpbf16ps 2.05x over the old FMA body), fix build_cpp --test, drop dead sweep code | 10,582 | uv | 1.1.0 |
| 2026-10-23 | d519028f93 | Other | kernel: auto backend selection (cpp on x86-64, mojo on aarch64) and README for the two backends | 10,582 | uv | 1.1.0 |
| 2026-10-23 | fe50342da6 | Docs | docs: rewrite the C++ report around the three-box matrix, the instruments and the ledger | 10,582 | uv | 1.1.0 |
| 2026-10-23 | 36c742ba90 | Docs | docs/arm: fp32 hi/lo bf16 bfmmla measured at 1.2% (parity 65/65) and reverted | 10,582 | uv | 1.1.0 |
| 2026-10-23 | 6c7118aa1d | Docs | docs/arm: the Cauchy-Schwarz bounded base is implemented and fails parity (40/65) | 10,582 | uv | 1.1.0 |
| 2026-10-23 | 33694176ed | Docs | docs/arm: the fused bf16 register panel is implemented and falsified (1.52x slower) | 10,582 | uv | 1.1.0 |
| 2026-10-23 | 81377104b0 | Other | neon: bf16 K pack writes 32 bytes per two stores (128:8:64 bf16 26.1 -> 25.3 us) | 10,582 | uv | 1.1.0 |
| 2026-10-23 | 284f9b0482 | Merge | Merge branch 'main' into cpp-arm-dense | 10,582 | uv | 1.1.0 |
| 2026-10-23 | 7573d92c1d | Docs | docs/arm: round-2 table, the GQA store fix, paged no-regression, and the measured cost of the fp32 hi/lo split | 10,582 | uv | 1.1.0 |
| 2026-10-23 | 5f55c57f6a | Other | neon: paged store indexed the new K/V by query head (GQA read the wrong head / ran off the tensor) | 10,582 | uv | 1.1.0 |
| 2026-10-23 | 88eed14103 | Other | neon: dense pv/softmax walk pointers and step 16 keys (bf16 -10.0%, fp32 -3.0% at 2048:8:64) | 10,582 | uv | 1.1.0 |
| 2026-10-23 | b0d302c939 | Other | cpp: dense softmax folds the scale into the exponential; skip the zero-accumulator rescale; one OpenMP region for paged store+attend; preallocated out= and a 13-argument paged plan entry; fix a GQA st | 10,582 | uv | 1.1.0 |
| 2026-10-23 | b199f3af50 | Other | scripts: one-shot box provisioning for the C++ backend (uv, mojo .so, cpp .so, vLLM ref) | 10,579 | uv | 1.1.0 |
| 2026-10-23 | d3c163b1f9 | Docs | docs: the ARM bf16 fusion is falsified (3-5% slower, register spill) and the four rounds of apparent kernel failures were a harness bug; two process rules | 10,579 | uv | 1.1.0 |
| 2026-10-23 | 22552a374a | Refactor | vec: move the paged kernel into cpu_attn_vec.hpp (every x86 box runs it), amx::paged forwards | 10,579 | uv | 1.1.0 |
| 2026-10-23 | d19a96ea00 | Other | merge the AMX paged kernel and route paged to it on AMX boxes | 10,579 | uv | 1.1.0 |
| 2026-10-23 | 21f4f5e217 | Merge | Merge branch 'cpp-amx' | 10,579 | uv | 1.1.0 |
| 2026-10-23 | 9b522452f2 | Merge | Merge branch 'cpp-arm' | 10,579 | uv | 1.1.0 |
| 2026-10-23 | 406dedcb5b | Merge | Merge branch 'cpp-arm' | 10,579 | uv | 1.1.0 |
| 2026-10-23 | e89f81688e | Other | merge the AMX kernel; fix the LLC probe that never stripped the sysfs newline | 10,579 | uv | 1.1.0 |
| 2026-10-23 | 1ed845a5e5 | Other | neon dense: size the k tile against the L2 at head_dim 128 (vLLM tile_size) | 10,579 | uv | 1.1.0 |
| 2026-10-23 | c984ad57ec | Other | merge cpp-arm: the NEON kernel (bf16 bfmmla dense, bfdot paged), rebased on the shared driver; report section | 10,579 | uv | 1.1.0 |
| 2026-10-23 | 81011ff302 | Other | neon dense: block the packed K^T every 64 keys; mask only the rows a boundary panel clips | 10,579 | uv | 1.1.0 |
| 2026-10-23 | a3902dddc0 | Other | neon: rebase onto the current shared core | 10,579 | uv | 1.1.0 |
| 2026-10-23 | 9b4c725f8c | Other | neon dense: vectorise the epilogue, fold the tile max into qk, row-paired softmax | 10,579 | uv | 1.1.0 |
| 2026-10-23 | f0bdc45de7 | Other | neon: real aarch64 dense + paged kernel (bf16 bfmmla/bfdot, fp32 FMA) | 10,579 | uv | 1.1.0 |
| 2026-10-23 | ed71f2d369 | Docs | docs: CPP_REPORT with the blocked-K^T numbers | 10,579 | uv | 1.1.0 |
| 2026-10-23 | e42b9628ae | Other | vec: block the packed K^T every 64 keys (one dim per page instead of one per seq_k) | 10,579 | uv | 1.1.0 |
| 2026-10-23 | 4e99821908 | Docs | docs: CPP_REPORT with the Ryzen matrix, the falsification ledger and the open items; bench_vec_prims phase instrument | 10,579 | uv | 1.1.0 |
| 2026-10-23 | 816ea58a75 | Other | python: per-geometry paged call plan, contiguous-aware dense plan key | 10,579 | uv | 1.1.0 |
| 2026-10-23 | 279767dea1 | Other | cpp: vec policy fixes (causal key bounds, acc sizing, pack tail, env knobs) | 10,579 | uv | 1.1.0 |
| 2026-10-23 | 09ec7e3143 | Other | cpp: backend skeleton (VEC paged + dense, dispatch, binding, build) | 10,579 | uv | 1.1.0 |
The latest 50 of 204 commits; all of them are in the JSON.