AIToday

millfolio runs AI tagging on Mac M2 without killing the laptop

Hacker News2h ago

Key takeaway

millfolio, a personal finance app, runs AI classification on bank transactions entirely on a Mac M2 by computing tags once at index time and storing them, rather than running the model on each query. This design keeps the laptop usable while maintaining privacy—the cloud model never sees merchant strings—and delivers practical speed: a sample of 2,930 transactions with 988 distinct descriptions took roughly 260 seconds to classify, with batching and deduplication cutting the work to about 3.0× fewer model calls.

Summaries like this, in your inbox every morning.

Sign up free →

3 Key Points

  • What happened

    millfolio, a personal finance tool, processes thousands of bank transactions on a local Mac M2 by tagging them with keywords, reference tags (built from other tags), and AI tags that run once at index time rather than on each query. The system batches AI classification, deduplicates descriptions before sending them to the model, and lets the user control background priority with nap intervals of 100ms, 1.2s, or 5s.

  • Why it matters

    Running an AI model on every transaction every time a user asks a question would lock up a laptop; storing computed tags lets the frontier (cloud) model write efficient filter programs without exposing merchant strings, so the user gets speed, privacy, and auditability. Over 2,930 real transactions, the on-device Qwen2.5-3B model achieved 100% recall and 39% precision on a grocery classification task, taking about 650ms per distinct description.

  • What to watch

    On a Mac M2 16GB, a full AI pass of a 2,900-row vault takes minutes of background time; the system deduplicates recurring charges before inference (3× savings in the test run), and the UI shows a dry-run preview of any tag before it persists, so users can spot overmatching immediately.

Context & Analysis

millfolio's design splits the computational cost into three layers, ordered by expense. String tags (keyword matching) are free; reference tags (built from other tags) are deterministic and free; AI tags are the only layer that costs inference—and crucially, that cost is paid once at index time, not on every query. This decision unlocks two benefits: the laptop stays responsive (the user can change priorities or pause background work), and the frontend model (which writes filter programs) never sees the actual merchant strings, only tag names and scope notes, so transaction details stay on-device.

The operational numbers validate the approach. Across 2,930 real transactions, deduplication collapsed 3,090 rows to 988 distinct descriptions—a 3× savings—before the model saw anything. Batching ten descriptions per inference call further compressed the 400 distinct items into roughly 40 model calls over 260 seconds. The final throughput (8.5 rows per second after fan-out) is fast enough that a full backfill of a real vault takes minutes of nap time, exactly the budget the priority scheduler is designed around.

The preview UI—showing match counts, positive and negative examples, and a time-boxed sample for AI tags—addresses the core risk of any tagging system: confidence in the rules. Because neither keywords nor the model can be trusted blind, the system makes the user preview and confirm before persisting. This hybrid design (deterministic head plus fuzzy model tail, with human review before commit) suggests a practical middle ground for on-device AI: not trying to be perfect, but auditable and fast enough to run in the background while you work.

FAQ

How fast does the AI tagging work on a Mac M2 16GB?
The Qwen2.5-3B model classified 400 distinct descriptions (covering 2,228 rows) in approximately 260 seconds total, or roughly 650ms per distinct description. After deduplication fans the verdict back out, the system achieved 8.5 rows per second effective throughput.
How does millfolio prevent the model from slowing down the laptop?
Tags are computed once and stored; queries filter on stored .tags using string comparison, never calling the model at question time. The backfiller runs in a priority-controlled queue with adjustable nap intervals (100ms for 'get it done', 1.2s for normal, 5s for background), and it yields to any interactive question.
What accuracy did the AI model achieve on real transactions?
On a grocery classification task over 400 distinct descriptions, Qwen2.5-3B-Instruct achieved 100% recall (caught every transaction the keyword rule tagged) and 39% precision, with an F1 score of 56.2%. The 654 'false positives' mix genuine errors with grocers the keyword list simply does not know.

Discussion

No discussion yet for this article

Stay ahead with AI news

Get curated AI news from 200+ sources delivered daily to your inbox. Free to use.

Get Started Free

Free · takes 30 seconds · unsubscribe anytime

1 minute a day. The AI essentials.

200+ sources · Email / LINE / Slack

Get it free →