Update src/florence/model.py
Browse files- src/florence/model.py +1 -1
src/florence/model.py
CHANGED
|
@@ -24,7 +24,7 @@ from src.exception import CustomExceptionHandling
|
|
| 24 |
model_id = "microsoft/Florence-2-large-ft"
|
| 25 |
try:
|
| 26 |
model = (
|
| 27 |
-
AutoModelForCausalLM.from_pretrained(model_id, attn_implementation="
|
| 28 |
.to("cuda")
|
| 29 |
.eval()
|
| 30 |
)
|
|
|
|
| 24 |
model_id = "microsoft/Florence-2-large-ft"
|
| 25 |
try:
|
| 26 |
model = (
|
| 27 |
+
AutoModelForCausalLM.from_pretrained(model_id, attn_implementation="eager", torch_dtype=torch.float16, trust_remote_code=True)
|
| 28 |
.to("cuda")
|
| 29 |
.eval()
|
| 30 |
)
|