# tinker.types.TopkLogprobs ## *class* [**tinker.types.TopkLogprobs**](https://github.com/thinking-machines-lab/tinker/blob/main/src/tinker/types/topk_logprobs.py#L13)() Top-k most likely tokens at each position, as dense numpy matrices. Both matrices have shape `(length, k)` where `k` is the number of top tokens requested. Empty positions are filled with sentinel values (`token_id=0`, `logprob=-99999.0`). **Fields:** - [**token_ids**](https://github.com/thinking-machines-lab/tinker/blob/main/src/tinker/types/topk_logprobs.py#L21) (*np.ndarray*) – int32 matrix of token IDs, shape `(length, k)`. - [**logprobs**](https://github.com/thinking-machines-lab/tinker/blob/main/src/tinker/types/topk_logprobs.py#L24) (*np.ndarray*) – float32 matrix of log probabilities, shape `(length, k)`. ## Referenced by - [tinker.types.SampledSequence](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/sampledsequence/index.md) - [tinker.types.SampleResponse](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/sampleresponse/index.md)