教程:Tutorial/docs/L2/Lagent/readme.md at camp3 · InternLM/Tutorial · GitHub
搭建环境
# 创建环境
conda create -n agent_camp3 python=3.10 -y
# 激活环境
conda activate agent_camp3
# 安装 torch
conda install pytorch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 pytorch-cuda=12.1 -c pytorch -c nvidia -y
# 安装其他依赖包
pip install termcolor==2.4.0
pip install lmdeploy==0.5.2

下载源码,按特定分支安装
# 创建目录以存放代码
mkdir -p /root/agent_camp3
cd /root/agent_camp3
git clone https://github.com/InternLM/lagent.git
cd lagent && git checkout 81e7ace && pip install -e . && cd ..

用LMDeploy启动 InternLM2.5-7B的 API Server
lmdeploy serve api_server /share/new_models/Shanghai_AI_Laboratory/internlm2_5-7b-chat --model-name internlm2_5-7b-chat

另开窗口启动Web Demo
cd /root/agent_camp3/lagent
conda activate agent_camp3
streamlit run examples/internlm2_agent_web_demo.py

本地cmd或powershell 端口映射到23333 和8501


本地打开localhost:8501
修改模型名称: internlm2_5-7b-chat,
修改模型 ip:127.0.0.1:23333。

提问


不错的论文搜索小助手Demo就有了
1095

被折叠的 条评论
为什么被折叠?



