Lex4 is a sub-4-bit Trellis-L14 format (.lex4), zero-doorbell O_DIRECT NVMe pager, and Blackwell SM121a inference engine. Run 2-Spark MoE models on a single 128 GB workstation at 99.4% of GB10 DRAM speed-of-light—with 262K context, 20.1 s boot load, and zero swap.
curl -fsSL https://raw.githubusercontent.com/lex4-dev/lex4/main/install.sh | bash && lex4 up --preset balanced
Every request can shift between resident-only fast (0 GB NVMe), warm adaptive balanced, and 100% full-checkpoint exact waves—automatically via the Lex4 Smart Proxy or manually with /fast, /balanced, and /exact.
Universal 2-stage Hessian convex-RD encoder compresses 328 GB of MoE experts (42 layers × 288 experts = 12,096 experts) to 133.2 GB with <1% perplexity drift unpaged (+0.27% code, +0.91% prose). Every expert payload is 4096-byte aligned for zero-copy O_DIRECT NVMe DMA.
Shannon entropy water-filling locks unpredictable early layers in RAM and pages spiky deep layers via zero-copy O_DIRECT libc.pread (QD=4 + 12 rolling wave slots, 10.5× faster than buffered I/O). Keeps full CUDA graphs on fast & balanced and drops 83.5 GB boot load to 20.1 seconds.
Zero-spill (STACK:0) fused decode GEMV + direct PTX mma.m16n8k32 + cooperative BF16 GEMV hitting 98.0%–99.4% of GB10's 234.1 GB/s DRAM roof.
Hysteresis depth controller shifts live between d=2 (chat) and d=7 (coding, math, tools) with zero CUDA graph breaks, hitting up to 36–45 tok/s.
Pins the 246 MoE experts responsible for clean </think> closure into fixed RAM slots at 0.00 GB extra memory, lifting 83 GB coding to 9/10 with 0 exact math truncations.