Skip to content

Commit

Permalink
Update attention.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Firenze11 authored Jan 24, 2025
1 parent 42f52cd commit 20a1b4c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions axlearn/common/attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -1245,8 +1245,10 @@ def forward(
cfg = self.config
if positions is not None and max_seq_len is not None:
if max_seq_len != positions.shape[-1]:
raise ValueError("Both `positions` and `max_seq_len` are provided and they "
"do not match. You only need to provide one of them.")
raise ValueError(
"Both `positions` and `max_seq_len` are provided and they "
"do not match. You only need to provide one of them."
)
if positions is None:
if max_seq_len is None:
raise ValueError(
Expand Down

0 comments on commit 20a1b4c

Please sign in to comment.