Open 1106280506Hx opened 7 months ago
cc @younesbelkada for reference
can you tell me how to sovle it?
Hi @1106280506Hx,
As the error suggests, SDPA isn't supported in Llava on the version of transformers being run. However, just looking it up, #28107 was merged in a few days ago. You should be able to resolve this by running the dev version of transformers - installing from source:
pip install git+https://github.com/huggingface/transformers
Your answer is meaningful, thanks for your quick reply @amyeroberts
processor = AutoProcessor.from_pretrained("/gemini/data-2/data/llava") model = AutoModelForPreTraining.from_pretrained("/gemini/data-2/data/llava",load_in_4bit=True,bnb_4bit_compute_dtype=torch.float16,low_cpu_mem_usage=True,attn_implementation="sdpa").to("cuda")