Mindket

Needle 2

Newversion 1 · updated

Overview

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 . Download it on this page, a zip of its files. Nothing in it runs by itself.

At a glance

You need
  • 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
Runs in
  • 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
Start with
pip install cactus-needle

Platform

WindowsOperating system
macOSOperating system
LinuxOperating system

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.

IndustryWho uses itHow they use itExample
Mobile appsApp developersRun tool calling on the phone itselfLet a user say what they want and call the matching function
Embedded devicesHardware makersPut a function-calling model on a small boardControl a device from a spoken or typed request
Smart homeHome automation developersTurn requests into structured commandsMap a sentence to a thermostat setting
AgentsAgent buildersRoute among a large tool catalog cheaplyDeclare 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 caseWhoWhat they get back
Tool callingDevelopersA structured call with typed arguments
Structured extractionData teamsJSON that follows your schema
Device controlHardware makersActions 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.
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.

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.

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.

  1. Declare tools as Python functions
  2. Needle reads the request and your descriptions
  3. Grammar constrains the call to your schema
  4. 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 and files

README

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.

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.
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.

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.

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.

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

Get the model

Download its files with Hugging Face's command line:

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.

Files
README.md  6 KB

1 file, 6 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Compare with similar

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

ProductDownloads, last 30 daysLikesParametersLicenseLast change
Needle 2 This page1,736341—apache-2.0
Needle 3Shares needle · webassembly · function-calling147,784411—apache-2.0
WhistleShares webassembly · edge · quantization94,489570—apache-2.0
BotPsy-0.8B-GGUFsShares function-calling · edge · tool-calling82717752Mapache-2.0
BotPsy-0.8BShares function-calling · edge · tool-calling21514853Mapache-2.0
MNN-Pocket-0.3BShares edge · on-device · text-generation3,397197362Mapache-2.0
Numbers as Mindket last read them, on 2026-11-12.

Reviews

No ratings yet

Write a review

No reviews yet.

What people say

Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.

Searched

More from Mindket

See all from Mindket

Bonsai-27B-GGUF

lmstudio-community · Kit

A GGUF conversion of the 27B Bonsai model for LM Studio, with a 3.80 GB Q1_0 language file and a 0.93 GB BF16 vision projector. Tested for text, vision and par…

New

Runs DeepSeek-V4.1-Flash-1017 as a 2.9 bits-per-weight EXL3 quantization, a 196 GiB copy for people serving large models on their own hardware. Perplexity stay…

New

MusicGen Small

facebook · Kit

Generates short music clips from a text description or an audio prompt, in the small checkpoint of facebook's MusicGen. It suits developers and music hobbyists…

New

Similar in Developer

See all in Developer

Lexnet

alpindale · Kit

Tags every character of C source code for syntax highlighting with a tiny neural network of about 984 weights, run through a small C program. For developers an…

New

FLUX.2 Klein LoRA Studio

prithivMLmods · Kit

Try a set of LoRAs for the FLUX.2 Klein image model in a Gradio app that runs in your browser or on your own computer. Made for people who make or test AI imag…

New

anaksor-ocr

Sokheng · Kit

Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…

New