New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
执行python quick_start.py始终报错 #320
Comments
在Mac M1平台上,可以重现这个问题。即使注释掉 use_flash_attention_2=True,也还会问缺少 flash_attn 组件。 |
mac m1怎么搞呢 |
同问 macm1 怎么搞 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PS D:\tools\100AIGC\Llama-Chinese> python quick_start.py Traceback (most recent call last): File "D:\tools\100AIGC\Llama-Chinese\quick_start.py", line 4, in <module> model = AutoModelForCausalLM.from_pretrained('Llama3-Chinese-8B-Instruct',device_map=device_map,torch_dtype=torch.float16,load_in_8bit=True,trust_remote_code=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\1\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\models\auto\auto_factory.py", line 550, in from_pretrained model_class = get_class_from_dynamic_module( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\1\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\dynamic_module_utils.py", line 489, in get_class_from_dynamic_module final_module = get_cached_module_file( ^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\1\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\dynamic_module_utils.py", line 315, in get_cached_module_file modules_needed = check_imports(resolved_module_file) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\1\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\dynamic_module_utils.py", line 180, in check_imports raise ImportError( ImportError: This modeling file requires the following packages that were not found in your environment: flash_attn. Run
pip install flash_attn``按照这个提醒,安装flash_attn
S D:\tools\100AIGC\Llama-Chinese> pip install flash-attn
Collecting flash-attn
Using cached flash_attn-2.5.7.tar.gz (2.5 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [20 lines of output]
Traceback (most recent call last):
File "C:\Users\1\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Users\1\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\1\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\1\AppData\Local\Temp\pip-build-env-isl1utrg\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\1\AppData\Local\Temp\pip-build-env-isl1utrg\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
self.run_setup()
File "C:\Users\1\AppData\Local\Temp\pip-build-env-isl1utrg\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
super().run_setup(setup_script=setup_script)
File "C:\Users\1\AppData\Local\Temp\pip-build-env-isl1utrg\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "", line 9, in
ModuleNotFoundError: No module named 'packaging'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
GPT查了下,说是python版本问题,我的是python312
The text was updated successfully, but these errors were encountered: