Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mac platform for torch #107

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,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`

### 代码调用

Expand Down
4 changes: 2 additions & 2 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,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:

Expand Down Expand Up @@ -253,4 +253,4 @@ If you find our work useful, please consider citing the following papers. The te
pages={320--335},
year={2022}
}
```
```
8 changes: 8 additions & 0 deletions requirements_for_mac.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
protobuf
transformers==4.30.2
cpm_kernels
torch>=2.0.1+cpu
gradio
mdtex2html
sentencepiece
accelerate