Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can someone help me understand input_name == "SCB" & self.weight.SCB #411

Closed
getorca opened this issue May 18, 2023 · 2 comments
Closed

Comments

@getorca
Copy link

getorca commented May 18, 2023

Looking at the chunk of code

for key in unexpected_keys:
I'm having trouble understanding what this chunk of code does and what SCB refers to.

My 8bit PEFT LoRA training code seems to throw this as soon as it tries to save the steps, at least using the following:

transformers                  4.29.1
bitsandbytes                  0.38.1
peft                          0.3.0

Full traceback

████████████████████████████████████████████████████████████████████████| 200/200 [1:20:46<00:00, 21.49s/itTraceback (most recent call last):                                                                                                                                                                                                                                                      
  File "/home/llmadmin/lawrence/autoWSB/lora_train.py", line 188, in <module>
    train()
  File "/home/llmadmin/lawrence/autoWSB/lora_train.py", line 171, in train
    trainer.train()
  File "/home/llmadmin/anaconda3/envs/trainer/lib/python3.10/site-packages/transformers/trainer.py", line 1664, in train
    return inner_training_loop(
  File "/home/llmadmin/anaconda3/envs/trainer/lib/python3.10/site-packages/transformers/trainer.py", line 2062, in _inner_training_loop
    self._load_best_model()
  File "/home/llmadmin/anaconda3/envs/trainer/lib/python3.10/site-packages/transformers/trainer.py", line 2238, in _load_best_model
    load_result = model.load_state_dict(state_dict, False)
  File "/home/llmadmin/anaconda3/envs/trainer/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2027, in load_state_dict
    load(self, state_dict)
  File "/home/llmadmin/anaconda3/envs/trainer/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2015, in load
    load(child, child_state_dict, child_prefix)
  File "/home/llmadmin/anaconda3/envs/trainer/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2015, in load
    load(child, child_state_dict, child_prefix)
  File "/home/llmadmin/anaconda3/envs/trainer/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2015, in load
    load(child, child_state_dict, child_prefix)
  [Previous line repeated 4 more times]
  File "/home/llmadmin/anaconda3/envs/trainer/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2009, in load
    module._load_from_state_dict(
  File "/home/llmadmin/anaconda3/envs/trainer/lib/python3.10/site-packages/bitsandbytes-0.38.1-py3.10.egg/bitsandbytes/nn/modules.py", line 298, in _load_from_state_dict
Traceback (most recent call last):
  File "/home/llmadmin/lawrence/autoWSB/lora_train.py", line 188, in <module>
    raise RuntimeError("Loading a quantized checkpoint into non-quantized Linear8bitLt is "
RuntimeError: Loading a quantized checkpoint into non-quantized Linear8bitLt is not supported. Please call module.cuda() before module.load_state_dict()

I can confirm the issue doesn't arise when using older repos.

bitsandbytes             0.37.2
transformers             4.28.1
peft                     0.3.0.dev0
Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

@tanyav2
Copy link

tanyav2 commented Jan 10, 2024

#960 I have a similar issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants