mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-19 12:57:58 +00:00
prompt logprobs
This commit is contained in:
parent
439b9b129b
commit
f1c20591b6
3 changed files with 0 additions and 4 deletions
|
|
@ -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
|
||||
}
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue