merve HF staff commited on
Commit
f4784f8
1 Parent(s): 0029ec4

enable fa2

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -13,7 +13,7 @@ processor = AutoProcessor.from_pretrained("HuggingFaceM4/Idefics3-8B-Llama3")
13
 
14
  model = Idefics3ForConditionalGeneration.from_pretrained("HuggingFaceM4/Idefics3-8B-Llama3",
15
  torch_dtype=torch.bfloat16,
16
- #_attn_implementation="flash_attention_2",
17
  trust_remote_code=True).to("cuda")
18
 
19
  BAD_WORDS_IDS = processor.tokenizer(["<image>", "<fake_token_around_image>"], add_special_tokens=False).input_ids
 
13
 
14
  model = Idefics3ForConditionalGeneration.from_pretrained("HuggingFaceM4/Idefics3-8B-Llama3",
15
  torch_dtype=torch.bfloat16,
16
+ _attn_implementation="flash_attention_2",
17
  trust_remote_code=True).to("cuda")
18
 
19
  BAD_WORDS_IDS = processor.tokenizer(["<image>", "<fake_token_around_image>"], add_special_tokens=False).input_ids