How to use Ray to train HuggingFace tokenizer in a distributed way?

How to use ray to train huggingface tokenzier using the API tokenizer.train_from_iterator(…)?

You can create an iterator using the “ray.data.Dataset.iter_batches” API? However, it will not do distributed training as we are sequentially iterating over a batch of data.