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

Add profiling and chunked cross-entropy #192

Merged
merged 12 commits into from
Jan 14, 2025
Merged

Add profiling and chunked cross-entropy #192

merged 12 commits into from
Jan 14, 2025

Conversation

apaz-cli
Copy link
Contributor

@apaz-cli apaz-cli commented Jan 12, 2025

I also added profiler/nvtx markers and fixed all the type errors in train.py.

@apaz-cli apaz-cli changed the title WIP: Add profiling Add profiling and chunked cross-entropy Jan 13, 2025
@apaz-cli apaz-cli marked this pull request as ready for review January 13, 2025 06:00
@apaz-cli
Copy link
Contributor Author

I renamed the log file and broke the logging test. Will fix tomorrow morning.

src/zeroband/train.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@samsja samsja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some small comments, good work !! Do you have some memory reduction number when using the chunked cross entropy ?

@apaz-cli
Copy link
Contributor Author

@samsja Looks like a ~10% improvement.

torch.cuda.max_memory_allocated():
  No chunking:
    45638.64 MB
  8 chunks:
    41635.58 MB

@apaz-cli apaz-cli merged commit 57c68c6 into main Jan 14, 2025
2 checks passed
@apaz-cli apaz-cli deleted the ap/profiler_wip branch January 14, 2025 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants