Skip to content

Function calling (tools) with local models

How tool calling actually works under the hood, the full call loop with validation, parallel calls and errors, runtime setup for llama-server, Ollama and vLLM, and how to test whether a local model is reliable enough.

14 minยทVerified 2026-111 animated diagramPro+50 XP

The model never runs code. It emits a structured request ("call get_weather with {city: 'Oslo'}"), your program executes it, and you feed the result back. Everything else in this lesson is about making that loop reliable with local models, which are less forgiving than hosted frontier models.

Pro content

Keep reading with Inference Academy Pro

Unlock the rest of this lesson, including 1 animated diagram, plus every advanced lesson, hands-on lab, the larger playground models and completion certificates.