We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
执行如下代码报错,是什么情况呢 from transformers import AutoTokenizer, AutoModelForCausalLM model_path = "/mmu_cd_ssd/zhangce07/MLLM/Qwen/Qwen-VL-Chat/"
qwen_model = AutoModelForCausalLM.from_pretrained(model_path, device_map="auto", trust_remote_code=True).eval()
query = qwen_tokenizer.from_list_format([ {'image': 'xxx'}, # Either a local path or an url {'text': "xxx"}, ])
response, history = qwen_model.chat(qwen_tokenizer, query=query, history=None) print(response)
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:5 and cuda:6!
No response
- OS: - Python: - Transformers: - PyTorch: - CUDA (`python -c 'import torch; print(torch.version.cuda)'`):
The text was updated successfully, but these errors were encountered:
No branches or pull requests
是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?
该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?
当前行为 | Current Behavior
执行如下代码报错,是什么情况呢
from transformers import AutoTokenizer, AutoModelForCausalLM
model_path = "/mmu_cd_ssd/zhangce07/MLLM/Qwen/Qwen-VL-Chat/"
qwen_model = AutoModelForCausalLM.from_pretrained(model_path, device_map="auto", trust_remote_code=True).eval()
query = qwen_tokenizer.from_list_format([
{'image': 'xxx'}, # Either a local path or an url
{'text': "xxx"},
])
response, history = qwen_model.chat(qwen_tokenizer, query=query, history=None)
print(response)
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:5 and cuda:6!
期望行为 | Expected Behavior
No response
复现方法 | Steps To Reproduce
No response
运行环境 | Environment
备注 | Anything else?
No response
The text was updated successfully, but these errors were encountered: