TextGen: Implementation of Text Generation models, include LLaMA, BLOOM, GPT2, BART, T5, SongNet and so on. 文本生成模型,实现了包括LLaMA,ChatGLM,BLOOM,GPT2,Seq2Seq,BART,T5,UDA等模型的训练和预测,开箱即用。
GPT模型支持了NEFTune给embedding加噪SFT训练方法,SFT中使用 --neft_alpha
参数启用 NEFTune,例如 --neft_alpha 5
,示例代码:https://github.com/shibing624/textgen/blob/main/examples/gpt/training_llama_demo.py
兼容了 ChatGLM-6B 1,2,3 / Baichuan 1,2 / LLaMA 1,2 / BLOOM / Mistral / QWen 等GPT模型LoRA微调训练和预测,可以用于多轮对话微调训练
Full Changelog: https://github.com/shibing624/textgen/compare/1.1.1...1.1.2
多卡数据并行,batch推理:
cd examples/gpt
CUDA_VISIBLE_DEVICES=0,1 torchrun --nproc_per_node 2 inference_multigpu_demo.py --model_type chatglm --base_model THUDM/chatglm-6b
Full Changelog: https://github.com/shibing624/textgen/compare/1.1.0...1.1.1
Full Changelog: https://github.com/shibing624/textgen/compare/1.0.2...1.1.0
新增支持ChatGLM2和LLaMA2模型的SFT微调训练
Full Changelog: https://github.com/shibing624/textgen/compare/1.0.1...1.0.2
Full Changelog: https://github.com/shibing624/textgen/compare/0.2.7...1.0.0
Model | Arch | Introduction | Train Script | Predict Script |
---|---|---|---|---|
shibing624/chatglm-6b-csc-zh-lora | ChatGLM-6B | 在27万中文拼写纠错数据shibing624/CSC上微调了一版ChatGLM-6B,纠错效果有提升,发布微调后的LoRA权重 | training script | predict script |
shibing624/chatglm-6b-belle-zh-lora | ChatGLM-6B | 在100万条中文ChatGPT指令Belle数据集BelleGroup/train_1M_CN上微调了一版ChatGLM-6B,问答效果有提升,发布微调后的LoRA权重 | training script | predict script |
shibing624/llama-13b-belle-zh-lora | LLaMA-13B | 在100万条中文ChatGPT指令Belle数据集BelleGroup/train_1M_CN上微调了一版Llama-13B,问答效果有提升,发布微调后的LoRA权重 | training script | predict script |
shibing624/chinese-alpaca-plus-7b-hf | LLaMA-7B | 中文LLaMA-Plus, Alpaca-Plus 7B版本,在LLaMA-7B上扩充了中文词表并继续预训练120G文本(通用领域),在4M指令数据集上微调后得到的中文Alpaca-plus模型 | training script | predict script |
shibing624/chinese-alpaca-plus-13b-hf | LLaMA-13B | 中文LLaMA-Plus, Alpaca-Plus 13B版本,在LLaMA-13B上扩充了中文词表并继续预训练120G文本(通用领域),在4.3M指令数据集上微调后得到的中文Alpaca-plus模型 | training script | predict script |
Full Changelog: https://github.com/shibing624/textgen/compare/0.2.5...0.2.7
Full Changelog: https://github.com/shibing624/textgen/compare/0.2.0...0.2.5
Full Changelog: https://github.com/shibing624/textgen/compare/0.1.5...0.1.7
Full Changelog: https://github.com/shibing624/textgen/compare/0.1.1...0.1.5
Full Changelog: https://github.com/shibing624/textgen/compare/0.1.0...0.1.1