You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you call model.enable_input_require_grads() before get_peft_model ? You have to use the main branch of transformers though (pip install --upgrade git+https://github.com/huggingface/transformers)
Hello, is_trainable=True is required to load the pretrained adapter and have them in trainable mode.
Please pass PeftModel.from_pretrained(model, peft_model_id, is_trainable=True).to(device) and let us know if that solves the issue
问题已解决:自己构造的数据集 label 使用成了 str 的 "False"/"True",导致错误
Describe the bug
出现报错:RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn
我的脚本代码:
我的json数据格式:
其中label=0,label=1的数量相等,考虑有关数据集的隐患是:content内容重复度较高
Your hardware and system info
python 3.10
cuda 12.4
datasets 3.0.0
deepspeed 0.16.7
ms-swift 3.4.0
trl 0.17.0
The text was updated successfully, but these errors were encountered: