Open zhashen opened 1 year ago
check your config.json (that comes with the model weights) and see if the name is misspelled. It happens often with mixed case names.
tokenizer = AutoTokenizer.from_pretrained( args.model_name_or_path, cache_dir=args.cache_dir, padding_side="right", use_fast=True, # Fast tokenizer giving issues. tokenizer_type='llama' if 'llama' in args.model_name_or_path else None, # Needed for HF name change )
I had this issue when I ran python3 qlora.py
. And I second @T-Atlas 's solution.
The reason is that the default model in qlora.py is EleutherAI/pythia-12b
https://github.com/artidoro/qlora/blob/3da535abdfaa29a2d0757eab0971664ed2cd97e8/qlora.py#L53-L55
which depends on GPTNeoXTokenizer
.
https://huggingface.co/EleutherAI/pythia-12b/blob/main/tokenizer_config.json#L7
GPTNexoXTokenzier
has only the fast version.
https://github.com/huggingface/transformers/issues/17756#issuecomment-1534219526
But qlora.py disables the use of fast tokenizers.
it works
it works
what works ? can you elaborate?
I had to change "tokenizer_class": "GPTNeoXTokenizer" to "tokenizer_class":"GPTNeoXTokenizerFast" in tokenizer_config.json.
I had this issue when I ran
python3 qlora.py
. And I second @T-Atlas 's solution.The reason is that the default model in qlora.py is
EleutherAI/pythia-12b
https://github.com/artidoro/qlora/blob/3da535abdfaa29a2d0757eab0971664ed2cd97e8/qlora.py#L53-L55
which depends on
GPTNeoXTokenizer
.https://huggingface.co/EleutherAI/pythia-12b/blob/main/tokenizer_config.json#L7
GPTNexoXTokenzier
has only the fast version.huggingface/transformers#17756 (comment)
But qlora.py disables the use of fast tokenizers.
Enabling fast tokenizers fixed this (in the qlora.py script). Although it was mentioned that setting tokenizer fast to TRUE causes issues, setting it to FALSE results in the error described by the OP.
When I tried
in colab, i got following errors