What?
by https://github.com/InternLM/lagent
Lagent is a lightweight open-source framework that allows users to efficiently build large language model(LLM)-based agents. It also provides some typical tools to augment LLM…
实操
系统环境(仅参考)
- ubuntu 22.04
- anaconda 4.5.11
- GPU: Tesla V100-SXM2-32GB
环境配置
教程
https://github.com/InternLM/Tutorial/tree/camp3/docs/L2/Lagent 这篇教程写的很详细,流程概述如下
- 新建一个conda环境用于实验
- 装各种依赖包
- git clone https://github.com/InternLM/lagent
- 下载internlm/internlm2_5-7b-chat模型,并用lmdeploy部署
- streamlit启动app并在网页端体验
- 不做任何修改即可体验Arxiv搜索插件
- 为了体验文生图插件,需要跟着教程对InternLM/lagent代码库做相应修改
注意事项
- 如果streamlit能启动app,但运行时报这类错误
ModuleNotFoundError: No module named 'griffe.enumerations'
, 检查下是否griffe
版本过高,>=1.0.0
的版本都会报这个错,我是回退到0.49.0
解决的 - 从网页端访问时,几个配置项必须填对
- 模型名称
- 模型IP
- 插件选择