初始化项目,由ModelHub XC社区提供模型
Model: cross-encoder/quora-roberta-base Source: Original Platform
This commit is contained in:
10
.gitattributes
vendored
Normal file
10
.gitattributes
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||
model.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
15
CEBinaryClassificationEvaluator_Quora-dev_results.csv
Normal file
15
CEBinaryClassificationEvaluator_Quora-dev_results.csv
Normal file
@@ -0,0 +1,15 @@
|
||||
epoch,steps,Accuracy,Accuracy_Threshold,F1,F1_Threshold,Precision,Recall,Average_Precision
|
||||
0,5000,0.8608639203700198,0.2873433232307434,0.8098558473933306,0.19083455204963684,0.7614130434782609,0.8648815495022764,0.8629331317298123
|
||||
0,10000,0.863839225338779,0.25037556886672974,0.8119228437979106,0.12073762714862823,0.7546394485683987,0.8786171772513311,0.8678734374248867
|
||||
0,15000,0.8680587487490194,0.2262679636478424,0.8200071968333933,0.11036892235279083,0.7682556806688693,0.8792345088355583,0.875549687970233
|
||||
0,20000,0.8685456168348165,0.20787009596824646,0.8190316830962862,0.12376940995454788,0.7747041012936967,0.8687398719036963,0.8764299796079794
|
||||
0,25000,0.8720077898893728,0.3845294713973999,0.8250813155041562,0.2559159994125366,0.7759499694106451,0.8808550042441546,0.8833998414872404
|
||||
0,30000,0.8729815260609667,0.5238280296325684,0.8255852051403401,0.3320024907588959,0.781461061337009,0.8749903541939964,0.878249009917573
|
||||
0,-1,0.8710611019447675,0.4382350444793701,0.8225952648562416,0.149741068482399,0.7758172616605116,0.8753761864341384,0.8821009813520877
|
||||
1,5000,0.8723864650672148,0.13579325377941132,0.8250017981730562,0.046766698360443115,0.772546642419344,0.8850991588857164,0.8772769680139632
|
||||
1,10000,0.8706012820859592,0.17663632333278656,0.8243606757289911,0.04282882809638977,0.7701380511995711,0.8867968207423412,0.8717299987211413
|
||||
1,15000,0.8711963430797112,0.062239423394203186,0.8229883392482075,0.025501983240246773,0.775366769020812,0.876842348946678,0.88006993940756
|
||||
1,20000,0.8719266452084066,0.03155897557735443,0.8244302380178423,0.010280131362378597,0.7749185225420967,0.8807006713480978,0.8812910141874843
|
||||
1,25000,0.8726028508831246,0.03645790368318558,0.8253768844221104,0.03082387149333954,0.7918468628146047,0.8618720580291689,0.8816145619414946
|
||||
1,30000,0.8732249601038652,0.03989178314805031,0.8268535595721136,0.029114533215761185,0.7920288318846724,0.8648815495022764,0.8793008086700131
|
||||
1,-1,0.8735765870547185,0.05718168243765831,0.8270970543533329,0.018996555358171463,0.7787393526405452,0.8818581680685238,0.8779853764105872
|
||||
|
32
README.md
Normal file
32
README.md
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
license: apache-2.0
|
||||
datasets:
|
||||
- sentence-transformers/quora-duplicates
|
||||
language:
|
||||
- en
|
||||
base_model:
|
||||
- FacebookAI/roberta-base
|
||||
pipeline_tag: text-ranking
|
||||
library_name: sentence-transformers
|
||||
tags:
|
||||
- transformers
|
||||
---
|
||||
# Cross-Encoder for Quora Duplicate Questions Detection
|
||||
This model was trained using [SentenceTransformers](https://sbert.net) [Cross-Encoder](https://www.sbert.net/examples/applications/cross-encoder/README.html) class.
|
||||
|
||||
## Training Data
|
||||
This model was trained on the [Quora Duplicate Questions](https://www.quora.com/q/quoradata/First-Quora-Dataset-Release-Question-Pairs) dataset. The model will predict a score between 0 and 1 how likely the two given questions are duplicates.
|
||||
|
||||
Note: The model is not suitable to estimate the similarity of questions, e.g. the two questions "How to learn Java" and "How to learn Python" will result in a rather low score, as these are not duplicates.
|
||||
|
||||
## Usage and Performance
|
||||
|
||||
Pre-trained models can be used like this:
|
||||
```python
|
||||
from sentence_transformers import CrossEncoder
|
||||
|
||||
model = CrossEncoder('cross-encoder/quora-roberta-base')
|
||||
scores = model.predict([('Question 1', 'Question 2'), ('Question 3', 'Question 4')])
|
||||
```
|
||||
|
||||
You can use this model also without sentence_transformers and by just using Transformers ``AutoModel`` class
|
||||
28
config.json
Normal file
28
config.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"architectures": [
|
||||
"RobertaForSequenceClassification"
|
||||
],
|
||||
"attention_probs_dropout_prob": 0.1,
|
||||
"bos_token_id": 0,
|
||||
"eos_token_id": 2,
|
||||
"gradient_checkpointing": false,
|
||||
"hidden_act": "gelu",
|
||||
"hidden_dropout_prob": 0.1,
|
||||
"hidden_size": 768,
|
||||
"id2label": {
|
||||
"0": "LABEL_0"
|
||||
},
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 3072,
|
||||
"label2id": {
|
||||
"LABEL_0": 0
|
||||
},
|
||||
"layer_norm_eps": 1e-05,
|
||||
"max_position_embeddings": 514,
|
||||
"model_type": "roberta",
|
||||
"num_attention_heads": 12,
|
||||
"num_hidden_layers": 12,
|
||||
"pad_token_id": 1,
|
||||
"type_vocab_size": 1,
|
||||
"vocab_size": 50265
|
||||
}
|
||||
3
flax_model.msgpack
Normal file
3
flax_model.msgpack
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a7e3f35ee5fa4bbd55ddee08e12bdbe19fcec65d978d5df08bccacd206964e4f
|
||||
size 498592825
|
||||
50001
merges.txt
Normal file
50001
merges.txt
Normal file
File diff suppressed because it is too large
Load Diff
3
model.safetensors
Normal file
3
model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:746da6a97a533563fac5862d54b20fe24550c3e43672ab086542cd17c18f9148
|
||||
size 498613948
|
||||
3
onnx/model.onnx
Normal file
3
onnx/model.onnx
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:54d46af47d58e81400db15a553fed543bd1b02a3ebba6cdf194a0c6ced6714cb
|
||||
size 498905040
|
||||
3
onnx/model_O1.onnx
Normal file
3
onnx/model_O1.onnx
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3015194265815fa638a7339afa9ae888c6e38d69f1b711698f1b894e2bcc109f
|
||||
size 498803421
|
||||
3
onnx/model_O2.onnx
Normal file
3
onnx/model_O2.onnx
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f897eac0ad72f28674212d04c607d33cf85f63d8240d60a643a94e3e31555a73
|
||||
size 498626418
|
||||
3
onnx/model_O3.onnx
Normal file
3
onnx/model_O3.onnx
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b7772a18043c86686b1c862c7bece1274f73f2e5cea1af74f24c25dc6cce80d3
|
||||
size 498626273
|
||||
3
onnx/model_O4.onnx
Normal file
3
onnx/model_O4.onnx
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:13c753d011621d622a6afa18c173779d9f4ad1de5ec8801493ee6edfe93c0297
|
||||
size 249470678
|
||||
3
onnx/model_qint8_arm64.onnx
Normal file
3
onnx/model_qint8_arm64.onnx
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f11ae2b71d9c51757c6842582352dbba3757dc56ca7ecaad09137250c59352a5
|
||||
size 126017827
|
||||
3
onnx/model_qint8_avx512.onnx
Normal file
3
onnx/model_qint8_avx512.onnx
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f11ae2b71d9c51757c6842582352dbba3757dc56ca7ecaad09137250c59352a5
|
||||
size 126017827
|
||||
3
onnx/model_qint8_avx512_vnni.onnx
Normal file
3
onnx/model_qint8_avx512_vnni.onnx
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f11ae2b71d9c51757c6842582352dbba3757dc56ca7ecaad09137250c59352a5
|
||||
size 126017827
|
||||
3
onnx/model_quint8_avx2.onnx
Normal file
3
onnx/model_quint8_avx2.onnx
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f483440ba8e675c2d152249374a5537fa04f30a5564ae5c0f50c479ab3e280e6
|
||||
size 126017824
|
||||
3
openvino/openvino_model.bin
Normal file
3
openvino/openvino_model.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f89c2a8f546aad6d4b6cf36000112e5e7d5921a6799f6dd502739e1bfa6b9409
|
||||
size 498589876
|
||||
12477
openvino/openvino_model.xml
Normal file
12477
openvino/openvino_model.xml
Normal file
File diff suppressed because it is too large
Load Diff
3
openvino/openvino_model_qint8_quantized.bin
Normal file
3
openvino/openvino_model_qint8_quantized.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:05d5819f8e13bf7d32b2bd6c8206a3d5852eb36ba4c3207406f201e5036ca469
|
||||
size 125819768
|
||||
21421
openvino/openvino_model_qint8_quantized.xml
Normal file
21421
openvino/openvino_model_qint8_quantized.xml
Normal file
File diff suppressed because it is too large
Load Diff
3
pytorch_model.bin
Normal file
3
pytorch_model.bin
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fbebb63aa533e7d3b68b2e0d205287523fff83ab36e434003d55f855e699acc6
|
||||
size 498676169
|
||||
51
special_tokens_map.json
Normal file
51
special_tokens_map.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"bos_token": {
|
||||
"content": "<s>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"cls_token": {
|
||||
"content": "<s>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"eos_token": {
|
||||
"content": "</s>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"mask_token": {
|
||||
"content": "<mask>",
|
||||
"lstrip": true,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"pad_token": {
|
||||
"content": "<pad>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"sep_token": {
|
||||
"content": "</s>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"unk_token": {
|
||||
"content": "<unk>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
}
|
||||
250357
tokenizer.json
Normal file
250357
tokenizer.json
Normal file
File diff suppressed because it is too large
Load Diff
59
tokenizer_config.json
Normal file
59
tokenizer_config.json
Normal file
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"add_prefix_space": false,
|
||||
"added_tokens_decoder": {
|
||||
"0": {
|
||||
"content": "<s>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"1": {
|
||||
"content": "<pad>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"2": {
|
||||
"content": "</s>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"3": {
|
||||
"content": "<unk>",
|
||||
"lstrip": false,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
},
|
||||
"50264": {
|
||||
"content": "<mask>",
|
||||
"lstrip": true,
|
||||
"normalized": true,
|
||||
"rstrip": false,
|
||||
"single_word": false,
|
||||
"special": true
|
||||
}
|
||||
},
|
||||
"bos_token": "<s>",
|
||||
"clean_up_tokenization_spaces": false,
|
||||
"cls_token": "<s>",
|
||||
"eos_token": "</s>",
|
||||
"errors": "replace",
|
||||
"extra_special_tokens": {},
|
||||
"full_tokenizer_file": null,
|
||||
"mask_token": "<mask>",
|
||||
"model_max_length": 512,
|
||||
"pad_token": "<pad>",
|
||||
"sep_token": "</s>",
|
||||
"tokenizer_class": "RobertaTokenizer",
|
||||
"trim_offsets": true,
|
||||
"unk_token": "<unk>"
|
||||
}
|
||||
1
vocab.json
Normal file
1
vocab.json
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user