save model and lerning parameters