Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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.

Assessment

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

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.

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?

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

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.

More from microsoft/Tokenizer

All issues in microsoft/Tokenizer

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.