GenerationStepResult

class ctranslate2.GenerationStepResult

The result for a single generation step.

Inherits from: pybind11_builtins.pybind11_object

Attributes:

property batch_id

The batch index.

property hypothesis_id

Index of the hypothesis in the batch.

property is_last

Whether this step is the last decoding step for this batch.

property log_prob

Log probability of the token (None if return_log_prob was disabled).

property step

The decoding step.

property token

String value of the generated token.

property token_id

ID of the generated token.