Skip to content
Weightless
Esc
navigateopen⌘Jpreview
On this page

API reference

Reference for the model-agnostic core and the Gemma 3 architecture that builds on it.

The framework separates model-agnostic machinery from per-model wiring. Everything under core/ and kernels/ works on any decoder with the standard projection layout; each supported model adds a thin adapter under models/.

Package layout

weightless_fw/
├─ core/          # model-agnostic decomposition, layers, GEMM formulation
│  ├─ decompose.py
│  ├─ weightless_linear.py
│  ├─ weightless_mlp.py
│  └─ gemm_formulation.py
├─ kernels/       # generated_linear Mojo custom op (CPU + Metal + NVIDIA B200)
│  └─ generated_linear.mojo
├─ models/
│  ├─ gemma3/     # config, arch registration, adapters, model wrapper
│  └─ gemma4/     # Gemma 4 31B: dual head dims, sliding window, MoE-aware
└─ run_max.py     # MAX CLI wrapper

The package’s top-level ARCHITECTURES list is what MAX reads when you pass --custom-architectures weightless_fw.

Last updated on July 17, 2026

Was this page helpful?