# "Can't load tokenizer for \<model\>" after download

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-tokenizer-for-model-after-download%2F43366%3E%5C
**Category:** Beginners\
**Created:** [June 15, 2023, 10:55am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-tokenizer-for-model-after-download%2F43366 "2023-06-15T10:55:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JFairbairn](https://avatars.discourse-cdn.com/v4/letter/j/90db22/32.png) [@JFairbairn](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJFairbairn)%5C
**Post date:** [June 15, 2023, 10:55am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-tokenizer-for-model-after-download%2F43366%2F1 "2023-06-15T10:55:40Z")

</div>

I’m trying to use the _cardiffnlp/twitter-roberta-base-hate_ model on some data, and was following the example on the [model’s page](https://huggingface.co/cardiffnlp/twitter-roberta-base-hate). The script works the first time, when it’s downloading the model and running it straight away, but after I run it after this I get the message:

> `Can't load tokenizer for 'cardiffnlp/twitter-roberta-base-hate'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'cardiffnlp/twitter-roberta-base-hate' is the correct path to a directory containing all relevant files for a RobertaTokenizerFast tokenizer.`

It’s downloaded the model into a subdirectory of my working directory, which it’s presumably finding. That directory contains two files: `config.json` and `pytorch_model.bin`. If I delete that directory it works again for one run, but as it’s a half-gig model I’d rather not have to do that each time!

---

<div class="post-metadata">

**Author:** ![linying111](https://avatars.discourse-cdn.com/v4/letter/l/a9adbd/32.png) [@linying111](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flinying111)%5C
**Post date:** [October 21, 2023, 7:46am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-tokenizer-for-model-after-download%2F43366%2F2 "2023-10-21T07:46:08Z")

</div>

Hello, have you solved this problem?

---

<div class="post-metadata">

**Author:** ![JFairbairn](https://avatars.discourse-cdn.com/v4/letter/j/90db22/32.png) [@JFairbairn](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJFairbairn)%5C
**Post date:** [October 24, 2023, 11:18am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-tokenizer-for-model-after-download%2F43366%2F3 "2023-10-24T11:18:58Z")

</div>

Hi, I’m sorry but I think I just used a different model. In this case the Cardiff Hatelab had a more up to date model anyway which was probably better maintained.

Good luck

---

<div class="post-metadata">

**Author:** ![Julierivera12908](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/julierivera12908/32/22102_2.png) [@Julierivera12908](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJulierivera12908)%5C
**Post date:** [December 13, 2023, 2:14pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcant-load-tokenizer-for-model-after-download%2F43366%2F4 "2023-12-13T14:14:13Z")

</div>

Hey,The community faced the same issue at [Venmo Nerd](https://venmonerd.com/) but I tried solving the issue via help of my friends.
