Fix utils
Browse files
__pycache__/__init__.cpython-311.pyc
CHANGED
Binary files a/__pycache__/__init__.cpython-311.pyc and b/__pycache__/__init__.cpython-311.pyc differ
|
|
__pycache__/attention.cpython-311.pyc
CHANGED
Binary files a/__pycache__/attention.cpython-311.pyc and b/__pycache__/attention.cpython-311.pyc differ
|
|
__pycache__/initialization.cpython-311.pyc
CHANGED
Binary files a/__pycache__/initialization.cpython-311.pyc and b/__pycache__/initialization.cpython-311.pyc differ
|
|
__pycache__/modeling_flexbert.cpython-311.pyc
CHANGED
Binary files a/__pycache__/modeling_flexbert.cpython-311.pyc and b/__pycache__/modeling_flexbert.cpython-311.pyc differ
|
|
attention.py
CHANGED
@@ -20,15 +20,10 @@ from typing import Optional
|
|
20 |
import importlib.metadata
|
21 |
import logging
|
22 |
import math
|
23 |
-
import sys
|
24 |
-
import os
|
25 |
-
# Add src folder root to path to allow us to use relative imports regardless of what directory the script is run from
|
26 |
-
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
|
27 |
from .bert_padding import pad_input, unpad_input_only, index_first_axis
|
28 |
from .configuration_bert import FlexBertConfig, maybe_add_padding
|
29 |
from .normalization import get_norm_layer
|
30 |
from .initialization import ModuleType, init_weights
|
31 |
-
import utils # noqa: F401
|
32 |
|
33 |
IMPL_USE_FLASH3 = False
|
34 |
IMPL_USE_FLASH2 = False
|
|
|
20 |
import importlib.metadata
|
21 |
import logging
|
22 |
import math
|
|
|
|
|
|
|
|
|
23 |
from .bert_padding import pad_input, unpad_input_only, index_first_axis
|
24 |
from .configuration_bert import FlexBertConfig, maybe_add_padding
|
25 |
from .normalization import get_norm_layer
|
26 |
from .initialization import ModuleType, init_weights
|
|
|
27 |
|
28 |
IMPL_USE_FLASH3 = False
|
29 |
IMPL_USE_FLASH2 = False
|
initialization.py
CHANGED
@@ -14,7 +14,7 @@ from typing import Optional, Union
|
|
14 |
import torch
|
15 |
import torch.nn as nn
|
16 |
|
17 |
-
from utils import StrEnum
|
18 |
|
19 |
from .configuration_bert import FlexBertConfig
|
20 |
from .normalization import RMSNorm
|
|
|
14 |
import torch
|
15 |
import torch.nn as nn
|
16 |
|
17 |
+
from .utils import StrEnum
|
18 |
|
19 |
from .configuration_bert import FlexBertConfig
|
20 |
from .normalization import RMSNorm
|