-
Notifications
You must be signed in to change notification settings - Fork 492
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pretty-print tokens in
llm_attr
methods (#1348)
Summary: Pull Request resolved: #1348 Convert ids to tokens without ugly unicode characters (e.g., Ġ). See: huggingface/transformers#4786 and https://discuss.huggingface.co/t/bpe-tokenizers-and-spaces-before-words/475/2 This is the preferred function over tokenizer.convert_ids_to_tokens() for user-facing data. Quote from links: > Spaces are converted in a special character (the Ġ) in the tokenizer prior to > BPE splitting mostly to avoid digesting spaces since the standard BPE algorithm > used spaces in its process Reviewed By: csauper Differential Revision: D62672912 fbshipit-source-id: 1bafdd7231131cf5b12864a73aaf81e40e6d206c
- Loading branch information
1 parent
b7ca840
commit 6636f4d
Showing
6 changed files
with
203 additions
and
43 deletions.
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
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
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
Oops, something went wrong.