HexPlex0xFF
commited on
Commit
·
0a3c458
1
Parent(s):
316a14d
fixed bugs
Browse files- build_mlp.py +1 -1
- modeling_internlm_xcomposer2.py +3 -3
build_mlp.py
CHANGED
@@ -84,7 +84,7 @@ class CLIPVisionTower(nn.Module):
|
|
84 |
pos_tokens = pos_embed_checkpoint[:, num_extra_tokens:]
|
85 |
pos_tokens = pos_tokens.reshape(-1, orig_size, orig_size,
|
86 |
embedding_size).permute(
|
87 |
-
0, 3, 1, 2)
|
88 |
pos_tokens = torch.nn.functional.interpolate(
|
89 |
pos_tokens,
|
90 |
size=(new_size, new_size),
|
|
|
84 |
pos_tokens = pos_embed_checkpoint[:, num_extra_tokens:]
|
85 |
pos_tokens = pos_tokens.reshape(-1, orig_size, orig_size,
|
86 |
embedding_size).permute(
|
87 |
+
0, 3, 1, 2).float()
|
88 |
pos_tokens = torch.nn.functional.interpolate(
|
89 |
pos_tokens,
|
90 |
size=(new_size, new_size),
|
modeling_internlm_xcomposer2.py
CHANGED
@@ -483,9 +483,9 @@ class InternLMXComposer2ForCausalLM(InternLM2PreTrainedModel):
|
|
483 |
top_p: float = 0.8,
|
484 |
repetition_penalty: float=1.005,
|
485 |
meta_instruction:
|
486 |
-
str = 'You are an AI assistant whose name is InternLM-XComposer
|
487 |
-
'- InternLM-XComposer
|
488 |
-
'- InternLM-XComposer
|
489 |
**kwargs,
|
490 |
):
|
491 |
if image is None:
|
|
|
483 |
top_p: float = 0.8,
|
484 |
repetition_penalty: float=1.005,
|
485 |
meta_instruction:
|
486 |
+
str = 'You are an AI assistant whose name is InternLM-XComposer.\n'
|
487 |
+
'- InternLM-XComposer is a conversational language model that is developed by Shanghai AI Laboratory. It is designed to be helpful, honest, and harmless.\n'
|
488 |
+
'- InternLM-XComposer can understand and communicate fluently in English. You must respond only in English.',
|
489 |
**kwargs,
|
490 |
):
|
491 |
if image is None:
|