Views
No views yet
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]:informativenessclarityplausibilityfaithfulnessmicrosoft/deberta-v3-base and published with custom model code (AutoModel + trust_remote_code=True).microsoft/deberta-v3-baseScorePredictorModel (custom transformers model)[1, 5] (sigmoid-scaled in model head)float321from transformers import AutoTokenizer, AutoModel
2
3repo_id = "QCRI/OmniScore-deberta-v3"
4tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
5model = AutoModel.from_pretrained(repo_id, trust_remote_code=True)1Task: <task_name>
2Source: <source text, if available>
3Reference: <reference text, if available>
4Candidate: <model output being evaluated>1System: ...
2User: ...
3Assistant: ...pip install -U torch transformers sentencepiece1import torch
2from transformers import AutoTokenizer, AutoModel
3
4repo_id = "QCRI/OmniScore-deberta-v3"
5
6tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
7model = AutoModel.from_pretrained(repo_id, trust_remote_code=True).eval()
8
9text = """Task: headline_evaluation
10Source: Full article text goes here.
11Candidate: Microsoft releases detailed model documentation."""
12
13inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
14
15with torch.no_grad():
16 outputs = model(**inputs)
17
18scores = {
19 name: float(outputs.predictions[0, i])
20 for i, name in enumerate(model.config.score_names)
21}
22print(scores)1import torch
2from transformers import AutoTokenizer, AutoModel
3
4repo_id = "QCRI/OmniScore-deberta-v3"
5device = "cuda" if torch.cuda.is_available() else "cpu"
6
7tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
8model = AutoModel.from_pretrained(repo_id, trust_remote_code=True).to(device).eval()
9
10texts = [
11 "Task: summarization\nSource: ...\nCandidate: ...",
12 "Task: translation_evaluation\nSource: ...\nReference: ...\nCandidate: ...",
13]
14
15batch = tokenizer(texts, return_tensors="pt", truncation=True, padding=True, max_length=512)
16batch = {k: v.to(device) for k, v in batch.items()}
17
18with torch.no_grad():
19 pred = model(**batch).predictions
20
21results = []
22for row in pred.cpu():
23 results.append({name: float(row[i]) for i, name in enumerate(model.config.score_names)})
24
25print(results)1from transformers import AutoTokenizer, AutoModel
2import torch
3
4repo_id = "QCRI/OmniScore-deberta-v3"
5tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
6model = AutoModel.from_pretrained(repo_id, trust_remote_code=True).eval()
7
8messages = [
9 {"role": "system", "content": "You are a helpful assistant."},
10 {"role": "user", "content": "Write a concise summary of this article."},
11 {"role": "assistant", "content": "Here is a short summary..."},
12]
13
14flat_text = " ".join([f"{m['role'].capitalize()}: {m['content']}" for m in messages])
15inputs = tokenizer(flat_text, return_tensors="pt", truncation=True, max_length=512)
16
17with torch.no_grad():
18 outputs = model(**inputs)
19
20print(dict((n, float(outputs.predictions[0, i])) for i, n in enumerate(model.config.score_names)))1from huggingface_hub import snapshot_download
2
3local_dir = snapshot_download("QCRI/OmniScore-deberta-v3")
4print(local_dir)model.safetensorsconfig.jsonconfiguration_score_predictor.pymodeling_score_predictor.pymetrics_final.jsonpredictions.jsonltrust_remote_code=True because the architecture is custom.1@misc{qcri_omniscore_deberta_v3,
2 title = {OmniScore DeBERTa-v3},
3 author = {QCRI},
4 year = {2026},
5 howpublished = {\url{https://huggingface.co/QCRI/OmniScore-deberta-v3}}
6}