# Does the ByteLevelBPETokenizer need to be wrapped in a normal Tokenizer?

**URL:** <https://discuss.huggingface.co/t/does-the-bytelevelbpetokenizer-need-to-be-wrapped-in-a-normal-tokenizer/34121>\
**Category:** 🤗Tokenizers\
**Created:** [March 18, 2023, 7:08pm UTC](https://discuss.huggingface.co/t/does-the-bytelevelbpetokenizer-need-to-be-wrapped-in-a-normal-tokenizer/34121 "2023-03-18T19:08:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vedantroy](https://avatars.discourse-cdn.com/v4/letter/v/c77e96/32.png) [@vedantroy](https://discuss.huggingface.co/u/vedantroy)\
**Post date:** [March 18, 2023, 7:08pm UTC](https://discuss.huggingface.co/t/does-the-bytelevelbpetokenizer-need-to-be-wrapped-in-a-normal-tokenizer/34121/1 "2023-03-18T19:08:47Z")

</div>

The Huggingface tokenizer documents say to use the following:

```auto
from tokenizers import Tokenizer
from tokenizers.models import BPE
tokenizer = Tokenizer(BPE(unk_token="[UNK]"))

```

However, it looks like the correct way to train a byte-level BPE is as follows:

```auto
tokenizer = ByteLevelBPETokenizer()
tokenizer.train(["path/to/train.txt"], vocab_size=1000, min_frequency=2, special_tokens=[
    "<s>",
    "<pad>",
    "</s>",
    "<unk>",
    "<mask>",
])

```

Why is the `ByteLevelBPETokenizer` not just a normal tokenizer model?
