File "/root/text-generation-webui/modules/ui_model_menu.py", line 194, in load_model_wrapper
shared.model, shared.tokenizer = load_model(shared.model_name, loader)
File "/root/text-generation-webui/modules/models.py", line 84, in load_model
tokenizer = load_tokenizer(model_name, model)
File "/root/text-generation-webui/modules/models.py", line 102, in load_tokenizer
tokenizer = AutoTokenizer.from_pretrained(
File "/opt/conda/envs/textgen/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 736, in from_pretrained
return tokenizer_class.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
File "/opt/conda/envs/textgen/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 1854, in from_pretrained
return cls._from_pretrained(
File "/opt/conda/envs/textgen/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 2017, in _from_pretrained
tokenizer = cls(*init_inputs, **init_kwargs)
File "/opt/conda/envs/textgen/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 156, in __init__
self.sp_model = self.get_spm_processor()
File "/opt/conda/envs/textgen/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py", line 169, in get_spm_processor
with open(self.vocab_file, "rb") as f:
TypeError: expected str, bytes or os.PathLike object, not NoneType
^CTraceback (most recent call last):
File "/root/text-generation-webui/server.py", line 229, in <module>
time.sleep(0.5)
KeyboardInterrupt
^C(textgen) root@3bb28364543e:~/text-generation-webui# ^C
우바부가 소스를 한 줄 바꿔야한다.
cd text-generation-webui/modules
vi models.py
98 tokenizer = AutoTokenizer.from_pretrained(Path(f"{shared.args.model_dir}/gpt-j-6B/"))
99 elif path_to_model.exists():
100 try:
101 tokenizer = AutoTokenizer.from_pretrained(
102 path_to_model,
103 trust_remote_code=shared.args.trust_remote_code,
104 # use_fast=False # original
105 use_fast=True # 수정 후
106 )
107 except ValueError:
108 tokenizer = AutoTokenizer.from_pretrained(
109 path_to_model,
110 trust_remote_code=shared.args.trust_remote_code,
111 use_fast=True
112 )
저장하고 다시 실행.
'인터넷/모바일 > 머신러닝' 카테고리의 다른 글
논문번역) Simple Conversational Data Augmentationfor Semi-supervised Abstractive Conversation Summarization (1) | 2023.09.27 |
---|---|
(논문번역) Narrate Dialogues for Better Summarization (0) | 2023.09.26 |
(논문번역) Summarization is (Almost) Dead, Xiao Pu, et. (0) | 2023.09.21 |
nvidia docker 재설치 (0) | 2023.05.10 |
괜찮은 python용 progressive bar (1) | 2020.02.05 |