Upload model
Browse files- config.json +3 -3
- configuration_bionexttager.py +1 -1
- modeling_bionexttagger.py +3 -3
config.json
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
{
|
2 |
"_name_or_path": "michiyasunaga/BioLinkBERT-large",
|
3 |
"architectures": [
|
4 |
-
"
|
5 |
],
|
6 |
"args_random_seed": 42,
|
7 |
"attention_probs_dropout_prob": 0.1,
|
8 |
"augmentation": "unk",
|
9 |
"auto_map": {
|
10 |
-
"AutoConfig": "configuration_bionexttager.
|
11 |
-
"AutoModel": "modeling_bionexttagger.
|
12 |
},
|
13 |
"classifier_dropout": null,
|
14 |
"context_size": 2,
|
|
|
1 |
{
|
2 |
"_name_or_path": "michiyasunaga/BioLinkBERT-large",
|
3 |
"architectures": [
|
4 |
+
"BioNExtTaggerModel"
|
5 |
],
|
6 |
"args_random_seed": 42,
|
7 |
"attention_probs_dropout_prob": 0.1,
|
8 |
"augmentation": "unk",
|
9 |
"auto_map": {
|
10 |
+
"AutoConfig": "configuration_bionexttager.BioNExtTaggerConfig",
|
11 |
+
"AutoModel": "modeling_bionexttagger.BioNExtTaggerModel"
|
12 |
},
|
13 |
"classifier_dropout": null,
|
14 |
"context_size": 2,
|
configuration_bionexttager.py
CHANGED
@@ -3,7 +3,7 @@ from transformers import PretrainedConfig, AutoConfig
|
|
3 |
from typing import List
|
4 |
|
5 |
|
6 |
-
class
|
7 |
model_type = "crf-tagger"
|
8 |
|
9 |
def __init__(
|
|
|
3 |
from typing import List
|
4 |
|
5 |
|
6 |
+
class BioNExtTaggerConfig(PretrainedConfig):
|
7 |
model_type = "crf-tagger"
|
8 |
|
9 |
def __init__(
|
modeling_bionexttagger.py
CHANGED
@@ -10,13 +10,13 @@ from typing import List, Optional
|
|
10 |
|
11 |
import torch
|
12 |
from itertools import islice
|
13 |
-
from .configuration_bionexttager import
|
14 |
|
15 |
|
16 |
NUM_PER_LAYER = 16
|
17 |
|
18 |
-
class
|
19 |
-
config_class =
|
20 |
_keys_to_ignore_on_load_unexpected = [r"pooler"]
|
21 |
|
22 |
def __init__(self, config):
|
|
|
10 |
|
11 |
import torch
|
12 |
from itertools import islice
|
13 |
+
from .configuration_bionexttager import BioNExtTaggerConfig
|
14 |
|
15 |
|
16 |
NUM_PER_LAYER = 16
|
17 |
|
18 |
+
class BioNExtTaggerModel(PreTrainedModel):
|
19 |
+
config_class = BioNExtTaggerConfig
|
20 |
_keys_to_ignore_on_load_unexpected = [r"pooler"]
|
21 |
|
22 |
def __init__(self, config):
|