← News

Technology updates

Hugging Face Ships AnyLanguageModel 1.0 for Local and Hosted Models on Apple Platforms

Hugging Face released AnyLanguageModel 1.0 alongside swift-huggingface 1.0 and swift-xet 1.0, letting Swift apps call local open-weight models and hosted providers through one Foundation Models-style API.

Published: 2026-11-18 13:24 UTCUpdated: 2026-11-18 13:24 UTCSource date: 2026-10-20

Hugging Face published AnyLanguageModel 1.0 on October 20, together with swift-huggingface 1.0 and swift-xet 1.0. According to the company's blog post, AnyLanguageModel began a year ago as a drop-in replacement for Apple's Foundation Models framework: a developer swaps import FoundationModels for import AnyLanguageModel and existing session code keeps working, while the underlying model can be the system model, a local open-weight model, or a hosted service.

On-device paths cover llama.cpp, MLX and Core ML. The post says 1.0 fills in three areas: tool calling and guided generation, including nested @Generable types and arrays of them, now work with every provider; images can be attached to prompts; and on OS 27 the library accepts any model conforming to Foundation Models' LanguageModel protocol, including Core AI models. The companion swift-huggingface and swift-xet packages add accelerated downloads from the Hub.

Hosted support spans OpenAI's Chat Completions and Responses APIs, Open Responses, Anthropic's Messages API with adaptive thinking and effort options, Google's Gemini API, Ollama, Private Cloud Compute on OS 27, Hugging Face Inference Providers, and other OpenAI-compatible endpoints reached through a custom base URL. The blog's example sends the 120B gpt-oss model through Hugging Face's router using the same session code as a local model. Hosted providers receive the same guided generation, streaming tool calls and token usage reporting.

Several engineering details are worth noting. Reasoning is now part of the transcript, and when a developer switches providers the library drops reasoning blocks the new provider cannot replay. API keys come from a closure rather than a string, so an app can fetch short-lived tokens from its own server. The same code also runs on Linux.

The post lists currently popular local models: Gemma 4 E2B at roughly 3.4 GB in Q4_0, LFM2.5 2.6B at about 1.7 GB in Q4_K_M, and Qwen3.8 27B at about 16 GB in 4-bit. The author says the first two fit on an iPhone and the third runs on a Mac with 32 GB or more. These are the author's statements about download popularity and file sizes, not benchmarks of AnyLanguageModel itself.

The practical implication is architectural: choosing a model becomes a one-line configuration rather than a separate inference integration. A developer can route a task to the system model, an on-device open-weight model or a hosted large model without maintaining multiple client layers. The post also previews the next direction, models that decide and models that listen, continuing the pattern of familiar Swift APIs with a choice of models.


Related articles