mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #49] [CLOSED] GLM pack: STRATA_GLM_DENSE_QUANT=q5_k|q4_k requantizes the dense rows at load (per GPU, from a layer on) #302
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#302
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/49
Author: @sociolog
Created: 10/9/2026
Status: ❌ Closed
Base:
main← Head:pr5-dense-quant📝 Commits (2)
83383c3GLM pack: STRATA_GLM_DENSE_QUANT=q5_k|q4_k requantizes the dense rows at load (per GPU, from a layer on)0afd555README: the Tuning table's row for STRATA_GLM_DENSE_QUANT📊 Changes
2 files changed (+110 additions, -28 deletions)
View changed files
📝
README.md(+1 -0)📝
src/core/glm_model.cu(+109 -28)📄 Description
What
The natively served dense rows of a higher-precision type (Q6_K, Q8_0) - KDA q/k/v, attention output, shared experts,
dense FFN, MLA q/kv; not the output head, not the NextN block - are dequantized with ggml's traits and quantized to
the target with
ggml_quantize_chunkat load (rows split across the cores, ~20 s). The files are untouched.STRATA_GLM_DENSE_QUANT=q5_k|q4_k(all GPUs),STRATA_GLM_DENSE_QUANT<n>(one GPU's own,0= off),STRATA_GLM_DENSE_QUANT_FROM=<layer>(only from that layer on),STRATA_GLM_DENSE_QUANT_KINDS(theSTRATA_GLM_TIMINGkind names). README row added.Rebased onto v1.0.23: #44 moved the dense rows' VRAM sizing into
pack_row_vram, so the requant now lives there too(
dense_requant_to, onedense_kind_of), and--layer-split auto's pricing counts the requantized sizes (the all-GPUsetting; a per-GPU
STRATA_GLM_DENSE_QUANT<n>is not known before the placement).Measured (RTX 3090 + 3060 split, Maya-M, 131072 context; KL by score mode, pool and CPU plan pinned, 3,935 tokens)
The early layers carry nearly all of the quality cost; the late layers' dense weights requantize almost for free.
Checks: on v1.0.21 (whose CUDA sources are those of v1.0.23): build (sm_75, sm_86);
glm_dsa_parity,glm_ffn_parity,glm_hc_parity,glm_kda_parity,glm_layer_parity--selftest: all PASS; the--benchrequest sequence on the real model (RTX 3090 + 3060 split): runs clean. On v1.0.23, as CI runs them:tools/check_hip_compat.pypasses (no new CUDA names); server tests OK (3 skipped); tools tests: the one error istest_iq_packneeding the llama.cpp clone (third_party/), the same on plain v1.0.23.The code, the measurements and this description were produced with the help of Claude, an AI assistant by Anthropic.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.