Skip to content
Merged
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion src/transformers/models/bloom/modeling_bloom.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,8 @@ def __init__(self, config: BloomConfig):

self.gradient_checkpointing = False

self.build_alibi_tensor = build_alibi_tensor

# Initialize weights and apply final processing
self.post_init()

Expand Down Expand Up @@ -750,7 +752,7 @@ def forward(
else:
attention_mask = attention_mask.to(hidden_states.device)

alibi = build_alibi_tensor(attention_mask, self.num_heads, dtype=hidden_states.dtype)
alibi = self.build_alibi_tensor(attention_mask, self.num_heads, dtype=hidden_states.dtype)

causal_mask = self._prepare_attn_mask(
attention_mask,
Expand Down