AnyLanguageModel 1.0 Lets iOS and macOS Apps Run AI Offline
Hugging Face's open-source library reaches version 1.0, swapping two import lines to run the same code with a local model, Apple Intelligence, or providers like OpenAI and Anthropic.

Hugging Face published version 1.0 of AnyLanguageModel this past Tuesday (October 20), a Swift library that works as a drop-in replacement for Foundation Models, Apple's generative AI framework introduced for iOS, macOS, and visionOS. The release came alongside versions 1.0 of swift-huggingface and swift-xet, supporting libraries for downloading models from the Hub inside Swift apps with more speed.
The project was born in November 2025, a year before this 1.0, out of a recurring demand: developers wanted to test local models in their apps but didn't want to rewrite the inference layer every time they switched providers. AnyLanguageModel's proposal is to solve this with a single interface that covers the system model, open-weight models running on-device, and hosted APIs, all with the same code session.
What Changes When You Swap Two Words in the Import
The framework's core mechanics are deliberately simple. Instead of import FoundationModels, the app writes import AnyLanguageModel, and the rest of the session code, prompts, streaming, stays the same. This means an app already written against Apple's Foundation Models can switch providers without rewriting the conversation logic.
In practice, this is the kind of decoupling that changes architecture decisions, not just lines of code. A team can prototype with the system model (free, offline, but limited in capability), and later switch to a larger model via Hugging Face Inference Providers only for features that require more reasoning, without duplicating the prompt layer.
How to Really Run a Local Model on the Device
The most relevant point of the announcement for anyone building Apple apps is the maturity of small models that already fit on an iPhone. Hugging Face lists three examples of open-weight models among the most downloaded on the Hub today in the post:
- Gemma 4 E2B, from Google, in GGUF format, about 3.4 GB in
Q4_0quantization with quantization-aware training; - LFM2.5 2.6B, from Liquid AI, also in GGUF, about 1.7 GB in
Q4_K_M; - Qwen3.8 27B, from Alibaba, converted to MLX, about 16 GB in 4-bit.
The first two fit on an iPhone. The Qwen3.8 27B already requires a Mac with at least 32 GB of unified memory to run comfortably. Selecting the MLX model is one line of code:
let model = MLXLanguageModel(modelId: "mlx-community/Qwen3.8-27B-4bit")This hardware breakdown is the concrete data point that separates "really running locally" from "running locally in the lab." An app targeting a regular iPhone is restricted to models in the 2 to 3 billion parameter range; an app that assumes Mac as its primary platform can already play with models in the 20 billion range. Hugging Face jokes that GLM-5.3, from Z.ai, takes up about 1.5 TB in BF16 and only runs reasonably on four Mac Studios pushed to their memory limit, which makes clear where the territory of "local" ends and the cloud's begins.
When It Makes Sense to Leave the Device
AnyLanguageModel doesn't try to push everything onto the device. The list of hosted providers supported in 1.0 grew considerably over the year: OpenAI's Chat Completions and Responses, Open Responses for any compatible endpoint, Anthropic's Messages API (with adaptive thinking options), Google's Gemini API, Ollama, Private Cloud Compute (available starting with OS 27), and Hugging Face Inference Providers, including other OpenAI-compatible endpoints like OpenRouter, via custom base URL.
The example Hugging Face itself gives in the post uses exactly Inference Providers to run a model too large for any Apple device:
let model = OpenAILanguageModel(
baseURL: URL(string: "https://router.huggingface.co/v1/")!,
apiKey: ProcessInfo.processInfo.environment["HF_TOKEN"]!,
model: "openai/gpt-oss-120b",
apiVariant: .chatCompletions
)The point to watch here is security: 1.0 changed the way the API key is passed from a fixed string to a closure, which allows the app to fetch a short-lived token from the developer's own server instead of embedding a permanent key in the binary. The project's README details when it's worth letting the user bring their own key and when it's worth routing the request through a proxy, a decision that's usually neglected in prototypes and becomes a headache in production.
Feature Parity Between Local and Hosted
A year ago, the common split was: local model does the basics, hosted model has the advanced features. Version 1.0 narrows that gap on three specific fronts:
Tool calling now works with all providers, local or hosted, which is what makes it possible to build an agent that decides to call a function without caring whether the model behind it is the system one or a remote endpoint.
Guided generation, the equivalent of forcing structured output, also now applies to every provider, including nested @Generable types and arrays of them, a feature useful for anyone extracting structured data from free text.
Image support arrived using the Foundation Models syntax from version 27 of Apple's operating system, valid even when the app uses the system model on iOS, macOS, and visionOS 27.
There's also a subtle change in how the framework handles reasoning: thinking blocks are now part of the conversation transcript and are automatically omitted from the request when the app switches to a provider that can't reproduce that history. This avoids a silent error when a dev switches from Anthropic to a local model in the middle of a testing session.
What's Still Unresolved
AnyLanguageModel also started running on Linux, which opens up the possibility of using the same session code on a server, not just in the client app, something Hugging Face mentions in passing but doesn't detail with an example. One caveat: cross-platform code doesn't mean cross-platform performance, MLX models remain an Apple silicon feature.
On OS 27, the framework also started accepting any model that implements Foundation Models' LanguageModel protocol, including Apple's own so-called Core AI models, which suggests Apple is leaving the door open for third parties to plug their own models into the operating system's ecosystem, not just Hugging Face.
For those who already have an app running on a previous version, the update is via Swift Package Manager:
dependencies: [
.package(
url: "https://github.com/huggingface/AnyLanguageModel",
from: "1.0.0",
traits: ["MLX"]
)
]Hugging Face's post recommends checking the migration notes for AnyLanguageModel, swift-huggingface, and swift-xet before bumping the major version, since changes like the one for API keys via closure require code adjustments, not just a version number bump. The team signals that the next step for this family of tools is to expand the same approach to "models that decide and models that listen," which points to agents and voice models as the next frontier, without detailing a timeline.
Translated from the Brazilian Portuguese original · Read the original
Coral NPU completes 10 mW RISC-V architecture and gets compiler that skips assembly
Google finalized the Coral NPU's 32-bit architecture and released version 1.0 of the compiler that takes PyTorch, TensorFlow, and JAX models straight to silicon, without writing a single line of assembly.





