pull/107/merge
Kenny 2023-07-06 17:28:36 +08:00 committed by GitHub
commit e52ee60f2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View File

@ -138,6 +138,7 @@ cd ChatGLM2-6B
```
然后使用 pip 安装依赖:`pip install -r requirements.txt`,其中 `transformers` 库版本推荐为 `4.30.2``torch` 推荐使用 2.0 以上的版本,以获得最佳的推理性能。
如果是mac电脑请使用`pip install -r requirements_for_mac.txt`
### 代码调用

View File

@ -123,7 +123,7 @@ Compared to the first-generation model, ChatGLM2-6B has made improvements in mul
## Getting Started
### Environment Setup
Install dependencies with pip: `pip install -r requirements.txt`. It's recommended to use version `4.27.1` for the `transformers` library and use version 2.0 or higher for `torch` to achieve the best inference performance.
Install dependencies with pip: `pip install -r requirements.txt`. It's recommended to use version `4.27.1` for the `transformers` library and use version 2.0 or higher for `torch` to achieve the best inference performance. if mac platform please use `pip install -r requirements_for_mac.txt`.
We provide a web page demo and a command line demo. You need to download this repository to use them:
@ -257,4 +257,4 @@ If you find our work useful, please consider citing the following papers. The te
pages={320--335},
year={2022}
}
```
```

8
requirements_for_mac.txt Normal file
View File

@ -0,0 +1,8 @@
protobuf
transformers==4.30.2
cpm_kernels
torch>=2.0.1+cpu
gradio
mdtex2html
sentencepiece
accelerate