Prism/Shampoo-Prism Sweep Part 1: Hyperparameter search#2696
Open
leloykun wants to merge 3 commits intomarin-community:mainfrom
Open
Prism/Shampoo-Prism Sweep Part 1: Hyperparameter search#2696leloykun wants to merge 3 commits intomarin-community:mainfrom
leloykun wants to merge 3 commits intomarin-community:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds initial infrastructure for Prism/Shampoo-Prism hyperparameter sweeps by extending an optimizer utility to map across multiple PyTrees (flattening Linear layers consistently), adding a focused regression test, and introducing a new PrismH sweep experiment script for Qwen3 scaling runs.
Changes:
- Extend
map_flattened_linear_layersto accept additional PyTrees (*rest) and map over them after flattening Linear leaves. - Add a unit test ensuring additional PyTrees are flattened consistently when mapping.
- Add an experiment script to sweep PrismH hyperparameters (
gamma_L,gamma_R,bidirectional) for Qwen3 speedruns.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
lib/levanter/src/levanter/optim/util.py |
Generalizes map_flattened_linear_layers to support zipping/mapping over multiple parameter/update trees. |
lib/levanter/tests/test_optim_util.py |
Adds coverage for the new *rest flatten+map behavior. |
experiments/speedrun/prism_qwen3_scaling/prism_sweep_1_hp_sweep.py |
Introduces PrismH hyperparameter sweep experiment and a PrismH optimizer implementation used by the sweep. |
experiments/speedrun/prism_qwen3_scaling/prism_sweep_1_hp_sweep.py
Outdated
Show resolved
Hide resolved
Contributor
Author
|
test errors are all huggingface-related |
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.
Part 1 of #2695 , focusing on hyperparameter search
Vibecoding warning:
lib/levanter/tests/test_optim_util.pyis entirely vibecoded. More eyes may be needed there, but it seems to work pretty well.