You are implementing a simplified decoding step for a language model. At each time step, the model produces scores for several candidate tokens, and greedy sampling selects the highest-scoring token at every time step independently, without considering any other time step.
Given scores, where scores[i][j] is the score for token j at time step i, return a sequence containing the index of the highest-scoring token at each time step. If two tokens tie for the highest score at the same time step, choose the smaller token index.
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected