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
config = LoraConfig(
r=8,
lora_alpha=16,
target_modules=targets,
lora_dropout=0,
bias="none",
task_type="CAUSAL_LM",
)
model = get_peft_model(model, config)
# enable trainable params
[p.requires_grad_() for n, p in model.named_parameters() if any([k in n for k in training_args.trainable_params.split(",")])]
感谢作者的开源分享!
阅读了你的文章,其中提到LoRA+embed、norm层的训练,可以有效提高模型在支持长上下文时的性能,我想要在自己的训练代码中加入这种训练,但对于如何添加,有些疑惑。
我看了你的训练代码,LoRA+的配置似乎是:
我对这种配置感到疑惑,对“embed、norm”层的配置为什么采用这种形式,而不是在LoraConfig的“modules_to_save”参数中进行配置?如下:
The text was updated successfully, but these errors were encountered: