CNN-LSTM + GloVe β€” GoEmotions Emotion Classifier

CNN trigram extractor followed by Bidirectional LSTM with additive attention for multi-label emotion classification on GoEmotions (28 labels).

CS6120 NLP Project β€” Northeastern University

Architecture

  • GloVe 100d pre-trained embeddings
  • Conv1d (kernel=3, 128 filters) for local feature extraction
  • 2-layer Bidirectional LSTM (hidden: 256)
  • Additive attention pooling
  • Per-class threshold tuning on validation set

Performance (GoEmotions test set, 5,427 samples)

Metric Score
Micro-F1 0.5371
Macro-F1 0.4428
Subset Accuracy 0.3230
Hamming Accuracy 0.9543

Files

  • cnn_lstm_model.pt β€” model weights + config (load with torch.load)
  • vocab.pkl β€” vocabulary dictionary
  • thresholds_cnn_lstm.pkl β€” per-class decision thresholds (numpy array, shape 28)

Usage

import torch, pickle
from lstm_model import CNNLSTMClassifier  # from the Space repo

ckpt = torch.load("cnn_lstm_model.pt", map_location="cpu")
cfg  = ckpt["config"]
model = CNNLSTMClassifier(**cfg)
model.load_state_dict(ckpt["state_dict"])
model.eval()
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train YatishW79/cnn-lstm-goemotions