From 2f573fa65a47774ce4fde90c6cdbe5db475260e2 Mon Sep 17 00:00:00 2001 From: duzx16 Date: Wed, 15 Mar 2023 20:10:08 +0800 Subject: [PATCH 01/11] Update README --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 9764568..94e6edc 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,6 @@ ChatGLM-6B 使用了和 ChatGPT 相似的技术,针对中文问答和对话进 不过,由于ChatGLM-6B的规模较小,目前已知其具有相当多的[**局限性**](#局限性),如事实性/数学逻辑错误,可能生成有害/有偏见内容,较弱的上下文能力,自我认知混乱,以及对英文指示生成与中文指示完全矛盾的内容。请大家在使用前了解这些问题,以免产生误解。 -同时,我们基于千亿基座的[ChatGLM 模型](https://chatglm.cn)正在邀请制内测,后续将逐步扩大内测范围,欢迎申请加入内测。 - *Read this in [English](README_en.md).* ## 硬件需求 From 63b0cb4988862438c632729c2320e36c5b225853 Mon Sep 17 00:00:00 2001 From: duzx16 Date: Wed, 15 Mar 2023 22:02:03 +0800 Subject: [PATCH 02/11] Add MacOS solution --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 94e6edc..9eba416 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,8 @@ model = AutoModel.from_pretrained("THUDM/chatglm-6b", trust_remote_code=True).bf ``` 需保证空闲内存接近16G,并且推理速度会很慢。 +MacOS 如果报错`RuntimeError: Unknown platform: darwin`的话请参考这个[Issue](https://github.com/THUDM/ChatGLM-6B/issues/6#issuecomment-1470060041). + ## ChatGLM-6B示例 以下是一些使用`web_demo.py`得到的示例截图。更多ChatGLM-6B的可能,等待你来探索发现! From ca657e408011ad48a6a714cbb1500254f7c3ca98 Mon Sep 17 00:00:00 2001 From: Zhengxiao Du Date: Wed, 15 Mar 2023 23:12:29 +0800 Subject: [PATCH 03/11] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 34 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 17 ++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..17b58d2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,34 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Clone '...' +2. Install '....' +3. Run command '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Environment (please complete the following information):** + - OS: [Windows / MacOS / Linux] + - Python version [e.g. 3.8] + - transformers version [e.g. 4.23.1] + - PyTorch Version [e.g. 1.12] + - CUDA Support [The output of running `python -c "import torch; print(torch.cuda.is_available())"`] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..df81be2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Additional context** +Add any other context or screenshots about the feature request here. From 0e6c22300747d89b542fcfacda01c45e474af4bd Mon Sep 17 00:00:00 2001 From: Zhengxiao Du Date: Wed, 15 Mar 2023 23:39:32 +0800 Subject: [PATCH 04/11] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 66 ++++++++++++++-------------- 1 file changed, 32 insertions(+), 34 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 17b58d2..7dc7665 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,34 +1,32 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Clone '...' -2. Install '....' -3. Run command '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Environment (please complete the following information):** - - OS: [Windows / MacOS / Linux] - - Python version [e.g. 3.8] - - transformers version [e.g. 4.23.1] - - PyTorch Version [e.g. 1.12] - - CUDA Support [The output of running `python -c "import torch; print(torch.cuda.is_available())"`] - -**Additional context** -Add any other context about the problem here. +Issue tracker is **ONLY** used for reporting bugs. + + + +## Expected Behavior + + +## Current Behavior (Screenshot) + + +## Steps to Reproduce + + +1. +2. +3. +4. + +## Environment + + + + + + + + +## Detailed Description + + +## Possible Implementation + From 85475c9a7c94e954b25fce08c71476548b7c3add Mon Sep 17 00:00:00 2001 From: Zhengxiao Du Date: Wed, 15 Mar 2023 23:42:32 +0800 Subject: [PATCH 05/11] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 7dc7665..10eb559 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,3 +1,12 @@ +--- +name: 🐞 Bug +about: File a bug/issue +title: '[BUG] ' +labels: '' +assignees: '' + +--- + Issue tracker is **ONLY** used for reporting bugs. <!--- Provide a general summary of the issue in the Title above --> From afadc6fd3da1029926891811c90cd5e88224f2a7 Mon Sep 17 00:00:00 2001 From: Zhengxiao Du <zx-du20@mails.tsinghua.edu.cn> Date: Wed, 15 Mar 2023 23:56:35 +0800 Subject: [PATCH 06/11] Update bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 65 ++++++++++++++-------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 10eb559..f23d753 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,40 +2,39 @@ name: 🐞 Bug about: File a bug/issue title: '[BUG] <title>' -labels: '' +labels: Bug, Needs Triage assignees: '' --- -Issue tracker is **ONLY** used for reporting bugs. - -<!--- Provide a general summary of the issue in the Title above --> - -## Expected Behavior -<!--- Tell us what should happen --> - -## Current Behavior (Screenshot) -<!--- Tell us what happens instead of the expected behavior --> - -## Steps to Reproduce -<!--- Provide a link to a live example, or an unambiguous set of steps to --> -<!--- reproduce this bug. Include code to reproduce, if relevant --> -1. -2. -3. -4. - -## Environment -<!--- OS: [Windows / MacOS / Linux] --> -<!--- Python version [e.g. 3.8] --> -<!--- transformers version [e.g. 4.23.1] --> -<!--- PyTorch Version [e.g. 1.12] --> -<!--- CUDA Support [The output of running `python -c "import torch; print(torch.cuda.is_available())"`] --> - -<!--- Provide a general summary of the issue in the Title above --> - -## Detailed Description -<!--- Provide a detailed description of the change or addition you are proposing --> - -## Possible Implementation -<!--- Not obligatory, but suggest an idea for implementing addition or change --> +<!-- +Note: Please search to see if an issue already exists for the bug you encountered. +--> + +### Current Behavior: +<!-- A concise description of what you're experiencing. --> + +### Expected Behavior: +<!-- A concise description of what you expected to happen. --> + +### Steps To Reproduce: +<!-- +Example: steps to reproduce the behavior: +1. In this environment... +2. With this config... +3. Run '...' +4. See error... +--> + +### Environment: +<!-- +Example: +- OS: Ubuntu 20.04 +- Node: 13.14.0 +- npm: 7.6.3 +--> + +### Anything else: +<!-- +Links? References? Anything that will give us more context about the issue that you are encountering! +--> From c746afcd8695c377c320f3168a82d6f50195e414 Mon Sep 17 00:00:00 2001 From: Zhengxiao Du <zx-du20@mails.tsinghua.edu.cn> Date: Thu, 16 Mar 2023 00:01:09 +0800 Subject: [PATCH 07/11] Update and rename bug_report.md to bug_report.yaml --- .github/ISSUE_TEMPLATE/bug_report.md | 40 ----------------- .github/ISSUE_TEMPLATE/bug_report.yaml | 59 ++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 40 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.yaml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index f23d753..0000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -name: 🐞 Bug -about: File a bug/issue -title: '[BUG] <title>' -labels: Bug, Needs Triage -assignees: '' - ---- - -<!-- -Note: Please search to see if an issue already exists for the bug you encountered. ---> - -### Current Behavior: -<!-- A concise description of what you're experiencing. --> - -### Expected Behavior: -<!-- A concise description of what you expected to happen. --> - -### Steps To Reproduce: -<!-- -Example: steps to reproduce the behavior: -1. In this environment... -2. With this config... -3. Run '...' -4. See error... ---> - -### Environment: -<!-- -Example: -- OS: Ubuntu 20.04 -- Node: 13.14.0 -- npm: 7.6.3 ---> - -### Anything else: -<!-- -Links? References? Anything that will give us more context about the issue that you are encountering! ---> diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml new file mode 100644 index 0000000..a309c3d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -0,0 +1,59 @@ +name: 🐞 Bug +description: File a bug/issue +title: "[BUG] <title>" +labels: [Bug, Needs Triage] +body: +- type: checkboxes + attributes: + label: Is there an existing issue for this? + description: Please search to see if an issue already exists for the bug you encountered. + options: + - label: I have searched the existing issues + required: true +- type: textarea + attributes: + label: Current Behavior + description: A concise description of what you're experiencing. + validations: + required: false +- type: textarea + attributes: + label: Expected Behavior + description: A concise description of what you expected to happen. + validations: + required: false +- type: textarea + attributes: + label: Steps To Reproduce + description: Steps to reproduce the behavior. + placeholder: | + 1. In this environment... + 2. With this config... + 3. Run '...' + 4. See error... + validations: + required: false +- type: textarea + attributes: + label: Environment + description: | + examples: + - **OS**: Ubuntu 20.04 + - **Node**: 13.14.0 + - **npm**: 7.6.3 + value: | + - OS: + - Node: + - npm: + render: markdown + validations: + required: false +- type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false From a8705dbe1fcc79fc2bf645eccbfbd4629a4cb936 Mon Sep 17 00:00:00 2001 From: duzx16 <zx-du20@mails.tsinghua.edu.cn> Date: Thu, 16 Mar 2023 00:07:30 +0800 Subject: [PATCH 08/11] Update issue form --- .github/ISSUE_TEMPLATE/bug_report.yaml | 30 +++++++++++++++----------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index a309c3d..5798ad0 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -1,7 +1,7 @@ -name: 🐞 Bug +name: 🐞 Bug/Help description: File a bug/issue -title: "[BUG] <title>" -labels: [Bug, Needs Triage] +title: "[BUG/Help] <title>" +labels: [] body: - type: checkboxes attributes: @@ -13,9 +13,11 @@ body: - type: textarea attributes: label: Current Behavior - description: A concise description of what you're experiencing. + description: | + A concise description of what you're experiencing, with screenshot attached if possible. + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. validations: - required: false + required: true - type: textarea attributes: label: Expected Behavior @@ -32,28 +34,30 @@ body: 3. Run '...' 4. See error... validations: - required: false + required: true - type: textarea attributes: label: Environment description: | examples: - **OS**: Ubuntu 20.04 - - **Node**: 13.14.0 - - **npm**: 7.6.3 + - **Python**: 3.8 + - **Transformers**: 4.26.1 + - **PyTorch**: 1.12 + - **CUDA Support**: True value: | - OS: - - Node: - - npm: + - Python: + - Transformers: + - PyTorch: + - CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) : render: markdown validations: - required: false + required: true - type: textarea attributes: label: Anything else? description: | Links? References? Anything that will give us more context about the issue you are encountering! - - Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. validations: required: false From e565185c2906dfc61ecfff2add8a9ab9a87c4158 Mon Sep 17 00:00:00 2001 From: duzx16 <zx-du20@mails.tsinghua.edu.cn> Date: Thu, 16 Mar 2023 00:44:07 +0800 Subject: [PATCH 09/11] Add inbrower for web demo --- web_demo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_demo.py b/web_demo.py index 315978e..b240d27 100644 --- a/web_demo.py +++ b/web_demo.py @@ -37,4 +37,4 @@ with gr.Blocks() as demo: with gr.Column(scale=1): button = gr.Button("Generate") button.click(predict, [txt, state], [state] + text_boxes) -demo.queue().launch(share=True) +demo.queue().launch(share=True, inbrowser=True) From 69b5a37373c0f91520d99418dd7880c4bc3b43f2 Mon Sep 17 00:00:00 2001 From: duzx16 <zx-du20@mails.tsinghua.edu.cn> Date: Thu, 16 Mar 2023 09:45:14 +0800 Subject: [PATCH 10/11] Disable blank issue --- .github/ISSUE_TEMPLATE/config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..ec4bb38 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false \ No newline at end of file From 642147bf218bbd04c9f50f7f01f61808d38e2bba Mon Sep 17 00:00:00 2001 From: duzx16 <zx-du20@mails.tsinghua.edu.cn> Date: Thu, 16 Mar 2023 09:52:02 +0800 Subject: [PATCH 11/11] Update feature request template --- .github/ISSUE_TEMPLATE/feature_request.md | 17 -------------- .github/ISSUE_TEMPLATE/feature_request.yml | 26 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 17 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.yml diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index df81be2..0000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..19725d6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,26 @@ +name: Feature request +description: Suggest an idea for this project +title: "[Feature] <title>" +labels: [] +body: +- type: textarea + attributes: + label: Is your feature request related to a problem? Please describe. + description: | + A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + validations: + required: false +- type: textarea + attributes: + label: Solutions + description: | + Describe the solution you'd like + A clear and concise description of what you want to happen. + validations: + required: true +- type: textarea + attributes: + label: Additional context + description: Add any other context or screenshots about the feature request here. + validations: + required: false