myownskyW7 yuhangzang commited on
Commit
bf51a2c
1 Parent(s): 4e73c1d

Update modeling_internlm_xcomposer2.py (#13)

Browse files

- Update modeling_internlm_xcomposer2.py (3487ceec51345c7bcd8f4f6b019ba256c548d764)


Co-authored-by: Yuhang Zang <yuhangzang@users.noreply.huggingface.co>

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