Hi @PhilipMay
This is not a bug, At L1351 the pooled output is passed through classification head (linear layer) to get the logits
CrossEntropyLoss does not require softmax , it calculates loss using logits
BertForSequenceClassification returns logits, then you can the apply softmax on the returned logits to get the class scores.