You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?
我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions
该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?
我已经搜索过FAQ | I have searched FAQ
当前行为 | Current Behavior
依据教程,运行如下代码:
import sys
sys.path.append('/home/aistudio/external-libraries')
model_dir='/home/aistudio/work/qwen/Qwen-VL-Chat'
from transformers import AutoModelForCausalLM, AutoTokenizer
from transformers.generation import GenerationConfig
import torch
torch.manual_seed(1234)
tokenizer = AutoTokenizer.from_pretrained(model_dir, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_dir, device_map="auto", bf16 = True, trust_remote_code=True).eval()
model.generation_config = GenerationConfig.from_pretrained(model_dir, trust_remote_code=True)
query = tokenizer.from_list_format([
{'image': 'Rebecca_(1939_poster).jpeg'},
{'text': 'What is the name of the movie in the poster?'},
])
response, history = model.chat(tokenizer, query=query, history=None)
print(response)
但是报错
NotImplementedError: Cannot copy out of meta tensor; no data!
期望行为 | Expected Behavior
No response
复现方法 | Steps To Reproduce
No response
运行环境 | Environment
No response
备注 | Anything else?
No response
The text was updated successfully, but these errors were encountered:
是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?
该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?
当前行为 | Current Behavior
依据教程,运行如下代码:
import sys
sys.path.append('/home/aistudio/external-libraries')
model_dir='/home/aistudio/work/qwen/Qwen-VL-Chat'
from transformers import AutoModelForCausalLM, AutoTokenizer
from transformers.generation import GenerationConfig
import torch
torch.manual_seed(1234)
tokenizer = AutoTokenizer.from_pretrained(model_dir, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_dir, device_map="auto", bf16 = True, trust_remote_code=True).eval()
model.generation_config = GenerationConfig.from_pretrained(model_dir, trust_remote_code=True)
query = tokenizer.from_list_format([
{'image': 'Rebecca_(1939_poster).jpeg'},
{'text': 'What is the name of the movie in the poster?'},
])
response, history = model.chat(tokenizer, query=query, history=None)
print(response)
但是报错
NotImplementedError: Cannot copy out of meta tensor; no data!
期望行为 | Expected Behavior
No response
复现方法 | Steps To Reproduce
No response
运行环境 | Environment
No response
备注 | Anything else?
No response
The text was updated successfully, but these errors were encountered: