How to save my model to use it later A Hugging Face forum user new to machine learning reported that `torch.save(trainer, 'my_model')` failed with an `AttributeError: Can't pickle local object 'get_linear_schedule_with_warmup..lr_lambda'` after fine-tuning DistilBERT for multilabel text classification, and was advised by Hugging Face's merve to use `trainer.save_model("path_to_save")` instead. The user later hit `AttributeError: 'DistilBertModel' object has no attribute 'logits'` when running inference, which was resolved by loading with `AutoModelForSequenceClassification.from_pretrained(path)` rather than `DistilBertModel.from_pretrained(path)`. Merve explained that BertModel classes lack classification heads, so the head-bearing classes are needed to produce logits. Hello Amazing people, This is my first post and I am really new to machine learning and Hugginface. I followed this awesome guide here multilabel Classification with DistilBert