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
self.tokenizer = AutoTokenizer.from_pretrained(model_path,
trust_remote_code=True)
self.tokenizer.padding_side = 'left'
self.tokenizer.pad_token_id = self.tokenizer.eod_id
self.prompt = '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n<|im_start|>user\nPicture 1: <img>{}</img>\nPlease find the object. The object description is as follows:<ref>{}</ref><|im_end|>\n<|im_start|>assistant\n'
是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?
该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?
当前行为 | Current Behavior
self.model = AutoModelForCausalLM.from_pretrained(
model_path, device_map='cuda', trust_remote_code=True).eval()
token_result = self.tokenizer([prompt],
return_tensors='pt',
padding='longest')
input_ids = token_result.input_ids # print(self.tokenizer.decode(input_ids[0]))
模型预测全部乱码
期望行为 | Expected Behavior
模型应该正常预测输出。
复现方法 | Steps To Reproduce
No response
运行环境 | Environment
备注 | Anything else?
No response
The text was updated successfully, but these errors were encountered: