Top
Best
New

Posted by HenryNdubuaku 17 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!

346 points | 132 comments
nater5000 12 hours ago|
This is cool. I definitely think the "micro" sized LLM space is underappreciated, so it's always good to see work like this. I foresee a paradigm in some contexts where you have a hierarchy of LLMs, with more competent models actively training smaller models to solve specific tasks very efficiently, and something like this could be the smallest layer in that stack.

With that being said, the web demo is not particularly impressive. It really doesn't like anything I throw at it. I'm fine with accepting that fine-tuning is the solution to this, but I wonder if there's anything to gain from a bigger model? I know it's completely counter to the whole point of this, but a 14MB binary using 28MB of RAM seems unnecessarily small and pretty arbitrary.

Like, what does a 28MB binary get you? Or a 140MB binary? Or a 1.4MB binary? I'm guessing the choice of 14MB came from minimizing the size as much as possible while meeting certain requirements/performance expectations, but even a Pi 5 has plenty more room to spare. Curious if there's a good explanation for this (which I may have missed in my skim of the post).

HenryNdubuaku 12 hours ago||
So, its not a general language model, focused on tool call strictly for tiny edge-devices. There are solutions everywhere for high-capacity devices, Needle is for sub-$200 devices.
anon373839 5 hours ago|||
It seems to me that the model struggles to have enough general intelligence, knowledge, or reasoning capacity for arbitrary prompted tool calling. At this size, not surprising.

I am VERY interested in seeing how it could perform with some fine-tuning for a specific family of tools/tasks. That would be a great addition to the demo.

fwipsy 9 hours ago|||
14mb? More like sub-$20 devices.
TomatoCo 9 hours ago||
Most pi pico's come with 16mb of flash. I wonder what kind of performance that can eek out.
SequoiaHope 8 hours ago||
Well running from QSPI flash (even the internal memory versions use SPI internally) so any inference would be very slow streaming from that compared to RAM. The featured article says: “With a peak session RAM around 28MB, Needle runs on newer microcontrollers like ESP32-S3.” So I don’t see this doing anything useful on a Pico. The Pico 2 (RP2350) for example has 520k of RAM.
Rohansi 7 hours ago||
An ESP32 has the same amount of SRAM as the Pi Pico. You can hook up PSRAM to the Pi Pico just like ESP32 to get 16MB more RAM.
silentbob7 5 hours ago||
I'm quite impressed by the results of the web demo, especially given its size and the precision with which it uses the three available tools (tested with German commands). I could imagine that this LLM would fit well into a setup with multiple micro-sized LLMs for different purposes; so 14 MB for precise tool invocation is a reasonable memory footprint when a number of other local models are running (e.g. STT, TTS + language models).
HenryNdubuaku 52 minutes ago||
yes, that's what we had in mind while building
dbeardsl 9 hours ago||
My first query:

> Make it a little warmer in here.

The reply:

> "name": "set_thermostat", > "arguments": { > "temperature": 65, > "mode": "cool", > ... > "reasoning": "'warmer' implies need for cooling; set_thermostat with temperature 65 (typical warmth) and mode 'cool'.",

Maybe I'm doing it wrong?

ocihangir 3 hours ago||
Tested your example, the confidence is 0. In smart home context, I can think of an application where the low confidence answers can be forwarded to cloud, whereas the vast majority generic queries solved locally, if the confidence is reliable enough. The response is quite fast by the way.
dannyw 9 hours ago|||
It's not a conversational model. It's meant as a local tool calling model.
derangedHorse 9 hours ago|||
Yes, I think OP understands that. What he and many others in this thread are trying to understand is what makes this model useful.
ehnto 7 hours ago||
Turning a voice command into a tool call should be self evidently useful, being able to do that on a small embedded device is the novelty here. In this theoretical example, the thermostat is hosting the model on device and would use no external services.
tomrod 7 hours ago||
I confused by the dispatch model. Tool calls typically need some reasonability to be deterministic and, more importantly, predictable in response (o/w GIGO). Why would the thermostat need to interpret a voice command that the node capturing the voice command would not interpret instead?
ehnto 6 hours ago||
The node capturing the voice command could be the thermostat. From my understanding they are targeting very small devices.

So that could be a master home automation node, but why not also a single purpose device? I can think of more bad examples than I can good ones, but maybe I am doing some soldering and I need my soldering iron turned up a bit; my hands are full, so doing that by voice would be useful enough. Something I would never link up to a big AI model or home automation network, but could be useful to control by voice.

If it's something that can be burnt directly into a chip and shipped with the products for cheap, maybe that's a more pragmatic way to get AI into small devices (see taalas for a much bigger model doing that, althoug not yet cheap).

tomrod 6 hours ago||
Oh I agree that's not unreasonable. I wonder about the harnessing heft required to make it feasible though. If I say I'd like it a bit warmer, a tool can deterministically bump a few degrees while an LLM might bump it 10C. So do we limit the tool's range?
weird-eye-issue 1 hour ago||||
That's exactly what they were testing and what it failed at
owebmaster 7 hours ago||
Try asking it to set the thermostat to a value. It's a very small model, there's not much reasoning capability
CarpeNecopinus 3 hours ago||
It's definitely cool that you can get any reasoning whatsoever out of such a small model. That said, its reasoning is "interesting":

Query: "Make the living room dark" Agent: "User wants lights on in living room. 'dark' implies dim. Room 'living room', action 'on'." (And on every test I did, it just completely ignored the "brightness" parameter)

It also appears to have no concept of what a door or light actually is, whenever the query diverges from "Lock door X" or "Turn on light X", it tries to shoehorn whatever additional context is given into the device name:

Query: "Lock out the vacuum salesman at the front door" Agent tries to lock "front door vacuum salesman"

"The way you talk really makes me appreciate silence" is classified as "positive" with 82% confidence.

AmazingTurtle 2 hours ago||
that model is 14MB large what do you expect. but I agree it's funny regardless
HenryNdubuaku 53 minutes ago||
Ok, this is genuinely funny, we will fix these as we iterate, thanks lol.
Tiberium 13 hours ago||
Funny result from the web demo. I'm well aware that it's an extremely small and, well, stupid, model, but even so:

Query: HN

Result:

{ "function_calls": [ { "name": "lock_door", "arguments": { "door": "front door" } } ], "reasoning": "User wants to lock the door. No specific door mentioned, so use 'front door' as default.", "confidence": 0 }

I'd expect it to at least ignore (call no tools) for the queries that it doesn't understand. And it seems like it does do that, just not consistently.

yoavm 13 hours ago||
The website says the model is for "tool calling, device use, and structured extraction". Your example just doesn't seem to be very relevant. FWIW, it did a pretty good job for tool calling when I tried it, and I think it could be pretty nice to have this running on locally and integrate with Home Assistant.
evmaki 13 hours ago|||
False positives are definitely relevant and worth measuring - natural language interfaces always have a discoverability problem, i.e., users not knowing what actions the system does and does not support. If the frontend of that system lacks the ability to reject unsupported commands, weird stuff happens.

Nonetheless, this is very cool work! If I can offer a small suggestion to the team at Cactus, it would be to evaluate your releases on some usability criteria (including false positives). Any serious integrator or adopter of these models would want to have that information available.

jdknezek 12 hours ago|||
> "confidence": 0

OP and the linked page talk about the confidence score and using it as an action threshold, so it looks like an appropriate total response to me.

evmaki 12 hours ago||
Right, but that's not the same thing as reporting a benchmark across a test set. It doesn't help me determine how well the model does across a decently-large sample size of commands. It doesn't tell me with what reliability the confidence will be below a given threshold when it should be, above that threshold when it should be, etc.
HenryNdubuaku 12 hours ago|||
Thanks, noted!
planb 4 hours ago||||
This is extremely impressive if it works. But on the other hand, if the number of cases where it works as expected is lower than what we could catch with a (old-Siri-style) heuristics based approach, and the rest fails in unpredictable ways, I'd prefer the dumb old "I did not understand that" response.
curious_cat_163 9 hours ago|||
I think the test above is about tool calling... That's how I read it. The issue here is known as "out of distribution detection" in the old-timey classification world.

I am not sure how a micro model will fundamentally solve it. Would love to understand what dannyw and team did there?

derangedHorse 8 hours ago||
How did you draw an association between dannyw and Cactus? There are no 'Danny's on the list of GH contributors nor is there one named in the paper. Just curious.
kristjan 2 hours ago|||
It seems to love locking doors. I was hoping this would dim the lights.

> I'm hungover

{ "function_calls": [ { "name": "lock_door", "arguments": { "door": "front door" } } ], "reasoning": "User wants to lock the door. 'hungover' implies a security door. No specific door named, so use 'front door' as default.", "confidence": 0 }

petu 12 hours ago|||
"confidence": 0, so I guess you could threshold it
justoneletter 5 hours ago||
Only if the confidences are calibrated, and they probably aren't. Any idea how the confidence is derived?
jszymborski 13 hours ago|||
no, this is the appropriate response to hearing the words "HN" :P
plingbang 11 hours ago|||
I've got an identical output with the prompt "do not lock the door".
hmokiguess 12 hours ago|||
yeah I got the same, almost like its biased heavily towards that as the 0 ranking -- my prompt was just the word 'potato'
Schiendelman 13 hours ago|||
Was that the first message you sent it?
HenryNdubuaku 12 hours ago|||
This is exactly why the confidence feature was introduced, the model knows when its wrong, we could hide that part and return a placeholder "sorry I only do function calls", would that be better or you prefer to see everything?
nc55g3g 9 hours ago||
[dead]
raylad 12 minutes ago||
It seems to fail. I sent the prompt:

“ 5° warmer”

And it said:

“ setting the temperature to 5°F”

havercosine 2 hours ago||
Congratulations. 28MB is impressive, I've not played around with actual queries/outputs.

I'm wondering what is the overall thesis/plan here and where exactly the innovation lies? Would love if you can throw light on below,

  - If I understand, this is complete stack of a custom architecture (attention only transformers), custom quantisation format and a runtime engine all packaged together?
  - How do you differentiate / compete against LiteRT (former TensorFlowLite) and Lite RT LM? Google is heavily investing in this ecosystem because Android is where they have distribution moat. Wouldn't it be easier for me as a developer to build on top of LiteRT since it is relatively open ecosystem and I can pack large number of open models from HF directly?
  - What exact challenges you saw with TFLite, TVM etc that prompted this effort ?
  - What will be the pricing model like?
HenryNdubuaku 1 hour ago|
So TFLite is an inference engine while Needle is a model, which you can port on TFLite btw.
arthuqa 13 hours ago||
That's really cool - I was already thinking of compressing `functiongemma-270m-it` down to 1-2 bits so it would work flawlessly in the browser. Your `Fine-tuning` feature is even much more convenient.
HenryNdubuaku 12 hours ago|
Thanks, give it a splin!
profsummergig 12 hours ago||
Could someone please share how such open source micro-LLMs might have been created?

Do the creators take something like DeepSeek, and then delete most of the neurons to whittle down the size?

anigbrowl 9 hours ago||
There's a Manning book on creating your own LLM from scratch which answers your question exactly. There's another book from the same publisher specifically about small language models for specialty purposes.
HenryNdubuaku 12 hours ago|||
Technically, you could do that, but we trained this one from the ground up!
profsummergig 10 hours ago||
That sounds like an enormously expensive exercise.
salamo 10 hours ago|||
As someone who's done something similar (https://blog.lukesalamone.com/posts/creating-tiny-semantic-s...) the expensive part wasn't the training itself but the data curation and evaluation post-training. For this, getting a reasonable distribution of tool calls when the tool call can be anything isn't easy.

Once you have that, the model is small enough batch sizes are probably enormous and training can probably be done on a consumer-grade GPU in a week or less. Or even faster on a bigger GPU.

ronsor 10 hours ago||||
At <50M parameters, training costs are completely trivial. You'll spend a lot more on your rent this month.
HenryNdubuaku 33 minutes ago||
Haha, my rent is cheap lol
kadoban 9 hours ago||||
Training scales pretty badly, so smaller models like this are really not that bad in terms of cost.
genxy 9 hours ago|||
You can train a model of this size on your laptop in a day.
hgoel 11 hours ago||
Another option for something this small and narrowly specialized could be to get traditional LLMs to synthesize the training data. Model collapse is probably less of an issue at this size relative to terabyte sized models.
HenryNdubuaku 55 minutes ago||
Your thinking is correct haha
rcarmo 3 hours ago||
Nice. I used Needle as a router in https://rcarmo.github.io/projects/memento/, need to take a look at this
HenryNdubuaku 55 minutes ago|
Insane!
Robin_Message 1 hour ago|
> Turn the lights down low in the bedroom

Sets lights to 30% but also off

> Turn the lights low in the bedroom

Sets lights to on

This is a cool idea but I think humans assume more than 14MB of intelligence. This is like the unhelpful guard in the swamp castle of Monty Python's Holy Grail

HenryNdubuaku 1 hour ago|
Haha, its not a generalist model, cheap devices cannot run LLM in production, so we brig on-device intelligence to them in the size they can. Needle is niche, not a Gemma or GPT replacement.
Robin_Message 1 hour ago||
Right, but I don't think consumers would consider this "intelligence". It's too dumb.
More comments...