frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: We replaced 5 ML models with 1 shared encoder on an $11/month VPS

https://fittohire.com
1•blemis•1h ago
We were running 5 fine-tuned MiniLM models for a resume-to-job matching pipeline — 455MB on an $11/month VPS, one per task. I consolidated them into a single shared encoder with 5 lightweight heads: 25MB total, same latency, zero API calls. The matching score went up, not down.

The 5 tasks:

1. Classify JD lines (requirement vs boilerplate) 2. Split requirements into required vs preferred 3. Disambiguate skill mentions (Python-the-language vs Python-the-ecosystem) 4. Textual entailment (does resume experience satisfy a requirement?) 5. Semantic embeddings for similarity search

All five share MiniLM-L6 (22M params). Before: 5 x ~91MB fine-tuned copies — essentially the same encoder with different weights, burning RAM for no reason on a 4 vCPU / 8GB box. The obvious idea: share the encoder. One copy in memory, five lightweight heads (~580KB each) routing its output to task-specific predictions.

Attempt 1: Frozen encoder, linear heads. Cache CLS embeddings, train heads on cached vectors. Fast. Every head lost 10-15% accuracy. Pretrained representations weren't tuned for our tasks.

Attempt 2: Multi-task fine-tuning, 4 objectives. Unfreeze, train all four heads simultaneously with alternating batches, differential LR (encoder 2e-5, heads 1e-3). Classification recovered to within 2% of standalone. But embedding quality collapsed — "Python programming" and "cooking recipes" hit 0.91 cosine similarity. Classification objectives pushed all representations into a small region where heads could classify, destroying the distance structure embeddings need.

Attempt 3: Add contrastive objective as 5th task. Cosine similarity loss on positive/negative pairs alongside the four classification objectives. Explicitly penalizes the collapse. Encoder now has two competing incentives: make CLS tokens classifiable AND keep similar texts close / dissimilar texts far apart.

Gotchas:

Task weighting. Smallest dataset (65K) was drowned by largest (1.6M). 3x weight fixed it.

Embedding objective needs mass. 270K contrastive pairs vs 2.1M classification wasn't enough. Scaled to 1M pairs at 2x loss weight.

Some heads need independent training. Required-vs-preferred head wouldn't converge multi-task. Diagnostic showed encoder representations separated the classes (0.80 within vs 0.02 between cosine). Encoder fine, head was the problem. Froze encoder, retrained just that head in 30 seconds. 99% accuracy.

Result: one 22.9MB INT8 encoder + five ~580KB heads = 25MB total. Also a DeBERTa encoder (68.5MB) with two heads for token-level tasks (NER + section segmentation). Total: 94MB for 7 models, $11/month VPS, zero API costs.

The kicker: matching score went UP (71 → 75) because the entailment head became more accurate. It identifies when experience satisfies a requirement that a keyword matcher would miss. Pipeline speed 19s → 8.7s. Consolidated for RAM, got better accuracy as a bonus.

One thing I'd do differently: start from sentence-transformers/all-MiniLM-L6-v2, not the cross-encoder checkpoint. Sentence-transformer's embedding space is already oriented toward similarity; cross-encoder's is oriented toward ranking. Better starting point for the contrastive objective.

Happy to answer questions about multi-task training, the embedding-collapse diagnostic, quantization, or production deployment.

Soft launch — product is live at the URL, free to try one report. Feedback welcome, especially from anyone who's been through ATS-backed applications. And if you want to argue with the architecture choices, even better.

The Internet Is Real Life

https://www.a16z.news/p/the-internet-is-real-life
1•7777777phil•44s ago•0 comments

The Oil Shock Is About to Hit America [video][25mins]

https://www.youtube.com/watch?v=f353QO5Dgus
1•Bender•1m ago•0 comments

NASA's Curiosity rover finds organic molecules on Mars

https://www.theguardian.com/science/2026/apr/21/nasa-curiosity-rover-finds-organic-molecules-mars
1•skor•1m ago•0 comments

Return of the Saturday Night Special, Courtesy of the SEC

https://clsbluesky.law.columbia.edu/2026/04/21/return-of-the-saturday-night-special-courtesy-of-t...
1•petethomas•3m ago•0 comments

Request Tracking: Lessons from Card Payments and HTTP/2

https://madflojo.dev/posts/in-flight-request-tracking-in-asynchronous-systems/
1•madflojo•3m ago•0 comments

GitHub has stopped accepting new Copilot individual subscriptions

https://www.theregister.com/2026/04/20/microsofts_github_grounds_copilot_account/
1•Betelbuddy•3m ago•0 comments

A Century of Chaos in a Single Emoji

https://jenniferdaniel.substack.com/p/a-century-of-chaos-in-a-single-emoji
1•ChrisArchitect•4m ago•0 comments

AppWatch – Track Itch.io, Steam, App Store and Google Play in One Dashboard

https://appwatch.dev
1•ranguita•4m ago•2 comments

An LLM invented a feature by hijacking my tool schema

https://ratnotes.substack.com/p/i-thought-i-had-a-bug
1•mtrifonov•5m ago•0 comments

Cocaine pollution alters the movement and space use of Atlantic salmon

https://www.cell.com/current-biology/fulltext/S0960-9822(26)00315-5
1•ajay-d•5m ago•1 comments

Zelensky says failure of US envoys to visit Kyiv is 'disrespectful'

https://www.bbc.com/news/articles/cd9v420y190o
3•Betelbuddy•6m ago•1 comments

Abusing PostHog's setup wizard to get free Claude access

https://techstackups.com/articles/i-abused-posthogs-setup-wizard-to-get-free-claude-access/
1•ritzaco•6m ago•0 comments

Neurobiologists Hack Brain Circuits Tied to Placebo Pain Relief

https://today.ucsd.edu/story/neurobiologists-hack-brain-circuits-tied-to-placebo-pain-relief
1•gmays•6m ago•0 comments

AES 128 is just fine in a post-quantum world

https://arstechnica.com/security/2026/04/contrary-to-popular-superstition-aes-128-is-just-fine-in...
1•mmwelt•7m ago•0 comments

The Kuleshov Effect

https://en.wikipedia.org/wiki/Kuleshov_effect
1•janandonly•8m ago•0 comments

The Forgotten History of Hershey's Electric Railway (1916) in Cuba

https://spectrum.ieee.org/hershey-electric-railway-cuba
1•defrost•8m ago•0 comments

Design isn't dying. It's shifting left

https://microsoft.design/articles/design-isnt-dying-its-shifting-left/
1•djurgardensif•9m ago•0 comments

Agentic memory with passive recall and citations as trust graph

https://github.com/Kromatic-Innovation/athenaeum
1•TristanKromer•9m ago•1 comments

Russia Is Building Tomorrow's War Machine

https://www.nytimes.com/2026/04/21/opinion/russia-drones-putin-ukraine-war.html
2•mitchbob•10m ago•1 comments

Artemis II Watches Earth Set Behind the Moon [video]

https://www.youtube.com/shorts/MT8tg5b3b8E
1•bookofjoe•10m ago•0 comments

Curiosity rover finds signs of ancient life on Mars

https://www.popsci.com/science/curiosity-rover-life-mars/
1•Brajeshwar•13m ago•0 comments

Increased AI expectations without guidance leads to employee burnout

https://www.cio.com/article/4159631/increased-ai-expectations-without-guidance-leads-to-employee-...
2•WaitWaitWha•13m ago•0 comments

Show HN: Group Income – FOSS Privacy Respecting Basic Income System

https://groupincome.org
1•gslepak•14m ago•0 comments

I broke a working PR because an LLM convinced me there was a bug

https://www.droppedasbaby.com/posts/2602-02/
1•offbyone42•14m ago•0 comments

Show HN: Detecting API degradation before thresholds are crossed

3•AnchorFlow•18m ago•0 comments

An Eng Lead's Guide to Tactical AI Adoption

https://breaking-changes.blog/an-eng-leads-guide-to-tactical-ai-adoption/
2•oakhan3•18m ago•0 comments

Rockraft: Strongly-Consistent KV Storage Framework Based on OpenRaft and RocksDB

https://www.codedump.info/en/post/20260412-rockraft/
1•codedump•20m ago•0 comments

Show HN: CheckAgent The open-source pytest testing framework for AI agents

https://github.com/xydac/checkagent
2•xydac•20m ago•0 comments

AMD Ryzen 9 9950X3D2 Dual Edition tested: Sweet, gratuitous overkill

https://www.theregister.com/2026/04/21/amds_ryzen_9_9950x3d2_dual/
1•geekinchief•22m ago•0 comments

Kubernetes Probes are Awesome (until they aren't)

https://peteremil.com/kubernetes-probes-are-awesome-until-they-arent/
3•eric_khun•22m ago•0 comments