Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/yuya/add_llama_vlm_hf' into yuya…
Browse files Browse the repository at this point in the history
…/add_llama_vlm_hf
  • Loading branch information
yaoyu-33 committed Oct 25, 2024
2 parents ac5fc29 + 0d62a47 commit 3ff21bf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nemo/collections/vlm/llama/model/vision.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,7 @@ def forward(self, images: torch.Tensor, ar_ids: torch.Tensor) -> torch.Tensor:
attention_mask=attn_mask,
return_intermediate=self.return_intermediate,
)
# [ntok * num_concurrent_media * num_chunks, bsz, hidden_size] -> [bsz, ntok * num_concurrent_media * num_chunks, hidden_size]
x, int_x = x.transpose(0, 1).contiguous(), int_x.transpose(0, 1).contiguous()
x = self.ln_post(x)
x = x.reshape(bsz * num_concurrent_media, num_chunks, ntok + npad, dim)
Expand Down

0 comments on commit 3ff21bf

Please sign in to comment.