gugarosa commited on
Commit
eb8bbd1
1 Parent(s): cb2f453

Update modeling_phi.py

Browse files
Files changed (1) hide show
  1. modeling_phi.py +3 -1
modeling_phi.py CHANGED
@@ -47,9 +47,11 @@ from transformers.utils import (
47
  from .configuration_phi import PhiConfig
48
 
49
 
50
- if is_flash_attn_2_available():
51
  from flash_attn import flash_attn_func, flash_attn_varlen_func
52
  from flash_attn.bert_padding import index_first_axis, pad_input, unpad_input # noqa
 
 
53
 
54
 
55
  logger = logging.get_logger(__name__)
 
47
  from .configuration_phi import PhiConfig
48
 
49
 
50
+ try:
51
  from flash_attn import flash_attn_func, flash_attn_varlen_func
52
  from flash_attn.bert_padding import index_first_axis, pad_input, unpad_input # noqa
53
+ except:
54
+ pass
55
 
56
 
57
  logger = logging.get_logger(__name__)