Instructions to use u678868/GCUL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use u678868/GCUL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="u678868/GCUL")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("u678868/GCUL", device_map="auto") - Notebooks
- Google Colab
- Kaggle
GCUL: Guided Clustering-based Uncertain Learning -- released models
Checkpoints of the GCUL project. One repository, several sub-directories -- see the table below. The code, the processed splits and the figures live in the GitHub repository (https://github.com/u678868/GCUL).
Sub-models
| path | files | task / dataset | notes |
|---|---|---|---|
distilbert/kaggle/ |
config.json, model.safetensors, tokenizer.json, tokenizer_config.json |
11-class emotion classification (Kaggle) | DistilBertForSequenceClassification, test acc 89.37 %, macro-F1 0.8958 |
distilbert/goemotions/ |
same | 28-class (GoEmotions) | test acc 39.03 %, macro-F1 0.3037 |
distilbert/dair/ |
same | 6-class (dair-ai/emotion) | test acc 92.90 %, macro-F1 0.9042 |
bilstm/ |
config.json, model.safetensors, word2idx.json |
11-class (Kaggle) | BiLSTM + self-attention over GloVe-300d |
textcnn/ |
config.json, model.safetensors, word2idx.json |
11-class (Kaggle) | TextCNN, 25k vocabulary |
gcul_pca/ |
config.json, phase1.safetensors, phase3.safetensors |
11-class + uncertain (Kaggle) | PCA-10 clustering |
gcul_lda/ |
config.json, phase1.safetensors, phase3.safetensors |
11-class + uncertain (Kaggle) | LDA-10 clustering |
phase1 is the K-class model; phase3 is the retrained (K+1)-class model that can emit the
uncertain label (id = 11).
Usage
from transformers import AutoModelForSequenceClassification, AutoTokenizer
repo = "u678868/GCUL"
model = AutoModelForSequenceClassification.from_pretrained(f"{repo}", subfolder="distilbert/kaggle")
tok = AutoTokenizer.from_pretrained(f"{repo}", subfolder="distilbert/kaggle")
print(model.config.id2label) # 0 -> "anger", ... (from data/splits/label_mapping.csv)
For the non-transformer sub-models, load the tensors with safetensors.torch.load_file and
instantiate the matching class from src/models/ of the GitHub repository (config.json
carries the hyper-parameters).
Vocabularies
word2idx.json maps token strings to integer ids with string keys; convert on load:
import json
word2idx = {int(k): v for k, v in json.load(open("word2idx.json")).items()}
The vocabulary is released as JSON rather than pickle on purpose (no pickle-version issues, and it is human-inspectable).
Label encoding
Class ids follow the per-dataset mapping in data/splits/label_mapping.csv of the GitHub
repository (single source of truth). They are not uniformly alphabetical: Kaggle is pure
alphabetical, GoEmotions is alphabetical with neutral forced to the last index, and dair-ai uses
the original integer identity.
Conversion notes
- Tensor names are preserved from the original
.ptcheckpoints, with one exception: transformers= 5 writes
LayerNorm.{gamma,beta}where the source files usedLayerNorm.{weight,bias}. Both spellings load viafrom_pretrained; tensor values are bit-identical. distilbert-base-uncasedis not mirrored here -- it is a public checkpoint.- The sklearn
LabelEncoderstored inside the original TextCNN checkpoint was discarded: itsclasses_are identical to the releasedclass_namesinconfig.json. _convert.pyis a development-side tool that converts the original.ptcheckpoints to.safetensors. It expects the full project tree (withsaved_models/anddatasets/) to be present as siblings. End users only need the released.safetensorsfiles and do not need to run this script.
Citation
@misc{fan2026gcul,
title = {GCUL: Guided Clustering-based Uncertain Learning for Multi-Class Emotion Classification},
author = {Fan, Zhongqi and Zhang, Tianyou and Chen, Fei},
year = {2026},
note = {https://github.com/u678868/GCUL}
}