-
Notifications
You must be signed in to change notification settings - Fork 42
pip package for optimizers #7
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
Conversation
cd4d389 to
4c4e467
Compare
|
@microsoft-github-policy-service agree |
|
Thank you for your contribution! A pip package release was part of our future plans, and it's very helpful for you to get this done so quickly. I'll take a look over the PR soon and leave some feedback. |
|
Thanks for the review, I'll update the code according to these comments. |
4c4e467 to
616643c
Compare
616643c to
b09f906
Compare
byronxu99
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I'm merging it
|
Thank you very much for your contribution! |
This pull request intend to make the dion optimizer pip installable in a standalone way. The objective is to allow the user to install the optimizer by running:
This would install the package named
dion, in which optimizers can be imported with:The requirement to run the training script can be installed by cloning the repo and running:
During the process, the
optimizersfolder was renamed todionto avoid users installing a package namedoptimizers, which is too generic and could cause conflicts. I would understand if you reject the PR if you think that this change is too important. I'm also open to modifications about names or global repository organisation. Feel free to ask for modifications!Finally, I moved the testing functions in the
testsfolder to be compliant with pytest; these tests can be run in the following way:Similarly, the benchmarking can be done using the standalone app in the
benchmarkfolder:Package Installation:
setup.py: Created asetup.pyfile to enable installation of thedionpackage with optional extras for development and training. This enhances usability and simplifies dependency management for different use cases.Dependency Management:
requirements_dion.txt,requirements_dev.txt,requirements_train.txt) to manage dependencies for standalone usage, development, and training. [1] [2] [3]Modularization and File Restructuring:
optimizersmodule was renamed todion, and corresponding imports were updated across files, such as intrain.pyanddion/__init__.py. This improves clarity and aligns with the package's naming convention. [1] [2] [3]Benchmarking:
benchmark_newton_shultz.pyto provide detailed benchmarks for Newton-Schulz kernel performance, including one-off timing, grid sweeps, and TFLOPS plots. This script helps evaluate and optimize computational efficiency.Testing:
tests/test_newton_shultz.pywith comprehensive tests for functions likens_line_1,ns_line_2, andnewton_schulz_triton. These tests ensure correctness and reliability of the Triton-based implementations.