mrkeyoor.com_
Fri 25 Sept 15:57 UTC
AI Toolsevaluationupdated 26 Aug 2026

needle review

Needle is a small local model and Python package for choosing tools, filling structured arguments, and extracting typed data. It targets phones, wearables, home devices, and robots that cannot justify a general-purpose language model for every command.

+940stars / 7d
Verdict

Our Needle run installed 66 packages and built successfully, but 1 of 40 tests failed because the schema test could not import pydantic. Try it when 45M parameters, offline inference, and schema-bound tool calls solve a real device limit, then test every tool and the exported .cact on target hardware. Skip it when you need a settled mobile SDK or cannot maintain an evaluation set for quantized fine-tunes.

We ran it

Lab card: what happened when we ran needleScreenshot of needle (cactuscompute.com)
Install✓ · 39s66 packages · 683 MB
Build✓ · 9s
Tests✗ · 55s39 passed · 1 failed · 5 skipped of 40 (pytest)
Known vulns0(pip-audit)
Repo44 files~4,751 lines of source · 1.4 MB · 1 CI workflows · tests dir

Answers from our run

Does needle build from source?

Dependencies installed in 39 seconds (66 packages), and the build succeeded in 9 seconds. We cloned commit 571fcd6 into a clean Debian container with 3 CPUs and no project-specific setup.

Do needle's tests pass?

Not all of them: 39 of 40 passed and 1 failed when we ran the project's own test command (pytest). Some failures need services or credentials a bare container does not have.

Does needle have known vulnerabilities in its dependencies?

pip-audit found none in the dependency tree at the time of our run.

Who should not use needle?

Teams that need a turnkey Swift SDK today: open issue #92 asks for one, while the README documents the Python package and downloadable engine targets.

What are the alternatives to needle?

llama.cpp, Ollama, Outlines. Our Needle run installed 66 packages and built successfully, but 1 of 40 tests failed because the schema test could not import pydantic.

Setup3/539-second install; one declared schema test lacked pydantic
Docs4/5Quick start, API, offline setup, and fine-tuning are explained
Community4/59,304 stars and fresh issue activity after an August push
Maturity3/5Useful package, but export and platform reports need checking

Discussed on

  1. hnShow HN: Needle: We Distilled Gemini Tool Calling into a 26M Model776 points
  2. hnShow HN: Needle2: 14MB agentic LLM for phones, wearables, smart home and robots537 points
  3. hnShow HN: Cactus Needle 3: 8-29MB automation models can match DeepSeek V4 Flash236 points

Who it’s for

Developers building local tool calling into memory-constrained devices.
Python teams that want schema-constrained JSON and confidence scores before executing a function.
Researchers willing to fine-tune a 45M-parameter model and verify the exported quantized result.

Who it’s NOT for

Teams that need a turnkey Swift SDK today: open issue #92 asks for one, while the README documents the Python package and downloadable engine targets.
Developers who expect fine-tuned behavior to survive quantization without their own evaluation: issue #91 reports opposite decision errors in 2-bit and 4-bit exports from the same working float adapter.
Projects that need broad conversational memory: the README specifies a 256-token sliding window, with tool definitions pinned separately.
Anyone treating model confidence as permission to run dangerous actions: the score is a model output, so destructive tools still need application-level checks and approval.

Setup reality

Our sandbox install succeeded in 39 seconds, adding 66 packages and using 683 MB. The build passed in 9 seconds. Tests failed after 55 seconds: 39 passed, 1 failed, and 5 were skipped out of 40; the failing schema test could not import pydantic.

Basic inference fetches the engine from Hugging Face once and then runs offline. Data generation needs an OPENROUTER_API_KEY, unless you point OPENROUTER_URL at a compatible gateway. Fine-tuning also downloads the base checkpoint when none is supplied.

The package is Python-first, while training uses JAX and accelerator-specific extras for NVIDIA or Apple Silicon. A tuned adapter must be merged and quantized into a .cact file, and issue #91 is a concrete reason to compare that export against the float model before shipping it.

A 45M-parameter model handles narrow tool decisions locally

Needle is built for a smaller job than a general assistant. You provide Python functions or JSON schemas, and the model chooses a tool and fills its arguments under a byte-level grammar. It can also extract a Pydantic object from text. The model has 45 million parameters, while the published engine is described as a single 14 MB binary using about 28 MB of memory. Those are project claims, not figures from our lab run, but they explain the appeal: a device can route a command without sending it to a cloud model.

The Python API has two useful levels. run() executes decorated functions and feeds results back into the session. complete() leaves execution to the caller, which is the safer fit when tools can spend money, unlock hardware, or alter data. Every response includes a confidence value, and a threshold can send uncertain work elsewhere. That is a routing signal, not a safety boundary. The application still has to validate arguments, restrict permissions, log actions, and ask for approval where a mistaken call would hurt.

The 256-token window favors commands over conversation

The README specifies a 256-token sliding window and keeps tool information in pinned key-value slots. A retrieval head selects the top 5 tools for each turn when the catalog is large. This makes sense for commands such as setting a light or extracting invoice fields. It is a poor match for a long support chat whose answer depends on details mentioned many turns earlier. You can retain state outside the model, but then your own code decides what comes back into that small window.

Schemas do real work here. Needle compiles argument types, required fields, choices, and value constraints into its decoding grammar instead of asking the model to imitate JSON. That reduces malformed output, though it cannot prove that a valid city, amount, or device name matches the user's intent. Tool descriptions matter because the model reads them to select a function. Teams adopting Needle should treat those descriptions and schemas as application code, with review and regression cases, rather than loose prompt copy.

What happened when we ran it

Our sandbox installed commit 571fcd6 in 39 seconds. It pulled 66 packages and occupied 683 MB on disk, far more than the 14 MB inference binary discussed in the README because our measurement covers the Python environment. The build completed successfully in 9 seconds. Pip-audit reported 0 known vulnerabilities in the installed packages. The repository itself had 44 files, about 4,751 lines of source, and a 1.4 MB checkout.

Tests ended with exit code 1 after 55 seconds. Pytest reported 39 passed, 1 failed, and 5 skipped out of 40. test_pydantic_model_schema failed at its first line because Python could not import pydantic. The log does not say why that package was absent, so we cannot claim a packaging cause. It does show that the documented typed-extraction path was not fully covered by a passing suite in our fresh Python 3.12 Debian container.

The repository had 1 CI workflow and a tests directory, but no Dockerfile. That is reasonable for a package whose runtime engine is downloaded per platform, yet it leaves container packaging to the adopter. An air-gapped deployment needs the engine archive staged in advance, using the offline steps linked from the README. Data synthesis is a different path: it calls OpenRouter by default and therefore needs a key or a compatible gateway URL.

Quantized fine-tunes need an export-level evaluation

Fine-tuning uses LoRA against the frozen base checkpoint. The documented flow creates or supplies JSONL examples, trains an adapter, then merges and quantizes it into a .cact file. JAX can use NVIDIA or Apple Silicon acceleration through separate extras. The default export follows the checkpoint's bit map, with a 4-bit fallback, while --bits 2 requests a smaller result. The engine can load the tuned file without recompilation.

Open issue #91 gives a specific reason not to stop at validation loss. Its reporter says one adapter behaved correctly through the float JAX path, called almost nothing after a 2-bit export, and fired too often after a 4-bit export. Those figures belong to that reporter's evaluation, not ours, and the issue remains a report rather than a universal result. Still, the operational lesson is sound: run the same held-out commands through the merged float model and the exact file that will ship.

Python is ready first, while mobile integration is uneven

The README's clearest route is pip install cactus-needle, followed by a first engine download from Hugging Face. Once cached, inference needs no network. The playground starts a local web interface, loads the model before serving, and can hand back a fine-tuned archive. Developers can also download named platform runners and use the weights-agnostic engine. This covers experimentation and Python applications without much ceremony.

Native product integration needs more homework. Issue #92 asks for a Swift SDK, and issue #90 describes trouble using the distributed C header and static library because the caller could not interpret needle_init return codes or find the implementation source. Those reports do not prove every native path is broken. They do show that the Python examples are better documented than direct iOS or C++ embedding. If the product requirement begins with Swift, validate that interface before building the model workflow around it.

Fresh development does not settle the deployment risks

GitHub showed 9,304 stars, an Apache-2.0 license, and 27 open issues and pull requests. The last push was August 24, 2026, two days before this review, so the project is active. GitHub returned no latest release record through its releases API. That means adopters should pin a package version, engine file, and commit rather than infer a stable release cadence from repository activity alone.

Needle earns a trial when a narrow local model removes a cloud dependency or makes an embedded feature possible. The 39-second install and 9-second build lower the cost of testing it. The failed Pydantic test, short context window, native-interface questions, and quantized fine-tune report set the acceptance work: validate typed extraction, measure decisions on your tools, test the exported file, and run it on the actual device before granting it any authority.

Alternatives

ProjectWhat it isPick it when
llama.cpp gh↗A native inference runtime for many quantized language models and hardware targets.pick this instead when model choice, platform support, and a mature native runtime matter more than Needle's tiny tool-calling model.
Ollama gh↗A local model runner with a simple service API and a broad model catalog.pick this instead when you can spend more memory and want general chat or model swapping on desktops and servers.
OutlinesA Python library for constraining larger model output to schemas and grammars.pick this instead when structured generation matters but the underlying model and serving stack should remain your choice.

What people are saying

  1. [github-trending] cactus-compute/needle

Sources

  1. Needle README
  2. Needle repository
  3. Issue #91: quantized fine-tune behavior
  4. Issue #92: Swift SDK request
  5. Issue #90: native library initialization

More ai tools reviews

nobodywho · desktop-cc-gui · langextract · openrig · skills · awesome-grokbot · the whole board →