langchain下的安装步骤GLM

一、在阿里云的免费下进行,感谢阿里

安装完一定要看显卡安装情况

 nvidia-smi

二、进行conda的安装(可以用简版)

1、wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
2、bash Miniconda3-latest-Linux-x86_64.sh
3、安装完成后,关闭当前终端并打开新终端,这将激活 Conda,

4、sudo su - root
5、conda update conda

更新conda,下面是增加软件包渠道

conda config --add channels conda-forge
conda config --add channels defaults 
conda list
 

三、进行虚拟环境安装配置

conda create -n langchain-chatglm python==3.10.4
conda activate langchain-chatglm
 

四、部署langchain+GLM

git clone https://github.com/imClumsyPanda/langchain-ChatGLM;

cd langchain-ChatGLM
pip3 install -r requirements.txt
pip3 install -U gradio
pip3 install modelscope
 

注意:我的GLM存在langchain-GLM 的同级目录,因此在config.py 就在config目录下,需要修改路径为:../chatglm-6b 注意是2个点。。    修改完就可以load model正常了

五、启动

python webui.py

开始加载模型,估计要几分钟吧。。。

使用浏览器打开 http://localhost:7860/

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值