# Save\_pretrained() on tokenizer does not generate a tokenizer.json file

**URL:** <https://discuss.huggingface.co/t/save-pretrained-on-tokenizer-does-not-generate-a-tokenizer-json-file/102772>\
**Category:** 🤗Transformers\
**Created:** [August 17, 2024, 4:32pm UTC](https://discuss.huggingface.co/t/save-pretrained-on-tokenizer-does-not-generate-a-tokenizer-json-file/102772 "2024-08-17T16:32:49Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mahmutc](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/mahmutc/32/52583_2.png) [@mahmutc](https://discuss.huggingface.co/u/mahmutc)\
**Post date:** [August 19, 2024, 10:47am UTC](https://discuss.huggingface.co/t/save-pretrained-on-tokenizer-does-not-generate-a-tokenizer-json-file/102772/2 "2024-08-19T10:47:54Z")

</div>

hi @Akirami  
Can you please share your code snippet? I don’t know if you need something similar to the following but for tokenizer rather than model.

> [@How to create a config.json after saving a model](https://discuss.huggingface.co/t/how-to-create-a-config-json-after-saving-a-model/10459/4):
>
> You need to subclass it to have the save\_pretrained methods available. So instead of class Mean\_Pooling\_Model(nn.Module): use from transformers.modeling\_utils import PreTrainedModel class Mean\_Pooling\_Model(PreTrainedModel): It will add extra functionality on top of nn.Module.

---

_[View the full topic](https://discuss.huggingface.co/t/save-pretrained-on-tokenizer-does-not-generate-a-tokenizer-json-file/102772)._
