# Add new tokens for subwords

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fadd-new-tokens-for-subwords%2F489%3E%5C
**Category:** 🤗Tokenizers\
**Created:** [July 27, 2020, 11:04am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fadd-new-tokens-for-subwords%2F489 "2020-07-27T11:04:38Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![anthony](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/anthony/32/2505_2.png) [@anthony](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fanthony)%5C
**Post date:** [July 29, 2020, 11:56pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fadd-new-tokens-for-subwords%2F489%2F3 "2020-07-29T23:56:26Z")

</div>

The tokens you add with `add_tokens` are not added directly to the original vocabulary, but instead they are part of a special vocabulary. They end up being handled first, so that what you define manually always has the priority.  
As you noticed, if you specify `##committed` in the input text, it will use your token, but not without the `##`. This is simply because they are treated literally, just as you added them.

So, you should be able to achieve what you want by doing:

```auto
tokenizer.add_tokens(['committed'])
tokenizer.tokenizer('hellocommitted')
# ['hello', 'commited']

```

---

_[View the full topic](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fadd-new-tokens-for-subwords%2F489)._
