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

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 planne

Hacker NewsToolAISource
0Sign in to voteCopy link

FL score

72

out of 100

Verdict

VALIDATE

high confidence

Competition

No competitor data yet

Trend

No signal yet

A confidence scoring layer that routes queries between cheap local models and expensive cloud models, reducing API costs by 65-85% while maintaining accuracy.

The pain

Developers deploying AI apps face a hard choice: use small on-device models that are fast and private but unreliable, or use frontier models that work well but cost 10-100x more per query. Current routing methods (self-rating text, token entropy) don't actually predict when a model will fail.

The gap

No existing tool reliably signals model uncertainty without expensive inference or unreliable heuristics. The mechanistic insight, that hidden states contain modality-independent correctness signals, is novel and validated across text, vision, and audio with 0.814 AUROC vs 0.549 for entropy baselines.

Build angle

Ship the probe as a drop-in layer for Gemma 4 and other open models. Monetize through: (1) managed routing API that handles the cloud fallback, (2) enterprise licensing for fine-tuned probes on proprietary models, (3) consulting on deployment architecture. Start with developers already using Gemma; expand to Llama and Mistral variants.

Strengths

  • Solves a real economic problem: 15-35% query routing cuts API spend dramatically while maintaining SLA
  • Technical insight is defensible: mechanistic understanding of hidden states is harder to replicate than prompt engineering
  • Already open-sourced with working code, removing friction for adoption and building credibility
  • Modality-agnostic signal (0.79-0.88 AUROC on audio despite zero audio training data) suggests the approach generalizes
  • Clear unit economics: if a developer saves $0.10 per query routed correctly, even a $5/month SaaS fee is a 50x ROI

Risks

  • Probe is trained on Gemma 4; unclear if it transfers to Llama, Mistral, or future models without retraining
  • Benchmark results are strong but narrow: only 12 hold-out datasets, mostly academic. Real-world production queries may have different failure modes
  • Adoption requires developers to trust a third-party confidence signal in their critical path; one false negative (high confidence on wrong answer) damages reputation
  • Frontier models improve faster than small models; the cost gap may shrink, reducing the ROI of hybrid routing
  • Competitive risk: Anthropic, Google, or OpenAI could add native confidence scoring to their APIs, making this obsolete
  • No clear path to defensible moat if the technique is published; others can train similar probes

Questions about this idea?

FlyBot reads the scoring and gives you a second opinion on “Cactus Hybrid: We taught Gemma 4 to know when it's wrong”.

Open FlyBot