# Load original T5 checkpoints

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fload-original-t5-checkpoints%2F3680%3E%5C
**Category:** Beginners\
**Created:** [February 17, 2021, 9:30am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fload-original-t5-checkpoints%2F3680 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmarton-avrios)%5C
**Post date:** [February 17, 2021, 9:30am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fload-original-t5-checkpoints%2F3680%2F1 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmarton-avrios)%5C
**Post date:** [February 17, 2021, 10:03am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fload-original-t5-checkpoints%2F3680%2F2 "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](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmarton-avrios)%5C
**Post date:** [February 17, 2021, 10:31am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fload-original-t5-checkpoints%2F3680%2F3 "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

```
