From 0c6df49a433de78618c554a525572f1f49903db3 Mon Sep 17 00:00:00 2001 From: Kenny Date: Wed, 28 Jun 2023 19:16:20 +0800 Subject: [PATCH 1/3] Create requirements_for_mac.txt --- requirements_for_mac.txt | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 requirements_for_mac.txt diff --git a/requirements_for_mac.txt b/requirements_for_mac.txt new file mode 100644 index 0000000..26e3fcd --- /dev/null +++ b/requirements_for_mac.txt @@ -0,0 +1,8 @@ +protobuf +transformers==4.30.2 +cpm_kernels +torch>=2.0.1+cpu +gradio +mdtex2html +sentencepiece +accelerate From ca7d34bbbb8673232e6df42bb58de772447d9f6d Mon Sep 17 00:00:00 2001 From: Kenny Date: Wed, 28 Jun 2023 19:19:11 +0800 Subject: [PATCH 2/3] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index cea2461..64b0229 100644 --- a/README.md +++ b/README.md @@ -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` ### 代码调用 From a7a0dbd7a7d32a0371bbd975873cedbc2bb11c6c Mon Sep 17 00:00:00 2001 From: Kenny Date: Wed, 28 Jun 2023 19:20:11 +0800 Subject: [PATCH 3/3] Update README_EN.md --- README_EN.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README_EN.md b/README_EN.md index 67d6a16..8241342 100644 --- a/README_EN.md +++ b/README_EN.md @@ -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: @@ -253,4 +253,4 @@ If you find our work useful, please consider citing the following papers. The te pages={320--335}, year={2022} } -``` \ No newline at end of file +```