Repository navigation
Commit 951dc36
committed
[model] fix: fall back to direct file copy when generation_config save fails
Some models (e.g. GLM-5) have a generation_config.json with fields that
newer transformers versions reject as invalid (e.g. top_p set without
do_sample=True). Instead of crashing the roundtrip, catch the ValueError
in save_artifacts and copy the original file directly to preserve it.
Signed-off-by: Yu Yao <yaoyu.094@gmail.com>
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>1 parent f03048a commit 951dc36
1 file changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
193 | 208 | | |
194 | 209 | | |
195 | 210 | | |
| |||
0 commit comments