Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving, and Bumblebee all dispatch to the Metal GPU on Apple Silicon with no further integration work.
Highlights:
- Nx.Backend with transparent fallback for uncovered ops
- Nx.Defn.Compiler that threads Bumblebee and Nx.Serving through MLX
- Fused transformer kernels (rms_norm, layer_norm, rope, scaled-dot-product attention), optionally applied to any Bumblebee model via a shim
- Affine group-wise int2 / int4 / int8 quantisation
- bf16 mixed-precision training
- Per-process Metal command queues for concurrent inference on a shared model
- Runnable Livebooks for DistilBERT QA, Qwen3 quantized generation, MNIST training, Whisper transcription,
and the fused kernels
MLX is vendored in (for now) because the recent command queue threading-related features have not yet been released. The first compile will compile MLX, which can be a bit slow (> 1 min).
macOS / Apple Silicon. Requires Xcode with the Metal toolchain;






















