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

[LlamaSlowConverter] Slow to Fast better support #29797

Merged
merged 8 commits into from
Mar 28, 2024
Merged

Conversation

ArthurZucker
Copy link
Collaborator

@ArthurZucker ArthurZucker commented Mar 22, 2024

What does this PR do?

Makes sur that the eos token, bos token and unk token are correctly taken when initializing from slow.

Fixes #29774, fixes #29836

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

Copy link
Collaborator

@amyeroberts amyeroberts 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!

Comment on lines +1334 to +1336
(self.original_tokenizer.convert_ids_to_tokens(0), 0.0),
(self.original_tokenizer.convert_ids_to_tokens(1), 0.0),
(self.original_tokenizer.convert_ids_to_tokens(2), 0.0),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm assuming having the mapping of ids to tokens here is fine because we're always handling Llama in this case?

@ArthurZucker ArthurZucker merged commit 536ea2a into main Mar 28, 2024
21 checks passed
@ArthurZucker ArthurZucker deleted the llam-converter branch March 28, 2024 15:19
amyeroberts pushed a commit that referenced this pull request Mar 28, 2024
* fix

* fix test

* style

* nit

* rather rely on concert token to id

* fix quality

* Update src/transformers/convert_slow_tokenizer.py
itazap pushed a commit that referenced this pull request May 14, 2024
* fix

* fix test

* style

* nit

* rather rely on concert token to id

* fix quality

* Update src/transformers/convert_slow_tokenizer.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants