mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #461] [CLOSED] EXL3 decode on V100 / T4 / RTX 20: the trellis windows cut eight at a time - bit-exact, decode +11-17% on a V100 #538
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#538
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/461
Author: @merbanan
Created: 10/24/2026
Status: ❌ Closed
Base:
main← Head:pr/exl3-legacy-windows📝 Commits (1)
7ebcf80EXL3 decode on Volta / Turing (exl3_legacy.cu): a lane's 8 trellis windows cut together with funnel shifts, as exl3.cu's frag8 - the same values, the expert kernels ~25 % faster on a V100📊 Changes
1 file changed (+79 additions, -17 deletions)
View changed files
📝
src/kernels/cuda/exl3_legacy.cu(+79 -17)📄 Description
What
NVIDIA GPUs before sm_80 decode EXL3 with v1.1.8's kernels (
exl3_legacy.cu). Itsdecode8cut every trellis step's 16-bit window on its own: two shared-memory words, a modulo index and a 64-bit shift per step. That was most of the ~10 instructions per weight; only one of them is the multiply-add.A lane's 8 consecutive steps lie within one or two words. This PR cuts them together with funnel shifts, exactly as
exl3.cu'sfrag8already does on the newer kernels (exllamav3's grouping per K,exl3_dq.cuh), and covers both integer and half-integer K.decode8changes. The kernels around it, the reduction order and every other path are untouched.src/kernels/cuda/exl3_legacy.cu. HIP doesn't build that file (tools/check_hip_compat.pypasses).Exactness
Deterministic runs (CPU lane off,
MAYA_GLM_RAM_GB=50) with turboderp's EXL3 2.05bpw quant: 2K and 8K fresh prompts, 256 greedy tokens. The tokens were identical to v1.1.26's at both lengths. The as-served runs with the CPU lane on also produced the same text at 8K and 27K.Speed
Measured on a Tesla V100-PCIE-32GB at 250 W with a Ryzen 9 7950X, EXL3 2.05bpw, against v1.1.26.
Expert and dense kernels during decode (nvprof, 2K prompt + 256 tokens):
moe_gate_up_kernel<4, 2>moe_down_kernel<4, 2>mv_kernel<8, 2>(the dense matrices)Decode as served (the default CPU lane, 3 alternating rounds, fresh prompts + 256 greedy tokens, tok/s):
Every round with the change was faster than every round without it. Prompt speed is unchanged, since the prompt path uses
exl3.cu's kernels.Only the 2-bit quant (K2 = 4, codebook mul1) was run here. The other K take
frag8's existing code for their K, unchanged. Not run on a T4 or an RTX 20 card, which take the same path.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.