Skip to content

Commit

Permalink
address #17
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Dec 21, 2023
1 parent 5ee9553 commit 27e6332
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name = 'toolformer-pytorch',
packages = find_packages(exclude=[]),
version = '0.0.29',
version = '0.0.30',
license='MIT',
description = 'Toolformer - Pytorch',
author = 'Phil Wang',
Expand Down
2 changes: 1 addition & 1 deletion toolformer_pytorch/toolformer_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ def weight_and_mask(
):
t = get_arange_start_at_token_id(token_ids, token_id, pad_id)
weights = weighting_fn(t)
return weights.masked_fill(weights == pad_id, 0.)
return weights.masked_fill(t == pad_id, 0.)

FilteredResults = namedtuple('FilteredResults', [
'num_passed',
Expand Down

0 comments on commit 27e6332

Please sign in to comment.