Skip to content

Add experimental Hugging Face .tok tokenizer path - #23139

Draft
JacobSzwejbka wants to merge 4 commits into
pytorch:mainfrom
JacobSzwejbka:hf-rust-tokenizer-tok-followup
Draft

JacobSzwejbka wants to merge 4 commits into
pytorch:mainfrom
JacobSzwejbka:hf-rust-tokenizer-tok-followup

Conversation

@JacobSzwejbka

Copy link
Copy Markdown
Contributor

Summary

This is the experimental .tok wiring follow-up to pytorch/executorch#22548 and meta-pytorch/tokenizers#218. Do not merge it before either dependency.

It adds the ExecuTorch format selector needed to build the Rust tokenizer as .tok-only or with both JSON and .tok support. The default remains JSON.

.tok is not part of Hugging Face tokenizers v1.0.0-rc.2. The tokenizer dependency draft pins an experimental Hugging Face branch commit and is explicitly blocked on that functionality landing in a protected upstream branch or release.

Because this PR is stacked, GitHub currently shows its JSON base changes too. After #22548 and the tokenizer dependency land, rebase this branch and update the tokenizer submodule pointer; the remaining diff will be only the experimental format selection.

AI-assisted by Codex.

Point at the rebased tokenizer dependency with corrected BOS/EOS semantics, safe decoder gating, and regression coverage. Apply the required CMake formatting.

AI-assisted-by: Codex
Generated with assistance from Codex.
@pytorch-bot

pytorch-bot Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/23139

Note: Links to docs will display an error until the docs builds have been completed.

❌ 48 New Failures, 6 Unclassified Failures

As of commit 25dddf4 with merge base 83c4dc1 (image):

NEW FAILURES - The following jobs have failed:

UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 24, 2026
@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant