fix: exclude bitsandbytes from module purge to prevent duplicate operator registration
This commit is contained in:
parent
e3a1811c79
commit
9696bd557a
1 changed files with 4 additions and 1 deletions
|
|
@ -137,7 +137,10 @@ _PURGE_PREFIXES = (
|
|||
"trl",
|
||||
"accelerate",
|
||||
"auto_gptq",
|
||||
"bitsandbytes",
|
||||
# NOTE: bitsandbytes is intentionally EXCLUDED — it registers torch custom
|
||||
# operators at import time via torch.library.define(). Those registrations
|
||||
# live in torch's global operator registry which survives module purge.
|
||||
# Re-importing bitsandbytes after purge → duplicate registration → crash.
|
||||
# Our own modules that import from transformers at module level
|
||||
# (e.g. model_config.py: `from transformers import AutoConfig`)
|
||||
"utils.models",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue