CONNECT WITH US
AI & Deeptech

AI & Deeptech

AnyLanguageModel 1.0: One Year of Local Models on Apple Platforms

Hugging Face logo

Published on

Add as a preferred source on Google
AnyLanguageModel 1.0: One Year of Local Models on Apple Platforms

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.

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:

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.

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.

With Inference Providers, you can use open-weight models that are too big to run on the device with the same session code:

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.


Source link

Disclaimer

We strive to uphold the highest ethical standards in all of our reporting and coverage. We TheMorningPulse.fyi want to be transparent with our readers about any potential conflicts of interest that may arise in our work. It's possible that some of the investors we feature may have connections to other businesses, including competitors or companies we write about. However, we want to assure our readers that this will not have any impact on the integrity or impartiality of our reporting. We are committed to delivering accurate, unbiased news and information to our audience, and we will continue to uphold our ethics and principles in all of our work. Thank you for your trust and support.