yuhangzang commited on
Commit
3487cee
1 Parent(s): 4e73c1d

Update modeling_internlm_xcomposer2.py

Browse files
Files changed (1) hide show
  1. modeling_internlm_xcomposer2.py +1 -1
modeling_internlm_xcomposer2.py CHANGED
@@ -421,7 +421,7 @@ class InternLMXComposer2ForCausalLM(InternLM2PreTrainedModel):
421
  image, text)
422
  else:
423
  to_regress_tokens, targets = self.text2emb(
424
- text, add_special=True)
425
  to_regress_embeds = self.model.tok_embeddings(
426
  to_regress_tokens.input_ids)
427
  attention_mask = to_regress_tokens.attention_mask
 
421
  image, text)
422
  else:
423
  to_regress_tokens, targets = self.text2emb(
424
+ text, add_special_tokens=True)
425
  to_regress_embeds = self.model.tok_embeddings(
426
  to_regress_tokens.input_ids)
427
  attention_mask = to_regress_tokens.attention_mask