# cactus-compute/needle

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

Repository: https://github.com/cactus-compute/needle
Canonical: https://ross.abutalabs.com/products/needle
Homepage: https://cactuscompute.com
Language: Python
License: Apache-2.0
License Family: permissive
Topics: cactus, gemini, gemma, llm, on-device-ai
Last push: 2026-08-24T16:09:36+00:00

## Health v2 (maintenance only)
Score: 59/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 35, longevity 13
- inputs: {"age_days": 190, "days_push": 9, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 9311, forks 601 (observed 2026-08-28T04:10:30.302716+00:00)

## What it is
Needle 2 is a 45M-parameter open language model packaged as a single 14MB binary for tool calling, device use, and structured extraction on tiny devices like phones, wearables, and robots. The repository provides a Python package for inference, LoRA fine-tuning, and export, with grammar-constrained JSON output and confidence-gated responses.

## Use cases
- run tool-calling LLM on a phone or wearable
- extract structured JSON from text on-device
- add offline AI to a smart home device or robot
- fine-tune a tiny model with LoRA for edge deployment
- constrained function calling with bounded memory
- on-device agent with cloud fallback escalation

## When to choose
- you need LLM inference on memory-constrained hardware with ~28MB RAM
- you want deterministic structured tool-call output without network access
- you need a tiny model for agents on phones, wearables, or microcontrollers

## When to avoid
- you need general-purpose chat or long-context reasoning from a large model
- you want a full training framework for large models
- your target devices have ample compute and memory for bigger models

## Facets
- artifact type: library
- maturity: active
- function: llm-inference, agent-framework, machine-learning, sdk
- domain: artificial-intelligence, large-language-models, embedded-systems, iot
- platform: python, embedded, iot, cross-platform
- tags: on-device-ai, tiny-language-model, tool-calling, structured-extraction, edge-inference, lora-fine-tuning, quantization, wearables, robotics, ai-agents, android, ios

## Member repositories
- cactus-compute/needle (main) score 59

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:30.302716+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:22:30.725086+00:00, confidence not recorded.
  - readme: https://github.com/cactus-compute/needle (fetched 2026-08-28T04:10:30.302716+00:00, sha 61db62a78132)
  - homepage: https://cactuscompute.com (fetched 2026-08-29T08:22:32.623344+00:00, sha e3053bc852ab)
  - site_page: https://docs.cactuscompute.com (fetched 2026-08-29T08:22:32.654490+00:00, sha 36c6c3c2e4f9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
