Replace deprecated param_dim with n_models