ChatGLM-Efficient-Tuning部署日志及问题记录
安装步骤
git lfs install
git clone https://github.com/hiyouga/ChatGLM-Efficient-Tuning.git
conda create -n chatglm_etuning python=3.10
conda activate chatglm_etuning
cd ChatGLM-Efficient-Tuning
pip install -r requirements.txt(红字就再来一次,参考GLM部署的安装第二步)
安装预编译的 bitsandbytes 库, 支持 CUDA 11.1 到 12.1(可选,由于下载速度过慢我暂且跳过了这一步)
pip install https://github.com/jllllll/bitsandbytes-windows-webui/releases/download/wheels/bitsandbytes-0.39.1-py3-none-win_amd64.whl
遇到的问题
1、'conda' 不是内部或外部命令,也不是可运行的程序
问题成因:未安装Anaconda,或Anaconda未添加入系统变量;
解决方案:
1.安装Anaconda(https://www.anaconda.com/download/)
2.找到Anaconda3的安装路径 C:\Users\XXX\Anaconda3 和C:\Users\XXX\Anaconda3\Scripts
3.添加环境变量 右键我的电脑--属性--高级系统设置--高级--环境变量 找到系统变量中的Path变量,双击或者点击编辑。将上述两个路径加到Path中。

2、conda activate chatglm_etuning 报错 CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'....
问题成因:当前 shell 没激活 conda activate 命令,需要激活。
解决方案:
1.Windows:conda init <SHELL_NAME>
2.SHELL_NAME 替换成当前的shell名称,比如 Windows 一般是 conda init cmd 或者 conda init powershell
3.Linux:一般是 source activate
3、CUDA_VISIBLE_DEVICES=0 : 无法将“CUDA_VISIBLE_DEVICES=0”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
问题成因:该命令属于Linux语言,在个人的Windows环境下是无法运行的,只有在Linux服务器上可以使用;
解决方案:
1.在cmd先设置变量 set CUDA_VISIBLE_DEVICES=0
2.再运行训练:python src/train_web.py


