pw-ai-research commited on
Commit
b2dc49a
·
verified ·
1 Parent(s): 98edea1

Update app.py

Browse files

Made flash attention true

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -10,7 +10,7 @@ import threading
10
 
11
  model_id = "PhysicsWallahAI/Aryabhata-1.0"
12
  tokenizer = AutoTokenizer.from_pretrained(model_id)
13
- model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
14
 
15
  def process_questions(example):
16
  example["question_text"] = example["question"]
 
10
 
11
  model_id = "PhysicsWallahAI/Aryabhata-1.0"
12
  tokenizer = AutoTokenizer.from_pretrained(model_id)
13
+ model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto", use_flash_attention_2=True)
14
 
15
  def process_questions(example):
16
  example["question_text"] = example["question"]