Downloads · 30 days
0
roo5150/kvtc-pca-gemma4-26b
kvtc-pca-gemma4-26b is a machine learning model from roo5150. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Pre-computed PCA calibration data for KVTC (KV cache compression) on Gemma 4 26B MoE, calibrated on post-RoPE hidden states.
Downloads · 30 days
0
Access
Public
Updated Apr 16, 2026
Repo size
21.2 MB
Likes
0
Public
Click a slice to open those files.
.pt21.2 MB · 100%
From the Hugging Face model README
Pre-computed PCA calibration data for KVTC (KV cache compression) on Gemma 4 26B MoE, calibrated on post-RoPE hidden states.
Reduces KV cache head dimensions from 512 → 160 on the 5 full-attention layers (layers 5, 11, 17, 23, 29) of Gemma 4 26B. This gives 3.2x compression on the full-attention KV cache pool, enabling:
| Reduced Dim | Quality |
|---|---|
| 160 | ✅ Clean output, no artifacts (84.2% variance preserved worst-case) |
| 144 | ❌ Token corruption appears ("marty-ed", "Sovereousness") |
| 128 | ❌ Worse corruption, unusable for production |
dim=160 is the quality floor. Do not go lower.
Download the calibration file and pass it to SGLang:
# Download
huggingface-cli download roo5150/kvtc-pca-gemma4-26b kvtc_calibration_postrope.pt --local-dir .
# Launch SGLang with KVTC PCA
python3 -m sglang.launch_server \
--model-path <your-gemma4-26b-model> \
--kvtc-calibration-path kvtc_calibration_postrope.pt \
--kvtc-reduced-dim 160 \
--kv-cache-dtype fp8_e5m2 \
--attention-backend triton \
--mem-fraction-static 0.83 \
--port 30000 --host 0.0.0.0
--attention-backend triton on SM120 (RTX 5090) — FlashInfer doesn't support variable head_dimChris (@roo5150)
MIT