aici icon indicating copy to clipboard operation
aici copied to clipboard

provide feedback on the probability mass dropped by logit bias

Open mmoskal opened this issue 1 year ago • 0 comments

pre = softmax(logits)
logits += bias
post = softmax(logits)
dropped = sum(max(0, pre[i] - post[i]) for i in range(len(post)))

if dropped is close to 1 we're going against the model

mmoskal avatar Nov 16 '23 18:11 mmoskal