Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MLX text decoder #161

Merged
merged 1 commit into from
Jun 12, 2024
Merged

Conversation

jkrukowski
Copy link
Contributor

@jkrukowski jkrukowski commented Jun 7, 2024

In this PR:

  • added MLXTextDecoder and relevant MLX layers implementations
  • added basic MLXTextDecoder tests

Tested with https://huggingface.co/jkrukowski/whisper-base-mlx-safetensors and https://huggingface.co/jkrukowski/whisper-tiny-mlx-safetensors models.
Tested different pipelines with combinations of MLX and Core decoder / encoder.

Possible improvements:

  • refactor decodeText method, it's a bit messy and copy pasted from TextEncoder
  • add support for weights alignment in MLXTextDecoder
  • make weight loading more efficient, right now we basically load the full model 2 times (for encoder and decoder)
  • add more tests

Copy link
Contributor

@ZachNagengast ZachNagengast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test are passing, awesome! I'll merge this and we can finalize the main PR now. Amazing effort with his project @jkrukowski

@ZachNagengast ZachNagengast merged commit b88079d into argmaxinc:mlx-support Jun 12, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants