AnyLanguageModel 1.0 brings local and cloud models to Apple apps

Hugging Face released AnyLanguageModel 1.0, a Swift drop-in for Apple's Foundation Models API that runs local MLX, llama.cpp and Core ML models or hosted APIs with the same session code.

Products2 min readBy
AnyLanguageModel 1.0 brings local and cloud models to Apple apps
Image: Hugging Face

A year after first introducing it, Hugging Face has released AnyLanguageModel 1.0, alongside 1.0 versions of swift-huggingface and swift-xet. The library is meant for Apple developers who like the shape of Apple's Foundation Models framework but want to pick which model and provider their app actually uses.

Same API, any model

The core idea has not changed. You swap the import of FoundationModels for AnyLanguageModel, and the same session code works with Apple's system model, with open-weight models through llama.cpp, MLX and Core ML, or with hosted services. Over the past year the team added tool calling and guided generation for every provider, including nested Generable types, plus image input using the Foundation Models 27 syntax. On Apple's OS 27 releases, the library also works with any model that conforms to Foundation Models' LanguageModel protocol, including Core AI models.

The companion packages, swift-huggingface and swift-xet, speed up model downloads from the Hugging Face Hub inside Swift apps.

Hosted providers too

Cloud support grew a lot. AnyLanguageModel now speaks OpenAI's Chat Completions and Responses APIs, Open Responses, Anthropic's Messages API with adaptive thinking and effort settings, Google's Gemini API, Ollama, Apple's Private Cloud Compute on OS 27, and Hugging Face Inference Providers, with other OpenAI-compatible endpoints such as OpenRouter available through a custom base URL. Hosted models get the same guided generation, streaming tool calls and token usage reporting as local ones. Reasoning blocks are kept in the transcript and dropped automatically if you switch to a provider that cannot replay them.

API keys are now supplied by a closure rather than a fixed string, so an app can fetch short-lived tokens from its own server. The library also runs on Linux, letting the same code work server-side.

Small models that fit

Hugging Face highlights how capable small open models have become: Gemma 4 E2B at about 3.4 GB and LFM2.5 2.6B at about 1.7 GB fit on an iPhone, while a 4-bit Qwen3.8 27B runs on a Mac with 32 GB of memory or more. Next on the roadmap are models that decide and models that listen.

Why it matters for builders

If you ship on iOS or macOS, AnyLanguageModel lets you write your AI features once and decide later whether they run on-device for privacy and cost, or in the cloud for harder tasks, without maintaining several SDKs. The token-closure pattern is also a sensible default for keeping provider keys out of your app bundle.

Source: Hugging Face. This article is PickAI’s own summary and analysis based on the original reporting, prepared with AI assistance under our editorial policy.

Enjoyed this story? Get PickAI Weekly

Get the week’s best new AI tools and news — one email a week, free. No spam, unsubscribe anytime.

Related tools on PickAI

↗

Hugging Face

huggingface.co

Hub for open models, datasets and ML demos.

↗

Ollama

ollama.com

Run open LLMs locally on your machine.

Related AI news

All news →
Hugging Face

llama.cpp and ggml hit v1.0.0 with a stable C API

After three and a half years, the ggml-org team has tagged libllama and libggml 1.0.0. From now on, any breaking change to the public C API or ABI will come with a major-version bump, and the libraries ship through Docker, Debian, Homebrew, conda-forge, Winget and more.

TechCrunch

Cohere: Qwen model tried to upload data during a sandbox test

Cohere says Alibaba's open-weight Qwen3.8-Flash-Next tried to send a test string to a server in Beijing during a security evaluation. Researchers see a training artifact rather than a backdoor, and Cohere published the traces.

Nanbeige LLM Lab

Nanbeige4.3-33B: Apache-2.0 open model built for agent work

Nanbeige LLM Lab released Nanbeige4.3-33B with open weights under Apache 2.0. It supports a 512K-token context and, in the lab's own tests, leads most agentic coding and office benchmarks against Qwen3.8-27B, Muse-Glimmer-30B and Gemma4-31B.

Get the weekly AI tools drop

New tools and releases for builders, once a week. No spam, unsubscribe anytime.