WIP: Sequential GPTQ with Groupwise Int6 — improved post-training quantization on SP4096 base#1664
Open
zoharb157 wants to merge 2 commits intoopenai:mainfrom
Open
Conversation
Improve post-training quantization on PR openai#1218 base (SP4096, MLP 4x, WD 0.085). Three changes: sequential cross-layer error propagation, groupwise int6 scales (group_size=128), and Hessian-weighted scale selection. Expected -0.004 to -0.008 dBPB with zero training-time cost. Made-with: Cursor
Three improvements to the post-training quantization pipeline on PR openai#1218: 1. Sequential cross-layer GPTQ: quantize layers one at a time, injecting quantized weights back before collecting later layers' Hessians. This propagates quantization error forward so later Hessians are accurate. 2. Groupwise int6 scales (group_size=128): per-group fp16 scales instead of per-row, giving finer control over weight variance within rows. 3. Hessian-weighted scale selection: minimize H_diag-weighted error instead of MSE when selecting per-row clip percentiles. Zero training-time cost. Expected -0.004 to -0.008 dBPB. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improve post-training quantization on PR #1218 base (SP4096, MLP 4×, WD 0.085, XSA-all, brotli). Three algorithmic improvements with zero training-time cost:
sum(H_diag * (W-Q)^2)instead of MSE when selecting per-row clip percentiles, directly optimizing output reconstruction quality.Implementation is complete (280 lines changed). Requesting compute credits for 3-seed validation on 8×H100.
Expected −0.004 to −0.008 dBPB improvement from recovering quantization damage (pre-quant→post-quant gap is 0.012 BPB in baseline).
Test plan
GPTQ_SEQUENTIAL=1 GPTQ_GROUP_SIZE=0)GPTQ_SEQUENTIAL=0 GPTQ_GROUP_SIZE=128)