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

Efficient decoder text generation wrapper #273

Merged
merged 10 commits into from
Mar 10, 2023
Merged

Efficient decoder text generation wrapper #273

merged 10 commits into from
Mar 10, 2023

Conversation

jimypbr
Copy link
Contributor

@jimypbr jimypbr commented Feb 27, 2023

What does this PR do?

Current text generation returns all the logits back from IPU to host. However we only need the logits from the token to be generated. This wraps the model to return only what is necessary to improve the IO performance of the text generation.

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Feb 28, 2023

The documentation is not available anymore as the PR was closed or merged.

@jimypbr jimypbr marked this pull request as ready for review March 10, 2023 12:44
@jimypbr jimypbr changed the title Efficient encoder-decoder text generation wrapper Efficient decoder text generation wrapper Mar 10, 2023
Copy link
Collaborator

@katalinic-gc katalinic-gc left a comment

Choose a reason for hiding this comment

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

lgtm

@jimypbr jimypbr merged commit 66929fd into main Mar 10, 2023
@jimypbr jimypbr deleted the faster-textgen branch March 10, 2023 15:25
ncouro-gc pushed a commit to graphcore/optimum-graphcore-fork that referenced this pull request Mar 17, 2023
* Set the default matmul_proportion in IPUConfig to 0.2 so default config will work with decoder wrapper
ncouro-gc pushed a commit to graphcore/optimum-graphcore-fork that referenced this pull request Mar 17, 2023
* Set the default matmul_proportion in IPUConfig to 0.2 so default config will work with decoder wrapper
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