mrm8488 / t5-base-finetuned-span-sentiment-extraction

huggingface.co
Total runs: 8.7K
24-hour runs: 0
7-day runs: -40
30-day runs: 356
Model's Last Updated: August 24 2021
text-generation

Introduction of t5-base-finetuned-span-sentiment-extraction

Model Details of t5-base-finetuned-span-sentiment-extraction

T5-base fine-tuned for Sentiment Span Extraction

All credits to Lorenzo Ampil

Google's T5 base fine-tuned on Tweet Sentiment Extraction Dataset for Span Sentiment Extraction downstream task.

Details of T5

The T5 model was presented in Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer by Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J. Liu in Here the abstract:

Transfer learning, where a model is first pre-trained on a data-rich task before being fine-tuned on a downstream task, has emerged as a powerful technique in natural language processing (NLP). The effectiveness of transfer learning has given rise to a diversity of approaches, methodology, and practice. In this paper, we explore the landscape of transfer learning techniques for NLP by introducing a unified framework that converts every language problem into a text-to-text format. Our systematic study compares pre-training objectives, architectures, unlabeled datasets, transfer approaches, and other factors on dozens of language understanding tasks. By combining the insights from our exploration with scale and our new “Colossal Clean Crawled Corpus”, we achieve state-of-the-art results on many benchmarks covering summarization, question answering, text classification, and more. To facilitate future work on transfer learning for NLP, we release our dataset, pre-trained models, and code.

Details of the downstream task (Span Sentiment Extraction) - Dataset 📚

Tweet Sentiment Extraction Dataset

"My ridiculous dog is amazing." [sentiment: positive]

With all of the tweets circulating every second it is hard to tell whether the sentiment behind a specific tweet will impact a company, or a person's, brand for being viral (positive), or devastate profit because it strikes a negative tone. Capturing sentiment in language is important in these times where decisions and reactions are created and updated in seconds. But, which words actually lead to the sentiment description? In this competition you will need to pick out the part of the tweet (word or phrase) that reflects the sentiment.

Help build your skills in this important area with this broad dataset of tweets. Work on your technique to grab a top spot in this competition. What words in tweets support a positive, negative, or neutral sentiment? How can you help make that determination using machine learning tools?

In this competition we've extracted support phrases from Figure Eight's Data for Everyone platform. The dataset is titled Sentiment Analysis: Emotion in Text tweets with existing sentiment labels, used here under creative commons attribution 4.0. international licence. Your objective in this competition is to construct a model that can do the same - look at the labeled sentiment for a given tweet and figure out what word or phrase best supports it.

Disclaimer: The dataset for this competition contains text that may be considered profane, vulgar, or offensive.

Dataset Split # samples
TSE train 23907
TSE eval 3573
Model fine-tuning 🏋️‍

The training script is a slightly modified version of this Colab Notebook created by Lorenzo Ampil , so all credits to him!

Model in Action 🚀
from transformers import AutoModelWithLMHead, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("mrm8488/t5-base-finetuned-span-sentiment-extraction")
model = AutoModelWithLMHead.from_pretrained("mrm8488/t5-base-finetuned-span-sentiment-extraction")

def get_sentiment_span(text):
  input_ids = tokenizer.encode(text, return_tensors="pt", add_special_tokens=True)  # Batch size 1
  
  generated_ids = model.generate(input_ids=input_ids, num_beams=1, max_length=80).squeeze()
  
  predicted_span = tokenizer.decode(generated_ids, skip_special_tokens=True, clean_up_tokenization_spaces=True)
    
  return predicted_span
  
get_sentiment_span("question: negative context: My bike was put on hold...should have known that.... argh total bummer")

# output: 'argh total bummer'

get_sentiment_span("question: positive context: On the monday, so i wont be able to be with you! i love you")

# output: 'i love you'

Created by Manuel Romero/@mrm8488 | LinkedIn

Made with ♥ in Spain

Runs of mrm8488 t5-base-finetuned-span-sentiment-extraction on huggingface.co

8.7K
Total runs
0
24-hour runs
-155
3-day runs
-40
7-day runs
356
30-day runs

More Information About t5-base-finetuned-span-sentiment-extraction huggingface.co Model

t5-base-finetuned-span-sentiment-extraction huggingface.co

t5-base-finetuned-span-sentiment-extraction huggingface.co is an AI model on huggingface.co that provides t5-base-finetuned-span-sentiment-extraction's model effect (), which can be used instantly with this mrm8488 t5-base-finetuned-span-sentiment-extraction model. huggingface.co supports a free trial of the t5-base-finetuned-span-sentiment-extraction model, and also provides paid use of the t5-base-finetuned-span-sentiment-extraction. Support call t5-base-finetuned-span-sentiment-extraction model through api, including Node.js, Python, http.

t5-base-finetuned-span-sentiment-extraction huggingface.co Url

https://huggingface.co/mrm8488/t5-base-finetuned-span-sentiment-extraction

mrm8488 t5-base-finetuned-span-sentiment-extraction online free

t5-base-finetuned-span-sentiment-extraction huggingface.co is an online trial and call api platform, which integrates t5-base-finetuned-span-sentiment-extraction's modeling effects, including api services, and provides a free online trial of t5-base-finetuned-span-sentiment-extraction, you can try t5-base-finetuned-span-sentiment-extraction online for free by clicking the link below.

mrm8488 t5-base-finetuned-span-sentiment-extraction online free url in huggingface.co:

https://huggingface.co/mrm8488/t5-base-finetuned-span-sentiment-extraction

t5-base-finetuned-span-sentiment-extraction install

t5-base-finetuned-span-sentiment-extraction is an open source model from GitHub that offers a free installation service, and any user can find t5-base-finetuned-span-sentiment-extraction on GitHub to install. At the same time, huggingface.co provides the effect of t5-base-finetuned-span-sentiment-extraction install, users can directly use t5-base-finetuned-span-sentiment-extraction installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

t5-base-finetuned-span-sentiment-extraction install url in huggingface.co:

https://huggingface.co/mrm8488/t5-base-finetuned-span-sentiment-extraction

Url of t5-base-finetuned-span-sentiment-extraction

t5-base-finetuned-span-sentiment-extraction huggingface.co Url

Provider of t5-base-finetuned-span-sentiment-extraction huggingface.co

mrm8488
ORGANIZATIONS

Other API from mrm8488

huggingface.co

Total runs: 855
Run Growth: 264
Growth Rate: 30.88%
Updated:February 23 2024
huggingface.co

Total runs: 793
Run Growth: 592
Growth Rate: 74.65%
Updated:March 19 2023
huggingface.co

Total runs: 101
Run Growth: 48
Growth Rate: 48.00%
Updated:June 20 2023
huggingface.co

Total runs: 72
Run Growth: 32
Growth Rate: 44.44%
Updated:January 24 2024
huggingface.co

Total runs: 53
Run Growth: 33
Growth Rate: 62.26%
Updated:May 21 2021