How to reduce the size of GBM trained model

How to reduce the size of the trained gbm model using Caret package in R Language. I have trained my model on 9 variables and 44500 observations and model size is almost 6.7GB. How can we reduce the size of this model?

assuming your model has some name like gbmFit1 find out what parts of the object take up space


library(tidyverse)
library(lobstr)
imap_dfr(gbmFit1,~tibble(size=obj_size(.x),name=.y)) %>% arrange(desc(size)) %>% print(n=Inf)

if its for example trainingData, and you want to throw it out ..

gbmFit2 <- gbmFit1
gbmFit2$trainingData <- NULL
# test if still work as a model post our excision
predict(gbmFit2,newdata = testing)