Closed 20191864218 closed 4 months ago
USER: 阿八八八八八 ASSISTANT: input_ids tensor([[ 32, 6236, 1948, 264, 22208, 1196, 323, 458, 20443, 11229, 17847, 13, 576, 17847, 6696, 10950, 11, 11682, 11, 323, 47787, 11253, 311, 279, 1196, 594, 4755, 13, 13872, 25, 220, -200, 198, 99727, 99568, 99568, 99568, 99568, 99568, 35560, 3846, 2821, 25]], device='cuda:0') Traceback (most recent call last): File "/root/miniconda3/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/root/miniconda3/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/root/LLaVA/llava/serve/cli.py", line 136, in <module> main(args) File "/root/LLaVA/llava/serve/cli.py", line 106, in main output_ids = model.generate( File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/root/LLaVA/llava/model/language_model/llava_Taiyi.py", line 133, in generate return super().generate( File "/root/LLaVA/llava/model/language_model/Taiyi/modeling_qwen.py", line 1111, in generate return super().generate( File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/root/miniconda3/lib/python3.10/site-packages/transformers/generation/utils.py", line 1330, in generate inputs_tensor, model_input_name, model_kwargs = self._prepare_model_inputs( File "/root/miniconda3/lib/python3.10/site-packages/transformers/generation/utils.py", line 402, in _prepare_model_inputs model_kwargs["input_ids"] = self._maybe_initialize_input_ids_for_generation( File "/root/miniconda3/lib/python3.10/site-packages/transformers/generation/utils.py", line 431, in _maybe_initialize_input_ids_for_generation raise ValueError("bos_token_idhas to be defined when noinput_idsare provided.") ValueError:bos_token_idhas to be defined when noinput_idsare provided.
USER: 阿八八八八八 ASSISTANT: input_ids tensor([[ 32, 6236, 1948, 264, 22208, 1196, 323, 458, 20443, 11229, 17847, 13, 576, 17847, 6696, 10950, 11, 11682, 11, 323, 47787, 11253, 311, 279, 1196, 594, 4755, 13, 13872, 25, 220, -200, 198, 99727, 99568, 99568, 99568, 99568, 99568, 35560, 3846, 2821, 25]], device='cuda:0') Traceback (most recent call last): File "/root/miniconda3/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/root/miniconda3/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/root/LLaVA/llava/serve/cli.py", line 136, in <module> main(args) File "/root/LLaVA/llava/serve/cli.py", line 106, in main output_ids = model.generate( File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/root/LLaVA/llava/model/language_model/llava_Taiyi.py", line 133, in generate return super().generate( File "/root/LLaVA/llava/model/language_model/Taiyi/modeling_qwen.py", line 1111, in generate return super().generate( File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/root/miniconda3/lib/python3.10/site-packages/transformers/generation/utils.py", line 1330, in generate inputs_tensor, model_input_name, model_kwargs = self._prepare_model_inputs( File "/root/miniconda3/lib/python3.10/site-packages/transformers/generation/utils.py", line 402, in _prepare_model_inputs model_kwargs["input_ids"] = self._maybe_initialize_input_ids_for_generation( File "/root/miniconda3/lib/python3.10/site-packages/transformers/generation/utils.py", line 431, in _maybe_initialize_input_ids_for_generation raise ValueError("
has to be defined when no
are provided.") ValueError:
are provided.
what the reason for this is?,Thanks!
修改相应代码已解决,但是其中的原理不太清楚,感谢这份优秀的工作!
Question
USER: 阿八八八八八 ASSISTANT: input_ids tensor([[ 32, 6236, 1948, 264, 22208, 1196, 323, 458, 20443, 11229, 17847, 13, 576, 17847, 6696, 10950, 11, 11682, 11, 323, 47787, 11253, 311, 279, 1196, 594, 4755, 13, 13872, 25, 220, -200, 198, 99727, 99568, 99568, 99568, 99568, 99568, 35560, 3846, 2821, 25]], device='cuda:0') Traceback (most recent call last): File "/root/miniconda3/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/root/miniconda3/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/root/LLaVA/llava/serve/cli.py", line 136, in <module> main(args) File "/root/LLaVA/llava/serve/cli.py", line 106, in main output_ids = model.generate( File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/root/LLaVA/llava/model/language_model/llava_Taiyi.py", line 133, in generate return super().generate( File "/root/LLaVA/llava/model/language_model/Taiyi/modeling_qwen.py", line 1111, in generate return super().generate( File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/root/miniconda3/lib/python3.10/site-packages/transformers/generation/utils.py", line 1330, in generate inputs_tensor, model_input_name, model_kwargs = self._prepare_model_inputs( File "/root/miniconda3/lib/python3.10/site-packages/transformers/generation/utils.py", line 402, in _prepare_model_inputs model_kwargs["input_ids"] = self._maybe_initialize_input_ids_for_generation( File "/root/miniconda3/lib/python3.10/site-packages/transformers/generation/utils.py", line 431, in _maybe_initialize_input_ids_for_generation raise ValueError("
bos_token_idhas to be defined when no
input_idsare provided.") ValueError:
bos_token_idhas to be defined when no
input_idsare provided.
what the reason for this is?,Thanks!