mlx-swift
mlx-swift copied to clipboard
Added MLXCustomFunction + MLXClosure
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-filesto 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)
Looks really interesting!
@davidkoski thank you for the feedback, just pushed the changes, let me know if anything else stands out.