You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/opt/conda/lib/python3.7/site-packages/transformers/tokenization_utils_base.py:717: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at ../torch/csrc/utils/tensor_new.cpp:230.)
tensor = as_tensor(value)
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/gradio/routes.py", line 400, in run_predict
event_data=event_data,
File "/opt/conda/lib/python3.7/site-packages/gradio/blocks.py", line 1109, in process_api
fn_index, inputs, iterator, request, event_id, event_data
File "/opt/conda/lib/python3.7/site-packages/gradio/blocks.py", line 930, in call_function
utils.async_iteration, iterator, limiter=self.limiter
File "/opt/conda/lib/python3.7/site-packages/anyio/to_thread.py", line 32, in run_sync
func, *args, cancellable=cancellable, limiter=limiter
File "/opt/conda/lib/python3.7/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/opt/conda/lib/python3.7/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/opt/conda/lib/python3.7/site-packages/gradio/utils.py", line 490, in async_iteration
return next(iterator)
File "web_demo_belle.py", line 38, in predict
temperature=temperature):
File "/opt/conda/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 43, in generator_context
response = gen.send(None)
File "/mnt/workspace/InstructGLM/modeling_chatglm.py", line 1153, in stream_chat
for outputs in self.stream_generate(**input_ids, **gen_kwargs):
File "/opt/conda/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 43, in generator_context
response = gen.send(None) File "/mnt/workspace/InstructGLM/modeling_chatglm.py", line 1264, in stream_generate
outputs, model_kwargs, is_encoder_decoder=self.config.is_encoder_decoder
File "/opt/conda/lib/python3.7/site-packages/transformers/generation/utils.py", line 721, in _update_model_kwargs_for_generation
[attention_mask, attention_mask.new_ones((attention_mask.shape[0], 1))], dim=-1
RuntimeError: Tensors must have same number of dimensions: got 4 and 2
The text was updated successfully, but these errors were encountered:
报错定位在modeling_chatglm:
hello
/opt/conda/lib/python3.7/site-packages/transformers/tokenization_utils_base.py:717: UserWarning: Creating a tensor from a list of numpy.ndarrays is extremely slow. Please consider converting the list to a single numpy.ndarray with numpy.array() before converting to a tensor. (Triggered internally at ../torch/csrc/utils/tensor_new.cpp:230.)
tensor = as_tensor(value)
Traceback (most recent call last):
File "/opt/conda/lib/python3.7/site-packages/gradio/routes.py", line 400, in run_predict
event_data=event_data,
File "/opt/conda/lib/python3.7/site-packages/gradio/blocks.py", line 1109, in process_api
fn_index, inputs, iterator, request, event_id, event_data
File "/opt/conda/lib/python3.7/site-packages/gradio/blocks.py", line 930, in call_function
utils.async_iteration, iterator, limiter=self.limiter
File "/opt/conda/lib/python3.7/site-packages/anyio/to_thread.py", line 32, in run_sync
func, *args, cancellable=cancellable, limiter=limiter
File "/opt/conda/lib/python3.7/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/opt/conda/lib/python3.7/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/opt/conda/lib/python3.7/site-packages/gradio/utils.py", line 490, in async_iteration
return next(iterator)
File "web_demo_belle.py", line 38, in predict
temperature=temperature):
File "/opt/conda/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 43, in generator_context
response = gen.send(None)
File "/mnt/workspace/InstructGLM/modeling_chatglm.py", line 1153, in stream_chat
for outputs in self.stream_generate(**input_ids, **gen_kwargs):
File "/opt/conda/lib/python3.7/site-packages/torch/autograd/grad_mode.py", line 43, in generator_context
response = gen.send(None)
File "/mnt/workspace/InstructGLM/modeling_chatglm.py", line 1264, in stream_generate
outputs, model_kwargs, is_encoder_decoder=self.config.is_encoder_decoder
File "/opt/conda/lib/python3.7/site-packages/transformers/generation/utils.py", line 721, in _update_model_kwargs_for_generation
[attention_mask, attention_mask.new_ones((attention_mask.shape[0], 1))], dim=-1
RuntimeError: Tensors must have same number of dimensions: got 4 and 2
The text was updated successfully, but these errors were encountered: