erfanzar / EasyDeL

Accelerate your training with this open-source library. Optimize performance with streamlined training and serving options with JAX. 🚀
https://easydel.readthedocs.io/en/latest/
Apache License 2.0
167 stars 19 forks source link

Optimize mean loss and accuracy calculation #100

Closed yhavinga closed 4 months ago

yhavinga commented 4 months ago

This commit changes mean loss and accuracy calculation by keeping an accumulator for loss and accuracy, instead of lists of all previous values and summing those at each step.

The graph below shows the #trained tokens per time.

image

step time per step image