# How to perform tokenization on an ONNX model in JS?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-perform-tokenization-on-an-onnx-model-in-js%2F17581%3E%5C
**Category:** 🤗Tokenizers\
**Created:** [May 6, 2022, 1:06am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-perform-tokenization-on-an-onnx-model-in-js%2F17581 "2022-05-06T01:06:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![msamogh](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/msamogh/32/967_2.png) [@msamogh](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmsamogh)%5C
**Post date:** [May 6, 2022, 1:06am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-perform-tokenization-on-an-onnx-model-in-js%2F17581%2F1 "2022-05-06T01:06:37Z")

</div>

I’ve exported a custom PyTorch-based Transformer model into ONNX to run it on NodeJS. However, the exported model seems to expect `input_ids` directly (and not raw text).

**Is there any way I can perform tokenization in JS?**
