Top
Best
New

Posted by HenryNdubuaku 18 hours ago

Show HN: Needle2: 14MB agentic LLM for phones, wearables, smart home and robots(cactuscompute.com)
Hey HN,

Henry from Cactus here!

We previously released Cactus Needle, a 14MB agentic LLM for tool call, device use, and structured extraction for phones, wearables, smart homes, small robots and microcontrollers. We got really great feedback here, and have now incorporated the suggestions to release Needle 2.

The whole model is a single 14MB binary that runs a full session in 28MB of RAM; 45m parameters at 2bit compression. Needle hits 500 tokens/sec decode speed on a Raspberry Pi 5, sits between 400-1,500 tokens/sec on VR devices like Meta Quest 3S and Apple Vision Pro, and ranges 300-700 on sub-$200 phones such as the Samsung A-Series.

On the tool call and mobile device use benchmarks, Needle 2 trades wins with closest small models like LFM2.5 230M and Apple Foundation Model, at 5x to 70x smaller, both at f16 vs Needle 2 at 2bit. Needle is based on Simple Attention Networks from our paper (https://arxiv.org/abs/2607.18363).

Edge AI has lately meant Macs and PCs, but that is just 1.5 billion of over 21 billion connected IoT devices in the world today, and in emerging markets most phones ship under $200, no NPU, cheap GPUs. These include budget phones, Raspberry Pis, microcontrollers, wearables, small robots like Reachy Mini, and connected home devices.

A conventional transformer of Needle's width and depth spends 164 MFLOPs per token, and even one squeezed down to Needle's parameter count spends 87, Needle spends 70. Even on a high-end phone, an always-on assistant lives inside a power budget; every MFLOP is milliwatt-hours, and Needle spends 7x to 85x fewer of them per token than the smallest performant LLMs. More about the architecture in the link.

When we structure intelligence for consumer devices as functions with typed parameters, the only hard part is mapping a messy sentence onto them; which function, with which values. Our research found that when framed that way, the problem needs no world knowledge and no open-ended prose, which is why 45M parameters suffice.

Needle 2 expands to structured extraction where the schema can be passed in-place of tools and the model returns structured output. You can use Needle as a text-classification model with an enum field, as a summarization model by providing a schema that extracts key fields, everything but free-range decode.

Every product has its own tool vocabulary and fine-tuning needle helps it achieve frontier-level performance on custom tasks, so using the python package (https://github.com/cactus-compute/needle), Needle can be fine-tuned Needle on a Mac/PC in minutes to a few hours, with automated data-generation pipeline, just pass a couple samples.

Nonetheless, every response carries a learned confidence score based our Cactus Hybrid technique. If above your threshold, act, below it, escalate to the cloud or bigger model. Combining Needle 2 with a private DeepSeek-v4-Flash deployment works particularly well for enterprise-level tasks at barely any cost, we can help with this setup.

We have put a lot of thoughts into Needle 2 but might still be missing quite a lot, please use the playground in the provided link to test Needle and share your thoughts, always appreciated!

359 points | 135 commentspage 3
minimaltom 14 hours ago|
Was really cool to see yous use Engrams to cut down compute!

Given its basically an O(1) lookup with disk space being the main constraint, I was curious if you've tried ablating engram layers and sizes across your setup?

Also, why mHC over attention residuals?

HenryNdubuaku 14 hours ago|
Yes, we ablated Engrams rigorously and found that it returned world knowledge like FFN without without compute expenditure.
minimaltom 14 hours ago||
What about mHC? I'm surprised it helped with such a small compute budget.
HenryNdubuaku 13 hours ago||
[flagged]
dofm 14 hours ago||
Naïve and clumsy question: how would you pair this with speech-text-speech stuff, wake words etc.? Are there good examples of this for a Pi 5?

The demo is super — I'm just having trouble seeing the whole picture for e.g. a screenless device.

ETA: pun not intended

nater5000 14 hours ago||
The best entrypoint is Home Assistant: https://www.home-assistant.io/

That will get you a lot further than what you're asking, but if you dig a bit through Home Assistant features, resources, etc., you may find the current "best" answers to your questions.

If you want a quick answer: Whisper is a good open-source speech-to-text model which comes in a variety of sizes (https://huggingface.co/openai/whisper-tiny). You can definitely get something like this running on a Pi 5. There are plenty of other STT models out there, some of which are built specifically for this context (again, see the Home Assistant stuff), but Whisper comes up a lot as a good default choice.

So with something like Whisper, you could just have a simple script which is constantly listening to a rolling window of audio and transcribing it. When the transcription includes a key phrase, you can pass the rest of the transcription to Needle2 (or anything else for that matter). From there, you take the results and execute the necessary tool calls.

There's a bit more to all of this to make it work smoothly, but fundamentally this is all there is to it. All this would work very fast on a Pi 5 (although I wouldn't expect the results to be particularly good without some serious hand-crafted logic, fine-tuning, etc.). If you want to mess around this stuff, handing all of this to Claude, Codex, etc., can get you something spun up and functional very quickly.

silentbob7 6 hours ago|||
The wyoming protocoll seems to be the path for home assistant audio, so you need STT (wyoming-faster-whisper), TTS (wyoming-piper for wide language support) API endpoints and some Ollama or OpenAI API endpoint available for your home assistant server.
dofm 4 hours ago||
That is interesting, thanks. And I see separable wake-word detection there. I'd always assumed that was likely to be closer to the metal (more like recognise a sound than turn sound to word).
dofm 14 hours ago|||
This is a very responsive answer, thank you so much. (I'd assumed maybe Whisper but the wake word "loop" detail there is illuminating.)
HenryNdubuaku 14 hours ago|||
Users often stack a transcription model on top to get the voice prompt, then decode to actions. Think of Alexa and Siri.
dofm 14 hours ago||
Thank you.
shubhamsinghani 2 hours ago||
[flagged]
prmoustache 6 hours ago||
How many languages does it supports in such a small size?
HenryNdubuaku 2 hours ago||
7 for now, English, German, Polish, French, Dutch, Latin, Italin.
silentbob7 5 hours ago||
Tested with german and this kinda works, but confidence suffers.
sroussey 13 hours ago||
Looking forward to npm version of needle-rs supporting v2. I added needle support for tool use in my side project.
HenryNdubuaku 12 hours ago|
thanks, give the playground a go and let us know how to improve!
sroussey 11 hours ago||
I tried tweeking for structured extraction, but got issues with token budget. What is the context size?
forsalebypwner 13 hours ago||
Any instructions available for running this on an ESP32-S3 or P4 like the site says?
rshemet 13 hours ago|
Hey! Roman here from Cactus - yes, we're putting putting together a detailed guide for ESP32.

In the meantime, if you have enough RAM for the current model (≈28MB), our repo will get you up & running:

https://github.com/cactus-compute/needle

forsalebypwner 11 hours ago||
[dead]
ianseyler 14 hours ago||
I’d be interested in attempting to run this in a network- enabled 32MiB RAM microVM.
HenryNdubuaku 14 hours ago|
Thanks, how can we help?
snyp 9 hours ago||
This is so cool! Congrats to the team!
HenryNdubuaku 2 hours ago|
Thanks!
anr0 8 hours ago||
these micro LLMs could be a game changer for hearing aids

so many interesting lowfi hardware use cases

HenryNdubuaku 2 hours ago|
Exactly the use cases we designed Needle for!
yorwba 13 hours ago||
"make it as dark as possible"

  {
    "function_calls": [
      {
        "name": "set_thermostat",
        "arguments": {
          "temperature": 72,
          "mode": "cool",
          "room": "living room"
        }
      }
    ],
    "reasoning": "'as dark as possible' -> set_thermostat to warm; 'dark' implies higher temperature; 'cool' mode for darkness.",
    "confidence": 0
  }
... maybe this counts as dark humor at least.

Since it seems limited to matching a few templates and otherwise falling flat on its face, I wonder how 14MB of regexes would fare in its stead. Normally you wouldn't want to parse arbitrary natural language input with regex because of how tedious and brittle it would be, but for the tedium we have LLMs and this alternative isn't exactly robust either.

HenryNdubuaku 2 hours ago||
SO when confused, it gives you a low confidence score as a signal, in which case its recommended to finetune using th python package, train on your mac/PC
silentbob7 6 hours ago||
I also wonder how small a LLM trained on catching only subject (e.g. living room) and action (light on) from text input could be compared to needle - the json wrapping could be done afterwards using templates.
HenryNdubuaku 2 hours ago||
The problem is the target device, an LLM can't run on an average TV well.
tamperoff 9 hours ago|
Is there a prebuilt apk somewhere?
rshemet 9 hours ago|
there are android binaries you can ship in your own app - https://huggingface.co/Cactus-Compute/needle2/tree/main

but if you're just looking for somewhere to try the model, use our in-browser playground! - https://cactuscompute.com/needle

More comments...