SyncAI.news, a Varaisys broadcasting
AnyLanguageModel 1.0: One Year of Local Models on Apple Platforms
HF

Hugging Face Blog

· 1 min read

AI LabsHugging Face Blog

AnyLanguageModel 1.0: One Year of Local Models on Apple Platforms

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:

AnyLanguageModel also runs on Linux, so the same code can work on a server.

Original source

This story was published by Hugging Face Blog. SyncAI.news shows a preview; the complete article is on the publisher's site.

Read the full story on huggingface.co

Similar News