Interface StoppingCriteria
- All Known Implementing Classes:
MaxTimeCriteria,StoppingCriteriaList,StoppingWordCriteria
public interface StoppingCriteria
Customize a controller to implement stop rule control for model inference.
Note: Referenced the Transformers document implementation.
- Author:
- William
-
Method Summary
-
Method Details
-
criteria
Stopping criteria- Parameters:
inputTokenIds- Indices of input sequence tokens in the vocabulary.scores- Prediction scores of a language modeling head. These can be logits for each vocabulary.args- Specific args to a stopping criteria.- Returns:
- boolean `False` indicates we should continue, `True` indicates we should stop.
-