jonathanjordan21 commited on
Commit
6dc2064
·
verified ·
1 Parent(s): f67e9ff

Update modeling_qwen2_nomic_vision.py

Browse files
Files changed (1) hide show
  1. modeling_qwen2_nomic_vision.py +1 -1
modeling_qwen2_nomic_vision.py CHANGED
@@ -933,7 +933,7 @@ class Qwen2NomicVisionModel(Qwen2NomicVisionPreTrainedModel):
933
  img_emb = self.vision_model(image).last_hidden_state
934
  img_embeddings = F.normalize(img_emb[:, 0], p=2, dim=1)
935
  mix = self.mix_linear(img_embeddings).unsqueeze(1)
936
- hidden_states = torch.cat((mix, hidden_states), dim=1)
937
  # hidden_states = hidden_states.concat()
938
 
939
  # add hidden states from the last decoder layer
 
933
  img_emb = self.vision_model(image).last_hidden_state
934
  img_embeddings = F.normalize(img_emb[:, 0], p=2, dim=1)
935
  mix = self.mix_linear(img_embeddings).unsqueeze(1)
936
+ hidden_states = torch.cat((hidden_states, mix), dim=1)
937
  # hidden_states = hidden_states.concat()
938
 
939
  # add hidden states from the last decoder layer