hrsun15 commited on
Commit
44778b6
1 Parent(s): 5f412d6

Update modeling_fuxitranyu

Browse files
Files changed (1) hide show
  1. modeling_fuxitranyu.py +3 -3
modeling_fuxitranyu.py CHANGED
@@ -30,11 +30,11 @@ from transformers.utils import (
30
  )
31
  from .configuration_fuxitranyu import FuxiTranyuConfig
32
 
33
-
34
- if is_flash_attn_2_available():
35
  from flash_attn import flash_attn_func, flash_attn_varlen_func
36
  from flash_attn.bert_padding import index_first_axis, pad_input, unpad_input # noqa
37
-
 
38
 
39
  logger = logging.get_logger(__name__)
40
 
 
30
  )
31
  from .configuration_fuxitranyu import FuxiTranyuConfig
32
 
33
+ try:
 
34
  from flash_attn import flash_attn_func, flash_attn_varlen_func
35
  from flash_attn.bert_padding import index_first_axis, pad_input, unpad_input # noqa
36
+ except:
37
+ pass
38
 
39
  logger = logging.get_logger(__name__)
40