X-PLUG / mPLUG-Owl

mPLUG-Owl: The Powerful Multi-modal Large Language Model Family
https://www.modelscope.cn/studios/damo/mPLUG-Owl
MIT License
2.33k stars 176 forks source link

RuntimeError: expected scalar type Float but found Half #171

Open ShelterWFF opened 1 year ago

ShelterWFF commented 1 year ago

Traceback (most recent call last): File "/nanshu_data/jgx/mPLUG-Owl/mPLUG-Owl/serve/model_utils.py", line 64, in gentask ret = self.mfunc(callback=_callback, self.kwargs) File "/nanshu_data/jgx/mPLUG-Owl/mPLUG-Owl/serve/model_worker.py", line 110, in generate_with_callback self.model.generate(kwargs) File "/root/anaconda3/envs/mplug_owl/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, kwargs) File "/nanshu_data/jgx/mPLUG-Owl/mPLUG-Owl/mplug_owl/modeling_mplug_owl.py", line 1565, in generate outputs = self.language_model.generate( File "/root/anaconda3/envs/mplug_owl/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, *kwargs) File "/root/anaconda3/envs/mplug_owl/lib/python3.10/site-packages/transformers/generation/utils.py", line 1588, in generate return self.sample( File "/root/anaconda3/envs/mplug_owl/lib/python3.10/site-packages/transformers/generation/utils.py", line 2642, in sample outputs = self( File "/root/anaconda3/envs/mplug_owl/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(args, kwargs) File "/root/anaconda3/envs/mplug_owl/lib/python3.10/site-packages/transformers/models/bloom/modeling_bloom.py", line 908, in forward transformer_outputs = self.transformer( File "/root/anaconda3/envs/mplug_owl/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, kwargs) File "/nanshu_data/jgx/mPLUG-Owl/mPLUG-Owl/mplug_owl/modeling_mplug_owl.py", line 1700, in bloom_forward outputs = block( File "/root/anaconda3/envs/mplug_owl/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, *kwargs) File "/root/anaconda3/envs/mplug_owl/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward output = old_forward(args, kwargs) File "/root/anaconda3/envs/mplug_owl/lib/python3.10/site-packages/transformers/models/bloom/modeling_bloom.py", line 430, in forward layernorm_output = self.input_layernorm(hidden_states) File "/root/anaconda3/envs/mplug_owl/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl return forward_call(*args, *kwargs) File "/root/anaconda3/envs/mplug_owl/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward output = old_forward(args, **kwargs) File "/root/anaconda3/envs/mplug_owl/lib/python3.10/site-packages/torch/nn/modules/normalization.py", line 190, in forward return F.layer_norm( File "/root/anaconda3/envs/mplug_owl/lib/python3.10/site-packages/torch/nn/functional.py", line 2515, in layer_norm return torch.layer_norm(input, normalized_shape, weight, bias, eps, torch.backends.cudnn.enabled) RuntimeError: expected scalar type Float but found Half