跳转至

TopKPromptLogprobs

class mint.types.TopkPromptLogprobs ()

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 ( np.ndarray ) – int32 matrix of token IDs, shape (prompt_length, k) .
  • logprobs ( np.ndarray ) – float32 matrix of log probabilities, shape (prompt_length, k) .

Referenced by

  • mint.types.SampleResponse