AnyLanguageModel 1.0 Marks One Year of Local Models on Apple Platforms
AnyLanguageModel 1.0 marks one year of local and hosted Swift inference, with one API, tool calling, guided output, images, downloads, and providers.
Key Takeaways
- AnyLanguageModel 1.0 gives Swift developers one Foundation Models API for both local and hosted inference, allowing them to switch between system models, llama.cpp, MLX, Core ML, and cloud providers without rewriting session or prompt logic.
- The update adds major capabilities across providers, including tool calling, guided generation for structured output, and image support using Foundation Models syntax on iOS, macOS, and visionOS.
- Hosted model support expanded to OpenAI, Anthropic, Google, Ollama, Hugging Face Inference Providers, and OpenAI-compatible endpoints, with local-equivalent features such as streaming, token usage, flexible authentication, and cross-provider reasoning handling.
- Smaller quantized open-weight models are now easier to run locally, while larger models can be accessed through hosted providers; the project also plans to extend beyond language models to models that decide and models that listen.
Meta description: AnyLanguageModel 1.0 gives Swift apps one API for local and hosted inference, tool calling, guided generation, image support and model downloads.
Tags: AnyLanguageModel, Swift, Foundation Models, Hugging Face, AI inference
Featured image: Abstract friendly illustration of a Swift app connecting to local chips and cloud APIs through one shared pipeline, no real people, no logos, no text.
For Swift developers building intelligent apps, AnyLanguageModel 1.0 is now available, along with swift-huggingface 1.0 and swift-xet 1.0, a year and dozens of releases after the project began. The update keeps the core idea unchanged: write code once against the Foundation Models API, then choose the model that fits each task, whether it runs on the device or is hosted by a provider.
That shared path matters because local and hosted inference have different strengths. A model running nearby can avoid a round trip and can work with the device’s existing system model. A hosted provider can run larger open-weight models or add provider-specific features. By keeping the same session code, AnyLanguageModel lets developers move between those options without rebuilding the whole prompt flow.
One API, many models
To get started, developers change the import statement. The same session code then works with the system model, with open-weight models through llama.cpp, MLX, and Core ML, and with the hosted providers supported by the library.
Several major capabilities were added over the past year. Tool calling now works with every provider. Guided generation also works with every provider, including nested @Generable types and arrays of them; this is useful when an app needs structured output, such as fields, lists, or objects, rather than only free-form text.
Image support lets developers attach images to prompts using Foundation Models 27 syntax. That support also applies when using the system model on iOS, macOS, and visionOS 27. On OS 27, AnyLanguageModel can work with any model that conforms to Foundation Models’ LanguageModel protocol, including Core AI models.
Hosted models gain the same features
Hosted model support expanded this year. AnyLanguageModel now supports OpenAI’s Chat Completions and Responses APIs, Open Responses for any provider with a compatible endpoint, Anthropic’s Messages API with adaptive thinking and effort options, Google’s Gemini API, Ollama, and Private Cloud Compute on OS 27. It also supports Hugging Face Inference Providers and other OpenAI-compatible endpoints, such as OpenRouter, through a custom base URL.
With Inference Providers, developers can use open-weight models that are too big to run on the device while keeping the same session code. Hosted providers get the same features as local models: guided generation, tool calling with streaming, and token usage on responses.
Reasoning is now part of the transcript too. When switching providers, reasoning blocks are automatically omitted from requests if the new provider cannot replay them. That keeps a single transcript format usable across providers that may expose thinking differently.
Authentication is also more flexible. API keys come from a closure instead of a string, so an app can fetch short-lived tokens from its own server. The README explains when to let users bring their own keys and when to route requests through a proxy. AnyLanguageModel also runs on Linux, so the same code can work on a server.
Open-weight models got better
Local models became easier to use while the models themselves became more capable, making smaller downloads a good place to start. The post highlights some of the most downloaded models on the Hub right now.
Gemma 4 E2B from Google is available in GGUF, about 3.4 GB at Q4_0 with quantization-aware training. LFM2.5 2.6B from Liquid AI is also available in GGUF, about 1.7 GB at Q4_K_M. Qwen3.8 27B for MLX from Alibaba is about 16 GB at 4 bits.
The first two fit on an iPhone. Qwen3.8 27B runs on a Mac with 32 GB of memory or more, and selecting the MLX model takes one line. GGUF files use quantization, which stores model weights in lower precision to reduce memory and download size. BF16, used for the much larger Z.ai GLM-5.3 example, is a higher-precision 16-bit format.
That larger model needs more hardware: GLM-5.3 from Z.ai takes about 1.5 TB in BF16 if a developer has four maxed-out Mac Studios available. For most users, the same model is available through Inference Providers.
Upgrade path and what comes next
If you are upgrading an existing app, the migration guidance in the AnyLanguageModel, swift-huggingface, and swift-xet release notes helps update the code. The maintainers say community feedback and contributions shaped several major features, and thank everyone who helped make AnyLanguageModel more useful to app developers.
The next step is to extend the same approach beyond language models. The project says language models have proven powerful for building intelligence into products, but they are one of many kinds of models developers can put to work. Coming soon: models that decide, and models that listen.
Links are listed on GitHub for AnyLanguageModel, swift-huggingface, and swift-xet, along with introductory posts for AnyLanguageModel and swift-huggingface.

Comments (0)