Views
No views yet
["negative", "neutral", "positive"]mideind/IceBERT-igc (Icelandic RoBERTa)not_ironic).1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2
3model_id = "ambj24/icelandic-sentiment"
4tok = AutoTokenizer.from_pretrained(model_id)
5mod = AutoModelForSequenceClassification.from_pretrained(model_id)
6
7text = "Þjónustan var frábær!"
8inputs = tok(text, return_tensors="pt")
9probs = mod(**inputs).logits.softmax(-1).tolist()[0]
10
11labels = ["negative", "neutral", "positive"]
12print(dict(zip(labels, probs)))
13
14Input length: short posts; trained with max length ~128 tokens.
15
16Data: social-media style Icelandic.
17Domain shift: trained on short, informal posts.
18
19Positive/neutral/negative labels; only examples judged not ironic.
20
21Typical setup: 3 epochs, LR ≈ 2e-5, batch ≈ 16, max length 128.