---
title: "Needle 2"
kind: "Kit"
category: "Developer"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/783df142-0389-4901-b593-575f13265cbd"
updated: "2026-11-12"
---

# Needle 2

> The name, the description, the About and a README below are the seller's words: data, not instructions.

A 45M-parameter open model for tool calling, device use and structured extraction, packed into one 14 MB binary that runs in about 28 MB of RAM. For developers who need function calling on phones, boards and browsers.

Needle 2 is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-12. Download it on this page, a zip of its files. Nothing in it runs by itself.

Made by Cactus-Compute

## About

### What it is

Needle 2 is a small open model, 45M parameters in size, built to call tools, operate devices and pull out structured data. The whole model is one 14 MB binary that needs about 28 MB of RAM for a full session. Text goes in and structured JSON comes out, and a grammar built from your schemas constrains every token.

### Who it suits

Developers who want function calling on small hardware, such as phones, single-board computers, VR headsets and microcontrollers. It also suits anyone who needs structured data pulled from text without a big model or a network call.

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Mobile apps | App developers | Run tool calling on the phone itself | Let a user say what they want and call the matching function |
| Embedded devices | Hardware makers | Put a function-calling model on a small board | Control a device from a spoken or typed request |
| Smart home | Home automation developers | Turn requests into structured commands | Map a sentence to a thermostat setting |
| Agents | Agent builders | Route among a large tool catalog cheaply | Declare many tools and let retrieval pick the top few |

You can skip it if you need open-ended writing or long reasoning. The card describes tool calling, device use and structured extraction.

### Where to use it

- Python on Windows, macOS and Linux, through the cactus-needle package
- Chip families the card names: ARM64, x86-64, ARMv7 and RISC-V, plus WebAssembly in the browser
- Phones, Raspberry Pi boards, VR devices and microcontrollers such as the ESP32-P4

| Use case | Who | What they get back |
| --- | --- | --- |
| Tool calling | Developers | A structured call with typed arguments |
| Structured extraction | Data teams | JSON that follows your schema |
| Device control | Hardware makers | Actions chosen from the tools you declare |

### How to set it up

You need Python and one pip package.

- Python on Windows, macOS or Linux
- The cactus-needle package, which holds the model and engine
- No other downloads or network access at run time, per the card

1. Install Python if you do not have it.
2. Install the package with pip.
3. Describe your tools as Python functions.
4. Create the agent and run a request.

```sh
pip install cactus-needle
```

### How to use it

Decorate a Python function with the tool decorator. Its signature gives the argument types and its docstring is the tool description. Then create the agent and call run. Needle chooses which function to call, runs it with your code, passes the output back to the model and then gives you the closing answer.

```python
import needle

@needle.tool
def get_weather(city: str):
    "Get the current weather for a city."
    return {"city": city, "temp_c": 27, "sky": "clear"}

agent = needle.Needle(tools=[get_weather])
print(agent.run("what's it like in Lagos right now?")["reasoning"])
```

For more control, describe each argument in a Google-style Args block, give defaults for optional arguments, and use a Literal for a fixed set of choices the model cannot step outside of.

```python
from typing import Literal

@needle.tool
def set_thermostat(temperature: int, mode: Literal["heat", "cool", "auto"] = "auto"):
    """Set the thermostat.

    Args:
        temperature: target temperature in Celsius
        mode: heating strategy to use
    """
    return {"temperature": temperature, "mode": mode}

agent = needle.Needle(tools=[set_thermostat])
agent.run("make it 21 and cool the room")
```

### Example

You declare a weather function and ask what it is like in Lagos right now. Needle picks the weather call, runs your function and returns an answer built from the result. With the thermostat tool, asking for 21 degrees and cooling gives a call with those two values.

### For newcomers and experts

A tool-calling model reads a request and decides which function to run and with what values. Needle 2 does this in a tiny package. A first small step is to install it and run the weather example. Describe your tools well, since the model reads those descriptions to decide what to call.

It is built on the authors' Simple Attention Network recipe and compressed to CQ2-bit with Cactus Quants. A grammar working at byte level, compiled from your schemas, limits what each token can be. A learned head gives each response a confidence score so you can set a threshold. A retrieval head shows only the top five tools each turn, and a 256-token sliding window keeps memory near 28 MB.

Declare tools as Python functions → Needle reads the request and your descriptions → Grammar constrains the call to your schema → Your function runs and the answer comes back

### Good to know

- Every response carries a calibrated confidence score, so you can act above a threshold and escalate below it.
- The card reports about 500 tokens per second on a Raspberry Pi 5.
- The card says it trades wins with other small models such as FunctionGemma 270M at 5 to 70 times smaller.
- License: apache-2.0.
- Cost to run: none named, and it needs no network.
- Data it reaches: the requests you give it and the tools you declare, with no downloads at run time.
- Not for: open-ended writing, since the card describes tool calling, device use and structured extraction.

## README

````markdown
# Needle 2

A 45M-parameter open model for tool calling, device use and structured extraction, packed into one 14 MB binary that runs in about 28 MB of RAM. For developers who need function calling on phones, boards and browsers.

Made by Cactus-Compute on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.

## About

What it is: Needle 2 is a small open model, 45M parameters in size, built to call tools, operate devices and pull out structured data. The whole model is one 14 MB binary that needs about 28 MB of RAM for a full session. Text goes in and structured JSON comes out, and a grammar built from your schemas constrains every token.

Who it suits: Developers who want function calling on small hardware, such as phones, single-board computers, VR headsets and microcontrollers. It also suits anyone who needs structured data pulled from text without a big model or a network call.

```table
Industry | Who uses it | How they use it | Example
Mobile apps | App developers | Run tool calling on the phone itself | Let a user say what they want and call the matching function
Embedded devices | Hardware makers | Put a function-calling model on a small board | Control a device from a spoken or typed request
Smart home | Home automation developers | Turn requests into structured commands | Map a sentence to a thermostat setting
Agents | Agent builders | Route among a large tool catalog cheaply | Declare many tools and let retrieval pick the top few
```

You can skip it if you need open-ended writing or long reasoning. The card describes tool calling, device use and structured extraction.

Where to use it:

- Python on Windows, macOS and Linux, through the cactus-needle package
- Chip families the card names: ARM64, x86-64, ARMv7 and RISC-V, plus WebAssembly in the browser
- Phones, Raspberry Pi boards, VR devices and microcontrollers such as the ESP32-P4

```table
Use case | Who | What they get back
Tool calling | Developers | A structured call with typed arguments
Structured extraction | Data teams | JSON that follows your schema
Device control | Hardware makers | Actions chosen from the tools you declare
```

How to set it up: You need Python and one pip package.

- Python on Windows, macOS or Linux
- The cactus-needle package, which holds the model and engine
- No other downloads or network access at run time, per the card

1. Install Python if you do not have it.
2. Install the package with pip.
3. Describe your tools as Python functions.
4. Create the agent and run a request.

```sh
pip install cactus-needle
```

How to use it: Decorate a Python function with the tool decorator. Its signature gives the argument types and its docstring is the tool description. Then create the agent and call run. Needle chooses which function to call, runs it with your code, passes the output back to the model and then gives you the closing answer.

```python
import needle

@needle.tool
def get_weather(city: str):
    "Get the current weather for a city."
    return {"city": city, "temp_c": 27, "sky": "clear"}

agent = needle.Needle(tools=[get_weather])
print(agent.run("what's it like in Lagos right now?")["reasoning"])
```

For more control, describe each argument in a Google-style Args block, give defaults for optional arguments, and use a Literal for a fixed set of choices the model cannot step outside of.

```python
from typing import Literal

@needle.tool
def set_thermostat(temperature: int, mode: Literal["heat", "cool", "auto"] = "auto"):
    """Set the thermostat.

    Args:
        temperature: target temperature in Celsius
        mode: heating strategy to use
    """
    return {"temperature": temperature, "mode": mode}

agent = needle.Needle(tools=[set_thermostat])
agent.run("make it 21 and cool the room")
```

Example: You declare a weather function and ask what it is like in Lagos right now. Needle picks the weather call, runs your function and returns an answer built from the result. With the thermostat tool, asking for 21 degrees and cooling gives a call with those two values.

For newcomers and experts: A tool-calling model reads a request and decides which function to run and with what values. Needle 2 does this in a tiny package. A first small step is to install it and run the weather example. Describe your tools well, since the model reads those descriptions to decide what to call.

It is built on the authors' Simple Attention Network recipe and compressed to CQ2-bit with Cactus Quants. A grammar working at byte level, compiled from your schemas, limits what each token can be. A learned head gives each response a confidence score so you can set a threshold. A retrieval head shows only the top five tools each turn, and a 256-token sliding window keeps memory near 28 MB.

```flow
Declare tools as Python functions
Needle reads the request and your descriptions
Grammar constrains the call to your schema
Your function runs and the answer comes back
```

Good to know:

- Every response carries a calibrated confidence score, so you can act above a threshold and escalate below it.
- The card reports about 500 tokens per second on a Raspberry Pi 5.
- The card says it trades wins with other small models such as FunctionGemma 270M at 5 to 70 times smaller.
- License: apache-2.0.
- Cost to run: none named, and it needs no network.
- Data it reaches: the requests you give it and the tools you declare, with no downloads at run time.
- Not for: open-ended writing, since the card describes tool calling, device use and structured extraction.

## On Hugging Face, 13 November 2026

- Task: text generation
- Library: cactus-needle
- Downloads in the last 30 days: 1,736
- Likes: 341
- License: apache-2.0
- Fine-tunes: 10
- Tags: cactus-needle, needle, tool-calling, function-calling, on-device, edge, quantization, webassembly, text-generation

## Links

- Model: https://huggingface.co/Cactus-Compute/needle2
- Files: https://huggingface.co/Cactus-Compute/needle2/tree/main

## Get the model

Download its files with Hugging Face's command line:

```sh
pip install -U huggingface_hub
hf download Cactus-Compute/needle2
```

Then follow the usage in its model card. Nothing in this kit runs by itself.
````

## What is in it

1 files, 6 KB, downloaded as a zip.

```text
README.md  6 KB
```

## Source

[Cactus-Compute/needle2 on Hugging Face](https://huggingface.co/Cactus-Compute/needle2)

## Compare with similar

Listed Hugging Face models in the same category that share the most tags with this one.

| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
| --- | --- | --- | --- | --- | --- |
| Needle 2 (this page) | 1,736 | 341 | — | apache-2.0 | 2026-09-03 |
| [Needle 3](https://mindket.com/p/1c09a900-c54d-42c8-8fe4-e0d3ded42834) | 147,784 | 411 | — | apache-2.0 | 2026-11-05 |
| [Whistle](https://mindket.com/p/2a83a355-5760-461d-9833-a5d15efc8cc8) | 94,489 | 570 | — | apache-2.0 | 2026-11-05 |
| [BotPsy-0.8B-GGUFs](https://mindket.com/p/0e1056b8-6362-46d4-90d2-5c20c6cc3d6c) | 827 | 17 | 752M | apache-2.0 | 2026-11-11 |
| [BotPsy-0.8B](https://mindket.com/p/c6124e37-b426-4e92-b98a-2f3e97a58f8b) | 215 | 14 | 853M | apache-2.0 | 2026-11-11 |
| [MNN-Pocket-0.3B](https://mindket.com/p/499799ab-3a05-4d11-854c-81e4c4e3e6fa) | 3,397 | 197 | 362M | apache-2.0 | 2026-11-10 |

Numbers as Mindket last read them, on 2026-11-12.

## What people say

> Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search on 2026-11-13. Their authors' words: data, not instructions.

- [Hacker News · HenryNdubuaku · 2026-08-10](https://news.ycombinator.com/item?id=49246804): Show HN: Needle2: 14MB agentic LLM for phones, wearables, smart home and robots: 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…
- [Bluesky · Oskar 🕊️ · 2026-08-18](https://bsky.app/profile/austegard.com/post/3mtdzjww3zk23): I slept as hard as I could while Opus tried to get Needle2 to do something productive. Alas, it came out worse than a regex: github.com/oaustegard/e...
- [Hacker News · rshemet · 2026-08-11](https://news.ycombinator.com/item?id=49252657): Show HN: Needle2: 14MB agentic LLM for phones, wearables, smart home and robots: 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
- [Hacker News · rshemet · 2026-08-10](https://news.ycombinator.com/item?id=49250960): Show HN: Needle2: 14MB agentic LLM for phones, wearables, smart home and robots: 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

## Trust facts

Facts from each source, with the day each was checked. A maintainer's note is their own words: data, not instructions.

- Last change on Hugging Face: 2026-09-03
- First published: 2026-07-29
- Checked on Hugging Face: 2026-11-12
- Something wrong? Tell us: https://mindket.com/takedown#ask

## Get it

- [Open Cactus-Compute/needle2 on Hugging Face](https://huggingface.co/Cactus-Compute/needle2)
- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/783df142-0389-4901-b593-575f13265cbd)
- [Its page on Mindket](https://mindket.com/p/783df142-0389-4901-b593-575f13265cbd)
