Spaces:
Runtime error
Runtime error
add chat model
Browse files- app_dialogue.py +8 -0
app_dialogue.py
CHANGED
|
@@ -31,6 +31,14 @@ MODELS = {
|
|
| 31 |
trust_remote_code=True,
|
| 32 |
token=os.environ["HF_AUTH_TOKEN"],
|
| 33 |
).to(DEVICE),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
}
|
| 35 |
PROCESSOR = AutoProcessor.from_pretrained(
|
| 36 |
"HuggingFaceM4/idefics2-tfrm-compatible",
|
|
|
|
| 31 |
trust_remote_code=True,
|
| 32 |
token=os.environ["HF_AUTH_TOKEN"],
|
| 33 |
).to(DEVICE),
|
| 34 |
+
"idefics2-8b (chat)": Idefics2ForConditionalGeneration.from_pretrained(
|
| 35 |
+
"HuggingFaceM4/idefics2-chat-tfrm-compatible",
|
| 36 |
+
torch_dtype=torch.bfloat16,
|
| 37 |
+
_attn_implementation="flash_attention_2",
|
| 38 |
+
trust_remote_code=True,
|
| 39 |
+
token=os.environ["HF_AUTH_TOKEN"],
|
| 40 |
+
).to(DEVICE),
|
| 41 |
+
|
| 42 |
}
|
| 43 |
PROCESSOR = AutoProcessor.from_pretrained(
|
| 44 |
"HuggingFaceM4/idefics2-tfrm-compatible",
|