# tinker_cookbook.checkpoint_utils.save_checkpoint

### [**tinker_cookbook.checkpoint_utils.save_checkpoint**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/checkpoint_utils.py#L480)( _training_client_, _name_, _log_path_, _loop_state_, _kind_, _ttl_seconds_, _store_)

Save model checkpoint (synchronous wrapper around save_checkpoint_async).

**Parameters:**

- [**training_client**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/checkpoint_utils.py#L481) ( _tinker. [TrainingClient](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/trainingclient/)_) – Training client to save from.
- [**name**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/checkpoint_utils.py#L482) ( _str_) – Name for the checkpoint (used in the tinker:// path).
- [**log_path**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/checkpoint_utils.py#L483) ( _str_) – Directory containing `checkpoints.jsonl`.
- [**loop_state**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/checkpoint_utils.py#L484) ( _dict[str, Any]_) – Training loop state dict (may include `batch`, `epoch`, etc.).
- [**kind**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/checkpoint_utils.py#L485) ( _Literal['state', 'sampler', 'both']_) – Which checkpoint types to save (`"state"`, `"sampler"`, or `"both"`).
- [**ttl_seconds**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/checkpoint_utils.py#L486) ( _int | None_) – Server-side retention. `None` keeps the checkpoint indefinitely.
- [**store**](https://github.com/thinking-machines-lab/tinker-cookbook/blob/main/tinker_cookbook/checkpoint_utils.py#L487) ( _[TrainingRunStore](https://tinker-docs.thinking-machines.ai/cookbook/api-reference/stores/trainingrunstore/) | None_) – If provided, write the checkpoint record via Storage protocol.

**Returns:** Dict mapping `"state_path"` and/or `"sampler_path"` to tinker:// paths.

```
save_checkpoint(
training_client=training_client,
name="step-100",
log_path="./logs",
loop_state={"epoch": 0, "batch": 100},
)
```
