Skip to content

Commit

Permalink
Add attention_mask argument to loss_fn() and lm_cross_entropy_loss() …
Browse files Browse the repository at this point in the history
…and adjust the cross entropy calculation to ignore masked (padding) tokens.
  • Loading branch information
UFO-101 committed Oct 18, 2024
1 parent 15ae297 commit 7eb5679
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
description="An implementation of transformers tailored for mechanistic interpretability."
license="MIT"
name="transformer-lens"
packages=[{include="transformer_lens"}]
packages=[{include="transformer_lens"}, {include="transformer_lens/py.typed"}]
readme="README.md"
# Version is automatically set by the pipeline on release
version="0.0.0"
Expand Down
Empty file added transformer_lens/py.typed
Empty file.

0 comments on commit 7eb5679

Please sign in to comment.