Here ht[0] corresponds to the last output of the forward lstm, and ht[1] corresponds to the last output of the backward lstm.
You used a bidirectional lstm, so you might as well use the output of both directions! Your solution torch.concat([ht[0],ht[-1]],dim=1) seems correct.