{"slug": "a-laptop-gpu-trained-xgboost-4-6-9x-faster-data-prep-was-a-draw", "title": "A laptop GPU trained XGBoost 4.6-9x faster. Data prep was a draw.", "summary": "A developer benchmarked the same fraud-detection feature-and-model recipe on a laptop, comparing pandas with CPU XGBoost against RAPIDS cuDF with CUDA XGBoost on the IEEE-CIS dataset (590,540 transactions, 434 features). GPU model training ran 4.6-9x faster (26-29 s versus 132-235 s), but data preparation was roughly a draw, with cuDF slower on joins, filters, encoding and group-bys at that size, and validation ROC-AUC differed by only about 0.001 (0.9158 GPU versus 0.9147 CPU). The developer cautions the results come from one laptop, one dataset and differing Python/library versions, so they are a practical comparison rather than a controlled test.", "body_md": "I ran one feature-and-model recipe twice on the same fraud dataset: once on pandas with XGBoost on CPU, once on RAPIDS cuDF with XGBoost on CUDA. Model training was 4.6-9x faster on the GPU. Data preparation took about the same time on both. The numbers, and the limits of this measurement, are below.\n\n## \n  \n  \n  Setup\n\n- Data: the IEEE-CIS Fraud Detection training set, all 590,540 transactions and 434 features.\n- Recipe: CSV read, identity join, a 0.95 missingness filter on the V columns, categorical encoding, group-by aggregates, then XGBoost (200 trees) on a time-ordered 80/20 split.\n- Same code on both engines, because cuDF follows the pandas API.\n- Hardware: one laptop with an Intel i7-11800H (16 logical cores) and an NVIDIA RTX 3060 Laptop GPU (6 GB).\n- Software: the GPU run used WSL2, Python 3.12, cuDF 26.10 and XGBoost 3.4.1. The CPU run used native Windows, Python 3.11, pandas 3.1.1 and XGBoost 3.2.0, because XGBoost 3.4.1 needs Python 3.12.\n\n## \n  \n  \n  Results\n\nEach cell is the range over a cold and a warm run in the same process. The first GPU run includes one-time kernel compilation.\n\n| Step (seconds) | GPU: cuDF + XGBoost CUDA | CPU: pandas + XGBoost, 16 threads | \n| CSV read | 4.72 - 10.64 | 16.677 - 30.27 | \n| Rest of the data preparation | 13.483 - 23.056 | 4.584 - 5.661 | \n| XGBoost fit | 26.143 - 28.602 | 131.522 - 235.392 | \n| Total | 45.357 - 64.222 | 168.874 - 258.751 | \n\nValidation ROC-AUC / average precision: 0.9158 / 0.5581 on GPU, 0.9147 / 0.5553 on CPU.\n\n## \n  \n  \n  What the numbers say\n\n- Training is where the GPU pays off: 4.6-9x faster here.\n- CSV parsing was about 3.5x faster on the GPU when warm.\n- The smaller steps (filters, join, encoding, group-bys) were faster on the CPU at this size. Each GPU operation has a fixed cost, so at 590k rows the GPU did not win on data preparation overall.\n- Model quality is the same. ROC-AUC differs by about 0.001.\n\n## \n  \n  \n  Limits\n\n- One laptop, one dataset, one recipe. I would not extrapolate to other hardware or to much larger tables.\n- The CPU fit time moves with laptop thermals (132-235 s), which is why I report ranges instead of one number.\n- A CPU run inside WSL2 was discarded: that WSL instance is capped at 4 GB RAM and 4 cores, and it started swapping.\n- The two environments differ in Python and library versions, so this is a practical comparison of two setups, not a controlled test of one variable.\n- This XGBoost recipe is a speed benchmark. It is not the LightGBM model published in the same repository, and its AUC is not that model's AUC.\n\n## \n  \n  \n  Reproduce\n\nThe script, raw GPU and CPU results, and the full fraud analytics pipeline are in the repository: [https://github.com/senanurcetin/ieee-fraud-detection-analytics](https://github.com/senanurcetin/ieee-fraud-detection-analytics)\n\nThe raw IEEE-CIS files are not included. Get them from Kaggle under the competition's terms.", "url": "https://wpnews.pro/news/a-laptop-gpu-trained-xgboost-4-6-9x-faster-data-prep-was-a-draw", "canonical_source": "https://dev.to/senanurcetin/a-laptop-gpu-trained-xgboost-46-9x-faster-data-prep-was-a-draw-23n2", "published_at": "2026-11-11 17:18:13+00:00", "updated_at": "2026-11-11 17:23:17.591992+00:00", "lang": "en", "topics": ["machine-learning", "ai-infrastructure", "mlops", "developer-tools"], "entities": ["RAPIDS cuDF", "XGBoost", "NVIDIA", "Intel", "IEEE-CIS Fraud Detection", "Kaggle", "GitHub"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/a-laptop-gpu-trained-xgboost-4-6-9x-faster-data-prep-was-a-draw", "markdown": "https://wpnews.pro/news/a-laptop-gpu-trained-xgboost-4-6-9x-faster-data-prep-was-a-draw.md", "text": "https://wpnews.pro/news/a-laptop-gpu-trained-xgboost-4-6-9x-faster-data-prep-was-a-draw.txt", "jsonld": "https://wpnews.pro/news/a-laptop-gpu-trained-xgboost-4-6-9x-faster-data-prep-was-a-draw.jsonld"}}