Facico / Chinese-Vicuna

Chinese-Vicuna: A Chinese Instruction-following LLaMA-based Model —— 一个中文低资源的llama+lora方案,结构参考alpaca
https://github.com/Facico/Chinese-Vicuna
Apache License 2.0
4.14k stars 421 forks source link

peft版本问题 #58

Closed cc-doughnut closed 1 year ago

cc-doughnut commented 1 year ago

开始头铁用的最新版的peft仓库在运行generate,py会出现model.peft config字典不存在peft type的问题 报错位置在utils里面715行: model = dispatch_model(model, device_map=device_map) hook = AlignDevicesHook(io_same_device=True) if model.peft_config.peft_type == PeftType.LORA: add_hook_to_module(model.base_model.model, hook) else: remove_hook_from_submodules(model.prompt_encoder) add_hook_to_module(model.base_model, hook) 把peft仓库降级到requirements里面版本不会报错 最终没找到原因 先报个问题吧 盼复 谢谢!

Facico commented 1 year ago

peft这个仓库还在开发阶段,更新的比较快,建议还是固定用一个版本