LoRA 微调相关内容如下:
基于LoRA微调的模型参数见:基于Llama2的中文微调模型,LoRA参数需要和基础模型参数结合使用。通过[PEFT](https://github.com/huggingface/peft)加载预训练模型参数和微调模型参数,以下示例代码中,base_model_name_or_path为预训练模型参数保存路径,finetune_model_path为微调模型参数保存路径。
LoRA微调脚本见:[train/sft/finetune_lora.sh](https://github.com/LlamaFamily/Llama-Chinese/blob/main/requirements.txt),关于LoRA微调的具体实现代码见[train/sft/finetune_clm_lora.py](https://github.com/LlamaFamily/Llama-Chinese/blob/main/train/sft/finetune_clm_lora.py),单机多卡的微调可以通过修改脚本中的--include localhost:0来实现。
项目地址https://github.com/guoyww/animatediff/需要注意的是,Animatediff这里有一个关键的lora对图像模型进行了微调lora地址https://huggingface.co/guoyww/animatediff/blob/main/v3_sd15_adapter.ckpt关于lora的强度,这个强度越高,画面就越稳定,但是需要在合理的范围