# Customize tokenizer in model card's widget

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcustomize-tokenizer-in-model-cards-widget%2F1836%3E%5C
**Category:** Beginners\
**Created:** [November 1, 2020, 2:55pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcustomize-tokenizer-in-model-cards-widget%2F1836 "2020-11-01T14:55:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ethanyt](https://avatars.discourse-cdn.com/v4/letter/e/e47774/32.png) [@ethanyt](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fethanyt)%5C
**Post date:** [November 1, 2020, 2:55pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcustomize-tokenizer-in-model-cards-widget%2F1836%2F1 "2020-11-01T14:55:48Z")

</div>

I trained a Chinese Roberta model. In the model card, the widget uses a tokenizer defined in config.json( `RobertaTokenizer` ). But my model uses `BertTokenizer` . Can I customize the tokenizer in the widget of the model card just like I can choose any combination of model and tokenizer in a pipeline?

I tried to use `BertModel` instead of `RobertaModel` (copy weights from Roberta to Bert). But the position embedding is different. And the outputs are different… So I have to use this combination of `RobertaModel` and `BertTokenizer` . Is that mean I can’t use the inference widget?

---

<div class="post-metadata">

**Author:** ![thomwolf](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/thomwolf/32/2198_2.png) [@thomwolf](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fthomwolf)%5C
**Post date:** [November 3, 2020, 8:30am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fcustomize-tokenizer-in-model-cards-widget%2F1836%2F2 "2020-11-03T08:30:15Z")

</div>

We are working on adding this indeed (as I understand it’s the same as [https://github.com/huggingface/transformers/issues/8125](https://github.com/huggingface/transformers/issues/8125))
