Non-record: QAT ablation — int8 QAT overhead exceeds quantization gap recovery#145
Open
mrdavtan wants to merge 2 commits intoopenai:mainfrom
Open
Non-record: QAT ablation — int8 QAT overhead exceeds quantization gap recovery#145mrdavtan wants to merge 2 commits intoopenai:mainfrom
mrdavtan wants to merge 2 commits intoopenai:mainfrom
Conversation
Clean ablation of per-row int8 QAT with exact INT8_CLIP_Q percentile match on baseline 9L×512d architecture. Finding: torch.quantile adds ~20% step overhead, costing ~2000 training steps in the 600s budget. The lost training tokens hurt more than the ~0.007 BPB quantization gap recovery helps. QAT likely only pays off with int6 (larger gap) or a faster approximate quantile. Includes graph priming finding for torch.compile conditional code paths.
5 tasks
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
Clean ablation of per-row int8 quantization-aware training (QAT) on the baseline 9L×512d architecture with default hyperparameters. Finding: the overhead costs more than it recovers.
quantize_float_tensorexactly (sameINT8_CLIP_Q = 0.9999984percentile, same per-row scale)torch.quantileadds ~20% per-step overhead (64ms → 77ms), costing ~2,000 training steps in the 600s budgetKey takeaways for other participants
torch.compilegraph priming pitfall: pre-compiling both QAT and non-QAT graphs during warmup causes the compiler to use a slower path for the non-QAT forward pass. Don't do this — accept the one-time recompile instead.Results
Test plan
Built with Claude Code