Commit 16f5f5e
committed
[https://nvbugs/5513423][chore] Enhance min length penalty application in TorchSampler to work with speculative decoding
- Refactored `_apply_min_length_penalty` method to support step-wise application of minimum length penalties based on the number of steps per request.
- Updated the test for `min_tokens` to include a parameterized approach for speculative decoding configurations.
Signed-off-by: Stefan Niebler <[email protected]>1 parent 261bd55 commit 16f5f5e
File tree
2 files changed
+49
-16
lines changed- tensorrt_llm/_torch/pyexecutor
- tests/unittest/llmapi
2 files changed
+49
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
655 | 655 | | |
656 | 656 | | |
657 | 657 | | |
| 658 | + | |
658 | 659 | | |
659 | | - | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
660 | 663 | | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
669 | 685 | | |
670 | 686 | | |
671 | 687 | | |
| |||
696 | 712 | | |
697 | 713 | | |
698 | 714 | | |
699 | | - | |
700 | 715 | | |
| 716 | + | |
| 717 | + | |
701 | 718 | | |
702 | 719 | | |
703 | 720 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
861 | 861 | | |
862 | 862 | | |
863 | 863 | | |
864 | | - | |
| 864 | + | |
| 865 | + | |
865 | 866 | | |
866 | | - | |
867 | | - | |
868 | | - | |
869 | | - | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
870 | 886 | | |
871 | 887 | | |
872 | 888 | | |
| |||
0 commit comments