Downloads · 30 days
4
0% of all-time downloads
NTCAL/norbert2_sentiment_norec
norbert2_sentiment_norec is a text classification model from NTCAL. Use it when you need a label for a piece of text. It is set up for transformers.
Sentiment analysis for Norwegian reviews.
Downloads · 30 days
4
0% of all-time downloads
All-time downloads
901
Public
Repo size
996 MB
Likes
1
Public
Click a slice to open those files.
.bin498 MB · 100%
From the Hugging Face model README
Sentiment analysis for Norwegian reviews.
This model is trained using a self-concatinated dataset consisting of Norwegian Review Corpus dataset (https://github.com/ltgoslo/norec) and a sentiment dataset from huggingface (https://huggingface.co/datasets/sepidmnorozy/Norwegian_sentiment). Its purpose is merely for testing.
Plug in Norwegian sentences to check its sentiment (negative to positive)
https://huggingface.co/datasets/marcuskd/reviews_binary_not4_concat
Tokenized using:
tokenizer = AutoTokenizer.from_pretrained("ltgoslo/norbert2")
Training arguments for this model:
training_args = TrainingArguments(
output_dir='./results', # output directory
num_train_epochs=10, # total number of training epochs
per_device_train_batch_size=16, # batch size per device during training
per_device_eval_batch_size=64, # batch size for evaluation
warmup_steps=500, # number of warmup steps for learning rate scheduler
weight_decay=0.01, # strength of weight decay
logging_dir='./logs', # directory for storing logs
logging_steps=10,
)
Evaluation by testing using test-split of dataset.
{
'accuracy': 0.8357214261912695,
'recall': 0.886873508353222,
'precision': 0.8789025543992431,
'f1': 0.8828700403896412,
'total_time_in_seconds': 94.33071640000003,
'samples_per_second': 31.81360340013276,
'latency_in_seconds': 0.03143309443518828
}