Archived Mojo/MAX quantizer and serving research repository (read-only history)
Brought by drakestapleton
MojoLlama / src / mojollama / .workspace-state.md
Workspace State — 2026-05-20
Git
- Branch:
dev
- HEAD:
7e5e298 — "refactor: organize workspace, add forward/ package, Gemma4 support"
- Pushed to both
origin (OneDev) and github (GitHub)
Workspace Layout
src/mojollama/kernels/ (active)
| File | Purpose |
turbo_engine_v7_moe.py | Main MoE engine (56K, 1147 lines) |
turbo_engine_v77.py | Dense fallback engine (15K) |
cengine_batch_instr.c/.so | C batch_forward + SSM kernel (46K C, 54K SO) |
quant_kernels_omp.c/.so | Quantized matmul OMP kernels (80K C, 43K SO) |
simd_ops.c/.so | SIMD rms_norm, silu, residual_add, RoPE (8K C, 20K SO) |
gqa_attention.c/.so | GQA attention C kernel (3.7K C, 16K SO) |
src/mojollama/kernels/forward/ (architecture forward passes)
__init__.py — package init
base.py — ArchitectureForwardPass ABC (28 lines)
gemma4.py — ForwardGemma4 (445 lines)
src/mojollama/kernels/subdirs/
dsv4/ — DeepSeek V4 engine (4 files)
legacy-engine/ — 26 old Python engines
legacy-c/ — 55 old C files
benchmarks/ — bench_c_avx2.py
tests/ — test_quant_kernels.py
src/mojollama/root
benchmarks/ — 21 bench/server/profile scripts
tests/ — 11 test scripts
- 29 project files (studio.py, quantizer.py, server.py, etc.)
Gemma 4 Status
- ✅ Forward pass working (13.2 tok/s @32t, NaN=0)
- Features: per-layer projections, GeGLU, sliding window attn (512), Q/K norms, logit softcapping
- Architecture: ForwardGemma4 dispatched via arch_name == 'gemma4'
Falcon / Phi-4
- Blocked: no model files available
- Infrastructure ready (ArchitectureForwardPass ABC, dispatch hooks)
- Need to download test models to proceed
Key Commits
7e5e298 — Current HEAD (workspace + Gemma 4)
c916b87 — Lance Text 3B support
1019103 — Qwen3.6 concurrent server (47 tok/s)
a8efdd1 — GPT-OSS batch_forward fix