cactus-compute/needle

14MB foundation model for tiny devices; phones, wearables, smart home, and robots.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 11 minutes ago
Added to GitGenius on August 12th, 2026
Created on February 24th, 2026
Open Issues & Pull Requests: 27 (+0)
GitHub issues: Enabled
Number of forks: 366
Total Stargazers: 5,474 (+30)
Total Subscribers: 34 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 6.6 hours
Mean response time: 7.3 days
90th percentile: 31.8 days
Tracked items: 23

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Only 12% of issues opened in the past year have been closed. Three people close 87% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 17
New in 7 days: 15
Closed in 7 days: 11
Avg open age: 47 days
Stale 30+ days: 9
Stale 90+ days: 0

Recent activity

Opened in 7 days: 15
Closed in 7 days: 11
Comments in 7 days: 9
Events in 7 days: 22

Top labels

No label distribution available yet.

Detailed Description

Needle is a 14MB foundation model for on-device inference on phones, wearables, smart home devices, and robots.

The tool solves the problem of running capable language models on severely resource-constrained devices. Needle 2 is a 45-million-parameter model compressed to 14MB that performs tool calling, device control, and structured data extraction while using only about 28MB of RAM during inference. It uses a Simple Attention Network architecture with a Hadamard MLP, grouped query attention, and engram key-value memory, then applies CQ2-bit quantization. The model constrains token generation with byte-level grammars compiled from tool schemas, ensuring outputs are valid structured data. A learned confidence head provides calibrated confidence scores for each response, and a built-in retrieval mechanism selects the five most relevant tools from a large catalogue per turn. A 256-token sliding window with pinned tool key-value sinks keeps memory bounded regardless of conversation length.

Needle suits developers building applications for mobile and edge devices where model size and memory footprint are hard constraints. It is particularly valuable for scenarios requiring tool calling and structured extraction on devices that cannot run larger models. The project trades performance wins with other small models like FunctionGemma 270M, LFM2.5 230M, and Apple FM while being five to seventy times smaller and using two-bit quantization against their float16. The Python package provides inference, LoRA fine-tuning, and export capabilities; the inference engine is fetched once from Hugging Face and cached with no additional build steps required.

The maintainers respond to issues and pull requests within a day. The project is growing steadily.