Skip to main content

idun

Tabular learning on the Apple silicon GPU. idun trains three learners on Metal, each with a CPU reference backend:

  • idun_gbm (idun.gbm): histogram gradient boosting with LightGBM's model (depth-wise or leaf-wise trees, quantized gradients, categorical splits, seed bags). Its CPU and Metal backends build the same model, bit for bit.
  • idun_tabm (idun.tabm): TabM (Gorishniy et al., ICLR 2025), a parameter-efficient ensemble of MLPs, for classification, regression, and HL-Gauss regression (a target's Gaussian-smoothed bins).
  • idun_realmlp (idun.realmlp): RealMLP-TD (Holzmüller et al., NeurIPS 2024).

Every fit is deterministic: the same data, parameters and seed give the same bits, run after run (the networks on the same GPU). The estimators follow scikit-learn's conventions without depending on it.

idun is in alpha (0.2): the interfaces may still change.

Install

pip install idun            # Apple silicon with macOS 15 or later: the Metal wheel; elsewhere the CPU-only wheel
pip install idun-numerai    # the Numerai port

Python 3.12–3.14; the only dependencies are NumPy and numba. Metal needs an Apple silicon Mac (M1 or newer) with macOS 15 or later. On Linux and Intel Macs the same package installs without the Metal library and runs the CPU backends; asking for Metal there raises idun.errors.BackendUnavailableError rather than falling back.

Quick start

import idun
from idun.gbm import GBMRegressor
from idun.realmlp import RealMLPRegressor
from idun.tabm import TabMClassifier

gbm = GBMRegressor(num_trees=300, learning_rate=0.05).fit(X_train, y_train)
pred = gbm.predict(X_test)
cpu = GBMRegressor(num_trees=300, learning_rate=0.05, backend="cpu").fit(X_train, y_train)  # the same trees

clf = TabMClassifier(categorical=["sector"]).fit(X_train, labels)  # any labels, two classes or more
proba = clf.predict_proba(X_test)

mlp = RealMLPRegressor(n_seeds=4).fit(X_train, y_train)  # a bag of four seeds; predicts their mean
each = mlp.predict(X_test, per_seed=True)  # (n, 4): each seed's prediction

gbm.save("gbm.idun")
same = idun.load("gbm.idun")

X is a 2-D NumPy array, a pandas DataFrame or an Arrow table; missing values are allowed. The backend is "metal" by default; pass backend="cpu" (idun_gbm) or backend="reference" (the networks' float64 reference) to run on the CPU. Nothing switches backends behind your back.

Below the estimators: idun.Dataset bins a table once for reuse; the functional layer (idun.gbm.train, idun.tabm.train_tabm, idun.realmlp.train_realmlp, seed bags through train_seeds and predict_mean) trains on binned data or on idun.data.PackedDataset, a memory-mapped, date-sorted panel for data larger than memory, which Metal reads without a copy. The docstrings document every public name.

How it compares

On five OpenML tasks on an Apple M1 (8 GB): idun_gbm's RMSE is within 3 % of the median of LightGBM, XGBoost and scikit-learn's HistGradientBoosting at the same nominal settings; idun_tabm and idun_realmlp are within 2 % of their reference implementations (the tabm package and pytabkit on Torch's MPS device) on every task and better on most, and idun_tabm fits in 0.45 of the reference's time.

Licence

Apache-2.0. The NOTICE file lists the work idun builds on, including MLX's Steel GEMM (MIT), whose structure the networks' GEMM kernel adapts.

Metadata

Release files for idun 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for idun 0.2.0
File Size Uploaded Provenance Actions
idun-0.2.0.tar.gz 154.7 kB Without provenance Details for idun-0.2.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for idun 0.2.0
File Interpreter ABI Platform Actions
idun-0.2.0-py3-none-macosx_15_0_arm64.whl Python 3 none macOS 15.0+ ARM64 Details for idun-0.2.0-py3-none-macosx_15_0_arm64.whl
idun-0.2.0-py3-none-any.whl Python 3 none any Details for idun-0.2.0-py3-none-any.whl

Total release size: 517.6 kB

Release files / idun-0.2.0.tar.gz

Download URL idun-0.2.0.tar.gz
Size 154.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d174e1698ac3e2d52b0eb42b65c01f4066352613550fedb20527c96c0bb6ff00
BLAKE2b-256 checksum
How to use checksums
07202c479b8b2706e8b89706b7c5331e1c1fb579b04810c8212ee28455a9300b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / idun-0.2.0-py3-none-macosx_15_0_arm64.whl

Download URL idun-0.2.0-py3-none-macosx_15_0_arm64.whl
Size 187.3 kB
Tags Python 3 macOS 15.0+ ARM64
SHA-256 checksum
How to use checksums
f21a8c5a83c8573ba303c9c4d5a2e3a1c4b1d974cb9f0808bf8ab7569a9d5887
BLAKE2b-256 checksum
How to use checksums
1aa2b9945927d760c0ff4bbffffb417baa5d304215db05e77f90c6fae40a35f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / idun-0.2.0-py3-none-any.whl

Download URL idun-0.2.0-py3-none-any.whl
Size 175.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
12146f04803abac1582523f3de66bc22ac4925539ab5633536e9592d9e79d624
BLAKE2b-256 checksum
How to use checksums
d7576be32e7a94564819aacc9321a4d4931ad477bc03740485ad7d21875ea9f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for idun 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

3 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page