How to calculate tokens per second while fine-tuning llm?

Hi, I am trying to fine-tune an seq2seq LLM and I want to calculate the tokens per second, so how can I achieve this ?

@mitanshudodia the search for this definition guide me to this thread. Did you find ho w that is calculated?