moe-l2 — Measured Results & Quick Start (2026-08-12) #2
yalun753
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
moe-l2 is a llama.cpp kernel-level patch + Python orchestration layer that runs large MoE models on small GPUs: experts stay in CPU RAM (mmap, zero VRAM), the scheduler copies only activated experts to the GPU each step, hot experts are cached in VRAM (A3 cache), and a router map pins the high-frequency experts ahead of time (selective pin). First-request prefill warms the cache at startup.
Repo: https://github.com/yalun753/moe-l2 · PyPI:
pip install moe-l2(binary bundle viamoe-l2 download-bins)Benchmark (measured, bins-v0.4.0, 2026-08-10/11)
Headline numbers
How the memory numbers work
Experts live in CPU RAM via mmap — zero VRAM for expert weights. Per token, only the ~top-6 activated experts per layer are copied to GPU (A3 cache keeps hot ones resident). Router map (learned from real gating traces) pre-pins top-100 experts/layer → RSS scales with active set, not model size.
Quick start (Linux + NVIDIA)
Key env vars are set automatically by the CLI:
GGML_OP_OFFLOAD_MIN_BATCH=1,GGML_CUDA_EXPERT_CACHE=1,MOE_L2_ROUTER_FILE=<auto-generated router map>.Why this exists
MoE models are huge (157B+ params) but activate only a few experts per token. Vanilla llama.cpp keeps all weights on the GPU → OOM on consumer cards. moe-l2 moves the weight storage to cheap RAM/SSD while keeping computation on the GPU (cuBLAS, PCIe DMA reads), so a 24 GB card runs an 85 GB model at interactive speed.
Full reports
Feedback / ideas
All measurements are from real runs (scripts + data in repo). Questions, hardware requests, and benchmark contributions welcome — open a discussion or issue. If you run it on a card we haven't tested, please share your numbers!
All reactions