Repository navigation
Port ExLlamaV3 native half-bit EXL3 (2.5/3.5, etc) - #5619
Conversation
Carry exact per-projection rates through configuration, Viterbi encoding, packed checkpoint metadata, and native and Torch inference. Snapshot the caller kernel policy in EXL3 modules.
Llama 3.2 1B Instruct W3.5 end-to-end resultsI quantized the full model on an A100 at
Both arms received identical tokenized inputs. WikiText used 2,048-token contexts and a 1,024-token stride. GSM8K used seed 1618, greedy generation, and a 256-token cap. The paired 95% interval for the GSM8K change was −9.38 to +2.34 points. On the same saved W3.5 checkpoint, native CUDA and the portable Torch reference differed by 0.071% in perplexity on a 2,048-token probe. All eight checked single-token decode choices agreed. Regression coverageThe full pytest integration passed on one A100 in 10m 31s. It reproduced both quality scores in the table, verified all 112 packed projections after reload, and passed the same-weight Torch comparison for prefill loss and cached decode logits. All 43 focused tests passed in the regular run. The W3.5 tiny Llama round-trip also failed on current Select the full test with |
Summary
Port the ExLlamaV3 1.6.7 CUDA kernel and packed-format updates from upstream
8c593e4.What Changed
mul11.5, 2.5, and 3.5 bpw tiles through quantization, checkpoint save/reload, CUDA inference, and the portable Torch decoder. Integer rates support3inst,mcg, andmul1.EXL3CUDAConfig. Half-bit checkpoints use the native fused path.Tests
git diff --check.The integrated A100 suite passed 148 tests. After the config-base rebase, 15 focused native tests passed and the CPU suite passed 243 with 52 hardware or optional skips. The final base update changed two smoother test files. Their targeted run passed all 63 tests on the pushed head. The integer default matched all 20 logits tensors on a real W3
mcgLlama 3.2 1B checkpoint. The W2.5 model passed quantization, safetensors save, and native reload. The routed port matched upstream bit-for-bit at W2.5, W3, and W4 for 1, 6, 12, and 24 rows.Model Support and Logic Flow
The real-model checks use the existing Llama 3.2 definition. Dispatch and scratch ownership are illustrated in native decode and routed decode. Packed weight lifecycle and compatibility
Kernel Accuracy and Performance
On an A100, W3 gate+up at one row went from 73.67 µs to 31.35 µs with FP16 GEMV, 28.50 µs with residual INT8, and 26.40 µs with plain INT8. The fast modes are explicit because QTIP's short FP16 accumulations overflowed on deliberately extreme activations. Both GEMM paths stayed finite in that fixture. Measured limits and dispatch policy