I want to create a Bert model which can predict the SentiwordNet Avg score (pos_score - neg_score) for every word in the sentence. The score to predict is between 0-1

dict_keys([‘review_text’, ‘input_ids’, ‘attention_mask’, ‘targets’, ‘SentiwordAvgScore’])
sentence_length = 30
batch_size = 32
review_text = torch.Size([32, 30])
input_ids =torch.Size([32, 30])
attention_mask = torch.Size([32])
SentiwordAvgScore =torch.Size([32, 30])

If the sentence has 30 words then the there will be 30 different values between 0-1 to be predicted. I have implemented the Bert model.
How can I build a neural model output layer and which loss function can i use?