Tokenizers integration into onnx models 🤗
# 🚀 Feature request

Integrate tokenizers into models while converting them from `transformers` to `onnx` format.

## Motivation

I use NER camemBERT model for TokenClassification tasks from transformers library that I finetuned to my needs. I converted it to onnx format to deploy it on a Java client where I am planning to use it. But, I would like to integrate the SentenpieceTokenizer I used in python into Java and avoid to recode it in Java.

I found this repo extension to ONNXRuntime package, [here](https://github.com/microsoft/onnxruntime-extensions)
It helps to integrate tokenizers to onnx models by adding one pre-processing layer before model inference, and one post-processing layer after the model inference. It's not so easy to make it works perfectly with my NER model, they only have one GPT2 example and not so much informations in their docs.
I opened an [issue here](https://github.com/microsoft/onnxruntime-extensions/issues/164),  to describe my problem and to try to make it works.

## Your contribution

At this moment, I managed to convert an unsupported model from transformers to onnx by adding its support to transformers library (I could add it via PR). I also managed to adapt transformers NER TokenClassification pipeline to onnx runtime inference + final layer to use inference results, in python. 
I am finally trying to understand how I could build a `all_in_one_file` model in onnx format, and could add examples if I succeed.

Any explanations or help would be much appreciated 🤗

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.<|||||>@ChainYo Were you able to develop some examples?
I am facing a similar problem: I want Tokenizer and Converted Model in one file. <|||||>@ChainYo @hacceebhassan
Have either of you found a solution to this? We are now facing the same problem. Too bad this issue was closed, as I think this is a relevant issue. Exporting a single model doesn't do much for me, since I actually want to convert my entire pipeline (preprocessing steps->tokenizer->model), like I can do with a scikit-learn Pipelines...<|||||>Hey, have you managed to solve this issue? I also need to convert HF Tokernizer adn Model into single ONNX file.