Views
No views yet
Input: Lord, You are my Hope! In You I will always trust.
Target: Atheism
Stance: AGAINSTfrom transformers import AutoTokenizer, AutoModelForSequenceClassification
from datasets import load_dataset
# load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("krishnagarg09/stance-detection-semeval2016")
model = AutoModelForSequenceClassification.from_pretrained("krishnagarg09/stance-detection-semeval2016")
# load dataset
dataset = load_dataset("krishnagarg09/SemEval2016Task6")
# prepare input
text = dataset['test']['Tweet']
encoded_input = tokenizer(text, return_tensors='pt', add_special_tokens = True, max_length=128, padding=True, truncation=True)
# forward pass
output = model(**encoded_input)dataset = load_dataset("krishnagarg09/SemEval2016Task6")optimizer: Adam
lr: 2e-5
loss: crossentropy
epochs: 5 (best weights chosen over validation)
batch_size: 32#semst tags removed, p.OPT.URL,p.OPT.EMOJI,p.OPT.RESERVED removed using tweet-preprocessor package, normalization done using emnlp_dict.txt and noslang_data.jsonPrecision: 62.69
Recall: 69.43
F1: 65.56