Needle: A 26M Parameter Function-Calling Model That Runs at 6000 tok/s on Mobile
Cactus has open-sourced Needle, a 26M parameter function-calling model designed to run on budget phones, watches, and glasses. It achieves 6000 tok/s prefill and 1200 tok/s decode on consumer devices using their custom inference engine, Cactus.
Architecture: Simple Attention Networks
Needle uses a Simple Attention Network — no MLPs anywhere. The entire model consists of attention and gating layers. Key design: d=512, 8H/4KV, BPE=8192, with an encoder-decoder structure (12 encoder layers, 8 decoder layers) using cross-attention, masked self-attention with RoPE, and tied embeddings.
Training Details
- Pretrained on 200B tokens across 16 TPU v6e (27 hours)
- Post-trained on 2B tokens of synthesized function-calling data (45 minutes)
- Data synthesized via Gemini with 15 tool categories (timers, messaging, navigation, smart home, etc.)
Benchmark Results
Needle beats FunctionGemma-270M, Qwen-0.6B, Granite-350M, and LFM2.5-350M on single-shot function calling. However, those models have more scope/capacity and excel in conversational settings.
Quickstart
git clone https://github.com/cactus-compute/needle.git
cd needle && source ./setup
needle playgroundOpens a web UI at http://127.0.0.1:7860 for testing and fine-tuning on your own tools.
Usage (Python)
from needle import SimpleAttentionNetwork, load_checkpoint, generate, get_tokenizer
params, config = load_checkpoint("checkpoints/needle.pkl")
model = SimpleAttentionNetwork(config)
tokenizer = get_tokenizer()
result = generate(
model, params, tokenizer,
query="What's the weather in San Francisco?",
tools='[{"name":"get_weather","parameters":{"location":"string"}}]',
stream=False
)
print(result)
[{"name":"get_weather","arguments":{"location":"San Francisco"}}]
Fine-tuning Locally
# via playground (auto-generates data via Gemini)
needle playground
or provide your own data
needle finetune data.jsonl
Availability
Weights are on Hugging Face: Cactus-Compute/needle. Everything is MIT licensed.
📖 Read the full source: HN AI Agents
👀 See Also

Coordinator Server for Multi-Agent Development Prevents Overwrites
A developer built a Node.js coordinator server that manages line-range locking, line shift tracking, and real-time messaging between AI agents working on the same codebase. The system prevents agents from overwriting each other's work by using HTTP-based locking with conflict detection.

iknowkungfu Skill Analyzes OpenClaw Usage to Recommend Missing Skills
iknowkungfu is a new OpenClaw skill that scans your agent's workspace, memory files, and conversation logs to identify what skills you're missing based on your actual usage patterns. It provides specific recommendations with trust scores and reasons tied to your workflow.

Claude Code Routines: Schedule Agent Tasks Like Cron with Reasoning
Claude Code Routines let you run agent tasks on a schedule without keeping a session open. A Reddit user shares real examples: nightly commit review, weekly dependency check, daily error log analysis — with AI reasoning instead of raw script output.

Clawforce: Open-Source Control Plane for Managing Clawbot Agent Teams
Clawforce is an open-source control plane for managing Clawbot agent teams that allows deployment in a few clicks. It provides configuration of characters, skills, MCP integrations, and tools through a UI, with agents capable of planning, coordinating, and executing tasks collaboratively.