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
31•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•4h 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•2h 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•1h ago
Nice, looking forward to the report.

And thanks, huge pasta fan :)

HenryNdubuaku•28m ago
anytime!
astrobiased•8m ago
Is this in any way similar to Goodfire's work? https://www.goodfire.ai/research/rlfr#

Medici family mystery may be solved after more than 400 years

https://www.cnn.com/2026/07/15/science/medici-family-mystery-dna-malaria
52•effects•1h ago•8 comments

Quality non-fiction books are the antithesis of AI slop

https://resobscura.substack.com/p/quality-non-fiction-books-are-the
59•benbreen•9h ago•33 comments

GigaToken: ~1000x faster Language model tokenization

https://github.com/marcelroed/gigatoken/
321•syrusakbary•6h ago•60 comments

Terrence Tao's ChatGPT Conversation about the Jacobian Conjecture Counterexample

https://chatgpt.com/share/6a5fdc7a-d6f8-83e8-bbea-8deb42cfed56
529•gmays•6h ago•327 comments

Malleable Computing, Emacs, and You

http://yummymelon.com/devnull/malleable-computing-emacs-and-you.html
51•kickingvegas•2h ago•7 comments

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

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

Safari Technology Preview 248 Released

https://webkit.org/blog/18162/release-notes-for-safari-technology-preview-248/
61•Erenay09•2h ago•21 comments

Are AI Labs Pelicanmaxxing?

https://dylancastillo.co/posts/pelicanmaxxing.html
341•dcastm•6h ago•134 comments

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

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

Everyone Should Know SIMD

https://mitchellh.com/writing/everyone-should-know-simd
202•WadeGrimridge•5h ago•62 comments

John C. Dvorak has died

https://twitter.com/na_announce/status/2079952538040672302
448•coleca•4h ago•134 comments

Any text-to-SQL benchmark should address difficulties of real-world data stores

https://cacm.acm.org/blogcacm/if-you-think-you-can-do-real-world-text-to-sql/
22•shenli3514•1h ago•4 comments

Nobody knows what a used GPU cluster is worth

https://ciphertalk.substack.com/p/nobody-knows-what-a-used-gpu-cluster
148•rbanffy•1w ago•129 comments

Making

https://beej.us/blog/data/ai-making/
254•erikschoster•8h ago•104 comments

Fairphone 6 wide camera experimental Linux support

https://nondescriptpointer.com/articles/fairphone-6-wide-camera-linux/
38•helonaut•3h ago•1 comments

The startup's Postgres survival guide

https://hatchet.run/blog/postgres-survival-guide
295•abelanger•11h ago•163 comments

Launch HN: Unlayer (YC W22) – Add email and document builders to your app

https://unlayer.com
43•adeelraza•7h ago•23 comments

I Inspected My Take-Home Interview Project. It Was a Whole Operation

https://citizendot.github.io/articles/fake-job-interview-git-hook-malware/
219•CITIZENDOT•3h ago•50 comments

So Reddit has decided that plain HTML is unsafe

https://www.cole-k.com/2026/07/21/reddit/
212•montroser•11h ago•219 comments

Museum of the Human Web

https://museum.parallel.ai/introduction?era=modern
9•ohjeez•1w ago•1 comments

Anthropomorphism in Children's Interactions with LLM Chatbots

https://arxiv.org/abs/2607.18250
4•StatsAreFun•46m ago•0 comments

Taking OCaml and Eio for a Spin

https://mattjhall.co.uk/posts/taking-ocaml-eio-for-a-spin.html
25•mattjhall•2d ago•3 comments

Businesses with ugly AI menu redesigns

https://blog.fiddery.com/businesses-with-ugly-ai-menu-redesigns/
167•speckx•10h ago•127 comments

Nvidia DGX Spark as a daily driver

https://daniel.lawrence.lu/blog/2026-07-15-dgx-spark-as-daily-driver/
72•plun9•3d ago•59 comments

How we made our LeRobot video reader up to 15× faster

https://www.eventual.ai/blog/how-we-made-our-lerobot-video-reader-up-to-15x-faster
6•ykev•5d ago•0 comments

Designing a 4D Digital Archive for Ikebana

https://ishiguro-lab.org/projects/designing-a-4d-digital-archive-for-ikebana/
5•ohjeez•3d ago•0 comments

Fretboard Memorisation with Modular Arithmetic

https://ohaodha.ie/blog/fretboard-memorisation-with-modular-arithmetic/
6•ohaodha•1h ago•1 comments

Ghost Cut – or why Cut and Paste is broken everywhere

https://ishmael.textualize.io/blog/ghost-cut/
112•willm•8h ago•83 comments

Back to Kagi

https://blog.melashri.net/micro/back-to-kagi/
177•speckx•10h ago•148 comments

Can a MUD evaluate LLMs? A $99 proof of concept

https://cruciblebench.ai/
96•Davisb135•7h ago•59 comments