# MLX Swift LM

A Swift package for building tools and applications with large language models and vision-language models using MLX Swift, with LoRA and full fine-tuning support.

MLX Swift LM is a Swift package for building tools and applications around large language models and vision-language models using MLX Swift. It handles model loading through integrations with several tokenizer and model-downloading packages, supports low-rank (LoRA) and full fine-tuning including for quantized models, and implements many LLM and VLM model architectures.

It provides common APIs shared between LLMs and VLMs, example implementations for large language models, vision-language models and embedding models, grammar-constrained generation to JSON Schema or EBNF for any MLX model, and a bridge into Apple's FoundationModels framework for use with LanguageModelSession on the macOS, iOS and visionOS 27 SDKs. It is added to a project through Swift Package Manager, and a companion MLX Swift Examples repository shows example applications built on it.

Website: https://github.com/ml-explore/mlx-swift-lm
