Production ML
for Apple Silicon
MLX + Accelerate native backend. PyTorch-compatible API. Zero third-party dependencies in the compute path.
pip install lucid- Tensor methods
- 87
lucid.Tensor - nn classes & fns
- 170
lucid.nn - C++ engine members
- 846
lucid._C.engine - model families
- 49
lucid.models
From import to first step in 13 lines
A drop-in PyTorch-shaped API. Device-aware optimisers, AMP-ready, no CUDA path to keep alive.
import lucid
import lucid.nn as nn
from lucid.optim import AdamW
# Mac Studio M4 Max — MLX on GPU, Accelerate on CPU.
device = lucid.metal_if_available()
model = nn.Sequential(
nn.Linear(784, 256),
nn.GELU(),
nn.Linear(256, 10),
).to(device)
opt = AdamW(model.parameters(), lr=3e-4)
for x, y in dataloader:
loss = nn.functional.cross_entropy(model(x), y)
opt.zero_grad(); loss.backward(); opt.step()Built for the hardware
Every layer of the stack is optimized for Apple Silicon's unified memory architecture.
MLX Native GPU
Metal-accelerated compute on every forward and backward pass. No CUDA, no compromise — purpose-built for Apple Silicon.
Accelerate CPU Kernels
vDSP, vForce, and BLAS/LAPACK from Apple's Accelerate framework power the CPU stream. Zero third-party dependencies.
PyTorch-compatible API
Familiar interface — nn.Module, autograd, optim, DataLoader — so you can focus on the model, not the framework.
Comprehensive Op Surface
linalg, fft, einops, distributions, signal, special math — every standard primitive plus the model zoo.
49 paper-cited families
Every architecture ships with a frozen config, the direct model, task wrappers, and a pretrained factory — all stamped against the original paper.