qlora icon indicating copy to clipboard operation
qlora copied to clipboard

TypeError: getattr(): attribute name must be string

Open FHL1998 opened this issue 1 year ago • 1 comments

Traceback (most recent call last): File "qlora.py", line 791, in train() File "qlora.py", line 636, in train tokenizer = AutoTokenizer.from_pretrained( File "/opt/conda/envs/env/lib/python3.8/site-packages/transformers/models/auto/tokenization_auto.py", line 635, in from_pretrained tokenizer_class = tokenizer_class_from_name(tokenizer_class_name) File "/opt/conda/envs/env/lib/python3.8/site-packages/transformers/models/auto/tokenization_auto.py", line 395, in tokenizer_class_from_name return getattr(module, class_name) TypeError: getattr(): attribute name must be string

FHL1998 avatar Jun 04 '23 16:06 FHL1998

Someone says it is the issue related to diffusers version, anynoe know the correct version of the package?

FHL1998 avatar Jun 04 '23 16:06 FHL1998

I had the same error. The Llama tokenizer requires sentencepiece to be installed. Try again after pip install sentencepiece.

achsvg avatar Jun 05 '23 12:06 achsvg

Thx! I get rid of the issue now.

FHL1998 avatar Jun 05 '23 13:06 FHL1998