Commit fb41f25
authored
[bugfix] saving model without model.name_or_path (#2061)
Summary:
the way models were saved assumed that model.name_or_path was populated
but this is not always the case. I think that if you generate a model
and then immediately quantize it, you'll run into this problem.
This PR relaxes this assumption so that the model can be saved.
TEST PLAN:
ran https://gist.github.com/HDCharles/78c55da388076aa046ee893edfbd9df5
previously you'd get:
huggingface_hub.errors.HFValidationError: Repo id must use alphanumeric
chars, '-', '_' or '.'. The name cannot start or end with '-' or '.' and
the maximum length is 96: ''.
now:
no error
---------
Signed-off-by: HDCharles <charlesdavidhernandez@gmail.com>1 parent db0b68d commit fb41f25
File tree
2 files changed
+7
-2
lines changed- src/llmcompressor
- pytorch/model_load
- transformers/utils
2 files changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
61 | 66 | | |
62 | 67 | | |
63 | 68 | | |
| |||
0 commit comments