AnyLanguageModel 1.0: One Year of Local Models on Apple Platforms
Back to Articles AnyLanguageModel 1.
0: One Year of Local Models on Apple Platforms Published October 20, 2026 Update on GitHub Upvote - Mattt mattt Follow Last November, we introduced 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.
Local 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.A year and dozens of releases later, AnyLanguageModel 1.0 is out, along with swift-huggingface 1.
0 and swift-xet 1.0.Here's what changed, and what's next: A drop-in compatible API The core idea of AnyLanguageModel remains the same: use the Foundation Models API with the model that fits your app.
To get started, change your import statement: - import FoundationModels + import AnyLanguageModel 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 below.
Over the past year, we've added several major features: Tool calling works with every provider.Guided generation works with every provider, too, including nested @Generable types and arrays of them.
Image support lets you attach images to prompts using Foundation Models 27's syntax, including when you use the system model on iOS, macOS, and visionOS 27.On OS 27, AnyLanguageModel also works with any model that conforms to Foundation Models' LanguageModel protocol, including Core AI models.
Alongside AnyLanguageModel, we've built out swift-huggingface and swift-xet to bring accelerated model downloads from the Hub to Swift apps.Hosted models, too Support for hosted models expanded this year, too.
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 Private Cloud Compute, on OS 27 Hugging Face Inference Providers, and other OpenAI-compatible endpoints such as OpenRouter, through a custom base URL With Inference Providers, you can use open-weight models that are too big to run on the device with the same session code: let model = OpenAILanguageModel( baseURL: URL(string: "https://router.
huggingface.co/v1/")!, apiKey: ProcessInfo.processInfo.environment["HFTOKEN"]!, model: "openai/gpt-oss-120b", apiVariant: .chatCompletions ) 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 you switch providers, reasoning blocks are automatically omitted from requests if the new provider can't replay them.API keys come from a closure instead of a string, so your app can fetch short-lived tokens from your own server.
The README explains when to let people 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 While 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: Gemma 4 E2B from Google, in GGUF, about 3.
4 GB at Q40 with quantization-aware training.LFM2.5 2.6B from Liquid AI, in GGUF, about 1.7 GB at Q4KM.Qwen3.8 27B for MLX from Alibaba, about 16 GB at 4 bits.The 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: let model = MLXLanguageModel(modelId: "mlx-community/Qwen3.8-27B-4bit") And if you have four maxed-out Mac Studios handy, GLM-5.3 from Z.ai takes about 1.5 TB in BF16.For the rest of us, it's available through Inference Providers.Upgrading to 1.
0 dependencies: [ .package( url: "https://github.com/huggingface/AnyLanguageModel", from: "1.0.0", traits: ["MLX"] ) ] If you're upgrading an existing app, see the migration guidance in the AnyLanguageModel, swift-huggingface, and swift-xet release notes for help updating your code.
Community feedback and contributions have shaped several of our major features.Thank you to everyone who contributed for helping make AnyLanguageModel more useful to app developers.What's next Language 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.
Links AnyLanguageModel on GitHub swift-huggingface on GitHub swift-xet on GitHub Introducing AnyLanguageModel Introducing swift-huggingface Models mentioned in this article 4 More Articles from our Blog mlxopen-sourcecommunity Jun Kim, oMLX creator and maintainer, joins Hugging Face to support the MLX community +1 98 September 22, 2026 announcementmlxllm The PR you would have opened yourself 74 April 16, 2026 Community EditPreview Upload images, audio, and videos by dragging in the text input, pasting, or clicking here.
Tap or paste here to upload images Comment · Sign up or log in to comment Upvote - Models mentioned in this article 4
Related
相關文章
雙11 iPhone Duo貨源大戰:蘋果為什麼把更多貨交給天貓?
10月20日晚8點,天貓雙11將正式開賣。iPhone Duo首發的貨源之戰,也成了今年雙11各大電商平臺實力較量的一個縮影。10月16日晚8點,蘋果首款摺疊屏手機iPhone Duo正式開啟預售。毫無懸念,首批貨源短時間內迅速售罄,蘋果官網發貨週期甚至已排至2027年,二手平臺上更出現了加價近萬元的盛況。開售2個小時後,經多平臺實測對比,全網還能正常下單的渠道僅剩兩個:蘋果官網,以及蘋果天貓官方旗艦店。
檢方羈押申請揭 OpenAI 錄音門新線:嫌疑人被捕前 4 天仍密聊沙特王室
被控在舊金山 OpenAI 高管會議室藏匿錄音設備的沙特籍工程師阿卜杜勒拉赫曼·阿爾福贊,在 2025 至 2026 年間,持續通過 WhatsApp 與一名沙特王室成員頻繁聯絡。舊金山聯邦檢察官辦公室提交的這份文件顯示,最晚到 10 月 5 日——也就是他落網前 4 天,阿爾福贊仍與這位王室人員保持聯繫。
曝蘋果首款“消費級機器人”,定價1000美元
編譯 | 栗子 編輯 | 雲鵬 10月20日消息,蘋果上週發佈了售價299美元的智能家居屏HomeView,外界普遍將其視為蘋果補齊智能家居短板的第一步。但彭博社馬克·古爾曼在最新一期《Power On》通訊中披露了一個更值得關注的信號: 蘋果已經在開發HomeView的高端版本,內部代號J595,配備電動機械臂,屏幕可360度旋轉,並能通過語音識別自動轉向正在說話的人。
山姆出手整治"AI 下架好物"謠言:數千條假帖引流牟利
據其披露,相關帖子數量已達數千條,套路高度雷同:部分賬號藉助 AI 生成文案、拼接素材乃至偽造採訪,把洗護、保健品、食品等一批從未在山姆上架過的商品,包裝成"山姆下架好物",借"錯過後悔""會員專屬閉眼入"之類的口吻誘導點擊、引流變現。這套打法的獲利邏輯很清晰——山姆選品自帶"中產信任"標籤,一旦貼上"被下架"的稀缺敘事,最容易戳中消費者怕錯過的心理。
字節火山引擎砸錢"養"AI 劇:月度 TOP10 單部最高獎 20 萬
它瞄準的是用 Seedance 模型生產、並在紅果短劇 App 上線的精品 AI 漫短劇,給創作者真金白銀的扶持。門檻劃得很清楚:真人實拍劇一律不在範圍內,僅接納 AI 漫劇、AI 仿真人劇這類純生成形態。申報作品必須全程由 Seedance 製作,且其中 Seedance 2.
2026灣芯展圓滿落幕:3天展期,近8萬平方米展區迎來超15.67萬人次專業觀眾
10月16日,2026灣區半導體產業生態博覽會(灣芯展WESEMiBAY)在深圳會展中心(福田)圓滿收官。本屆展會規模與能級實現跨越式提升,3天展期,近8萬平方米展區迎來超15.