OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Goemotions Pytorch

Goemotions Pytorch is a Python implementation of the GoEmotions emotion-classification approach using PyTorch, BERT and Hugging Face Transformers. It includes a multi-label pipeline, training setup and fine-tuned models for three label taxonomies.

Independent OpenViST project profile, based on linked sources.

Goemotions Pytorch — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you want a code-based PyTorch example for classifying comments with GoEmotions labels, or a starting point for comparing its three documented taxonomy schemes.

Who it is for

  • Developers building or studying emotion classification for short text.
  • Researchers comparing fine-grained emotion labels with broader grouped categories.

Documented uses

  • Assign one or more emotion labels and scores to a list of text inputs.
  • Train using the original, hierarchical-grouping or Ekman taxonomy.
  • Compare reported model results across the three taxonomy configurations.
Before you choose

Requirements & limits

  • The original scheme uses 27 emotions plus neutral; group uses positive, negative, ambiguous and neutral; Ekman uses six emotions plus neutral.
  • The README documents BERT base cased and pins PyTorch 1.4.0, Transformers 2.11.0 and attrdict 2.0.1.
  • The tokenizer setup treats [NAME] and [RELIGION] as additional special tokens.
  • The README reports macro-F1 results for development and test sets: original 50.16% and 50.30%, group 69.41% and 70.06%, and Ekman 62.59% and 62.38%.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Run the documented taxonomy training command

Select one of the repository’s three taxonomies when invoking its training script.

Before you start

  • Python 3
  • PyTorch 1.4.0
  • Transformers 2.11.0
  • attrdict 2.0.1
  • The repository files and its configuration

Steps

  1. Choose original, group or ekman as the taxonomy.

  2. From the repository, invoke the command below followed by the chosen taxonomy.

    Documented command
    python3 run_goemotions.py --taxonomy

Expected outcome

The script is invoked with the selected taxonomy; the README documents this as the training run command.

Guide limitations

  • The README does not provide a separate environment setup procedure.
  • This guide covers the documented invocation, not a verified run or a guarantee of compatibility with other dependency versions.
Source-based practical guide

Classify a batch using a provided fine-tuned model

Use the documented Python pipeline pattern to obtain emotion labels and scores for a list of text inputs.

Before you start

  • Python with the repository’s documented dependencies: PyTorch 1.4.0, Transformers 2.11.0 and attrdict 2.0.1
  • The repository’s model and multilabel_pipeline modules
  • A fine-tuned model and tokenizer for one taxonomy

Steps

  1. Choose the original, group or Ekman taxonomy and its corresponding model identifier from the README.

  2. Load the matching BertTokenizer and BertForMultiLabelClassification with from_pretrained.

  3. Create MultiLabelPipeline with the loaded model and tokenizer; the examples set the threshold to 0.3.

  4. Pass a list of text strings to the pipeline to receive labels and scores.

Expected outcome

The documented example returns one or more taxonomy labels and associated scores for each input text.

Guide limitations

  • The example uses the repository’s custom model and pipeline modules.
  • The documented threshold is an example parameter, not a stated universal setting.
  • This is documentation-based guidance, not an execution test.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
17 October 2026
Original website title
monologg/GoEmotions-pytorch · Official homepage title · retained in its source language