SWIFT环境配置及大模型微调实践
- SWIFT环境配置
- 基础配置
- 增量配置
- SWIFT大模型微调实践
SWIFT介绍参考: 这里
SWIFT环境配置
基础配置
conda create -n swift python=3.8pip install ms-swift[all] -U# 下载项目
git clone https://github.com/modelscope/swift
增量配置
如果是运行qwen-audio,需要安装ffmpeg
apt-get update
apt-get install ffmpeg
SWIFT大模型微调实践
也可以参考https://zhuanlan.zhihu.com/p/665300386
微调代码
cd swift/examples/pytorch/llm
nohup bash scripts/qwen_audio_chat/lora/sft.sh > qwen_audio_chat_sft_20240320.log &
第一次跑,发现使用的是cpu,经过检查,发现pytorch版本对应的cuda版本较高,于是重新安装pytorch
conda install --use-local pytorch-1.13.0-py3.8_cuda11.6_cudnn8.3.2_0.tar.bz2.tar.bz2