microsoft / microsoft/Tokenizer

where is the token_type_ids and attention_mas in tokenizer?

Open
#71 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
213
Forks
37
Avg merge
5d 1h
Merged PRs (30d)
5

Description

I am using android application 1.0

Microsoft.ML.Tokenizers and Microsoft.ML.OnnxRuntime

and I want to ask questions about my txt file.

I searched that I can use BertTokenizer and onnxruntime

tokenizer = BertTokenizer.Create(vocabPath, new BertOptions { RemoveNonSpacingMarks = true });

var encodings = tokenizer.EncodeToIds("This is a sample");

there is EncodeToIds and how to get token_type_ids ?

and when I get result _session.Run(inputs); what to do then?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the BertTokenizer.EncodeToIds example and the _session.Run(inputs) call shown in the issue. Determine how token_type_ids and attention masks are represented by Microsoft.ML.Tokenizers and how the ONNX Runtime result should be consumed; done means the Android usage is documented with a complete question-answering flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, csharp
Domain
machine-learning, mobile-dev
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.