Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize the Trompt example to reduce training time by ~30% #477

Merged
merged 2 commits into from
Jan 3, 2025

Conversation

akihironitta
Copy link
Member

@akihironitta akihironitta commented Jan 2, 2025

Summary

Reduces training time by 29% by:

Benchmark results

Benchmarked the change using jannis dataset on g6.4xlarge that has a L4 GPU. To reproduce, run:

$ python examples/trompt.py --dataset jannis
$ python examples/trompt.py --dataset jannis --compile

Average time per training step:

master (A) this PR (B) B/A
eager 742.79 ms 741.22 ms 0.99x
compile 262.24 ms 186.80 ms 0.71x

Average time per evaluation step:

master (A) this PR (B) B/A
eager 303.76 ms 302.73 ms 1.00x
compile 58.75 ms 56.27 ms 0.96x

Happy holidays! 🎄🧹

@akihironitta akihironitta merged commit da158fb into master Jan 3, 2025
14 checks passed
@akihironitta akihironitta deleted the aki/perf0 branch January 3, 2025 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant