What?
by https://github.com/internlm/huixiangdou
HuixiangDou is a professional knowledge assistant based on LLM.
更详细的介绍推荐看 https://github.com/InternLM/Tutorial/blob/camp3/docs/L2/Huixiangdou/readme.md
实操
系统环境(仅参考)
- ubuntu 22.04
- python 3.10.14
- GPU: Tesla V100-SXM2-32GB
- CUDA Version: 12.3
环境配置
教程
- 有Intern Studio算力资源的筒子推荐以下教程
https://github.com/InternLM/Tutorial/blob/camp3/docs/L2/Huixiangdou/readme.md - 自己有卡的筒子可以和跟我一样直接跟着github项目主页教程走
注意事项 & FAQ
- Q: 报错
Package python-dev is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: python2-dev python2 python-dev-is-python3 E: Package 'python-dev' has no installation candidate
A: 这个包和python-dev-is-python2/python-dev-is-python3有关,这两包的介绍
$apt search python-dev-is-python*
Sorting... Done
Full Text Search... Done
python-dev-is-python2/focal 2.7.17-4 all
symlinks /usr/bin/python-config to the DEPRECATED python2-config
python-dev-is-python3/focal 3.8.2-4 all
symlinks /usr/bin/python-config to python3-config
ok, 这b包不装也罢
- Q: 报错
ModuleNotFoundError: No module named 'sentencepiece'
A: pip install sentencepiece - Q: 报错
ImportError: InternLM2Converter requires the protobuf library but it was not found...
A: pip install protobuf
运行过程截图
终端–启动服务 & 注入「黑神话·悟空」wiki词条
- 这里是
huixiangdou.gradio_ui
, 官方github教程可能笔误,目前写的huixiangdou.gradio
网页端–测试效果
为了能将上述终端起的gradio服务暴露到公网
两种方式
- 如果能够直接ssh连接上述gradio web服务所在机器, 搜
ssh端口转发
- 如果无法直接ssh连接上述gradio所在机器(比如企业惯用的把开发机藏堡垒机后面),搜
反向代理 frp
,动态dns
或者一步到位商业付费方案如cpolar 极点云
,ngrok