-
Notifications
You must be signed in to change notification settings - Fork 68
docs: update User Manual and Tutorials after refactoring, add "Power User" guide #414
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
base: main
Are you sure you want to change the base?
Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
f2bbf51 to
318f085
Compare
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.
LFTM, but some changes and review required. Also, I feel that some of the codeblocks for the notebooks need to be formatted to ensure they fit within one page, so a couple of newlines within the SmashConfig definition, it should be good :)
| # Create and configure SmashConfig | ||
| smash_config = SmashConfig() | ||
| smash_config = SmashConfig(["c_whisper", "whisper_s2t"]) | ||
| smash_config.add_processor(model_id) # Required for Whisper |
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.
@johannaSommer can't we also simplify this process? i.e. just wrap it underneath the add method, with some type checking to redirect to the correct sub-function i.e. add_processor, add_tokenizer, and add_dataset? Not sure if simple enough.
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.
Yes completely agree, we already discussed this in the initial PR review for the actual refactoring. We decided to leave it out of the current PR for now and it's on the roadmap for future refactoring!
|
|
||
| ## <img src="./docs/assets/images/pruna_cool.png" alt="Pruna Cool" width=20></img> Introduction | ||
|
|
||
| Pruna is a model optimization framework built for developers, enabling you to deliver faster, more efficient models with minimal overhead. It provides a comprehensive suite of compression algorithms including [caching](https://docs.pruna.ai/en/stable/compression.html#cachers), [quantization](https://docs.pruna.ai/en/stable/compression.html#quantizers), [pruning](https://docs.pruna.ai/en/stable/compression.html#pruners), [distillation](https://docs.pruna.ai/en/stable/compression.html#distillers) and [compilation](https://docs.pruna.ai/en/stable/compression.html#compilers) techniques to make your models: |
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.
so, we won't have different sections within the compression page anymore? I think it would still be good to redirect to this page, as a way to showcase how many cool algorithms we support.
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.
Also, if this page does not exist anymore, did we double check if we don't break other redirects?
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.
yes you're right, I added this back!
| @@ -0,0 +1,160 @@ | |||
| :title: Power User Guide - Advanced Features in the Pruna package | |||
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.
I think we still might need to add this page to a toctree somehwere?
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.
good catch, thanks a lot. Will open a PR in the internal repository with this (plus the updated algorithm overview generation)
c044269 to
bfad161
Compare
adea603 to
fd787f0
Compare
a55fb5b to
549d3f5
Compare
Description
In this PR we follow up the refactoring from #401 and update all examples with a SmashConfig to the new interface (old one will still be supported though). Additionally, I've added a first version of a Power User guide that describes more advanced features of the package.
Related Issue
None.
Type of Change
How Has This Been Tested?
I tested all update code snippets.
Checklist
Additional Notes
None.
Note
Updates docs/tutorials to the new SmashConfig interface and adds a Power User guide; adjusts algorithm customization docs and updates HQQ/pre-smash tests accordingly.
SmashConfig(["algo"])and hyperparams viaSmashConfig({"algo": {...}}); removed group keys/prefixed hyperparams inconfigure.rst,smash.rst,save_load.rst,evaluate.rst, and tutorials (e.g.,docs/tutorials/video_generation.ipynb).PrunaAlgorithmBase, addAlgorithmTag,compatible_before/after, andsave_fn; update import paths and testing guidance.docs/user_manual/power_user.rstcoveringtarget_modules,experimental=True, and manual algorithm ordering; removesdocs/user_manual/target_modules.rst.HQQ, importPrunaModel, fix post-smash hook and hyperparameters.check_algorithm_availabilityusage/tests; adjusttest_pre_smash_routines.pyimports accordingly.Written by Cursor Bugbot for commit a55fb5b. This will update automatically on new commits. Configure here.