Qwen Qlora ACSA
1.0.0
我们的任务是确定每个餐厅评论文本的情感趋势。这18个维度是:
如果您想了解有关数据集和指标的更多信息,请参见https://github.com/meituan-dianping/asap
我的设备:Linux,Pytorch2.0.1+Cu118,A100
mkdir -p /root/xtuner0117 && cd /root/xtuner0117
# Pull the source code of version 0.1.17
git clone -b v0.1.17 https://github.com/InternLM/xtuner
# Users who cannot access github please pull from gitee:
# git clone -b v0.1.15 https://gitee.com/Internlm/xtuner
# Enter the source code directory
cd /root/xtuner0117/xtuner
# Install XTuner from source
pip install -e '.[all]'
xtuner train qwen_1.8B_qlora_ASCA.py --deepspeed deepspeed_zero2 # Add deepspeed to accelerate training
xtuner convert pth_to_hf qwen_1.8B_qlora_ASCA.py
./work_dirs/qwen_1.8B_qlora_ASCA/iter_1803.pth ./hf
# Merge qlora files to generate fine-tuned qwen model
xtuner convert merge ./qwen/Qwen1.5-1.8B ./hf Qwen-1.5-1.8B-ASCA --max-shard-size 2GB
# Remove intermediate products
rm -rf ./hf
如果要执行推断,则只需要在当前文件夹所在的目录中的系统终端中执行python main.py即可。如果正确配置相关环境,则将成功运行。所有测试集的平均准确性在18个维度中达到86.1%。