常用基础操作:
mkdir……新建
cd……打开
python……运行py程序
进入环境:
conda activate demo
更新包:
pip install huggingface-hub==0.17.3
pip install transformers==4.34
pip install psutil==5.9.8
pip install accelerate==0.24.1
pip install streamlit==1.32.2
pip install matplotlib==3.8.3
pip install modelscope==1.9.5
pip install sentencepiece==0.1.99
下载InternLM2-Chat-1.8B 模型
mkdir -p /root/model/Shanghai_AI_Laboratory
cp -r /root/share/temp/model_repos/internlm-chat-7b /root/model/Shanghai_AI_Laboratory
(老版方法)
克隆:(需自建一些文件夹
cd /root/code
git clone https://gitee.com/internlm/InternLM.git
cd InternLM
git checkout 3028f07cb79e5b1d7342f4ad8d11efad3fd13d17
将 /root/code/InternLM/web_demo.py 中 29 行和 33 行的模型更换为本地的
/root/model/Shanghai_AI_Laboratory/internlm-chat-7b 。
新建cli.py并运行。
配置“八戒”
conda activate demo
cd /root/
git clone https://gitee.com/InternLM/Tutorial -b camp2
git clone https://github.com/InternLM/Tutorial -b camp2cd /root/Tutorial
python /root/Tutorial/helloworld/bajie_download.py
运行
streamlit run /root/Tutorial/helloworld/bajie_chat.py --server.address 127.0.0.1 --server.port
6006
win+r
Powershell
ssh -CNg -L 6006:127.0.0.1:6006 root@ssh.intern-ai.org.cn -p 38374
password复制过来(不显示,直接回车
http://127.0.0.1:6006
done
书生·浦语LLM 第二节课笔记
于 2024-04-07 11:57:06 首次发布