mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #264] [MERGED] EXL3 tests against exllamav3 itself: its packer's tiles and a model's matrices - every decoder the same bits #435
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#435
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/mw00/project-maya/pull/264
Author: @sociolog
Created: 10/18/2026
Status: ✅ Merged
Merged: 10/20/2026
Merged by: @mw00
Base:
main← Head:exl3-exllamav3-tests📝 Commits (1)
f6d998fEXL3 tests against exllamav3 itself: its packer's tiles and a model's matrices - every decoder the same bits📊 Changes
16 files changed (+664 additions, -16 deletions)
View changed files
📝
CMakeLists.txt(+3 -0)➕
data/exl3-exllamav3/exl3_k2_10_cb2.bin(+0 -0)➕
data/exl3-exllamav3/exl3_k2_12_cb2.bin(+0 -0)➕
data/exl3-exllamav3/exl3_k2_14_cb2.bin(+0 -0)➕
data/exl3-exllamav3/exl3_k2_16_cb2.bin(+0 -0)➕
data/exl3-exllamav3/exl3_k2_2_cb2.bin(+0 -0)➕
data/exl3-exllamav3/exl3_k2_4_cb2.bin(+0 -0)➕
data/exl3-exllamav3/exl3_k2_6_cb0.bin(+0 -0)➕
data/exl3-exllamav3/exl3_k2_6_cb1.bin(+0 -0)➕
data/exl3-exllamav3/exl3_k2_6_cb2.bin(+0 -0)➕
data/exl3-exllamav3/exl3_k2_8_cb2.bin(+0 -0)📝
include/strata/kernels/cpu/exl3_ref.hpp(+3 -0)📝
src/kernels/cpu/exl3_ref.cpp(+14 -7)📝
tests/exl3_test.cu(+391 -9)➕
tools/exl3_exllamav3_fixture.py(+177 -0)➕
tools/test_exl3_exllamav3.py(+76 -0)📄 Description
What
The EXL3 decoders - the CPU reference (
exl3_ref.cpp), the device kernels, the CPU lane's arithmetic andtools/exl3_pack.py's numpy decoder behind--check- are tested against each other (exl3_test), so a mistake theyshare would pass. This holds them to exllamav3's own output, bit for bit:
tools/exl3_exllamav3_fixture.pyruns in an exllamav3 environment on a CUDA device. Random 16-bit trellis statespacked by exllamav3's
pack_trellis, then each step's state as itsunpack_trellisreads it and W' as itsreconstructdecodes it (exllamav3's ownpack(unpack(words)) == wordsis checked first).--modelwrites a model'smatrices as stored, with exllamav3's W' and its
reconstruct_had_slice's W.data/exl3-exllamav3/: exllamav3 1.6.2's fixtures for K 1..8 with mul1 and K 3 with 3inst and mcg (2 x 8 tileseach, 10 files, 208 KB).
tools/test_exl3_exllamav3.py(so the CI's tools tests check it, no GPU):exl3_pack's states and W' against them.exl3_test --exllamav3 <dir>(ctestexl3_exllamav3): the CPU reference's states (exl3_tile_states, new -exl3_innernow decodes through it, same results) and W', the bit-by-bit window of the exact model the CPU tiers aretested against, the device's W' in both layouts (
reconstruct_inner,reconstruct_inner_rows), and every CPU tierthis machine runs against that model on exllamav3's tiles.
exl3_test --expect <dir>: the same on a model's matrices (the tool's--modelfiles; not a ctest - it needs themodel), plus the full weight (
reconstruct_rows) against the exact W = diag(suh) H W' H diag(svh) computed in F64,and the CPU lane's product against the reference's.
No engine code changes (one function split out of
exl3_inner).Results
RTX 3060 (sm_86) and a Ryzen 9 5900X (AVX2), exllamav3 1.6.2 + torch 2.9:
exl3_pack's decoder; the device's W' 0 of 16,384 in both layouts; the AVX2 tier bit for bit the model.sc_3.10bpw, 12 matrices - routed experts of layers 3, 10 and 44 and of the MTP block(K 3 / 4), the shared expert,
o_proj,eh_proj,q_aandkv_a(K 4 / 6): W' 0 differences in 2-34 M weightseach, from the CPU reference and the device in both layouts; the AVX2 tier bit for bit its model.
transforms and one of the result; worst 5.3e-4 of the largest weight); exllamav3's fused
reconstruct_had_slice9.3e-4 from it (its FP16 intermediates, worst 1.4e-3) - so the two agree to ~1e-3 and no tighter, and the check is
against the exact weight instead.
exl3_testas before (142 ok, the same numbers to the last digit); the tools tests (272) andtools/check_hip_compat.pypass.The tool also takes exllamav3 1.6's half-integer bitrates once the engine does (a follow-up PR).
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.