Back to directory

AFM — local AI infrastructure for Apple Silicon

A native Swift CLI and local server that turns an Apple Silicon Mac into a private, OpenAI-compatible AI server for Hugging Face MLX models or Apple's on-device Foundation Model.

AFM — local AI infrastructure for Apple Silicon

AFM (the afm command) runs as a native Swift executable, needing no Python runtime, and serves chat, streaming, tool calls, structured output, reasoning and logprobs, plus vision OCR, speech and embeddings, through both a command-line single-prompt mode and a local OpenAI-compatible HTTP server with a built-in web UI. Performance features include prefix caching, concurrent decoding, speculative decoding and metrics.

The project is migrating to a two-layer architecture: AFMKit is a reusable Swift foundation owning the shared model contracts and provider runtimes (Apple Foundation Models, MLX and DwarfStar) for apps and agents that want to embed inference directly, while maclocal-api remains the complete product — the CLI, server, WebUI and packaging — now built on one exact-versioned AFMKit dependency instead of duplicated provider code. It requires an Apple Silicon Mac with a current macOS/Xcode toolchain; MLX weights download from Hugging Face on first use.

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.