新增处理"OutOfMemoryError: CUDA out of memory"和"Resource averaged_perceptron_tagger not found"的方法
This commit is contained in:
parent
f147043253
commit
4b2a597e12
14
docs/FAQ.md
14
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.`报错,该如何解决?
|
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` 存储路径下。
|
A4: 方法一:将 https://github.com/nltk/nltk_data/blob/gh-pages/packages/taggers/averaged_perceptron_tagger.zip 下载,解压放到 `nltk_data/taggers` 存储路径下。
|
||||||
|
|
||||||
`nltk_data` 存储路径可以通过 `nltk.data.path` 查询。
|
`nltk_data` 存储路径可以通过 `nltk.data.path` 查询。
|
||||||
|
A4: 方法二:科学上网,用梯子,执行 python代码
|
||||||
|
```
|
||||||
|
import nltk
|
||||||
|
nltk.download()
|
||||||
|
```
|
||||||
---
|
---
|
||||||
|
|
||||||
Q5: 本项目可否在 colab 中运行?
|
Q5: 本项目可否在 colab 中运行?
|
||||||
|
|
@ -101,4 +105,10 @@ embedding_model_dict = {
|
||||||
"text2vec": "/Users/liuqian/Downloads/ChatGLM-6B/text2vec-large-chinese"
|
"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会变短,会减少内存的占用。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue