Error out when token is outside of vocab size
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
:link: Helpful Links
:test_tube: See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/3535
- :page_facing_up: Preview Python docs built from this PR
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 ():
NEW FAILURES - The following jobs have failed:
- pull / unittest / linux (buck2) / linux-job (gh)
backends/arm/test/ops/test_view.py::TestSimpleView::test_view_tosa_BI_3 - pull / unittest / macos (buck2) / macos-job (gh)
backends/arm/test/ops/test_view.py::TestSimpleView::test_view_tosa_BI_3
This comment was automatically generated by Dr. CI and updates every 15 minutes.
This pull request was exported from Phabricator. Differential Revision: D57057026
This pull request was exported from Phabricator. Differential Revision: D57057026
This pull request was exported from Phabricator. Differential Revision: D57057026
This pull request was exported from Phabricator. Differential Revision: D57057026
This pull request has been merged in pytorch/executorch@f8403ed16f2da6e5d6db80a4a4ebe58a05215b91.