#2088·tokenizers

两个不正确的类型注解影响输入到 tokenizers.Tokenizer.encode() 的输入。

作者: JEHoctor创建于 2026年6月7日更新于 2026年9月25日
标签Stale

How this problem affects users

Say a user wants to:

  1. Tokenize pre-tokenized text.
  2. Pass in the pre-tokenized text as a tuple of strings.
  3. Use only code that passes Mypy type checking. Then they can only do this because the typing issue above is masked by the second typing issue in tokenizers/__init__.pyi. See below.

内容来源: huggingface/tokenizers