Home / Blog / AnyLanguageModel 1.0: One Year of Local Models on Apple…
Tech News

AnyLanguageModel 1.0: One Year of Local Models on Apple Platforms

Hugging Face released AnyLanguageModel 1.0 on October 20, 2026, a Foundation Models drop-in that runs local and hosted models in one Swift session.

By Dillip Chowdary β€’ Oct 20, 2026 β€’ Source: Hugging Face Blog

AnyLanguageModel 1.0: One Year of Local Models on Apple Platforms

Hugging Face shipped AnyLanguageModel 1.0 on October 20, 2026, with swift-huggingface 1.0 and swift-xet 1.0, according to Hugging Face Blog's report. It is a drop-in replacement for Apple's Foundation Models framework, so an app keeps one session API and chooses the model and provider. Mattt introduced it on the blog last November for developers who wanted local models without a separate stack per inference provider. A year and dozens of releases later, 1.0 is that shared API for local and hosted inference.

This report is for Swift developers building on Apple platforms who want one session across on-device weights and hosted APIs, including the same code on a Linux server. It covers the 1.0 provider list, the open-weight models and sizes Hugging Face named, the Package.swift pin, the model initializers, and the OS 27 limits.

What AnyLanguageModel 1.0 shipped

The core idea is unchanged: use the Foundation Models API with the model that fits the app. The first step is an import swap from FoundationModels to AnyLanguageModel. The same session then works with the system model, with open-weight models through llama.cpp, MLX, and Core ML, and with hosted providers. Local and hosted inference both stay in the design. swift-huggingface and swift-xet, also at 1.0, bring accelerated downloads from the Hub into Swift apps. A shared API is how an app picks the model for each task.

Over the past year, tool calling landed for every provider. Guided generation landed for every provider too, including nested @Generable types and arrays of them. Images can be attached to prompts with Foundation Models 27 syntax, including the system model on iOS, macOS, and visionOS 27. On OS 27, AnyLanguageModel also accepts any model that conforms to the LanguageModel protocol, including Core AI models. The library grew from developers who were curious about local models and unsure how to start.

What changed for builders in AnyLanguageModel 1.0

Hosted support expanded this year. AnyLanguageModel now supports OpenAI's Chat Completions and Responses APIs, Open Responses for any provider with a compatible endpoint, and Anthropic's Messages API with adaptive thinking and effort options. It also supports Google's Gemini API, Ollama, Private Cloud Compute on OS 27, Hugging Face Inference Providers, and OpenAI-compatible endpoints such as OpenRouter through a custom base URL. Open-weight models that are too big for the device use Inference Providers with the same session code in 1.0.

Smaller open-weight models are a good place to start, and Hugging Face names some of the most downloaded on the Hub. Gemma 4 E2B from Google is GGUF, about 3.4 GB at Q4_0, with quantization-aware training. LFM2.5 2.6B from Liquid AI is GGUF, about 1.7 GB at Q4_K_M. Qwen3.8 27B for MLX from Alibaba is about 16 GB at 4 bits. GLM-5.3 from Z.ai is about 1.5 TB in BF16. The first two fit an iPhone. Qwen3.8 27B needs a Mac with 32 GB of memory or more. GLM-5.3 needs four maxed-out Mac Studios, or Inference Providers.

SettingBeforeAnyLanguageModel 1.0
Swift importFoundationModelsAnyLanguageModel
API keystringclosure, so the app can fetch short-lived tokens from its own server
AnyLanguageModel 1.0: One Year of Local Models on Apple Platforms
Illustration Β· Pexels
ModelFormatSizeWhere it runs
Gemma 4 E2B (Google)GGUF, Q4_0, quantization-aware trainingabout 3.4 GBiPhone
LFM2.5 2.6B (Liquid AI)GGUF, Q4_K_Mabout 1.7 GBiPhone
Qwen3.8 27B (Alibaba)MLX, 4-bitabout 16 GBMac with 32 GB of memory or more
GLM-5.3 (Z.ai)BF16about 1.5 TBFour maxed-out Mac Studios, or Inference Providers

How to install or upgrade AnyLanguageModel 1.0

Advertisement

Tech Pulse Daily

Get tomorrow's pulse first

Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.

Developers upgrade by pinning AnyLanguageModel from version 1.0.0 and adding the MLX trait when that backend is required. Hugging Face published the Package.swift dependency below. The session change is the import: FoundationModels comes out, AnyLanguageModel goes in, and existing session code stays. That import is how an app keeps the system model available while passing llama.cpp, MLX, Core ML, or a hosted model object into the same session. Migration notes for an existing app are in the AnyLanguageModel, swift-huggingface, and swift-xet 1.0 release notes.

Command
dependencies: [
    .package(
        url: "https://github.com/huggingface/AnyLanguageModel",
        from: "1.0.0",
        traits: ["MLX"]
    )
]
Command
- import FoundationModels
+ import AnyLanguageModel

On-device selection is one MLXLanguageModel call with model id mlx-community/Qwen3.8-27B-4bit. That id is the 4-bit Qwen3.8 27B weights, about 16 GB, for a Mac with 32 GB of memory or more. Hosted weights use OpenAILanguageModel. The sample sets baseURL to https://router.huggingface.co/v1/, reads HF_TOKEN from the environment, sets model to openai/gpt-oss-120b, and sets apiVariant to chatCompletions. A custom base URL is the same pattern for OpenRouter and other OpenAI-compatible endpoints. The MLX call switches the local model. The OpenAILanguageModel call pins openai/gpt-oss-120b for that session.

Command
let model = MLXLanguageModel(modelId: "mlx-community/Qwen3.8-27B-4bit")
Command
let model = OpenAILanguageModel(
    baseURL: URL(string: "https://router.huggingface.co/v1/")!,
    apiKey: ProcessInfo.processInfo.environment["HF_TOKEN"]!,
    model: "openai/gpt-oss-120b",
    apiVariant: .chatCompletions
)

Gotchas and compatibility in AnyLanguageModel 1.0

API keys come from a closure instead of a string, so an app can fetch short-lived tokens from its own server. Hugging Face separates letting people bring their own keys from routing requests through a proxy. Reasoning is now part of the transcript. On a provider switch, reasoning blocks are omitted from the request automatically when the new provider cannot replay them. Hosted providers get guided generation, tool calling with streaming, and token usage on responses, matching the local feature set. AnyLanguageModel also runs on Linux, so the same code can run on a server.

OS 27 is the line for several paths. Image attachments use Foundation Models 27 syntax, including the system model on iOS, macOS, and visionOS 27. Private Cloud Compute is supported on OS 27. Any model that conforms to Foundation Models' LanguageModel protocol, including Core AI models, is also an OS 27 path. Local open weights go through llama.cpp, MLX, or Core ML, and the 1.0.0 sample turns MLX on with the trait MLX. Weights that do not fit the device stay on the same session through Inference Providers, including GLM-5.3 at about 1.5 TB in BF16.

What to watch after AnyLanguageModel 1.0

Hugging Face treats language models as one of many model kinds developers can put in a product, and is bringing the same approach to more capabilities: familiar Swift APIs, with a choice of models running on the device. The follow-ups named in the announcement are models that decide, and models that listen. Both are coming soon. No date or model id is attached to either one. What shipped on October 20, 2026 is AnyLanguageModel 1.0, swift-huggingface 1.0, and swift-xet 1.0.

Until those on-device capabilities are available, the split that 1.0 already documents is size. Gemma 4 E2B at about 3.4 GB and LFM2.5 2.6B at about 1.7 GB are the iPhone pair. Qwen3.8 27B at about 16 GB is the MLX model for a Mac with 32 GB of memory or more, selected with mlx-community/Qwen3.8-27B-4bit. GLM-5.3 at about 1.5 TB in BF16, and openai/gpt-oss-120b, are the Inference Providers examples. Mattt credits feedback and contributions for making AnyLanguageModel more useful to app developers.

Developer Action Items

  • ☐ Diff the official changelog for OpenAI / Anthropic / Gemini 1.0 before you bump β€” APIs, defaults, and removed flags only.
  • ☐ Install through the vendor's documented channel in staging; keep a one-command rollback and time-box the canary.
  • ☐ Grep your repo for old flag names, lockfile pins, and plugin versions that the notes mark as breaking.
  • ☐ Prefer the first patch cut over the day-zero tag unless you have a reason to be on the leading edge.
  • ☐ If Hugging Face Blog did not name a region, plan, or SKU, screenshot the official availability line before you promise it to users.

AnyLanguageModel 1.0 FAQ

What did Hugging Face ship in AnyLanguageModel 1.0?

AnyLanguageModel 1.0, swift-huggingface 1.0, and swift-xet 1.0 shipped on October 20, 2026. AnyLanguageModel is a drop-in for Apple's Foundation Models framework: swap import FoundationModels for import AnyLanguageModel and keep the same session across the system model, llama.cpp, MLX, Core ML, and hosted providers.

Which hosted APIs does AnyLanguageModel 1.0 support?

OpenAI Chat Completions and Responses, Open Responses, Anthropic Messages with adaptive thinking and effort, Google Gemini, Ollama, Private Cloud Compute on OS 27, Hugging Face Inference Providers, and other OpenAI-compatible endpoints such as OpenRouter via a custom base URL.

How big are the local models named in the AnyLanguageModel 1.0 announcement?

Gemma 4 E2B from Google is about 3.4 GB in GGUF at Q4_0 with quantization-aware training, and LFM2.5 2.6B from Liquid AI is about 1.7 GB in GGUF at Q4_K_M; both fit an iPhone. Qwen3.8 27B from Alibaba is about 16 GB at 4 bits and needs a Mac with 32 GB of memory or more. GLM-5.3 from Z.ai is about 1.5 TB in BF16 and needs four maxed-out Mac Studios, or Inference Providers.

How do I pin AnyLanguageModel 1.0 and select a model in Swift?

Pin the GitHub package huggingface/AnyLanguageModel from version 1.0.0, with the MLX trait when using that backend, and import AnyLanguageModel. Select MLX weights with MLXLanguageModel(modelId: "mlx-community/Qwen3.8-27B-4bit"). For Inference Providers, use OpenAILanguageModel with base URL https://router.huggingface.co/v1/, HF_TOKEN, model openai/gpt-oss-120b, and apiVariant chatCompletions.

What is Hugging Face building after AnyLanguageModel 1.0?

Familiar Swift APIs with a choice of models running on the device. The announcement names two coming kinds, models that decide and models that listen, and does not give a date or a model id.

Sources

Dillip Chowdary

Author

Dillip Chowdary

Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.

Related on Tech Bytes

Advertisement

5-min tech signal

Weekday briefing for engineers who skip the noise.

No spam Β· Unsubscribe anytime

Advertisement

✈️ CareerPilot

Your AI job-search copilot

Match your resume against live Ashby, Greenhouse & Lever openings β€” fit scores, job-specific resume optimization and email alerts.

Find matching jobs β†’

Free Tools

Browse all tools β†’