Loading LoRA for causal language model
The argument trust_remote_code is to be used with Auto classes. It has no effect here and is ignored.
Loading checkpoint shards: 0%| | 0/2 [00:00<?, ?it/s]/home/jovyan/.local/lib/python3.10/site-packages/torch/_utils.py:776: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly. To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage()
return self.fget.get(instance, owner)()
Loading checkpoint shards: 100%|██████████████████| 2/2 [00:11<00:00, 5.50s/it]
Traceback (most recent call last):
File "/data/pe-task/ai_storage_base/chusiyi/my_train/MedicalGPT/merge_peft_adapter.py", line 109, in
main()
File "/data/pe-task/ai_storage_base/chusiyi/my_train/MedicalGPT/merge_peft_adapter.py", line 92, in main
new_model = PeftModel.from_pretrained(
File "/home/jovyan/.local/lib/python3.10/site-packages/peft/peft_model.py", line 352, in from_pretrained
model.load_adapter(model_id, adapter_name, is_trainable=is_trainable, **kwargs)
File "/home/jovyan/.local/lib/python3.10/site-packages/peft/peft_model.py", line 692, in load_adapter
load_result = set_peft_model_state_dict(self, adapters_weights, adapter_name=adapter_name)
File "/home/jovyan/.local/lib/python3.10/site-packages/peft/utils/save_and_load.py", line 201, in set_peft_model_state_dict
load_result = model.load_state_dict(peft_model_state_dict, strict=False)
File "/home/jovyan/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2041, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for PeftModelForCausalLM:
size mismatch for base_model.model.model.embed_tokens.modules_to_save.default.weight: copying a param with shape torch.Size([70840, 4096]) from checkpoint, the shape in current model is torch.Size([32000, 4096]).
size mismatch for base_model.model.lm_head.modules_to_save.default.weight: copying a param with shape torch.Size([70840, 4096]) from checkpoint, the shape in current model is torch.Size([32000, 4096]).
Loading LoRA for causal language model The argument
main()
File "/data/pe-task/ai_storage_base/chusiyi/my_train/MedicalGPT/merge_peft_adapter.py", line 92, in main
new_model = PeftModel.from_pretrained(
File "/home/jovyan/.local/lib/python3.10/site-packages/peft/peft_model.py", line 352, in from_pretrained
model.load_adapter(model_id, adapter_name, is_trainable=is_trainable, **kwargs)
File "/home/jovyan/.local/lib/python3.10/site-packages/peft/peft_model.py", line 692, in load_adapter
load_result = set_peft_model_state_dict(self, adapters_weights, adapter_name=adapter_name)
File "/home/jovyan/.local/lib/python3.10/site-packages/peft/utils/save_and_load.py", line 201, in set_peft_model_state_dict
load_result = model.load_state_dict(peft_model_state_dict, strict=False)
File "/home/jovyan/.local/lib/python3.10/site-packages/torch/nn/modules/module.py", line 2041, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for PeftModelForCausalLM:
size mismatch for base_model.model.model.embed_tokens.modules_to_save.default.weight: copying a param with shape torch.Size([70840, 4096]) from checkpoint, the shape in current model is torch.Size([32000, 4096]).
size mismatch for base_model.model.lm_head.modules_to_save.default.weight: copying a param with shape torch.Size([70840, 4096]) from checkpoint, the shape in current model is torch.Size([32000, 4096]).
trust_remote_code
is to be used with Auto classes. It has no effect here and is ignored. Loading checkpoint shards: 0%| | 0/2 [00:00<?, ?it/s]/home/jovyan/.local/lib/python3.10/site-packages/torch/_utils.py:776: UserWarning: TypedStorage is deprecated. It will be removed in the future and UntypedStorage will be the only storage class. This should only matter to you if you are using storages directly. To access UntypedStorage directly, use tensor.untyped_storage() instead of tensor.storage() return self.fget.get(instance, owner)() Loading checkpoint shards: 100%|██████████████████| 2/2 [00:11<00:00, 5.50s/it] Traceback (most recent call last): File "/data/pe-task/ai_storage_base/chusiyi/my_train/MedicalGPT/merge_peft_adapter.py", line 109, in