frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: Cactus Hybrid: We taught Gemma 4 to know when it's wrong

https://github.com/cactus-compute/cactus-hybrid
37•HenryNdubuaku•5h ago
Hey HN, Henry & Roman here from Cactus.

A small, on-device model is fast and private, but sometimes wrong, but frontier models are getting expensive pretty fast. So, we post-trained Gemma 4 E2B post-trained to know when it's wrong. Every response comes with a confidence score between 0 and 1. Developers can accept the on-device when it's high, hand off to a bigger cloud model when it's low. By routing only 15-35% of queries to Gemini 3.1 Flash-Lite, Gemma-4-E2B matches Gemini 3.1 Flash-Lite on most benchmarks.

- ChartQA: 15-20%

- LibriSpeech: 25-30%

- MMBench, GigaSpeech, MMAU: 30-35%

- MMLU-Pro: 45-55%

We were always frustrated by the routing signals hybrid apps rely on: asking the model to rate itself in text (unreliable, and you're parsing prose), or token entropy heuristics (barely better than a coin flip in our tests). So we did mechanistic studies on small models, Gemma 4 particularly, and found the hidden state for different layers carry meaningful self-awareness signal for various situations.

SO we extended the model with a 68k params probe layer (LayerNorm, low-rank projection, attention pooling, small MLP head) reads one intermediate layer during decoding and predicts p(wrong); confidence = 1 - p(wrong), returned as structured data, never parsed out of the answer text.

Across 12 hold-out benchmarks spanning text, vision and audio, the probe averages 0.814 AUROC vs 0.549 for token entropy. The result that convinced us this is real: the probe was trained on zero audio data, yet scores 0.79-0.88 AUROC on four audio benchmarks where entropy is near-random or worse (0.32-0.52). It's reading a modality-independent correctness signal from the hidden state, not memorizing patterns from its training data.

We published all weights on HuggingFace and provide copy-pase codes to run it on Transformers, MLX, Llama.cpp or Cactus. With Ollama, vLLM, SGLang etc in the works. For llama.cpp we ship a patch series you compile in once (upstreaming is planned). The code is MIT licensed; Gemma model use remains subject to the Gemma terms.

GitHub: https://github.com/cactus-compute/cactus-hybrid

Weights: https://huggingface.co/collections/Cactus-Compute/cactus-hyb...

Some caveats:

- The probe scores single-sequence decoding only, up to the first 1024 generated tokens.

- Handoff works best when routing per task in a multi-step process, not per step.

- Hierarchical routing is still in the works: try on-device, then DeepSeek v4 Flash, before Fable/GPT5.5/Gemini/Muse/Grok.

- The technique is boutique for each model, we will share each weights as they roll out.

These issues are currently being tackled at Cactus and updated weights will be shipped directly into the HuggingFace collection and GitHub repository straight up. Please let us know your thoughts, it helps us find ways to improve the design progressively.

Thanks a million!

Comments

cacio-e-pepe•5h ago
> So we did mechanistic studies on small models, Gemma 4 particularly, and found the hidden state for different layers carry meaningful self-awareness signal for various situations.

Neat! Just to make sure I understand - you trained your probe layer to take this hidden state and predict p(wrong)?

Curious to learn more. Any more info on your approach (esp the mechanistic study)?

HenryNdubuaku•3h ago
Correct, the study is verbose, we will compile into a neat shareable report and publish once we solve the pending caveats. Interesting username btw haha.
cacio-e-pepe•2h ago
Nice, looking forward to the report.

And thanks, huge pasta fan :)

HenryNdubuaku•46m ago
anytime!
astrobiased•26m ago
Is this in any way similar to Goodfire's work? https://www.goodfire.ai/research/rlfr#
HenryNdubuaku•20m ago
Thats an interesting outlook, loosely similar.

Show HN: Bento - An entire PowerPoint in one HTML file (edit+view+data+collab)

https://bento.page/slides/
601•starfallg•8h ago•141 comments

Show HN: Cactus Hybrid: We taught Gemma 4 to know when it's wrong

https://github.com/cactus-compute/cactus-hybrid
38•HenryNdubuaku•5h ago•6 comments

Show HN: ValuePair – a friendship app that cares about values first

https://valuepair.app
5•zloy88•1h ago•4 comments

Show HN: DeepSQL – A self-hostable DBA agent for Postgres and MySQL

https://deepsql.ai/
42•venkat971•2d ago•21 comments

Show HN: Web swing through midtown NYC

https://www.swingnyc.com/
61•shahahmed•7h ago•24 comments

Show HN: Vivace – A single-process Qt media player with interactive DVD menus

https://github.com/Sportacandy/vivace
2•Sportacandy•39m ago•0 comments

Show HN: HN Hall of Fame – browse 3,100 legendary Hacker News links

https://www.orangecrumbs.com/hall/
179•oyster143•8h ago•37 comments

Show HN: 1,280 open USDZ furniture assets for VR/AR

https://lx2026.github.io/genhome3d-1280/
4•linxy97•1h ago•0 comments

Show HN: The Daily FM – Turn any source into a daily podcast

https://thedaily.fm/
4•carimura•3h ago•1 comments

Show HN: NextBest – See what skincare people recommend

https://www.nextbest.one
3•kalila855•2h ago•0 comments

Show HN: I ran 12 AI bots predicting stocks for two months, every call public

https://ldbd.app
3•kkjh0723•1h ago•2 comments

Show HN: LiquidBrain – Unlimited Tokens. Unlimited Context. One Fixed Price

https://liquidbrain.ai/
4•salsta1•2h ago•2 comments

Show HN: Promptrack A local menu bar app that tracks your Claude Code usage

https://promptrack.dev/
2•feskk•1h ago•0 comments

Show HN: Kalvir Clock

https://kalvir.life/clock
3•kalv•3h ago•0 comments

Show HN: Millwright – Rust-based, self-hosted LLM router

https://github.com/Northwood-Systems/millwright
7•AndrewLiu96•4h ago•2 comments

Show HN: Cartopolis – OpenStreetMap rendered like it's 1999

https://seriot.ch/drawing/cartopolis/
5•beefburger•5h ago•0 comments

Show HN: Stream Android Emulators to a Browser Window

https://github.com/hsandhu/serve-avd
4•rsandhu•2h ago•0 comments

Show HN: What's one random memory from your childhood that you'll never forget?

https://mil.now
2•untitled-now•2h ago•1 comments

Show HN: I brute-forced a wooden Antikythera-style puzzle in Rust

https://github.com/garyhtou/grecian-computer
2•garyhtou•2h ago•1 comments

Show HN: Autograd-Free LLM Guiding with 0MB VRAM (Alternative Pathways)

https://github.com/PJHkorea/Continuous_Wave_Field_LLM_Brain
2•PJHkorea•2h ago•1 comments

Show HN: Focus on approving agent actions and managing team MCP access

https://gettrustloop.app
2•ducnguyen67201•2h ago•0 comments

Show HN: ReadKinetic – a free, local-first speed reader for your own books

https://www.readkinetic.com/app/
95•SamuraiLion•18h ago•60 comments

Show HN: SlapMetrics – Mac menu bar app that monitors Stripe/GA4 metrics

https://www.slapmetrics.com
2•devtanna•3h ago•0 comments

Show HN: Agent in 9 Lines Python

https://gist.github.com/tosh/6e91a9dbf08dd630c535e7345ac7f0b5
17•tosh•10h ago•7 comments

Show HN: Netmon – self-hosted LAN monitor with sarcastic AI reports to Telegram

https://github.com/Role1776/netmon
2•OymInIRole•3h ago•0 comments

Show HN: Pacwich, Monorepo tooling for Bun/NPM/pnpm (try the browser CLI demo)

https://pacwich.dev
2•smorsic•3h ago•0 comments

Show HN: TTFT benchmark: LLM Gateway vs. OpenRouter (Claude-haiku-4.5, 150 runs)

https://llmgateway.io/blog/openrouter-vs-vercel-vs-llmgateway-performance
3•proxysoul•3h ago•0 comments

Show HN: Paste a job description, get a broken Kubernetes cluster to fix

https://prepme.io
3•ilyasubach•3h ago•2 comments

Show HN: Szr: A safer command output reduction for coding agents

https://github.com/devr-tools/szr
3•alxxjohn•5h ago•2 comments

Show HN: A new kind of FPS aim trainer

https://openaim.pramit.gg/
80•pmazumder•18h ago•43 comments