Skip to page content
SAVRN
Search Plan a project

Open-weight model · Text generation

needle3

by Cactus Compute, Inc. Cactus-Compute/needle3

needle3 is an open-weight model for text generation from Cactus Compute, Inc., released under Apache License 2.0. It has 8,192-token context. Its published files total 329.9 MB. It draws 85.4k downloads a month.

A foundation model for mobiles, wearables, robots, smart home, automotive and microcontrollers.

Parameters—
Context8,192
Weights242.0 MB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads85.4k

Model Card

By Cactus Compute, Inc., published under apache-2.0, revision 27c0a9a5b3ca.

A foundation model for mobiles, wearables, robots, smart home, automotive and microcontrollers. The whole model is a single 8-29 MB file, and we trade general chat capacity to beat models 10x its size on mobile tool calls and match 2-3x bigger models on extraction. Needle does three jobs, all of them on the device: Needle 3 is a Laddered Simple Attention Network, our small-model recipe: a Monarch Hadamard MLP in place of the FFN, GQA attention with causal conv taps, engram n-gram memory read by gather, and multi-lane hyper-connections, trained so that every depth from 2 to 20 layers is a deployable model. Most of its parameters sit in the engram, so the 121M model does the arithmetic of a…

Read Cactus Compute, Inc.'s full model card

A foundation model for mobiles, wearables, robots, smart home, automotive and microcontrollers. The whole model is a single 8-29 MB file, and we trade general chat capacity to beat models 10x its size on mobile tool calls and match 2-3x bigger models on extraction.

Needle does three jobs, all of them on the device:

  • Tool calls: given the functions your app exposes, Needle picks the right ones and fills every argument from what the user said. Ask for two things and you get two calls in order; ask for something no tool covers and you get an empty list, not a guess.
  • Structured extraction: declare a shape, hand over messy text, get typed fields back: an invoice, a booking, a notification, a form. The decode grammar guarantees the output parses, and extraction generalises to classification.
  • Text embedding: the same model returns a vector for a sentence, so an app can search, match and route locally.

Model

Needle 3 is a Laddered Simple Attention Network, our small-model recipe: a Monarch Hadamard MLP in place of the FFN, GQA attention with causal conv taps, engram n-gram memory read by gather, and multi-lane hyper-connections, trained so that every depth from 2 to 20 layers is a deployable model. Most of its parameters sit in the engram, so the 121M model does the arithmetic of a 50M one. The weights are compressed to CQ2-bit with Cactus Quants; a byte-level grammar compiled from your schemas constrains every token, and every response carries a calibrated confidence score from a learned head. The architecture diagram is on the release page. The repo holds the 20-layer needle3.cact, the needle3.safetensors checkpoint to fine-tune, and an engine per platform.

Benchmarks

Tool calling is exact-match accuracy on the full test splits, extraction is field micro-F1 on the full test splits.

The interactive frontier plot, the architecture and the fine-tuning results are at cactuscompute.com/needle.

Get started

pip install cactus-needle

Try it in the browser at cactuscompute.com/needle; the Python package and the source are on GitHub.

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?")["results"])
# [{'city': 'Lagos', 'temp_c': 27, 'sky': 'clear'}]

Every turn returns one JSON object with function_calls, the model's reasoning and a calibrated confidence; an off-topic request returns an empty list rather than a guess. The engine and the weights are fetched from this repo once and cached.

Guides

  • How to design tools for Needle 3: one tool per action, names users would say, formats in descriptions, constraints in the grammar, triggers.
  • Leveraging Needle's confidence: what the score measures, what the engine withholds, and routing on act, confirm or refuse.
  • Structured JSON extraction with Needle: the record as the only tool, typed results, classification with enums.
  • Fine-tuning Needle: the data format, the commands, reading the loss, sizing the dataset.
  • Needle Python docs: the API, the response shape, the behaviour contract, system facts, tool retrieval, offline devices, environments, the CLI.
  • What devices are supported on Needle: every platform folder, the CLI runner, the C API, the browser, WASI, air-gapped setup.
  • The .cact format: the file the engine maps and reads in place, Cactus Quants at 2.125 bits per weight, and how to parse it yourself.
  • Porting Needle 3: notes for writing your own runtime, the oracle to test against, the tensor order the container promises, the prompt on the wire, the ladder rule, retrieval with needle_embed.

Customisation

Needle was designed to be customised. Its capacity is a ladder, and a subnetwork as small as 2 layers, fine-tuned on one product's tools, runs optimally on devices far smaller than the full model needs. Fine-tuning on DroidCall lifts every subnetwork by 18 to 36 points, and from 4 layers up the tuned subnetwork passes DeepSeek V4 Flash, starting at 29M parameters.

The Python package fine-tunes with LoRA on the frozen base at the full 20 layers, then needle build [--layers N] merges the adapter, slices any subnetwork from 2 to 20 layers and exports a 4-bit .cact that runs on the same engine. The 2-bit post-training and quantisation behind the shipped model, enriched with Cactus proprietary datasets, run on the Cactus Platform.

Deploy

Every platform folder in this repo holds an engine under 1 MB that loads needle3.cact at start. needle build --platform <folder> [--layers N] fetches the engine and header and puts the weights beside them at any depth, or download the folder here:

./needle --model needle3.cact --tools tools.json --prompt "dim the living room to 30"
./needle --model needle3.cact --tools tools.json --serve

Tool schemas share the model context with the system prompt and conversation. needle_init returns the tokenized static-prefix length on success and fails when that prefix does not fit the model context. In the C API, call needle_last_error() after a negative return to get the measured prefix tokens and context limit. Reduce tool descriptions/schema text, split large catalogues, or declare more than five tools so Needle can keep only retrieved tools in the per-turn prefix. At completion time, max_new_tokens also reserves context room, so larger generation caps leave less space for the current turn and history.

The devices guide covers the runner flags, the C API, the WASI component and air-gapped setup.

Citation

Needle 3 is built by the Cactus Compute team. If you use it in your work, please cite:

@misc{needle3_2026,
  title        = {Needle: Foundation Tool-Calling Model for Tiny Devices},
  author       = {Ndubuaku, Henry and Mosoyan, Karen and Mroz, Jakub and Cylich, Noah and
                  Kumar, Satyajit and Sandhu, Parkirat and Shemet, Roman and Lee, Justin H.},
  year         = {2026},
  organization = {Cactus Compute, Inc.},
  howpublished = {\url{https://github.com/cactus-compute/needle}}
}

Reach out on [email protected] for partnerships, collaborations, synergies and deploying Needle in your product.

Configuration

Architecture
NeedleForToolCalling
Context length (tokens)
8,192
Layers
20
Hidden size
768
Attention heads
12
Key/value heads
2
Vocabulary size
8,192
Sliding window (tokens)
1,024
RoPE base
100000
Model type
needle

Identity and Version

Repository
Cactus-Compute/needle3
Publisher
Cactus Compute, Inc.
Task
Text generation
Modality
Text
Library
cactus-needle
Parameters
Not stated by the source
Languages
on-device
Revision
27c0a9a5b3ca835e0b7dbeaccf555df03dac493d
First published
2026-09-16
Last updated
2026-09-28

Files and Weights

83 files, 329.9 MB in total. The weights are 1 file totalling 242.0 MB in safetensors.

Weights1 file · 242.0 MB
Configuration1 file · 1.3 KB
Tokenizer2 files · 233.4 KB
Documentation2 files · 18.9 KB
Other76 files · 87.6 MB
Repository1 file · 5.5 KB
Every file
FileTypeSizeSHA-256
checkpoints/needle3.safetensorsWeights242.0 MB c234c70dccc7
config.jsonConfiguration1.3 KB —
LICENSEDocumentation11.4 KB —
README.mdDocumentation7.5 KB —
android-arm64/libneedle.aOther1.7 MB b8e739520546
android-arm64/needleOther1.2 MB 894f7859b92e
android-arm64/needle.hOther1.2 KB —
android-armv7/libneedle.aOther1.3 MB 162d98ef1e9d
android-armv7/needleOther703.5 KB eeafc203dfb3
android-armv7/needle.hOther1.2 KB —
android-riscv64/libneedle.aOther3.7 MB 92396186b83e
android-riscv64/needleOther1.0 MB 78acd7a7b34a
android-riscv64/needle.hOther1.2 KB —
assets/banner.svgOther3.1 KB —
assets/benchmarks.svgOther75.5 KB —
assets/deploy.svgOther18.9 KB —
assets/finetune.svgOther14.8 KB —
assets/model.svgOther7.5 KB —
ios-arm64/libneedle.aOther1.1 MB 9cbacdf197c9
ios-arm64/needle.hOther1.2 KB —
ios-sim-arm64/libneedle.aOther1.2 MB 7a6692dc58b9
ios-sim-arm64/needle.hOther1.2 KB —
linux-arm64/libneedle.aOther1.5 MB cc9480168692
linux-arm64/needleOther1.2 MB 89bcfac2e0c3
linux-arm64/needle.hOther1.2 KB —
linux-armv7/libneedle.aOther1.4 MB 35f353468132
linux-armv7/needleOther998.1 KB 01d69ae6dcd1
linux-armv7/needle.hOther1.2 KB —
linux-mipsel/libneedle.aOther1.3 MB e8b21452eb0f
linux-mipsel/needleOther1.5 MB 275515de7bb7
linux-mipsel/needle.hOther1.2 KB —
linux-riscv64/libneedle.aOther1.6 MB fcee5b99bc70
linux-riscv64/needleOther998.3 KB b80680c617dd
linux-riscv64/needle.hOther1.2 KB —
linux-x86_64/libneedle.aOther1.7 MB 35581b09da9b
linux-x86_64/needleOther1.2 MB a5e3baf782b8
linux-x86_64/needle.hOther1.2 KB —
macos-arm64/libneedle.aOther1.2 MB 9e9e0d01dc1a
macos-arm64/needleOther824.8 KB 4091895e4dcc
macos-arm64/needle.hOther1.2 KB —
needle3.cactOther35.3 MB c9d915eca282
python/cactus_needle-3.0.0-py3-none-macosx_11_0_arm64.whlOther376.2 KB f5c05efdd195
python/cactus_needle-3.0.0-py3-none-macosx_11_0_x86_64.whlOther430.8 KB 01c1d8874266
python/cactus_needle-3.0.0-py3-none-manylinux2014_aarch64.whlOther500.9 KB 653f41d440f1
python/cactus_needle-3.0.0-py3-none-manylinux2014_x86_64.whlOther530.1 KB a1eae4b94675
python/cactus_needle-3.0.0-py3-none-musllinux_1_2_aarch64.whlOther500.5 KB 4f826703197c
python/cactus_needle-3.0.0-py3-none-musllinux_1_2_x86_64.whlOther530.9 KB f2b132474722
python/cactus_needle-3.0.0-py3-none-win_amd64.whlOther547.4 KB 06fde9731929
python/cactus_needle-3.0.0-py3-none-win_arm64.whlOther477.8 KB 5b1da5651630
python/cactus_needle-3.0.1-py3-none-macosx_11_0_arm64.whlOther387.2 KB 161c3aacfb6e
python/cactus_needle-3.0.1-py3-none-macosx_11_0_x86_64.whlOther431.6 KB 941883e51fb2
python/cactus_needle-3.0.1-py3-none-manylinux2014_aarch64.whlOther517.7 KB fc0c550b6462
python/cactus_needle-3.0.1-py3-none-manylinux2014_x86_64.whlOther536.9 KB 05770ef9a856
python/cactus_needle-3.0.1-py3-none-musllinux_1_2_aarch64.whlOther517.4 KB ec307274ed14
python/cactus_needle-3.0.1-py3-none-musllinux_1_2_x86_64.whlOther537.9 KB 1b2f5f560fcf
python/cactus_needle-3.0.1-py3-none-win_amd64.whlOther553.6 KB 7d4467726814
python/cactus_needle-3.0.1-py3-none-win_arm64.whlOther493.2 KB dfa6f8c15ca9
python/cactus_needle-3.0.2-py3-none-macosx_11_0_arm64.whlOther387.4 KB aa6e730f3b3b
python/cactus_needle-3.0.2-py3-none-macosx_11_0_x86_64.whlOther431.9 KB cdec5cd39868
python/cactus_needle-3.0.2-py3-none-manylinux2014_aarch64.whlOther518.1 KB d2d6d80d61e4
python/cactus_needle-3.0.2-py3-none-manylinux2014_x86_64.whlOther537.2 KB f2b8fb9ef216
python/cactus_needle-3.0.2-py3-none-musllinux_1_2_aarch64.whlOther517.7 KB 354983a45678
python/cactus_needle-3.0.2-py3-none-musllinux_1_2_x86_64.whlOther538.2 KB d24c5af3c01f
python/cactus_needle-3.0.2-py3-none-win_amd64.whlOther553.7 KB 5468f63b33c1
python/cactus_needle-3.0.2-py3-none-win_arm64.whlOther493.5 KB 0d3896854982
tvos-arm64/libneedle.aOther1.1 MB f15c4920b145
tvos-arm64/needle.hOther1.2 KB —
wasm-component/needle.component.wasmOther4.2 MB 5fc4eb9927c1
wasm-component/needle.witOther526 B —
wasm/needle.hOther1.2 KB —
wasm/needle.jsOther62.5 KB —
wasm/needle.wasmOther688.7 KB 797fcf97d135
watchos-arm64/libneedle.aOther1.1 MB 09be305adadc
watchos-arm64/needle.hOther1.2 KB —
windows-arm64/libneedle.aOther1.7 MB 61f839286908
windows-arm64/needle.exeOther1.1 MB d45bba84c63b
windows-arm64/needle.hOther1.2 KB —
windows-x86_64/libneedle.aOther1.8 MB 2d27ba285400
windows-x86_64/needle.exeOther1.3 MB 1ed90649989e
windows-x86_64/needle.hOther1.2 KB —
.gitattributesRepository5.5 KB —
tokenizer/tokenizer.modelTokenizer126.5 KB 97dfd5666620
tokenizer/tokenizer.vocabTokenizer106.9 KB —

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
242.0 MB
Download from Cactus Compute, Inc.

Released by Cactus Compute, Inc. through its official repository on Hugging Face. Read the license.

Memory Requirements

PrecisionWeights in memory
As published242.0 MB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About needle3

Can I use needle3 commercially?

Yes. needle3 is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

What is needle3's context length?

8,192 tokens, from the maximum position embeddings in its published configuration.

Similar Models

Model · Text generation

opt-125m

AI at Meta

OPT was first introduced in Open Pre-trained Transformer Language Models and first released in metaseq's repository on May 3rd 2022 by Meta AI. Disclaimer: The team releasing OPT wrote an official model card, which is available in Appendix D of the paper. Content from this model card has been written by the Hugging Face team. To quote the first two paragraphs of the official paper OPT was predominantly pretrained with English text, but a small amount of non-English data is still present within the training corpus via CommonCrawl. The model was pretrained using a causal language modeling (CLM) objective. OPT belongs to the same family of decoder-only models like GPT-3. As such, it was…

Open weights other 2,048 tokens transformers

Model · Text generation

Ornith-1.5-9B-GGUF

Ornith

Chirp Chirp! We are introducing Ornith-1.5, a major step toward building foundation models through end-to-end self-improvement. Ornith-1.5 extends Ornith-1.0 (which was developed on top of Qwen3.5 and Gemma4 with additional continued pretraining, mid-training, and post-training) by expanding the self-improvement loop from scaffold and rollout optimization to jointly optimizing task generation, scaffold construction, and solution rollouts. Rather than relying on a fixed set of human-curated tasks and manually designed harnesses, Ornith-1.5 continuously generates new training tasks, discovers effective strategies for solving them, and improves the policy through reinforcement learning. For…

Open weights mit transformers

Model · Text generation

Ornith-1.5-35B-A3B-GGUF

Ornith

Chirp Chirp! We are introducing Ornith-1.5, a major step toward building foundation models through end-to-end self-improvement. Ornith-1.5 extends Ornith-1.0 (which was developed on top of Qwen3.5 and Gemma4 with additional continued pretraining, mid-training, and post-training) by expanding the self-improvement loop from scaffold and rollout optimization to jointly optimizing task generation, scaffold construction, and solution rollouts. Rather than relying on a fixed set of human-curated tasks and manually designed harnesses, Ornith-1.5 continuously generates new training tasks, discovers effective strategies for solving them, and improves the policy through reinforcement learning. For…

Open weights mit transformers

Uncensored Qwen3.8-27B, published as GGUF quantizations with the multi token prediction (MTP) head retained and verified. Refusal behaviour has been substantially reduced, not eliminated. See Measured behaviour for the numbers. Capabilities, training data, and architecture are otherwise unchanged. - Refusal directions removed with Heretic, which co minimizes refusal count against KL divergence from the base model. No handwritten refusal removal code, no finetuning, no additional training data. - Abliteration runs at bf16 (no 4 bit quantization). the resulting LoRA is merged into the bf16 base, so the published weights are not a quantized round trip. - mtp. tensors are copied verbatim from…

Open weights apache-2.0 llama.cpp

Model · Text generation

Ornith-1.0-9B-GGUF

Ornith

Aloha! Today, we are releasing Ornith-1.0, a self-improving family of open-source models for agentic coding. This model card documents Ornith-1.0-9B, the most lightweight member of the Ornith family, designed for efficient single-GPU deployment. Ornith-1.0-9B is a dense ~9B model (≈19 GB in bf16), so it serves comfortably on a single 80GB GPU. The recipes below stand up an OpenAI-compatible server; add --tensor-parallel-size / --tp if you want to shard across more GPUs. For a quick local test (or to script offline generation), load the model directly with Transformers. Make sure you have a recent release installed — see the Transformers installation guide; Ornith-1.0-9B requires…

Open weights mit transformers

Model · Text generation

Ternary-Bonsai-2-27B-gguf

Prism ML

Full 27B-class reasoning in ternary transformer weights, for llama.cpp (CUDA, Metal, CPU) - \~5.9 GB language model (down from \~54 GB FP16) — full 27B-class reasoning on a standard laptop or a single GPU - 98.2% of FP16 intelligence retained: 84.78 average across 14 thinking-mode benchmarks — far above the conventional IQ2XXS build (72.59) at about 82% of its footprint, and within 0.4 points of UD-Q4KXL at three times the footprint - Retains thinking, reasoning, and agentic behavior deep in the sub-4-bit regime, where conventional low-bit representations collapse: math within half a point of full precision (96.57), coding level with the baseline (89.42), agentic tool calling at 74.92…

Open weights apache-2.0 llama.cpp