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

speculative decoding complete guide added #2524

Closed
wants to merge 1 commit into from

Conversation

shirinyamani
Copy link

@shirinyamani shirinyamani commented Sep 17, 2024

What does this PR do?

In this PR, I've provided a comprehensive guide on Speculative Decoding techniques aimed at enhancing inference speed. It includes a basic implementation of the core ideas from the paper Accelerating Large Language Model Decoding with Speculative Sampling, applied to GPT-2. Alongside the implementation, I've added detailed explanations of the underlying mathematical principles and an intuitive breakdown of why speculative decoding works.

This PR serves as a complementary extension to the speculation.md file in the TGI repository, offering further practical and theoretical insights into speculative sampling.

@Narsil
Copy link
Collaborator

Narsil commented Oct 1, 2024

Hi !

Thanks a lot for this contribution. This seems like a great contribution, but not really on point with text-generation-inference core goals. We do not provide speculation with draft models (for various reasons) for instance, nor is code really wanted in documentation (at least not this amount of code).

It feels to me like this could become a blog of your own, that we could maybe link to explain what is speculation ? As for TGI's documentation, we don't think it's our documentation's job to explain speculation (there are vastly better ressources out there) but more to explain HOW to leverage speculation within TGI, maybe a few unique tradeoffs we made, and only reference external content for core comprehension of the technique.

Does that make sense to you ? Would linking to a blog of your own work for you ?

@Narsil
Copy link
Collaborator

Narsil commented Oct 11, 2024

Closing for now, feel free to reopen.

@Narsil Narsil closed this Oct 11, 2024
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.

2 participants