schedule free adamw jax update with switching params to x for validation, y for training#16
Open
wyfEmma wants to merge 4 commits intomlcommons:mainfrom
Open
schedule free adamw jax update with switching params to x for validation, y for training#16wyfEmma wants to merge 4 commits intomlcommons:mainfrom
wyfEmma wants to merge 4 commits intomlcommons:mainfrom
Conversation
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
| (state, _), opt_update_fn = optimizer_state | ||
|
|
||
| # Calculate x = (y - (1 - b1) * z) / b1 | ||
| params_for_eval = schedule_free_eval_params(state, current_param_container) # (current_param_container - (1 - state.b1) * state.z) / state.b1 |
Contributor
There was a problem hiding this comment.
Where is this implemented?
Author
There was a problem hiding this comment.
this is implemented in the optax library for schedule free algorithm,
def schedule_free_eval_params(state: ScheduleFreeState, params: base.Params):
"""Params for evaluation of :func:optax.contrib.schedule_free."""
return jax.tree_util.tree_map(
lambda yi, zi: (yi - (1.0 - state.b1) * zi) / state.b1, params, state.z
)
| lambda x_leaf, z_leaf: (1 - beta1) * z_leaf + beta1 * x_leaf, | ||
| current_param_container, # x | ||
| z | ||
| ) |
Contributor
There was a problem hiding this comment.
should we set this back to False after updating?
wyfEmma
commented
Feb 18, 2026
| z | ||
| ) | ||
|
|
||
| # Set up mesh and sharding |
Author
There was a problem hiding this comment.
move 190-219 out of this function
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.
New Submission
Submission Information
Please fill out the following information about your submission within the quotation marks.
Evidence for the Submission's Performance
If possible provide some evidence of your submission's performance. E.g. a link to a paper/pre-print, training logs, screenshots, etc. The working group will prioritize evaluating submissions with more convincing evidence.
Comments
Feel free to add any comments, descriptions, or questions here.