prompt logprobs

This commit is contained in:
Jai Suphavadeeprasit 2026-03-03 21:57:52 -05:00
parent 439b9b129b
commit f1c20591b6
3 changed files with 0 additions and 4 deletions

View file

@ -624,7 +624,6 @@ Fetch logprobs with a normalized schema that is backend-agnostic.
"prompt_tokens": List[int],
"prompt_topk_token_ids": List[List[int]], # [pos][k]
"prompt_topk_logprobs": List[List[float]], # [pos][k]
"finish_reasons": List[Any], # optional compatibility field
}
```

View file

@ -15,7 +15,6 @@ For automatic token and logprob tracking, see the [ManagedServer Guide](MANAGED_
- `prompt_tokens`
- `prompt_topk_token_ids`
- `prompt_topk_logprobs`
- `finish_reasons`
For backends that only expose sampled-token logprobs, prompt top-k arrays are synthesized with `k=1` for interface compatibility.

View file

@ -711,13 +711,11 @@ class DummyManagedServer:
This keeps interface parity with ManagedServer while making it explicit
that results are placeholders and not suitable for training.
"""
n = int(kwargs.get("n", 1))
prompt_tokens = self.DUMMY_TOKENS[:]
return {
"prompt_tokens": prompt_tokens,
"prompt_topk_token_ids": [[tok] for tok in prompt_tokens],
"prompt_topk_logprobs": [[self.DUMMY_LOGPROBS[0]] for _ in prompt_tokens],
"finish_reasons": ["stop"] * n, # Retained for compatibility in callers.
}