初始化项目,由ModelHub XC社区提供模型

Model: cross-encoder/stsb-distilroberta-base
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-05-13 16:48:32 +08:00
commit 311daba266
25 changed files with 318849 additions and 0 deletions

10
.gitattributes vendored Normal file
View 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

View File

@@ -0,0 +1,5 @@
epoch,steps,Pearson_Correlation,Spearman_Correlation
0,-1,0.868755228331292,0.8660826790688932
1,-1,0.8826808896987867,0.8779567515610578
2,-1,0.8842270653327202,0.8775979797054484
3,-1,0.8850764187076714,0.8791573934188543
1 epoch steps Pearson_Correlation Spearman_Correlation
2 0 -1 0.868755228331292 0.8660826790688932
3 1 -1 0.8826808896987867 0.8779567515610578
4 2 -1 0.8842270653327202 0.8775979797054484
5 3 -1 0.8850764187076714 0.8791573934188543

33
README.md Normal file
View File

@@ -0,0 +1,33 @@
---
license: apache-2.0
datasets:
- sentence-transformers/stsb
language:
- en
base_model:
- distilbert/distilroberta-base
pipeline_tag: text-ranking
library_name: sentence-transformers
tags:
- transformers
---
# Cross-Encoder for Semantic Textual Similarity
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 [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.
## Usage and Performance
Pre-trained models can be used like this:
```python
from sentence_transformers import CrossEncoder
model = CrossEncoder('cross-encoder/stsb-distilroberta-base')
scores = model.predict([('Sentence 1', 'Sentence 2'), ('Sentence 3', 'Sentence 4')])
```
The model will predict scores for the pairs `('Sentence 1', 'Sentence 2')` and `('Sentence 3', 'Sentence 4')`.
You can use this model also without sentence_transformers and by just using Transformers ``AutoModel`` class

28
config.json Normal file
View 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": 6,
"pad_token_id": 1,
"type_vocab_size": 1,
"vocab_size": 50265
}

3
flax_model.msgpack Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:29a4168dee73825781e655b94755f512bf770699ce84cb986e8ad110941a19ce
size 328480487

50001
merges.txt Normal file

File diff suppressed because it is too large Load Diff

3
model.safetensors Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e3d57386986c234c5d2169722b2ca9aad6bbd2c3703ce85571abf4de51f256a2
size 328493408

3
onnx/model.onnx Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:10e20822d3d976a31398e1b54c9c1fb2302bdc6630fe0a54dd8376799a00ced2
size 328643805

3
onnx/model_O1.onnx Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:215fd5f405e18d176aa5d6682f9ae5db0fb25ba86b42ed1ce5e6fee69534b401
size 328592269

3
onnx/model_O2.onnx Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d5c509fc0928e8f5094cf7400842300588994c185e29e3d06c38ac9fb93c614a
size 328501701

3
onnx/model_O3.onnx Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c28224afde2d0f6daea8915f32c63162d362a549d03e4eb48b54f7b9260ae627
size 328501632

3
onnx/model_O4.onnx Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e3d266db5cd20e3aa85e524190b5968a757c31485206b13c8dbda7c2edc96a90
size 164333682

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ba3637fd7ebc02785c1117bf68638d157acd4e43abce98cdd7dc5abbcbd23097
size 82821511

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ba3637fd7ebc02785c1117bf68638d157acd4e43abce98cdd7dc5abbcbd23097
size 82821511

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ba3637fd7ebc02785c1117bf68638d157acd4e43abce98cdd7dc5abbcbd23097
size 82821511

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9961df0f895e27c8a59fd0a03af94d938acb1c23a779fb765d24790048348cad
size 82821509

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:eb11739e3ffc7272703ced78cfff7c46227a7739d65f78b3f44c488ce016b80f
size 328480948

6795
openvino/openvino_model.xml Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2944484faa53b93031399658539b1f82b136db89410f1a48cef388a4424550a6
size 82817624

File diff suppressed because it is too large Load Diff

3
pytorch_model.bin Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:26b1f4b622b0caeed5d5202e37ade46fd5c8e996cbb842a6c2b501a3537fc0f5
size 328525929

51
special_tokens_map.json Normal file
View 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

File diff suppressed because it is too large Load Diff

59
tokenizer_config.json Normal file
View 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

File diff suppressed because one or more lines are too long