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

add prefix space ignored in llama #29625 #30964

Merged
merged 4 commits into from
May 24, 2024
Merged

add prefix space ignored in llama #29625 #30964

merged 4 commits into from
May 24, 2024

Conversation

itazap
Copy link
Contributor

@itazap itazap commented May 22, 2024

What does this PR do?

  • add param add_prefix_space to llama tokenizer

Fixes #29625

Before submitting

  • modified test_no_prefix_space to test test_no_prefix_space=False

Who can review?

@ArthurZucker

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@itazap itazap marked this pull request as ready for review May 22, 2024 14:03
@itazap itazap requested a review from ArthurZucker May 22, 2024 14:03
Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing! 🔥 Yep the test was missing the case when we actually do want it to be forcefully converted from slow

@itazap itazap merged commit 7f6e874 into main May 24, 2024
21 checks passed
@itazap itazap deleted the add_prefix_space branch May 24, 2024 08:03
itazap added a commit that referenced this pull request May 24, 2024
* add prefix space ignored in llama #29625

* adding test with add_prefix_space=False

* ruff

---------

Co-authored-by: Ita Zaporozhets <itazaporozhets@Itas-MBP.localdomain>
zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request Jun 11, 2024
* add prefix space ignored in llama huggingface#29625

* adding test with add_prefix_space=False

* ruff

---------

Co-authored-by: Ita Zaporozhets <itazaporozhets@Itas-MBP.localdomain>
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

Successfully merging this pull request may close these issues.

add_prefix_space won't be respected by Llama tokenizer
3 participants