# tinker.types.TopkPromptLogprobs

## _class_ [**tinker.types.TopkPromptLogprobs**](https://github.com/thinking-machines-lab/tinker/blob/main/src/tinker/types/topk_prompt_logprobs.py#L11)()

Top-k most likely tokens at each prompt position, as dense numpy matrices.

Both matrices have shape `(prompt_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_prompt_logprobs.py#L19) ( _np.ndarray_) – int32 matrix of token IDs, shape `(prompt_length, k)`.
- [**logprobs**](https://github.com/thinking-machines-lab/tinker/blob/main/src/tinker/types/topk_prompt_logprobs.py#L22) ( _np.ndarray_) – float32 matrix of log probabilities, shape `(prompt_length, k)`.

## Referenced by

- [tinker.types.SampleResponse](https://tinker-docs.thinkingmachines.ai/tinker/api-reference/types/sampleresponse/)
