Mojourney

ducviet00 / mojo-cpu-attention

Paged CPU attention kernels written in Mojo, with flash-attn's API (flash_attn_with_kvcache / flash_attn_func)

GitHub ↗ · first seen in GH Archive 2026-10-31 (search / language) · 3,728 lines of Mojo in 12 files at the last of 204 commits (2026-10-21 to 2026-10-31)

Stars0as of 2026-11-23
Forks0as of 2026-11-23
Depends on0Mojo libraries, of 2 declared
Used by0census repos that depend on it
Open issues0
Watchers0
Created2026-10-2133 days ago
Lines of Mojo3,72812 files
Commits2042026-10-21 to 2026-10-31
Contributors66 new in 2026-10
Mojo version1.2.0from lock file
CategoryWeb and networkingapproximate
Toolinguv
Packagingnone
LicenseApache-2.0

Over time

2026-10-21 to 2026-10-31; 204 commits, counted up by commit date

Dependencies

Declared in its manifests at HEAD (toolchain left out): pytest, torch.

Similar repos

RepoDescriptionSimilarity
amarbaro/mojo-vattnFlash-attention forward kernel in Mojo for video DiT self-attention on RDNA3 (gfx1100)81%
CoffeeVampir3/Mojo-Deepseek-Flash-4.1-CPUA model runner and server for deepseek flash using mojo running only on CPU.81%
nktkt/mojo-flash-attentionFlashAttention-style exact attention kernel in Mojo80%
advenn/mojo_netNative 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-panelPanel (time x entity) feature kernels in Mojo: SIMD rolling statistics, GPU cross-sectional ranking, NumPy fallback78%

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 (WatchEvents) and forks per month in GH Archive, 2023-01 to 2026-10012023-012023-052023-092024-012024-052024-092025-012025-052025-092026-012026-052026-09
  • 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

People with a commit each month, and the ones with their first, 2026-10 to 2026-100362026-10
  • 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 releases or 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

#TitleOpenedStateComments
16Mojo kernel: lean on the stdlib, name the repeated pieces2026-10-31merged0
15Install from git or a path: build the kernel during the package build, no Mojo at runtime2026-10-30merged0
14README and BENCHMARK.md: benchmarks at main (b3e10f8)2026-10-30merged0
13Simplify: one native call route per op, cleanup (5,300 -> 4,217 lines)2026-10-30merged0
12Remove the GQA/MQA paths from both kernels (MHA only)2026-10-30merged0
11Flash-attn-only API, pytest vs numpy float64, a simple fair benchmark2026-10-30merged2
10Decode: split work across threads by context length2026-10-30merged0
9Remove the C++ backend; benchmark against SDPA and vLLM2026-10-29merged1
8C4D decode losses: a measurement artifact; time large decode rows cold; faster store-only K2026-10-29merged0
7Hardware-agnostic speedups; benchmark on 16-vCPU boxes2026-10-29merged1

Migrations

DateWhatFromToCommit
2026-10-21mojo_version–1.1.0d3bd61aa5f
2026-10-21toolingnoneuvd3bd61aa5f
2026-10-30mojo_version1.1.01.2.0dc014f0849

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%

DateCommitTypeSubjectLines of MojoToolingMojo version
2026-10-3120e9e7f791MergeMerge pull request #16 from ducviet00/mojo-stdlib-cleanup3,728uv1.2.0
2026-10-30062f55c412Otherflash_attn_with_kvcache: accept flash-attn 2's block_table= and alibi_slopes3,806uv1.2.0
2026-10-305631527d64MergeMerge pull request #15 from ducviet00/install-from-git3,806uv1.2.0
2026-10-3074d9ab61a7MergeMerge pull request #14 from ducviet00/bench-main3,806uv1.2.0
2026-10-30b3e10f820eMergeMerge pull request #11 from ducviet00/restructure3,806uv1.2.0
2026-10-30dc014f0849MergeMerge pull request #9 from ducviet00/remove-cpp4,433uv1.2.0
2026-10-2757543a9a23FeatureAdd CPP Backends8,902uv1.1.0
2026-10-24322cdc4c58Otherneon: a phase-ablation knob, and the measured non-results around it10,582uv1.1.0
2026-10-24f3cdc6621aOtherneon: the dense policies initialise the accumulator in pv, so the driver's memset is dead work10,582uv1.1.0
2026-10-242bb794fa28Docsdocs: the aarch64 logits-round-trip removal is measured as 3-8% slower, with the mechanism10,582uv1.1.0
2026-10-24f750d746d8Docsdocs: the arm64 bounded-base variant, re-verified to the bound and reverted on a P@V handoff defect10,582uv1.1.0
2026-10-238e06e74397Docsdocs: name the one open ARM lead (the per-row psum flush) precisely10,582uv1.1.0
2026-10-23c7aea6e0e0Docsdocs: exact win counts in the cross-box summary10,582uv1.1.0
2026-10-230e68d613f2Docsdocs/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,582uv1.1.0
2026-10-23a8ed58e410Docsdocs: Xeon tables (22/22 vs vLLM dense, 20/20 vs Mojo paged) and the cross-box scorecard10,582uv1.1.0
2026-10-23063aceb96eOtheramx: per-dtype kt (512 fp32 / 256 bf16), 64-row work items, one ldtilecfg per worker per call10,582uv1.1.0
2026-10-23c4ac957801Othercsrc: tidy the optional-policy hooks and comments10,582uv1.1.0
2026-10-23d11313ec4cDocsdocs: point AGENTS.md at the C++ backend and its ledger10,582uv1.1.0
2026-10-23ed93550104Teststests: 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 code10,582uv1.1.0
2026-10-23d519028f93Otherkernel: auto backend selection (cpp on x86-64, mojo on aarch64) and README for the two backends10,582uv1.1.0
2026-10-23fe50342da6Docsdocs: rewrite the C++ report around the three-box matrix, the instruments and the ledger10,582uv1.1.0
2026-10-2336c742ba90Docsdocs/arm: fp32 hi/lo bf16 bfmmla measured at 1.2% (parity 65/65) and reverted10,582uv1.1.0
2026-10-236c7118aa1dDocsdocs/arm: the Cauchy-Schwarz bounded base is implemented and fails parity (40/65)10,582uv1.1.0
2026-10-2333694176edDocsdocs/arm: the fused bf16 register panel is implemented and falsified (1.52x slower)10,582uv1.1.0
2026-10-2381377104b0Otherneon: bf16 K pack writes 32 bytes per two stores (128:8:64 bf16 26.1 -> 25.3 us)10,582uv1.1.0
2026-10-23284f9b0482MergeMerge branch 'main' into cpp-arm-dense10,582uv1.1.0
2026-10-237573d92c1dDocsdocs/arm: round-2 table, the GQA store fix, paged no-regression, and the measured cost of the fp32 hi/lo split10,582uv1.1.0
2026-10-235f55c57f6aOtherneon: paged store indexed the new K/V by query head (GQA read the wrong head / ran off the tensor)10,582uv1.1.0
2026-10-2388eed14103Otherneon: dense pv/softmax walk pointers and step 16 keys (bf16 -10.0%, fp32 -3.0% at 2048:8:64)10,582uv1.1.0
2026-10-23b0d302c939Othercpp: 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 st10,582uv1.1.0
2026-10-23b199f3af50Otherscripts: one-shot box provisioning for the C++ backend (uv, mojo .so, cpp .so, vLLM ref)10,579uv1.1.0
2026-10-23d3c163b1f9Docsdocs: 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 rules10,579uv1.1.0
2026-10-2322552a374aRefactorvec: move the paged kernel into cpu_attn_vec.hpp (every x86 box runs it), amx::paged forwards10,579uv1.1.0
2026-10-23d19a96ea00Othermerge the AMX paged kernel and route paged to it on AMX boxes10,579uv1.1.0
2026-10-2321f4f5e217MergeMerge branch 'cpp-amx'10,579uv1.1.0
2026-10-239b522452f2MergeMerge branch 'cpp-arm'10,579uv1.1.0
2026-10-23406dedcb5bMergeMerge branch 'cpp-arm'10,579uv1.1.0
2026-10-23e89f81688eOthermerge the AMX kernel; fix the LLC probe that never stripped the sysfs newline10,579uv1.1.0
2026-10-231ed845a5e5Otherneon dense: size the k tile against the L2 at head_dim 128 (vLLM tile_size)10,579uv1.1.0
2026-10-23c984ad57ecOthermerge cpp-arm: the NEON kernel (bf16 bfmmla dense, bfdot paged), rebased on the shared driver; report section10,579uv1.1.0
2026-10-2381011ff302Otherneon dense: block the packed K^T every 64 keys; mask only the rows a boundary panel clips10,579uv1.1.0
2026-10-23a3902dddc0Otherneon: rebase onto the current shared core10,579uv1.1.0
2026-10-239b4c725f8cOtherneon dense: vectorise the epilogue, fold the tile max into qk, row-paired softmax10,579uv1.1.0
2026-10-23f0bdc45de7Otherneon: real aarch64 dense + paged kernel (bf16 bfmmla/bfdot, fp32 FMA)10,579uv1.1.0
2026-10-23ed71f2d369Docsdocs: CPP_REPORT with the blocked-K^T numbers10,579uv1.1.0
2026-10-23e42b9628aeOthervec: block the packed K^T every 64 keys (one dim per page instead of one per seq_k)10,579uv1.1.0
2026-10-234e99821908Docsdocs: CPP_REPORT with the Ryzen matrix, the falsification ledger and the open items; bench_vec_prims phase instrument10,579uv1.1.0
2026-10-23816ea58a75Otherpython: per-geometry paged call plan, contiguous-aware dense plan key10,579uv1.1.0
2026-10-23279767dea1Othercpp: vec policy fixes (causal key bounds, acc sizing, pack tail, env knobs)10,579uv1.1.0
2026-10-2309ec7e3143Othercpp: backend skeleton (VEC paged + dense, dispatch, binding, build)10,579uv1.1.0

The latest 50 of 204 commits; all of them are in the JSON.