Commit 91f0cef
Add LARS to str2optimizer32bit dictionary (#1855)
* Add LARS to str2optimizer32bit dictionary
LARS optimizer was missing from str2optimizer32bit, causing KeyError
when using LARS32bit optimizer. LARS uses momentum-based kernels since
it's essentially SGD with momentum plus layerwise adaptive learning rates.
Fixes #1810
* Fix 32-bit error message and add LARS test coverage
Fix the error message in _optimizer_update_32bit_impl that incorrectly
displayed str2optimizer8bit_blockwise keys instead of str2optimizer32bit
keys. Add LARS to the parametrized 32-bit optimizer tests using
PytorchLARS as the reference implementation, with bf16 skip since
momentum kernels lack a bf16 variant.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Tim Dettmers <tim.dettmers@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 577e7b5 commit 91f0cef
2 files changed
+13
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
581 | 585 | | |
582 | 586 | | |
583 | 587 | | |
| |||
637 | 641 | | |
638 | 642 | | |
639 | 643 | | |
640 | | - | |
| 644 | + | |
641 | 645 | | |
642 | 646 | | |
643 | 647 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
105 | 110 | | |
106 | 111 | | |
107 | 112 | | |
| |||
118 | 123 | | |
119 | 124 | | |
120 | 125 | | |
| 126 | + | |
121 | 127 | | |
122 | 128 | | |
123 | 129 | | |
| |||
155 | 161 | | |
156 | 162 | | |
157 | 163 | | |
| 164 | + | |
158 | 165 | | |
159 | 166 | | |
160 | 167 | | |
| |||
181 | 188 | | |
182 | 189 | | |
183 | 190 | | |
184 | | - | |
| 191 | + | |
185 | 192 | | |
186 | 193 | | |
187 | 194 | | |
| |||
0 commit comments