[Bugfix] Update Florence-2 tokenizer to make grounding tasks work (#16734)

Signed-off-by: Isotr0py <2037008807@qq.com>
This commit is contained in:
Isotr0py
2025-04-17 12:17:39 +08:00
committed by GitHub
parent 95aca283b4
commit cb072ce93b
5 changed files with 16 additions and 10 deletions

View File

@ -925,6 +925,7 @@ class VllmRunner:
max_tokens: int,
num_logprobs: int,
num_prompt_logprobs: Optional[int] = None,
skip_special_tokens: bool = True,
) -> Union[list[TokensTextLogprobs],
list[TokensTextLogprobsPromptLogprobs]]:
greedy_logprobs_params = SamplingParams(
@ -932,6 +933,7 @@ class VllmRunner:
max_tokens=max_tokens,
logprobs=num_logprobs,
prompt_logprobs=(num_prompt_logprobs),
skip_special_tokens=skip_special_tokens,
)
'''
Greedy logprobs generation for vLLM encoder/decoder models