Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicate tokens in tokenizers #78

Open
mmoskal opened this issue Mar 18, 2024 · 1 comment
Open

duplicate tokens in tokenizers #78

mmoskal opened this issue Mar 18, 2024 · 1 comment
Assignees

Comments

@mmoskal
Copy link
Member

mmoskal commented Mar 18, 2024

For example, the llama tokenizer has "<0x20>" as 35 and "▁" (space) as 29871, as well as "<0x21>" as 36 and "!" as 29991, etc.

We need to:

  • pick the canonical form (29871 probably)
  • have a mapping on the side that if 29871 is allowed also allows 35 in TokenSet (apply it after "compute_bias()" etc).
@mmoskal mmoskal self-assigned this Mar 18, 2024
@mmoskal
Copy link
Member Author

mmoskal commented Mar 18, 2024

mostly done, need to call apply_duplicates() in more places in particular somewhere around return_logit_bias() and possibly after any user-level update to token set

mmoskal added a commit that referenced this issue Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant