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

[Gemma, Llama] Remove unused attribute #30327

Closed

Conversation

NielsRogge
Copy link
Contributor

What does this PR do?

This PR removes the spaces_between_special_tokens attribute from GemmaTokenizer and LlamaTokenizer since that attribute doesn't do anything. This is because the _decode method in tokenization_utils.py doesn't make use of this attribute, it only accepts a flag which defaults to True.

Alternatively, we could make sure that that attribute actually does something, by checking in the _decode method whether the tokenizer has it set. Up for discussion

@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.

@NielsRogge NielsRogge requested a review from ArthurZucker April 18, 2024 19:53
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.

We should probably update the _decode function to use it TBH!

@ArthurZucker
Copy link
Collaborator

Or always set it to False and just deprecate it. So many people are confused by it

@ArthurZucker
Copy link
Collaborator

Both work hand in hand, we set it to True for old models

Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot closed this May 27, 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

Successfully merging this pull request may close these issues.

3 participants