Text Classification
sentence-transformers
Safetensors
xlm-roberta
cross-encoder
reranker
Generated from Trainer
dataset_size:82796
loss:CrossEntropyLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use Chimalpopoka/CrossEncoderRanker with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use Chimalpopoka/CrossEncoderRanker with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("Chimalpopoka/CrossEncoderRanker") query = "Which planet is known as the Red Planet?" passages = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", "Saturn, famous for its rings, is sometimes mistaken for the Red Planet." ] scores = model.predict([(query, passage) for passage in passages]) print(scores) - Notebooks
- Google Colab
- Kaggle
New version 2
Browse files- README.md +39 -39
- model.safetensors +1 -1
README.md
CHANGED
|
@@ -4,7 +4,7 @@ tags:
|
|
| 4 |
- cross-encoder
|
| 5 |
- reranker
|
| 6 |
- generated_from_trainer
|
| 7 |
-
- dataset_size:
|
| 8 |
- loss:CrossEntropyLoss
|
| 9 |
base_model: deepvk/USER-bge-m3
|
| 10 |
pipeline_tag: text-classification
|
|
@@ -24,13 +24,13 @@ model-index:
|
|
| 24 |
type: softmax_accuracy_eval
|
| 25 |
metrics:
|
| 26 |
- type: f1_macro
|
| 27 |
-
value: 0.
|
| 28 |
name: F1 Macro
|
| 29 |
- type: f1_micro
|
| 30 |
-
value: 0.
|
| 31 |
name: F1 Micro
|
| 32 |
- type: f1_weighted
|
| 33 |
-
value: 0.
|
| 34 |
name: F1 Weighted
|
| 35 |
---
|
| 36 |
|
|
@@ -74,11 +74,11 @@ from sentence_transformers import CrossEncoder
|
|
| 74 |
model = CrossEncoder("Chimalpopoka/CrossEncoderRanker")
|
| 75 |
# Get scores for pairs of texts
|
| 76 |
pairs = [
|
| 77 |
-
['
|
| 78 |
-
['
|
| 79 |
-
['
|
| 80 |
-
['
|
| 81 |
-
['А
|
| 82 |
]
|
| 83 |
scores = model.predict(pairs)
|
| 84 |
print(scores.shape)
|
|
@@ -120,9 +120,9 @@ You can finetune this model on your own dataset.
|
|
| 120 |
|
| 121 |
| Metric | Value |
|
| 122 |
|:-------------|:-----------|
|
| 123 |
-
| **f1_macro** | **0.
|
| 124 |
-
| f1_micro | 0.
|
| 125 |
-
| f1_weighted | 0.
|
| 126 |
|
| 127 |
<!--
|
| 128 |
## Bias, Risks and Limitations
|
|
@@ -142,19 +142,19 @@ You can finetune this model on your own dataset.
|
|
| 142 |
|
| 143 |
#### Unnamed Dataset
|
| 144 |
|
| 145 |
-
* Size:
|
| 146 |
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
|
| 147 |
* Approximate statistics based on the first 1000 samples:
|
| 148 |
| | sentence_0 | sentence_1 | label |
|
| 149 |
|:--------|:-----------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------|:------------------------------------------------|
|
| 150 |
| type | string | string | int |
|
| 151 |
-
| details | <ul><li>min:
|
| 152 |
* Samples:
|
| 153 |
-
| sentence_0
|
| 154 |
-
|:-------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------|:---------------|
|
| 155 |
-
| <code>
|
| 156 |
-
| <code>
|
| 157 |
-
| <code>
|
| 158 |
* Loss: [<code>CrossEntropyLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#crossentropyloss)
|
| 159 |
|
| 160 |
### Training Hyperparameters
|
|
@@ -289,26 +289,26 @@ You can finetune this model on your own dataset.
|
|
| 289 |
### Training Logs
|
| 290 |
| Epoch | Step | Training Loss | softmax_accuracy_eval_f1_macro |
|
| 291 |
|:------:|:-----:|:-------------:|:------------------------------:|
|
| 292 |
-
| 0.
|
| 293 |
-
| 0.
|
| 294 |
-
| 0.
|
| 295 |
-
| 0.
|
| 296 |
-
| 0.
|
| 297 |
-
| 0.
|
| 298 |
-
| 0.
|
| 299 |
-
| 0.
|
| 300 |
-
| 0.
|
| 301 |
-
| 0.
|
| 302 |
-
| 0.
|
| 303 |
-
| 0.
|
| 304 |
-
| 0.
|
| 305 |
-
| 0.
|
| 306 |
-
| 0.
|
| 307 |
-
| 0.
|
| 308 |
-
| 0.
|
| 309 |
-
| 0.
|
| 310 |
-
| 0.
|
| 311 |
-
| 0.
|
| 312 |
|
| 313 |
|
| 314 |
### Framework Versions
|
|
|
|
| 4 |
- cross-encoder
|
| 5 |
- reranker
|
| 6 |
- generated_from_trainer
|
| 7 |
+
- dataset_size:84982
|
| 8 |
- loss:CrossEntropyLoss
|
| 9 |
base_model: deepvk/USER-bge-m3
|
| 10 |
pipeline_tag: text-classification
|
|
|
|
| 24 |
type: softmax_accuracy_eval
|
| 25 |
metrics:
|
| 26 |
- type: f1_macro
|
| 27 |
+
value: 0.9705029214992837
|
| 28 |
name: F1 Macro
|
| 29 |
- type: f1_micro
|
| 30 |
+
value: 0.9742240925828511
|
| 31 |
name: F1 Micro
|
| 32 |
- type: f1_weighted
|
| 33 |
+
value: 0.9741458333568638
|
| 34 |
name: F1 Weighted
|
| 35 |
---
|
| 36 |
|
|
|
|
| 74 |
model = CrossEncoder("Chimalpopoka/CrossEncoderRanker")
|
| 75 |
# Get scores for pairs of texts
|
| 76 |
pairs = [
|
| 77 |
+
['Флю-М - вакцинация против гриппа с осмотром врача амбулаторно', 'Вакцинация против гриппа. Вакцина: ФЛЮ-М (Россия)'],
|
| 78 |
+
['Антитела к В-2 -гликопротеину', 'Антитела к бета-2-гликопротеину, суммарные'],
|
| 79 |
+
['Триплексное (дуплексное) сканирование сосудов шеи и головы (внутричерепных) (высшая категория/кандидат медицинских наук)', 'УЗИ сосудов головы и шеи, без дополнительных методов'],
|
| 80 |
+
['Посев (ухо прав) на грибы рода Candida с определением чувствительности к антимикотическим препаратам', 'Посев на грибы родов Candida, Aspergillus, Cryptococcus с подбором антимикотических препаратов для Candida spp. в соскобе из уха'],
|
| 81 |
+
['Антиген СА 125', 'CA 125'],
|
| 82 |
]
|
| 83 |
scores = model.predict(pairs)
|
| 84 |
print(scores.shape)
|
|
|
|
| 120 |
|
| 121 |
| Metric | Value |
|
| 122 |
|:-------------|:-----------|
|
| 123 |
+
| **f1_macro** | **0.9705** |
|
| 124 |
+
| f1_micro | 0.9742 |
|
| 125 |
+
| f1_weighted | 0.9741 |
|
| 126 |
|
| 127 |
<!--
|
| 128 |
## Bias, Risks and Limitations
|
|
|
|
| 142 |
|
| 143 |
#### Unnamed Dataset
|
| 144 |
|
| 145 |
+
* Size: 84,982 training samples
|
| 146 |
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
|
| 147 |
* Approximate statistics based on the first 1000 samples:
|
| 148 |
| | sentence_0 | sentence_1 | label |
|
| 149 |
|:--------|:-----------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------|:------------------------------------------------|
|
| 150 |
| type | string | string | int |
|
| 151 |
+
| details | <ul><li>min: 6 characters</li><li>mean: 68.62 characters</li><li>max: 747 characters</li></ul> | <ul><li>min: 6 characters</li><li>mean: 63.12 characters</li><li>max: 300 characters</li></ul> | <ul><li>0: ~30.10%</li><li>1: ~69.90%</li></ul> |
|
| 152 |
* Samples:
|
| 153 |
+
| sentence_0 | sentence_1 | label |
|
| 154 |
+
|:--------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------|:---------------|
|
| 155 |
+
| <code>Флю-М - вакцинация против гриппа с осмотром врача амбулаторно</code> | <code>Вакцинация против гриппа. Вакцина: ФЛЮ-М (Россия)</code> | <code>0</code> |
|
| 156 |
+
| <code>Антитела к В-2 -гликопротеину</code> | <code>Антитела к бета-2-гликопротеину, суммарные</code> | <code>1</code> |
|
| 157 |
+
| <code>Триплексное (дуплексное) сканирование сосудов шеи и головы (внутричерепных) (высшая категория/кандидат медицинских наук)</code> | <code>УЗИ сосудов головы и шеи, без дополнительных методов</code> | <code>1</code> |
|
| 158 |
* Loss: [<code>CrossEntropyLoss</code>](https://sbert.net/docs/package_reference/cross_encoder/losses.html#crossentropyloss)
|
| 159 |
|
| 160 |
### Training Hyperparameters
|
|
|
|
| 289 |
### Training Logs
|
| 290 |
| Epoch | Step | Training Loss | softmax_accuracy_eval_f1_macro |
|
| 291 |
|:------:|:-----:|:-------------:|:------------------------------:|
|
| 292 |
+
| 0.0471 | 500 | 0.5573 | - |
|
| 293 |
+
| 0.0941 | 1000 | 0.2229 | - |
|
| 294 |
+
| 0.1412 | 1500 | 0.1971 | - |
|
| 295 |
+
| 0.1883 | 2000 | 0.2005 | 0.9569 |
|
| 296 |
+
| 0.2353 | 2500 | 0.2017 | - |
|
| 297 |
+
| 0.2824 | 3000 | 0.1674 | - |
|
| 298 |
+
| 0.3295 | 3500 | 0.1681 | - |
|
| 299 |
+
| 0.3765 | 4000 | 0.1844 | 0.9636 |
|
| 300 |
+
| 0.4236 | 4500 | 0.1635 | - |
|
| 301 |
+
| 0.4707 | 5000 | 0.1537 | - |
|
| 302 |
+
| 0.5177 | 5500 | 0.1458 | - |
|
| 303 |
+
| 0.5648 | 6000 | 0.1374 | 0.9675 |
|
| 304 |
+
| 0.6119 | 6500 | 0.1311 | - |
|
| 305 |
+
| 0.6589 | 7000 | 0.1505 | - |
|
| 306 |
+
| 0.7060 | 7500 | 0.1218 | - |
|
| 307 |
+
| 0.7531 | 8000 | 0.1213 | 0.9694 |
|
| 308 |
+
| 0.8002 | 8500 | 0.1211 | - |
|
| 309 |
+
| 0.8472 | 9000 | 0.1027 | - |
|
| 310 |
+
| 0.8943 | 9500 | 0.142 | - |
|
| 311 |
+
| 0.9414 | 10000 | 0.1204 | 0.9705 |
|
| 312 |
|
| 313 |
|
| 314 |
### Framework Versions
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1436163192
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:78e4d9a9c4b94e16d87ccbd5181a4ba594cd38655632b16876878328669fe359
|
| 3 |
size 1436163192
|