LLM-SFT,新微调数据集-MWP-Instruct(多步计算 + 一、二元方程),微调Bloom, ChatGLM, LlaMA(支持QLoRA, TensorBoardX)

LLM-SFT,新微调数据集-MWP-Instruct(多步计算 + 一、二元方程),微调Bloom, ChatGLM, LlaMA(支持QLoRA, TensorBoardX)

    正在检查是否收录...
一言准备中...

LLM-SFT

中文大模型微调(LLM-SFT), 支持模型(ChatGLM, LlaMA, Bloom), 支持(LoRA, QLoRA, DeepSpeed, UI, TensorboardX), 支持(微调, 推理, 测评, 接口)等.

项目地址

https://github.com/yongzhuo/LLM-SFT

踩坑

LoRA: ChatGLM已经微调比较好了, 垂直领域数据继续微调甚至会带来性能下降, 建议至多不超过200w-epoch(R=8的情况); QLoRA: 不要使用.cuda(), GPU至少为英伟达图灵架构往上【备注】当前(2023.06)QLoRA只是节约显存, 并不能加速训练; 

LoRA权重

Bloomz-7B-GPT4ForALL: https://huggingface.co/Macropodus/MWP-Instruct ChatGLM-6B-GPT4ForALL: https://huggingface.co/Macropodus/MWP-Instruct LlaMA-7B-GPT4ForALL: https://huggingface.co/Macropodus/MWP-Instruct ChatGLM-6B-MWP: https://huggingface.co/Macropodus/MWP-Instruct 

微调数据

原始数据来自https://github.com/LYH-YF/MWPToolkit

处理后的微调数据(多步计算+一/二元解方程)-MWP: https://huggingface.co/datasets/Macropodus/MWP-Instruct

大数加减乘除来自: https://github.com/liutiedong/goat.git

微调样例

地址: llm_sft/ft_chatglm 配置: llm_sft/ft_chatglm/config.py 训练: python train.py 推理: python predict.py 验证: python evaluation.py 接口: python post_api.py 

环境配置

1.详见LLM-SFT/requirements.txt transformers>=4.26.1 torch>=1.10.1 peft>=0.2.0 2.注意QLoRA需要的版本更高些, 详见LLM-SFT/llm_sft/ft_qlora/requirements.txt transformers>=4.30.0.dev0 accelerate>=0.20.0.dev0 bitsandbytes>=0.39.0 peft>=0.4.0.dev0 torch>=1.13.1 

数据集-中文

https://huggingface.co/datasets/JosephusCheung/GuanacoDataset https://huggingface.co/datasets/shareAI/shareGPT_cn https://huggingface.co/datasets/Mutonix/RefGPT-Fact https://huggingface.co/datasets/BAAI/COIG https://github.com/Instruction-Tuning-with-GPT-4/GPT-4-LLM https://github.com/carbonz0/alpaca-chinese-dataset https://github.com/LianjiaTech/BELLE https://github.com/PhoebusSi/Alpaca-CoT https://github.com/Hello-SimpleAI/chatgpt-comparison-detection https://github.com/yangjianxin1/Firefly https://github.com/XueFuzhao/InstructionWild https://github.com/OpenLMLab/MOSS https://github.com/thu-coai/Safety-Prompts https://github.com/LAION-AI/Open-Assistant https://github.com/TigerResearch/TigerBot

参考/感谢

https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard https://github.com/THUDM/ChatGLM-6B https://github.com/THUDM/GLM https://github.com/tatsu-lab/stanford_alpaca https://github.com/LianjiaTech/BELLE https://github.com/huggingface/peft https://github.com/mymusise/ChatGLM-Tuning https://github.com/huggingface/transformers https://github.com/bojone/bert4keras trl https://github.com/LYH-YF/MWPToolkit math23k https://github.com/ymcui/Chinese-LLaMA-Alpaca https://github.com/bigscience-workshop/petals https://github.com/facebookresearch/llama https://huggingface.co/spaces/multimodalart/ChatGLM-6B/tree/main https://huggingface.co/spaces/stabilityai/stablelm-tuned-alpha-chat/tree/main https://github.com/artidoro/qlora

Reference

For citing this work, you can refer to the present GitHub project. For example, with BibTeX:

@misc{Keras-TextClassification, howpublished = {\url{https://github.com/yongzhuo/LLM-SFT}}, title = {LLM-SFT}, author = {Yongzhuo Mo}, publisher = {GitHub}, year = {2023} } 

免责申明

本项目相关资源仅供学术研究之用,严禁用于商业用途。 使用涉及第三方代码的部分时,请严格遵循相应的开源协议。模型生成的内容受模型计算、随机性和量化精度损失等因素影响,本项目不对其准确性作出保证。对于模型输出的任何内容,本项目不承担任何法律责任,亦不对因使用相关资源和输出结果而可能产生的任何损失承担责任。

大模型权重的详细协议见THUDM/chatglm-6b, bigscience/bloomz-7b1-mt, decapoda-research/llama-7b-hf 指令微调数据协议见GPT-4-LLM, LYH-YF/MWPToolkit, yangjianxin1/Firefly

gitgithubhuggingfacellmchatcodegptllamamacpythonalpacagpt-4gpt4transformertransformerssharefireflyurl大模型模型微调数据集atsmultimodalsifapibertassistant学术研究okrpromptgpu模型生成商业用途prompts准确性facebookbotchatgpt
  • 本文作者:WAP站长网
  • 本文链接: https://wapzz.net/post-3000.html
  • 版权声明:本博客所有文章除特别声明外,均默认采用 CC BY-NC-SA 4.0 许可协议。
本站部分内容来源于网络转载,仅供学习交流使用。如涉及版权问题,请及时联系我们,我们将第一时间处理。
文章很赞!支持一下吧 还没有人为TA充电
为TA充电
还没有人为TA充电
0
  • 支付宝打赏
    支付宝扫一扫
  • 微信打赏
    微信扫一扫
感谢支持
文章很赞!支持一下吧
关于作者
2.7W+
9
1
2
WAP站长官方

使边缘人工智能真正实现变革

上一篇

研究称:ChatGPT回答医学问题准确度不足

下一篇
  • 复制图片
按住ctrl可打开默认菜单