Multi-Hardware Benchmarks
Real benchmark results for OchreML v0.3.7a1 vs. scikit-learn 1.6.1 on 4-core CPU and Dual-GPU CUDA environments.
All numbers below come directly from OchreML v0.3.7a1 benchmark runs against scikit-learn 1.6.1 on Linux (x86_64, 4 CPU cores) in two hardware profiles:
- CPU 4c (
cpu_4c): 4-core CPU-only environment (device="auto"resolves to"cpu"), Python3.13.18. - CUDA 2xGPU (
cuda_2gpu): 4-core host + 2 NVIDIA GPUs (device="auto"resolves to"cuda:0,1"/cuda:all), Python3.13.16.(*≧ω≦*)
Executive Summary
| Suite | Hardware | Passed | Compared | OchreML Wins | Win Rate | Median Speedup | Mean Speedup | Max Speedup |
|---|---|---|---|---|---|---|---|---|
| Classical ML | CPU 4c | 62 / 63 | 62 | 62 | 100.0% | 4.03x | 9.89x | 103.05x |
| Classical ML | CUDA 2xGPU | 62 / 63 | 62 | 55 | 88.7% | 3.14x | 7.32x | 75.58x |
| Preprocessing & Utils | CPU 4c | 18 / 18 | 18 | 15 | 83.3% | 1.80x | 2.44x | 7.91x |
| Preprocessing & Utils | CUDA 2xGPU | 18 / 18 | 18 | 15 | 83.3% | 1.54x | 2.03x | 4.89x |
On both environments, 1 of 63 modules (RadiusNeighborsClassifier) had no scikit-learn baseline comparison because scikit-learn 1.6.1 rejected outlier_label=0.0 (float) with InvalidParameterError; OchreML completed fit + predict in 1.50 ms (cpu_4c) and 2.78 ms (cuda_2gpu).
Classical ML — CPU 4c Highlights (Total Fit + Predict Time)
Representative results across all 5 estimator families on cpu_4c (100% win rate across all 62 comparable estimators):
| Estimator | Family | Shape | OchreML Total | sklearn Total | Total Speedup | Score Parity (score_diff) |
|---|---|---|---|---|---|---|
OPTICS | Cluster | (350, 8) | 3.67 ms | 378.55 ms | 103.05x | — |
GammaRegressor | GLM | (1200, 12) | 0.87 ms | 71.16 ms | 82.04x | 0.0001 |
PoissonRegressor | GLM | (1200, 12) | 0.98 ms | 43.76 ms | 44.45x | 0.0000 |
IsolationForest | Ensemble | (1500, 12) | 2.72 ms | 109.60 ms | 40.37x | — |
TweedieRegressor | GLM | (1200, 12) | 1.06 ms | 40.83 ms | 38.70x | 0.0003 |
TruncatedSVD | Decomp | (3200, 20) | 2.65 ms | 76.59 ms | 28.95x | — |
KernelRidge | Kernel | (280, 12) | 5.69 ms | 133.07 ms | 23.37x | 0.0000 |
AdaBoostClassifier | Ensemble | (280, 12) | 4.83 ms | 93.35 ms | 19.33x | 0.0000 |
ExtraTreesClassifier | Ensemble | (1200, 12) | 9.97 ms | 147.38 ms | 14.78x | 0.0033 |
QuantileRegressor | GLM | (280, 12) | 10.47 ms | 122.43 ms | 11.69x | 0.0000 |
Ridge | Linear | (3200, 20) | 1.16 ms | 11.91 ms | 10.25x | 0.0000 |
SpectralClustering | Cluster | (350, 8) | 15.07 ms | 150.85 ms | 10.01x | — |
RidgeClassifier | Linear | (3200, 20) | 1.44 ms | 14.29 ms | 9.93x | 0.0000 |
LinearRegression | Linear | (3200, 20) | 3.23 ms | 26.65 ms | 8.26x | 0.0000 |
HuberRegressor | GLM | (1200, 12) | 1.85 ms | 13.50 ms | 7.31x | 0.0000 |
GradientBoostingRegressor | Ensemble | (280, 12) | 15.91 ms | 106.95 ms | 6.72x | 0.0019 |
KMeans | Cluster | (1500, 12) | 8.45 ms | 54.92 ms | 6.50x | — |
RandomForestClassifier | Ensemble | (1200, 12) | 33.97 ms | 217.78 ms | 6.41x | 0.0000 |
GaussianProcessClassifier | GP | (128, 8) | 1.98 ms | 10.33 ms | 5.22x | 0.0000 |
GaussianMixture | Mixture | (1500, 12) | 6.53 ms | 33.79 ms | 5.17x | — |
PCA | Decomp | (3200, 20) | 3.28 ms | 14.41 ms | 4.39x | — |
LogisticRegression | Linear | (3200, 20) | 11.95 ms | 36.64 ms | 3.07x | 0.0000 |
SVC | SVM | (280, 12) | 3.84 ms | 8.68 ms | 2.26x | 0.0000 |
KNeighborsClassifier | Neighbors | (1200, 12) | 9.34 ms | 17.65 ms | 1.89x | 0.0000 |
HistGradientBoostingRegressor | Ensemble | (3200, 20) | 191.56 ms | 282.97 ms | 1.48x | 0.0052 |
MLPClassifier | Neural Net | (1200, 12) | 359.32 ms | 439.01 ms | 1.22x | 0.0100 |
Classical ML — CUDA 2xGPU (cuda:0,1) Highlights
Run on larger dataset shapes (3x larger sample sizes on GPU profile) with device="auto" dispatching to dual GPUs (cuda:0,1):
| Estimator | Family | Shape | OchreML Total | sklearn Total | Total Speedup | Score Parity (score_diff) |
|---|---|---|---|---|---|---|
GammaRegressor | GLM | (3200, 12) | 1.28 ms | 96.65 ms | 75.58x | 0.0001 |
OPTICS | Cluster | (800, 8) | 11.41 ms | 742.37 ms | 65.09x | — |
IsolationForest | Ensemble | (4000, 12) | 2.60 ms | 95.82 ms | 36.87x | — |
TweedieRegressor | GLM | (3200, 12) | 1.43 ms | 45.82 ms | 31.97x | 0.0002 |
PoissonRegressor | GLM | (3200, 12) | 1.38 ms | 38.32 ms | 27.75x | 0.0000 |
GradientBoostingClassifier | Ensemble | (640, 12) | 36.61 ms | 589.95 ms | 16.12x | 0.0063 |
AdaBoostClassifier | Ensemble | (640, 12) | 7.22 ms | 112.99 ms | 15.64x | 0.0000 |
GradientBoostingRegressor | Ensemble | (640, 12) | 12.55 ms | 182.06 ms | 14.51x | 0.0003 |
TruncatedSVD | Decomp | (9600, 32) | 4.16 ms | 46.88 ms | 11.26x | — |
QuantileRegressor | GLM | (640, 12) | 12.30 ms | 96.33 ms | 7.83x | 0.0000 |
ExtraTreesClassifier | Ensemble | (3200, 12) | 17.35 ms | 134.65 ms | 7.76x | 0.0088 |
LinearDiscriminantAnalysis | Discriminant | (9600, 32) | 4.35 ms | 29.25 ms | 6.73x | 0.0000 |
KernelRidge | Kernel | (640, 12) | 22.22 ms | 146.23 ms | 6.58x | 0.0000 |
RidgeClassifier | Linear | (9600, 32) | 2.81 ms | 17.30 ms | 6.15x | 0.0000 |
SpectralClustering | Cluster | (800, 8) | 37.83 ms | 228.61 ms | 6.04x | — |
LinearRegression | Linear | (9600, 32) | 5.77 ms | 34.04 ms | 5.90x | 0.0000 |
Ridge | Linear | (9600, 32) | 2.35 ms | 12.65 ms | 5.39x | 0.0000 |
GaussianMixture | Mixture | (4000, 12) | 8.59 ms | 40.60 ms | 4.73x | — |
RandomForestClassifier | Ensemble | (3200, 12) | 69.91 ms | 288.22 ms | 4.12x | 0.0013 |
KMeans | Cluster | (4000, 12) | 21.01 ms | 63.81 ms | 3.04x | — |
KNeighborsRegressor | Neighbors | (3200, 12) | 21.85 ms | 58.18 ms | 2.66x | 0.0000 |
PCA | Decomp | (9600, 32) | 6.58 ms | 14.59 ms | 2.22x | — |
On small-to-medium matrices (N under 10k rows), PCIe host-to-device transfer and dual-GPU synchronization add ~1–2 ms per call. For tiny datasets or iterative algorithms with small batches (OneClassSVM, AgglomerativeClustering), explicitly setting device="cpu" can outperform multi-GPU dispatch.
Preprocessing, Feature Extraction, Selection & Metrics
Complete 18-module comparison across cpu_4c and cuda_2gpu:
| Module | Category | CPU 4c OchreML | CPU 4c sklearn | CPU 4c Speedup | 2xGPU OchreML | 2xGPU sklearn | 2xGPU Speedup |
|---|---|---|---|---|---|---|---|
PowerTransformer | Preprocessing | 5.87 ms | 46.45 ms | 7.91x | 10.93 ms | 53.41 ms | 4.89x |
KNNImputer | Impute | 2.44 ms | 10.55 ms | 4.32x | 2.01 ms | 8.58 ms | 4.27x |
QuantileTransformer | Preprocessing | 1.74 ms | 6.74 ms | 3.87x | 1.90 ms | 8.36 ms | 4.40x |
RobustScaler | Preprocessing | 2.07 ms | 7.95 ms | 3.84x | 7.14 ms | 22.56 ms | 3.16x |
CountVectorizer | Text FE | 13.53 ms | 44.51 ms | 3.29x | 21.11 ms | 63.82 ms | 3.02x |
SelectKBest | Selection | 2.06 ms | 6.47 ms | 3.14x | 3.36 ms | 7.13 ms | 2.12x |
StratifiedKFold | Model Selection | 1.70 ms | 5.06 ms | 2.98x | 2.04 ms | 2.52 ms | 1.24x |
VarianceThreshold | Selection | 1.38 ms | 3.06 ms | 2.23x | 2.83 ms | 4.79 ms | 1.69x |
Normalizer | Preprocessing | 0.71 ms | 1.29 ms | 1.83x | 1.51 ms | 1.90 ms | 1.26x |
TfidfVectorizer | Text FE | 18.30 ms | 32.34 ms | 1.77x | 33.60 ms | 63.61 ms | 1.89x |
metrics.r2_score | Metrics | 1.09 ms | 1.74 ms | 1.60x | 0.98 ms | 0.96 ms | 0.98x |
PolynomialFeatures | Preprocessing | 0.96 ms | 1.31 ms | 1.36x | 1.18 ms | 1.54 ms | 1.30x |
MaxAbsScaler | Preprocessing | 1.16 ms | 1.56 ms | 1.35x | 2.40 ms | 2.57 ms | 1.07x |
RBFSampler | Kernel Approx | 2.22 ms | 2.93 ms | 1.32x | 2.79 ms | 4.31 ms | 1.55x |
SimpleImputer | Impute | 2.25 ms | 2.65 ms | 1.18x | 1.90 ms | 2.89 ms | 1.52x |
MinMaxScaler | Preprocessing | 1.84 ms | 1.59 ms | 0.86x | 2.59 ms | 2.83 ms | 1.09x |
metrics.accuracy_score | Metrics | 1.77 ms | 1.04 ms | 0.59x | 3.88 ms | 0.82 ms | 0.21x |
StandardScaler | Preprocessing | 4.54 ms | 2.01 ms | 0.44x | 5.73 ms | 4.59 ms | 0.80x |