from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("./checkpoint-15k") model = AutoModelForCausalLM.from_pretrained("./checkpoint-15k") export_directory = "./export-15k" tokenizer.save_pretrained(export_directory) model.save_pretrained(export_directory)