ModuleNotFoundError: No module named 'triton'
Running the sample code in the readme gives an error. The readme did not specify this module as required:
Traceback (most recent call last):
File "C:\Users****\source\repos\models\main2.py", line 6, in
model = AutoModelForCausalLM.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users****\anaconda3\envs\phi-35\Lib\site-packages\transformers\models\auto\auto_factory.py", line 551, in from_pretrained
model_class = get_class_from_dynamic_module(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users****\anaconda3\envs\phi-35\Lib\site-packages\transformers\dynamic_module_utils.py", line 514, in get_class_from_dynamic_module
return get_class_in_module(class_name, final_module)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users****\anaconda3\envs\phi-35\Lib\site-packages\transformers\dynamic_module_utils.py", line 212, in get_class_in_module
module_spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\Users****.cache\huggingface\modules\transformers_modules\Phi-3.5-MoE-instruct\modeling_phimoe.py", line 53, in
from flash_attn.layers.rotary import RotaryEmbedding as FlashRotaryEmbedding
File "C:\Users****\anaconda3\envs\phi-35\Lib\site-packages\flash_attn\layers\rotary.py", line 8, in
from flash_attn.ops.triton.rotary import apply_rotary
File "C:\Users****\anaconda3\envs\phi-35\Lib\site-packages\flash_attn\ops\triton\rotary.py", line 7, in
import triton
ModuleNotFoundError: No module named 'triton'