Swift Machine Learning

Open-source Swift projects categorized as Machine Learning
Swift iOS MacOS AI Coreml

Top 21 Swift Machine Learning Projects

Machine Learning
  1. Bender

    Easily craft fast Neural Networks on iOS! Use TensorFlow models. Metal under the hood.

  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. CoreML-in-ARKit

    Simple project to detect objects and display 3D labels above them in AR. This serves as a basic Template for an ARKit project to use CoreML.

  4. NSFWDetector

    A NSFW (aka porn) detector with CoreML

  5. LlamaChat

    Chat with your favourite LLaMA models in a native macOS app

  6. AIToolbox

    A toolbox of AI modules written in Swift: Graphs/Trees, Support Vector Machines, Neural Networks, PCA, K-Means, Genetic Algorithms

  7. Wax

    Single-file memory layer for AI agents, sub mili-second RAG on Apple Silicon. Metal Optimized On-Device. No Server. No API. One File. Pure Swift (by christopherkarani)

    Project mention: Sub-Millisecond RAG on Apple Silicon. No Server. No API. One File | news.ycombinator.com | 2026-02-17

    The generated post is even in the repo: https://github.com/christopherkarani/Wax/blob/main/SHOW_HN_P...

  8. Swift-Brain

    Artificial intelligence/machine learning data structures and Swift algorithms for future iOS development. bayes theorem, neural networks, and more AI.

  9. TensorSwift

    A lightweight library to calculate tensors in Swift, which has similar APIs to TensorFlow's

  10. CoreMLPlayer

    Try CoreML models on multiple images and videos easily and quickly

  11. SwiftCoreMLTools

    A Swift library for creating and exporting CoreML Models in Swift

  12. Neuron

    A neural network library for Swift (by wvabrinskas)

  13. DL4S

    Accelerated tensor operations and dynamic neural networks based on reverse mode automatic differentiation for every device that can run Swift - from watchOS to Linux

  14. CLIP-Finder2

    CLIP-Finder enables semantic offline searches of images from gallery photos using natural language descriptions or the camera. Built on Apple's MobileCLIP-S0 architecture, it ensures optimal performance and accurate media retrieval.

  15. shadow

    Your computer was paying attention the whole time. 14-modality capture. Proactive intelligence. Computer-use training data. Native macOS. All on-device. Open source. (by ghostwright)

    Project mention: Show HN: Phantom – Open-source AI agent on its own VM that rewrites its config | news.ycombinator.com | 2026-03-30

    Some of the other aspects of the project are quite interesting, I particularly liked https://github.com/ghostwright/shadow I think this has potential, but I am skeptical right now.

    What is the actual cost of this? Can you share your real burn rate through using this, I sort of wanna try but don't want my API Key to go bananas because the agent decided it needed XYZ for "it" and didn't check with me

    I get the appeal for the separate "identity" with email and everything for the agent, but then, if it has little to no supervision, what's the liability extent when it goes rogue? Say it DDoS someone, it exploits something, it does damage, is this like your child/minor and you're the parent/guardian?

  16. glanceables

    Glanceables is a handy macOS desktop app that turns parts of websites into easy-to-view widgets. This app makes it simpler to keep tabs on the important stuff from websites without having to dig around too much. Perfect for quickly checking things like travel times!

  17. seeV

    A macOS command line wrapper around the Apple Vision framework

  18. Revolver

    A framework for building fast genetic algorithms in Swift.

  19. MisakiSwift

    Swift port of Misaki G2P (grapheme-to-phoneme) library that can be used e.g. to generate phonemization for Kokoro text-to-speech engine

    Project mention: Neutts-air – open-source, on device TTS | news.ycombinator.com | 2025-10-06

    If only English support is required eSpeak could be replaced with MisakiSwift, which is under Apache 2.0 https://github.com/mlalma/MisakiSwift

  20. swift-ranker

    Easily Score & Rank Codable Objects with ML

  21. sniglet

    Generate sniglets with machine learning!

  22. NeuralForge

    On-device LLM fine-tuning for Apple Silicon (ANE)

    Project mention: Show HN: NeuralForge – Fine-Tune LLMs on Your Mac Using Apple Neural Engine | news.ycombinator.com | 2026-03-12

    - Some UI features are still stubs (being honest)

    Setup: git clone + bash setup.sh (one command)

    The hardest part was ANE itself. There's basically zero documentation on using it for training — it's designed for inference only. I had to reverse-engineer the MIL compiler, figure out the 119-kernel compilation limit per process, and build an exec() restart mechanism that transparently re-launches the training process to get fresh kernel budget.

    MIT licensed: https://github.com/Khaeldur/NeuralForge

    Happy to answer questions about ANE internals.ye

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Swift Machine Learning discussion

Log in or Post with

Swift Machine Learning related posts

  • Metal-flash-attention: Faster alternative to Metal Performance Shaders

    1 project | news.ycombinator.com | 25 Dec 2023
  • LlamaChat abnormally bad with LLaMa-7B

    1 project | /r/LocalLLaMA | 23 Jun 2023
  • Machine learning modules for swift

    1 project | /r/swift | 25 Oct 2022
  • Should I use accelerate or another library for simple, np.sum-like, matrix operations?

    1 project | /r/swift | 4 May 2022
  • August Review 2021

    3 projects | dev.to | 2 Sep 2021
  • [P] AppleNeuralHash2ONNX: Reverse-Engineered Apple NeuralHash, in ONNX and Python

    4 projects | /r/MachineLearning | 17 Aug 2021
  • Swift on the Server in 2020

    3 projects | news.ycombinator.com | 25 Apr 2021
  • A note from our sponsor - SaaSHub
    www.saashub.com | 14 Jun 2026
    SaaSHub helps you find the best software and product alternatives Learn more →

Index

What are some of the best open-source Machine Learning projects in Swift? This list will help you:

# Project Stars
1 Bender 1,799
2 CoreML-in-ARKit 1,693
3 NSFWDetector 1,663
4 LlamaChat 1,510
5 AIToolbox 803
6 Wax 758
7 Swift-Brain 340
8 TensorSwift 324
9 CoreMLPlayer 167
10 SwiftCoreMLTools 166
11 Neuron 129
12 DL4S 110
13 CLIP-Finder2 91
14 shadow 66
15 glanceables 58
16 seeV 34
17 Revolver 29
18 MisakiSwift 28
19 swift-ranker 13
20 sniglet 8
21 NeuralForge 8

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com