X-D-Lab-Shaoziyao
X-D-Lab-Shaoziyao
请尝试在代码开头(至少在报错之前)加入以下代码: import sys #reload()之前必须要引入模块 reload(sys) sys.setdefaultencoding('utf-8')
由你的报错可见 模型运行在了CPU上,若想让ChatGLM-6B运行在CPU上,请按照下列步骤进行: 1.安装gcc编译器 安装时需要用cpu运行,必须安装gcc与openmp 2.修改配置内容 ChatGLM-6B/quantization.py文件中注释掉from cpm_kernels.kernels.base import LazyKernelCModule, KernelFunction, round_up kernels = Kernel(…)注释掉,替换为kernels =CPUKernel() 把已缓存的.cache目录下文件删掉 例如你的文件地址C:\Users\Administrator.cache\huggingface\modules\transformers_modules\THUDM\chatglm-6b-int4\6c5205c47d0d2f7ea2e44715d279e537cae0911f\quantization_kernels_ 最后,修改cli_demo.py中的内容model = AutoModel.from_pretrained("THUDM\ChatGLM-6B", trust_remote_code=True).half().cuda()为:model = AutoModel.from_pretrained("THUDM\ChatGLM-6B", trust_remote_code=True).float()
请确认model.create{****}中是否有或者参数stream值是否为True, 例如: response = model.create( model='****', messages=“*****”, temperature=0.5, stream=True )
请安装poppler 下载解压后将bin文件夹添加进系统环境变量之中
根据报错,似乎是Vicuna-7b模型不支持.generate()方法,可以的话请换一个例如chat-gpt 7B模型再尝试一下 推荐使用生成式LLM
First of all, congratulations on being accepted by CVPR! Secondly, due to graphics card limitations, do you have code reference for LORA fine-tuning? I only have an A800.