Commit 658952d
Add dict_class to save_pretrained config for local model loading
save_pretrained now includes the model class name in config.json,
enabling load_dictionary_model to determine the correct class when
loading from a local save_pretrained directory. _from_pretrained
strips dict_class before instantiation to avoid __init__ TypeError.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent c2617ad commit 658952d
1 file changed
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
165 | 176 | | |
166 | 177 | | |
167 | 178 | | |
| |||
0 commit comments