# Custom Tokenizer Error - Please Help!

**URL:** <https://discuss.huggingface.co/t/custom-tokenizer-error-please-help/139539>\
**Category:** 🤗Tokenizers\
**Created:** [February 7, 2025, 4:08pm UTC](https://discuss.huggingface.co/t/custom-tokenizer-error-please-help/139539 "2025-02-07T16:08:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![samirchar](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@samirchar](https://discuss.huggingface.co/u/samirchar)\
**Post date:** [February 7, 2025, 4:08pm UTC](https://discuss.huggingface.co/t/custom-tokenizer-error-please-help/139539/1 "2025-02-07T16:08:23Z")

</div>

Hello, I created a customer tokenizer called ProteinTokenizer that inherits from PreTrainedTokenizer. I saved it using save\_pretrained, but when I try to load it in the following way, i get an error. I’ve been trying to debug for hours, but not sure what’s going on. Not sure If I’m naming something incorrectly, skipping an important step or what. Would love some help!

Here are the details:

I run:  
tokenizer = AutoTokenizer.from\_pretrained(  
‘samirchar/test\_dayhoff’,  
subfolder = “jamba-170m-seqsam-36w”,  
trust\_remote\_code=True,  
from\_slow=True  
)

The error:

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/e/9/e95dde95bd50bdc498ecadc238c96574c65fe3f8.png)

My repo structure looks like this:

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/e/e/ee75079020bcc2e8206dd79d8e27411515986666.png)

Inside the tokenizer\_config.json i’ve added this:

 ![image](https://us1.discourse-cdn.com/hellohellohello/original/3X/c/d/cd93b97cb11a4069346f3fbcd107271c49621287.png)

The **init**.py is empty

Thank you!
