logoalt Hacker News

zihotki • yesterday at 1:15 PM • 8 replies • view on HN

I would hold your horses to paint it as dirt cheap.. In my cases for spam detection Luna was 20% cheaper due to prompt caching, although not as fast.


Replies

nico • yesterday at 2:19 PM

For email you can use a classifier

One way: separately embed sender, recipients, subject, body - then use the embedding vectors as input to a logistic classifier

With that setup, I get 95% accuracy on email classification, training on 50-100 base examples. The model trains on CPU in under 1min, and it does inference in under 20ms (most of it is running the embeddings, so you can make it faster if you train your own embeddings model)

Here’s a gist with some sample code: https://gist.github.com/nicobrenner/056a5aaff5d0119c0032ecda...

That code applies the embeddings + classifier setup on the Banking77 dataset. It gets 93-94% accuracy depending on the embeddings you use (SOTA for this is ~95%, with much bigger and slower models)

➕ show 2 replies
atombender • yesterday at 1:55 PM

> hold your horses to paint it as dirt cheap

For a moment I thought this was going to be a metaphor — maybe an ancient Chinese proverb about how paint brushes are made from horsehair and how you can't hold the horse to paint before you've turned the hair into a brush.

➕ show 1 reply
calebhwin • yesterday at 2:53 PM

How are you benefiting from prompt caching for simple classification?

➕ show 1 reply
jedberg • yesterday at 3:58 PM

Are you getting better performance from an LLM than a Bayesian classifier?

HawtAds • yesterday at 4:49 PM

How many requests per second do you have for spam that you are reliably hitting the Luna cache?

simplisticelk • yesterday at 6:20 PM

Is that just because the Jev implementation is less mature? Couldn't it also implement prompt caching?

tyre • yesterday at 2:03 PM

What are the costs compared to an ML model?

olgava • yesterday at 1:44 PM

[dead]