hn.today

Show HN: Local pretrained classifiers, GPU not needed

github.com8 points6 comments
Screenshot of Show HN: Local pretrained classifiers, GPU not needed

Jeffy is a lightweight toolkit of pretrained text classifiers that runs and retrains on CPU without a GPU. It packages 13 task-specific logistic-regression heads that share a single embedding encoder (bge-large-en-v1.5, ~1.2 GB); heads are stored as derived model parameters (numpy .npz) and loaded into a small runtime (~2 GB). Installation and use are simple: install the package, run jeffy-serve to get an HTTP endpoint or use the Python Engine/SDK, and the encoder is downloaded on first use. Training and serving custom models from CSV/TSV/JSONL is supported via CLI or Python, with tuning options (regularization C, test_size, cv_folds) and fast CPU inference (embedding ~50-80 ms, classifier <1 ms).

Performance and provenance are explicit: example tasks include sms_spam (99.1% test accuracy), imdb (94.8%), banking77 (77 classes, 94.3%), ag_news (90.5%), while some tasks underperform compared to task-specific models (SNLI 65.6%, tweet_eval_sentiment 66.2%; emotion has limited class coverage). Probabilities are uncalibrated. Reproducible builds can retrain all heads (~40 minutes, ~5 GB download). Security measures include integrity hashes in per-capability manifests and a warning to only load custom pickles from trusted sources. Code is MIT-licensed; dataset licenses vary and redistribution permissions are not independently verified.

Read on github.com6 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in AI

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.