Spaces:
Paused
Paused
Update app.py
Browse files
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",
|
| 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 |
|