From 4b2a597e1249ee27950e45fe7a98cb52875c8573 Mon Sep 17 00:00:00 2001 From: dong Date: Thu, 20 Apr 2023 10:21:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=A4=84=E7=90=86"OutOfMemor?= =?UTF-8?q?yError:=20CUDA=20out=20of=20memory"=E5=92=8C"Resource=20average?= =?UTF-8?q?d=5Fperceptron=5Ftagger=20not=20found"=E7=9A=84=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/FAQ.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/FAQ.md b/docs/FAQ.md index 622fd06..f9b4caa 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -28,10 +28,14 @@ A3: https://github.com/nltk/nltk_data/raw/gh-pages/packages/tokenizers/punkt.zip Q4: 使用过程中 Python 包`nltk`发生了`Resource averaged_perceptron_tagger not found.`报错,该如何解决? -A4: 将 https://github.com/nltk/nltk_data/blob/gh-pages/packages/taggers/averaged_perceptron_tagger.zip 下载,解压放到 `nltk_data/taggers` 存储路径下。 - - `nltk_data` 存储路径可以通过 `nltk.data.path` 查询。 +A4: 方法一:将 https://github.com/nltk/nltk_data/blob/gh-pages/packages/taggers/averaged_perceptron_tagger.zip 下载,解压放到 `nltk_data/taggers` 存储路径下。 + `nltk_data` 存储路径可以通过 `nltk.data.path` 查询。 +A4: 方法二:科学上网,用梯子,执行 python代码 +``` +import nltk +nltk.download() +``` --- Q5: 本项目可否在 colab 中运行? @@ -101,4 +105,10 @@ embedding_model_dict = { "text2vec": "/Users/liuqian/Downloads/ChatGLM-6B/text2vec-large-chinese" } ``` +--- +Q10: 执行`python cli_demo.py`过程中,显卡内存爆了,提示"OutOfMemoryError: CUDA out of memory" + +A10: 将VECTOR_SEARCH_TOP_K和LLM_HISTORY_LEN的值设小一点,比如VECTOR_SEARCH_TOP_K=5和LLM_HISTORY_LEN=2,这样由query和context拼接得到的prompt会变短,会减少内存的占用。 + +---