Skip to content

Commit 2a082d4

Browse files
Add logprobs mode in api stability test.
Signed-off-by: Wangshanshan <[email protected]>
1 parent a84e873 commit 2a082d4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tensorrt_llm/sampling_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class SamplingParams:
181181
182182
logprobs (int, optional): Number of log probabilities to return per output token. Defaults to None.
183183
prompt_logprobs (int, optional): Number of log probabilities to return per prompt token. Defaults to None.
184-
logprobs_mode (str): Controls return logprobs after sampling modifications. Defaults to "processed_logprobs".
184+
logprobs_mode (Literal['processed_logprobs']): Controls return logprobs after sampling modifications. Defaults to "processed_logprobs".
185185
Options:
186186
- "processed_logprobs": Return log-softmax of processed logits
187187
return_context_logits (bool): Controls if Result should contain the context logits. Defaults to False.

tests/unittest/api_stability/references/sampling_params.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@ methods:
1515
prompt_ignore_length:
1616
annotation: Optional[int]
1717
default: null
18+
logprobs_mode:
19+
annotation: Literal['processed_logprobs']
20+
default: processed_logprobs
1821
return_annotation: None
1922
properties: {}

0 commit comments

Comments
 (0)