Skip to content

Commit

Permalink
fix norm
Browse files Browse the repository at this point in the history
  • Loading branch information
Mddct committed Aug 7, 2024
1 parent d22745f commit f599bf8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wenet/transformer/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,9 @@ def forward(
q = WENET_APPLY_ROTARY_EMB[self.style](q, pos_emb)
k = WENET_APPLY_ROTARY_EMB[self.style](k, pos_emb)

if self.qk_norm:
q = self.q_norm(q)
k = self.k_norm(k)
k, v, new_cache = self._update_kv_and_cache(k,
v,
cache,
Expand Down

0 comments on commit f599bf8

Please sign in to comment.