czczup commited on
Commit
0e6d592
1 Parent(s): 0223f73

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. modeling_internvl_chat.py +3 -0
modeling_internvl_chat.py CHANGED
@@ -77,6 +77,8 @@ class InternVLChatModel(PreTrainedModel):
77
  )
78
 
79
  self.img_context_token_id = None
 
 
80
 
81
  def forward(
82
  self,
@@ -256,6 +258,7 @@ class InternVLChatModel(PreTrainedModel):
256
  self.img_context_token_id = img_context_token_id
257
 
258
  template = get_conv_template(self.template)
 
259
  eos_token_id = tokenizer.convert_tokens_to_ids(template.sep)
260
 
261
  history = [] if history is None else history
 
77
  )
78
 
79
  self.img_context_token_id = None
80
+ self.conv_template = get_conv_template(self.template)
81
+ self.system_message = self.conv_template.system_message
82
 
83
  def forward(
84
  self,
 
258
  self.img_context_token_id = img_context_token_id
259
 
260
  template = get_conv_template(self.template)
261
+ template.system_message = self.system_message
262
  eos_token_id = tokenizer.convert_tokens_to_ids(template.sep)
263
 
264
  history = [] if history is None else history