在笔记本电脑上跑清华chatglm大语言模型

环境:windows10以上系统,安装Linux子系统

下载这个文件,双击,安装:https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi

sudo sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
sudo dpkg-reconfigure locales
sudo apt update
sudo apt install cmake gcc g++ git
这里有几条命令,效果一样,哪个速度快用哪个:
git clone https://ghproxy.com/https://github.com/ztxz16/fastllm.git
git clone https://github.moeyy.xyz/https://github.com/ztxz16/fastllm.git
git clone https://kgithub.com/ztxz16/fastllm.git
git clone https://hub.fgit.gq/ztxz16/fastllm.git
git clone https://gitclone.com/github.com/ztxz16/fastllm.git

继续:
cd fastllm
mkdir build
cd build
有N卡,那么:cmake .. -DUSE_CUDA=ON
无N卡,那么:cmake .. -DUSE_CUDA=OFF
然后:
make -j
最后,从这个链接下载模型文件:https://huggingface.co/huangyuyang/chatglm2-6b-int4.flm/tree/main

按照视频中的操作拷贝
最后: ./webui -p chatglm2-6b-int4.flm --port 1234 输出一个ip地址,访问它

 

posted @ 2024-01-14 15:00  沐春风-燕南飞  阅读(144)  评论(0编辑  收藏  举报