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 425 forks source link

请问多个lora模型怎么合并? #242

Open Orangeices opened 1 year ago

Orangeices commented 1 year ago

使用纯C++推理

感谢之前的工作: Llama.cppAlpaca.cpp, 请注意

update readme 1.首先,你需要将你的lora参数与原始模型合并,并将它们转换为ggml格式,用于cpp推理。

merge changes for cpp inference

bash prepare_llama_cpp.sh

update readme ( 在我们的代码中,首先将hf模型和lora转换为合并的consolidated.0x.pth,其中x对应num_shards,并将它们转换为ggml-model-f16.bin。 )

执行到这一步后

bash prepare_llama_cpp.sh

可以将hf模型和lora合并。我想请教一下,如果是多个lora模型,是否可以合并,该怎么操作?