CoolFace
Modelpublic

snowfire/tagwise-cattagger1

sourceHugging Faceapache-2.0updated 23d agoView on Hugging Face
0likes
Model Card

TagWise — CatTagger-1

A multi-class text category tagger: given a text description it returns one of 8 categories with a confidence score, for auto-cataloguing. This repository contains two models:

  • —`cattagger1/` — a fine-tuned MiniLM-L6 encoder (CatTagger-1).
  • —`baseline_tfidf_logreg.joblib` — a TF-IDF + logistic-regression reference tagger.

Performance (test macro-F1)

ModelMacro-F1
TF-IDF baseline0.85
CatTagger-1 (MiniLM)0.82

Honest finding: on this long, keyword-rich corpus the simple TF-IDF baseline outperforms the fine-tuned transformer on every category. Both are provided so you can pick the right trade-off.

License

Apache-2.0 — free to use, modify, and redistribute with attribution.

Usage

python
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

repo = "snowfire/tagwise-cattagger1"
tok = AutoTokenizer.from_pretrained(repo, subfolder="cattagger1")
model = AutoModelForSequenceClassification.from_pretrained(repo, subfolder="cattagger1").eval()

text = "my mortgage escrow account was mishandled by the loan servicer"
enc = tok(text, truncation=True, max_length=160, return_tensors="pt")
with torch.no_grad():
    probs = model(**enc).logits.softmax(-1)[0]
print(model.config.id2label[int(probs.argmax())], float(probs.max()))

Data

Developed on a public-domain text corpus, organised into 8 balanced categories.