Loading Rust WASM32 + SIMD128 engine… 63 KiB gzip · 100% In-Tab Client Execution

Live WebGPU LLM Micro-Bench & Zero-Upload .GGUF X-Ray

Dispatch real WebGPU (WGSL) memory-streaming & Q4 GEMV compute kernels alongside Rust WASM SIMD128 right inside your tab — then drop any .gguf file to inspect its per-tensor quantization mix, KV-cache footprint, and exact 2k–128k VRAM-to-RAM offload cliff.

Qwen3 30B-A3B (Q4_K_M)

MoE Architecture
Computing…
Projected Decode—
Prompt Prefill—
Layers Fitted in VRAM—
KV Cache Footprint—

VRAM Allocation & Offload Split

VRAM Weights KV Cache (VRAM) Compute Scratch OS / Display Reserve

—

Context Cliff Curve (2k → 128k context tokens, decode tok/s)

Green = 100% VRAM · Cyan = Hybrid MoE · Amber = DDR Cliff · Red = OOM

Ready-to-Run Runtime Flags

llama-server -m ./model.gguf -ngl 32 -c 8192 --flash-attn
ollama run qwen3:30b-a3b
https://scorezenith.com/apps/gguf-webgpu-bench
Unlock 100% of Your Native GPU with Local Cockpit 0.4.0 Browser WebGPU sandboxes mask total physical VRAM and cap single storage buffers (typically 2–4 GiB). Local Cockpit 0.4.0 (native Rust desktop app for Windows & Linux) probes your real hardware, arbitrates across Ollama, LM Studio, and llama-server, runs real timed local benchmarks, and signs account-free Ed25519 passports on /apps/bench-validator.

Local LLM Memory Physics: GGUF Mixed Quantization, GQA KV-Cache & MoE Offload

Autoregressive token generation runs at batch size 1, making local LLM inference overwhelmingly memory-bandwidth bound: sustained tokens/s equals effective memory bandwidth divided by active bytes streamed per token.

1. Exact GQA KV-Cache Formula

With Grouped-Query Attention (n_head_kv < n_head), context memory scales linearly:

KV_bytes = 2 × n_layers × n_head_kv × head_dim × ctx_len × bytes_per_elem

Quantizing KV cache from FP16 (2.0 B) to Q8_0 (~1.06 B) nearly halves VRAM consumed at 32k–128k context, preventing layers from spilling onto PCIe/DDR RAM.

2. Why MoE Survives Partial Offload

Compare two ~18 GiB Q4_K_M checkpoints on a 12 GiB or 16 GiB GPU:

A Dense 32B checkpoint streams every spilled gigabyte from ~40 GB/s DDR RAM on every token (6 GiB spilled adds ~150 ms/tok). A MoE 30B-A3B model activates only 8 of 128 experts (~3.3B active parameters), reading ~85% fewer bytes from system RAM per token.

3. Inside Mixed GGUF Quantization

A Q4_K_M file is not uniform 4-bit storage:

llama.cpp promotes sensitive tensors (token_embd, output.weight, attn_v, boundary blocks) to Q6_K (6.56 bpw) while keeping bulk FFN matrices in Q4_K (4.50 bpw), yielding ~4.85 effective bits per weight — parsed directly by our Rust WASM tensor inspector.

GGUF Quantization Block Geometry Reference (ggml_type)

GGUF Type Block Elements Bytes / Block Effective Bits / Weight Typical Sweet Spot
IQ2_XS / Q2_K256 weights74 – 84 B2.31 – 2.63 bpwFitting 70B+ checkpoints on tight 24 GiB VRAM budgets
IQ4_XS256 weights136 B4.25 bpwSaves ~12% VRAM vs Q4_K_M to unlock longer context windows
Q4_K_M (mixed Q4_K + Q6_K)256 weights144 / 210 B~4.85 bpwDefault quality-per-gigabyte sweet spot for local inference
Q5_K_M / Q6_K256 weights176 / 210 B5.69 – 6.56 bpwCoding, math, and <=14B models where quantization loss is more visible
Q8_032 weights34 B8.50 bpwNear-lossless quality when VRAM headroom is plentiful
F16 / BF161 weight2 B16.00 bpwUncompressed reference weights (48–128 GiB+ workstations)