Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,12 +34,12 @@ model_id = "google/gemma-3-270m-it"
|
|
| 34 |
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True,)
|
| 35 |
model = AutoModelForCausalLM.from_pretrained(
|
| 36 |
model_id,
|
|
|
|
| 37 |
device_map="auto",
|
| 38 |
-
|
| 39 |
-
attn_implementation="eager",
|
| 40 |
)
|
| 41 |
-
model.config.sliding_window = 4096
|
| 42 |
-
model.eval()
|
| 43 |
|
| 44 |
|
| 45 |
@spaces.GPU(duration=90)
|
|
|
|
| 34 |
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True,)
|
| 35 |
model = AutoModelForCausalLM.from_pretrained(
|
| 36 |
model_id,
|
| 37 |
+
torch_dtype="auto",
|
| 38 |
device_map="auto",
|
| 39 |
+
attn_implementation="eager"
|
|
|
|
| 40 |
)
|
| 41 |
+
# model.config.sliding_window = 4096
|
| 42 |
+
# model.eval()
|
| 43 |
|
| 44 |
|
| 45 |
@spaces.GPU(duration=90)
|