Views
No views yet
| Label | Meaning |
|---|---|
| entailment | Hypothesis is a faithful, condensed or paraphrased restatement of the premise. All critical constraints, actors, conditions and scope remain intact. |
| neutral | Hypothesis neither follows nor contradicts the premise. Typically introduces unverifiable or out‑of‑scope information (e.g. different institutions, expanded context, unrelated assumptions). |
| contradiction | Hypothesis directly conflicts with the premise: reverses permissions/requirements, changes legal scope, numeric limits, formats, dates, or the responsible authority or both statements cannot realistically be true at the same time. |
contradiction, even if most of the text agrees.asseco-group/roberta-incoherence-classifiergradient_accumulation_steps=112e-5, warmup ratio: 0.1, weight decay: 0.010.05 precision recall f1-score support
entailment 0.94 0.90 0.92 150
neutral 0.87 0.91 0.89 150
contradiction 0.93 0.93 0.93 150
accuracy 0.91 450
macro avg 0.91 0.91 0.91 450
weighted avg 0.91 0.91 0.91 4501import torch
2from transformers import pipeline
3
4device = "cuda" if torch.cuda.is_available() else "cpu"
5
6classifier = pipeline(
7 "text-classification",
8 model="asseco-group/roberta-incoherence-classifier",
9 tokenizer="asseco-group/roberta-incoherence-classifier",
10 top_k=None,
11 return_all_scores=True,
12 device=device
13)
14
15premise = (
16 "Wykonawca dostarczy pliki w formacie .shp zgodne z oprogramowaniem ArcGIS 10.2, "
17 "wraz z mapami wydrukowanymi w formacie A4."
18)
19
20hypo = (
21 "Wykonawca przekaże wyłącznie pliki .kml kompatybilne z QGIS "
22 "i przygotuje dokumentację w formacie A3."
23)
24
25result = classifier({"text": premise, "text_pair": hypo})
26print(result)1import torch
2from transformers import AutoTokenizer, AutoModelForSequenceClassification
3
4name = "asseco-group/roberta-incoherence-classifier"
5tokenizer = AutoTokenizer.from_pretrained(name, use_fast=True)
6model = AutoModelForSequenceClassification.from_pretrained(name).eval()
7device = "cuda" if torch.cuda.is_available() else "cpu"
8model.to(device)
9
10pairs = [
11 ("Zwrot kosztów w 60 dni ...", "Zwrot kosztów nastąpi w 30 dni ..."),
12]
13enc = tokenzier(
14 [p for p, h in pairs],
15 [h for p, h in pairs],
16 padding=True, truncation=True, max_length=512,
17 return_tensors="pt"
18).to(device)
19
20with torch.no_grad():
21 logits = model(**enc).logits
22probs = logits.softmax(-1).cpu()
23print(probs)1@misc{asseco2025incoherence,
2 title = {Polish RoBERTa-based Incoherence/Consistency Classifier (encoder-only)},
3 author = {Asseco Group},
4 year = {2025},
5 url = {https://huggingface.co/asseco-group/roberta-incoherence-classifier}
6}