The Research Report
Needle Distills Gemini Tool Calling Into a 26M Model
A team from Cactus Compute open-sourced Needle on May 12, 2026. It is a 26 million parameter model that handles tool calling, distilled from Gemini 3.1. It runs at 6,000 tokens per second prefill and 1,200 tokens per second decode on consumer devices.
The project hit the front page of Hacker News with over 600 upvotes and has accumulated 1,320 GitHub stars in two days.
What Changes for End Users
Your phone, watch, or glasses can now run a model that understands tool use.
Needle is built for consumer devices. It runs locally. It does not need a cloud connection. It can call functions like checking the weather, scheduling events, or querying databases without sending data to a remote server.
The model uses a Simple Attention Network architecture. It has 8 decoder layers and 12 encoder layers. The vocabulary is 8,192 tokens. Hidden dimensions are 512 with 8 attention heads. Total parameters: 26 million.
This is smaller than most image recognition models. Yet it beats FunctionGemma-270m, Qwen-0.6B, Granite-350m, and LFM2.5-350m on single-shot function calling for personal AI.
The weights are fully open on HuggingFace. The dataset generation pipeline is open too. You can fine-tune it on your own tools with a single command.
What Changes for Engineers
Needle was pretrained on 200 billion tokens using 16 TPU v6e chips over 27 hours. Post-training on 2 billion tokens of single-shot function call data took 45 minutes.
The architecture is a Simple Attention Network with cross-attention between encoder and decoder. Key features:
- ZCRMSNorm normalization. A custom normalization layer.
- Gated residuals. For stable training at small scale.
- GQA with RoPE. Grouped query attention with rotary positional embeddings.
- Tied embeddings. Reduces parameter count.
- No FFN in encoder. Further compression.
The Cactus runtime achieves 6,000 tok/s prefill and 1,200 tok/s decode. For comparison, typical cloud API calls take 500ms to 2 seconds for the same task.
The team provides a playground UI at http://127.0.0.1:7860 for testing and fine-tuning. Weights auto-download. You can generate training data via Gemini, train, evaluate, and bundle results without writing code.
The CLI supports fine-tuning on custom data, single inference, full training runs, and TPU management.
Contrarian Note
A 26M model beating 270M and 600M competitors sounds revolutionary. But the comparison is narrow.
Needle wins on single-shot function calling. That is one specific task. FunctionGemma-270m, Qwen-0.6B, and the other baselines have broader scope and capacity. They excel in conversational settings where Needle is explicitly not competing.
The README itself admits this: "Those models have more scope/capacity and excel in conversational settings. Also, small models can be finicky."
The fine-tuning requirement is real. Out of the box, Needle may not handle your specific tools well. The playground UI exists for a reason. You will need to generate data, fine-tune, and evaluate for your use case.
The speed numbers are impressive but depend on the Cactus runtime. If you are not using Cactus, your mileage will vary. The 6,000 tok/s prefill figure is specific to their optimized inference stack.
And the Hacker News hype cycle is already rolling. 1,320 stars in two days is strong. But stars are not production deployments. The real test is whether developers actually ship Needle in consumer devices or whether it remains a cool research artifact.
The distillation approach is interesting. Squeezing Gemini 3.1 into 26M parameters suggests that a lot of the capacity in large models is redundant for focused tasks. But it also raises questions about what gets lost in the compression. The 8,192 token vocabulary is small. Multilingual support and rare token handling will suffer.
Word count: 510
Written: 2026-05-14 01:34 UTC