---
tags:
- sentence-transformers
- cross-encoder
- reranker
- generated_from_trainer
- dataset_size:164849
- loss:RankNetLoss
base_model: nreimers/MiniLM-L3-H384-uncased
pipeline_tag: text-ranking
library_name: sentence-transformers
---
# CrossEncoder based on nreimers/MiniLM-L3-H384-uncased
This is a [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.html) model finetuned from [nreimers/MiniLM-L3-H384-uncased](https://huggingface.co/nreimers/MiniLM-L3-H384-uncased) using the [sentence-transformers](https://www.SBERT.net) library. It computes scores for pairs of texts, which can be used for text reranking and semantic search.
## Model Details
### Model Description
- **Model Type:** Cross Encoder
- **Base model:** [nreimers/MiniLM-L3-H384-uncased](https://huggingface.co/nreimers/MiniLM-L3-H384-uncased)
- **Maximum Sequence Length:** 64 tokens
- **Number of Output Labels:** 1 label
### Model Sources
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Documentation:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
- **Hugging Face:** [Cross Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=cross-encoder)
## Usage
### Direct Usage (Sentence Transformers)
First install the Sentence Transformers library:
```bash
pip install -U sentence-transformers
```
Then you can load this model and run inference.
```python
from sentence_transformers import CrossEncoder
# Download from the 🤗 Hub
model = CrossEncoder("lucasflins/CE-MiniLM-L3-H384-uncased-RankNet-20260207-052807")
# Get scores for pairs of texts
pairs = [
['escada 5', 'escada mor alumÃnio 5 degraus uso doméstico'],
['escada 5', 'escada alumÃnio 5 degraus mor'],
['escada 5', 'escada doméstica 05 degraus alumÃnio - real'],
['escada 5', 'escada alumÃnio 5 degraus - mor'],
['escada 5', 'escada de alumÃnio 5 degraus com fita de segurança mor'],
]
scores = model.predict(pairs)
print(scores.shape)
# (5,)
# Or rank different texts based on similarity to a single text
ranks = model.rank(
'escada 5',
[
'escada mor alumÃnio 5 degraus uso doméstico',
'escada alumÃnio 5 degraus mor',
'escada doméstica 05 degraus alumÃnio - real',
'escada alumÃnio 5 degraus - mor',
'escada de alumÃnio 5 degraus com fita de segurança mor',
]
)
# [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...]
```
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 164,849 training samples
* Columns: query, text, and label
* Approximate statistics based on the first 1000 samples:
| | query | text | label |
|:--------|:---------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------|
| type | string | list | list |
| details |
blusas femininas de verao | ['blusa de malha feminina com decote v - manga curta - moda verão 2024', 'kit 2 regata feminina verão soltinhas confortáveis plus', 'blusa feminina manga princesa crepe verão básico em tendência 2025.', 'regata feminina malha fria senhoras plus verão', 'blusa cropped feminino tricot modal decote cruzado com alça verão', ...] | [1.0, 0.9726344517752807, 0.8374873988889217, 0.8008303826878321, 0.7915794516443119, ...] |
| boneca grande bebe reborn | ['bebê reborn boneca princesa grande com vários acessórios', 'boneca reborn bebê realista grande com vestido florido', 'boneca bebe reborn grande 60cm corpo de pano com girafinha de pelúcia', 'bebe reborn loira realista grande 100% silicone 48cm banho', 'bebe reborn realista princesa grande 100% silicone 20 itens', ...] | [1.0, 0.9116494092065375, 0.8928073970303235, 0.8879649368952169, 0.8731986703319667, ...] |
| porta tempero de inox | ['kit porta temperos e condimentos vidro tampa inox 6un 200ml', 'kit potes de vidro hermético 150ml porta tempero tampa inox 3 un', 'porta tempero condimento inox magnético imã cozinha 3 potes', 'kit 6 porta tempero condimento vidro suporte giratório inox cozinha pote organizador', 'porta tempero condimento giratório redondo 20 peças inox', ...] | [0.9655845721090657, 0.8396654217445704, 0.7738607871762022, 0.6343641152653602, 0.566489008709851, ...] |
* Loss: [RankNetLoss](https://sbert.net/docs/package_reference/cross_encoder/losses.html#ranknetloss) with these parameters:
```json
{
"k": null,
"sigma": 1.0,
"eps": 1e-10,
"reduction_log": "binary",
"activation_fn": "torch.nn.modules.linear.Identity",
"mini_batch_size": null
}
```
### Evaluation Dataset
#### Unnamed Dataset
* Size: 54,809 evaluation samples
* Columns: query, text, and label
* Approximate statistics based on the first 1000 samples:
| | query | text | label |
|:--------|:----------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------|
| type | string | list | list |
| details | escada 5 | ['escada mor alumÃnio 5 degraus uso doméstico', 'escada alumÃnio 5 degraus mor', 'escada doméstica 05 degraus alumÃnio - real', 'escada alumÃnio 5 degraus - mor', 'escada de alumÃnio 5 degraus com fita de segurança mor', ...] | [1.0, 0.7096172820312041, 0.6436050498616379, 0.6233409190446045, 0.5943286560299376, ...] |
| mascara lola | ['lola cosmetics danos vorazes máscara de reparação intensiva', 'máscara disciplinante xapadinha 450g lola', 'máscara nutritiva lola bossa crespos e cachos 450g', 'máscara lola morte súbita 450gr', 'kit argan lola cosmetics - shampoo + máscara', ...] | [1.0, 0.9644981507636873, 0.9554469702621406, 0.9550674725047994, 0.9500765764997154, ...] |
| brinox roma | ['chaleira em inox com indução e apito brinox roma 2,7 litros vanilla', 'chaleira roma inox 2,7l com apito de indução vanilla 4875/100 brinox', 'chaleira brinox inox com apito preto marble 2,7l roma'] | [1.0, 0.29334574198355634, 0.0] |
* Loss: [RankNetLoss](https://sbert.net/docs/package_reference/cross_encoder/losses.html#ranknetloss) with these parameters:
```json
{
"k": null,
"sigma": 1.0,
"eps": 1e-10,
"reduction_log": "binary",
"activation_fn": "torch.nn.modules.linear.Identity",
"mini_batch_size": null
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `eval_strategy`: epoch
- `per_device_train_batch_size`: 64
- `per_device_eval_batch_size`: 16
- `num_train_epochs`: 10
- `warmup_ratio`: 0.1
- `log_level`: info
- `tf32`: True
- `load_best_model_at_end`: True
- `push_to_hub`: True
- `hub_strategy`: end
- `hub_private_repo`: True
- `hub_always_push`: True
- `eval_on_start`: True
#### All Hyperparameters