Text Classification
sentence-transformers
Safetensors
English
neobert
cross-encoder
stsb
stsbenchmark-sts
custom_code
Eval Results (legacy)
Run this model with HF Jobs
Run dleemiller/NeoCE-sts on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/dleemiller/NeoCE-sts. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/dleemiller/NeoCE-sts on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use dleemiller/NeoCE-sts with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use dleemiller/NeoCE-sts with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("dleemiller/NeoCE-sts", trust_remote_code=True) 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
Update README.md
Browse files45 unmodified lines4647484945 unmodified lines- type: spearman_cosinevalue: 0.9087449124017827name: Spearman Cosine---45 unmodified lines46474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714845 unmodified lines- type: spearman_cosinevalue: 0.9087449124017827name: Spearman Cosine---# NeoBERT Cross-Encoder: Semantic Similarity (STS)Cross encoders are high performing encoder models that compare two texts and output a 0-1 score.I've found the `cross-encoders/roberta-large-stsb` model to be very useful in creating evaluators for LLM outputs.They're simple to use, fast and very accurate.---## Features- **High performing:** Achieves **Pearson: 0.9124** and **Spearman: 0.9087** on the STS-Benchmark test set.- **Efficient architecture:** Based on the NeoBERT design (250M parameters), offering faster inference speeds.- **Extended context length:** Processes sequences up to 4096 tokens, great for LLM output evals.- **Diversified training:** Pretrained on `dleemiller/wiki-sim` and fine-tuned on `sentence-transformers/stsb`.---## Performance| Model | STS-B Test Pearson | STS-B Test Spearman | Context Length | Parameters | Speed ||--------------------------------|--------------------|---------------------|----------------|------------|---------|| `ModernCE-large-sts` | **0.9256** | **0.9215** | **8192** | 395M | **Medium** || `ModernCE-base-sts` | **0.9162** | **0.9122** | **8192** | 149M | **Fast** || `NeoCE-sts` | **0.9124** | **0.9087** | **4096** | 250M | **Fast** || `stsb-roberta-large` | 0.9147 | - | 512 | 355M | Slow || `stsb-distilroberta-base` | 0.8792 | - | 512 | 82M | Fast |---## UsageTo use NeoCE for semantic similarity tasks, you can load the model with the Hugging Face `sentence-transformers` library:```pythonfrom sentence_transformers import CrossEncoder# Load NeoCE modelmodel = CrossEncoder("dleemiller/NeoCE-sts")# Predict similarity scores for sentence pairssentence_pairs = [("It's a wonderful day outside.", "It's so sunny today!"),("It's a wonderful day outside.", "He drove to work earlier."),]scores = model.predict(sentence_pairs)print(scores) # Outputs: array([0.9184, 0.0123], dtype=float32)```### OutputThe model returns similarity scores in the range `[0, 1]`, where higher scores indicate stronger semantic similarity.---## Training Details### PretrainingThe model was pretrained on the `pair-score-sampled` subset of the [`dleemiller/wiki-sim`](https://huggingface.co/datasets/dleemiller/wiki-sim) dataset. This dataset provides diverse sentence pairs with semantic similarity scores, helping the model build a robust understanding of relationships between sentences.- **Classifier Dropout:** a somewhat large classifier dropout of 0.3, to reduce overreliance on teacher scores.- **Objective:** STS-B scores from `cross-encoder/stsb-roberta-large`.### Fine-TuningFine-tuning was performed on the [`sentence-transformers/stsb`](https://huggingface.co/datasets/sentence-transformers/stsb) dataset.---## Model Card- **Architecture:** NeoBERT- **Pretraining Data:** `dleemiller/wiki-sim (pair-score-sampled)`- **Fine-Tuning Data:** `sentence-transformers/stsb`---## Thank YouThanks to the chandra-lab team for providing the NeoBERT models, and the Sentence Transformers team for their leadership in transformer encoder models.---## CitationIf you use this model in your research, please cite:```bibtex@misc{moderncestsb2025,author = {Miller, D. Lee},title = {NeoCE STS: An STS cross encoder model},year = {2025},publisher = {Hugging Face Hub},url = {https://huggingface.co/dleemiller/ModernCE-base-sts},}```---## LicenseThis model is licensed under the [MIT License](LICENSE).
README.md+100-1