THUDM / WebGLM

WebGLM: An Efficient Web-enhanced Question Answering System (KDD 2023)
Apache License 2.0
1.57k stars 135 forks source link

关于max_new_tokens的运行错误,请问如何修改 #50

Open izhangxueyong opened 1 year ago

izhangxueyong commented 1 year ago

关于max_new_tokens的运行错误,请问如何修改? 错误描述如下: Input length of input_ids is 1303, but max_length is set to 1024. This can lead to unexpected behavior. You should consider increasing max_new_tokens.

hanyullai commented 1 year ago

你好!这个错误是因为模型的最大输入长度是1024,但是推理输入的长度是1303,超过了最大限制。由于模型及浏览器检索的输入限制,建议将prompt长度缩短到支持的范围内。