# Load original T5 checkpoints

**URL:** <https://discuss.huggingface.co/t/load-original-t5-checkpoints/3680>\
**Category:** Beginners\
**Created:** [February 17, 2021, 9:30am UTC](https://discuss.huggingface.co/t/load-original-t5-checkpoints/3680 "2021-02-17T09:30:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![marton-avrios](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@marton-avrios](https://discuss.huggingface.co/u/marton-avrios)\
**Post date:** [February 17, 2021, 9:30am UTC](https://discuss.huggingface.co/t/load-original-t5-checkpoints/3680/1 "2021-02-17T09:30:11Z")

</div>

I want to load one of the original T5 checkpoints. How can I do that? I found an answer referring to a `convert_t5_original_tf_checkpoint_to_pytorch.py` which does not seem to exist.

---

<div class="post-metadata">

**Author:** ![marton-avrios](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@marton-avrios](https://discuss.huggingface.co/u/marton-avrios)\
**Post date:** [February 17, 2021, 10:03am UTC](https://discuss.huggingface.co/t/load-original-t5-checkpoints/3680/2 "2021-02-17T10:03:19Z")

</div>

…they are moved to `transformers/src/transformers/models/t5`. But it requires a `config.json` which is not part of the original files (in `gs://t5-data/pretrained_models/small`).

---

<div class="post-metadata">

**Author:** ![marton-avrios](https://avatars.discourse-cdn.com/v4/letter/m/ecae2f/32.png) [@marton-avrios](https://discuss.huggingface.co/u/marton-avrios)\
**Post date:** [February 17, 2021, 10:31am UTC](https://discuss.huggingface.co/t/load-original-t5-checkpoints/3680/3 "2021-02-17T10:31:47Z")

</div>

…and the solution: here you can find all related files (most importantly `config.json` but also already converted model files, model card, etc.): [t5-small · Hugging Face](https://huggingface.co/t5-small). And an example workflow:

```auto
mkdir t5
gsutil -m cp -r gs://t5-data/pretrained_models/small t5
python ~/transformers/src/transformers/models/t5/convert_t5_original_tf_checkpoint_to_pytorch.py --tf_checkpoint_path t5/small/model.ckpt-1000000 --pytorch_dump_path t5-small-pt --config_file t5/small_config.json

```
