Skip to content

[models] - fix: deprecated AdamW - #82

Merged
JulesBelveze merged 1 commit into
mainfrom
fix/deprecated-adamw
Jan 11, 2026
Merged

[models] - fix: deprecated AdamW#82
JulesBelveze merged 1 commit into
mainfrom
fix/deprecated-adamw

Conversation

@JulesBelveze

@JulesBelveze JulesBelveze commented Jan 11, 2026

Copy link
Copy Markdown
Owner

Description

Replaces deprecated transformers.AdamW with torch.optim.AdamW and standardizes optimizer parameter naming across the codebase. Renames weight_decay_rate to weight_decay to align with PyTorch conventions, extracts learning rate retrieval logic to reduce duplication, and standardizes lr_scheduler configuration dictionary formatting.

Risk

Low - backward-compatible changes that align with PyTorch standards. All optimizer configurations maintain the same behavior with updated parameter names.

Tests

Existing tests cover optimizer configurations.

… cleanup

- Unify the `weight_decay_rate` parameter name to `weight_decay` across various modules to align with PyTorch naming conventions
- Remove redundant AdamW import from transformers and replace with torch.optim.AdamW for consistency
- Optimize the retrieval of learning rate to reduce duplication in optimizer configurations
- Clean up lr_scheduler configurations in `configure_optimizers` methods to use consistent key naming
@JulesBelveze
JulesBelveze merged commit 309fca9 into main Jan 11, 2026
9 checks passed
@JulesBelveze
JulesBelveze deleted the fix/deprecated-adamw branch January 11, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant