├── .circleci └── config.yml ├── .gitignore ├── .pre-commit-config.yaml ├── .swift-format ├── Libraries ├── Llama │ ├── Configuration.swift │ ├── Llama.swift │ ├── README.md │ └── Util.swift ├── MNIST │ ├── Files.swift │ ├── MNIST.h │ ├── MNIST.swift │ ├── README.md │ └── Random.swift └── SentencePiece │ ├── README.md │ ├── SentencePiece-Bridging.h │ ├── SentencePiece.swift │ ├── SentencePiece.xcconfig │ ├── SentencePieceImpl.h │ └── SentencePieceImpl.mm ├── MLXChat ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── bot.imageset │ │ ├── Contents.json │ │ └── chatbot-icon.png │ └── profile.imageset │ │ ├── Contents.json │ │ └── unnamed.jpg ├── Info.plist ├── MLXChat.entitlements ├── MLXChatApp.swift ├── Models │ ├── MessageRow.swift │ └── ParserResult.swift ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json ├── ViewModel.swift └── Views │ ├── ContentView.swift │ ├── DotLoadingView.swift │ ├── HeaderView.swift │ ├── MessageRowView.swift │ └── PreferencePane.swift ├── MLXChatXPCService ├── Info.plist ├── MLXChat.swift ├── MLXChatXPCService.entitlements ├── MLXChatXPCService.swift ├── MLXChatXPCServiceProtocol.swift └── main.swift ├── README.md ├── Tools ├── LinearModelTraining │ ├── LinearModelTraining.swift │ └── README.md ├── Tutorial │ └── Tutorial.swift ├── llm-tool │ ├── LLMTool.swift │ └── README.md └── mnist-tool │ ├── MNISTTool.swift │ └── README.md └── mlx-examples-swift.xcodeproj ├── project.pbxproj ├── project.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ ├── IDEWorkspaceChecks.plist │ └── swiftpm │ └── Package.resolved └── xcshareddata └── xcschemes ├── LinearModelTraining.xcscheme ├── Tutorial.xcscheme ├── llm-tool.xcscheme └── mnist-tool.xcscheme /.circleci/config.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/.circleci/config.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/.gitignore -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/.pre-commit-config.yaml -------------------------------------------------------------------------------- /.swift-format: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/.swift-format -------------------------------------------------------------------------------- /Libraries/Llama/Configuration.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Libraries/Llama/Configuration.swift -------------------------------------------------------------------------------- /Libraries/Llama/Llama.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Libraries/Llama/Llama.swift -------------------------------------------------------------------------------- /Libraries/Llama/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Libraries/Llama/README.md -------------------------------------------------------------------------------- /Libraries/Llama/Util.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Libraries/Llama/Util.swift -------------------------------------------------------------------------------- /Libraries/MNIST/Files.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Libraries/MNIST/Files.swift -------------------------------------------------------------------------------- /Libraries/MNIST/MNIST.h: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /Libraries/MNIST/MNIST.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Libraries/MNIST/MNIST.swift -------------------------------------------------------------------------------- /Libraries/MNIST/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Libraries/MNIST/README.md -------------------------------------------------------------------------------- /Libraries/MNIST/Random.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Libraries/MNIST/Random.swift -------------------------------------------------------------------------------- /Libraries/SentencePiece/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Libraries/SentencePiece/README.md -------------------------------------------------------------------------------- /Libraries/SentencePiece/SentencePiece-Bridging.h: -------------------------------------------------------------------------------- 1 | #import "SentencePieceImpl.h" 2 | -------------------------------------------------------------------------------- /Libraries/SentencePiece/SentencePiece.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Libraries/SentencePiece/SentencePiece.swift -------------------------------------------------------------------------------- /Libraries/SentencePiece/SentencePiece.xcconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Libraries/SentencePiece/SentencePiece.xcconfig -------------------------------------------------------------------------------- /Libraries/SentencePiece/SentencePieceImpl.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Libraries/SentencePiece/SentencePieceImpl.h -------------------------------------------------------------------------------- /Libraries/SentencePiece/SentencePieceImpl.mm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Libraries/SentencePiece/SentencePieceImpl.mm -------------------------------------------------------------------------------- /MLXChat/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/Assets.xcassets/AccentColor.colorset/Contents.json -------------------------------------------------------------------------------- /MLXChat/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/Assets.xcassets/AppIcon.appiconset/Contents.json -------------------------------------------------------------------------------- /MLXChat/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/Assets.xcassets/Contents.json -------------------------------------------------------------------------------- /MLXChat/Assets.xcassets/bot.imageset/Contents.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/Assets.xcassets/bot.imageset/Contents.json -------------------------------------------------------------------------------- /MLXChat/Assets.xcassets/bot.imageset/chatbot-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/Assets.xcassets/bot.imageset/chatbot-icon.png -------------------------------------------------------------------------------- /MLXChat/Assets.xcassets/profile.imageset/Contents.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/Assets.xcassets/profile.imageset/Contents.json -------------------------------------------------------------------------------- /MLXChat/Assets.xcassets/profile.imageset/unnamed.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/Assets.xcassets/profile.imageset/unnamed.jpg -------------------------------------------------------------------------------- /MLXChat/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/Info.plist -------------------------------------------------------------------------------- /MLXChat/MLXChat.entitlements: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/MLXChat.entitlements -------------------------------------------------------------------------------- /MLXChat/MLXChatApp.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/MLXChatApp.swift -------------------------------------------------------------------------------- /MLXChat/Models/MessageRow.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/Models/MessageRow.swift -------------------------------------------------------------------------------- /MLXChat/Models/ParserResult.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/Models/ParserResult.swift -------------------------------------------------------------------------------- /MLXChat/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/Preview Content/Preview Assets.xcassets/Contents.json -------------------------------------------------------------------------------- /MLXChat/ViewModel.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/ViewModel.swift -------------------------------------------------------------------------------- /MLXChat/Views/ContentView.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/Views/ContentView.swift -------------------------------------------------------------------------------- /MLXChat/Views/DotLoadingView.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/Views/DotLoadingView.swift -------------------------------------------------------------------------------- /MLXChat/Views/HeaderView.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/Views/HeaderView.swift -------------------------------------------------------------------------------- /MLXChat/Views/MessageRowView.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/Views/MessageRowView.swift -------------------------------------------------------------------------------- /MLXChat/Views/PreferencePane.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChat/Views/PreferencePane.swift -------------------------------------------------------------------------------- /MLXChatXPCService/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChatXPCService/Info.plist -------------------------------------------------------------------------------- /MLXChatXPCService/MLXChat.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChatXPCService/MLXChat.swift -------------------------------------------------------------------------------- /MLXChatXPCService/MLXChatXPCService.entitlements: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChatXPCService/MLXChatXPCService.entitlements -------------------------------------------------------------------------------- /MLXChatXPCService/MLXChatXPCService.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChatXPCService/MLXChatXPCService.swift -------------------------------------------------------------------------------- /MLXChatXPCService/MLXChatXPCServiceProtocol.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChatXPCService/MLXChatXPCServiceProtocol.swift -------------------------------------------------------------------------------- /MLXChatXPCService/main.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/MLXChatXPCService/main.swift -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/README.md -------------------------------------------------------------------------------- /Tools/LinearModelTraining/LinearModelTraining.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Tools/LinearModelTraining/LinearModelTraining.swift -------------------------------------------------------------------------------- /Tools/LinearModelTraining/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Tools/LinearModelTraining/README.md -------------------------------------------------------------------------------- /Tools/Tutorial/Tutorial.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Tools/Tutorial/Tutorial.swift -------------------------------------------------------------------------------- /Tools/llm-tool/LLMTool.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Tools/llm-tool/LLMTool.swift -------------------------------------------------------------------------------- /Tools/llm-tool/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Tools/llm-tool/README.md -------------------------------------------------------------------------------- /Tools/mnist-tool/MNISTTool.swift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Tools/mnist-tool/MNISTTool.swift -------------------------------------------------------------------------------- /Tools/mnist-tool/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/Tools/mnist-tool/README.md -------------------------------------------------------------------------------- /mlx-examples-swift.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/mlx-examples-swift.xcodeproj/project.pbxproj -------------------------------------------------------------------------------- /mlx-examples-swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/mlx-examples-swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata -------------------------------------------------------------------------------- /mlx-examples-swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/mlx-examples-swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist -------------------------------------------------------------------------------- /mlx-examples-swift.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/mlx-examples-swift.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved -------------------------------------------------------------------------------- /mlx-examples-swift.xcodeproj/xcshareddata/xcschemes/LinearModelTraining.xcscheme: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/mlx-examples-swift.xcodeproj/xcshareddata/xcschemes/LinearModelTraining.xcscheme -------------------------------------------------------------------------------- /mlx-examples-swift.xcodeproj/xcshareddata/xcschemes/Tutorial.xcscheme: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/mlx-examples-swift.xcodeproj/xcshareddata/xcschemes/Tutorial.xcscheme -------------------------------------------------------------------------------- /mlx-examples-swift.xcodeproj/xcshareddata/xcschemes/llm-tool.xcscheme: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/mlx-examples-swift.xcodeproj/xcshareddata/xcschemes/llm-tool.xcscheme -------------------------------------------------------------------------------- /mlx-examples-swift.xcodeproj/xcshareddata/xcschemes/mnist-tool.xcscheme: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/alfianlosari/mlx-swift-examples/HEAD/mlx-examples-swift.xcodeproj/xcshareddata/xcschemes/mnist-tool.xcscheme --------------------------------------------------------------------------------