Since I am using the same noise samples for all targets in the minibatch, torch.multinomial costs < 10% of the total (for 100 noise samples). About 2/3 of the time goes in the index_select() and noise probability calculations (pointwise multiplies). There must be more efficient sparse matrix alternatives but I haven’t found them in the docs.