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

Improve tokenizer decode #403

Open
vturrisi opened this issue Feb 2, 2023 · 2 comments
Open

Improve tokenizer decode #403

vturrisi opened this issue Feb 2, 2023 · 2 comments

Comments

@vturrisi
Copy link

vturrisi commented Feb 2, 2023

Right now the tokenizer decode method supports only a single instance at a time. I think it would be good to have batch_decode function and also support skip_special_tokens and clean_up_tokenization_spaces as in huggingface.

@gpucce
Copy link
Contributor

gpucce commented Feb 7, 2023

@vturrisi I'll get to this as soon as I manage, what is the skip_special_tokens arg meant to do?

@vturrisi
Copy link
Author

vturrisi commented Feb 7, 2023

No worries @gpucce. It basically removes the sos and eos tokens and padding from the decoded string. https://huggingface.co/docs/transformers/main_classes/tokenizer

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

2 participants