Allow usage of TF Text BertTokenizer on TFBertTokenizer to make it servable on TF Serving
Author: piEsposito
Pull request: yes

# What does this PR do?

Fixes #19528. This PR introduces a flag that lets you use `tensorflow_text` `BertTokenizer` rather than `FastBertTokenizer`. This is important because as per https://github.com/tensorflow/serving/issues/2064 TF Serving does no support the `FastBertTokenizer` operations, so despite having the tokenizer in-graph, the model would not be servable in TF Serving


## Before submitting
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [x] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [x] Did you write any new necessary tests?


## Who can review?

@LysandreJik

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @

 If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
 Please tag fewer than 3 people.

Models:

- albert, bert, xlm: @LysandreJik
- blenderbot, bart, marian, pegasus, encoderdecoder,  t5: @patrickvonplaten, @patil-suraj
- longformer, reformer, transfoxl, xlnet: @patrickvonplaten
- fsmt: @stas00
- funnel: @sgugger
- gpt2: @patrickvonplaten, @LysandreJik
- rag: @patrickvonplaten, @lhoestq
- tensorflow: @LysandreJik

Library:

- benchmarks: @patrickvonplaten
- deepspeed: @stas00
- ray/raytune: @richardliaw, @amogkam
- text generation: @patrickvonplaten
- tokenizers: @n1t0, @LysandreJik
- trainer: @sgugger
- pipelines: @LysandreJik

Documentation: @sgugger

HF projects:

- datasets: [different repo](https://github.com/huggingface/datasets)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)

Examples:

- maintained examples (not research project or legacy): @sgugger, @patil-suraj
- research_projects/bert-loses-patience: @JetRunner
- research_projects/distillation: @VictorSanh

 -->


Comments:
_The documentation is not available anymore as the PR was closed or merged._

cc @Rocketknight1 @gante 

@gante, do I need to change anything els before it is possible to merge this PR?

@piEsposito It seems there is an issue with your CircleCI permissions, the tests won't run.
Could you try refreshing your permissions as shown [here](https://support.circleci.com/hc/en-us/articles/360048210711-How-to-Refresh-User-Permissions-)?

Other than that, we need a review from @Rocketknight1 -- then we are good to merge :)

@gante @Rocketknight1 thank you for your you feedback, the tests just passed, so I think we are good to go.

Let's hope TF Serving solves this on their end on the future too, but even if they do, they will only do it for TF >= 2.9, so to keep it servable on previous TF Serving versions, we will need the non-fast TF BertTokenizer anyway. 

Thanks!

Merged!