Show HN: Local pretrained classifiers, GPU not needed
This article introduces a lightweight, CPU-friendly library for running and retraining text classifiers without the need for a GPU. It provides code snippets for installation and usage, noting current performance limitations compared to larger models.
Why it matters
It demonstrates how to make machine learning more accessible by reducing hardware requirements for basic classification tasks.
Pretrained text classifiers you can run and retrain on CPU.
uvx --python 3.12 \ --from " jeffy-classify @ git+https://github.com/nicobrenner/jeffy.git@v0.1.0-alpha.7 " \ jeffy-serve Open http://localhost:8400 , pick a classifier, and paste one of these:
13 classifiers ship with the package. Weights are logistic regression coefficients (derived model parameters, not copies of training data). Source datasets and licenses are documented in ATTRIBUTION.md .
Test accuracy on held-out splits. Details in data/eval_results/benchmark.json .
Weaknesses: SNLI (65.6%) and tweet_eval_sentiment (66.2%) are below what task-specific models achieve. Emotion (75.5%) has limited class coverage. Probabilities are uncalibrated.
uvx --python 3.12 \ --from " jeffy-classify @ git+https://github.com/nicobrenner/jeffy.git@v0.1.0-alpha.7 " \ jeffy-train --example --save-dir my_models Loaded 24 examples from reviews.csv Training 'reviews': 24 examples, 2 classes Split: 19 train, 5 test Test accuracy: 100.0% Saved to my_models/reviews/ --example uses a bundled 24-row product review CSV. To bring your own:
Get smarter about the news
Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.
Create free accountAlready have an account? Sign in