Conversation
|
Sorry for the maintainers, I pushed this WIP code here for public tracking of a bug I'm sorting first. I'm assuming you're on the same team |
Yep, same people :-) |
d72da8e to
14a5dcf
Compare
7c60522 to
e0769a0
Compare
af108c2 to
ec2f680
Compare
dbd6a34 to
757239b
Compare
757239b to
00eccac
Compare
|
@davidkoski this is ready for review. I've added CI (wasn't able to run it on my fork for some reason). Highly recommend disabling whitespace when viewing this PR. I've added a fair amount of With this change, I was able to run MLXLM, (not VLM) on Linux. I did have to use a custom build with GPU acceleration to run this, as I couldn't use it on CPU mode due to this: ml-explore/mlx#3080 The float16 issue is also present on my macOS device if I run it in docker. So unfortunately I can't make an end-to-end Docker example until we solve CUDA. Working on that though |
|
Yeah, the VLM code probably needs some thinking to separate out the image processing and image representation. The models should all be dealing with MLXArray, hopefully we can just replace MediaProcessing. |
|
|
||
| import Foundation | ||
| import MLX | ||
| import MLXFast |
There was a problem hiding this comment.
We shouldn't need this -- MLXFast is an empty package with some stubs to forward back to MLX. MLX has an enum MLXFast so without import MLXFast the same code should still compile.
There was a problem hiding this comment.
Good one yeah. It's an artifact since this code has been on my machine for a while. Will rid of it
| let x1 = x[.ellipsis, 0 ..< index] | ||
| let x2 = x[.ellipsis, index...] | ||
| return concatenated([-x2, x1], axis: -1) | ||
| #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(visionOS) |
c7d9bd4 to
2ff4d5d
Compare
Proposed changes
Please include a description of the problem or feature this PR is addressing. If there is a corresponding issue, include the issue #.
Checklist
Put an
xin the boxes that apply.pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes