tinker.types.TopkLogprobs
class tinker.types.TopkLogprobs()
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 (np.ndarray) – int32 matrix of token IDs, shape
(length, k). - logprobs (np.ndarray) – float32 matrix of log probabilities, shape
(length, k).