@googlebot Thanks. From what I could tell, torch.split accepts chunk sizes rather than indices. For example to split x at indices 5, 10, and 15 I think you would do torch.split(x,[5,5,5]). So I just ended up doing
chunk_sizes = [len(x) for x in np.array_split(predicted_ids,indices)]
desired_output = torch.split(predicted_ids,chunk_sizes)
If there is a simpler way I would definitely be interested in hearing!