michael-guenther
commited on
Commit
•
695207d
1
Parent(s):
71ef017
use getattr function
Browse files- modeling_xlm_roberta.py +1 -1
modeling_xlm_roberta.py
CHANGED
@@ -66,7 +66,7 @@ logger = logging.getLogger(__name__)
|
|
66 |
|
67 |
|
68 |
def get_use_flash_attn(config: XLMRobertaFlashConfig):
|
69 |
-
if not config
|
70 |
return False
|
71 |
if not torch.cuda.is_available():
|
72 |
return False
|
|
|
66 |
|
67 |
|
68 |
def get_use_flash_attn(config: XLMRobertaFlashConfig):
|
69 |
+
if not getattr(config, "use_flash_attn", False):
|
70 |
return False
|
71 |
if not torch.cuda.is_available():
|
72 |
return False
|