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%。