Downloads · 30 days
0
0% of all-time downloads
orYx-models/finetuned-roberta-leadership-sentiment-analysis
finetuned-roberta-leadership-sentiment-analysis is a text classification model from orYx-models. Use it when you need a label for a piece of text. It is set up for adapter-transformers. The card lists the license as cc.
- Model Description: This model is a finetuned version of the RoBERTa text classifier(cardiffnlp/twitter-roberta-base-sentiment-latest). It has been trained on a dataset comprising communications from corporate execut…
Downloads · 30 days
0
0% of all-time downloads
All-time downloads
48
Public
Parameters
125M
499 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors499 MB · 99%
From the Hugging Face model README
nlp = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
nlp("The results don't match, but the effort seems to be always high")
Out[7]: [{'label': 'Positive', 'score': 0.9996090531349182}]
X_train, X_val, y_train, y_val = train_test_split(X,y, test_size = 0.2, stratify = y)
'input_ids': tensor
'attention_mask': tensor
'label': tensor(2)
args = TrainingArguments(
output_dir="output",
do_train = True,
do_eval = True,
num_train_epochs = 1,
per_device_train_batch_size = 4,
per_device_eval_batch_size = 8,
warmup_steps = 50,
weight_decay = 0.01,
logging_strategy= "steps",
logging_dir= "logging",
logging_steps = 50,
eval_steps = 50,
save_strategy = "steps",
fp16 = True,
#load_best_model_at_end = True
)
global_step=879,
training_loss=0.1825900522650848,
'train_runtime': 101.6309,
'train_samples_per_second': 34.596,
'train_steps_per_second': 8.649,
'total_flos': 346915041274368.0,
'train_loss': 0.1825900522650848,
'epoch': 1.0
# Assuming you have a list of evaluation results q and want to create a DataFrame with it
q = [Trainer.evaluate(eval_dataset=df) for df in [train_dataset, val_dataset]]
# Create DataFrame with index and select only the first 5 columns
result_df = pd.DataFrame(q, index=["train", "val"]).iloc[:,:5]
# Display the resulting DataFrame
print(result_df)
______________________________________________________________________
eval_loss eval_Accuracy eval_F1 eval_Precision eval_Recall
train 0.049349 0.988908 0.987063 0.982160 0.992357
val 0.108378 0.976136 0.972464 0.965982 0.979861
______________________________________________________________________
loss
Accuracy
F1
Precision
Recall
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
Google Colab - T4 GPU
@inproceedings{camacho-collados-etal-2022-tweetnlp,
title = "{T}weet{NLP}: Cutting-Edge Natural Language Processing for Social Media",
author = "Camacho-collados, Jose and
Rezaee, Kiamehr and
Riahi, Talayeh and
Ushio, Asahi and
Loureiro, Daniel and
Antypas, Dimosthenis and
Boisson, Joanne and
Espinosa Anke, Luis and
Liu, Fangyu and
Mart{\'\i}nez C{\'a}mara, Eugenio" and others,
booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing: System Demonstrations",
month = dec,
year = "2022",
address = "Abu Dhabi, UAE",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2022.emnlp-demos.5",
pages = "38--49"
}
Vineedhar, relkino