[WIP] Add mixed precision gradient collection#189
Open
luciaquirke wants to merge 2 commits intomainfrom
Open
Conversation
luciaquirke
commented
Mar 11, 2026
luciaquirke
commented
Mar 11, 2026
luciaquirke
commented
Mar 11, 2026
luciaquirke
commented
Mar 11, 2026
Contributor
|
Generally, will mixed precision be adjustable in the config or not? |
luciaquirke
commented
Mar 11, 2026
Collaborator
Author
I think we will not let it be adjustable for now. The attribution accuracy should be all upside because we are more closely matching bf16/fp16 training (pure bf16 or fp16 training is a thing but it's vanishingly rare). The downside is that fitting normalizers and preconditioners will presumably use more VRAM/wall clock time. I think I'm comfortable with this because we can get a good fit for these values in ~10k data points. |
fc0c829 to
380e6fb
Compare
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.
Coreset regression testing (last regression: #178)
Full dataset, 8 GPUs (really around 4762 items):
[maybe needs redoing for ebs]
Run: SmolLM2-1.7B-Instruct-magpie-ultra-v0.1-trackstar-n=10000-s=42
Filter: trackstar
Num training examples: 10000
Final eval loss: 0.6909899711608887
Random, 8 GPUs (1k, effective batch size = 32):
Run: SmolLM2-1.7B-Instruct-magpie-ultra-v0.1-random-n=1000-s=42
Filter: random
Num training examples: 1000
Final eval loss: 0.8014830350875854
Attribution, 8 GPUs (1k, effective batch size = 32):
Run: SmolLM2-1.7B-Instruct-magpie-ultra-v0.1-attribution-n=1000-s=42
Filter: attribution
Num training examples: 1000
Final eval loss: 0.7693212628364563
FP32 TrackStar, 8 GPUs (1k):
Run: SmolLM2-1.7B-Instruct-magpie-ultra-v0.1-trackstar-n=1000-s=42
Filter: trackstar
Num training examples: 1000
Final eval loss: 0.7991439700126648
BF16 TrackStar, 8 GPUs (1k):
Run: SmolLM2-1.7B-Instruct-magpie-ultra-v0.1-trackstar-n=1000-s=42
Filter: trackstar
Num training examples: 1000
Final eval loss: 0.7762771844863892
The training loss drop on this dataset sucks because the model has already undergone IFT so I did a second round using Qwen + LoRA + a dataset Qwen's bad at:
Results
Full dataset
Random
Attribution
TrackStar FP32
TrackStar BF16
TODO