RWKV系列1-wenda在linux上的运行

参考

闻达用RWKV部署在Linux上 以Ubuntu为例:https://blog.csdn.net/cgxcgxcgxcgx/article/details/131604642

笔记

# 创建虚拟环境
    python 3.10
    conda create --name RWKV-wenda-python310 python=3.10 cudatoolkit=11.8 -y
    conda activate  RWKV-wenda-python310
    conda deactivate
    conda env remove --name RWKV-wenda-python38
    pip config set global.index-url https://mirror.baidu.com/pypi/simple
    
    cd serving

## 部署
### 方法1:虚拟环境
#### 步骤1
    apt-get install libxml2-dev libxslt-dev
#### 步骤2
    pip install -r ./requirements/requirements.txt
#### 步骤3 安装大模型
    cd models/rwkv-4-world
    wget https://huggingface.co/BlinkDL/rwkv-4-world/blob/main/RWKV-4-World-CHNtuned-7B-v1-OnlyForTest_72%25_trained-20230707-ctx4096.pth
    或者访问hg官网直接下载
#### 步骤4 安装向量模型
    https://huggingface.co/moka-ai/m3e-base/tree/main
#### 步骤5
    把[example.config.yml](https://github.com/l15y/wenda/blob/main/example.config.yml)重命名为`config.yml`
    模型参数路径更改:
        llm_type: glm6b
        path: "chatglm/chatglm2-6b-int4"
#### 步骤6 配置知识库
    创建txt文本文件夹(可以是一批文件)
    python ./plugins/gen_data_st.py
#### 步骤7 运行
    sh run_rwkv.sh
    或者 python wenda.py -t rwkv
#### 步骤8:浏览器打开服务
    http://0.0.0.0:17860

windows

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_15821487/article/details/131622851
今日推荐