swift-mlx-lm

Run local LLM and VLM inference and fine-tuning on Apple Silicon with MLX Swift.

771|340|Updated Oct 2, 2025
One-click install
npx skills add https://github.com/ml-explore/mlx-swift-lm --skill swift-mlx-lm-ml-explore
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: swift-mlx-lm
Source: https://github.com/ml-explore/mlx-swift-lm/tree/main/skills/mlx-swift-lm
Command: npx skills add https://github.com/ml-explore/mlx-swift-lm --skill swift-mlx-lm-ml-explore

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables developers to run powerful Large Language Models (LLMs) and Vision-Language Models (VLMs) directly on Apple Silicon hardware, leveraging the MLX framework for efficient local inference and fine-tuning.

Core Features & Use Cases

  • Local LLM/VLM Inference: Run thousands of models from Hugging Face Hub on your Mac.
  • Fine-tuning & LoRA: Adapt models to specific tasks with LoRA/DoRA fine-tuning.
  • Vision-Language Capabilities: Process images and video alongside text.
  • Use Case: Integrate a state-of-the-art LLM into your macOS application for features like text summarization, code generation, or intelligent chatbots, all running locally without cloud dependencies.

Quick Start

Use the swift-mlx-lm skill to load the Qwen3-4B-4bit model and ask it a question.

Frequently Asked Questions about swift-mlx-lm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run LLM inference locally on Apple Silicon?

You can run LLM inference locally on Apple Silicon by using the MLX Swift framework, which facilitates efficient text generation and streaming directly on your Mac hardware. This supports loading thousands of models from Hugging Face Hub without cloud dependencies.

Can I fine-tune a vision-language model on my Mac?

Yes, you can fine-tune vision-language models (VLMs) on your Mac using the MLX Swift framework. The framework supports LoRA and DoRA fine-tuning to adapt both LLM and VLM architectures to specific tasks, including processing images and video alongside text.

How do I integrate Hugging Face models into a macOS application?

To integrate Hugging Face models into a macOS application, use the MLX Swift framework to load and run thousands of available LLMs locally. This enables features like text summarization and code generation without requiring cloud connectivity.

Does MLX Swift support tool calling and embeddings for local LLMs?

Yes, MLX Swift supports tool calling and embeddings for local LLMs. It provides comprehensive capabilities for local inference, including streaming generation, tool calling, and generating embeddings across various LLM and VLM architectures.

What's the best way to port LLM architectures for local inference on Apple hardware?

The best way to port LLM architectures for local inference on Apple hardware is using the MLX Swift framework. It natively supports model porting across LLM and VLM architectures, ensuring efficient execution tailored for Apple Silicon.