# Loading local tokenizer (RobertaTokenizerFast.from\_pretrained)

**URL:** <https://discuss.huggingface.co/t/loading-local-tokenizer-robertatokenizerfast-from-pretrained/43205>\
**Category:** 🤗Transformers\
**Created:** [June 14, 2023, 10:38am UTC](https://discuss.huggingface.co/t/loading-local-tokenizer-robertatokenizerfast-from-pretrained/43205 "2023-06-14T10:38:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Avs-safety](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@Avs-safety](https://discuss.huggingface.co/u/Avs-safety)\
**Post date:** [June 14, 2023, 10:38am UTC](https://discuss.huggingface.co/t/loading-local-tokenizer-robertatokenizerfast-from-pretrained/43205/1 "2023-06-14T10:38:52Z")

</div>

Hello, I have been following this tutorial; [Google Colab](https://colab.research.google.com/github/huggingface/blog/blob/main/notebooks/01_how_to_train.ipynb#scrollTo=4keFBUjQFOD1) however, I cannot get around an issue with loading my locally saved vocab and merges file for the tokenizer.

When I use:

```auto
from transformers import RobertaTokenizerFast

tokenizer = RobertaTokenizerFast.from_pretrained(r"C:\\Users\\folder", max_len=512)

```

I get:

```auto
OSError: Can't load tokenizer for 'C:\\Users\\folder'. 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 'C:\\Users\\folder' is the correct path to a directory containing all relevant files for a RobertaTokenizerFast tokenizer.

```

The directory contains a vocab and merges file, however whatever I try I cannot load the tokenizer - appreciate any help anyone can provide!
