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

Tokenizer takes 3 minutes to load #3

Open
AngledLuffa opened this issue Nov 8, 2021 · 0 comments
Open

Tokenizer takes 3 minutes to load #3

AngledLuffa opened this issue Nov 8, 2021 · 0 comments

Comments

@AngledLuffa
Copy link

AngledLuffa commented Nov 8, 2021

It takes three minutes to load the tokenizer using HF (python 3.6.8, transformers 4.12.2, torch 1.9.0)

transformers.AutoTokenizer.from_pretrained("idb-ita/gilberto-uncased-from-camembert", do_lower_case=True)

Is there some way to speed this up? Other tokenizers take a fraction of this time.

I wonder if part of the problem is the "model_max_len" which is somewhat excessive:

PreTrainedTokenizerFast(name_or_path='idb-ita/gilberto-uncased-from-camembert', vocab_size=32005, model_max_len=1000000000000000019884624838656, is_fast=True, padding_side='right', special_tokens={'bos_token': '<s>', 'eos_token': '</s>', 'unk_token': '<unk>', 'sep_token': '</s>', 'pad_token': '<pad>', 'cls_token': '<s>', 'mask_token': AddedToken("<mask>", rstrip=False, lstrip=True, single_word=False, normalized=True), 'additional_special_tokens': ['<s>NOTUSED', '</s>NOTUSED']})
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