Upload folder using huggingface_hub
Browse files- generation_config.json +6 -1
- modeling_intern_vit.py +1 -1
generation_config.json
CHANGED
@@ -1,4 +1,9 @@
|
|
1 |
{
|
2 |
"_from_model_config": true,
|
3 |
-
"transformers_version": "4.37.2"
|
|
|
|
|
|
|
|
|
|
|
4 |
}
|
|
|
1 |
{
|
2 |
"_from_model_config": true,
|
3 |
+
"transformers_version": "4.37.2",
|
4 |
+
"eos_token_id": [
|
5 |
+
2,
|
6 |
+
32000,
|
7 |
+
32007
|
8 |
+
]
|
9 |
}
|
modeling_intern_vit.py
CHANGED
@@ -287,7 +287,7 @@ class InternVisionEncoderLayer(nn.Module):
|
|
287 |
Args:
|
288 |
hidden_states (`Tuple[torch.FloatTensor, Optional[torch.FloatTensor]]`): input to the layer of shape `(batch, seq_len, embed_dim)`
|
289 |
"""
|
290 |
-
hidden_states = hidden_states + self.drop_path1(self.attn(self.norm1(hidden_states)) * self.ls1)
|
291 |
|
292 |
hidden_states = hidden_states + self.drop_path2(self.mlp(self.norm2(hidden_states)) * self.ls2)
|
293 |
|
|
|
287 |
Args:
|
288 |
hidden_states (`Tuple[torch.FloatTensor, Optional[torch.FloatTensor]]`): input to the layer of shape `(batch, seq_len, embed_dim)`
|
289 |
"""
|
290 |
+
hidden_states = hidden_states + self.drop_path1(self.attn(self.norm1(hidden_states).to(hidden_states.dtype)) * self.ls1)
|
291 |
|
292 |
hidden_states = hidden_states + self.drop_path2(self.mlp(self.norm2(hidden_states)) * self.ls2)
|
293 |
|