Skip to main content

Lightweight gradient boosting for Apple Silicon with an MPS/Metal backend

Project description

MPSBoost

PyPI Python

MPSBoost is an early-stage gradient boosting project for Apple Silicon. Its current accelerated backend uses custom Metal compute kernels for squared-error gradients and two-stage histogram construction while keeping one deterministic tree-building implementation shared with the CPU oracle.

Development status: 0.2.0a0 is the first functional regressor milestone. It supports dense numeric regression with a real MPS training path and is still a pre-alpha release with a deliberately narrow feature set.

Installation

python -m pip install mpsboost

Accelerated releases provide prebuilt Apple Silicon wheels; normal users will not need a heavyweight framework, package manager, CMake, or a local Metal shader compiler.

Estimator-style API

import mpsboost as mps

model = mps.MPSBoostRegressor(
    n_estimators=200,
    learning_rate=0.05,
    max_depth=6,
    device="mps",
)

model.fit(X_train, y_train)
prediction = model.predict(X_test)
model.save_model("model.mpsb")

restored = mps.MPSBoostRegressor(device="mps")
restored.load_model("model.mpsb")

Backend diagnostics

The native backend exposes non-sensitive device diagnostics:

import mpsboost as mps

print(mps.__version__)
print(mps.is_available())
print(mps.system_info())

Project principles

  • Familiar XGBoost/scikit-learn-style Python entry points.
  • device="mps" as the stable user-facing Apple GPU backend name.
  • Custom Metal kernels for tree-specific irregular computation.
  • Prebuilt wheels and no heavyweight Python runtime dependency.
  • Explicit errors instead of silent CPU fallback.
  • End-to-end benchmarks, including preprocessing and synchronization.

Status

The public API currently includes MPSBoostRegressor, is_available, system_info, and __version__. Training supports dense finite float32/float64-compatible data, squared error, deterministic quantization, depth-limited histogram trees, model save/load, and explicit device="mps" or diagnostic device="cpu" selection.

Classification, missing values, sparse matrices, categorical features, sampling, early stopping, GPU split scanning, GPU row partitioning, and GPU prediction are not implemented in this milestone. Small datasets are expected to be slower on the GPU because fixed device setup and synchronization costs dominate; the checked-in benchmark report preserves this regression region alongside larger wins.

Independence notice

MPSBoost is an independent open-source project. It is not affiliated with, endorsed by, or sponsored by Apple Inc., the XGBoost project, or the scikit-learn project. Apple, Metal, and Metal Performance Shaders may be trademarks of Apple Inc.

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

mpsboost-0.2.0a0-cp313-cp313-macosx_13_0_arm64.whl (180.0 kB view details)

Uploaded CPython 3.13macOS 13.0+ ARM64

mpsboost-0.2.0a0-cp310-cp310-macosx_13_0_arm64.whl (176.3 kB view details)

Uploaded CPython 3.10macOS 13.0+ ARM64

File details

Details for the file mpsboost-0.2.0a0-cp313-cp313-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for mpsboost-0.2.0a0-cp313-cp313-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 eb202382e4a42524de54599b454c61b0aee77e3e33a616cdc9b248a55bfb5ab7
MD5 5eefe05117a28b1cfcafd3a65c4b592f
BLAKE2b-256 c74c84c145f792256b23e3c02f1a5eb71a54f8340b962e679f164ee969b2f772

See more details on using hashes here.

File details

Details for the file mpsboost-0.2.0a0-cp310-cp310-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for mpsboost-0.2.0a0-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 b71d18287175ba5819b03f3110d7610ccc9101d9b0453e7407218aabcf549a7d
MD5 f6a5c68bfb6684d4bca0b843da1df864
BLAKE2b-256 87ea68e36750c1d4ccd1be1cc6f3bca6cef3abfde07aaf3f36f1352c0ea47ea6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page