Back to directory

AnyLanguageModel

A Swift package that is an API-compatible drop-in replacement for Apple's Foundation Models framework, adding support for Core ML, MLX, llama.cpp and several hosted model APIs behind the same interface.

AnyLanguageModel

AnyLanguageModel lets a Swift developer swap import FoundationModels for import AnyLanguageModel and use the same session and tool-calling interface with custom language model providers instead of only Apple's own on-device models. A delegate can be attached to a session to observe or control tool execution.

Supported providers include Apple's Foundation Models and Private Cloud Compute, Core ML models, MLX models, llama.cpp GGUF models, the Ollama HTTP API, and the Anthropic Messages, Google Gemini, OpenAI Chat Completions, OpenAI Responses and Open Responses APIs.

It requires Swift 6.1 or newer and targets iOS 17, macOS 14 or visionOS 1 and above, plus Linux. Swift 6.1 package traits let a project opt into only the heavy dependencies it needs, such as Core ML or MLX support, keeping binary size and build times down when they are not enabled.

More in Inference

See all 770
  • OpenDecision

    deepanwadhwa.github.io

    An open-source Python package that answers typed questions about application state or documents using a local natural-language-inference model, returning structured choice, score, yes/no or evidence-relation values instead of free text.

  • Lifeboat

    iterate.ai

    A local inference server that puts an OpenAI- and Anthropic-compatible API in front of open-weight language models running on hardware you control, from a laptop to a GPU cluster.

  • Claude S40

    github.com

    An unofficial Claude chat client for 2007-era Nokia Series 40 phones, built as a Java ME app plus a small Go relay server, with web search, reading mode and saved chats.