惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Last Watchdog
The Last Watchdog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Secure Thoughts
MongoDB | Blog
MongoDB | Blog
博客园 - Franky
T
Tor Project blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
博客园_首页
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Vercel News
Vercel News
Last Week in AI
Last Week in AI
月光博客
月光博客
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
博客园 - 叶小钗
NISL@THU
NISL@THU
C
Check Point Blog
K
Kaspersky official blog
N
News and Events Feed by Topic
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
A
Arctic Wolf
T
Threatpost
GbyAI
GbyAI
L
LINUX DO - 热门话题
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy & Cybersecurity Law Blog
N
News and Events Feed by Topic
Scott Helme
Scott Helme
P
Privacy International News Feed
The Register - Security
The Register - Security
G
GRAHAM CLULEY
Recorded Future
Recorded Future
Apple Machine Learning Research
Apple Machine Learning Research
C
Cybersecurity and Infrastructure Security Agency CISA
B
Blog
Project Zero
Project Zero
Cyberwarzone
Cyberwarzone
Webroot Blog
Webroot Blog
Microsoft Security Blog
Microsoft Security Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
D
DataBreaches.Net
J
Java Code Geeks
AWS News Blog
AWS News Blog
Help Net Security
Help Net Security
Engineering at Meta
Engineering at Meta
M
MIT News - Artificial intelligence
T
Threat Research - Cisco Blogs
Google DeepMind News
Google DeepMind News

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
Show HN: Needle distilled Gemini tool calling into 26M parameters — technical read, zero hype
Juan Torchia · 2026-05-17 · via DEV Community

Show HN: Needle distilled Gemini tool calling into 26M parameters — technical read, zero hype

I was in the middle of reviewing my Ollama pipeline when the HN post appeared: Needle, a 26M parameter model distilled from Gemini specifically for tool calling. My first reaction was skeptical. 26M sounds like a toy. Then I read more carefully and understood that the interesting point isn't the size — it's the problem they're actually attacking.

Here's my technical read. No euphoria, no easy dismissal.


The real problem behind Needle and Gemini tool calling distillation

My thesis is this: the bottleneck in systems with external tools isn't the LLM's general reasoning — it's the parsability of the output. If the model produces malformed JSON, calls functions with wrong arguments, or hallucinates tool names that don't exist, the whole system breaks — doesn't matter how "intelligent" the model is at other tasks.

I ran into this directly while building agent loops with Claude Code. The most fragile part was never the reasoning; it was the reliability of the data contract. It reminded me of when I resisted TypeScript for years thinking types were bureaucracy. Then I understood that most avoidable failures start as poorly expressed data contracts. Tool calling is exactly the same: a model can be brilliant in prose and terrible at respecting a strict JSON schema under latency pressure.

Needle attacks that specific point: it takes Gemini's tool calling behavior — which is consistent and well-structured — and distills it into a small, specialized model. The hypothesis is that for this specific task, 26M parameters trained on the right behavior can outperform giant generalist models that were never fine-tuned to respect function schemas with precision.

Is it true? In their own benchmarks, according to the project repo, yes. In my own real production, I don't know yet — and that difference matters.


What knowledge distillation is and why it matters here

Knowledge distillation is a technique where a large model — the teacher — generates outputs that are then used to train a smaller model — the student. The student doesn't learn from raw data: it learns to imitate the teacher's behavior on the distributions that matter most.

# Simplified concept of the distillation pipeline for tool calling:
# 1. Teacher (Gemini) generates thousands of correct tool calling examples
# 2. Student (Needle, 26M) trains on those examples
# 3. The student learns the teacher's output distribution, not hand-written rules

Enter fullscreen mode Exit fullscreen mode

For tool calling, this makes particular sense. You don't need the model to know universal history. You need it to, when you hand it this schema:

// Tool definition — the model has to respect this 100%
const tools = [
  {
    name: "search_product",
    description: "Searches for a product by ID in the catalog",
    parameters: {
      type: "object",
      properties: {
        product_id: { type: "string" },
        include_stock: { type: "boolean" }
      },
      required: ["product_id"]
    }
  }
]

Enter fullscreen mode Exit fullscreen mode

Produce exactly:

{
  "name": "search_product",
  "arguments": {
    "product_id": "SKU-4821",
    "include_stock": true
  }
}

Enter fullscreen mode Exit fullscreen mode

Not some creative variation with renamed keys, wrong types, or invented fields. Small generalist models fail at this constantly. If Needle solves it reliably, the use case exists.


How to test it in Ollama: a reproducible checklist

If you want to validate whether a model like Needle has a place in your stack, the criterion shouldn't be someone else's benchmark. It should be your own set of tools under your system's real conditions.

# Step 1: Install Ollama if you haven't
curl -fsSL https://ollama.com/install.sh | sh

# Step 2: When the model is available in the Ollama registry, pull directly
# (check availability at https://ollama.com/search)
ollama pull needle  # tentative name — verify the official registry

# Step 3: Prepare your own tool calling test suite
# Don't use the model README's examples; use YOUR real tools

Enter fullscreen mode Exit fullscreen mode

// tool-calling-test.ts
// Validation criteria I'd use to evaluate any small model

interface TestResult {
  case: string;
  expected: object;
  received: string;
  validJson: boolean;
  schemaRespected: boolean;
  latencyMs: number;
}

async function evaluateToolCallingModel(
  model: string,
  cases: Array<{ prompt: string; expectedSchema: object }>
): Promise<TestResult[]> {
  const results: TestResult[] = [];

  for (const testCase of cases) {
    const start = Date.now();

    // Call the model via Ollama API
    const response = await fetch("http://localhost:11434/api/chat", {
      method: "POST",
      headers: { "Content-Type": "application/json" },
      body: JSON.stringify({
        model: model,
        messages: [{ role: "user", content: testCase.prompt }],
        // Pass tools as part of the request
        tools: [testCase.expectedSchema],
        stream: false,
      }),
    });

    const data = await response.json();
    const latency = Date.now() - start;

    // Validate if the JSON is parseable and if it respects the schema
    let validJson = false;
    let schemaRespected = false;
    let received = "";

    try {
      // The tool_call should be in message.tool_calls[0]
      const toolCall = data.message?.tool_calls?.[0];
      received = JSON.stringify(toolCall ?? data.message?.content ?? "");
      validJson = !!toolCall;
      // Basic schema validation: required keys must be present
      if (toolCall?.function?.arguments) {
        const args = toolCall.function.arguments;
        const requiredKeys = Object.keys(testCase.expectedSchema);
        schemaRespected = requiredKeys.every((k) => k in args);
      }
    } catch {
      received = "parse error";
    }

    results.push({
      case: testCase.prompt.slice(0, 50),
      expected: testCase.expectedSchema,
      received,
      validJson,
      schemaRespected,
      latencyMs: latency,
    });
  }

  return results;
}

Enter fullscreen mode Exit fullscreen mode

My minimum acceptance criteria for any tool calling model in a real system:

Metric Minimum acceptable Why
Valid JSON 99%+ A parse error in production breaks the entire flow
Schema respected 95%+ Wrong arguments are silently dangerous
p95 latency < 500ms local If it's slower than an external API, you've lost the point
Tool name hallucination 0% An invented name is a non-recoverable error

The limits that the hype doesn't mention

There are three limitations that don't show up in the headlines and that I consider essential before betting on a distilled model in a real system.

First, the teacher's distribution defines the ceiling. If Gemini has biases in how it generates tool calls — certain argument patterns, certain naming conventions — the student inherits them unfiltered. This matters if your API has conventions that drift from Gemini's style.

Second, generalization to unseen schemas is an open question. A distilled model can be excellent on the patterns it learned and brittle against complex schemas with anyOf, nested $refs, or conditional validations. You have to test it explicitly against your own schemas — don't assume the general benchmark applies.

Third, 26M parameters implies limited context capacity. In systems where the prompt includes many tools simultaneously — common in backends with dozens of endpoints exposed as tools — degradation can be significant. That's a hypothesis to validate, not assume.

None of this invalidates the project. It locates it. The same discipline I applied when reviewing pnpm workspaces cache issues in CI applies here: understand the limit first, then decide if it fits.


Where Needle makes sense and where it doesn't

Scenarios where it makes sense to try Needle:

  • Local agent pipelines where network latency to external APIs is the bottleneck
  • Edge devices or resource-constrained environments where a 26M model fits in memory comfortably
  • Systems with a bounded and stable set of tools — not dozens of shifting schemas
  • As a local fallback when external APIs are unavailable

Scenarios where it probably doesn't cut it:

  • Systems where reasoning between tool calling steps is complex — deciding when to call which tool, not just how to call it
  • APIs with deeply nested or polymorphic schemas
  • Flows where long conversational context matters — the 26M context limit is going to hurt
  • Environments that need auditable safety guarantees — a privately distilled model is a considerably more opaque box

The tension that surfaced in the Spring Boot Actuator in production post applies differently here: the comfort of "it works in the demo" can hide surface risks that only show up under load or with unexpected inputs.


What this signals for the small model ecosystem

The uncomfortable thing about Needle isn't the model itself. It's what it confirms: functional specialization is going to pressure the hegemony of large general models on structured tasks.

Tool calling, intent classification, entity extraction with fixed schemas — these are tasks where a well-trained distilled model can beat GPT-4 or Claude on cost and latency without sacrificing reliability. That changes the architecture calculation.

In my current stack with Claude Code for complex reasoning and Ollama for local tasks, there's a gap exactly where Needle would aim: the tool router that decides which function to call and with what arguments, without needing the overhead of a 70B model for that. I'm not saying I'll adopt it tomorrow. I'm saying the category makes sense and the experiment deserves follow-through.

Same as when I evaluated Jakarta EE vs Spring Boot tradeoffs or compared package managers in real monorepos, the honest answer isn't "adopt it now" or "ignore it" — it's "test it against your own criteria before committing."


FAQ: Needle, distillation, and tool calling in small models

What exactly is model distillation in the LLM context?
It's a process where a large model (teacher) generates a dataset of correct behavior — in this case, well-formed tool calling examples — which is used to train a small model (student). The student learns to imitate the teacher's output distribution on the specific tasks it was distilled for, without needing the teacher's full architecture.

Is 26M parameters enough for reliable tool calling?
Depends on the scope. For a bounded set of tools with simple schemas, probably yes. For systems with dozens of complex tools, long contexts, or multi-step reasoning, it's an open hypothesis. The project's own benchmark is optimistic; validation against your own schemas is mandatory before betting on it.

How do I test it locally without risking a production system?
With Ollama, if the model is available in the registry, it's as simple as ollama pull [name] and then evaluating with your own script against the schemas you already use. The validation checklist in this post is a starting point. Always against your real tools — never against the README examples.

What's the practical difference between Needle and using function calling from OpenAI or Anthropic?
Latency, cost, and privacy. A local model has no network RTT, no per-token cost, and doesn't send your tool schemas to an external API. The tradeoff is that reliability depends entirely on the local model's training quality, without the backing of a provider with an SLA.

Is it worth it for an individual stack or only for companies with infrastructure?
A 26M model runs on a MacBook with 8GB of RAM without drama. This isn't enterprise infrastructure. If you're already using Ollama for other tasks — like I am — adding a specialized model is operationally trivial. The real cost is evaluation time, not hardware.

What happens if the model hallucinates a tool name that doesn't exist in my system?
That's the worst case and you have to design for it as an expected failure. The routing layer that consumes the model's output has to validate that the tool call name corresponds to a registered tool before executing anything. If it doesn't exist, the error has to be explicit and not silent. This is basic defensive design, independent of which model you use.


Conclusion: test it with your eyes open

I'm not going to say Needle is the future or that it's noise. My position is more specific: functional distillation of large model behavior into small specialized models is a legitimate direction, and tool calling is a use case where it makes genuine technical sense.

What I don't buy is enthusiasm without friction. A 26M model has real limits around context, generalization, and reliability on unseen schemas. Those limits don't appear in the HN post and they will appear in production.

My concrete recommendation: if you have an agent pipeline with a stable set of tools and latency is a problem, build a test harness with your own schemas, run it against the acceptance criteria in this post, and measure. If it clears 99% valid JSON and 95% schema respected on your own cases, you have something useful. If not, you know exactly why.

That's more useful than any benchmark someone else wrote.

Are you using local models for tool calling? Tell me at juanchi.dev what stack you built and where you hit the limits.


This article was originally published on juanchi.dev