score abstract method

Future<OptionScoringRun> score(
  1. String prompt,
  2. List<String> targets, {
  3. CancelToken? cancelToken,
})

The exact natural-log probability of each token of each of targets as the model's continuation of prompt — the text renderUserMessage returned, after the BOS the engine adds — each target scored on its own, tokenised as tokenize splits it.

Returns one list per target, in order. Fails with DeciderCancelledException once cancelToken is cancelled, between targets at the latest; with StateError once the model or the scorer is closed.

Implementation

Future<OptionScoringRun> score(
  String prompt,
  List<String> targets, {
  CancelToken? cancelToken,
});