Views
No views yet
cattagger1/ — a fine-tuned MiniLM-L6 encoder (CatTagger-1).baseline_tfidf_logreg.joblib — a TF-IDF + logistic-regression reference tagger.| Model | Macro-F1 |
|---|---|
| TF-IDF baseline | 0.85 |
| CatTagger-1 (MiniLM) | 0.82 |
1from transformers import AutoTokenizer, AutoModelForSequenceClassification
2import torch
3
4repo = "snowfire/tagwise-cattagger1"
5tok = AutoTokenizer.from_pretrained(repo, subfolder="cattagger1")
6model = AutoModelForSequenceClassification.from_pretrained(repo, subfolder="cattagger1").eval()
7
8text = "my mortgage escrow account was mishandled by the loan servicer"
9enc = tok(text, truncation=True, max_length=160, return_tensors="pt")
10with torch.no_grad():
11 probs = model(**enc).logits.softmax(-1)[0]
12print(model.config.id2label[int(probs.argmax())], float(probs.max()))