mlx-swift icon indicating copy to clipboard operation
mlx-swift copied to clipboard

Added MLXCustomFunction + MLXClosure

Open nataliyakosmyna opened this issue 1 week ago • 2 comments

Proposed changes

Implemented custom function and VJP functionality in Swift. Based on python implementation. Examples implemented follow Python structure too.

Feedback and suggestions are welcome.

Addresses

  • [x] https://github.com/ml-explore/mlx-swift/issues/181
  • [x] https://github.com/ml-explore/mlx-swift/issues/147
  • [x] https://github.com/ml-explore/mlx-swift/issues/119
  • [x] https://github.com/ml-explore/mlx-swift/issues/112

Checklist

Put an x in the boxes that apply.

  • [x] I have read the CONTRIBUTING document
  • [x] I have run pre-commit run --all-files to format my code / installed pre-commit prior to committing changes
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] I have updated the necessary documentation (if needed)

nataliyakosmyna avatar Nov 24 '25 02:11 nataliyakosmyna

Looks really interesting!

davidkoski avatar Nov 25 '25 01:11 davidkoski

@davidkoski thank you for the feedback, just pushed the changes, let me know if anything else stands out.

nataliyakosmyna avatar Nov 26 '25 03:11 nataliyakosmyna