siboehm / lleaves

Compiler for LightGBM gradient-boosted trees, based on LLVM. Speeds up prediction by ≥10x.
https://lleaves.readthedocs.io/en/latest/
MIT License
333 stars 28 forks source link

Segmentation fault(core dumped) when using lightGBM model with num_iterations=1600 #77

Open dragonbra opened 1 month ago

dragonbra commented 1 month ago

I tried to compile my model with lleaves

llvm_model = lleves.Model(model_file='model_at_iteration_1600.txt')
llvm.compile(cache='./lleaves_1600.o')

it tooks 13 min to compile, and when I use it to predict Xmat with shape(3831, 1111), it failed

preds = llvm_model.predict(Xmat)

Segmentation_fault (core dumped)

Is it because the lgbm_model is too large? I have already kept only 1600 trees of 25000 in the model. For each tree, I set max_depth = 7 and num_leaves = 64