Views
No views yet
[CLS] topic [SEP] arg_a [SEP] arg_b| Split | Accuracy | F1 | Precision | Recall |
|---|---|---|---|---|
| In-domain | 63.7% | 0.587 | 0.684 | 0.514 |
| Cross-topic | 62.8% | 0.594 | 0.688 | 0.522 |
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4tokenizer = AutoTokenizer.from_pretrained("SambhavSBU/argument-quality-roberta-v2")
5model = AutoModelForSequenceClassification.from_pretrained("SambhavSBU/argument-quality-roberta-v2")
6
7topic = "We should ban social media"
8arg_a = "Social media spreads misinformation at an unprecedented scale."
9arg_b = "Social media connects people across the world."
10
11inputs = tokenizer(
12 topic + " [SEP] " + arg_a, arg_b,
13 return_tensors="pt", truncation=True, max_length=256
14)
15with torch.no_grad():
16 logits = model(**inputs).logits
17winner = "A" if logits.argmax() == 0 else "B"
18print(f"Higher quality argument: {winner}")