zhiqu22
commited on
Commit
·
5805e00
1
Parent(s):
fe0ae35
update codes
Browse files- config.json +5 -1
- configuration_mitre.py +3 -1
- modeling_mitre.py +1 -0
- tokenizer_config.json +0 -1
config.json
CHANGED
@@ -23,5 +23,9 @@
|
|
23 |
"torch_dtype": "float32",
|
24 |
"transformers_version": "4.47.1",
|
25 |
"use_cache": true,
|
26 |
-
"vocab_size": 160025
|
|
|
|
|
|
|
|
|
27 |
}
|
|
|
23 |
"torch_dtype": "float32",
|
24 |
"transformers_version": "4.47.1",
|
25 |
"use_cache": true,
|
26 |
+
"vocab_size": 160025,
|
27 |
+
"auto_map": {
|
28 |
+
"AutoConfig": "configuration_mitre.MitreConfig",
|
29 |
+
"AutoModel": "modeling_mitre.MitreForConditionalGeneration"
|
30 |
+
}
|
31 |
}
|
configuration_mitre.py
CHANGED
@@ -58,4 +58,6 @@ class MitreConfig(PretrainedConfig):
|
|
58 |
is_encoder_decoder=is_encoder_decoder,
|
59 |
decoder_start_token_id=decoder_start_token_id,
|
60 |
**kwargs,
|
61 |
-
)
|
|
|
|
|
|
58 |
is_encoder_decoder=is_encoder_decoder,
|
59 |
decoder_start_token_id=decoder_start_token_id,
|
60 |
**kwargs,
|
61 |
+
)
|
62 |
+
|
63 |
+
MitreConfig.register_for_auto_class("AutoConfig")
|
modeling_mitre.py
CHANGED
@@ -838,3 +838,4 @@ class MitreForConditionalGeneration(MitrePreTrainedModel, GenerationMixin):
|
|
838 |
return sequence_outputs["sequences"]
|
839 |
|
840 |
|
|
|
|
838 |
return sequence_outputs["sequences"]
|
839 |
|
840 |
|
841 |
+
MitreForConditionalGeneration.register_for_auto_class("AutoModel")
|
tokenizer_config.json
CHANGED
@@ -9,7 +9,6 @@
|
|
9 |
"model_max_length": 256,
|
10 |
"name_or_path": "naist-nlp/mitre_466m",
|
11 |
"tokenizer_class": "MitreTokenizer",
|
12 |
-
"use_fast": false,
|
13 |
"auto_map": {
|
14 |
"AutoTokenizer": ["tokenization_mitre.MitreTokenizer"]
|
15 |
}
|
|
|
9 |
"model_max_length": 256,
|
10 |
"name_or_path": "naist-nlp/mitre_466m",
|
11 |
"tokenizer_class": "MitreTokenizer",
|
|
|
12 |
"auto_map": {
|
13 |
"AutoTokenizer": ["tokenization_mitre.MitreTokenizer"]
|
14 |
}
|