examples/research_projects/rag-end2end-retriever/lightning_base.py/BaseTransformer/on_save_checkpoint
class BaseTransformer:    def on_save_checkpoint(self, checkpoint: Dict[str, Any]) -> None:
        save_path = self.output_dir.joinpath("best_tfmr")
        self.model.config.save_step = self.step_count
        self.model.save_pretrained(save_path)
        self.tokenizer.save_pretrained(save_path)