Feature Extraction
Transformers
Safetensors
score_predictor
deberta-v3
regression
text-evaluation
multilingual
trust-remote-code
custom_code
Instructions to use QCRI/OmniScore-deberta-v3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QCRI/OmniScore-deberta-v3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="QCRI/OmniScore-deberta-v3", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("QCRI/OmniScore-deberta-v3", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add complete model card with usage examples
Browse files
README.md
CHANGED
|
@@ -1,3 +1,223 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- deberta-v3
|
| 5 |
+
- regression
|
| 6 |
+
- text-evaluation
|
| 7 |
+
- multilingual
|
| 8 |
+
- trust-remote-code
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# OmniScore DeBERTa-v3
|
| 12 |
+
|
| 13 |
+
`QCRI/OmniScore-deberta-v3` is a multi-output regression model for automatic text quality evaluation.
|
| 14 |
+
It predicts four scalar scores in the range `[1, 5]`:
|
| 15 |
+
|
| 16 |
+
- `informativeness`
|
| 17 |
+
- `clarity`
|
| 18 |
+
- `plausibility`
|
| 19 |
+
- `faithfulness`
|
| 20 |
+
|
| 21 |
+
The model is built on top of `microsoft/deberta-v3-base` and published with custom model code (`AutoModel` + `trust_remote_code=True`).
|
| 22 |
+
|
| 23 |
+
## Model Details
|
| 24 |
+
|
| 25 |
+
- Base model: `microsoft/deberta-v3-base`
|
| 26 |
+
- Architecture: `ScorePredictorModel` (custom `transformers` model)
|
| 27 |
+
- Model type: encoder-only text regression
|
| 28 |
+
- Max sequence length: 512
|
| 29 |
+
- Number of outputs: 4
|
| 30 |
+
- Output range: `[1, 5]` (sigmoid-scaled in model head)
|
| 31 |
+
- Backbone hidden size: 768
|
| 32 |
+
- Saved dtype: `float32`
|
| 33 |
+
|
| 34 |
+
## What This Model Expects As Input
|
| 35 |
+
|
| 36 |
+
The model takes plain text and returns four quality scores.
|
| 37 |
+
|
| 38 |
+
For best behavior, format inputs consistently with your evaluation setup, for example:
|
| 39 |
+
|
| 40 |
+
```text
|
| 41 |
+
Task: headline_evaluation
|
| 42 |
+
Input: Headline: ...
|
| 43 |
+
Context: Full source text...
|
| 44 |
+
Candidate: Generated headline...
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
If your data is chat-style, you can flatten messages as:
|
| 48 |
+
|
| 49 |
+
```text
|
| 50 |
+
System: ...
|
| 51 |
+
User: ...
|
| 52 |
+
Assistant: ...
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
## Quickstart
|
| 56 |
+
|
| 57 |
+
Install dependencies:
|
| 58 |
+
|
| 59 |
+
```bash
|
| 60 |
+
pip install -U torch transformers sentencepiece
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
Load directly from Hugging Face:
|
| 64 |
+
|
| 65 |
+
```python
|
| 66 |
+
import torch
|
| 67 |
+
from transformers import AutoTokenizer, AutoModel
|
| 68 |
+
|
| 69 |
+
repo_id = "QCRI/OmniScore-deberta-v3"
|
| 70 |
+
|
| 71 |
+
tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
|
| 72 |
+
model = AutoModel.from_pretrained(repo_id, trust_remote_code=True)
|
| 73 |
+
model.eval()
|
| 74 |
+
|
| 75 |
+
text = """Task: headline_evaluation
|
| 76 |
+
Input: Headline: Microsoft announces new model card.
|
| 77 |
+
Context: Full article text goes here.
|
| 78 |
+
Candidate: Microsoft releases detailed model documentation."""
|
| 79 |
+
|
| 80 |
+
inputs = tokenizer(
|
| 81 |
+
text,
|
| 82 |
+
return_tensors="pt",
|
| 83 |
+
truncation=True,
|
| 84 |
+
max_length=512,
|
| 85 |
+
)
|
| 86 |
+
|
| 87 |
+
with torch.no_grad():
|
| 88 |
+
outputs = model(**inputs)
|
| 89 |
+
|
| 90 |
+
scores = {
|
| 91 |
+
name: float(outputs.predictions[0, i])
|
| 92 |
+
for i, name in enumerate(model.config.score_names)
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
print(scores)
|
| 96 |
+
# {'informativeness': ..., 'clarity': ..., 'plausibility': ..., 'faithfulness': ...}
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
### Batch Inference Example
|
| 100 |
+
|
| 101 |
+
```python
|
| 102 |
+
import torch
|
| 103 |
+
from transformers import AutoTokenizer, AutoModel
|
| 104 |
+
|
| 105 |
+
repo_id = "QCRI/OmniScore-deberta-v3"
|
| 106 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 107 |
+
|
| 108 |
+
tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
|
| 109 |
+
model = AutoModel.from_pretrained(repo_id, trust_remote_code=True).to(device).eval()
|
| 110 |
+
|
| 111 |
+
texts = [
|
| 112 |
+
"Task: summarization\\nInput: ...\\nCandidate: ...",
|
| 113 |
+
"Task: translation_evaluation\\nInput: ...\\nCandidate: ...",
|
| 114 |
+
]
|
| 115 |
+
|
| 116 |
+
batch = tokenizer(
|
| 117 |
+
texts,
|
| 118 |
+
return_tensors="pt",
|
| 119 |
+
truncation=True,
|
| 120 |
+
padding=True,
|
| 121 |
+
max_length=512,
|
| 122 |
+
).to(device)
|
| 123 |
+
|
| 124 |
+
with torch.no_grad():
|
| 125 |
+
pred = model(**batch).predictions
|
| 126 |
+
|
| 127 |
+
results = []
|
| 128 |
+
for row in pred.cpu():
|
| 129 |
+
results.append({
|
| 130 |
+
name: float(row[i])
|
| 131 |
+
for i, name in enumerate(model.config.score_names)
|
| 132 |
+
})
|
| 133 |
+
|
| 134 |
+
print(results)
|
| 135 |
+
```
|
| 136 |
+
|
| 137 |
+
### Programmatic Download (Optional)
|
| 138 |
+
|
| 139 |
+
```python
|
| 140 |
+
from huggingface_hub import snapshot_download
|
| 141 |
+
|
| 142 |
+
local_dir = snapshot_download("QCRI/OmniScore-deberta-v3")
|
| 143 |
+
print(local_dir)
|
| 144 |
+
```
|
| 145 |
+
|
| 146 |
+
## Evaluation Summary
|
| 147 |
+
|
| 148 |
+
Metrics below are from `metrics_final.json` on a held-out test set (`num_samples = 17,175`).
|
| 149 |
+
|
| 150 |
+
| Dimension | RMSE | MAE | Pearson r | Spearman rho | Acc@0.5 | Acc@1.0 |
|
| 151 |
+
|---|---:|---:|---:|---:|---:|---:|
|
| 152 |
+
| overall | 1.1581 | 0.8992 | 0.1098 | 0.0636 | 0.3543 | 0.7164 |
|
| 153 |
+
| informativeness | 1.5689 | 1.2259 | 0.0120 | 0.0140 | 0.3001 | 0.4880 |
|
| 154 |
+
| clarity | 1.1084 | 0.8495 | 0.1285 | 0.0789 | 0.3566 | 0.7711 |
|
| 155 |
+
| plausibility | 1.0431 | 0.7889 | 0.1183 | 0.0289 | 0.3750 | 0.8298 |
|
| 156 |
+
| faithfulness | 0.9120 | 0.7326 | 0.1803 | 0.1327 | 0.3856 | 0.7766 |
|
| 157 |
+
|
| 158 |
+
Additional notes from evaluation artifacts:
|
| 159 |
+
|
| 160 |
+
- Label range: `[1.0, 5.0]`
|
| 161 |
+
- Prediction range: `[1.2022, 4.9631]`
|
| 162 |
+
- Exact match on all four scores: `0.0293`
|
| 163 |
+
|
| 164 |
+
## Data and Task Coverage
|
| 165 |
+
|
| 166 |
+
This checkpoint is for multi-task text quality scoring and is evaluated on a mixed test set of 17,175 examples covering:
|
| 167 |
+
|
| 168 |
+
- Chat evaluation
|
| 169 |
+
- Headline evaluation
|
| 170 |
+
- Paraphrase evaluation
|
| 171 |
+
- QA evaluation
|
| 172 |
+
- Summarization evaluation
|
| 173 |
+
- Translation evaluation
|
| 174 |
+
|
| 175 |
+
The underlying project data is multilingual and multi-domain.
|
| 176 |
+
|
| 177 |
+
## Limitations
|
| 178 |
+
|
| 179 |
+
- Scores are continuous estimates and should not be treated as absolute truth.
|
| 180 |
+
- Performance differs by task, language, and domain.
|
| 181 |
+
- The model can inherit annotation noise and dataset biases.
|
| 182 |
+
- Long inputs beyond 512 tokens are truncated.
|
| 183 |
+
- Low correlation metrics on some dimensions indicate that rank ordering can be weak for certain subsets.
|
| 184 |
+
|
| 185 |
+
## Responsible Use
|
| 186 |
+
|
| 187 |
+
Recommended:
|
| 188 |
+
|
| 189 |
+
- Use as a decision-support signal, not as a sole decision maker.
|
| 190 |
+
- Calibrate thresholds on your own validation set before production use.
|
| 191 |
+
- Monitor by language/task slices for fairness and reliability.
|
| 192 |
+
|
| 193 |
+
Not recommended:
|
| 194 |
+
|
| 195 |
+
- High-stakes automated decisions without human oversight.
|
| 196 |
+
- Out-of-domain deployment without re-validation.
|
| 197 |
+
|
| 198 |
+
## Reproducibility Notes
|
| 199 |
+
|
| 200 |
+
Published artifacts include:
|
| 201 |
+
|
| 202 |
+
- `model.safetensors`
|
| 203 |
+
- `config.json`
|
| 204 |
+
- `configuration_score_predictor.py`
|
| 205 |
+
- `modeling_score_predictor.py`
|
| 206 |
+
- tokenizer files
|
| 207 |
+
- `metrics_final.json`
|
| 208 |
+
- `predictions.jsonl`
|
| 209 |
+
|
| 210 |
+
Load with `trust_remote_code=True` because the architecture is custom.
|
| 211 |
+
|
| 212 |
+
## Citation
|
| 213 |
+
|
| 214 |
+
If you use this model, please cite the project/repository and this model URL:
|
| 215 |
+
|
| 216 |
+
```bibtex
|
| 217 |
+
@misc{qcri_omniscore_deberta_v3,
|
| 218 |
+
title = {OmniScore DeBERTa-v3},
|
| 219 |
+
author = {QCRI},
|
| 220 |
+
year = {2026},
|
| 221 |
+
howpublished = {\url{https://huggingface.co/QCRI/OmniScore-deberta-v3}}
|
| 222 |
+
}
|
| 223 |
+
```
|