Skip to content

Conversation

@larryliu0820
Copy link
Contributor

@larryliu0820 larryliu0820 commented Aug 6, 2024

Stack from ghstack (oldest at bottom):

Last PR #4556 refactored run_model_step() so that it is suitable to be
extracted out as a separate class.

This new TextDecoderRunner provides 2 APIs:

  • step(tokens, start_pos)
    This API takes one or more tokens with start_pos and feed them into Module. Return a tensor of logits.

  • logits_to_token(logits)
    This API samples the result and returns a token. We don't expect this
    logic to change across different runners.

Differential Revision: D60856571

Last PR #4556 refactored run_model_step() so that it is suitable to be
extracted out as a separate class.

This new `TextDecoderRunner` provides 2 APIs:

* step(tokens, start_pos)
This API takes one or more tokens with start_pos and feed them into Module. Return a tensor of logits.

* logits_to_token(logits)
This API samples the result and returns a token. We don't expect this
logic to change across different runners.

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Aug 6, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/4567

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit e8da443 with merge base 92edd04 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 6, 2024
larryliu0820 added a commit that referenced this pull request Aug 6, 2024
Last PR #4556 refactored run_model_step() so that it is suitable to be
extracted out as a separate class.

This new `TextDecoderRunner` provides 2 APIs:

* step(tokens, start_pos)
This API takes one or more tokens with start_pos and feed them into Module. Return a tensor of logits.

* logits_to_token(logits)
This API samples the result and returns a token. We don't expect this
logic to change across different runners.

ghstack-source-id: 72cdfbc
Pull Request resolved: #4567
@larryliu0820
Copy link
Contributor Author

@larryliu0820 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Last PR #4556 refactored run_model_step() so that it is suitable to be
extracted out as a separate class.

This new `TextDecoderRunner` provides 2 APIs:

* step(tokens, start_pos)
This API takes one or more tokens with start_pos and feed them into Module. Return a tensor of logits.

* logits_to_token(logits)
This API samples the result and returns a token. We don't expect this
logic to change across different runners.

Differential Revision: [D60856571](https://our.internmc.facebook.com/intern/diff/D60856571)

[ghstack-poisoned]
larryliu0820 added a commit that referenced this pull request Aug 6, 2024
Last PR #4556 refactored run_model_step() so that it is suitable to be
extracted out as a separate class.

This new `TextDecoderRunner` provides 2 APIs:

* step(tokens, start_pos)
This API takes one or more tokens with start_pos and feed them into Module. Return a tensor of logits.

* logits_to_token(logits)
This API samples the result and returns a token. We don't expect this
logic to change across different runners.

ghstack-source-id: 2628a3e
Pull Request resolved: #4567
@larryliu0820
Copy link
Contributor Author

@larryliu0820 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Last PR #4556 refactored run_model_step() so that it is suitable to be
extracted out as a separate class.

This new `TextDecoderRunner` provides 2 APIs:

* step(tokens, start_pos)
This API takes one or more tokens with start_pos and feed them into Module. Return a tensor of logits.

* logits_to_token(logits)
This API samples the result and returns a token. We don't expect this
logic to change across different runners.

Differential Revision: [D60856571](https://our.internmc.facebook.com/intern/diff/D60856571)

[ghstack-poisoned]
@larryliu0820
Copy link
Contributor Author

@larryliu0820 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Last PR #4556 refactored run_model_step() so that it is suitable to be
extracted out as a separate class.

This new `TextDecoderRunner` provides 2 APIs:

* step(tokens, start_pos)
This API takes one or more tokens with start_pos and feed them into Module. Return a tensor of logits.

* logits_to_token(logits)
This API samples the result and returns a token. We don't expect this
logic to change across different runners.

Differential Revision: [D60856571](https://our.internmc.facebook.com/intern/diff/D60856571)

[ghstack-poisoned]
@larryliu0820
Copy link
Contributor Author

@larryliu0820 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Last PR #4556 refactored run_model_step() so that it is suitable to be
extracted out as a separate class.

This new `TextDecoderRunner` provides 2 APIs:

* step(tokens, start_pos)
This API takes one or more tokens with start_pos and feed them into Module. Return a tensor of logits.

* logits_to_token(logits)
This API samples the result and returns a token. We don't expect this
logic to change across different runners.

Differential Revision: [D60856571](https://our.internmc.facebook.com/intern/diff/D60856571)

[ghstack-poisoned]
Last PR #4556 refactored run_model_step() so that it is suitable to be
extracted out as a separate class.

This new `TextDecoderRunner` provides 2 APIs:

* step(tokens, start_pos)
This API takes one or more tokens with start_pos and feed them into Module. Return a tensor of logits.

* logits_to_token(logits)
This API samples the result and returns a token. We don't expect this
logic to change across different runners.

Differential Revision: [D60856571](https://our.internmc.facebook.com/intern/diff/D60856571)

[ghstack-poisoned]
@larryliu0820
Copy link
Contributor Author

@larryliu0820 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Last PR #4556 refactored run_model_step() so that it is suitable to be
extracted out as a separate class.

This new `TextDecoderRunner` provides 2 APIs:

* step(tokens, start_pos)
This API takes one or more tokens with start_pos and feed them into Module. Return a tensor of logits.

* logits_to_token(logits)
This API samples the result and returns a token. We don't expect this
logic to change across different runners.

Differential Revision: [D60856571](https://our.internmc.facebook.com/intern/diff/D60856571)

[ghstack-poisoned]
@larryliu0820
Copy link
Contributor Author

@larryliu0820 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Last PR #4556 refactored run_model_step() so that it is suitable to be
extracted out as a separate class.

This new `TextDecoderRunner` provides 2 APIs:

* step(tokens, start_pos)
This API takes one or more tokens with start_pos and feed them into Module. Return a tensor of logits.

* logits_to_token(logits)
This API samples the result and returns a token. We don't expect this
logic to change across different runners.

Differential Revision: [D60856571](https://our.internmc.facebook.com/intern/diff/D60856571)

[ghstack-poisoned]
@larryliu0820
Copy link
Contributor Author

@larryliu0820 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Last PR #4556 refactored run_model_step() so that it is suitable to be
extracted out as a separate class.

This new `TextDecoderRunner` provides 2 APIs:

* step(tokens, start_pos)
This API takes one or more tokens with start_pos and feed them into Module. Return a tensor of logits.

* logits_to_token(logits)
This API samples the result and returns a token. We don't expect this
logic to change across different runners.

Differential Revision: [D60856571](https://our.internmc.facebook.com/intern/diff/D60856571)

[ghstack-poisoned]
@larryliu0820
Copy link
Contributor Author

@larryliu0820 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot merged commit 30c3a15 into gh/larryliu0820/44/base Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants