Score Allowed Candidate Tokens
Easy · Solved in PyTorch · Machine learning coding practice
Problem
A classifier may choose from a small set of allowed answers, each represented by a token ID. It scores each answer by comparing the model's hidden state with that token's vocabulary weight. These raw scores are called logits.
Compute logits for the supplied candidates, keeping their order and duplicates.
Topics: decision-models, linear-algebra, classification
The full statement, worked examples, hints and the test suite are available once you sign in. You can then solve Score Allowed Candidate Tokens in the browser and run it against the tests.