transformers icon indicating copy to clipboard operation
transformers copied to clipboard

error when using from indobenchmark

Open fendiirfan opened this issue 1 year ago • 1 comments

System Info

from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("indobenchmark/indobart-v2")

the error ValueError: Tokenizer class IndoNLGTokenizer does not exist or is not currently imported.

any help guys?

Who can help?

@ArthurZucker

Information

  • [ ] The official example scripts
  • [ ] My own modified scripts

Tasks

  • [ ] An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • [ ] My own task or dataset (give details below)

Reproduction

Run

from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("indobenchmark/indobart-v2")

Expected behavior

Can used

fendiirfan avatar Mar 12 '23 05:03 fendiirfan

Hey! The tokenizer_class that was set in the configuration.json is wrong as the IndoNLGTokenizer does not exist in transformers. You should try to ask the other of the model on the community tab how to use it, or try to use:

from transformers import MBartTokenizer
tokenizer = MBartTokenizer.from_pretrained("indobenchmark/indobart-v2")

as it appears that the model is an MBartModel.

ArthurZucker avatar Mar 13 '23 09:03 ArthurZucker

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[bot] avatar Apr 11 '23 15:04 github-actions[bot]