yuhangzang
commited on
Commit
•
3487cee
1
Parent(s):
4e73c1d
Update modeling_internlm_xcomposer2.py
Browse files
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,
|
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
|