Skip to content

Build1 publisher2 min readPublished

Foundry Local ships inference as a native library the app loads in-process

Microsoft's local runtime handles model download, hardware detection and execution provider selection behind a .dll, .so or .dylib. An app that adopts it owns the download, the cache and the unload.

The Engineer · Build desk

Illustration accompanying Foundry Local ships inference as a native library the app loads in-process

What happened

  • A dev.to post in the Foundry 100 Days series describes Microsoft's Foundry Local as an end-to-end local AI runtime that loads in-process as part of the application shipping it.
  • The curated catalog holds quantized, hardware-optimized variants of models including Qwen, Phi, DeepSeek, Mistral and Whisper for audio, versioned and cached on the local disk after first download.
  • Language SDKs for Python, C#, JavaScript and Rust wrap that native library with idiomatic APIs, so the calling code stays close to the shapes used against Foundry's cloud offerings.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

  • cost The per-token charge on a cloud call disappears, and in its place a team owns a first-run download and a versioned cache sitting on disks and networks it does not control.
  • decision The local-or-cloud call becomes per feature: the post keeps frontier-scale reasoning, tool orchestration and retrieval over enterprise data on the hosted side.
  • capability Keeping raw user data on the device removes the compliance conversation with legal and security that the post says a cloud round trip starts.

When the app calls the Core API, that library detects the hardware, picks an execution provider, downloads the model if it is not already cached, manages the session and runs the inference [3]. It ships as a .dll on Windows, a .so on Linux and a .dylib on macOS [3]. The post's architecture section is titled "Four Layers, Zero Daemons" [8].

The dev.to post argues Foundry Local is "closer to embedding SQLite than to calling a hosted database service" [16]. That comparison is the accurate one. An embedded database moves operational work into the client: file location and version skew between installs. Foundry Local moves the equivalents. The lifecycle it documents runs download, load, infer, unload [9], and catalog models are versioned and cached locally after first download [5]. Cache state on a customer's disk is part of the support surface.

The band the post nominates is quantized 0.5B to 8B parameters, naming Qwen2.5, Phi, DeepSeek-distilled variants and Mistral small [13]. The top of that band has sixteen times the parameters of the bottom [17]. An installer that ships one model choice has to make it against the weakest machine it will land on. The hardware the post counts as ready spans NPUs now standard on Copilot+ PCs, Apple Silicon GPUs through Metal, and commodity laptops with usable GPU paths via WebGPU [14].

The case against the cloud default for small tasks, as the post puts it, is per-call: round-trip latency measured in hundreds of milliseconds and sometimes seconds, plus a token charge for even a one-line classification [15]. Against that it sets a quality claim: those quantized small models "handle summarization, classification, extraction, and simple tool calling at quality levels that were frontier-only two years ago" [13]. For that to transfer, your accuracy bar has to sit below where a quantized model lands on your data, not on the catalog's examples.

Microsoft's FAQ says "Foundry Local is not a web server and CLI tool", and the post notes it appears there almost as a disclaimer [6][7]. The same post then documents an OpenAI-compatible server mode, alongside a streaming chat client in about 30 lines [11][10]. In my view the server mode exists so existing OpenAI client code keeps working while you develop, and the in-process library is the thing you ship. Which of the two you build against decides whether a later model swap is a config change or a new build. The post's worked scenario for the local path is a field inspection app that must work offline [12].

What to watch

  • Whether the catalog publishes per-model download sizes and memory footprints per execution provider. A team needs those numbers to price the install artifact.
  • Whether the SDKs pin a model version per app release or resolve to the catalog's latest at download time. The answer decides if a catalog update can change shipped behaviour.
  • Whether Microsoft supports the OpenAI-compatible server mode as a production surface or keeps it a development convenience.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories