Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -9,8 +9,8 @@ import time
|
|
9 |
model_id = "google/gemma-2-27b-it"
|
10 |
assistant_id = "google/gemma-2-2b-it"
|
11 |
|
12 |
-
model = AutoModelForCausalLM.from_pretrained(model_id).to(dtype=torch.bfloat16, device="cuda")
|
13 |
-
assistant_model = AutoModelForCausalLM.from_pretrained(assistant_id).to(dtype=torch.bfloat16, device="cuda")
|
14 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
15 |
|
16 |
@spaces.GPU
|
|
|
9 |
model_id = "google/gemma-2-27b-it"
|
10 |
assistant_id = "google/gemma-2-2b-it"
|
11 |
|
12 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, attn_implementation="eager").to(dtype=torch.bfloat16, device="cuda")
|
13 |
+
assistant_model = AutoModelForCausalLM.from_pretrained(assistant_id, attn_implementation="eager").to(dtype=torch.bfloat16, device="cuda")
|
14 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
15 |
|
16 |
@spaces.GPU
|