datawhalechina / self-llm

《开源大模型食用指南》基于Linux环境快速部署开源大模型,更适合中国宝宝的部署教程
Apache License 2.0
9.74k stars 1.13k forks source link

lora微调 没有用peft_model包装base pre train model #277

Open MXD6 opened 2 weeks ago

MXD6 commented 2 weeks ago

LLaMA3-8B-Instruct Lora 微调 定义好lora_config后,为什么没有get_peft_model,Trainer传入的是pretrain model.

trainer = Trainer(
    model=model,
    args=args,
    train_dataset=tokenized_id,
    data_collator=DataCollatorForSeq2Seq(tokenizer=tokenizer, padding=True),
)
trainer.train()
KMnO4-zx commented 2 weeks ago

在notebook代码演示文件中有写哦