To do BPTT with truncation you would need to cut the input into subsequences and train on each subsequence, separately but in order. The subsequences need to be fed to the model in order so that the last hidden state from the end of each subsequence is used at the beginning of the next subsequence.
The data input is sentence_in and the corresponding targets are targets.
You would have to split sentence_in and target into corresponding chunks along the sequence dimension.
sentence_parts = torch.split(sentence_in, chunk_size, dim=0)
targets_parts = torch.split(targets, chunk_size, dim=0)

then instead of
model.zero_grad()
model.hidden = model.init_hidden()
tag_scores = model(sentence_in)
loss = loss_function(tag_scores, targets)
loss.backward()
optimizer.step()

you would do
model.hidden = model.init_hidden()
for (sentence_part, targets_part) in zip(sentence_parts, targets_parts):
    model.zero_grad()
    model.hidden[0].detach_()
    model.hidden[1].detach_()
    tag_scores_part = model(sentence_part)
    loss = loss_function(tag_scores_part, targets_part)
    loss.backward()
    optimizer.step()

The calls to .detach_() tell pytorch to stop backpropagating at that point.