aisingapore / RoBERTa-base

huggingface.co
Total runs: 9
24-hour runs: 2
7-day runs: 2
30-day runs: 2
Model's Last Updated: March 02 2023
text-classification

Introduction of RoBERTa-base

Model Details of RoBERTa-base

Emotion Entailment

You can test the model at Emotion Entailment | SGNLP-Demo .
If you want to find out more information, please contact us at [email protected] .

Table of Contents
Model Details

Model Name: Emotion Entailment

  • Description: This is an emotion entailment model based on RoBERTa base which recognises the cause behind emotions in conversations. Given 4 sets of inputs: target utterance, target utterance's emotion, evidence utterance and conversational history, it returns the probability of the evidence utterance causing the emotion specified in the target utterance.
  • Paper: Recognizing emotion cause in conversations. arXiv preprint arXiv:2012.11820., Dec 2020.
  • Author(s): Poria, S., Majumder, N., Hazarika, D., Ghosal, D., Bhardwaj, R., Jian, S.Y.B., Hong, P., Ghosh, R., Roy, A., Chhaya, N., Gelbukh, A. and Mihalcea, R. (2020).
  • URL: https://arxiv.org/abs/2012.11820

How to Get Started With the Model

Install Python package

SGnlp is an initiative by AI Singapore's NLP Hub. They aim to bridge the gap between research and industry, promote translational research, and encourage adoption of NLP techniques in the industry.

Various NLP models, other than aspect sentiment analysis are available in the python package. You can try them out at SGNLP-Demo | SGNLP-Github .

pip install sgnlp
Examples

For more full code (such as Emotion Entailment), please refer to this SGNLP-Docs .
Alternatively, you can also try out the Emotion Entailment | SGNLP-Demo for Emotion Entailment.

Example of Emotion Entailment (for happiness):

from sgnlp.models.emotion_entailment import (
    RecconEmotionEntailmentConfig,
    RecconEmotionEntailmentTokenizer,
    RecconEmotionEntailmentModel,
    RecconEmotionEntailmentPreprocessor,
    RecconEmotionEntailmentPostprocessor,
)

# Load model
config = RecconEmotionEntailmentConfig.from_pretrained(
    "https://storage.googleapis.com/sgnlp-models/models/reccon_emotion_entailment/config.json"
)
tokenizer = RecconEmotionEntailmentTokenizer.from_pretrained("roberta-base")
model = RecconEmotionEntailmentModel.from_pretrained(
    "https://storage.googleapis.com/sgnlp-models/models/reccon_emotion_entailment/pytorch_model.bin",
    config=config,
)
preprocessor = RecconEmotionEntailmentPreprocessor(tokenizer)
postprocessor = RecconEmotionEntailmentPostprocessor()

# Model predict
input_batch = {
    "emotion": ["happiness", "happiness", "happiness", "happiness"],
    "target_utterance": [
        "Thank you very much .",
        "Thank you very much .",
        "Thank you very much .",
        "Thank you very much .",
    ],
    "evidence_utterance": [
        "It's very thoughtful of you to invite me to your wedding .",
        "How can I forget my old friend ?",
        "My best wishes to you and the bride !",
        "Thank you very much .",
    ],
    "conversation_history": [
        "It's very thoughtful of you to invite me to your wedding . How can I forget my old friend ? My best wishes to you and the bride ! Thank you very much .",
        "It's very thoughtful of you to invite me to your wedding . How can I forget my old friend ? My best wishes to you and the bride ! Thank you very much .",
        "It's very thoughtful of you to invite me to your wedding . How can I forget my old friend ? My best wishes to you and the bride ! Thank you very much .",
        "It's very thoughtful of you to invite me to your wedding . How can I forget my old friend ? My best wishes to you and the bride ! Thank you very much .",
    ],
}

tensor_dict = preprocessor(input_batch)
raw_output = model(**tensor_dict)
output = postprocessor(raw_output)

Training

The train and evaluation datasets were derived from the RECCON dataset. The full dataset can be downloaded from the author's github repository .

Training Results
  • Training Time: ~3 hours for 12 epochs on a single V100 GPU.

Model Parameters

  • Model Weights: link
  • Model Config: link
  • Model Inputs: Target utterance, emotion in target utterance, evidence utterance and conversational history.
  • Model Outputs: Probability score of whether evidence utterance caused target utterance to exhibit the emotion specified.
  • Model Size: ~477MB
  • Model Inference Info: ~ 2 sec on Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz.
  • Usage Scenarios: Recognizing emotion cause for phone support satisfaction.

Other Information

Runs of aisingapore RoBERTa-base on huggingface.co

9
Total runs
2
24-hour runs
2
3-day runs
2
7-day runs
2
30-day runs

More Information About RoBERTa-base huggingface.co Model

More RoBERTa-base license Visit here:

https://choosealicense.com/licenses/mit

RoBERTa-base huggingface.co

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

aisingapore RoBERTa-base online free

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

aisingapore RoBERTa-base online free url in huggingface.co:

https://huggingface.co/aisingapore/RoBERTa-base

RoBERTa-base install

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

RoBERTa-base install url in huggingface.co:

https://huggingface.co/aisingapore/RoBERTa-base

Url of RoBERTa-base

Provider of RoBERTa-base huggingface.co

aisingapore
ORGANIZATIONS

Other API from aisingapore

huggingface.co

Total runs: 13
Run Growth: 2
Growth Rate: 15.38%
Updated:March 02 2023