zjukg / KoPA

[Paper][ACM MM 2024] Making Large Language Models Perform Better in Knowledge Graph Completion
MIT License
145 stars 8 forks source link

这篇工作很棒,但是我在复现过程中出现了这个问题是因为1024和512不匹配吗(报错中加粗的部分) #6

Closed YeRookie closed 11 months ago

YeRookie commented 1 year ago

Training Alpaca-LoRA model with params: base_model: /data2/yuhang/huggingface/hub/models--alpaca-7b data_path: data/UMLS-train.json output_dir: /data2/junhong/proj/LLM-KGC/KoPA-main/model/kopa-finetune batch_size: 12 micro_batch_size: 12 num_epochs: 3 learning_rate: 0.0003 cutoff_len: 512 val_set_size: 0 lora_r: 32 num_prefix: 1 lora_alpha: 16 lora_dropout: 0.05 lora_target_modules: ['q_proj', 'k_proj', 'v_proj', 'o_proj'] train_on_inputs: True add_eos_token: False group_by_length: False wandb_project: wandb_run_name: wandb_watch: wandb_log_model: resume_from_checkpoint: False prompt template: alpaca kge model: data/UMLS-rotate.pth

Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:25<00:00, 8.52s/it] You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama.LlamaTokenizer'>. This is expected, and simply means that the legacy (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set legacy=False. This should only be set if you understand what it means, and thouroughly read the reason why this was added as explained in https://github.com/huggingface/transformers/pull/24565 1024 512 Adapter Trained From Scratch Map: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 15648/15648 [00:10<00:00, 1520.20 examples/s] Using the WANDB_DISABLED environment variable is deprecated and will be removed in v5. Use the --report_to flag to control the integrations used for logging result (for instance --report_to none). 0%| | 0/1956 [00:00<?, ?it/s] Traceback (most recent call last): File "/data2/junhong/proj/LLM-KGC/KoPA-main/finetune_kopa.py", line 282, in fire.Fire(train) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/fire/core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/fire/core.py", line 475, in _Fire component, remaining_args = _CallAndUpdateTrace( File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace component = fn(varargs, kwargs) File "/data2/junhong/proj/LLM-KGC/KoPA-main/finetune_kopa.py", line 271, in train trainer.train(resume_from_checkpoint=resume_from_checkpoint) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/trainer.py", line 1591, in train return inner_training_loop( File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/trainer.py", line 1892, in _inner_training_loop tr_loss_step = self.training_step(model, inputs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/trainer.py", line 2776, in training_step loss = self.compute_loss(model, inputs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/trainer.py", line 2801, in compute_loss outputs = model(inputs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/parallel/data_parallel.py", line 185, in forward outputs = self.parallel_apply(replicas, inputs, module_kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/parallel/data_parallel.py", line 200, in parallel_apply return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)]) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/parallel/parallel_apply.py", line 110, in parallel_apply output.reraise() File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/_utils.py", line 694, in reraise raise exception RuntimeError: Caught RuntimeError in replica 0 on device 0. Original Traceback (most recent call last): File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/parallel/parallel_apply.py", line 85, in _worker output = module(input, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) File "/data2/junhong/proj/LLM-KGC/KoPA-main/kopa.py", line 106, in forward return forward_call(args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/peft/peft_model.py", line 918, in forward return self.base_model( File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/peft/tuners/tuners_utils.py", line 94, in forward return self.model.forward(args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward output = old_forward(*args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 1038, in forward outputs = self.model( File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 925, in forward layer_outputs = decoder_layer( File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward output = old_forward(args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 635, in forward hidden_states, self_attn_weights, present_key_value = self.self_attn( File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward output = old_forward(args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 349, in forward query_states = self.q_proj(hidden_states) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(args, **kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/peft/tuners/lora.py", line 902, in forward result = F.linear(x, transpose(self.weight, self.fan_in_fan_out), bias=self.bias) RuntimeError: expected mat1 and mat2 to have the same dtype, but got: float != c10::Half

0%| | 0/1956 [00:05<?, ?it/s]

Zhang-Each commented 1 year ago

你好,日志里的1024和512的维度是KG Embedding的维度,从最后一行报错来看,应该是张量的数据类型dtype不匹配,与KGEmbedding的维度没有关系。你可以再检查一下

Log4J-Ops commented 11 months ago

Training Alpaca-LoRA model with params: base_model: /data2/yuhang/huggingface/hub/models--alpaca-7b data_path: data/UMLS-train.json output_dir: /data2/junhong/proj/LLM-KGC/KoPA-main/model/kopa-finetune batch_size: 12 micro_batch_size: 12 num_epochs: 3 learning_rate: 0.0003 cutoff_len: 512 val_set_size: 0 lora_r: 32 num_prefix: 1 lora_alpha: 16 lora_dropout: 0.05 lora_target_modules: ['q_proj', 'k_proj', 'v_proj', 'o_proj'] train_on_inputs: True add_eos_token: False group_by_length: False wandb_project: wandb_run_name: wandb_watch: wandb_log_model: resume_from_checkpoint: False prompt template: alpaca kge model: data/UMLS-rotate.pth

Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:25<00:00, 8.52s/it] You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama.LlamaTokenizer'>. This is expected, and simply means that the legacy (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set legacy=False. This should only be set if you understand what it means, and thouroughly read the reason why this was added as explained in huggingface/transformers#24565 1024 512 Adapter Trained From Scratch Map: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 15648/15648 [00:10<00:00, 1520.20 examples/s] Using the WANDB_DISABLED environment variable is deprecated and will be removed in v5. Use the --report_to flag to control the integrations used for logging result (for instance --report_to none). 0%| | 0/1956 [00:00<?, ?it/s] Traceback (most recent call last): File "/data2/junhong/proj/LLM-KGC/KoPA-main/finetune_kopa.py", line 282, in fire.Fire(train) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/fire/core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/fire/core.py", line 475, in _Fire component, remaining_args = _CallAndUpdateTrace( File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace component = fn(varargs, kwargs) File "/data2/junhong/proj/LLM-KGC/KoPA-main/finetune_kopa.py", line 271, in train trainer.train(resume_from_checkpoint=resume_from_checkpoint) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/trainer.py", line 1591, in train return inner_training_loop( File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/trainer.py", line 1892, in _inner_training_loop tr_loss_step = self.training_step(model, inputs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/trainer.py", line 2776, in training_step loss = self.compute_loss(model, inputs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/trainer.py", line 2801, in compute_loss outputs = model(inputs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/parallel/data_parallel.py", line 185, in forward outputs = self.parallel_apply(replicas, inputs, module_kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/parallel/data_parallel.py", line 200, in parallel_apply return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)]) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/parallel/parallel_apply.py", line 110, in parallel_apply output.reraise() File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/_utils.py", line 694, in reraise raise exception RuntimeError: Caught RuntimeError in replica 0 on device 0. Original Traceback (most recent call last): File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/parallel/parallel_apply.py", line 85, in _worker output = module(input, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) File "/data2/junhong/proj/LLM-KGC/KoPA-main/kopa.py", line 106, in forward return forward_call(args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/peft/peft_model.py", line 918, in forward return self.base_model( File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/peft/tuners/tuners_utils.py", line 94, in forward return self.model.forward(args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward output = old_forward(*args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 1038, in forward outputs = self.model( File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 925, in forward layer_outputs = decoder_layer( File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward output = old_forward(args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 635, in forward hidden_states, self_attn_weights, present_key_value = self.self_attn( File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward output = old_forward(args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 349, in forward query_states = self.q_proj(hidden_states) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(args, **kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/peft/tuners/lora.py", line 902, in forward result = F.linear(x, transpose(self.weight, self.fan_in_fan_out), bias=self.bias) RuntimeError: expected mat1 and mat2 to have the same dtype, but got: float != c10::Half

0%| | 0/1956 [00:05<?, ?it/s]

Hello, I encountered the same problem. How did you solve it in the end?

Log4J-Ops commented 11 months ago

Training Alpaca-LoRA model with params: base_model: /data2/yuhang/huggingface/hub/models--alpaca-7b data_path: data/UMLS-train.json output_dir: /data2/junhong/proj/LLM-KGC/KoPA-main/model/kopa-finetune batch_size: 12 micro_batch_size: 12 num_epochs: 3 learning_rate: 0.0003 cutoff_len: 512 val_set_size: 0 lora_r: 32 num_prefix: 1 lora_alpha: 16 lora_dropout: 0.05 lora_target_modules: ['q_proj', 'k_proj', 'v_proj', 'o_proj'] train_on_inputs: True add_eos_token: False group_by_length: False wandb_project: wandb_run_name: wandb_watch: wandb_log_model: resume_from_checkpoint: False prompt template: alpaca kge model: data/UMLS-rotate.pth

Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:25<00:00, 8.52s/it] You are using the default legacy behaviour of the <class 'transformers.models.llama.tokenization_llama.LlamaTokenizer'>. This is expected, and simply means that the legacy (previous) behavior will be used so nothing changes for you. If you want to use the new behaviour, set legacy=False. This should only be set if you understand what it means, and thouroughly read the reason why this was added as explained in huggingface/transformers#24565 1024 512 Adapter Trained From Scratch Map: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 15648/15648 [00:10<00:00, 1520.20 examples/s] Using the WANDB_DISABLED environment variable is deprecated and will be removed in v5. Use the --report_to flag to control the integrations used for logging result (for instance --report_to none). 0%| | 0/1956 [00:00<?, ?it/s] Traceback (most recent call last): File "/data2/junhong/proj/LLM-KGC/KoPA-main/finetune_kopa.py", line 282, in fire.Fire(train) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/fire/core.py", line 141, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/fire/core.py", line 475, in _Fire component, remaining_args = _CallAndUpdateTrace( File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/fire/core.py", line 691, in _CallAndUpdateTrace component = fn(varargs, kwargs) File "/data2/junhong/proj/LLM-KGC/KoPA-main/finetune_kopa.py", line 271, in train trainer.train(resume_from_checkpoint=resume_from_checkpoint) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/trainer.py", line 1591, in train return inner_training_loop( File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/trainer.py", line 1892, in _inner_training_loop tr_loss_step = self.training_step(model, inputs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/trainer.py", line 2776, in training_step loss = self.compute_loss(model, inputs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/trainer.py", line 2801, in compute_loss outputs = model(inputs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/parallel/data_parallel.py", line 185, in forward outputs = self.parallel_apply(replicas, inputs, module_kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/parallel/data_parallel.py", line 200, in parallel_apply return parallel_apply(replicas, inputs, kwargs, self.device_ids[:len(replicas)]) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/parallel/parallel_apply.py", line 110, in parallel_apply output.reraise() File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/_utils.py", line 694, in reraise raise exception RuntimeError: Caught RuntimeError in replica 0 on device 0. Original Traceback (most recent call last): File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/parallel/parallel_apply.py", line 85, in _worker output = module(input, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) File "/data2/junhong/proj/LLM-KGC/KoPA-main/kopa.py", line 106, in forward return forward_call(args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/peft/peft_model.py", line 918, in forward return self.base_model( File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/peft/tuners/tuners_utils.py", line 94, in forward return self.model.forward(args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward output = old_forward(*args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 1038, in forward outputs = self.model( File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 925, in forward layer_outputs = decoder_layer( File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward output = old_forward(args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 635, in forward hidden_states, self_attn_weights, present_key_value = self.self_attn( File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(*args, *kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward output = old_forward(args, kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 349, in forward query_states = self.q_proj(hidden_states) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1527, in _call_impl return forward_call(args, **kwargs) File "/data2/junhong/anaconda3/envs/kopa/lib/python3.10/site-packages/peft/tuners/lora.py", line 902, in forward result = F.linear(x, transpose(self.weight, self.fan_in_fan_out), bias=self.bias) RuntimeError: expected mat1 and mat2 to have the same dtype, but got: float != c10::Half

0%| | 0/1956 [00:05<?, ?it/s]

请问您解决这个问题了吗