Skip to content

Conversation

cptspacemanspiff
Copy link

So, I have been doing batched inference of things that use HF tokenizer. Your library is great, but does not expose the attention masks, which are useful when some of the inputs/outputs are padding.

This adds an additional tokenize method to the HF Tokenizer that returns both the token_ids and the attention masks.

It depends on my previous pull request, which separates out the hf cpp header declarations and the implementations.

#57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant