Downloads · 30 days
3
11% of all-time downloads
sandeep1103/lilly-fashion-muse-doc-gated
lilly-fashion-muse-doc-gated is a text classification model from sandeep1103. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
Lilly · Fashion Muse — doc-level review scorer. 3-class doc-level review sentiment (negative / neutral / positive) with a selective-prediction gate: predictions whose max softmax probability is below tau = 0.70 are ab…
Downloads · 30 days
3
11% of all-time downloads
All-time downloads
28
Public
Repo size
134 MB
Likes
0
Public
Click a slice to open those files.
.pt134 MB · 99%
From the Hugging Face model README
Lilly · Fashion Muse — doc-level review scorer. 3-class doc-level review sentiment (negative / neutral / positive) with a selective-prediction gate: predictions whose max softmax probability is below tau = 0.70 are abstained (UNSURE / MIXED) instead of forced.
| tau | coverage | committed acc | committed macroF1 | abstains |
|---|---|---|---|---|
| .70 | 86.2% | 91.2% | .715 | 13.8% |
| .80 | 77.8% | 95.1% | .690 | 22.2% |
Uncalibrated full-test baseline (same weights, no gate): acc .855 / macroF1 .695.
Weights are fp16 shards (fp16_shard_000.pt, fp16_shard_001.pt) that must
be merged before load_state_dict (strict):
import torch, glob
from transformers import AutoConfig, AutoModelForSequenceClassification, AutoTokenizer
state = {}
for p in sorted(glob.glob("fp16_shard_*.pt")):
state.update(torch.load(p, map_location="cpu"))
cfg = AutoConfig.from_pretrained(".")
model = AutoModelForSequenceClassification.from_config(cfg)
model.load_state_dict(state) # strict
tok = AutoTokenizer.from_pretrained(".")
model.float().eval() # fp32 compute
Verified round-trip: 100.0% prediction agreement with the pre-shard fp32 model. int8 dynamic quantization was tried and rejected (does not round-trip).
Max sequence length at train time: 128. Labels: 0=negative, 1=neutral, 2=positive.