mlx-swift-chat  by preternatural-explore

SwiftUI app for local LLM inference on Apple silicon

Created 1 year ago
421 stars

Top 69.9% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a native SwiftUI application for running local Large Language Models (LLMs) on Apple Silicon devices, leveraging the MLX framework. It targets developers and power users seeking a user-friendly interface to experiment with LLMs offline, offering real-time inference and a straightforward model management system.

How It Works

The application utilizes Apple's MLX framework, a high-performance machine learning library optimized for Apple Silicon. It provides a native SwiftUI frontend for seamless interaction with MLX-powered LLMs, enabling local execution of models like Llama and Mistral. The architecture focuses on on-device processing for privacy and real-time performance.

Quick Start & Requirements

  • Installation: Open the Xcode project, select your signing team, set the destination to "My Mac," and click "Run."
  • Prerequisites: Apple Silicon Mac (M1/M2/M3) with macOS 14.0+ or A-Series chip (iPad, iPhone) with iOS 17.2+.
  • Model Download: Models are downloaded via the "Manage Models" feature within the app. Recommended starting model: Nous-Hermes-2-Mistral-7B-DPO-4bit-MLX.
  • Documentation: MLX Swift Chat GitHub Repository

Highlighted Details

  • Supports Mistral, Llama, Phi, and Gemma models (Gemma may have issues).
  • Enables local LLM execution on Apple Silicon for real-time inference.
  • User-friendly SwiftUI interface with model management and download capabilities.
  • No data collection; all processing is done on-device.

Maintenance & Community

The project is under active development. Support for iOS is planned. The project acknowledges contributions from buh/CompactSlider, ml-explore/mlx-swift, and huggingface/swift-chat.

Licensing & Compatibility

The project's license is not explicitly stated in the README. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

This project is not intended for production deployment. Some models may require additional implementation to function correctly. iOS support is listed as a future enhancement.

Health Check
Last Commit

10 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
3 stars in the last 30 days

Explore Similar Projects

Starred by Junyang Lin Junyang Lin(Core Maintainer at Alibaba Qwen), Georgi Gerganov Georgi Gerganov(Author of llama.cpp, whisper.cpp), and
1 more.

LLMFarm by guinmoon

0.4%
2k
iOS/MacOS app for local LLM inference
Created 2 years ago
Updated 1 month ago
Starred by Pietro Schirano Pietro Schirano(Founder of MagicPath), Awni Hannun Awni Hannun(Author of MLX; Research Scientist at Apple), and
2 more.

mlx-swift-examples by ml-explore

0.5%
2k
Swift examples for MLX models
Created 1 year ago
Updated 2 days ago
Feedback? Help us improve.