Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: sam1373 <samuelkriman@gmail.com>
  • Loading branch information
sam1373 committed May 1, 2023
1 parent e878b3d commit a373b37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nemo/collections/nlp/modules/common/megatron/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,8 +404,8 @@ def forward(
# =====================

if self.transient_global_tokens:
hidden_states = _pad_to_multiple(hidden_states, self.global_tokens_spacing, 0)
avg_hidden_states = hidden_states.reshape(
avg_hidden_states = _pad_to_multiple(hidden_states, self.global_tokens_spacing, 0)
avg_hidden_states = avg_hidden_states.reshape(
self.global_tokens_spacing, -1, hidden_states.shape[-2], hidden_states.shape[-1]
)
avg_hidden_states = avg_hidden_states.mean(dim=0)
Expand Down

0 comments on commit a373b37

Please sign in to comment.