missing 1 required positional argument: 'device' #682
Unanswered
anyhow2002
asked this question in
Q&A
Replies: 1 comment 4 replies
-
transformers库太新导致的 |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
ChatGLM:Traceback (most recent call last):
File "C:\NLP\chatGLM2\chatglm2-6b\cli_demo.py", line 67, in
main()
File "C:\NLP\chatGLM2\chatglm2-6b\cli_demo.py", line 54, in main
for response, history, past_key_values in model.stream_chat(tokenizer, query, history=history,
File "C:\Users\aa\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\utils_contextlib.py", line 35, in generator_context
response = gen.send(None)
File "C:\Users\aa.cache\huggingface\modules\transformers_modules\chatglm2-6b\modeling_chatglm.py", line 1063, in stream_chat
for outputs in self.stream_generate(**inputs, past_key_values=past_key_values,
File "C:\Users\aa\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\utils_contextlib.py", line 35, in generator_context
response = gen.send(None)
File "C:\Users\aa.cache\huggingface\modules\transformers_modules\chatglm2-6b\modeling_chatglm.py", line 1142, in stream_generate
logits_warper = self._get_logits_warper(generation_config)
TypeError: GenerationMixin._get_logits_warper() missing 1 required positional argument: 'device'
不知道为什么总是提示少一个参数'device'啊?
Beta Was this translation helpful? Give feedback.
All reactions