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 Llama2 resources #25531

Merged
merged 5 commits into from
Aug 23, 2023
Merged

Add Llama2 resources #25531

merged 5 commits into from
Aug 23, 2023

Conversation

wonhyeongseo
Copy link
Contributor

@wonhyeongseo wonhyeongseo commented Aug 16, 2023

Co-authored-by: @jungnerd @kihoon71

What does this PR do?

Adds resources of Llama2 according to this issue.
This PR serves as an example to our OSSCA mentees who will contribute more models.

Part of #20055

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

@stevhliu, may you please review this PR?

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.

@wonhyeongseo wonhyeongseo changed the title Add LLaMA2 resources Add Llama2 resources Aug 16, 2023
@wonhyeongseo wonhyeongseo marked this pull request as draft August 16, 2023 08:12
@wonhyeongseo
Copy link
Contributor Author

Hello everyone,

We've been working on organizing resources related to LLaMA2, and we've noticed that many of the resources intersect category-wise. We're trying to ensure that the documentation is intuitive and helpful for users. Could anyone provide suggestions or best practices on how to best arrange these resources?

Additionally, after conducting a full-text search on the repository, we couldn't locate any notebooks specifically related to LLaMA2. If anyone is aware of such notebooks or has worked on one, could you kindly point us in the right direction?

Thank you in advance for your assistance!

Best regards,
@wonhyeongseo and @jungnerd

@ArthurZucker
Copy link
Collaborator

There are quite a few ressources that are indeed not properly linked.
Here is one notebook: https://colab.research.google.com/drive/1PEQyJO1-f6j0S_XJ8DV50NkpzasXkrzd?usp=sharing%E2%80%A6 that has been shared + updated by a contributor!

* style: one liners for each resource

Co-Authored-By: Woojun Jung <[email protected]>
Co-Authored-By: Kihoon Son <[email protected]>
@wonhyeongseo
Copy link
Contributor Author

Thank you for the pointer @ArthurZucker! With your guidance, we found googling site:https://colab.research.google.com transformers llama2 to be quite effective and useful.

We have a couple of questions:

  • Would it be okay to add Llama2 to the text-generation script and update the llm tutorial example to Llama2? (I feel that since llama2 is still gated, we cannot at this time)
  • How would you like us to treat spaces like this one for the resource section?
  • Would it be ok to add LLaMA resources on top of Llama2 as they are the same family like GPT? (cc. @stevhliu )

    Nice, thank you for adding those. Now you just have a few more to go! 😁

    Take a look at the OpenAI GPT2 resources page and feel free to add over whatever is missing here since the usage for OpenAI GPT is practically the same.

We will soon cover more models that are "mainstream" in Korea, translate the docs and contribute localized blogs and notebooks. Sorry for being so late on schedule.

Thank you so much for your friendly and honest guidance, hope we can have a call sometime.

Best regards,
Won

@wonhyeongseo wonhyeongseo marked this pull request as ready for review August 17, 2023 14:24
@wonhyeongseo
Copy link
Contributor Author

May you please review this PR, @stevhliu ? Thanks a ton for your help!

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

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

Great job friends!

How would you like us to treat spaces like this one for the resource section?

This is a community model card so we shouldn't include it.

Would it be ok to add LLaMA resources on top of Llama2 as they are the #20084 (review)?

Yes absolutely! I would just make a note that the resource is for LLaMA, but it can also be applied to LLaMA2.

docs/source/en/model_doc/llama2.md Outdated Show resolved Hide resolved
docs/source/en/model_doc/llama2.md Outdated Show resolved Hide resolved
- A notebook on how to [run the Llama 2 Chat Model with 4-bit quantization on a local computer or Google Colab](https://colab.research.google.com/drive/1X1z9Q6domMKl2CnEM0QGHNwidLfR4dW2?usp=sharing). 🌎

🚀 Deploy
- A blog on how to [use SageMaker with Llama2 and QLora for efficient model deployment](https://www.philschmid.de/sagemaker-llama2-qlora) by Phil Schmid.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- A blog on how to [use SageMaker with Llama2 and QLora for efficient model deployment](https://www.philschmid.de/sagemaker-llama2-qlora) by Phil Schmid.
- A blog on how to [use SageMaker with Llama2 and QLora for efficient model deployment](https://www.philschmid.de/sagemaker-llama2-qlora).


🚀 Deploy
- A blog on how to [use SageMaker with Llama2 and QLora for efficient model deployment](https://www.philschmid.de/sagemaker-llama2-qlora) by Phil Schmid.
- A blog on how to [deploy Llama models using SageMaker for scalable applications](https://www.philschmid.de/sagemaker-llama-llm) by Phil Schmid.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- A blog on how to [deploy Llama models using SageMaker for scalable applications](https://www.philschmid.de/sagemaker-llama-llm) by Phil Schmid.
- A blog on how to [deploy Llama models using SageMaker for scalable applications](https://www.philschmid.de/sagemaker-llama-llm).

docs/source/en/model_doc/llama2.md Outdated Show resolved Hide resolved
docs/source/en/model_doc/llama2.md Outdated Show resolved Hide resolved
docs/source/en/model_doc/llama2.md Outdated Show resolved Hide resolved
docs/source/en/model_doc/llama2.md Outdated Show resolved Hide resolved
⚗️ Optimization
- A blog on how to [fine-tune Llama 2 using the Direct Preference Optimization (DPO) method](https://huggingface.co/blog/dpo-trl).
- A blog on how to [instruction-tune Llama 2 for optimized performance](https://www.philschmid.de/instruction-tune-llama-2) by Phil Schmid.
- A notebook on how to [fine-tune the Llama 2 model on a personal computer using QLoRa and TRL](https://colab.research.google.com/drive/1SYpgFpcmtIUzdE7pxqknrM4ArCASfkFQ?usp=sharing). 🌎
Copy link
Member

Choose a reason for hiding this comment

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

Put the link emphasis on "notebook" rather than the title of it (same comment for the rest of the notebooks)

Copy link
Contributor Author

@wonhyeongseo wonhyeongseo left a comment

Choose a reason for hiding this comment

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

It's always fantastic to receive your feedback, @stevhliu ! 😊 Thank you so much for your incredible assistance! 🙌🌟

docs/source/en/model_doc/llama2.md Outdated Show resolved Hide resolved
docs/source/en/model_doc/llama2.md Outdated Show resolved Hide resolved
docs/source/en/model_doc/llama2.md Outdated Show resolved Hide resolved
docs/source/en/model_doc/llama2.md Outdated Show resolved Hide resolved
docs/source/en/model_doc/llama2.md Outdated Show resolved Hide resolved
docs/source/en/model_doc/llama2.md Outdated Show resolved Hide resolved
docs/source/en/model_doc/llama2.md Outdated Show resolved Hide resolved
Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

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

Awesome, once we fix the tiny typo we're ready to merge!

docs/source/en/model_doc/llama2.md Outdated Show resolved Hide resolved
Co-authored-by: Steven Liu <[email protected]>
@wonhyeongseo
Copy link
Contributor Author

wonhyeongseo commented Aug 22, 2023

Awesome, once we fix the tiny typo we're ready to merge!

Done and dusted. Thank you so much for your help @stevhliu ! Looking forward to our Q&A session!!

@stevhliu stevhliu merged commit 5794363 into huggingface:main Aug 23, 2023
3 checks passed
@wonhyeongseo wonhyeongseo deleted the llama2-resources branch August 23, 2023 01:07
parambharat pushed a commit to parambharat/transformers that referenced this pull request Sep 26, 2023
* docs: feat: model resources for llama2

Co-authored-by: Woojun Jung <[email protected]>

* fix: add description for dpo and rearrange posts

* docs: feat: add llama2 notebook resources

* style: one liners for each resource

Co-Authored-By: Woojun Jung <[email protected]>
Co-Authored-By: Kihoon Son <[email protected]>

* Apply suggestions from code review

Co-authored-by: Steven Liu <[email protected]>

* Fix typo

Co-authored-by: Steven Liu <[email protected]>

---------

Co-authored-by: Woojun Jung <[email protected]>
Co-authored-by: Woojun Jung <[email protected]>
Co-authored-by: Kihoon Son <[email protected]>
Co-authored-by: Steven Liu <[email protected]>
blbadger pushed a commit to blbadger/transformers that referenced this pull request Nov 8, 2023
* docs: feat: model resources for llama2

Co-authored-by: Woojun Jung <[email protected]>

* fix: add description for dpo and rearrange posts

* docs: feat: add llama2 notebook resources

* style: one liners for each resource

Co-Authored-By: Woojun Jung <[email protected]>
Co-Authored-By: Kihoon Son <[email protected]>

* Apply suggestions from code review

Co-authored-by: Steven Liu <[email protected]>

* Fix typo

Co-authored-by: Steven Liu <[email protected]>

---------

Co-authored-by: Woojun Jung <[email protected]>
Co-authored-by: Woojun Jung <[email protected]>
Co-authored-by: Kihoon Son <[email protected]>
Co-authored-by: Steven Liu <[email protected]>
EduardoPach pushed a commit to EduardoPach/transformers that referenced this pull request Nov 18, 2023
* docs: feat: model resources for llama2

Co-authored-by: Woojun Jung <[email protected]>

* fix: add description for dpo and rearrange posts

* docs: feat: add llama2 notebook resources

* style: one liners for each resource

Co-Authored-By: Woojun Jung <[email protected]>
Co-Authored-By: Kihoon Son <[email protected]>

* Apply suggestions from code review

Co-authored-by: Steven Liu <[email protected]>

* Fix typo

Co-authored-by: Steven Liu <[email protected]>

---------

Co-authored-by: Woojun Jung <[email protected]>
Co-authored-by: Woojun Jung <[email protected]>
Co-authored-by: Kihoon Son <[email protected]>
Co-authored-by: Steven Liu <[email protected]>
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.

4 participants