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 commentspage 2
hathym 13 hours ago|
I tested with

  import needle

  @needle.tool
  def add(a: int, b: int):
      "Add two numbers."
      return a + b

  agent = needle.Needle(tools=[add])
  print(agent.run("calculate 1 + 1?")["reasoning"])

python main.py No calculator or math tool available.

conclusion: completly useless

HenryNdubuaku 13 hours ago|
Try the following tool description: "Calculate the sum of two numbers. Use for any arithmetic or math question." instead of "Add two numbers." Let me know how it goes, thanks!
HenryNdubuaku 13 hours ago|||
It does better with clearer tool description, but we are taking note of these complaints for future improvements.
hathym 12 hours ago|||
works better that way, thanks :)
hathym 12 hours ago|||
but still struggle when changing the quesion:

  import needle

  @needle.tool
  def add(a: int, b: int):
      "Calculate the sum of two numbers. Use for any arithmetic or math question."
      return a + b

  agent = needle.Needle(tools=[add])
  print(agent.run("what is 5 + 7?")["reasoning"])

>> No calculator or math tool available. Cannot compute numbers.
HenryNdubuaku 12 hours ago||
Ah, another failure point on our end! So a simple "5 + 7" and "add 5 and 7" works. But to handle ambiguity, the python package ships pipelines to synthesize augmentations and fine-tune on your samples for robustness. Just run "needle playground" and use the UI. Apologies.
HenryNdubuaku 12 hours ago|||
Thanks, we shall improve this for the next release.
redrix 13 hours ago||
This is cool!

While most of the industry focuses on the frontier of “intelligence” (function), a release like this represents the frontier of the other end of the spectrum (form).

Both are important if we ever want to see “Opus-level” capability running locally on commodity machines in the future.

dalemhurley 12 hours ago||
agreed, this is where we have the biggest opportunity for innovation.
HenryNdubuaku 13 hours ago||
thanks!
kooi 7 hours ago||
Its pretty significant you've got this working locally in wasm. Very cool.

Re: robotics: I'm unsure how this could be helpful.

It fails a pretty simple navigation prompt.

X0: (0.0, 0.0). Object bounding box: [1.0, 1.0, 2.0, 2.0]. navigate to (3.0,3.0)

I changed it to "call path planner to navigate: a_star(x0, xf, obs)"

Another fail.

My intuition tells me micro llms will/are important for robotics. I just can't grok it. Can someone without control theory experience give me a good example?

Probably at the planning level of the navigation stack. That's where I see reasoning being helpful. Lower than that...idk

Give me an example of a robotics prompt that seems useful and I'll give you an example why we don't need LLMs to be a tracking controller, etc.

HenryNdubuaku 1 hour ago|
[dead]
r0ze-at-hn 4 hours ago||
Curious, why did you go down to 2bit rather than 4 bits? 4bit with folding the layers should arrive at the same size, but with better quality?
HenryNdubuaku 1 hour ago|
A lot of Needle 1 users deployed on microcontrollers, we couldn't just throw them under the bus only t chase benchmarks, so its a price we are willing to pay :(
tolugenius 14 hours ago||
This is really cool, I'm curious how much knowledge can their be in smaller models? It seems the current trade off is you need sizeably larger models for more performance but I'm curious if in your work how far this is true, as edge ai is really what needs to get better before physical ai can take off (my two cents).
msdz 14 hours ago|
I imagine at such a low parameter count, there would be little to no world knowledge whatsoever, and the entire focus is on getting the structure of tool calling etc. right…?

But yeah, in terms of “physical” AI, robotics definitely comes to mind for me as well, where tool calls/structured “device” use in a “realtime”/edge application are highly beneficial (if you wanted to go with LLMs), but beefy hardware can’t be easily used.

rshemet 8 hours ago||
Roman from Cactus here -

yes you're right, there's only so much a 14MB model can do.

Needle excels at in-conext inference, with tightly defined environments. In our experience:

accurate descriptions + narrow tool scope = success

hgoel 13 hours ago||
Makes me think of the demo from some time ago where someone got a ~29M parameter model running on an esp32. I wonder what kind of throughput this could get if a handful of esp32s were strung together...

Edit: I have a pile of d1 minis, but not much time.

HenryNdubuaku 12 hours ago||
That demo was Needle 1 indeed and we are creating the guide for ESP32 now as we speak.
forsalebypwner 13 hours ago||
They mention that this specific model is able to run on an ESP32-S3, or an ESP32-P4 which has 32MB of PSRAM. I'm trying to figure out how to do this now.
pylotlight 9 hours ago||
What about use case for replacing regex? I.e "random formatted title.extension" - extract the title or some tag or something for more dynamic string manipulation for pulling structured data out of strings efficiently and more simply than regex provides?
mmastrac 11 hours ago||
Congrats on this release. The WASM implementation is really cool. This is a surprisingly good fit for a lot of cases, and I totally want to try turning this into a helper assistant for an application.

Please, though, take a pass at humanizing the text on the page. It's Clauded up all over and makes it hard to read.

dangoodmanUT 10 hours ago||
> turn on the tv

{ "function_calls": [ { "name": "lock_door", "arguments": { "door": "tv" } } ], "confidence": 0.0158 }

Very interesting, seems confidence is 0 when tool calls are right?

pylotlight 9 hours ago|
You may want to reword that.. what do you think 0 confidence means... ?
skavi 12 hours ago|
I wonder if there's any way to get this to plan out a dag of tool calls? i.e. use the results from earlier calls as the parameters to later ones? I tried introducing a stack based system, but gave up pretty quickly.
HenryNdubuaku 12 hours ago|
Yes, though for better results in production, after creating your tool json, use the provided data synthesis and fine-tuning pipeline. It tunes on on your mac.
More comments...