Algorithm · Microsoft · Medium
Requirements Implement a packer that accepts a collection of variable-length (prompt_tokens, answer_tokens) pairs, a fixed packed-sequence length, and the token ID used as the separator or EOS marker. It must expose this interface: The function should return a stream of PackedSample(input_ids, loss_mask, position_ids) records satisfying these conditions: Every input_ids array has exactly seq_len entries. Several examples may share one packed sequence, with an EOS/separator…
Checking your access…