facebookresearch / facebookresearch/blt

Integration with HF: tokenizer

Open
#108 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.1k
Forks
196
PR merge metrics
No merged PRs in 30d

Description

Hey there!

I'm following up on the discussion about tokenization in a recent PR. @EntilZha

So I've made a byte tokenizer fully compatible with transformers.

It does the obvious byte encoding and it can leverage all the handy tools from its parents:

  • padding / truncation with various options
  • applying chat templates
  • etc

I've made a small demo in Google Colab to show the usual stuff.

You could implement the patching logic in a subclass too.

BTW I love BLT, it makes so much sense!

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 by reading the discussion in PR 98, the proposed changes in the Hugging Face transformers PR 36216, and the linked Colab demo. Define the integration surface and expected tokenizer behavior from those references; done should mean BLT's tokenizer is compatible with transformers and supports the listed padding, truncation, and chat-template features.

Written by the indexing model from the issue text.

Assessment

Tech stack
huggingface, python
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.