Skip to content

Commit

Permalink
Merge pull request #48 from Nranphy/main
Browse files Browse the repository at this point in the history
Update README.md and README_zh.md
  • Loading branch information
cgisky1980 authored Nov 18, 2023
2 parents ebf0961 + 918694d commit c31cdd3
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,22 @@ QQ Group for communication: 30920262
```

6. Open the browser and visit the WebUI [`http://127.0.0.1:65530`](http://127.0.0.1:65530)

### 📒Convert the Model

It only supports Safetensors models with the `.st` extension now. Models saved with the `.pth` extension using torch need to be converted before use.

1. [Download the `.pth` model](https://huggingface.co/BlinkDL)

2. Clone or download the [convert_safetensors.py](./convert_safetensors.py) from this repository and install the corresponding dependencies.

3. Run the above program, specifying the input and output paths.

```bash
$ python convert_safetensors.py --input ./filename.pth --output ./filename.st
```

4. Just like the steps mentioned above, place the model in the `.st` model in the `assets/models/` path and modify the model path in [`assets/Config.toml`](./assets/Config.toml)


## 📝Supported Arguments
Expand Down
18 changes: 17 additions & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,23 @@ You may download the official RWKV World series models from HuggingFace, and con
6. 打开浏览器,访问WebUI
[`http://127.0.0.1:65530`](http://127.0.0.1:65530)


### 📒模型转换

本项目目前仅支持`.st`后缀的 Safetensors 模型,通过`torch`保存的`.pth`后缀模型需要在使用前进行转换。

1. [下载pth模型](https://huggingface.co/BlinkDL)

2. 克隆或下载本仓库下[convert_safetensors.py](./convert_safetensors.py)程序,并安装相应的依赖库

3. 运行上述程序,并指定输入输出路径

```bash
$ python convert_safetensors.py --input ./filename.pth --output ./filename.st
```

4. 根据上文步骤,将转换所得的`.st`模型文件放在`assets/models/`路径下,并修改 [`assets/Config.toml`](./assets/Config.toml) 中的模型路径


## 📝支持的启动参数
- `--config`: 模型配置文件路径(默认`assets/Config.toml`
- `--ip`: 服务器绑定的IP地址
Expand Down

0 comments on commit c31cdd3

Please sign in to comment.