cbensimon HF Staff commited on
Commit
2b10a89
·
verified ·
1 Parent(s): 0e3a9f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -38,7 +38,7 @@ if not torch.cuda.is_available():
38
 
39
  if torch.cuda.is_available():
40
  model_id = "meta-llama/Llama-2-7b-chat-hf"
41
- model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto", use_flash_attention_2=True)
42
  tokenizer = AutoTokenizer.from_pretrained(model_id)
43
  tokenizer.use_default_system_prompt = False
44
 
 
38
 
39
  if torch.cuda.is_available():
40
  model_id = "meta-llama/Llama-2-7b-chat-hf"
41
+ model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto", attn_implementation="flash_attention_2")
42
  tokenizer = AutoTokenizer.from_pretrained(model_id)
43
  tokenizer.use_default_system_prompt = False
44