upload model
Browse files- README.md +19 -0
- config.json +35 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +15 -0
- spiece.model +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +26 -0
README.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
---
|
4 |
+
# Cross-Encoder for Quora Duplicate Questions Detection
|
5 |
+
This model was trained using [SentenceTransformers](https://sbert.net) [Cross-Encoder](https://www.sbert.net/examples/applications/cross-encoder/README.html) class.
|
6 |
+
|
7 |
+
## Training Data
|
8 |
+
This model was trained on the [STS benchmark dataset](http://ixa2.si.ehu.eus/stswiki/index.php/STSbenchmark). The model will predict a score between 0 and 1 how for the semantic similarity of two sentences.
|
9 |
+
|
10 |
+
|
11 |
+
## Usage and Performance
|
12 |
+
|
13 |
+
Pre-trained models can be used like this:
|
14 |
+
```
|
15 |
+
from sentence_transformers import CrossEncoder
|
16 |
+
model = CrossEncoder('model_name')
|
17 |
+
scores = model.predict([('Sentence 1', 'Sentence 2'), ('Sentence 3', 'Sentence 4')])
|
18 |
+
```
|
19 |
+
|
20 |
+
The model will predict scores for the pairs `('Sentence 1', 'Sentence 2')` and `('Sentence 3', 'Sentence 4')`.
|
21 |
+
|
22 |
+
You can use this model also without sentence_transformers and by just using Transformers ``AutoModel`` class
|
config.json
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "../../../data11/model/moco/cross/albert-small-kor-cross-sts-nli-sts-nli/bertmodel",
|
3 |
+
"architectures": [
|
4 |
+
"AlbertForSequenceClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0,
|
7 |
+
"bos_token_id": 2,
|
8 |
+
"classifier_dropout_prob": 0.1,
|
9 |
+
"embedding_size": 128,
|
10 |
+
"eos_token_id": 3,
|
11 |
+
"hidden_act": "gelu_new",
|
12 |
+
"hidden_dropout_prob": 0,
|
13 |
+
"hidden_size": 768,
|
14 |
+
"id2label": {
|
15 |
+
"0": "LABEL_0"
|
16 |
+
},
|
17 |
+
"initializer_range": 0.02,
|
18 |
+
"inner_group_num": 1,
|
19 |
+
"intermediate_size": 3072,
|
20 |
+
"label2id": {
|
21 |
+
"LABEL_0": 0
|
22 |
+
},
|
23 |
+
"layer_norm_eps": 1e-12,
|
24 |
+
"max_position_embeddings": 512,
|
25 |
+
"model_type": "albert",
|
26 |
+
"num_attention_heads": 12,
|
27 |
+
"num_hidden_groups": 1,
|
28 |
+
"num_hidden_layers": 6,
|
29 |
+
"pad_token_id": 0,
|
30 |
+
"position_embedding_type": "absolute",
|
31 |
+
"torch_dtype": "float32",
|
32 |
+
"transformers_version": "4.21.2",
|
33 |
+
"type_vocab_size": 2,
|
34 |
+
"vocab_size": 30000
|
35 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:43b536cf2d8d2dd5d6e68187a8412f3c5c89c8c8cdb087b602c48d53356ec20b
|
3 |
+
size 46750353
|
special_tokens_map.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "[CLS]",
|
3 |
+
"cls_token": "[CLS]",
|
4 |
+
"eos_token": "[SEP]",
|
5 |
+
"mask_token": {
|
6 |
+
"content": "[MASK]",
|
7 |
+
"lstrip": true,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false
|
11 |
+
},
|
12 |
+
"pad_token": "[PAD]",
|
13 |
+
"sep_token": "[SEP]",
|
14 |
+
"unk_token": "[UNK]"
|
15 |
+
}
|
spiece.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:acfb0d032fb54ca202c9e07d98ef2bf4566d39de774d0e65dba3b9562a9afac0
|
3 |
+
size 773715
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "[CLS]",
|
3 |
+
"cls_token": "[CLS]",
|
4 |
+
"do_lower_case": true,
|
5 |
+
"eos_token": "[SEP]",
|
6 |
+
"keep_acccents": false,
|
7 |
+
"keep_accent": false,
|
8 |
+
"keep_accents": true,
|
9 |
+
"mask_token": {
|
10 |
+
"__type": "AddedToken",
|
11 |
+
"content": "[MASK]",
|
12 |
+
"lstrip": true,
|
13 |
+
"normalized": true,
|
14 |
+
"rstrip": false,
|
15 |
+
"single_word": false
|
16 |
+
},
|
17 |
+
"max_len": 128,
|
18 |
+
"name_or_path": "../../../data11/model/moco/cross/albert-small-kor-cross-sts-nli-sts-nli/bertmodel",
|
19 |
+
"pad_token": "[PAD]",
|
20 |
+
"remove_space": true,
|
21 |
+
"sep_token": "[SEP]",
|
22 |
+
"sp_model_kwargs": {},
|
23 |
+
"special_tokens_map_file": "../../data11/ai_hub/vocab/tl1-1줄-mecab-30000-sp-unigram-22M-vocab/special_tokens_map.json",
|
24 |
+
"tokenizer_class": "AlbertTokenizer",
|
25 |
+
"unk_token": "[UNK]"
|
26 |
+
}
|