ChatGLM3-6B部署
- 代码clone
git clone https://github.com/THUDM/ChatGLM3.git
- 安装依赖
cd ChatGLM3
pip install -r requirements.txt
- 配置huggingface 镜像地址
由于国内访问huggingface不通,所以最简单的方案是配置huggingface 镜像地址
export HF_ENDPOINT=https://hf-mirror.com
- 启动cli demo
第一次启动较慢,需要下载huggingface中的数据。
cd basic_demo/
python cli_demo.py
- 修改huggingface 默认下载路径
huggingface 默认下载路径是 ~/.cache/huggingface,若想修改可直接设置环境变量,如下:
export HF_HOME=/root/autodl-tmp/cache/huggingface
- 查看huggingface默认路径命令:
huggingface-cli scan-cache
over !