Compute the Model FLOPs Utilization (MFU) for a transformer training run. MFU measures how efficiently a training setup uses the available hardware compute. Given the number of model parameters, the achieved training throughput (in tokens/second), and the theoretical peak FLOPS of the hardware, return the MFU as the ratio of achieved FLOP/s to peak FLOP/s (so 0.5 means 50% of peak), rounded to 4 decimal places.
Use the standard approximation that one training step (forward + backward) costs approximately 6 FLOPs per parameter per token.