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

Tutorial Notebook: Using the PEFT library with a DNA Language Model. #1873

Merged
merged 9 commits into from
Jul 5, 2024

Conversation

rahulbshrestha
Copy link
Contributor

This PR adds a tutorial notebook that uses the PEFT library with a DNA Language Model to solve a downstream task.

@rahulbshrestha rahulbshrestha marked this pull request as draft June 18, 2024 15:33
@BenjaminBossan
Copy link
Member

Thanks, this looks good so far. Ping me once the notebook is ready for review.

For general context, check #1837.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@rahulbshrestha rahulbshrestha marked this pull request as ready for review June 25, 2024 08:09
@rahulbshrestha
Copy link
Contributor Author

@BenjaminBossan this tutorial is ready for review!

Copy link
Member

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

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

Thanks a lot for providing this detailed notebook on DNA-LM training with PEFT. I added a couple of comments, please check them out.

examples/dna_language_models/dna_lm.ipynb Outdated Show resolved Hide resolved
examples/dna_language_models/dna_lm.ipynb Outdated Show resolved Hide resolved
examples/dna_language_models/dna_lm.ipynb Outdated Show resolved Hide resolved
examples/dna_language_models/dna_lm.ipynb Outdated Show resolved Hide resolved
examples/dna_language_models/dna_lm.ipynb Outdated Show resolved Hide resolved
examples/dna_language_models/dna_lm.ipynb Outdated Show resolved Hide resolved
examples/dna_language_models/dna_lm.ipynb Outdated Show resolved Hide resolved
examples/dna_language_models/dna_lm.ipynb Outdated Show resolved Hide resolved
examples/dna_language_models/dna_lm.ipynb Outdated Show resolved Hide resolved
examples/dna_language_models/dna_lm.ipynb Outdated Show resolved Hide resolved
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

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

Thanks for the updates. There are only a few minor issues left.

Also, could you please run the whole notebook before committing it, so that the outputs are directly visible to users without having to run the notebook first.

examples/dna_language_models/dna_lm.ipynb Outdated Show resolved Hide resolved
"train_sequences = []\n",
"val_sequences = []\n",
"\n",
"dataset_limit = 200\n",
Copy link
Member

Choose a reason for hiding this comment

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

Okay, so let's add a comment that this is an optimization for speed, but for best results users should set this variable to None and use the whole dataset.

examples/dna_language_models/dna_lm.ipynb Outdated Show resolved Hide resolved
examples/dna_language_models/dna_lm.ipynb Outdated Show resolved Hide resolved
@rahulbshrestha
Copy link
Contributor Author

@BenjaminBossan I just added the second review changes as you requested.

Copy link
Member

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

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

Thanks for the updates, we're almost good. Just a few small things:

  • Let's add a comment about the data size limit
  • Let's not print the model so often, as it clutters the notebook and distracts from the important things
  • It would be nice to have a short conclusion, e.g.: How much memory is saved with PEFT? If users want to improve the results, what could they test next?

examples/dna_language_models/dna_lm.ipynb Outdated Show resolved Hide resolved
examples/dna_language_models/dna_lm.ipynb Outdated Show resolved Hide resolved
examples/dna_language_models/dna_lm.ipynb Outdated Show resolved Hide resolved
examples/dna_language_models/dna_lm.ipynb Outdated Show resolved Hide resolved
@rahulbshrestha
Copy link
Contributor Author

rahulbshrestha commented Jul 4, 2024

@BenjaminBossan I added changes from your latest review.

Copy link
Member

@BenjaminBossan BenjaminBossan left a comment

Choose a reason for hiding this comment

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

Thanks for adding this notebook, the last changes LGTM.

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.

3 participants