fix: processor method apply_chat_template incorrect reference
#64
by
eddtsoi
- opened
- 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.
|
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:
|