Commit b91c063
committed
fix: accept **kwargs in Params4bit and Int8Params constructors
accelerate's set_module_tensor_to_device passes the old parameter's
__dict__ as **kwargs when reconstituting quantized parameters.
Transformers >= 5.x adds _is_hf_initialized to every parameter's
__dict__, but Params4bit.__new__ and Int8Params.__new__ had fixed
signatures — causing TypeError on any model loaded with
BitsAndBytesConfig + device_map="auto".
Add **kwargs to both constructors so unexpected attributes are silently
ignored instead of crashing.1 parent 925d83e commit b91c063
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| 225 | + | |
225 | 226 | | |
226 | 227 | | |
227 | 228 | | |
| |||
680 | 681 | | |
681 | 682 | | |
682 | 683 | | |
| 684 | + | |
683 | 685 | | |
684 | 686 | | |
685 | 687 | | |
| |||
0 commit comments