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

streamlit run moss_web_demo_streamlit.py --server.port 8888 #378

Open
MR-HOLO opened this issue Oct 23, 2024 · 0 comments
Open

streamlit run moss_web_demo_streamlit.py --server.port 8888 #378

MR-HOLO opened this issue Oct 23, 2024 · 0 comments

Comments

@MR-HOLO
Copy link

MR-HOLO commented Oct 23, 2024

AttributeError: 'MossTokenizer' object has no attribute 'encoder'
Traceback:
File "C:\Users\BESP\MOSS-main.venv\lib\site-packages\streamlit\runtime\scriptrunner\exec_code.py", line 88, in exec_func_with_error_handling
result = func()
File "C:\Users\BESP\MOSS-main.venv\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 579, in code_to_exec
exec(code, module.dict)
File "C:\Users\BESP\MOSS-main\moss_web_demo_streamlit.py", line 82, in
tokenizer, model = load_model()
File "C:\Users\BESP\MOSS-main.venv\lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 210, in call
return self._get_or_create_cached_value(args, kwargs)
File "C:\Users\BESP\MOSS-main.venv\lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 235, in _get_or_create_cached_value
return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
File "C:\Users\BESP\MOSS-main.venv\lib\site-packages\streamlit\runtime\caching\cache_utils.py", line 292, in _handle_cache_miss
computed_value = self._info.func(*func_args, **func_kwargs)
File "C:\Users\BESP\MOSS-main\moss_web_demo_streamlit.py", line 49, in load_model
tokenizer = MossTokenizer.from_pretrained(args.model_name)
File "C:\Users\BESP\MOSS-main.venv\lib\site-packages\transformers\tokenization_utils_base.py", line 2208, in from_pretrained
return cls._from_pretrained(
File "C:\Users\BESP\MOSS-main.venv\lib\site-packages\transformers\tokenization_utils_base.py", line 2442, in _from_pretrained
tokenizer = cls(*init_inputs, **init_kwargs)
File "C:\Users\BESP\MOSS-main\models\tokenization_moss.py", line 161, in init
super().init(
File "C:\Users\BESP\MOSS-main.venv\lib\site-packages\transformers\tokenization_utils.py", line 436, in init
self._add_tokens(
File "C:\Users\BESP\MOSS-main.venv\lib\site-packages\transformers\tokenization_utils.py", line 544, in _add_tokens
current_vocab = self.get_vocab().copy()
File "C:\Users\BESP\MOSS-main\models\tokenization_moss.py", line 194, in get_vocab
return dict(self.encoder, **self.added_tokens_encoder)如何解决

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