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

[docs] LLM inference #29791

Merged
merged 5 commits into from
Apr 22, 2024
Merged

[docs] LLM inference #29791

merged 5 commits into from
Apr 22, 2024

Conversation

stevhliu
Copy link
Member

@stevhliu stevhliu commented Mar 21, 2024

This PR creates a lightweight LLM inference optimization guide focused on just providing a brief explanation and copy/paste-able code examples so users can instantly get going without necessarily needing to get too in-depth in the underlying conceptual details about how it works. It includes:

  • static kv-cache + torch.compile
  • speculative and prompt lookup decoding
  • attention optimizations (FlashAttention-2 and SDPA)
  • quantization

@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.

@stevhliu
Copy link
Member Author

For each of the topics covered, I was wondering if:

Copy link
Member

@SunMarc SunMarc 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 great work @stevhliu ! I left a couple of suggestions.

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@gante gante left a comment

Choose a reason for hiding this comment

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

Very cool 🙌

Copy link
Contributor

@younesbelkada younesbelkada left a comment

Choose a reason for hiding this comment

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

Fantastic work ! 🚀

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Looks great - thanks for adding!

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

Sorry for the late review here!

@stevhliu stevhliu merged commit e74d793 into huggingface:main Apr 22, 2024
8 checks passed
@stevhliu stevhliu deleted the llm-optim branch April 22, 2024 19:41
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.

None yet

9 participants