XGBoost. GPU for training CPU for inference

Viewed 189

I am using XGBoost with GPU speed-up for training.

model = XGBClassifier(n_jobs=-1, tree_method='gpu_hist', gpu_id=0)

Furthermore I use a sklearn random search to tune the hyper parameters:

grid = RandomizedSearchCV(
            model,
            param_distributions=param_dist,
            cv=list(cross_validation(y_train, ids_train)),
            n_iter=25,
            scoring='balanced_accuracy',
            error_score=0,
            verbose=3,
        )

Later I save the model as:

grid.best_estimator_.save_model(path)

After training can I inference results with only cpu?

Thank you so much

0 Answers
Related