跳到主内容
@wquguru
精选75MarkTechPost(RSS)模型发布/更新

Cactus Compute 发布 45M 参数工具调用模型 Needle 2

Meet Needle 2: An Open 45M-Parameter Tool-Calling Model That Ships as a 14MB Binary and Runs a Full Session in 28MB of RAM

原文
发到 X

Cactus Compute has released Needle 2, an open 45M-parameter model for tool calling, device use, and structured extraction. The entire model ships as a single 14MB binary that runs a full session in about 28MB of RAM. Weights are trained and deployed at CQ2-bit using Cactus Quants, and the model is sealed inside the company’s own C++ engine, so there is no runtime to install and no download at inference time. Reported decode throughput is 500 tokens/sec on a Raspberry Pi 5, 400–1,500 tokens/sec on Meta Quest 3S and Apple Vision Pro, and 300–700 tokens/sec on sub-$200 phones. The design premise is narrow and stated plainly by the team: mapping a messy sentence onto a typed function signature needs no world knowledge and no open-ended prose. That framing is why 45M parameters are enough here, and why the model targets hardware with no GPU and no NPU.

Cactus Compute 发布了 Needle 2,这是一个开源的 45M 参数模型,用于工具调用、设备使用和结构化提取。整个模型以单个 14MB 二进制文件形式提供,运行完整会话仅需约 28MB 内存。权重使用 Cactus Quants 以 CQ2 位进行训练和部署,模型封装在公司自有的 C++ 引擎中,因此无需安装运行时,推理时也无需下载。据报道,在 Raspberry Pi 5 上解码吞吐量为 500 tokens/秒,在 Meta Quest 3S 和 Apple Vision Pro 上为 400–1,500 tokens/秒,在低于 200 美元的手机上为 300–700 tokens/秒。设计前提很明确,团队也直言不讳:将杂乱的句子映射到类型化函数签名不需要世界知识,也不需要开放式散文。这就是为什么 45M 参数在这里足够,也是为什么该模型针对没有 GPU 和 NPU 的硬件。

Is it deployable?

它可以部署吗?

Yes, Needle 2 ships as prebuilt binaries and a static library for macOS, Linux (x86-64, ARM64, ARMv7, RISC-V, MIPS32el), Windows, Android, iOS/watchOS/tvOS, and WebAssembly. Cactus says Pebble already runs Needle locally in the Index 01 app for offline voice actions.

是的,Needle 2 以预构建二进制文件和静态库的形式提供,支持 macOS、Linux(x86-64、ARM64、ARMv7、RISC-V、MIPS32el)、Windows、Android、iOS/watchOS/tvOS 和 WebAssembly。Cactus 表示,Pebble 已经在 Index 01 应用中本地运行 Needle,用于离线语音操作。

  • Which companies: Any team shipping firmware or apps on constrained hardware. Seed-stage wearable and IoT startups, mid-market consumer-electronics OEMs, robotics teams, and large device makers needing an offline fallback. Cloud-first SaaS teams gain less.
  • Industries: smart home, wearables, low-end mobile, automotive in-cabin control, service robotics, retail kiosks and POS, routers and IP cameras, and regulated settings where audio cannot leave the device.
  • Applications: voice-to-action on screenless devices, offline appliance control, receipt and invoice field extraction, enum tagging, and local routing that escalates to the cloud only on low confidence.
  • 适用公司:任何在受限硬件上交付固件或应用的团队。种子阶段的可穿戴设备和物联网初创公司、中端消费电子 OEM、机器人团队,以及需要离线后备方案的大型设备制造商。云优先的 SaaS 团队获益较少。
  • 适用行业:智能家居、可穿戴设备、低端手机、汽车座舱控制、服务机器人、零售自助终端和 POS 机、路由器和 IP 摄像头,以及音频不能离开设备的受监管环境。
  • 应用场景:无屏设备上的语音到操作、离线家电控制、收据和发票字段提取、枚举标签,以及仅在低置信度时升级到云端的本地路由。

Architecture: Simple Attention Network

架构:简单注意力网络

Needle 2 uses what Cactus team calls a Simple Attention Network. The recipe replaces the FFN with a Hadamard MLP, keeps GQA attention, adds engram key-value memory from hashed n-gram tables, and uses multi-lane hyper-connections. The network is 27 layers and 512 wide. The underlying study is on arXiv as A Controlled Study of Attention-Only Transformers.

Needle 2 使用了 Cactus 团队所称的简单注意力网络。该方案用 Hadamard MLP 替换了 FFN,保留了 GQA 注意力,添加了基于哈希 n-gram 表的记忆键值记忆,并使用多通道超连接。网络有 27 层,宽度为 512。相关研究论文《A Controlled Study of Attention-Only Transformers》可在 arXiv 上获取。

Pretraining used a proprietary 115B-token corpus, with 38B tokens of post-training. The research team notes LFM2.5-230M was pretrained on 19 trillion tokens.

预训练使用了专有的 115B token 语料库,其中 38B token 用于后训练。研究团队指出,LFM2.5-230M 是在 19 万亿 token 上预训练的。

Needle 2 spends 70 MFLOPs per token, with 35M of 45M parameters matmul-active. LFM2.5 230M spends 460, FunctionGemma 270M spends 540, and Apple FM sits near 6,000.

Needle 2 每个 token 花费 70 MFLOPs,其中 4500 万参数中有 3500 万参与矩阵乘法。LFM2.5 230M 花费 460,FunctionGemma 270M 花费 540,而 Apple FM 接近 6000。

Engine, grammar, retrieval, and confidence

引擎、语法、检索和置信度

Weights never decompress into RAM. The 2-bit codes expand inside vector registers and fuse into integer dot products, so the arithmetic path stays int8. One binary probes the CPU at startup and selects a kernel tier: SDOT, NEON, AVX2, RISC-V vectors, wasm SIMD, or scalar.

权重从不解压到内存中。2 位编码在向量寄存器内展开,并融合为整数点积,因此算术路径保持 int8。一个二进制文件在启动时探测 CPU,并选择内核层级:SDOT、NEON、AVX2、RISC-V 向量、wasm SIMD 或标量。

A byte-level grammar compiled from your JSON schemas constrains every emitted token. Because the matcher knows which tokens are legal before logits exist, the engine skips up to 98% of the vocabulary projection on structural tokens.

由 JSON 模式编译的字节级语法约束每个生成的 token。由于匹配器在 logits 存在之前就知道哪些 token 是合法的,引擎在结构 token 上跳过了高达 98% 的词汇表投影。

Attention uses a 256-token sliding window, and the system turn plus tool declarations are pinned as KV sinks. Memory stays near 28MB regardless of conversation length.

注意力使用 256 token 的滑动窗口,系统提示和工具声明被固定为 KV 汇。无论对话长度如何,内存保持在 28MB 左右。

Declare five or fewer tools and they render directly. Above five, a contrastive retrieval head embeds each schema once, scores the query per turn, and admits only the top five. Unselected tools are unreachable, not merely unlikely.

声明五个或更少的工具时,它们会直接渲染。超过五个时,对比检索头会为每个模式嵌入一次,每轮对查询进行评分,并只允许前五个。未选中的工具是不可达的,而不仅仅是可能性低。

Every response carries a confidence value, the minimum of a calibrated post-hoc head and the decoding probability of the call tokens. Off-topic requests return the empty call []. The contract is a threshold: act above it, re-ask or escalate below it.

每个响应都带有置信度值,该值是校准的后置头与调用 token 的解码概率的最小值。离题请求返回空调用 []。契约是一个阈值:高于它则行动,低于它则重新询问或升级。

Evaluation

评估

Cactus team evaluates on five public function-calling benchmarks using ordered strict exact match, where names, call order, and every argument must match. Needle 2 runs end-to-end through the shipped engine at CQ2-bit with retrieval on; baselines run f16 under vLLM.

Cactus 团队在五个公开的函数调用基准上使用有序严格精确匹配进行评估,其中名称、调用顺序和每个参数都必须匹配。Needle 2 通过发布的引擎以 CQ2 位并启用检索进行端到端运行;基线在 vLLM 下以 f16 运行。

BenchmarkNeedle 2 (CQ2)LFM2.5 230MFunctionGemma 270MApple FM
Mobile Actions (961)63.769.164.057.6
DroidCall (200)17.011.017.5
Seal-Tools in-domain (700)32.626.916.3
Seal-Tools OOD (654)28.717.015.6
BFCL v4 single-turn (3,641), overall42.660.846.161.7
基准Needle 2 (CQ2)LFM2.5 230MFunctionGemma 270MApple FM
移动操作 (961)63.769.164.057.6
DroidCall (200)17.011.017.5
Seal-Tools 域内 (700)32.626.916.3
Seal-Tools 域外 (654)28.717.015.6
BFCL v4 单轮 (3,641),总体42.660.846.161.7

Needle 2 leads both Seal-Tools splits and posts 98.3 function-name accuracy on Mobile Actions. It trails on BFCL v4, which Cactus attributes to distribution: its corpus is consumer device actions, not general or enterprise APIs. Well-formed output rate across the 3,641 BFCL rows is 93.4. The team states two asymmetries upfront: f16 baselines favor them, and task specialization favors Needle.

Needle 2 在 Seal-Tools 的两个分割中领先,并在移动操作上达到 98.3 的函数名准确率。它在 BFCL v4 上落后,Cactus 将其归因于分布:其语料库是消费设备操作,而不是通用或企业 API。在 3,641 个 BFCL 行中的格式良好输出率为 93.4。团队预先声明了两个不对称性:f16 基线对他们有利,而任务专业化对 Needle 有利。

更进一步:量化金融体系

看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力

进入量化体系 →

相似阅读

另一事件,读法相近