mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #141] [MERGED] EXL3 with the DFlash2 drafter: garbled answers, the 1-2 GPU window, a re-asked prompt's drafts #358
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#358
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/141
Author: @needmorevram
Created: 10/12/2026
Status: ✅ Merged
Merged: 10/12/2026
Merged by: @mw00
Base:
main← Head:exl3-dflash2📝 Commits (1)
a0ed975EXL3 with the DFlash2 drafter: garbled answers, the 1-2 GPU window, a re-asked prompt's drafts📊 Changes
4 files changed (+108 additions, -57 deletions)
View changed files
📝
include/strata/core/glm_dflash.hpp(+3 -2)📝
src/core/glm_dflash.cu(+11 -5)📝
src/core/glm_fast_path.cu(+6 -3)📝
src/core/glm_window.cu(+88 -47)📄 Description
Summary
The EXL3 quant with the DFlash2 drafter answered with noise ("Let Letj{{_{ #{ ... !!!!!!!!"), while the same model with its MTP block was fine. Three fixes, all in the DFlash2 / verify-window code:
iq_row_bytes, which returns 0 for BF16. EXL3'stoken_embdis BF16, so every window token after the prompt read row 0 of the table: the answer turned to noise and almost no draft was accepted (9 GPUs: 0.1%). The row size now comes fromggml_row_size, as on the token path (glm_model.hppalready notes the same trap there). GGUF packs were not affected: theirtoken_embdis a typeiq_row_bytesknows.q_b(null in an EXL3 pack) and sent the routed experts tomoe_win_experts, which has no EXL3 kernel. It now takesidx_q_b_x, gives the EXL3 GEMVs the F32 inputs the token path gives them, runs each token's routed experts on the EXL3 kernels with its own plan (the batched and the token-by-token window alike), and sends an EXL3 layer's CPU-lane routes to the window lanes a token at a time (win_cpu_mergedhas the native kernels only).snapshot_restore), the drafter's ring still holds the old continuation's positions, andinject()skips any position whose slot already holds it - so the new answer was drafted from the previous one (2.7% accepted, 26 tok/s on 9 GPUs).GlmDflash::reset(from)now forgets the positions from the rollback on.Tests
Window exactness (
glm_pack_test,GLM_TEST_WINDOW=4, 256 tokens of real text, the drafter loaded, CPU plan pinned): window picks vs token-at-a-time decode, 413 of 413 on the RTX 3090 alone and 413 of 413 on the 3090 + one 5060 Ti (the two-part batched window with both parts' CPU pools).Server, EXL3 3.05bpw, same build, decode tok/s from the engine's
glm statlines - a warm-up pass discarded, the mean of two more (they agree within ~3%), drafts accepted in brackets. Prompts: a code answer (512 tokens), the same prompt again at once, an explanation, a short story, and a summary of a 10,941-token document (384 tokens).9 GPUs (RTX 3090 + 8x RTX 5060 Ti):
Before this PR, the 9-GPU DFlash2 server ran at ~26.7 tok/s with 0.1% of drafts accepted, and its answers were noise.
2 GPUs (RTX 3090 + RTX 5060 Ti):
Notes
e5693c0) keeps the drafter only where it is faster, so a 2-GPU EXL3 setup should end up on MTP until then. I'll fix the 2-GPU DFlash2 decode speed in a future PR (a CPU-lane scratch per window lane, an EXL3 merged window pass); this PR is the correctness fix.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.