eddtsoi commited on
Commit
7f0193b
·
verified ·
1 Parent(s): 287e3f8

fix: processor method apply_chat_template incorrect reference

Browse files
Files changed (1) hide show
  1. modeling_minicpmv.py +1 -1
modeling_minicpmv.py CHANGED
@@ -321,7 +321,7 @@ class MiniCPMV(MiniCPMVPreTrainedModel):
321
  sys_msg = {'role': 'system', 'content': system_prompt}
322
  copy_msgs = [sys_msg] + copy_msgs
323
 
324
- prompt = processor.tokenizer.apply_chat_template(copy_msgs, tokenize=False, add_generation_prompt=True)
325
  inputs = processor(prompt, images, return_tensors="pt", max_length=max_inp_length).to(self.device)
326
 
327
  if sampling:
 
321
  sys_msg = {'role': 'system', 'content': system_prompt}
322
  copy_msgs = [sys_msg] + copy_msgs
323
 
324
+ prompt = processor.apply_chat_template(copy_msgs, tokenize=False, add_generation_prompt=True)
325
  inputs = processor(prompt, images, return_tensors="pt", max_length=max_inp_length).to(self.device)
326
 
327
  if sampling: