Closed SimonKitSangChu closed 1 year ago
On a similar track, loading EsmModel
in 8-bit experiences another error.
...
model = EsmForMaskedLM.from_pretrained(
model_name_or_path,
device_map='auto',
load_in_8bit=True,
)
...
File "python3.10/site-packages/bitsandbytes/nn/modules.py", line 344, in _save_to_state_dict
param_from_weight = getattr(self.weight, weight_name)
AttributeError: 'Parameter' object has no attribute 'SCB'
Hi, @SimonKitSangChu I met exactly the same problem. Have you managed to resolve it?
Not yet. Interestingly I didn't experience this in the example checkpoint bigscience/mt0-large
.
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.
Is this resolved?
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.
I'm also encountering this error. Has anyone found a solution?
Can anyone load 4bit LLM with lora to finetune? I met the same error, could please give solutions?
Same here!
hi there, do you still face the same error with the latest updates of all packages?
pip install -U peft transformers bitsandbytes
Can you also share a small reproducible snippet?
I was experiencing the same issue today and I believe the culprit it is:
model = model.cuda()
get rid of it and it works.
Note:get_peft_model
already returns the model on cuda. I have absolutely no idea why calling .cuda()
causes problems though.
hi there, do you still face the same error with the latest updates of all packages?
pip install -U peft transformers bitsandbytes
Can you also share a small reproducible snippet?
This helps me solve this problem, previous version: transformers: '4.38.2' peft: '0.9.0' bitsandbytes: '0.42.0' updated version: bitsandbytes-0.43.1 peft-0.10.0 tokenizers-0.19.1 transformers-4.40.1
I tried to apply 4-bit training on Lora for EsmModel. However, there has been an error specifically for 4-bit training. The error disappears perfectly once
load_in_4bit=True
is commented out.Code to reproduce error:
Error received:
Notice the weight matrix is not of the size
(640, 640)
. Commenting out 4-bit loading results in a weight of(640, 640)
shape.Package versions:
Let me know if you also need
bitsandbytes
version.