A Rust-accelerated, scikit-learn-compatible machine learning library — drop-in replacement with 2-18x speedups
Project description
Thermite ML
A blazing-fast, Rust-accelerated machine learning library for Python — drop-in compatible with scikit-learn.
Thermite: an exothermic reaction that burns at 2500°C. Your ML training should be just as fast.
🚀 Why Thermite?
scikit-learn is the most widely-used ML library in the world (40M+ monthly downloads), but its internals are built on NumPy/SciPy/Cython — fast for 2010, but bottlenecked by 2026 standards.
Thermite rewrites the compute-heavy core natively in Rust using explicit SIMD, Rayon multithreading, and matrixmultiply optimizations. We expose the exact same Python API you already know.
No new syntax. No migration guide. Just import thermite instead of import sklearn.
Unmatched Capabilities
- Zero-Copy Polars Integration: Feed Apache Arrow
polarsDataFrames directly into Thermite's Rust core without any conversion or data duplication. - GPU Acceleration (wgpu): Native WebGPU/CUDA hardware acceleration backend
thermite-gpu. Dispatch compute shaders for massive ensemble aggregations and matrix multiplications instantly by simply addingdevice='gpu'. - True Parallelism (No GIL): Unlike Scikit-Learn which relies on heavy multiprocess pickling via
joblib, Thermite releases the Python GIL during heavy computation.GridSearchCVandRandomizedSearchCVeffortlessly scale across all your cores with zero IPC overhead. - Native Categorical & Sparse Support: Decision Trees handle categorical features natively (bypassing One-Hot Encoding overhead).
LinearRegressionandKMeansnatively ingest and optimizescipy.sparsematrices. - Out-of-Core Learning: Memory too small? Use
.partial_fit()to trainGaussianNBorLogisticRegressionon streaming datasets incrementally.
📈 The Numbers (Performance Superiority)
Thermite offers incredible performance boosts while maintaining 100% accuracy parity.
| Operation | scikit-learn | Thermite | Speedup |
|---|---|---|---|
LogisticRegression.fit (Sparse NLP) |
0.1068s | 0.0059s | 18.22x |
LinearSVC.fit (Sparse TF-IDF) |
0.0244s | 0.0022s | 10.99x |
RandomForest.fit (Categorical Splits) |
0.1806s | 0.0653s | 2.76x |
LinearRegression.fit (Dense 10k) |
0.0238s | 0.0100s | 2.37x |
KMeans.fit (Dense) |
0.0829s | 0.0356s | 2.33x |
GridSearchCV (100 folds, 8 cores) |
~14.0s | ~1.5s | ~9.3x |
Tested on an M2 Apple Silicon chip. See
BENCHMARKS.mdfor reproducible scripts.
🛠 Installation
Thermite v1.0.0 is distributed as pre-compiled wheels for macOS, Linux, and Windows. No Rust toolchain required!
pip install thermite-ml
⚡ Quick Start: scikit-learn Drop-In
# The API is 100% identical to scikit-learn
from thermite.ensemble import RandomForestClassifier
from thermite.model_selection import train_test_split
from thermite.preprocessing import StandardScaler
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
scaler = StandardScaler()
X_train = scaler.fit_transform(X_train)
X_test = scaler.transform(X_test)
# Opt-in to Hardware Acceleration with `device='gpu'`
clf = RandomForestClassifier(n_estimators=100, n_jobs=-1, device='gpu')
clf.fit(X_train, y_train)
print(f"Accuracy: {clf.score(X_test, y_test):.4f}")
🐻❄️ Zero-Copy Polars Integration
Traditional scikit-learn forces you to convert polars DataFrames to pandas or numpy, triggering a massive memory copy. Thermite natively ingests the underlying Apache Arrow memory buffers:
import polars as pl
from thermite.linear_model import LogisticRegression
from thermite.polars_compat import make_polars_pipeline
df = pl.read_csv("100GB_dataset.csv")
# Instantly train directly on the Polars DataFrame
model = make_polars_pipeline(LogisticRegression())
model.fit(df.select(pl.exclude("target")), df["target"])
🏗 System Architecture
Thermite is structured to provide safety, performance, and portability:
thermite-core(Rust): The backbone. Implements the mathematical optimization routines usingndarrayandrayon. Safe, memory-efficient, and brutally fast.thermite-gpu(Rust): WebGPU (wgpu) based compute shader dispatch system targeting Vulkan, Metal, and DX12 dynamically.thermite-binding(Rust/PyO3): The translation layer bridging Python NumPy arrays to Rust contiguous views with zero allocation.thermite(Python): The high-level Python wrappers that mimicscikit-learnestimator APIs, implementing input validation andBaseEstimatorcompatibility.
📦 Supported Algorithms
- Linear Models:
LinearRegression,Ridge,Lasso,LogisticRegression(Binary & Multinomial OvR),LinearSVC. - Ensembles:
RandomForestClassifier,RandomForestRegressor,GradientBoostingClassifier,GradientBoostingRegressor. - Trees:
DecisionTreeClassifier,DecisionTreeRegressor. - Clustering:
KMeans,DBSCAN. - Decomposition:
PCA. - Probabilistic:
GaussianNB. - Preprocessing:
StandardScaler,MinMaxScaler,OneHotEncoder,LabelEncoder. - Pipelines:
Pipeline,GridSearchCV,cross_val_score.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file thermite_ml-1.0.0.tar.gz.
File metadata
- Download URL: thermite_ml-1.0.0.tar.gz
- Upload date:
- Size: 69.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6488f74480268fa9bc8fa826c96710c85428656bc6788c777f2384efb22f9c5e
|
|
| MD5 |
11617d3930b9e28e5711384ecead7f45
|
|
| BLAKE2b-256 |
e9716ce6836d982aa50dcc528c8489e349a71ea8a59a99c52666e646a43bad3b
|
Provenance
The following attestation bundles were made for thermite_ml-1.0.0.tar.gz:
Publisher:
release.yml on KartavyaDikshit/Thermite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thermite_ml-1.0.0.tar.gz -
Subject digest:
6488f74480268fa9bc8fa826c96710c85428656bc6788c777f2384efb22f9c5e - Sigstore transparency entry: 2153831218
- Sigstore integration time:
-
Permalink:
KartavyaDikshit/Thermite@0b6c8cfd78cbe81cf567c2dba511c8e0cbfb58d5 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/KartavyaDikshit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0b6c8cfd78cbe81cf567c2dba511c8e0cbfb58d5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file thermite_ml-1.0.0-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: thermite_ml-1.0.0-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 688.9 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26a4b7998e755c097302e56571c0457a45d59e838ebc814aa1648242859f53a2
|
|
| MD5 |
996b0d1a07011e6a9b5508ab2e9b7dcb
|
|
| BLAKE2b-256 |
08d4e843988fdcdad1df24572e7b91ef61a3d7d6083efa35f74aeb2b34c3ed16
|
Provenance
The following attestation bundles were made for thermite_ml-1.0.0-cp38-abi3-win_amd64.whl:
Publisher:
release.yml on KartavyaDikshit/Thermite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thermite_ml-1.0.0-cp38-abi3-win_amd64.whl -
Subject digest:
26a4b7998e755c097302e56571c0457a45d59e838ebc814aa1648242859f53a2 - Sigstore transparency entry: 2153831370
- Sigstore integration time:
-
Permalink:
KartavyaDikshit/Thermite@0b6c8cfd78cbe81cf567c2dba511c8e0cbfb58d5 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/KartavyaDikshit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0b6c8cfd78cbe81cf567c2dba511c8e0cbfb58d5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file thermite_ml-1.0.0-cp38-abi3-win32.whl.
File metadata
- Download URL: thermite_ml-1.0.0-cp38-abi3-win32.whl
- Upload date:
- Size: 607.1 kB
- Tags: CPython 3.8+, Windows x86
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82d270976863d8e104602ca97e242b04462d5da2dabfe26427def48efdaad6fd
|
|
| MD5 |
3f9c939dfed1216159ada3d56fae593a
|
|
| BLAKE2b-256 |
13d865dc1dc7b8bf77b3a96e53769d68b7698d03cdc4745185b8682f4cdf0274
|
Provenance
The following attestation bundles were made for thermite_ml-1.0.0-cp38-abi3-win32.whl:
Publisher:
release.yml on KartavyaDikshit/Thermite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thermite_ml-1.0.0-cp38-abi3-win32.whl -
Subject digest:
82d270976863d8e104602ca97e242b04462d5da2dabfe26427def48efdaad6fd - Sigstore transparency entry: 2153831268
- Sigstore integration time:
-
Permalink:
KartavyaDikshit/Thermite@0b6c8cfd78cbe81cf567c2dba511c8e0cbfb58d5 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/KartavyaDikshit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0b6c8cfd78cbe81cf567c2dba511c8e0cbfb58d5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file thermite_ml-1.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: thermite_ml-1.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 858.0 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bde3174432e385eec41c282c0db565f70b24630c29d80a61104c0ea223ac0f5
|
|
| MD5 |
2a4f0fa85c25752305376fd3a2ea5935
|
|
| BLAKE2b-256 |
f294fc018b624a3e3279593cd35b00c0d4c129bbcaaec94d7767b07ca8efe3a9
|
Provenance
The following attestation bundles were made for thermite_ml-1.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:
Publisher:
release.yml on KartavyaDikshit/Thermite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thermite_ml-1.0.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
1bde3174432e385eec41c282c0db565f70b24630c29d80a61104c0ea223ac0f5 - Sigstore transparency entry: 2153831323
- Sigstore integration time:
-
Permalink:
KartavyaDikshit/Thermite@0b6c8cfd78cbe81cf567c2dba511c8e0cbfb58d5 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/KartavyaDikshit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0b6c8cfd78cbe81cf567c2dba511c8e0cbfb58d5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file thermite_ml-1.0.0-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.
File metadata
- Download URL: thermite_ml-1.0.0-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 943.6 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95eb1aaf72ecd9ff9e839ac868a43cc9b08aa7cf7a4f9ca908c07414c1828d56
|
|
| MD5 |
a72a69f20de2ed4918782ecc077340ce
|
|
| BLAKE2b-256 |
a97b68530ed3cd047fb0a8ce305a1f01601c901c8094ce36d6984d21eaa3e7fa
|
Provenance
The following attestation bundles were made for thermite_ml-1.0.0-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl:
Publisher:
release.yml on KartavyaDikshit/Thermite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thermite_ml-1.0.0-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl -
Subject digest:
95eb1aaf72ecd9ff9e839ac868a43cc9b08aa7cf7a4f9ca908c07414c1828d56 - Sigstore transparency entry: 2153831516
- Sigstore integration time:
-
Permalink:
KartavyaDikshit/Thermite@0b6c8cfd78cbe81cf567c2dba511c8e0cbfb58d5 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/KartavyaDikshit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0b6c8cfd78cbe81cf567c2dba511c8e0cbfb58d5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file thermite_ml-1.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: thermite_ml-1.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 829.4 kB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
616aca6b7b589a7ee738afb49632d2548c28880f4d4207b31e1b739afbc6c81b
|
|
| MD5 |
55a809aeb7c0311bee44604e9410d2ac
|
|
| BLAKE2b-256 |
5bd83b2b57225df4fc8df2fba98de429c4caa47f80095c2b8ff6309be2de2e7c
|
Provenance
The following attestation bundles were made for thermite_ml-1.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:
Publisher:
release.yml on KartavyaDikshit/Thermite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thermite_ml-1.0.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
616aca6b7b589a7ee738afb49632d2548c28880f4d4207b31e1b739afbc6c81b - Sigstore transparency entry: 2153831485
- Sigstore integration time:
-
Permalink:
KartavyaDikshit/Thermite@0b6c8cfd78cbe81cf567c2dba511c8e0cbfb58d5 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/KartavyaDikshit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0b6c8cfd78cbe81cf567c2dba511c8e0cbfb58d5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file thermite_ml-1.0.0-cp38-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: thermite_ml-1.0.0-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 748.2 kB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec533c3b0cd6f1e0383979f75aab9de5b3031b9b215c6b56bba96b1a5a66edea
|
|
| MD5 |
49f9459545bbfdadf92a885c5373d06c
|
|
| BLAKE2b-256 |
2ce5626d4df7f6a3345be3f8871431a777862efa3c622f3dec4ad158f447c30c
|
Provenance
The following attestation bundles were made for thermite_ml-1.0.0-cp38-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on KartavyaDikshit/Thermite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thermite_ml-1.0.0-cp38-abi3-macosx_11_0_arm64.whl -
Subject digest:
ec533c3b0cd6f1e0383979f75aab9de5b3031b9b215c6b56bba96b1a5a66edea - Sigstore transparency entry: 2153831407
- Sigstore integration time:
-
Permalink:
KartavyaDikshit/Thermite@0b6c8cfd78cbe81cf567c2dba511c8e0cbfb58d5 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/KartavyaDikshit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0b6c8cfd78cbe81cf567c2dba511c8e0cbfb58d5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file thermite_ml-1.0.0-cp38-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: thermite_ml-1.0.0-cp38-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 797.2 kB
- Tags: CPython 3.8+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6e2ca330e0079aaf29e13c5127b6821d69e1f64606ca21921629959fb5413e0
|
|
| MD5 |
2515520b4f00d398226a0cea2007cfe1
|
|
| BLAKE2b-256 |
cc9bcf236ca4f6cddbd7c34e85e7c7e1bef5130980a5931359d1ae78bcf053b0
|
Provenance
The following attestation bundles were made for thermite_ml-1.0.0-cp38-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on KartavyaDikshit/Thermite
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thermite_ml-1.0.0-cp38-abi3-macosx_10_12_x86_64.whl -
Subject digest:
d6e2ca330e0079aaf29e13c5127b6821d69e1f64606ca21921629959fb5413e0 - Sigstore transparency entry: 2153831453
- Sigstore integration time:
-
Permalink:
KartavyaDikshit/Thermite@0b6c8cfd78cbe81cf567c2dba511c8e0cbfb58d5 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/KartavyaDikshit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@0b6c8cfd78cbe81cf567c2dba511c8e0cbfb58d5 -
Trigger Event:
push
-
Statement type: