Add new LinkTransformer model.
Browse files- .gitattributes +1 -0
- LT_training_config.json +1 -1
- README.md +2 -2
- config.json +13 -14
- config_sentence_transformers.json +3 -3
- model.safetensors +2 -2
- sentence_bert_config.json +1 -1
- special_tokens_map.json +6 -44
- tokenizer.json +0 -0
- tokenizer_config.json +26 -72
- vocab.txt +0 -0
.gitattributes
CHANGED
@@ -34,3 +34,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
model.safetensors filter=lfs diff=lfs merge=lfs -text
|
|
|
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
model.safetensors filter=lfs diff=lfs merge=lfs -text
|
37 |
+
.git/lfs/objects/88/21/882195bf57f6178b187ee24446a6091f8842bfeb8984266d2e7f867e2f87ce77 filter=lfs diff=lfs merge=lfs -text
|
LT_training_config.json
CHANGED
@@ -24,6 +24,6 @@
|
|
24 |
"loss_params": {},
|
25 |
"eval_type": "classification",
|
26 |
"training_dataset": "dataframe",
|
27 |
-
"base_model_path": "
|
28 |
"best_model_path": "models/check"
|
29 |
}
|
|
|
24 |
"loss_params": {},
|
25 |
"eval_type": "classification",
|
26 |
"training_dataset": "dataframe",
|
27 |
+
"base_model_path": "DMetaSoul/sbert-chinese-qmc-domain-v1",
|
28 |
"best_model_path": "models/check"
|
29 |
}
|
README.md
CHANGED
@@ -19,7 +19,7 @@ It maps sentences & paragraphs to a 768 dimensional dense vector space and can b
|
|
19 |
Take a look at the documentation of [sentence-transformers](https://www.sbert.net/index.html) if you want to use this model for more than what we support in our applications.
|
20 |
|
21 |
|
22 |
-
This model has been fine-tuned on the model :
|
23 |
|
24 |
|
25 |
test
|
@@ -126,7 +126,7 @@ Parameters of the fit()-Method:
|
|
126 |
|
127 |
|
128 |
LinkTransformer(
|
129 |
-
(0): Transformer({'max_seq_length':
|
130 |
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False})
|
131 |
)
|
132 |
```
|
|
|
19 |
Take a look at the documentation of [sentence-transformers](https://www.sbert.net/index.html) if you want to use this model for more than what we support in our applications.
|
20 |
|
21 |
|
22 |
+
This model has been fine-tuned on the model : DMetaSoul/sbert-chinese-qmc-domain-v1. It is pretrained for the language : - zh.
|
23 |
|
24 |
|
25 |
test
|
|
|
126 |
|
127 |
|
128 |
LinkTransformer(
|
129 |
+
(0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel
|
130 |
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False})
|
131 |
)
|
132 |
```
|
config.json
CHANGED
@@ -1,32 +1,31 @@
|
|
1 |
{
|
2 |
"_name_or_path": "models/check",
|
3 |
"architectures": [
|
4 |
-
"
|
5 |
],
|
6 |
"attention_probs_dropout_prob": 0.1,
|
7 |
-
"bert_model_name": "models/luke-japanese/hf_xlm_roberta",
|
8 |
-
"bos_token_id": 0,
|
9 |
"classifier_dropout": null,
|
10 |
-
"
|
11 |
-
"entity_emb_size": 256,
|
12 |
-
"entity_vocab_size": 4,
|
13 |
-
"eos_token_id": 2,
|
14 |
"hidden_act": "gelu",
|
15 |
"hidden_dropout_prob": 0.1,
|
16 |
"hidden_size": 768,
|
17 |
"initializer_range": 0.02,
|
18 |
"intermediate_size": 3072,
|
19 |
-
"layer_norm_eps": 1e-
|
20 |
-
"max_position_embeddings":
|
21 |
-
"model_type": "
|
22 |
"num_attention_heads": 12,
|
23 |
"num_hidden_layers": 12,
|
24 |
-
"pad_token_id":
|
|
|
|
|
|
|
|
|
|
|
25 |
"position_embedding_type": "absolute",
|
26 |
"torch_dtype": "float32",
|
27 |
"transformers_version": "4.41.1",
|
28 |
-
"type_vocab_size":
|
29 |
"use_cache": true,
|
30 |
-
"
|
31 |
-
"vocab_size": 32772
|
32 |
}
|
|
|
1 |
{
|
2 |
"_name_or_path": "models/check",
|
3 |
"architectures": [
|
4 |
+
"BertModel"
|
5 |
],
|
6 |
"attention_probs_dropout_prob": 0.1,
|
|
|
|
|
7 |
"classifier_dropout": null,
|
8 |
+
"directionality": "bidi",
|
|
|
|
|
|
|
9 |
"hidden_act": "gelu",
|
10 |
"hidden_dropout_prob": 0.1,
|
11 |
"hidden_size": 768,
|
12 |
"initializer_range": 0.02,
|
13 |
"intermediate_size": 3072,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "bert",
|
17 |
"num_attention_heads": 12,
|
18 |
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"pooler_fc_size": 768,
|
21 |
+
"pooler_num_attention_heads": 12,
|
22 |
+
"pooler_num_fc_layers": 3,
|
23 |
+
"pooler_size_per_head": 128,
|
24 |
+
"pooler_type": "first_token_transform",
|
25 |
"position_embedding_type": "absolute",
|
26 |
"torch_dtype": "float32",
|
27 |
"transformers_version": "4.41.1",
|
28 |
+
"type_vocab_size": 2,
|
29 |
"use_cache": true,
|
30 |
+
"vocab_size": 21128
|
|
|
31 |
}
|
config_sentence_transformers.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
{
|
2 |
"__version__": {
|
3 |
-
"sentence_transformers": "2.
|
4 |
-
"transformers": "4.
|
5 |
-
"pytorch": "1.
|
6 |
}
|
7 |
}
|
|
|
1 |
{
|
2 |
"__version__": {
|
3 |
+
"sentence_transformers": "2.1.0",
|
4 |
+
"transformers": "4.16.0",
|
5 |
+
"pytorch": "1.10.2"
|
6 |
}
|
7 |
}
|
model.safetensors
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:568e6ab4e674b1bda99bc119f94f0e37a8e60473e1fe971aa2bccca9d8afeb3e
|
3 |
+
size 409092920
|
sentence_bert_config.json
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
{
|
2 |
-
"max_seq_length":
|
3 |
"do_lower_case": false
|
4 |
}
|
|
|
1 |
{
|
2 |
+
"max_seq_length": 256,
|
3 |
"do_lower_case": false
|
4 |
}
|
special_tokens_map.json
CHANGED
@@ -1,72 +1,34 @@
|
|
1 |
{
|
2 |
-
"additional_special_tokens": [
|
3 |
-
"<ent>",
|
4 |
-
"<ent2>",
|
5 |
-
"<ent>",
|
6 |
-
"<ent2>",
|
7 |
-
"<ent>",
|
8 |
-
"<ent2>",
|
9 |
-
"<ent>",
|
10 |
-
"<ent2>",
|
11 |
-
{
|
12 |
-
"content": "<ent>",
|
13 |
-
"lstrip": false,
|
14 |
-
"normalized": true,
|
15 |
-
"rstrip": false,
|
16 |
-
"single_word": false
|
17 |
-
},
|
18 |
-
{
|
19 |
-
"content": "<ent2>",
|
20 |
-
"lstrip": false,
|
21 |
-
"normalized": true,
|
22 |
-
"rstrip": false,
|
23 |
-
"single_word": false
|
24 |
-
}
|
25 |
-
],
|
26 |
-
"bos_token": {
|
27 |
-
"content": "<s>",
|
28 |
-
"lstrip": false,
|
29 |
-
"normalized": false,
|
30 |
-
"rstrip": false,
|
31 |
-
"single_word": false
|
32 |
-
},
|
33 |
"cls_token": {
|
34 |
-
"content": "
|
35 |
"lstrip": false,
|
36 |
"normalized": false,
|
37 |
"rstrip": false,
|
38 |
"single_word": false
|
39 |
},
|
40 |
-
"
|
41 |
-
"content": "
|
42 |
"lstrip": false,
|
43 |
"normalized": false,
|
44 |
"rstrip": false,
|
45 |
"single_word": false
|
46 |
},
|
47 |
-
"mask_token": {
|
48 |
-
"content": "<mask>",
|
49 |
-
"lstrip": true,
|
50 |
-
"normalized": true,
|
51 |
-
"rstrip": false,
|
52 |
-
"single_word": false
|
53 |
-
},
|
54 |
"pad_token": {
|
55 |
-
"content": "
|
56 |
"lstrip": false,
|
57 |
"normalized": false,
|
58 |
"rstrip": false,
|
59 |
"single_word": false
|
60 |
},
|
61 |
"sep_token": {
|
62 |
-
"content": "
|
63 |
"lstrip": false,
|
64 |
"normalized": false,
|
65 |
"rstrip": false,
|
66 |
"single_word": false
|
67 |
},
|
68 |
"unk_token": {
|
69 |
-
"content": "
|
70 |
"lstrip": false,
|
71 |
"normalized": false,
|
72 |
"rstrip": false,
|
|
|
1 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
"cls_token": {
|
3 |
+
"content": "[CLS]",
|
4 |
"lstrip": false,
|
5 |
"normalized": false,
|
6 |
"rstrip": false,
|
7 |
"single_word": false
|
8 |
},
|
9 |
+
"mask_token": {
|
10 |
+
"content": "[MASK]",
|
11 |
"lstrip": false,
|
12 |
"normalized": false,
|
13 |
"rstrip": false,
|
14 |
"single_word": false
|
15 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
"pad_token": {
|
17 |
+
"content": "[PAD]",
|
18 |
"lstrip": false,
|
19 |
"normalized": false,
|
20 |
"rstrip": false,
|
21 |
"single_word": false
|
22 |
},
|
23 |
"sep_token": {
|
24 |
+
"content": "[SEP]",
|
25 |
"lstrip": false,
|
26 |
"normalized": false,
|
27 |
"rstrip": false,
|
28 |
"single_word": false
|
29 |
},
|
30 |
"unk_token": {
|
31 |
+
"content": "[UNK]",
|
32 |
"lstrip": false,
|
33 |
"normalized": false,
|
34 |
"rstrip": false,
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
CHANGED
@@ -1,108 +1,62 @@
|
|
1 |
{
|
2 |
"added_tokens_decoder": {
|
3 |
"0": {
|
4 |
-
"content": "
|
5 |
"lstrip": false,
|
6 |
"normalized": false,
|
7 |
"rstrip": false,
|
8 |
"single_word": false,
|
9 |
"special": true
|
10 |
},
|
11 |
-
"
|
12 |
-
"content": "
|
13 |
"lstrip": false,
|
14 |
"normalized": false,
|
15 |
"rstrip": false,
|
16 |
"single_word": false,
|
17 |
"special": true
|
18 |
},
|
19 |
-
"
|
20 |
-
"content": "
|
21 |
"lstrip": false,
|
22 |
"normalized": false,
|
23 |
"rstrip": false,
|
24 |
"single_word": false,
|
25 |
"special": true
|
26 |
},
|
27 |
-
"
|
28 |
-
"content": "
|
29 |
"lstrip": false,
|
30 |
"normalized": false,
|
31 |
"rstrip": false,
|
32 |
"single_word": false,
|
33 |
"special": true
|
34 |
},
|
35 |
-
"
|
36 |
-
"content": "
|
37 |
-
"lstrip": true,
|
38 |
-
"normalized": true,
|
39 |
-
"rstrip": false,
|
40 |
-
"single_word": false,
|
41 |
-
"special": true
|
42 |
-
},
|
43 |
-
"32770": {
|
44 |
-
"content": "<ent>",
|
45 |
-
"lstrip": false,
|
46 |
-
"normalized": true,
|
47 |
-
"rstrip": false,
|
48 |
-
"single_word": false,
|
49 |
-
"special": true
|
50 |
-
},
|
51 |
-
"32771": {
|
52 |
-
"content": "<ent2>",
|
53 |
"lstrip": false,
|
54 |
-
"normalized":
|
55 |
"rstrip": false,
|
56 |
"single_word": false,
|
57 |
"special": true
|
58 |
}
|
59 |
},
|
60 |
-
"additional_special_tokens": [
|
61 |
-
"<ent>",
|
62 |
-
"<ent2>",
|
63 |
-
"<ent>",
|
64 |
-
"<ent2>",
|
65 |
-
"<ent>",
|
66 |
-
"<ent2>",
|
67 |
-
"<ent>",
|
68 |
-
"<ent2>",
|
69 |
-
"<ent>",
|
70 |
-
"<ent2>"
|
71 |
-
],
|
72 |
-
"bos_token": "<s>",
|
73 |
"clean_up_tokenization_spaces": true,
|
74 |
-
"cls_token": "
|
75 |
-
"
|
76 |
-
"
|
77 |
-
"
|
78 |
-
"entity_token_1": {
|
79 |
-
"__type": "AddedToken",
|
80 |
-
"content": "<ent>",
|
81 |
-
"lstrip": false,
|
82 |
-
"normalized": true,
|
83 |
-
"rstrip": false,
|
84 |
-
"single_word": false,
|
85 |
-
"special": false
|
86 |
-
},
|
87 |
-
"entity_token_2": {
|
88 |
-
"__type": "AddedToken",
|
89 |
-
"content": "<ent2>",
|
90 |
-
"lstrip": false,
|
91 |
-
"normalized": true,
|
92 |
-
"rstrip": false,
|
93 |
-
"single_word": false,
|
94 |
-
"special": false
|
95 |
-
},
|
96 |
-
"entity_unk_token": "[UNK]",
|
97 |
-
"eos_token": "</s>",
|
98 |
-
"mask_token": "<mask>",
|
99 |
-
"max_entity_length": 32,
|
100 |
-
"max_mention_length": 30,
|
101 |
"model_max_length": 512,
|
102 |
-
"
|
103 |
-
"
|
104 |
-
"
|
105 |
-
"
|
106 |
-
"
|
107 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
}
|
|
|
1 |
{
|
2 |
"added_tokens_decoder": {
|
3 |
"0": {
|
4 |
+
"content": "[PAD]",
|
5 |
"lstrip": false,
|
6 |
"normalized": false,
|
7 |
"rstrip": false,
|
8 |
"single_word": false,
|
9 |
"special": true
|
10 |
},
|
11 |
+
"100": {
|
12 |
+
"content": "[UNK]",
|
13 |
"lstrip": false,
|
14 |
"normalized": false,
|
15 |
"rstrip": false,
|
16 |
"single_word": false,
|
17 |
"special": true
|
18 |
},
|
19 |
+
"101": {
|
20 |
+
"content": "[CLS]",
|
21 |
"lstrip": false,
|
22 |
"normalized": false,
|
23 |
"rstrip": false,
|
24 |
"single_word": false,
|
25 |
"special": true
|
26 |
},
|
27 |
+
"102": {
|
28 |
+
"content": "[SEP]",
|
29 |
"lstrip": false,
|
30 |
"normalized": false,
|
31 |
"rstrip": false,
|
32 |
"single_word": false,
|
33 |
"special": true
|
34 |
},
|
35 |
+
"103": {
|
36 |
+
"content": "[MASK]",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
"rstrip": false,
|
40 |
"single_word": false,
|
41 |
"special": true
|
42 |
}
|
43 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
"clean_up_tokenization_spaces": true,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_lower_case": false,
|
47 |
+
"mask_token": "[MASK]",
|
48 |
+
"max_length": 256,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
"model_max_length": 512,
|
50 |
+
"pad_to_multiple_of": null,
|
51 |
+
"pad_token": "[PAD]",
|
52 |
+
"pad_token_type_id": 0,
|
53 |
+
"padding_side": "right",
|
54 |
+
"sep_token": "[SEP]",
|
55 |
+
"stride": 0,
|
56 |
+
"strip_accents": null,
|
57 |
+
"tokenize_chinese_chars": true,
|
58 |
+
"tokenizer_class": "BertTokenizer",
|
59 |
+
"truncation_side": "right",
|
60 |
+
"truncation_strategy": "longest_first",
|
61 |
+
"unk_token": "[UNK]"
|
62 |
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|