mlx-swift-examples
mlx-swift-examples copied to clipboard
Examples using MLX Swift
The `ModelFactory` types only have `load...` entry points that typically handle both downloading and loading models. It's possible to pull out the download logic by directly calling in to `MLXLMCommon.downloadModel(...)`,...
I'm looking into how feasible it would be to interrupt an in-progress LLM or VLM generation. It seems that it's reasonably straightforward to cancel once the output tokens are being...
Things to add to MediaProcessing: - centerCrop ```swift public static func centerCrop(_ extent: CGRect, size: CGSize) -> CGRect public static func centerCrop(_ image: CIImage, size: CGSize) -> CIImage ``` -...
MediaProcessing.asCIImageSequence should take a visitor that can apply processing to frames and downsample (requires rendering as CIImage is just a promise!) Right now we do this: ```swift var videoFrameResult =...
Hi Community, First off, thank you all for your amazing work on MLX! We’ve been building on this framework in our project [SpeziLLM](https://github.com/StanfordSpezi/SpeziLLM) and its just awesome! 🚀 In our...
Checkout the fork https://github.com/cyrilzakka/mlx-swift-examples
# Description This PR matches the fix for idefics 2 and 3 on mlx-vlm. Source: https://github.com/Blaizzy/mlx-vlm/pull/191 @davidkoski @awni I'm not a swift expert and would love to start contributing. This...
I just deployed the model on my iPhone, and currently i can only ask one question at a time and can’t ask follow-up question. Is there a way to keep...
I've been having a crash in iOS 18.x since I updated all libraries, no crashes on iOS 17.x. The crash takes place when calling GPU.snapshot(). Just to double check I've...
The `loadLoRAData(url:)` method currently only seems to support the `text` data format, e.g. `{"text": "This is an example for the model."}`. See [here](https://github.com/ml-explore/mlx-swift-examples/blob/06dc7ff29a1061319d852cced31a00503c566c46/Libraries/MLXLLM/Lora%2BData.swift#L41C1-L55C2). I was planning to add support for...