Update modeling_kphi3.py
Browse files- modeling_kphi3.py +3 -0
modeling_kphi3.py
CHANGED
|
@@ -53,6 +53,9 @@ from transformers.utils import (
|
|
| 53 |
)
|
| 54 |
from .configuration_kphi3 import KPhi3Config
|
| 55 |
|
|
|
|
|
|
|
|
|
|
| 56 |
def get_max_acceptable_common_divisor(a, b, max_acceptable=1000000):
|
| 57 |
"""
|
| 58 |
This is an inefficient max acceptable common divisor implementation to be improved.
|
|
|
|
| 53 |
)
|
| 54 |
from .configuration_kphi3 import KPhi3Config
|
| 55 |
|
| 56 |
+
if is_flash_attn_2_available():
|
| 57 |
+
from transformers.modeling_flash_attention_utils import _flash_attention_forward
|
| 58 |
+
|
| 59 |
def get_max_acceptable_common_divisor(a, b, max_acceptable=1000000):
|
| 60 |
"""
|
| 61 |
This is an inefficient max acceptable common divisor implementation to be improved.
|