-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow to_str_tokens of 1x1 tensors and add HookedTransformer.to_singl… (
#245) * Allow to_str_tokens of 1x1 tensors and add HookedTransformer.to_single_str_token * Implement changes and add unit test * Fix dim=1 syntax and use unsqueezing instead * Add torch.Tensor and np.ndarray type hints to the function signature * Add a couple more test cases * Add pytest fixtures * Change type signature * Upper case T tensor * Int, lowercase T tensor * Int, not float * Make the tensors actually conform to the shape specifications * Address Neel's comments * Dummy commit to rerun CI/CD
- Loading branch information
1 parent
c034846
commit 6eca22f
Showing
2 changed files
with
78 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters