mlx-swift-examples
mlx-swift-examples copied to clipboard
Examples using MLX Swift
The current `ToolSpec` is just a type alias and isn’t very ergonomic or type-safe when defining tools. I’d like to propose a more structured and Swifty API for defining and...
I get the following error when loading a Gemma3 model: `unsupportedModelType("gemma3")`
I used the `mlx-vlm` tool to perform 4-bit quantization on the official FastVLM-0.5B and modified it according to your example, but I encountered this error: ```text MLXNN/Module.swift:570: Fatal error: 'try!'...
@madrob when you get a chance can you please enable actions on this repository? This sets up GitHub actions and is meant for post #441 -- it doesn't run the...
I found the [PR](https://github.com/ml-explore/mlx-lm/pull/443) by Awni cool in mlx-lm about batch generation and was experimenting with it over the weekend. I was able to implement it with *almost* same benchmark...
# Issue The current `TokenIterator` implementation has a few problems that I think should be fixed. The first problem is that the iterator starts prompt processing immediately after being initialized....
While running some third-party LLMs through this project, I noticed that the GPU counters showed that they were not utilizing the new neural accelerator computing units added to the A19...
Pushed this to clean up, will do a few iterations of self review
## Add MaskedRepetitionContext for VLM Image Token Exclusion ### Overview This PR introduces `MaskedRepetitionContext`, a new `LogitProcessor` that extends the existing repetition penalty functionality to support excluding specific tokens (such...
Decoding [PoolingConfiguration](https://github.com/ml-explore/mlx-swift-examples/blame/main/Libraries/Embedders/Pooling.swift#L8) fails for models like [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) because their [1_Pooling/config.json](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2/blob/main/1_Pooling/config.json) does not include the `pooling_mode_lasttoken` field. The struct currently requires this key as a non-optional Bool. **Impact**: As a result,...