# Prevent creation of multiple checkpoints

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fprevent-creation-of-multiple-checkpoints%2F168144%3E%5C
**Category:** Beginners\
**Created:** [September 5, 2025, 8:15pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fprevent-creation-of-multiple-checkpoints%2F168144 "2025-09-05T20:15:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SuperBowser](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@SuperBowser](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FSuperBowser)%5C
**Post date:** [September 5, 2025, 8:15pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fprevent-creation-of-multiple-checkpoints%2F168144%2F1 "2025-09-05T20:15:08Z")

</div>

In my training arguments I selected to save every 200 steps, but my model is fairly large (relative to my disk size). I would like to save every 200 steps, but every save should just overwrite previous save instead of creating new save point. Is this possible?

---

<div class="post-metadata">

**Author:** ![John6666](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/john6666/32/27664_2.png) [@John6666](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJohn6666)%5C
**Post date:** [September 6, 2025, 12:19am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fprevent-creation-of-multiple-checkpoints%2F168144%2F2 "2025-09-06T00:19:59Z")

</div>

Strictly speaking, it’s not overwriting, but I think[`save_total_limit` or `save_only_model`](https://huggingface.co/docs/transformers/en/main_classes/trainer#transformers.TrainingArguments.save_total_limit) are closer to the intended purpose.

```py
from transformers import TrainingArguments

args = TrainingArguments(
    output_dir="out",
    save_strategy="steps",
    save_steps=200,
    save_total_limit=1, # deletes older checkpoints
    save_only_model=True, # 4.37+; skips optimizer/scheduler to shrink size
)

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fsystem)%5C
**Post date:** [September 8, 2025, 1:48am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fprevent-creation-of-multiple-checkpoints%2F168144%2F3 "2025-09-08T01:48:01Z")

</div>

Closed on September 8, 2025, 1:48am UTC

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
