RuntimeError: "LayerNormKernelImpl" not implemented for 'Half'
ravindranantony opened this issue · 0 comments
I am getting runtime error
File "C:\Users\rantonys\AppData\Local\Programs\Python\Python310\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 535, in _run_script
exec(code, module.dict)
File "C:\Users\rantonys\Downloads\Centuri Bot\Phi2\Microsoft-Phi-2-Streamlit-App\main.py", line 31, in
output_ids = model.generate(
File "C:\Users\rantonys\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "C:\Users\rantonys\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\generation\utils.py", line 1518, in generate
return self.sample(
File "C:\Users\rantonys\AppData\Local\Programs\Python\Python310\lib\site-packages\transformers\generation\utils.py", line 2615, in sample
outputs = self(
File "C:\Users\rantonys\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "C:\Users\rantonys\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "C:\Users\rantonys.cache\huggingface\modules\transformers_modules\microsoft\phi-2\85d00b03fee509307549d823fdd095473ba5197c\modeling_phi.py", line 1049, in forward
outputs = self.model(
File "C:\Users\rantonys\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "C:\Users\rantonys\AppData\Local\Programs\Python\Python310\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
how to solve