executorch icon indicating copy to clipboard operation
executorch copied to clipboard

Error out when token is outside of vocab size

Open cccclai opened this issue 2 years ago • 4 comments

Summary: Ideally it shouldn't happen, but if we post process the weight somehow too much it might happen. In Android, it just seg fault directly if it's outside of the range without error message. After this change, it's clearer:

I 00:00:00.180837 executorch:runner.cpp:364] Finish getting logits_tensor...
I 00:00:00.180907 executorch:runner.cpp:395] Start running tokenizer_->decode...
E 00:00:00.180911 executorch:bpe_tokenizer.cpp:155] token 18446744073709551615 is out side of vacab range 512
I 00:00:00.180914 executorch:runner.cpp:397] Finish running tokenizer_->decode...
F 00:00:00.180918 executorch:runner.cpp:398] In function generate(), assert failed: piece_res.ok()
Aborted

Differential Revision: D57057026

cccclai avatar May 07 '24 16:05 cccclai

:link: Helpful Links

:test_tube: See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/3535

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

:x: 2 New Failures

As of commit 00d9e602f972f19058ee3873dd2dd869c19259f8 with merge base f9db02af66380a32b72f60d2d32071656ec4e553 (image):

NEW FAILURES - The following jobs have failed:

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

pytorch-bot[bot] avatar May 07 '24 16:05 pytorch-bot[bot]

This pull request was exported from Phabricator. Differential Revision: D57057026

facebook-github-bot avatar May 07 '24 16:05 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D57057026

facebook-github-bot avatar May 07 '24 22:05 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D57057026

facebook-github-bot avatar May 07 '24 22:05 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D57057026

facebook-github-bot avatar May 08 '24 17:05 facebook-github-bot

This pull request has been merged in pytorch/executorch@f8403ed16f2da6e5d6db80a4a4ebe58a05215b91.

facebook-github-bot avatar May 09 '24 01:05 facebook-github-bot