text-generation-webui加载chatglm2-6b时,报错,要求set the option trust_remote_code=True

背景

使用text-generation-webui加载chatglm2-6b大模型时报错,要求设置option trust_remote_code=True,一开始没注意界面,去翻找配置文件,后来发现,就在Model界面,有一个复选框,可以进行设置!
THUDM_chatglm2-6b requires you to execute the configuration file in that repo on your local machine. Make sure you have read the code there to avoid malicious use, then set the option trust_remote_code=True to remove this error.

解决方案

1、如下图,勾选后,点击【load】:
在这里插入图片描述
2、此时,可以看到命令行中,开始在下载和加载checkpoint了
在这里插入图片描述
3、待加载完后,可以看到【Successfully loaded THUDM_chatglm2-6b】的输出
在这里插入图片描述
4、回到【Text generation】,输入【你是谁?】,可以看到回复了是【ChatGLM2-6B人工智能助手…】
在这里插入图片描述
大功告成!

整理不易,点个赞吧!

整理不易,点个赞吧!

整理不易,点个赞吧!

猜你喜欢

转载自blog.csdn.net/qq_40600379/article/details/132005787