beyondguo / LLM-Tuning

Tuning LLMs with no tears💦; Sample Design Engineering (SDE) for more efficient downstream-tuning.
967 stars 99 forks source link

lora tuning 出的权重,再加一个合并的功能? #37

Open litetoooooom opened 1 year ago

litetoooooom commented 1 year ago

作者好

目前用 model = PeftModel.from_pretrained(model, "weights/simple_math_4op").half() 加载Lora,能否提供一个功能merge一下了

beyondguo commented 1 year ago

PefModel类中有一个merge_and_unload函数,可以先试试。