Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,11 @@ model_name = "meta-llama/Llama-3.2-1B-Instruct"
|
|
16 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
17 |
|
18 |
model = AutoModelForCausalLM.from_pretrained(
|
19 |
-
model_name,
|
|
|
|
|
|
|
|
|
20 |
)
|
21 |
|
22 |
checkpoint = "gregorlied/Llama-3.2-1B-Instruct-Medical-Report-Summarization"
|
|
|
16 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
17 |
|
18 |
model = AutoModelForCausalLM.from_pretrained(
|
19 |
+
model_name,
|
20 |
+
device_map="auto",
|
21 |
+
torch_dtype=torch.bfloat16,
|
22 |
+
attn_implementation='eager',
|
23 |
+
trust_remote_code=True,
|
24 |
)
|
25 |
|
26 |
checkpoint = "gregorlied/Llama-3.2-1B-Instruct-Medical-Report-Summarization"
|