Commit 26fac04
committed
[TRTLLM-6756][feat] Update beam search in TorchSampler to cover more features
- Add metadata object to grouped_request to pass additional data, which is not part of the SamplingStrategy definition.
- Add several buffer to TorchSampler Store for beam search features, which are only allocated when beam search is used
- Add support for beam search with streaming enabled
- Beam search no longer requires all beams to finish at the same iteration.
- gather_generation_logits can now be used together with beam search.
- Logprob generation is now possible with beam search enabled. Top-k logprobs is not supported
- Updated test_beam_search.py to also cover TorchSampler
- General changes for formatting and readability
Signed-off-by: Stefan Niebler <[email protected]>1 parent 3f37164 commit 26fac04
File tree
4 files changed
+552
-232
lines changed- tensorrt_llm/_torch/pyexecutor
- tests/unittest/_torch/sampler
4 files changed
+552
-232
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
811 | 811 | | |
812 | 812 | | |
813 | 813 | | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
818 | 823 | | |
819 | 824 | | |
820 | 825 | | |
| |||
829 | 834 | | |
830 | 835 | | |
831 | 836 | | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | | - | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
839 | 849 | | |
840 | 850 | | |
841 | 851 | | |
| |||
0 commit comments