探索中文instruct数据在ChatGLM, LLaMA等LLM上微调表现,结合PEFT等方法降低资源需求。
大部分基于ChatGLM-6B、ChatGLM-Tuning和Aplaca-LoRA,感谢大佬们。
- [2023-03-28] 完成在中文instruction数据上使用Lora对LLaMA-7B进行微调,发布了微调后的权重。
- [2023-03-24] 完成在中文instruction数据上使用Lora对ChatGLM-6B进行微调,发布了微调后的权重。
在中文上的效果不如ChatGLM-6B,但考虑其对中文的支持本来就不好,已经不错了(不知道有没有大佬可以尝试增强一下LLaMa的中文能力已经有了Chinese-LLaMA-Alpaca)
conda env create -f env.yml -n bab
conda activate bab
pip install git+https://github.com/huggingface/peft.git
Run bash dataprocess.sh
to process the data.
Run bash finetune.sh
to finetune the model.
Run python test_llama1.py
to finetune the model.
You can also choose to interact with the model through the annotation section.
Run python infer.py
to do the inference. Show cases in the dataset by default.
Run python generate_llama1.py
to do the inference. Show cases in the dataset by default.
- kanchil: 一个探索小模型的潜力的开源项目