How can I get the exact position von answers?
I want to load a local model for Question and Answers task. I have copied the almost Code from Pipeline like follow:

model = MyBert()
checkpoint = torch.load('./training_mode_aim/checkpoint.pth.tar')
model.load_state_dict(checkpoint['model'])
model.eval()
#read the context in local file
texts = utils.readTxt()
question = Question
tokenizer = BertTokenizerFast.from_pretrained('')

all_answers = []
for text in texts[:1]:
    encoding = tokenizer(question,text,truncation = True,
                            max_length = 512,padding = True,stride = 256,
                            return_tensors = 'np',
                            return_overflowing_tokens=True,
                            return_token_type_ids=True,
                            return_offsets_mapping=True,
                            return_special_tokens_mask=True,)
    num_span = len(encoding['input_ids'])
    answers = []
    for span_idx in range(num_span):
        _,start_logits,end_logits = model(torch.tensor([encoding['input_ids'][span_idx]]),
                                        torch.tensor([encoding['attention_mask'][span_idx]]),
                                        torch.tensor([encoding['token_type_ids'][span_idx]]))
        with torch.no_grad():
            start_logits,end_logits = start_logits.cpu().numpy(),end_logits.cpu().numpy()
        undesired_tokens = np.abs(np.array(encoding['token_type_ids'][span_idx]) - 1) & np.array(encoding['attention_mask'][span_idx])
        undesired_tokens_mask = undesired_tokens == 0.0
        start = np.where(undesired_tokens_mask,start_logits, -10000.0)
        end = np.where(undesired_tokens_mask, end_logits, -10000.0)
        start = np.exp(start - np.log(np.sum(np.exp(start), axis=-1, keepdims=True)))
        end = np.exp(end- np.log(np.sum(np.exp(end), axis=-1, keepdims=True)))
        starts,ends,scores = decode(start,end,5,128)
        print('starts: {}, end: {}'.format(starts,ends))
        answers += [{
                'score':score.item(),
                'start':encoding.token_to_word(s),
                'end':encoding.token_to_word(e)}
                        for s,e,score in zip(starts,ends,scores)]
    answers = sorted(answers, key=lambda x: x["score"], reverse=True)[: 5]
    print(answers)

Then I got the relative positions for each subencodings. But finally I want to take the absolute positions of the answers. So someone know how to solve this problem?
Hello, thanks for opening an issue! We try to keep the github issues for bugs/feature requests.
Could you ask your question on the [forum](https://discusss.huggingface.co) instead?

Thanks!<|||||>> Hello, thanks for opening an issue! We try to keep the github issues for bugs/feature requests.
> Could you ask your question on the [forum](https://discusss.huggingface.co) instead?
> 
> Thanks!

okay, my bad
