Repository navigation
mlx-learn 0.1.9 brings dense Ridge, Lasso, and ElasticNet to Apple silicon through direct imports and patch_sklearn(). Ridge uses precompiled Metal kernels for eligible fits and checks the solution against the training data. Lasso and ElasticNet support sample weights, multiple targets, positive coefficients, and warm starts, with dual-gap checks on the original data. LinearRegression gains streaming CPU moments and an exact Metal Gram path for eligible quantized designs.
On an M4 Max, cold LinearRegression fits ran 5.35–17.10× as fast as stock scikit-learn 1.9.1 across five measured workloads. For a 65,536 × 512 correlated float32 design with device="gpu", Lasso and ElasticNet ran 5.39× and 5.27× as fast on the first fit, respectively, and about 9× as fast warm. The fit timings exclude imports and patching. Regression benchmarks · Ridge benchmarks
Apple silicon wheels are available for CPython 3.10–3.13, along with a source distribution.
python -m pip install --upgrade mlx-learn==0.1.9