GPT-3 ranks candidate answers by how likely the model finds each one as a continuation of the prompt. The score is the sum of the log-probabilities of the continuation tokens, given everything before them.
Implement continuation_logprob(log_probs, tokens, start), which sums the log-probability of each token from start onward.
Loop from start to the end, pick each token's log-probability from its row, and sum.
No results yet
Run your code to check it against the examples, or submit to run every test.