mrkeyoor.com_
Tue 11 Aug 09:01 UTC
AI11 Aug 2026 07:31 UTC7 min read

Needle2: A 14MB Agentic LLM for On-Device AI

Cactus Compute has released Needle2, a 14-megabyte language model designed to run AI agents directly on phones and wearables, bypassing the cloud.

A Tiny AI Brain for Your Pocket

Cactus Compute, a new player in the AI space, has released Needle2, a 14-megabyte large language model designed to run AI agents on edge devices like phones, wearables, and smart home hubs. The announcement, made in a post to Hacker News, details a model that aims to shift complex, multi-step AI tasks from powerful cloud servers directly onto the hardware people use every day.

This matters because most AI assistants today are merely remote controls for a massive AI in the cloud. Asking your phone to perform a complex task—like “text my partner that I’ll be 15 minutes late and start a podcast for the drive”—initiates a round trip to a data center hundreds or thousands of miles away. This process introduces latency, requires a constant internet connection, and involves sending personal data to a third party. Needle2 proposes a fundamentally different architecture: a small, efficient “reasoning engine” that lives on the device, orchestrating local apps and functions to get things done. If successful, this approach could enable more private, responsive, and reliable AI agents that work even when offline.

Under the Hood: Mixture of Experts and Aggressive Quantization

Needle2 achieves its small footprint through a combination of modern model architecture and aggressive optimization. At its core, it is a 3-billion-parameter model, but two key techniques shrink it down to just 14 megabytes.

The first is its Mixture-of-Experts (MoE) architecture. Instead of a single, monolithic neural network where all parameters are engaged for every task, an MoE model is composed of multiple smaller, specialized networks—the “experts.” A lightweight “router” network analyzes an incoming prompt and directs it to the most relevant expert or combination of experts. This is computationally efficient, as only a fraction of the model’s total parameters are used for any given inference, saving power and increasing speed.

The second technique is 2-bit quantization. A model’s parameters, or “weights,” are typically stored as 16-bit or 32-bit floating-point numbers. Quantization is the process of reducing the precision of these numbers. By converting them to 2-bit integers, the memory required to store the model is drastically reduced. While this can sometimes degrade performance or introduce instability, advances in quantization-aware training methods have made it a viable strategy for creating highly compact models. The result for Needle2 is a file size small enough to be bundled inside a mobile app without significantly bloating its size.

According to Cactus Compute, the model is specifically trained for three core capabilities essential for an agentic system: tool use, structured JSON output, and multi-turn conversation. The ability to use tools is paramount; it allows the model to call upon other software functions. Reliable JSON output is necessary for communicating with those tools in a structured, machine-readable way. Finally, multi-turn conversation allows the agent to handle follow-up questions and clarifications, making complex tasks possible.

The On-Device Agentic Loop

The true purpose of Needle2 is not to be a standalone chatbot, but to serve as the central controller in an agentic framework. An AI agent is a system that can perceive its environment, make decisions, and take actions to achieve a goal. Needle2 is designed to be the decision-making component.

Consider a practical example on a smartphone: a user says, “Remind me to pick up laundry when I leave work.” A cloud-based assistant would send this audio to a server, where a large model would parse the intent, figure out what APIs to call (calendar for work location, maps for geofencing, reminders for the alert), and send commands back to the phone.

An agent powered by Needle2 would handle this locally. The request is fed to the on-device model, which acts as a router. It determines the task requires three tools: one to identify the user's work location, one to set a geofence around it, and a third to create a reminder that triggers upon exiting that geofence. Needle2 would format its decisions as JSON commands, call the appropriate local APIs or functions, and orchestrate their interaction until the task is complete. The entire reasoning loop happens on the device, without data leaving the user's control.

Cactus Compute provides a Python library to demonstrate this process. Developers can load the model from Hugging Face and define a set of tools for it to use.

from needle import Needle

# Load the model from Hugging Face
model = Needle.from_pretrained("cactus-compute/needle-2-3b")

# Define a set of tools (functions) the model can call
tools = [
    {
        "type": "function",
        "function": {
            "name": "get_weather",
            "description": "Get the current weather for a location",
            "parameters": {
                "type": "object",
                "properties": {
                    "location": {"type": "string"}
                }
            }
        }
    }
]

# Run a prompt
response = model.chat(
    messages=[
        {"role": "user", "content": "What's the weather in San Francisco?"}
    ],
    tools=tools
)

# The response will indicate a call to the 'get_weather' tool
print(response.choices[0].message.tool_calls)

This example shows how the model, given a natural language prompt, correctly identifies the need to call the get_weather function and structures the request accordingly. This is the fundamental building block for creating complex on-device agents.

Performance Claims and Community Questions

Any small model faces skepticism about its performance. Cactus Compute makes a bold claim on its project page, stating that Needle2 achieves “performance comparable to much larger models like Gemma 7B and Mistral 7B on tool use benchmarks, despite being over 1000x smaller” when considering the full unquantized model sizes. This claim is specific to tool-use capabilities, not general knowledge or reasoning.

The announcement on Hacker News sparked immediate discussion among developers, who raised critical questions. The primary concerns revolved around the model's training data, its true performance on resource-constrained hardware like a Raspberry Pi or a typical smartphone, and the potential pitfalls of heavy 2-bit quantization. While quantization drastically reduces size, it can sometimes lead to less reliable or predictable behavior, a significant concern for an agent tasked with performing actions on a user's behalf.

It is crucial to frame Needle2 correctly. It is not a general-purpose conversationalist like ChatGPT. Its expertise is narrow and technical: translating natural language into structured commands for other software to execute. Its performance should be judged on its accuracy and reliability as a task orchestrator, not on its ability to write poetry or explain quantum physics.

A Growing Trend Toward Edge AI

Needle2 does not exist in a vacuum. It is part of a significant industry-wide shift toward small, efficient models capable of running on edge devices. Google has been developing Gemini Nano for on-device tasks in its Android ecosystem. Microsoft has seen success with its Phi-3 family of small language models, designed to offer powerful capabilities in a compact package. Apple has also centered its latest AI strategy around on-device intelligence, processing personal requests locally for privacy and speed.

Where Needle2 aims to differentiate itself is in its explicit focus on the agentic framework. While other small models are often positioned as tools for on-device summarization, translation, or simple Q&A, Needle2 is purpose-built to be the brain of an action-oriented system. It’s a bet that the next frontier for AI is not just understanding and responding, but autonomously taking action within a defined set of capabilities.

This trend is driven by clear market demands. Users are increasingly concerned about data privacy. On-device processing offers a straightforward solution. Low latency creates a more seamless and responsive user experience. And for the growing Internet of Things (IoT) market, the ability to function without a stable internet connection is a necessity.

What to Watch Next

The release of Needle2 is a compelling first step, but its long-term impact is yet to be determined. The immediate future will be defined by how the developer community responds. The first test will be independent validation of its performance. Third-party benchmarks and real-world case studies are needed to verify if a 14-megabyte model can truly match the tool-use capabilities of much larger, established models.

Success will also depend on adoption. The model and its framework must be robust and easy enough for developers to integrate into their applications. We will need to see if open-source projects or commercial products begin to emerge that use Needle2 as their agentic core for wearables, smart home devices, or mobile apps.

The trajectory of Needle2 and similar projects will show whether specialized, highly efficient models can carve out a meaningful niche against the on-device platforms being built by major operating system vendors. The challenge is immense, but the goal is clear: to build AI agents that are not just powerful, but also private, personal, and universally accessible, running on the billions of devices already in our hands.

We reviewed this

  1. agents — our honest review
  2. agents — our honest review
  3. servers — our honest review

Sources

  1. Show HN: Needle2: 14MB agentic LLM for phones, wearables, smart home and robots