Is there a similar approach in TensorFlow2 when save large model?
You can always save a model before, during, and after training using the same `model.save()` API. Once loading, you can always continue training if you so desire. There is no need for a separate API (`save_pretrained`).

Regarding sharding (`max_shard_size`), there is no such parameter, TF does automatic sharding.

See https://www.tensorflow.org/api_docs/python/tf/saved_model/save, https://www.tensorflow.org/api_docs/python/tf/saved_model/SaveOptions and https://www.tensorflow.org/api_docs/python/tf/keras/Model#save Hi @SmileTM ,


Apart from resources mentioned in above, you can also refer to attached tutorial links for end to end examples of creating,training, saving and loading the models.
Please refer [serialization_and_saving](https://www.tensorflow.org/guide/keras/serialization_and_saving) and [save_and_load](https://www.tensorflow.org/tutorials/keras/save_and_load) also for a demo.

Tensorflow has options to [save](https://www.tensorflow.org/api_docs/python/tf/keras/Model#save) complete model architecture including optimizer state or only [weights](https://www.tensorflow.org/api_docs/python/tf/keras/Model#save_weights) of the layers also.

If you still looking for a particular use case please let us know.

Thanks! Thanks for the quick response.

 Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60776">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/60776">No</a>

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Feature Request

### Have you reproduced the bug with TF nightly?

No

### Source

source

### Tensorflow Version

tf 2.11

### Custom Code

Yes

### OS Platform and Distribution

_No response_

### Mobile device

_No response_

### Python version

_No response_

### Bazel version

_No response_

### GCC/Compiler version

_No response_

### CUDA/cuDNN version

_No response_

### GPU model and memory

_No response_

### Current Behaviour?

```python
from transformers import TFAutoModel
model = TFAutoModel.from_pretrained("bert-base-cased")
model.save_pretrained("saved", max_shard_size="200MB")
```

Is there a similar approach in TensorFlow2 when save large model?

### Standalone code to reproduce the issue

```shell
from transformers import TFAutoModel
model = TFAutoModel.from_pretrained("bert-base-cased")
model.save_pretrained("saved", max_shard_size="200MB")
```


### Relevant log output

_No response_</details>