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
File size: 6,246 Bytes
ccd3a7c 6931e46 ccd3a7c 6931e46 ccd3a7c 6931e46 ccd3a7c 6931e46 ccd3a7c 6931e46 ccd3a7c 6931e46 ccd3a7c 6931e46 ccd3a7c 6931e46 ccd3a7c 6931e46 ccd3a7c 6931e46 ccd3a7c 6931e46 ccd3a7c 6931e46 ccd3a7c 6931e46 ccd3a7c 6931e46 ccd3a7c 6931e46 ccd3a7c b2de447 ccd3a7c 6931e46 ccd3a7c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 | ---
library_name: transformers
tags:
- deberta-v3
- regression
- text-evaluation
- multilingual
- trust-remote-code
---
# OmniScore DeBERTa-v3
`QCRI/OmniScore-deberta-v3` is a multi-output regression model for automatic text quality evaluation.
It predicts four scalar scores in the range `[1, 5]`:
- `informativeness`
- `clarity`
- `plausibility`
- `faithfulness`
The model is built on top of `microsoft/deberta-v3-base` and published with custom model code (`AutoModel` + `trust_remote_code=True`).
## Model Details
- Base model: `microsoft/deberta-v3-base`
- Architecture: `ScorePredictorModel` (custom `transformers` model)
- Model type: encoder-only text regression
- Max sequence length: 512
- Number of outputs: 4
- Output range: `[1, 5]` (sigmoid-scaled in model head)
- Backbone hidden size: 768
- Saved dtype: `float32`
## Quick Access
Model page: <https://huggingface.co/QCRI/OmniScore-deberta-v3>
```python
from transformers import AutoTokenizer, AutoModel
repo_id = "QCRI/OmniScore-deberta-v3"
tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
model = AutoModel.from_pretrained(repo_id, trust_remote_code=True)
```
## What Input To Provide
The model takes a single text string and returns four quality scores.
For best results, keep a consistent prompt/input format during inference.
Recommended flat format:
```text
Task: <task_name>
Source: <source text, if available>
Reference: <reference text, if available>
Candidate: <model output being evaluated>
```
Chat-style input can be flattened as:
```text
System: ...
User: ...
Assistant: ...
```
## Usage Examples
Install dependencies:
```bash
pip install -U torch transformers sentencepiece
```
### 1) Single Text Example
```python
import torch
from transformers import AutoTokenizer, AutoModel
repo_id = "QCRI/OmniScore-deberta-v3"
tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
model = AutoModel.from_pretrained(repo_id, trust_remote_code=True).eval()
text = """Task: headline_evaluation
Source: Full article text goes here.
Candidate: Microsoft releases detailed model documentation."""
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
outputs = model(**inputs)
scores = {
name: float(outputs.predictions[0, i])
for i, name in enumerate(model.config.score_names)
}
print(scores)
```
### 2) Batch Example (GPU/CPU)
```python
import torch
from transformers import AutoTokenizer, AutoModel
repo_id = "QCRI/OmniScore-deberta-v3"
device = "cuda" if torch.cuda.is_available() else "cpu"
tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
model = AutoModel.from_pretrained(repo_id, trust_remote_code=True).to(device).eval()
texts = [
"Task: summarization\nSource: ...\nCandidate: ...",
"Task: translation_evaluation\nSource: ...\nReference: ...\nCandidate: ...",
]
batch = tokenizer(texts, return_tensors="pt", truncation=True, padding=True, max_length=512)
batch = {k: v.to(device) for k, v in batch.items()}
with torch.no_grad():
pred = model(**batch).predictions
results = []
for row in pred.cpu():
results.append({name: float(row[i]) for i, name in enumerate(model.config.score_names)})
print(results)
```
### 3) Chat Messages Helper
```python
from transformers import AutoTokenizer, AutoModel
import torch
repo_id = "QCRI/OmniScore-deberta-v3"
tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
model = AutoModel.from_pretrained(repo_id, trust_remote_code=True).eval()
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Write a concise summary of this article."},
{"role": "assistant", "content": "Here is a short summary..."},
]
flat_text = " ".join([f"{m['role'].capitalize()}: {m['content']}" for m in messages])
inputs = tokenizer(flat_text, return_tensors="pt", truncation=True, max_length=512)
with torch.no_grad():
outputs = model(**inputs)
print(dict((n, float(outputs.predictions[0, i])) for i, n in enumerate(model.config.score_names)))
```
### Programmatic Download (Optional)
```python
from huggingface_hub import snapshot_download
local_dir = snapshot_download("QCRI/OmniScore-deberta-v3")
print(local_dir)
```
## Data and Task Coverage
This checkpoint is for multi-task text quality scoring and is evaluated on the test set covering:
- Chat evaluation
- Headline evaluation
- Paraphrase evaluation
- QA evaluation
- Summarization evaluation
- Translation evaluation
The underlying project data is multilingual and multi-domain.
## Intended Use
Use this model to score generated text quality (or response quality) as a supporting signal in:
- evaluation dashboards
- ranking experiments
- offline model comparison
- human-in-the-loop workflows
Not intended as a sole decision maker for high-stakes or safety-critical settings.
## Limitations
- Scores are continuous estimates and should not be treated as absolute truth.
- Performance differs by task, language, and domain.
- The model can inherit annotation noise and dataset biases.
- Long inputs beyond 512 tokens are truncated.
- Low correlation metrics on some dimensions indicate that rank ordering can be weak for certain subsets.
## Responsible Use
Recommended:
- Use as a decision-support signal, not as a sole decision maker.
- Calibrate thresholds on your own validation set before production use.
- Monitor by language/task slices for fairness and reliability.
Not recommended:
- High-stakes automated decisions without human oversight.
- Out-of-domain deployment without re-validation.
## Reproducibility Notes
Published artifacts include:
- `model.safetensors`
- `config.json`
- `configuration_score_predictor.py`
- `modeling_score_predictor.py`
- tokenizer files
- `metrics_final.json`
- `predictions.jsonl`
Load with `trust_remote_code=True` because the architecture is custom.
## Citation
If you use this model, please cite the project/repository and this model URL:
```bibtex
@misc{qcri_omniscore_deberta_v3,
title = {OmniScore DeBERTa-v3},
author = {QCRI},
year = {2026},
howpublished = {\url{https://huggingface.co/QCRI/OmniScore-deberta-v3}}
}
```
|