Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion torchTextClassifiers/model/components/text_embedder.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def forward(
attn_mask = None
if attention_mask is not None:
# Convert: 0 (padding) -> True (mask out), 1 (real) -> False (attend to)
attn_mask = attention_mask == 0 # (B, T)
attn_mask = attention_mask == 1 # (B, T)
# Expand to (B, 1, 1, T) for broadcasting across heads and queries
attn_mask = attn_mask.unsqueeze(1).unsqueeze(2) # (B, 1, 1, T)

Expand Down