Skip to content

Commit

Permalink
Update t5.py
Browse files Browse the repository at this point in the history
  • Loading branch information
uakarsh committed Apr 23, 2023
1 parent f54da42 commit 31246f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/t5.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ def compute_vertical_horizontal_bias(self, total_boxes: int = 512, device=None):
num_buckets=self.relative_attention_num_buckets,
max_distance=self.relative_attention_max_distance,
)


## It has to be like this : https://github.com/microsoft/i-Code/blob/d933ae53eb9dec057e605fa4c89ea701629c5b9d/i-Code-Doc/core/models/embedding/relative/relative.py#L175
## so change is needed here
v_distances_bucket = self._relative_position_bucket(
v_distances, # shape (query_length, key_length)
bidirectional=(not self.is_decoder),
Expand Down

0 comments on commit 31246f5

Please sign in to comment.