# Save bert-base-uncased model as checkpoint

**URL:** <https://discuss.huggingface.co/t/save-bert-base-uncased-model-as-checkpoint/32305>\
**Category:** 🤗Transformers\
**Created:** [February 22, 2023, 8:12pm UTC](https://discuss.huggingface.co/t/save-bert-base-uncased-model-as-checkpoint/32305 "2023-02-22T20:12:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MuhamadNady](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/muhamadnady/32/14326_2.png) [@MuhamadNady](https://discuss.huggingface.co/u/MuhamadNady)\
**Post date:** [February 22, 2023, 8:12pm UTC](https://discuss.huggingface.co/t/save-bert-base-uncased-model-as-checkpoint/32305/1 "2023-02-22T20:12:34Z")

</div>

I am trying to save bert-base-uncased model as checkpoint with torch.save{ model.state\_dict()} when i load the model to resume training i get  
typeError: ‘BertForTokenClassification’ object is not subscriptable.  
I want to save model as checkpoint and load it with resume model training. any help??  
it’s notebook used for train my model “[Google Colab](https://colab.research.google.com/github/NielsRogge/Transformers-Tutorials/blob/master/.ipynb_checkpoints/Custom_Named_Entity_Recognition_with_BERT-checkpoint.ipynb)”
