# BpeTrainer implementation in Python

**URL:** <https://discuss.huggingface.co/t/bpetrainer-implementation-in-python/8625>\
**Category:** 🤗Tokenizers\
**Created:** [July 23, 2021, 12:58pm UTC](https://discuss.huggingface.co/t/bpetrainer-implementation-in-python/8625 "2021-07-23T12:58:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![amankhandelia](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/amankhandelia/32/2174_2.png) [@amankhandelia](https://discuss.huggingface.co/u/amankhandelia)\
**Post date:** [July 23, 2021, 12:58pm UTC](https://discuss.huggingface.co/t/bpetrainer-implementation-in-python/8625/1 "2021-07-23T12:58:32Z")

</div>

Hi there,

So I was perusing through the tokenizer library in order pick some knowledge about the nitty gritty of the BpeTrainer, although I was only able to find the [rust implementation (github.com)](https://github.com/huggingface/tokenizers/blob/0fe9214f44f4e117a85e3880c20631cc70298d86/tokenizers/src/models/bpe/trainer.rs), after bit more of digging I came across the fact that the tokenizer library only offers bindings for other languages not any native implementations, so my question is, is there any good implementation of the BpeTrainer or similar functionality in python, which one can refer

Thanks in advance.
