# Getting entity offset from ONNX outputs

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgetting-entity-offset-from-onnx-outputs%2F17307%3E%5C
**Category:** Intermediate\
**Created:** [April 28, 2022, 7:07pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgetting-entity-offset-from-onnx-outputs%2F17307 "2022-04-28T19:07:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shensmobile](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@shensmobile](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fshensmobile)%5C
**Post date:** [April 28, 2022, 7:07pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgetting-entity-offset-from-onnx-outputs%2F17307%2F1 "2022-04-28T19:07:39Z")

</div>

Hi all,

Working with a BERT model that I’ve exported successfully for NER. ONNX inference is successful, I’m just wondering if there’s a built-in function to convert the token index (from the model output) to the char offsets. I want to be able to identify the exact position of the entity in the original text.

Hopefully this isn’t too dumb of a question.

---

<div class="post-metadata">

**Author:** ![shensmobile](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@shensmobile](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fshensmobile)%5C
**Post date:** [April 28, 2022, 7:19pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgetting-entity-offset-from-onnx-outputs%2F17307%2F2 "2022-04-28T19:19:58Z")

</div>

Nevermind, I’m an idiot. You can find out how to do it here:

> **[Fast tokenizers' special powers - Hugging Face Course](https://huggingface.co/course/chapter6/3)**
>
> We’re on a journey to advance and democratize artificial intelligence through open source and open science.

There’s just too much documentation to sift through!
