Upload ConstBERT
Browse files- modeling.py +2 -2
- tokenization_utils.py +1 -1
modeling.py
CHANGED
@@ -3,8 +3,8 @@ from transformers import BertPreTrainedModel, BertModel, AutoTokenizer
|
|
3 |
import torch
|
4 |
from tqdm import tqdm
|
5 |
from transformers import AutoTokenizer
|
6 |
-
from
|
7 |
-
from
|
8 |
|
9 |
|
10 |
class NullContextManager(object):
|
|
|
3 |
import torch
|
4 |
from tqdm import tqdm
|
5 |
from transformers import AutoTokenizer
|
6 |
+
from .colbert_configuration import ColBERTConfig
|
7 |
+
from .tokenization_utils import QueryTokenizer, DocTokenizer
|
8 |
|
9 |
|
10 |
class NullContextManager(object):
|
tokenization_utils.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import torch
|
2 |
-
from
|
3 |
from transformers import AutoTokenizer
|
4 |
|
5 |
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
1 |
import torch
|
2 |
+
from .colbert_configuration import ColBERTConfig
|
3 |
from transformers import AutoTokenizer
|
4 |
|
5 |
DEVICE = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|