Update modeling_florence2.py
Browse files- modeling_florence2.py +3 -2
modeling_florence2.py
CHANGED
|
@@ -59,8 +59,9 @@ from transformers.modeling_outputs import (
|
|
| 59 |
Seq2SeqModelOutput,
|
| 60 |
)
|
| 61 |
|
| 62 |
-
|
| 63 |
-
if is_flash_attn_2_available():
|
|
|
|
| 64 |
from flash_attn.bert_padding import index_first_axis, pad_input, unpad_input # noqa
|
| 65 |
|
| 66 |
logger = logging.get_logger(__name__)
|
|
|
|
| 59 |
Seq2SeqModelOutput,
|
| 60 |
)
|
| 61 |
|
| 62 |
+
# flash_attn disabled for CPU compatibility
|
| 63 |
+
#if is_flash_attn_2_available():
|
| 64 |
+
if False:
|
| 65 |
from flash_attn.bert_padding import index_first_axis, pad_input, unpad_input # noqa
|
| 66 |
|
| 67 |
logger = logging.get_logger(__name__)
|