Trainer: log token count

I would like to log training progress in terms of tokens trained so far, while training.

I have checked whether this number is passed to any of the callbacks, but it seems like it’s not. Is there any way to access this information without subclassing the trainer?