常见问题

April 27, 2023 · View on GitHub

模型下载问题

对于国内用户来说, 直接从HuggingFace下载模型可能会遇到网络阻碍, 您可以先通过以下链接提前将模型下载并解压到本地:

large language modelEmbedding model
ChatGLM-6Btext2vec-large-chinese
ChatGLM-6B-int8ernie-3.0-base-zh
ChatGLM-6B-int4ernie-3.0-nano-zh
ChatGLM-6B-int4-qeernie-3.0-xbase-zh
Vicuna-7b-1.1simbert-base-chinese
BELLE-LLaMA-7B-2M
BELLE-LLaMA-13B-2M

然后在 config.py 文件中对以下字段进行修改:


embedding_model_dict = {
    "ernie-tiny": "nghuyong/ernie-3.0-nano-zh",
    "ernie-base": "your_model_path",
    "ernie-medium": "your_model_path",
    "ernie-xbase": "your_model_path",
    "text2vec-base": "your_model_path",
    'simbert-base-chinese': 'your_model_path',
    'paraphrase-multilingual-MiniLM-L12-v2': "your_model_path"
}

具体路径仿见issue 36issue 37

爆显存问题

  • ChatGLM-6B 模型硬件需求
    量化等级最低 GPU 显存(推理)最低 GPU 显存(高效参数微调)
    FP16(无量化)13 GB14 GB
    INT88 GB9 GB
    INT46 GB7 GB

若您的设备显存有限

  1. 可以选择 ChatGLM-6B-int8 或者 ChatGLM-6B-int4 以及选择较小的Embedding Model进行组合使用.
  2. 参数选择时,可以选择叫小的history进行尝试.

常见的细节问题

  1. 需要等文件完全上传之后再进行对话.
  2. 若detectron2安装有问题, 可以执行:pip install git+https://openi.pcl.ac.cn/Learning-Develop-Union/detectron2.git.
  3. 目前项目仅在linux环境下进行测试,win/mac下或许存在一些未知问题.