fix: move flash components into top-level
Browse files
flash_components/bert_padding.py → bert_padding.py
RENAMED
|
File without changes
|
flash_components/block.py → block.py
RENAMED
|
File without changes
|
flash_components/embedding.py → embedding.py
RENAMED
|
File without changes
|
flash_components/mha.py → mha.py
RENAMED
|
File without changes
|
flash_components/mlp.py → mlp.py
RENAMED
|
File without changes
|
modeling_bert.py
CHANGED
|
@@ -29,17 +29,17 @@ from transformers.models.bert.modeling_bert import (
|
|
| 29 |
BaseModelOutputWithPoolingAndCrossAttentions,
|
| 30 |
BertForPreTrainingOutput,
|
| 31 |
)
|
| 32 |
-
from
|
| 33 |
index_first_axis,
|
| 34 |
index_first_axis_residual,
|
| 35 |
pad_input,
|
| 36 |
unpad_input,
|
| 37 |
)
|
| 38 |
|
| 39 |
-
from
|
| 40 |
-
from
|
| 41 |
-
from
|
| 42 |
-
from
|
| 43 |
|
| 44 |
try:
|
| 45 |
from flash_attn.ops.fused_dense import FusedDense
|
|
|
|
| 29 |
BaseModelOutputWithPoolingAndCrossAttentions,
|
| 30 |
BertForPreTrainingOutput,
|
| 31 |
)
|
| 32 |
+
from .bert_padding import (
|
| 33 |
index_first_axis,
|
| 34 |
index_first_axis_residual,
|
| 35 |
pad_input,
|
| 36 |
unpad_input,
|
| 37 |
)
|
| 38 |
|
| 39 |
+
from .block import Block
|
| 40 |
+
from .embedding import BertEmbeddings
|
| 41 |
+
from .mha import MHA
|
| 42 |
+
from .mlp import FusedMLP, Mlp
|
| 43 |
|
| 44 |
try:
|
| 45 |
from flash_attn.ops.fused_dense import FusedDense
|