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)

Model Macro-F1
TF-IDF baseline 0.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

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 (U.S. government records), organised into 8 balanced categories.

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

Model tree for snowfire/tagwise-cattagger1

Finetuned
(17)
this model