tinker_cookbook.completers.TokensWithLogprobs
Generated from tinker-cookbook at commit 8486b8d. Source links point at that snapshot.
class tinker_cookbook.completers.TokensWithLogprobs()
A sequence of token IDs with optional log-probabilities and a stop reason.
Fields:
- tokens (list[int])
- maybe_logprobs (list[float] | None)
- stop_reason (tinker.StopReason, default:
'stop') - sequence_id (str | None, default:
None) – https://tinker-docs.thinkingmachines.ai/tinker/datum/#provenance - prompt_cache_hit_tokens (int, default:
0) – Prompt tokens billed as prefix-cache hits for this sample (SampleResponse.prompt_cache_hit_tokens).