# Checkpoints - still confused

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcheckpoints-still-confused%2F21033%3E%5C
**Category:** Beginners\
**Created:** [July 30, 2022, 10:17am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcheckpoints-still-confused%2F21033 "2022-07-30T10:17:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Perselope](https://avatars.discourse-cdn.com/v4/letter/p/3da27b/32.png) [@Perselope](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FPerselope)%5C
**Post date:** [July 30, 2022, 10:17am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcheckpoints-still-confused%2F21033%2F1 "2022-07-30T10:17:46Z")

</div>

Hi all, I have read information about checkpoints but I am still confused.

When training my model, I can read the following messages:  
Saving model checkpoint to repo-name/checkpoint-3500  
Configuration saved in repo-name/checkpoint-3500/config.json  
Model weights saved in repo-name/checkpoint-3500/pytorch\_model.bin  
Feature extractor saved in repo-name/checkpoint-3500/preprocessor\_config.json  
Deleting older checkpoint [repo-name/checkpoint-1500] due to args.save\_total\_limit

In my huggingface repository, I see the following files:

.gitattributes  
special\_tokens\_map.json  
tokenizer\_config.json  
vocab.json

After the training was interrupted by a Colab disconnection, I tried to continue the training by loading the last checkpoint so I ran the following command:  
trainer.train(resume\_from\_checkpoint=true)

I got an error stating that there is no valid checkpoint in the folder.  
In fact I was expecting to find folders like “checkpoint-XXX” but I do not see them. Please could you help me to understand where are the checkpoints saved and how to retrieve them to continue training?

Steps I followed:  
training\_args: I used the same definition for both trainings (same output\_dir)

training\_args = TrainingArguments(  
output\_dir=repo\_name,  
overwrite\_output\_dir=False,  
group\_by\_length=True,  
per\_device\_train\_batch\_size=8,  
evaluation\_strategy=“steps”,  
num\_train\_epochs=30,  
fp16=True,  
gradient\_checkpointing=True,  
save\_steps=500,  
eval\_steps=500,  
logging\_steps=500,  
save\_strategy = “steps”,  
learning\_rate=1e-4,  
weight\_decay=0.005,  
warmup\_steps=1000,  
save\_total\_limit=2,  
logging\_dir=repo\_name,  
)  
Same definitions of tokenizer and model in both trainings.

Same trainer:  
from transformers import Trainer

trainer = Trainer(  
model=model,  
data\_collator=data\_collator,  
args=training\_args,  
compute\_metrics=compute\_metrics,  
train\_dataset=timit[“train”],  
eval\_dataset=timit[“test”],  
tokenizer=processor.feature\_extractor,  
)

I only replaced the command “trainer.train()” used in the first training by  
“trainer.train(resume\_from\_checkpoint=true)” to resume the training from the checkpoint.

Please could you help me to learn how to continue training by using a checkpoint and where is it saved?  
Thank you
