diff --git a/README.md b/README.md index 80b5ec5..a1c8685 100644 --- a/README.md +++ b/README.md @@ -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` ### 代码调用 diff --git a/README_EN.md b/README_EN.md index 91d306e..98a5d7a 100644 --- a/README_EN.md +++ b/README_EN.md @@ -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} } -``` \ No newline at end of file +``` 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