LLM-Finetune

LLM-Finetune

大语言模型微调,Qwen2VL、Qwen2、GLM4指令微调

Stars: 286

Visit
 screenshot

LLM-Finetune is a repository for fine-tuning language models for various NLP tasks such as text classification and named entity recognition. It provides instructions and scripts for training and inference using models like Qwen2-VL and GLM4. The repository also includes datasets for tasks like text classification, named entity recognition, and multimodal tasks. Users can easily prepare the environment, download datasets, train models, and perform inference using the provided scripts and notebooks. Additionally, the repository references SwanLab, an AI training record, analysis, and visualization tool.

README:

LLM Finetune

实验细节看: swanlab swanlab swanlab

准备工作

安装环境:pip install -r requirements.txt

文本分类任务-数据集下载:在huangjintao/zh_cls_fudan-news下载train.jsonltest.jsonl到根目录下。

命名实体识别任务-数据集下载:在qgyd2021/chinese_ner_sft下载ccfbdci.jsonl到根目录下。

Qwen2-VL多模态任务-数据集下载:

cd ./qwen2_vl
python data2csv.py
python csv2json.py

训练

模型 任务 运行命令 Notebook 文章
Qwen2-VL-2b 多模态微调 进入qwen2_vl目录,运行python train_qwen2_vl.py wait 知乎
Qwen2-1.5b 指令微调-文本分类 python train_qwen2.py Jupyter Notebook 知乎
Qwen2-1.5b 指令微调-命名实体识别 python train_qwen2_ner.py Jupyter Notebook 知乎
GLM4-9b 指令微调-文本分类 python train_glm4.py Jupyter Notebook 知乎
GLM4-9b 指令微调-命名实体识别 python train_glm4_ner.py Jupyter Notebook 知乎

推理

Qwen2系列:

python predict_qwen2.py

Qwen2-VL系列:

cd ./qwen2_vl
python predict_qwen2_vl.py

GLM4系列:

python predict_glm4.py

引用工具

  • SwanLab:AI训练记录、分析与可视化工具

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for LLM-Finetune

Similar Open Source Tools

For similar tasks

For similar jobs