Cactus Compute has released Needle 2, a 14MB open-source foundation model designed for offline tool calling and structured data extraction on resource-constrained hardware. Containing 45 million parameters compressed via CQ2-bit quantization, the model requires approximately 28MB of RAM and achieves inference speeds exceeding 500 tokens per second on a Raspberry Pi 5. Unlike general-purpose LLMs, Needle 2 utilizes a Simple Attention Network featuring a Hadamard transform and grouped-query attention with engram key-value memory. To manage large tool catalogs, the architecture employs a contrastive embedding head to limit the active context to the top five tools. The model enforces strict output integrity through a byte-level grammar compiled from schema definitions, achieving a 93.4% well-formed JSON rate. Benchmark results demonstrate high efficiency, with Needle 2 competing against much larger models; for instance, it matched FunctionGemma (270M) in Mobile Actions at 63.7% and outperformed LFM2.5 (230M) in Seal-Tools out-of-domain tasks (28.7% vs 17.0%). Additionally, the model supports LoRA fine-tuning to produce portable .cact files and utilizes a confidence scoring mechanism to prevent erroneous executions by evaluating both decoding probability and a calibrated post-hoc head.
Read original
dev.to