# How to get config.json from .pt loaded model?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-get-config-json-from-pt-loaded-model%2F16673%3E%5C
**Category:** Beginners\
**Created:** [April 10, 2022, 8:28pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-get-config-json-from-pt-loaded-model%2F16673 "2022-04-10T20:28:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivalig94](https://avatars.discourse-cdn.com/v4/letter/i/b782af/32.png) [@ivalig94](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fivalig94)%5C
**Post date:** [April 10, 2022, 8:28pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-get-config-json-from-pt-loaded-model%2F16673%2F1 "2022-04-10T20:28:41Z")

</div>

Hi, i have a .pt model loaded, and i would like now to upload It to hugging face-hub. But according to this tutorial [Model sharing and uploading — transformers 3.2.0 documentation](https://huggingface.co/transformers/v3.2.0/model_sharing.html) i need:

- a config.json file, a pytorch\_model.bin file, a special\_tokens\_map.json, etc…

How can i get these files from my .pt saved model?

Thanks in advanced.

---

<div class="post-metadata">

**Author:** ![merve](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/merve/32/49809_2.png) [@merve](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmerve)%5C
**Post date:** [April 11, 2022, 11:06am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-get-config-json-from-pt-loaded-model%2F16673%2F2 "2022-04-11T11:06:42Z")

</div>

Hello, can you save and push your model and tokenizer with `model.save_pretrained(directory)` and `tokenizer.save_pretrained()`? The files should be in the specified directory.
