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

Model: cross-encoder/stsb-roberta-base
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-05-13 16:48:33 +08:00
commit f6dffe2ade
25 changed files with 334487 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,7 @@
epoch,steps,Pearson_Correlation,Spearman_Correlation
0,-1,0.884083449570549,0.8863177324254378
1,-1,0.9005634047434494,0.8979486190100184
2,-1,0.9025966516139985,0.8991112912317778
3,-1,0.9027764763549494,0.8998067524459462
4,-1,0.9030718202264396,0.9010020546460012
5,-1,0.9041287939833499,0.9017253433578207
1 epoch steps Pearson_Correlation Spearman_Correlation
2 0 -1 0.884083449570549 0.8863177324254378
3 1 -1 0.9005634047434494 0.8979486190100184
4 2 -1 0.9025966516139985 0.8991112912317778
5 3 -1 0.9027764763549494 0.8998067524459462
6 4 -1 0.9030718202264396 0.9010020546460012
7 5 -1 0.9041287939833499 0.9017253433578207

33
README.md Normal file
View File

@@ -0,0 +1,33 @@
---
license: apache-2.0
datasets:
- sentence-transformers/stsb
language:
- en
base_model:
- FacebookAI/roberta-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-roberta-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": 12,
"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:768905d4b87ebefec4c819d9a36518802db21df7fc2d9e8ce7cb47ed3875283f
size 498592825

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:130e4eac117036a5803c3f832e95185b558d341cb9c4e576975614d8b1340ef7
size 498613948

3
onnx/model.onnx Normal file
View File

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

3
onnx/model_O1.onnx Normal file
View File

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

3
onnx/model_O2.onnx Normal file
View File

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

3
onnx/model_O3.onnx Normal file
View File

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

3
onnx/model_O4.onnx Normal file
View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

12477
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:fc01458a7eef642064bbefbc7c84f867b3eaec921468520821332f428e7dad21
size 125819768

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:bd8cddb9f6ddf924f91a1cc3c2bf83973a483a936654259d389ed1e7c56711d2
size 498676169

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