After messing with webdataset I could not use it for my case. When I convert my 20Gb dataset with webdataset ShardWriter or with tarp CLI that conversion generated a 200Gb file and I do not have this space available on my disk. I am not sure, but I think that TFRecord is a better and less disk-consuming approach.
After this little journey, my ending was to load all the raw data in memory and tokenized it before passing it to the network. If you have enough RAM, I advise you to do the same.