Views
No views yet
cerebras/Gemma-4-21B-REAP-A4B-it — Cerebras's REAP-pruned variant of Gemma 4 26B (drops 32 of 128 experts → 96, ~21B total / 3B active) — calibrated to preserve thinking, vision, and video on consumer-class GPUs. Validated on NVIDIA RTX 3090 (Ampere sm_86, 24 GB) with SGLang v0.5.11 + 16 patches.| Base model | cerebras/Gemma-4-21B-REAP-A4B-it (REAP from google/gemma-4-26b-a4b-it) |
| Architecture | Gemma4ForConditionalGeneration — MoE (96 experts, top-8) + SigLIP vision tower + audio tower |
| Parameters | ~21B total / ~3B active |
| Quantization | AWQ 4-bit, GPTQ-via-llmcompressor, group_size=128 |
| Calibration recipe | balanced_thinking_vision (40% thinking + 60% non-thinking + 25% LLaVA images), regex ignore covering vision_tower / embed_vision / multi_modal_projector |
| Audit | 0/11725 zero/NaN scales, 0/11725 zero/NaN qweight (scripts/eval/check_awq_scales.py) |
| File layout | model-00001-of-00001.safetensors (LM weights) + model-vision.safetensors (333 vision tensors retained) |
scripts/eval/validate_capabilities.py:| Check | Result |
|---|---|
| Basic | finish=stop answer='paris' |
| Thinking | structured <|channel>thought channel + correct arithmetic |
| Vision | 'a solid red circle with a black outline on a white background.' (content-aware) |
| Video | 'a red circle moves in a clockwise direction.' (content-aware temporal) |
gemma4_mm per-expert AWQ loader (maps model.layers.N.mlp.experts.E.{gate,up,down}_proj.{qweight,scales,qzeros} correctly when checkpoint stores per-expert keys).quantization_config.ignore rather than hardcoding quant_config=None for dense MLP on MoE layers.KeyError on per-expert keys or BF16 placeholders that never match the AWQ checkpoint.1# config.json carries architectures=Gemma4ForConditionalGeneration (multimodal route) by default.
2git clone https://github.com/mattbucci/2x-3090-GA102-300-A1-sglang-inference
3cd 2x-3090-GA102-300-A1-sglang-inference
4./scripts/setup.sh # clones SGLang v0.5.11 + applies 16 patches
5MODEL=mattbucci/gemma-4-21B-REAP-AWQ ./scripts/launch.sh gemma4gemma4 preset already bakes the working flag combo for Ampere sm_86 (head_dim=256 + FP8 KV incompat):--attention-backend triton (FlashInfer rejects head_dim=256)--kv-cache-dtype auto (FP8 E4M3 KV incompat with triton on sm_86)--dtype bfloat16 (SigLIP vision tower NaNs in FP16)--disable-cuda-graph --disable-piecewise-cuda-graph (trades cold-launch reliability for ~5-10% TPOT)--enable-multimodal --reasoning-parser gemma4-thinking-vision-v2) is a calibration disaster — 164 all-zero scale tensors in the vision tower + MoE experts (silent calibration failure when the ignore list used bare strings instead of regex). The shipped checkpoint is the v3b corrected build; do not pull older -v2 directories from sister repos.