AnyLanguageModel 1.0: One Year of Local Models on Apple Platforms

Hugging Face has released AnyLanguageModel 1.0 for Apple platforms, roughly a year after introducing the project on its blog. The core idea is unchanged: developers keep the session code they would write against Apple's Foundation Models framework and simply swap the import line from FoundationModels to AnyLanguageModel. The same code then runs against the system model, against open-weight models served locally through llama.cpp, MLX or Core ML, or against a set of hosted providers. Two companion libraries, swift-huggingface and swift-xet, also reached 1.0 in the same release.
The package was built after feedback from app developers who were interested in local models but unsure how to begin, and who wanted to avoid the overhead of wiring up several inference backends themselves. Over the past year the project added tool calling across every provider, guided generation across every provider (including nested @Generable types and arrays of them), and image attachment in prompts using the syntax from Foundation Models 27, with the system model supported on iOS, macOS and visionOS 27. On OS 27 the library also works with any model conforming to the LanguageModel protocol, Core AI models included.
Hosted provider coverage widened considerably. The library now speaks OpenAI's Chat Completions and Responses APIs, Open Responses for any compatible endpoint, Anthropic's Messages API with adaptive thinking and effort options, Google's Gemini API, Ollama, Private Cloud Compute on OS 27, and Hugging Face Inference Providers plus other OpenAI-compatible services such as OpenRouter reached through a custom base URL. The documented example constructs an OpenAILanguageModel pointed at Hugging Face's router endpoint to call openai/gpt-oss-120b, a model far too large for a phone. Hosted providers get feature parity with local ones: guided generation, tool calling with streaming, and token usage figures on responses.
Reasoning is now part of the transcript. If a developer switches providers mid-conversation, reasoning blocks are dropped from outgoing requests when the new backend cannot replay them, which avoids errors from mismatched message formats. This is the kind of detail that matters in practice: reasoning traces are typically provider-specific payloads, so a portable abstraction has to decide what to keep and what to strip. API keys are supplied through a closure rather than a plain string, so apps can pull short-lived tokens from their own server. The project's README covers when to let users bring their own keys and when to proxy requests instead. The library also builds on Linux, so the same Swift code can run server-side.
The release notes call out several open-weight models as sensible starting points. Gemma 4 E2B from Google, in GGUF at roughly 3.4 GB at Q4_0 with quantization-aware training; LFM2.5 2.6B from Liquid AI in GGUF at about 1.7 GB at Q4_K_M; and Qwen3.8 27B for MLX from Alibaba at about 16 GB at 4 bits. The first two fit on an iPhone, while the Qwen model needs a Mac with 32 GB of memory or more and is selected with a single MLXLanguageModel initializer. For scale, GLM-5.3 from Z.ai takes about 1.5 TB in BF16, which the post frames as a job for four maxed-out Mac Studios or, for everyone else, for Inference Providers.
Upgrading means bumping the Swift package dependency to 1.0.0 and opting into backends through package traits, for example the MLX trait. Existing apps have migration guidance in the release notes for AnyLanguageModel, swift-huggingface and swift-xet. Hugging Face credits community feedback and contributions for shaping several major features, and previews next steps as bringing the same approach to additional capabilities: models that decide, and models that listen, meaning Swift APIs with a choice of on-device models for decision-making and audio respectively.
The design is a bet that a thin compatibility layer over Foundation Models is more valuable than a new abstraction. Developers pay little to start and can defer the backend decision; in exchange they accept whatever surface Apple's framework exposes and whatever gaps a wrapper introduces. The trade-offs are the usual ones for portability layers: local models vary in tool-calling reliability and guided-generation fidelity, and hosted ones differ in reasoning formats and streaming behavior, so identical code does not guarantee identical output. The closure-based key handling and automatic dropping of reasoning blocks suggest the maintainers are treating provider differences as a first-class problem rather than hiding them.
Why it matters: Swift developers building on Apple's Foundation Models now have a single-import path to local open-weight models and major hosted APIs, which lowers the cost of prototyping on-device intelligence and of switching models per task. Teams that had been running separate integrations per provider can consolidate, though anyone relying on consistent behavior across backends should still test each one they ship. The Linux support and the upcoming decision and audio work hint that Hugging Face intends this pattern to extend beyond chat-style text generation.
Based on reporting from the original publisher. Visit the source for full context and later updates.