{"slug": "anylanguagemodel-1-0-one-year-of-local-models-on-apple-platforms", "title": "AnyLanguageModel 1.0: One Year of Local Models on Apple Platforms", "summary": "Hugging Face released AnyLanguageModel 1.0, a drop-in replacement for Apple's Foundation Models framework that lets Swift developers swap `import FoundationModels` for `import AnyLanguageModel` and run the same session code against local models via llama.cpp, MLX and Core ML or hosted providers including OpenAI, Anthropic, Google Gemini, Ollama and Hugging Face Inference Providers. The 1.0 release, arriving a year and dozens of releases after the project began, adds tool calling and guided generation across every provider, image support using Foundation Models 27 syntax, and support for any model conforming to Foundation Models' `LanguageModel` protocol on OS 27, including Core AI models. It ships alongside swift-huggingface 1.0 and swift-xet 1.0, which bring accelerated model downloads from the Hub to Swift apps, and API keys are now supplied via a closure so apps can fetch short-lived tokens from their own server.", "body_md": "[Text Generation •  3B • Updated   •  750k  •  386](https://huggingface.co/LiquidAI/LFM2.5-2.6B-GGUF)  \n\n# \n\t\tAnyLanguageModel 1.0: One Year of Local Models on Apple Platforms\n\t\n\n [Update on GitHub](https://github.com/huggingface/blog/blob/main/anylanguagemodel-1-0.md)\n\n[AnyLanguageModel](https://huggingface.co/blog/anylanguagemodel)on this blog: a drop-in replacement for Apple's Foundation Models framework that lets you choose the model and provider your app uses. We heard from app developers who were curious about local models but weren't always sure how to get started. They also wanted to avoid the added complexity of supporting multiple inference providers. AnyLanguageModel grew out of that feedback.\n\nLocal and hosted inference each have their strengths, and both have a role in building this new generation of intelligent apps. A shared API makes it easier to choose the right model for each task.\n\nA year and dozens of releases later,\n[AnyLanguageModel 1.0](https://github.com/huggingface/AnyLanguageModel/releases/tag/1.0.0) is out,\nalong with [swift-huggingface 1.0](https://github.com/huggingface/swift-huggingface/releases/tag/1.0.0)\nand [swift-xet 1.0](https://github.com/huggingface/swift-xet/releases/tag/1.0.0).\n\nHere's what changed, and what's next:\n\n## \n\t\tA drop-in compatible API\n\t\n\nThe core idea of AnyLanguageModel remains the same:\nuse the Foundation Models API with the model that fits your app.\nTo get started, change your `import` statement:\n\n``` python\n- import FoundationModels\n+ import AnyLanguageModel\n```\n\nThe 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 below.\n\nOver the past year, we've added several major features:\n\n- **Tool calling** works with every provider.\n- **Guided generation** works with every provider, too,\nincluding nested`@Generable` types and arrays of them.\n- **Image support** lets you attach images to prompts\nusing Foundation Models 27's syntax,\nincluding when you use the system model on iOS, macOS, and visionOS 27.\n\nOn OS 27, AnyLanguageModel also works with\nany model that conforms to Foundation Models' `LanguageModel` protocol,\nincluding [Core AI](https://github.com/apple/coreai-models) models.\n\nAlongside AnyLanguageModel, we've built out\n[swift-huggingface](https://github.com/huggingface/swift-huggingface)\nand [swift-xet](https://github.com/huggingface/swift-xet)\nto bring accelerated model downloads from the Hub to Swift apps.\n\n## \n\t\tHosted models, too\n\t\n\nSupport for hosted models expanded this year, too. AnyLanguageModel now supports:\n\n- OpenAI's Chat Completions and Responses APIs\n- [Open Responses](https://www.openresponses.org) ,\nfor any provider with a compatible endpoint\n- Anthropic's Messages API, with adaptive thinking and effort options\n- Google's Gemini API\n- Ollama\n- Private Cloud Compute, on OS 27\n- [Hugging Face Inference Providers](https://huggingface.co/docs/inference-providers/index) ,\nand other OpenAI-compatible endpoints such as OpenRouter,\nthrough a custom base URL\n\nWith Inference Providers, you can use open-weight models that are too big to run on the device with the same session code:\n\n``` js\nlet model = OpenAILanguageModel(\n    baseURL: URL(string: \"https://router.huggingface.co/v1/\")!,\n    apiKey: ProcessInfo.processInfo.environment[\"HF_TOKEN\"]!,\n    model: \"openai/gpt-oss-120b\",\n    apiVariant: .chatCompletions\n)\n```\n\nHosted providers get the same features as local models: guided generation, tool calling with streaming, and token usage on responses.\n\nReasoning is now part of the transcript too. When you switch providers, reasoning blocks are automatically omitted from requests if the new provider can't replay them.\n\nAPI keys come from a closure instead of a string,\nso your app can fetch short-lived tokens from your own server.\nThe [README](https://github.com/huggingface/AnyLanguageModel#api-credentials-and-security)\nexplains when to let people bring their own keys\nand when to route requests through a proxy.\n\nAnyLanguageModel also runs on Linux, so the same code can work on a server.\n\n## \n\t\tOpen-weight models got better\n\t\n\nWhile we've made local models easier to use, the models themselves have become more capable, making the small ones a good place to start. Here are some of the most downloaded models on the Hub right now:\n\n- [Gemma 4 E2B](https://huggingface.co/google/gemma-4-E2B-it-qat-q4_0-gguf) from Google,\nin GGUF, about 3.4 GB at`Q4_0` with quantization-aware training.\n- [LFM2.5 2.6B](https://huggingface.co/LiquidAI/LFM2.5-2.6B-GGUF) from Liquid AI,\nin GGUF, about 1.7 GB at`Q4_K_M` .\n- [Qwen3.8 27B for MLX](https://huggingface.co/mlx-community/Qwen3.8-27B-4bit) from Alibaba,\nabout 16 GB at 4 bits.\n\nThe first two fit on an iPhone, and Qwen3.8 27B runs on a Mac with 32 GB of memory or more. Selecting the MLX model takes one line:\n\n``` js\nlet model = MLXLanguageModel(modelId: \"mlx-community/Qwen3.8-27B-4bit\")\n```\n\nAnd if you have four maxed-out Mac Studios handy,\n[GLM-5.3](https://huggingface.co/zai-org/GLM-5.3) from Z.ai takes about 1.5 TB in BF16.\nFor the rest of us, it's available through Inference Providers.\n\n## \n\t\tUpgrading to 1.0\n\t\n\n```\ndependencies: [\n    .package(\n        url: \"https://github.com/huggingface/AnyLanguageModel\",\n        from: \"1.0.0\",\n        traits: [\"MLX\"]\n    )\n]\n```\n\nIf you're upgrading an existing app, see the migration guidance in the\n[AnyLanguageModel](https://github.com/huggingface/AnyLanguageModel/releases/tag/1.0.0),\n[swift-huggingface](https://github.com/huggingface/swift-huggingface/releases/tag/1.0.0),\nand [swift-xet](https://github.com/huggingface/swift-xet/releases/tag/1.0.0) release notes\nfor help updating your code.\n\nCommunity feedback and contributions have shaped several of our major features.\nThank you to [everyone who contributed](https://github.com/huggingface/AnyLanguageModel/graphs/contributors)\nfor helping make AnyLanguageModel more useful to app developers.\n\n## \n\t\tWhat's next\n\t\n\nLanguage models have proven to be a powerful tool for building intelligence into products. They're also one of many kinds of models developers can put to work. We're excited to bring the same approach to more capabilities: familiar Swift APIs with a choice of models running on the device. Coming soon: models that decide, and models that listen.", "url": "https://wpnews.pro/news/anylanguagemodel-1-0-one-year-of-local-models-on-apple-platforms", "canonical_source": "https://huggingface.co/blog/anylanguagemodel-1-0", "published_at": "2026-10-20 00:00:00+00:00", "updated_at": "2026-10-20 12:48:52.506550+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "large-language-models", "ai-products"], "entities": ["Hugging Face", "AnyLanguageModel", "Apple", "Foundation Models", "swift-huggingface", "swift-xet", "Core AI", "OpenAI"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/anylanguagemodel-1-0-one-year-of-local-models-on-apple-platforms", "markdown": "https://wpnews.pro/news/anylanguagemodel-1-0-one-year-of-local-models-on-apple-platforms.md", "text": "https://wpnews.pro/news/anylanguagemodel-1-0-one-year-of-local-models-on-apple-platforms.txt", "jsonld": "https://wpnews.pro/news/anylanguagemodel-1-0-one-year-of-local-models-on-apple-platforms.jsonld"}}