Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xgboost4j_2.12:1.7.6 's (ml/dmlc/xgboost4j/java/XGBoostJNI.XGBoosterPredict) much slower than 0.90 in some model #10215

Open
hanfengatonline opened this issue Apr 22, 2024 · 6 comments

Comments

@hanfengatonline
Copy link

hanfengatonline commented Apr 22, 2024

When the concurrency exceeds 100, the function ml/dmlc/xgboost4j/java/XGBoostJNI.XGBoosterPredict occupies more than 49% of the CPU computation time.
this model featureNum = 11, and the model file is attached. which is .json file by 1.7.6 saved
6cdf5ed2e74d9cb614a293dbb1b91dc4_xgb_model_20230331_1_7_6.json

@hcho3
Copy link
Collaborator

hcho3 commented Apr 22, 2024

@trivialfis Was the implementation for the predict function changed substantially?

@trivialfis
Copy link
Member

From 0.9 to 1.7.6, yes. Specifically, in later versions, there's a block-based parallelism.

@SoulH-qqq
Copy link

From 0.9 to 1.7.6, yes. Specifically, in later versions, there's a block-based parallelism.

It stands to reason that the prediction speed of the model should be faster. But we found that prediction took longer.

@trivialfis
Copy link
Member

Are you calling the prediction on a single sample or small batch of samples? On that case, it can be slower.

@SoulH-qqq
Copy link

Are you calling the prediction on a single sample or small batch of samples? On that case, it can be slower.

Make predictions on a single sample. Our scenario is to predict every time a piece of data comes in, so it is a single sample prediction. Is there any way to improve the prediction speed using 1.7.6, in the case of a single sample.

@trivialfis
Copy link
Member

Hmm, for JVM packages, we might have to build out a new streaming inference library.

@wbo4958 Are you familiar with the JVM land for inference?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants