Qwen Qlora ACSA
1.0.0
우리의 임무는 각 식당 검토 텍스트의 감정적 경향을 18 차원으로 결정하는 것입니다. 이 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%에 도달했습니다.