Skip to content

Commit

Permalink
Merge pull request #11 from Separius/patch-1
Browse files Browse the repository at this point in the history
fix small typo in _diagonaled_mm
  • Loading branch information
ibeltagy authored Apr 14, 2020
2 parents 97f394e + 9a70f9d commit 265314d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion longformer/diagonaled_mm_tvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def _diagonaled_mm(t1: torch.Tensor, t2: torch.Tensor, w: int, d: Union[torch.Te
autoregressive: bool = False):
'''Calls the compiled function after checking the input format. This function is called in three different modes.
t1 x t2 = r ==> t1 and t2 are not diagonaled, but r is. Useful for query x key = attention_scores
t1 x t2 = r ==> t1 is diagonaled, but t2 and 2 are not. Useful to compuate attantion_scores x value = context
t1 x t2 = r ==> t1 is diagonaled, but t2 and r are not. Useful to compuate attantion_scores x value = context
t1 x t2 = r ==> t1 is diagonaled and it should be transposed, but t2 and r are not diagonaled. Useful in some of
the calculations in the backward pass.
'''
Expand Down

0 comments on commit 265314d

Please sign in to comment.