merveenoyan/smol-vision

ImportError: This modeling file requires the following packages that were not found in your environment: flash_attn. Run `pip install flash_attn`

Closed this issue · 1 comments

I am getting this error when tried to run the finetuning notebook for florence-2

Please find the piece of script below

from transformers import AutoModelForCausalLM, AutoProcessor
import torch

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

model = AutoModelForCausalLM.from_pretrained("microsoft/Florence-2-base-ft", trust_remote_code=True, revision='refs/pr/6').to(device)
processor = AutoProcessor.from_pretrained("microsoft/Florence-2-base-ft", trust_remote_code=True, revision='refs/pr/6')

You need to run pip install flash-attn, sorry for delayed response. I will define requirements for each notebook when I get time.