X-D-Lab / LangChain-ChatGLM-Webui

基于LangChain和ChatGLM-6B等系列LLM的针对本地知识库的自动问答
Apache License 2.0
3.12k stars 469 forks source link

不支持通义千问Qwen-7B-chat #112

Open lovelyjuice opened 1 year ago

lovelyjuice commented 1 year ago

把模型路径改成chatglm,试图以chatglm方式加载模型,但是存在以下问题

  1. 通义千问使用AutoModelForCausalLM而不是AutoModel
  2. 通义千问的model.chat()函数不支持 max_length 和 temperature 参数
  3. AutoModelForCausalLM().from_pretrained().half() 中 half() 函数无法使用,需要删除
thomas-yanxin commented 1 year ago

提个PR吧