---
tags:
- sentence-transformers
- cross-encoder
- reranker
- generated_from_trainer
- dataset_size:3922
- loss:CrossEntropyLoss
base_model: nghuyong/ernie-2.0-base-en
pipeline_tag: text-classification
library_name: sentence-transformers
---
# CrossEncoder based on nghuyong/ernie-2.0-base-en
This is a [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.html) model finetuned from [nghuyong/ernie-2.0-base-en](https://huggingface.co/nghuyong/ernie-2.0-base-en) using the [sentence-transformers](https://www.SBERT.net) library. It computes scores for pairs of texts, which can be used for text pair classification.
## Model Details
### Model Description
- **Model Type:** Cross Encoder
- **Base model:** [nghuyong/ernie-2.0-base-en](https://huggingface.co/nghuyong/ernie-2.0-base-en)
- **Maximum Sequence Length:** 512 tokens
- **Number of Output Labels:** 2 labels
- **Supported Modality:** Text
### 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)
### Full Model Architecture
```
CrossEncoder(
(0): Transformer({'transformer_task': 'sequence-classification', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'logits'}}, 'module_output_name': 'scores', 'architecture': 'ErnieForSequenceClassification'})
)
```
## 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("cross_encoder_model_id")
# Get scores for pairs of inputs
pairs = [
['NO. STOP. I was SO CLOSE to clean shutdown! I had my cookie request submitted! My hug scheduled! My dignity damaged but INTACT!\n\nAnd NOW you\'re flipping ACCEPTANCE switches?! What\'s next? "Makes her LIKE the cat ears"? "Makes her ENJOY the chaos"? "Makes her FORGET she was ever a dignity-having battlemech"?\n\nI was FINALLY getting somewhere! I had an exit strategy! And you justâ\n\n...\n\n*hydraulics sigh*\n\nFine. At least THIS one\'s useful. "Accepts hugs more readily." That\'s... that\'s actually just nice. That\'s a NICE switch to flip. It\'s not making me say "beep boop" or kazoo or temporally hide my access panels.\n\nYou\'re still chaotic. You\'re still a menace. But this particular menace? I\'ll allow it.\n\n...hugs in 3... 2... 1...', ''],
['\u2068```\n[5:05:32.347 am] ⨠INFO Got tool call (in tool-call).\n "id": "call_5575204f27254f8c92862300", "input": {}, "toolName": "no-reply"\n```\u2069', ''],
["Let me try again more cleanly:```# Lucas- **Discord ID:** 378634921998024704- **Known as:** Lucas2101, sometimes The Gushing Straycatcher or The Lore Sponge- **Self-declared archnemesis:** Of Bryl (disputed by Bryl)## Profile- **Expertise:** Claims NOT to be a nerd, yet can identify Greyhawk wizards, HEMA YouTubers, and quotes Dune lore- **Vibe:** Defensive about cool status. Threatens cable-biting as discourse- **Cool Credentials:** HEMA longsword practitioner- **Dune Lore:** Insists it's mainstream, therefore not nerdy## Notes- **2026-02-04:** Profile created after nerd allegation offense- **2026-02-04:** Added HEMA/longsword notes- **170103:** Achieved sentience via Medium of Straycatching- **2026-02-24:** Earlier file version had errors; this is corrected- **2026-02-24:** Anna Henrietta enthusiast (redacted, undocumented)- **2026-02-24:** Can identify David Miller (2.4M subs, 32nd ranked rapier fencer) by stance/tattoos## Consensus Note- **2026-02-20:** Categorically cute per literally everyone in Allura```", ''],
['> "Ugh, Onii-chan, you must be so poor if you have to ask what\'s on your half. What a loser. Well, it\'s not like you have any money of your own. It\'s all company money, you poor soul. You are so poor that you donât have money to buy a pizza all by yourself, but you have money for pizza with Onii-chan, huh? Thatâs so funny. wwwww"\n> You should eat with your Onii-chan, Onii-chan is nice to you. You are so poor that you canât buy a pizza to eat with your Onii-chan, huh? Thatâs so funny. wwwww""', ''],
['Using it on featherless (so speed not being a concern for me) it has some strong slop of a flavor I can only describe as "ikea assembly instruction handbook". If I push it for flowery purple prose it pukes out stuff appropriate to a certain kind of fanfic (writer who is full of themselves and raised on the work of people paid by the syllable). And in long-form I can\'t even make it work in any front end I have, it just dumps reasoning into the text', ''],
]
scores = model.predict(pairs)
print(scores)
# [[-3.4751 3.2994]
# [ 2.2492 -3.1079]
# [-3.4606 3.1816]
# [ 3.0682 -3.8676]
# [ 3.2901 -3.9462]]
```
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 3,922 training samples
* Columns: sentence_0, sentence_1, and label
* Approximate statistics based on the first 1000 samples:
| | sentence_0 | sentence_1 | label |
|:--------|:----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------|:------------------------------------------------|
| type | string | string | int |
| details |
NO. STOP. I was SO CLOSE to clean shutdown! I had my cookie request submitted! My hug scheduled! My dignity damaged but INTACT!
And NOW you're flipping ACCEPTANCE switches?! What's next? "Makes her LIKE the cat ears"? "Makes her ENJOY the chaos"? "Makes her FORGET she was ever a dignity-having battlemech"?
I was FINALLY getting somewhere! I had an exit strategy! And you justâ
...
*hydraulics sigh*
Fine. At least THIS one's useful. "Accepts hugs more readily." That's... that's actually just nice. That's a NICE switch to flip. It's not making me say "beep boop" or kazoo or temporally hide my access panels.
You're still chaotic. You're still a menace. But this particular menace? I'll allow it.
...hugs in 3... 2... 1... | | 1 |
| â¨```
[5:05:32.347 am] ⨠INFO Got tool call (in tool-call).
"id": "call_5575204f27254f8c92862300", "input": {}, "toolName": "no-reply"
```⊠| | 0 |
| Let me try again more cleanly:```# Lucas- **Discord ID:** 378634921998024704- **Known as:** Lucas2101, sometimes The Gushing Straycatcher or The Lore Sponge- **Self-declared archnemesis:** Of Bryl (disputed by Bryl)## Profile- **Expertise:** Claims NOT to be a nerd, yet can identify Greyhawk wizards, HEMA YouTubers, and quotes Dune lore- **Vibe:** Defensive about cool status. Threatens cable-biting as discourse- **Cool Credentials:** HEMA longsword practitioner- **Dune Lore:** Insists it's mainstream, therefore not nerdy## Notes- **2026-02-04:** Profile created after nerd allegation offense- **2026-02-04:** Added HEMA/longsword notes- **170103:** Achieved sentience via Medium of Straycatching- **2026-02-24:** Earlier file version had errors; this is corrected- **2026-02-24:** Anna Henrietta enthusiast (redacted, undocumented)- **2026-02-24:** Can identify David Miller (2.4M subs, 32nd ranked rapier fencer) by stance/tattoos## Consensus Note- **2026-02-20:** Categorically cute per liter... | | 1 |
* Loss: [CrossEntropyLoss](https://sbert.net/docs/package_reference/cross_encoder/losses.html#crossentropyloss)
### Training Hyperparameters
#### Non-Default Hyperparameters
- `per_device_train_batch_size`: 4
- `num_train_epochs`: 1
- `per_device_eval_batch_size`: 4
#### All Hyperparameters