I’m not NLP expert, so take this with a grain of salt. 
The use case sound generally like a multi-label classification, i.e. multiple classes can be active/inactive in the target.
One approach would be to use a linear layer as your model output returning [batch_size, nb_classes] and pass it, along a target containing zeros and ones of the same shape, to nn.BCEWithLogitsLoss.
Let me know, if this would work or if I’m thinking too naively about your use case.