Comments (3)
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/streamlit/runtime/caching/cache_utils.py", line 263, in _get_or_create_cached_value
cached_result = cache.read_result(value_key)
File "/opt/conda/lib/python3.8/site-packages/streamlit/runtime/caching/cache_resource_api.py", line 500, in read_result
raise CacheKeyNotFoundError()
streamlit.runtime.caching.cache_errors.CacheKeyNotFoundError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/streamlit/runtime/caching/cache_utils.py", line 311, in _handle_cache_miss
cached_result = cache.read_result(value_key)
File "/opt/conda/lib/python3.8/site-packages/streamlit/runtime/caching/cache_resource_api.py", line 500, in read_result
raise CacheKeyNotFoundError()
streamlit.runtime.caching.cache_errors.CacheKeyNotFoundError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.dict)
File "/opt/AI/Baichuan2-main/web_demo.py", line 72, in
main()
File "/opt/AI/Baichuan2-main/web_demo.py", line 51, in main
model, tokenizer = init_model()
File "/opt/conda/lib/python3.8/site-packages/streamlit/runtime/caching/cache_utils.py", line 211, in wrapper
return cached_func(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/streamlit/runtime/caching/cache_utils.py", line 240, in call
return self._get_or_create_cached_value(args, kwargs)
File "/opt/conda/lib/python3.8/site-packages/streamlit/runtime/caching/cache_utils.py", line 266, in _get_or_create_cached_value
return self._handle_cache_miss(cache, value_key, func_args, func_kwargs)
File "/opt/conda/lib/python3.8/site-packages/streamlit/runtime/caching/cache_utils.py", line 320, in _handle_cache_miss
computed_value = self._info.func(*func_args, **func_kwargs)
File "/opt/AI/Baichuan2-main/web_demo.py", line 23, in init_model
tokenizer = AutoTokenizer.from_pretrained(
File "/opt/conda/lib/python3.8/site-packages/transformers/models/auto/tokenization_auto.py", line 723, in from_pretrained
return tokenizer_class.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 1854, in from_pretrained
return cls._from_pretrained(
File "/opt/conda/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 2017, in _from_pretrained
tokenizer = cls(*init_inputs, **init_kwargs)
File "/root/.cache/huggingface/modules/transformers_modules/Baichuan2-13B-Chat/tokenization_baichuan.py", line 86, in init
self.sp_model.Load(vocab_file)
File "/opt/conda/lib/python3.8/site-packages/sentencepiece/init.py", line 905, in Load
return self.LoadFromFile(model_file)
File "/opt/conda/lib/python3.8/site-packages/sentencepiece/init.py", line 310, in LoadFromFile
return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg)
TypeError: not a string
from baichuan2.
I got the same error. The error actually comes from instantiating the tokenizer:
tokenizer = AutoTokenizer.from_pretrained("baichuan-inc/Baichuan2-13B-Chat", use_fast=False, trust_remote_code=True)
from baichuan2.
The latest code fixes this, and the issue can be closed
from baichuan2.
Related Issues (20)
- LLM相同输入,多次输出不一样
- 使用fastgpt需要流式接口,请求支持 HOT 1
- 使用fastgpt框架对接baichuan2需要流式接口,请求支持 HOT 4
- 一块V100的卡,跑13b openai的启动脚本。短文本没事,文本一长就报CUDA error: out of memory。
- Baichuan2-13B-Chat-4bits 跑不起来 HOT 2
- baichuan2-13B-chat 微调loss 一直为0 HOT 2
- baichuan2-7B-chat 微调使用TrainerCallback,报错 HOT 1
- baichuan2-13b 微调后模型使用vllm输出与官方web_demo结果不一致
- 请问模型 Baichuan2-13B-Chat-4bits 支持MAC吗?
- 数据集
- 我使用了lora微调训练的4个epoch,但是模型还没有收敛,如何从保存的checkpoint继续训练
- 输入窗口是多少呢 HOT 1
- 训练和推理时数据格式不同
- 请问baichuan2的训练数据分类体系是出自哪里?
- 运行web_demo显示“'utf-8' codec can't decode bytes in position 1132-1134: invalid continuation byte”
- 可以支持ollama, 或anythingLLM 么
- ewq
- ewq
- eewr
- RuntimeError: Creating a Parameter from an instance of type Params4bit requires that detach() returns an instance of the same type, but return type Tensor was found instead. To use the type as a Parameter, please correct the detach() semantics defined by its __torch_dispatch__() implementation.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from baichuan2.