top | item 43449094

(no title)

zcbenz | 11 months ago

For learning internals of ML frameworks I recommend reading the source code of MLX: https://github.com/ml-explore/mlx .

It is a modern and clean codebase without legacies, and I could understand most things without seeking external articles.

discuss

order

ForceBru|11 months ago

Why is MLX Apple silicon only? Is there something fundamental that prevents it from working on x86? Are some core features only possible on Apple silicon? Or do the devs specifically refuse to port to x86? (Which is understandable, I guess)

I'm asking because it seems to have nice autodiff functionality. It even supports differentiating array mutation (https://ml-explore.github.io/mlx/build/html/usage/indexing.h...), which is something JAX and Zygote.jl can't do. Instead, both have ugly tricks like `array.at[index].set` and the `Buffer` struct.

So it would be cool to have this functionality on a "regular" CPU.

zcbenz|11 months ago

Most features are already supported on x86 CPUs, you can pip install mlx on Linux , and you can even use it on Windows (no official binary release yet but it is building and tests are passing).

saagarjha|11 months ago

I think it relies heavily on unified memory.