[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"tool-huggingface--tokenizers":3,"similar-huggingface--tokenizers":211},{"id":4,"github_repo":5,"name":6,"description_en":7,"description_zh":8,"ai_summary_zh":9,"readme_en":10,"readme_zh":11,"quickstart_zh":12,"use_case_zh":13,"hero_image_url":14,"owner_login":15,"owner_name":16,"owner_avatar_url":17,"owner_bio":18,"owner_company":19,"owner_location":19,"owner_email":19,"owner_twitter":15,"owner_website":20,"owner_url":21,"languages":22,"stars":54,"forks":55,"last_commit_at":56,"license":57,"difficulty_score":58,"env_os":59,"env_gpu":60,"env_ram":60,"env_deps":61,"category_tags":65,"github_topics":68,"view_count":76,"oss_zip_url":19,"oss_zip_packed_at":19,"status":77,"created_at":78,"updated_at":79,"faqs":80,"releases":110},4696,"huggingface\u002Ftokenizers","tokenizers","💥 Fast State-of-the-Art Tokenizers optimized for Research and Production","tokenizers 是一款由 Hugging Face 打造的高性能分词工具库，专为自然语言处理（NLP）任务设计。它的核心作用是将原始文本高效地转换为模型可理解的数字序列（Token），支持当今主流的 BPE、WordPiece 和 Unigram 等分词算法。\n\n在大型语言模型训练中，分词速度往往是瓶颈之一。tokenizers 通过 Rust 语言重写底层逻辑，解决了传统 Python 实现速度慢的问题，实现了极致的运行效率。实测显示，它在普通服务器 CPU 上仅需不到 20 秒即可完成 1GB 文本的分词处理，大幅缩短了数据预处理时间。此外，它还内置了完整的文本规范化、截断、填充及特殊令牌添加功能，并独特地提供了“对齐追踪”能力，让用户能轻松回溯每个分词在原文中的具体位置，极大方便了调试与分析。\n\n这款工具非常适合 AI 研究人员、算法工程师以及需要部署生产级 NLP 应用的开发者使用。无论是从零训练专属词表，还是在推理阶段快速处理文本，tokenizers 都能提供灵活且稳定的支持。目前它已提供 Python、Rust、Node.js 等多种语言绑定，易于集成到各类现有工作","tokenizers 是一款由 Hugging Face 打造的高性能分词工具库，专为自然语言处理（NLP）任务设计。它的核心作用是将原始文本高效地转换为模型可理解的数字序列（Token），支持当今主流的 BPE、WordPiece 和 Unigram 等分词算法。\n\n在大型语言模型训练中，分词速度往往是瓶颈之一。tokenizers 通过 Rust 语言重写底层逻辑，解决了传统 Python 实现速度慢的问题，实现了极致的运行效率。实测显示，它在普通服务器 CPU 上仅需不到 20 秒即可完成 1GB 文本的分词处理，大幅缩短了数据预处理时间。此外，它还内置了完整的文本规范化、截断、填充及特殊令牌添加功能，并独特地提供了“对齐追踪”能力，让用户能轻松回溯每个分词在原文中的具体位置，极大方便了调试与分析。\n\n这款工具非常适合 AI 研究人员、算法工程师以及需要部署生产级 NLP 应用的开发者使用。无论是从零训练专属词表，还是在推理阶段快速处理文本，tokenizers 都能提供灵活且稳定的支持。目前它已提供 Python、Rust、Node.js 等多种语言绑定，易于集成到各类现有工作流中，是连接原始数据与深度学习模型之间的高效桥梁。","\u003Cp align=\"center\">\n    \u003Cbr>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhuggingface_tokenizers_readme_c17b052ccbc6.png\" width=\"600\"\u002F>\n    \u003Cbr>\n\u003Cp>\n\u003Cp align=\"center\">\n    \u003Cimg alt=\"Build\" src=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fworkflows\u002FRust\u002Fbadge.svg\">\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fblob\u002Fmain\u002FLICENSE\">\n        \u003Cimg alt=\"GitHub\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fhuggingface\u002Ftokenizers.svg?color=blue&cachedrop\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpepy.tech\u002Fproject\u002Ftokenizers\">\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhuggingface_tokenizers_readme_9cb3d0e1e132.png\" \u002F>\n    \u003C\u002Fa>\n\u003C\u002Fp>\n\nProvides an implementation of today's most used tokenizers, with a focus on performance and\nversatility.\n\n## Main features:\n\n - Train new vocabularies and tokenize, using today's most used tokenizers.\n - Extremely fast (both training and tokenization), thanks to the Rust implementation. Takes\n   less than 20 seconds to tokenize a GB of text on a server's CPU.\n - Easy to use, but also extremely versatile.\n - Designed for research and production.\n - Normalization comes with alignments tracking. It's always possible to get the part of the\n   original sentence that corresponds to a given token.\n - Does all the pre-processing: Truncate, Pad, add the special tokens your model needs.\n\n## Performances\nPerformances can vary depending on hardware, but running the [~\u002Fbindings\u002Fpython\u002Fbenches\u002Ftest_tiktoken.py](bindings\u002Fpython\u002Fbenches\u002Ftest_tiktoken.py) should give the following on a g6 aws instance:\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhuggingface_tokenizers_readme_030b42c52e5a.png)\n\n\n## Bindings\n\nWe provide bindings to the following languages (more to come!):\n  - [Rust](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Ftree\u002Fmain\u002Ftokenizers) (Original implementation)\n  - [Python](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Ftree\u002Fmain\u002Fbindings\u002Fpython)\n  - [Node.js](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Ftree\u002Fmain\u002Fbindings\u002Fnode)\n  - [Ruby](https:\u002F\u002Fgithub.com\u002Fankane\u002Ftokenizers-ruby) (Contributed by @ankane, external repo)\n\n## Installation\n\nYou can install from source using:\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers.git#subdirectory=bindings\u002Fpython\n```\n\nor install the released versions with\n\n```bash\npip install tokenizers\n```\n \n## Quick example using Python:\n\nChoose your model between Byte-Pair Encoding, WordPiece or Unigram and instantiate a tokenizer:\n\n```python\nfrom tokenizers import Tokenizer\nfrom tokenizers.models import BPE\n\ntokenizer = Tokenizer(BPE())\n```\n\nYou can customize how pre-tokenization (e.g., splitting into words) is done:\n\n```python\nfrom tokenizers.pre_tokenizers import Whitespace\n\ntokenizer.pre_tokenizer = Whitespace()\n```\n\nThen training your tokenizer on a set of files just takes two lines of codes:\n\n```python\nfrom tokenizers.trainers import BpeTrainer\n\ntrainer = BpeTrainer(special_tokens=[\"[UNK]\", \"[CLS]\", \"[SEP]\", \"[PAD]\", \"[MASK]\"])\ntokenizer.train(files=[\"wiki.train.raw\", \"wiki.valid.raw\", \"wiki.test.raw\"], trainer=trainer)\n```\n\nOnce your tokenizer is trained, encode any text with just one line:\n```python\noutput = tokenizer.encode(\"Hello, y'all! How are you 😁 ?\")\nprint(output.tokens)\n# [\"Hello\", \",\", \"y\", \"'\", \"all\", \"!\", \"How\", \"are\", \"you\", \"[UNK]\", \"?\"]\n```\n\nCheck the [documentation](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftokenizers\u002Findex)\nor the [quicktour](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftokenizers\u002Fquicktour) to learn more!\n","\u003Cp align=\"center\">\n    \u003Cbr>\n    \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhuggingface_tokenizers_readme_c17b052ccbc6.png\" width=\"600\"\u002F>\n    \u003Cbr>\n\u003Cp>\n\u003Cp align=\"center\">\n    \u003Cimg alt=\"Build\" src=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fworkflows\u002FRust\u002Fbadge.svg\">\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fblob\u002Fmain\u002FLICENSE\">\n        \u003Cimg alt=\"GitHub\" src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Flicense\u002Fhuggingface\u002Ftokenizers.svg?color=blue&cachedrop\">\n    \u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fpepy.tech\u002Fproject\u002Ftokenizers\">\n        \u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhuggingface_tokenizers_readme_9cb3d0e1e132.png\" \u002F>\n    \u003C\u002Fa>\n\u003C\u002Fp>\n\n提供当今最常用分词器的实现，重点在于性能与多功能性。\n\n## 主要特性：\n\n - 可使用当今最常用的分词器训练新词汇表并进行分词。\n - 极其快速（无论是训练还是分词），这得益于 Rust 实现。在服务器 CPU 上对 1GB 文本进行分词仅需不到 20 秒。\n - 易于使用，同时功能极为强大。\n - 专为研究与生产环境设计。\n - 规范化过程中会跟踪对齐信息。始终可以获取与给定标记相对应的原始句子部分。\n - 完成所有预处理步骤：截断、填充，并添加模型所需的特殊标记。\n\n## 性能\n性能可能因硬件而异，但在 g6 AWS 实例上运行 [~\u002Fbindings\u002Fpython\u002Fbenches\u002Ftest_tiktoken.py](bindings\u002Fpython\u002Fbenches\u002Ftest_tiktoken.py) 应该得到如下结果：\n![image](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhuggingface_tokenizers_readme_030b42c52e5a.png)\n\n\n## 绑定\n我们提供了以下语言的绑定（更多语言即将推出！）：\n  - [Rust](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Ftree\u002Fmain\u002Ftokenizers)（原始实现）\n  - [Python](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Ftree\u002Fmain\u002Fbindings\u002Fpython)\n  - [Node.js](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Ftree\u002Fmain\u002Fbindings\u002Fnode)\n  - [Ruby](https:\u002F\u002Fgithub.com\u002Fankane\u002Ftokenizers-ruby)（由 @ankane 贡献，外部仓库）\n\n## 安装\n您可以从源代码安装：\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers.git#subdirectory=bindings\u002Fpython\n```\n\n或者安装已发布的版本：\n```bash\npip install tokenizers\n```\n\n## Python 快速示例：\n\n在字节对编码、WordPiece 或 Unigram 中选择您的模型，并实例化一个分词器：\n\n```python\nfrom tokenizers import Tokenizer\nfrom tokenizers.models import BPE\n\ntokenizer = Tokenizer(BPE())\n```\n\n您还可以自定义预分词方式（例如按空格分割）：\n\n```python\nfrom tokenizers.pre_tokenizers import Whitespace\n\ntokenizer.pre_tokenizer = Whitespace()\n```\n\n然后，只需两行代码即可在一组文件上训练分词器：\n\n```python\nfrom tokenizers.trainers import BpeTrainer\n\ntrainer = BpeTrainer(special_tokens=[\"[UNK]\", \"[CLS]\", \"[SEP]\", \"[PAD]\", \"[MASK]\"])\ntokenizer.train(files=[\"wiki.train.raw\", \"wiki.valid.raw\", \"wiki.test.raw\"], trainer=trainer)\n```\n\n分词器训练完成后，只需一行代码即可对任何文本进行编码：\n```python\noutput = tokenizer.encode(\"Hello, y'all! How are you 😁 ?\")\nprint(output.tokens)\n# [\"Hello\", \",\", \"y\", \"'\", \"all\", \"!\", \"How\", \"are\", \"you\", \"[UNK]\", \"?\"]\n```\n\n欲了解更多信息，请查阅 [文档](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftokenizers\u002Findex)\n或 [快速入门](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftokenizers\u002Fquicktour)！","# tokenizers 快速上手指南\n\n`tokenizers` 是 Hugging Face 提供的高性能分词器库，专注于速度与灵活性。它采用 Rust 编写，支持 BPE、WordPiece 和 Unigram 等主流算法，广泛应用于自然语言处理的研究与生产环境。\n\n## 环境准备\n\n- **操作系统**：Linux、macOS 或 Windows\n- **Python 版本**：建议 Python 3.7 及以上\n- **前置依赖**：\n  - `pip` 包管理工具\n  - 编译环境（若从源码安装，需安装 Rust 工具链及构建工具，如 `build-essential` 或 Xcode Command Line Tools）\n\n> **提示**：国内用户若遇到网络延迟，可配置 pip 使用清华或阿里云镜像源加速下载：\n> ```bash\n> pip install -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple tokenizers\n> ```\n\n## 安装步骤\n\n### 方式一：安装发布版本（推荐）\n直接使用 pip 安装稳定版：\n```bash\npip install tokenizers\n```\n\n### 方式二：从源码安装\n如需最新特性，可从 GitHub 源码安装：\n```bash\npip install git+https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers.git#subdirectory=bindings\u002Fpython\n```\n\n## 基本使用\n\n以下示例展示如何使用 Python 快速构建并训练一个 BPE 分词器。\n\n### 1. 初始化分词器\n选择模型（如 BPE）并实例化：\n```python\nfrom tokenizers import Tokenizer\nfrom tokenizers.models import BPE\n\ntokenizer = Tokenizer(BPE())\n```\n\n### 2. 配置预分词规则\n设置如何将文本初步分割（例如按空格分割）：\n```python\nfrom tokenizers.pre_tokenizers import Whitespace\n\ntokenizer.pre_tokenizer = Whitespace()\n```\n\n### 3. 训练词汇表\n准备训练文件列表，并定义特殊令牌，仅需两行代码即可启动训练：\n```python\nfrom tokenizers.trainers import BpeTrainer\n\ntrainer = BpeTrainer(special_tokens=[\"[UNK]\", \"[CLS]\", \"[SEP]\", \"[PAD]\", \"[MASK]\"])\ntokenizer.train(files=[\"wiki.train.raw\", \"wiki.valid.raw\", \"wiki.test.raw\"], trainer=trainer)\n```\n\n### 4. 编码文本\n训练完成后，即可对任意文本进行编码：\n```python\noutput = tokenizer.encode(\"Hello, y'all! How are you 😁 ?\")\nprint(output.tokens)\n# 输出示例：[\"Hello\", \",\", \"y\", \"'\", \"all\", \"!\", \"How\", \"are\", \"you\", \"[UNK]\", \"?\"]\n```\n\n更多高级用法请参考 [官方文档](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Ftokenizers\u002Findex)。","某大型电商公司的算法团队正在构建实时评论情感分析系统，需要每天处理数亿条包含多语言、表情符号及网络用语的用户评论数据。\n\n### 没有 tokenizers 时\n- **处理速度严重瓶颈**：使用纯 Python 编写的传统分词器处理 GB 级文本数据耗时数小时，无法满足模型每日快速迭代的需求。\n- **字符映射丢失**：在进行大小写转换或去除重音等标准化操作后，无法精准追踪分词结果对应原始评论中的具体位置，导致高亮显示功能失效。\n- **流程繁琐易错**：截断过长文本、填充固定长度以及添加 `[CLS]` 等特殊标记需要手动编写大量样板代码，维护成本高且容易引入 Bug。\n- **多语言支持薄弱**：难以统一高效地处理混合了中文、英文及各类 Emoji 的复杂输入，常出现未登录词（UNK）过多的情况。\n\n### 使用 tokenizers 后\n- **极速数据处理**：依托 Rust 底层实现，单核 CPU 即可在 20 秒内完成 1GB 文本的分词，数据预处理时间从小时级缩短至分钟级。\n- **完美对齐追踪**：内置的对齐机制自动记录标准化前后的字符映射关系，轻松实现将模型预测结果精准定位回原始评论的具体字词。\n- **一站式预处理**：通过简洁配置自动完成截断、填充及特殊令牌注入，大幅简化代码逻辑，让工程师专注于模型优化而非数据清洗。\n- **强大的泛化能力**：原生支持 BPE、WordPiece 等主流算法，能智能拆解生僻词与表情符号，显著降低未登录词比例，提升模型理解力。\n\ntokenizers 凭借工业级的速度与灵活的对齐追踪能力，将原本繁琐耗时的文本预处理环节转变为高效可靠的自动化流程，极大加速了 NLP 模型的落地应用。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fhuggingface_tokenizers_059c0abd.png","huggingface","Hugging Face","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fhuggingface_90da21a4.png","The AI community building the future.",null,"https:\u002F\u002Fhuggingface.co\u002F","https:\u002F\u002Fgithub.com\u002Fhuggingface",[23,27,31,35,39,43,47,50],{"name":24,"color":25,"percentage":26},"Rust","#dea584",72,{"name":28,"color":29,"percentage":30},"Python","#3572A5",20.6,{"name":32,"color":33,"percentage":34},"Jupyter Notebook","#DA5B0B",4.2,{"name":36,"color":37,"percentage":38},"TypeScript","#3178c6",2.1,{"name":40,"color":41,"percentage":42},"JavaScript","#f1e05a",0.4,{"name":44,"color":45,"percentage":46},"Makefile","#427819",0.3,{"name":48,"color":49,"percentage":46},"CSS","#663399",{"name":51,"color":52,"percentage":53},"HTML","#e34c26",0,10600,1069,"2026-04-06T15:22:13","Apache-2.0",1,"Linux, macOS, Windows","未说明",{"notes":62,"python":60,"dependencies":63},"该工具核心由 Rust 编写，专注于高性能和多功能性，支持多种语言绑定（Python, Node.js, Ruby 等）。虽然 README 未明确列出具体系统资源需求，但强调其在 CPU 上具有极快的训练和分词速度（例如在服务器 CPU 上 tokenize 1GB 文本仅需不到 20 秒），因此通常不需要 GPU。安装时可通过 pip 直接安装发布版或从源码安装 Python 绑定。",[64],"Rust (核心实现)",[66,67],"语言模型","Agent",[69,70,71,72,73,74,75],"nlp","natural-language-processing","natural-language-understanding","language-model","transformers","bert","gpt",2,"ready","2026-03-27T02:49:30.150509","2026-04-07T08:18:10.216114",[81,86,91,96,101,106],{"id":82,"question_zh":83,"answer_zh":84,"source_url":85},21350,"安装 transformers 时遇到 \"ERROR: Could not build wheels for tokenizers\" 错误怎么办？","这通常是因为缺少预编译的二进制包（特别是对于 Python 3.11+ 或 Windows 用户）。解决方案包括：\n1. 确保 pip 是最新版本。\n2. 尝试直接安装特定版本的 tokenizers，或者先安装依赖项：\n   pip install tf\n   pip install flax\n   然后再安装 transformers。\n3. 如果是在 Windows 上且使用较新的 Python 版本（如 3.12），可能需要等待官方发布对应的 wheel 包，或者尝试安装 Rust 编译器进行源码构建（虽然 README 未明确提及，但有时是必要的）。\n4. 检查是否可以使用 `pip install 'transformers[tf-cpu]'` 或 `pip install 'transformers[flax]'` 来绕过此问题。","https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fissues\u002F1050",{"id":87,"question_zh":88,"answer_zh":89,"source_url":90},21351,"在使用 fast tokenizer 时遇到 \"RuntimeError: Already borrowed\" 错误如何解决？","这是一个由于 Python 与 Rust 边界线程不安全导致的问题。当在多线程环境中调用 tokenizer 时可能会发生。\n解决方案是在调用 encode 等方法时使用 Python 的线程锁（Lock）来保护临界区：\n\nfrom threading import Lock\nlock = Lock()\n\nlock.acquire()\ntry:\n    model.encode(\"your text\")\nfinally:\n    lock.release()\n\n这样可以确保同一时间只有一个线程访问 tokenizer，避免借用冲突。","https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fissues\u002F537",{"id":92,"question_zh":93,"answer_zh":94,"source_url":95},21352,"处理大字符串时出现内存泄漏（Memory leak）怎么办？","在处理大量或超长字符串时，tokenizer 可能会出现内存持续增长的问题。\n推荐的解决方案包括：\n1. 设置环境变量 `TOKENIZERS_PARALLELISM=false` 来禁用并行处理，这通常能缓解内存增长。\n2. 使用更稳健的内存分配器，例如 `jemalloc`。\n3. 定期重新加载 tokenizer 实例（虽然这不是根本解决办法，但可作为临时规避手段）。\n4. 尝试调用 `tokenizer._clear_cache()`（如果在某些版本中可用）。\n注意：该问题在某些版本（如 0.21.1）中可能仍然存在，建议关注官方更新。","https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fissues\u002F1539",{"id":97,"question_zh":98,"answer_zh":99,"source_url":100},21353,"保存并重新加载 tokenizer 时抛出异常（Exception upon attempting to load a Tokenizer from file）？","当你使用 `tokenizer.save()` 保存模型后，再尝试用 `Tokenizer.from_file()` 加载时出错，可能是由于序列化格式不兼容或文件损坏。\n请确保：\n1. 使用的是相同版本的 tokenizers 库进行保存和加载。\n2. 保存路径正确且文件完整写入。\n3. 如果是自定义训练的 BPE tokenizer，确认训练完成后才进行保存操作。\n示例代码：\ntokenizer = Tokenizer(BPE())\ntrainer = BpeTrainer(vocab_size=280)\ntokenizer.train(trainer, [\"corpus.txt\"])\ntokenizer.save(\"tokenizer.json\")\n# 确保上面步骤成功完成后再加载\ntokenizer = Tokenizer.from_file(\"tokenizer.json\")\n如果问题依旧，请检查报错堆栈信息，确认是否为特定版本 bug。","https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fissues\u002F566",{"id":102,"question_zh":103,"answer_zh":104,"source_url":105},21354,"有没有更快的 BPE 训练算法实现？","社区中有开发者提出了比原版更快的纯 Python 和 Rust 实现的 BPE 训练算法。根据基准测试，在单线程下新实现可比原版快约 50%。\n目前维护者正在考虑集成更高效的 BPE Trainer，并已在相关 PR（#1712）中推进。\n如果你希望尝试优化版本，可以参考开源项目 efficient_bpe（https:\u002F\u002Fgithub.com\u002FYikai-Liao\u002Fefficient_bpe），但需注意其输出可能与原始 SentencePiece BPE 不完全一致。\n对于生产环境，建议继续使用官方稳定版本，直到新功能被正式合并。","https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fissues\u002F1400",{"id":107,"question_zh":108,"answer_zh":109,"source_url":85},21355,"Windows 上安装 tokenizers 时找不到匹配的版本（No matching distribution found）？","在 Windows 上使用较新版本的 Python（如 3.12）时，可能会因为缺乏对应平台的预编译 wheel 包而导致安装失败。\n解决方法：\n1. 检查当前支持的 tokenizers 版本列表：pip index versions tokenizers\n2. 若所需版本无 wheel 包，可尝试降级 Python 至 3.10 或 3.11（这些版本支持更好）。\n3. 或者安装 Visual C++ Build Tools 和 Rust 工具链，从源码构建（不推荐新手）。\n4. 等待官方发布新版 wheel 包（通常会在几周内跟进最新 Python 版本）。",[111,116,121,126,131,136,141,146,151,156,161,166,171,176,181,186,191,196,201,206],{"id":112,"version":113,"summary_zh":114,"released_at":115},127339,"v0.22.2","## 变更内容\n\n主要发布了以下几项 Pull Request：\n* @ArthurZucker 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1891 中更新了新增 token 的反序列化逻辑。\n* @ArthurZucker 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1896 中更新了类型注解的存根文件。\n* @davidhewitt 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1901 中将 PyO3 升级至 0.26。\n\n\u003Cimg width=\"2400\" height=\"1200\" alt=\"image\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F0b974453-1fc6-4393-84ea-da99269e2b34\" \u002F>\n\n\n总的来说，类型注解更加完善（至少包含了 `ty`），并且在加载包含大量新增 token 的词汇表时速度大幅提升（提升了 4 到 8 倍），同时实现了无 GIL 锁！？\n\n\n* ci：@MugundanMCW 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1869 中增加了对 Win-ARM64 轮子构建的支持。\n* @haixuanTao 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1875 中将 cargo-semver-checks 添加到 Rust CI 工作流中。\n* @gordonmessmer 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1867 中更新了 indicatif 依赖。\n* 在 \u002Ftokenizers\u002Fexamples\u002Funstable_wasm\u002Fwww 目录下，@dependabot[bot] 将 node-forge 从 1.3.1 升级至 1.3.2，详见 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1889。\n* 在 \u002Fbindings\u002Fnode 目录下，@dependabot[bot] 将 js-yaml 从 3.14.1 升级至 3.14.2，详见 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1892。\n\n* 修复：@ishitab02 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1884 中在 BaseTokenizer.normalize 方法中使用了 normalize_str 函数。\n* [次要：拼写错误] @cakiki 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1883 中更新了 mod.rs 文件。\n* @Copilot 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1898 中移除了 Python 绑定中的运行时 stderr 警告信息。\n* @ngoldbaum 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1861 中将不可变的 PyClass 标记为 frozen。\n* 文档：@CloseChoice 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1878 中将 `add_prefix_space` 添加到了 `processors.ByteLevel` 中。\n\n* 在 \u002Ftokenizers\u002Fexamples\u002Funstable_wasm\u002Fwww 目录下，@dependabot[bot] 将 express 从 4.21.2 升级至 4.22.1，详见 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1903。\n\n## 新贡献者\n* @MugundanMCW 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1869 中完成了首次贡献。\n* @haixuanTao 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1875 中完成了首次贡献。\n* @gordonmessmer 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1867 中完成了首次贡献。\n* @ishitab02 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1884 中完成了首次贡献。\n* @Copilot 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1898 中完成了首次贡献。\n* @ngoldbaum 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1861 中完成了首次贡献。\n* @CloseChoice 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1878 中完成了首次贡献。\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fcompare\u002Fv0.22.1...v0.22.2","2025-12-02T13:01:19",{"id":117,"version":118,"summary_zh":119,"released_at":120},127340,"v0.22.1","# 发布 v0.22.1\n\n主要变更：\n- 提升 huggingface_hub 的版本上限 (#1866)，由 @Wauplin 提交\n- 构建优化（trainer）：添加并改进 trainer 的签名 (#1838)，由 @shenxiangzhuang 提交\n- 部分文档更新：c91d76ae558ca2dc1aa725959e65dc21bf1fed7e、7b0217894c1e2baed7354ab41503841b47af7cf9、57eb8d7d9564621221784f7949b9efdeb7a49ac1\n\n","2025-09-19T09:52:24",{"id":122,"version":123,"summary_zh":124,"released_at":125},127341,"v0.22.0","## 变更内容\n* 在 \u002Ftokenizers\u002Fexamples\u002Funstable_wasm\u002Fwww 中升级 on-headers 和压缩功能，由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1827 中完成\n* 为 WebAssembly 兼容性在 WordPiece 分词器中实现 `from_bytes` 和 `read_bytes` 方法，由 @sondalex 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1758 中完成\n* 修复：使用 AHashMap 解决编译错误，由 @b00f 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1840 中完成\n* 新增 stream 功能，由 @ArthurZucker 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1856 中完成\n* 【文档】添加更多解码器，由 @pcuenca 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1849 中完成\n* 修复 `EncodingVisualizer.calculate_label_colors` 中缺失的括号，由 @Liam-DeVoe 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1853 中完成\n* 更新 quicktour.mdx，涉及 Issue #1625，由 @WilliamPLaCroix 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1846 中完成\n* 移除多余的注释，由 @sanderland 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1831 中完成\n* 修复 README 中的拼写错误，由 @aisk 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1808 中完成\n* RUSTSEC-2024-0436 - 将 paste 替换为 pastey，由 @nystromjd 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1834 中完成\n* 分词器：通过 py03-async-runtimes 添加原生异步绑定，由 @michaelfeil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1843 中完成\n\n## 新贡献者\n* @b00f 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1840 中完成了首次贡献\n* @pcuenca 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1849 中完成了首次贡献\n* @Liam-DeVoe 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1853 中完成了首次贡献\n* @WilliamPLaCroix 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1846 中完成了首次贡献\n* @sanderland 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1831 中完成了首次贡献\n* @aisk 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1808 中完成了首次贡献\n* @nystromjd 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1834 中完成了首次贡献\n* @michaelfeil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1843 中完成了首次贡献\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fcompare\u002Fv0.21.3...v0.22.0rc0","2025-08-29T10:25:50",{"id":127,"version":128,"summary_zh":129,"released_at":130},127342,"v0.21.4","**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fcompare\u002Fv0.21.3...v0.21.4\n\n\n无变化，0.21.3 版本发布失败，此次仅为重新发布。\n\nhttps:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Freleases\u002Ftag\u002Fv0.21.3","2025-07-28T13:18:55",{"id":132,"version":133,"summary_zh":134,"released_at":135},127343,"v0.21.3","## 变更内容\n* 修复了 Clippy 警告。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1818 中完成。\n* 修复了我们在 Rust API 中引入的向后不兼容变更。\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fcompare\u002Fv0.21.2...v0.21.3","2025-07-04T11:58:09",{"id":137,"version":138,"summary_zh":139,"released_at":140},127344,"v0.21.2","## 变更内容\n\n本次发布主要集中在性能优化、支持更广泛的 Python 无 GIL 环境，以及修复一些 Oniguruma 相关的问题！\n\n\n* 根据 0.21.1 版本更新发布构建，由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1746 中完成\n* 将 `lazy_static` 替换为稳定的 `std::sync::LazyLock`，版本 1.80，由 @sftse 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1739 中完成\n* 修复无 Oniguruma 的 WebAssembly 构建问题，由 @414owen 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1772 中完成\n* 修复字符串和注释中的拼写错误，由 @co63oc 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1770 中完成\n* 修复 BPE Python 绑定中合并操作的类型标注，由 @Coqueue 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1766 中完成\n* 将 `\u002Ftokenizers\u002Fexamples\u002Funstable_wasm\u002Fwww` 中的 `http-proxy-middleware` 从 2.0.6 升级到 2.0.9，由 @dependabot 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1762 中完成\n* 修复 `test_continuing_prefix_trainer_mismatch` 测试中的数据路径问题，由 @GaetanLepage 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1747 中完成\n* 运行 Clippy 检查，由 @ArthurZucker 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1781 中完成\n* 更新 PyO3 和 Rust-Numpy 的依赖，以实现无 GIL\u002F自由线程兼容性，由 @Qubitium 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1774 中完成\n* 在 `from_pretrained` 函数中使用 `ApiBuilder::from_env()`，由 @BenLocal 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1737 中完成\n* 升级 Oniguruma，使其能够与 GCC 15 兼容编译，由 @414owen 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1771 中完成\n* 升级 `itertools`，由 @sftse 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1756 中完成\n* 将 `\u002Ftokenizers\u002Fexamples\u002Funstable_wasm\u002Fwww` 中的 `webpack-dev-server` 从 4.10.0 升级到 5.2.1，由 @dependabot 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1792 中完成\n* 将 `\u002Fbindings\u002Fnode` 中的 `brace-expansion` 从 1.1.11 升级到 1.1.12，由 @dependabot 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1796 中完成\n* 修复特征混合成一段文字的问题，由 @bionicles 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1798 中完成\n* 在基准测试中添加吞吐量指标，以获得更一致的测量结果，由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1800 中完成\n* 升级依赖项，由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1801 中完成\n* 【文档】处理空白字符，由 @stevhliu 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1785 中完成\n* 修复存根代码，由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1802 中完成\n* BPE 克隆功能，由 @sftse 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1707 中完成\n* 固定长度预分词器，由 @jonvet 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1713 中完成\n* 整合优化 `ahash`、`dary` 和 `compact str`，由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1799 中完成\n* 🚨 重大变更：修复使用特殊标记进行训练的问题，由 @ArthurZucker 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1617 中完成\n\n## 新贡献者\n* @414owen 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1772 中完成了他们的首次贡献\n* @co63oc 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fp","2025-06-24T10:26:00",{"id":142,"version":143,"summary_zh":144,"released_at":145},127345,"v0.21.1","## 变更内容\n* 由 @ArthurZucker 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1693 中更新了开发版本和 pyproject.toml 文件。\n* 由 @sftse 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1709 中向 README.md 添加了特性标志提示，修复了 #1633。\n* 由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1708 中升级到 PyO3 0.23。\n* 由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1714 中修复了 README。\n* 由 @Dylan-Harden3 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1701 中修复了 Split 文档字符串中的拼写错误。\n* 由 @tinyboxvk 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1715 中修复了拼写错误。\n* 由 @sondalex 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1711 中更新了 Rust 特性的文档。\n* 由 @n0gu-furiosa 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1699 中修复了由于索引使用不当导致 DecodeStream::step 出现的 panic。\n* 由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1716 中通过完全移除 read_index 来修复流问题。\n* 由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1717 中修复了当 normalized 为空时 NormalizedString 的 append 方法。\n* 🚨 由 @ArthurZucker 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1652 中支持更新模板处理器。为暂时保持向后兼容性，该功能已在本次发布中移除。\n* 由 @earlytobed 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1724 中更新了元数据，因为已不再支持 Python 3.7 和 Python 3.8。\n* 由 @torymur 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1732 中添加了 rustls-tls 特性。\n\n## 新贡献者\n* @Dylan-Harden3 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1701 中做出了首次贡献。\n* @sondalex 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1711 中做出了首次贡献。\n* @n0gu-furiosa 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1699 中做出了首次贡献。\n* @earlytobed 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1724 中做出了首次贡献。\n* @torymur 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1732 中做出了首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fcompare\u002Fv0.21.0...v0.21.1","2025-03-13T10:44:52",{"id":147,"version":148,"summary_zh":149,"released_at":150},127346,"v0.21.1rc0","## 变更内容\n* 由 @ArthurZucker 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1693 中更新了开发版本和 pyproject.toml 文件。\n* 由 @sftse 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1709 中向 README.md 添加了特性标志提示，修复了 #1633。\n* 由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1708 中升级到 PyO3 0.23。\n* 由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1714 中修复了 README。\n* 由 @Dylan-Harden3 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1701 中修复了 Split 文档字符串中的拼写错误。\n* 由 @tinyboxvk 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1715 中修复了拼写错误。\n* 由 @sondalex 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1711 中更新了 Rust 特性的文档。\n* 由 @n0gu-furiosa 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1699 中修复了由于索引使用不当导致 DecodeStream::step 函数出现的 panic。\n* 由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1716 中通过完全移除 read_index 来修复流问题。\n* 由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1717 中修复了当 normalized 为空时 NormalizedString 的 append 方法。\n* 🚨 由 @ArthurZucker 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1652 中支持更新模板处理器。\n* 由 @earlytobed 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1724 中更新了元数据，因为已不再支持 Python 3.7 和 Python 3.8。\n* 由 @torymur 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1732 中添加了 rustls-tls 特性。\n\n## 新贡献者\n* @Dylan-Harden3 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1701 中做出了首次贡献。\n* @sondalex 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1711 中做出了首次贡献。\n* @n0gu-furiosa 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1699 中做出了首次贡献。\n* @earlytobed 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1724 中做出了首次贡献。\n* @torymur 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1732 中做出了首次贡献。\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fcompare\u002Fv0.21.0...v0.21.1rc0","2025-03-12T09:47:07",{"id":152,"version":153,"summary_zh":154,"released_at":155},127347,"v0.21.0","## 发布 ~v0.20.4~ v0.21.0\n* 更多缓存选项。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1675 中实现。\n* 禁用长字符串的缓存。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1676 中实现。\n* 测试 ABI3 轮子以减少轮子数量。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1674 中实现。\n* 添加解码流式处理的 API。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1677 中实现。\n* Python 解码流。由 @Narsil 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1678 中实现。\n* 修复 encode_batch 和 encode_batch_fast，使其再次接受 ndarray。由 @diliop 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1679 中实现。\n\n我们也不再支持 Python 3.7 和 3.8（与 transformers 类似），因为它们已弃用。\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fcompare\u002Fv0.20.3...v0.21.0","2024-11-15T11:12:00",{"id":157,"version":158,"summary_zh":159,"released_at":160},127348,"v0.20.3","## 变更内容\n在 `0.20.3` 版本中，`encode_batch` 的元组输入发生了破坏性变更！\n* 由 @ArthurZucker 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1673 中修复了 pylist 相关问题。\n* 【次要：拼写错误】由 @cakiki 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1653 中修复了文档字符串。\n\n## 新贡献者\n* @cakiki 在 https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1653 中完成了他们的首次贡献。\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fcompare\u002Fv0.20.2...v0.20.3","2024-11-05T17:20:01",{"id":162,"version":163,"summary_zh":164,"released_at":165},127349,"v0.20.2","# Release v0.20.2\r\n\r\nThanks a MILE to @diliop we now have support for python 3.13! 🥳 \r\n\r\n## What's Changed\r\n* Bump cookie and express in \u002Ftokenizers\u002Fexamples\u002Funstable_wasm\u002Fwww by @dependabot in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1648\r\n* Fix off-by-one error in tokenizer::normalizer::Range::len by @rlanday in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1638\r\n* Arg name correction: auth_token -> token by @rravenel in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1621\r\n* Unsound call of `set_var` by @sftse in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1664\r\n* Add safety comments by @Manishearth in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1651\r\n* Bump actions\u002Fcheckout to v4 by @tinyboxvk in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1667\r\n* PyO3 0.22 by @diliop in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1665\r\n* Bump actions versions by @tinyboxvk in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1669\r\n\r\n## New Contributors\r\n* @rlanday made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1638\r\n* @rravenel made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1621\r\n* @sftse made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1664\r\n* @Manishearth made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1651\r\n* @tinyboxvk made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1667\r\n* @diliop made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1665\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fcompare\u002Fv0.20.1...v0.20.2","2024-11-04T17:25:24",{"id":167,"version":168,"summary_zh":169,"released_at":170},127350,"v0.20.1","## What's Changed\r\nThe most awaited `offset` issue with `Llama` is fixed 🥳 \r\n\r\n* Update README.md by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1608\r\n* fix benchmark file link by @152334H in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1610\r\n* Bump actions\u002Fdownload-artifact from 3 to 4.1.7 in \u002F.github\u002Fworkflows by @dependabot in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1626\r\n* [`ignore_merges`] Fix offsets by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1640\r\n* Bump body-parser and express in \u002Ftokenizers\u002Fexamples\u002Funstable_wasm\u002Fwww by @dependabot in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1629\r\n* Bump serve-static and express in \u002Ftokenizers\u002Fexamples\u002Funstable_wasm\u002Fwww by @dependabot in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1630\r\n* Bump send and express in \u002Ftokenizers\u002Fexamples\u002Funstable_wasm\u002Fwww by @dependabot in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1631\r\n* Bump webpack from 5.76.0 to 5.95.0 in \u002Ftokenizers\u002Fexamples\u002Funstable_wasm\u002Fwww by @dependabot in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1641\r\n* Fix documentation build by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1642\r\n* style: simplify string formatting for readability by @hamirmahal in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1632\r\n\r\n## New Contributors\r\n* @152334H made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1610\r\n* @hamirmahal made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1632\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fcompare\u002Fv0.20.0...v0.20.1","2024-10-10T09:56:39",{"id":172,"version":173,"summary_zh":174,"released_at":175},127351,"v0.20.0","# Release v0.20.0\r\n\r\nThis release is focused on **performances** and **user experience**. \r\n\r\n## Performances:\r\nFirst off, we did a bit of benchmarking, and found some place for improvement for us!\r\nWith a few minor changes (mostly #1587) here is what we get on `Llama3` running on a g6 instances on AWS `https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fblob\u002Fmain\u002Fbindings\u002Fpython\u002Fbenches\u002Ftest_tiktoken.py` : \r\n![image](https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fe6838866-ec76-44ce-a7b6-532e56971234)\r\n\r\n## Python API\r\nWe shipped better deserialization errors in general, and support for `__str__` and `__repr__` for all the object. This allows for a lot easier debugging see this:\r\n```python3\r\n>>> from tokenizers import Tokenizer;\r\n>>> tokenizer = Tokenizer.from_pretrained(\"bert-base-uncased\");\r\n>>> print(tokenizer)\r\nTokenizer(version=\"1.0\", truncation=None, padding=None, added_tokens=[{\"id\":0, \"content\":\"[PAD]\", \"single_word\":False, \"lstrip\":False, \"rstrip\":False, ...}, {\"id\":100, \"content\":\"[UNK]\", \"single_word\":False, \"lstrip\":False, \"rstrip\":False, ...}, {\"id\":101, \"content\":\"[CLS]\", \"single_word\":False, \"lstrip\":False, \"rstrip\":False, ...}, {\"id\":102, \"content\":\"[SEP]\", \"single_word\":False, \"lstrip\":False, \"rstrip\":False, ...}, {\"id\":103, \"content\":\"[MASK]\", \"single_word\":False, \"lstrip\":False, \"rstrip\":False, ...}], normalizer=BertNormalizer(clean_text=True, handle_chinese_chars=True, strip_accents=None, lowercase=True), pre_tokenizer=BertPreTokenizer(), post_processor=TemplateProcessing(single=[SpecialToken(id=\"[CLS]\", type_id=0), Sequence(id=A, type_id=0), SpecialToken(id=\"[SEP]\", type_id=0)], pair=[SpecialToken(id=\"[CLS]\", type_id=0), Sequence(id=A, type_id=0), SpecialToken(id=\"[SEP]\", type_id=0), Sequence(id=B, type_id=1), SpecialToken(id=\"[SEP]\", type_id=1)], special_tokens={\"[CLS]\":SpecialToken(id=\"[CLS]\", ids=[101], tokens=[\"[CLS]\"]), \"[SEP]\":SpecialToken(id=\"[SEP]\", ids=[102], tokens=[\"[SEP]\"])}), decoder=WordPiece(prefix=\"##\", cleanup=True), model=WordPiece(unk_token=\"[UNK]\", continuing_subword_prefix=\"##\", max_input_chars_per_word=100, vocab={\"[PAD]\":0, \"[unused0]\":1, \"[unused1]\":2, \"[unused2]\":3, \"[unused3]\":4, ...}))\r\n\r\n>>> tokenizer\r\nTokenizer(version=\"1.0\", truncation=None, padding=None, added_tokens=[{\"id\":0, \"content\":\"[PAD]\", \"single_word\":False, \"lstrip\":False, \"rstrip\":False, \"normalized\":False, \"special\":True}, {\"id\":100, \"content\":\"[UNK]\", \"single_word\":False, \"lstrip\":False, \"rstrip\":False, \"normalized\":False, \"special\":True}, {\"id\":101, \"content\":\"[CLS]\", \"single_word\":False, \"lstrip\":False, \"rstrip\":False, \"normalized\":False, \"special\":True}, {\"id\":102, \"content\":\"[SEP]\", \"single_word\":False, \"lstrip\":False, \"rstrip\":False, \"normalized\":False, \"special\":True}, {\"id\":103, \"content\":\"[MASK]\", \"single_word\":False, \"lstrip\":False, \"rstrip\":False, \"normalized\":False, \"special\":True}], normalizer=BertNormalizer(clean_text=True, handle_chinese_chars=True, strip_accents=None, lowercase=True), pre_tokenizer=BertPreTokenizer(), post_processor=TemplateProcessing(single=[SpecialToken(id=\"[CLS]\", type_id=0), Sequence(id=A, type_id=0), SpecialToken(id=\"[SEP]\", type_id=0)], pair=[SpecialToken(id=\"[CLS]\", type_id=0), Sequence(id=A, type_id=0), SpecialToken(id=\"[SEP]\", type_id=0), Sequence(id=B, type_id=1), SpecialToken(id=\"[SEP]\", type_id=1)], special_tokens={\"[CLS]\":SpecialToken(id=\"[CLS]\", ids=[101], tokens=[\"[CLS]\"]), \"[SEP]\":SpecialToken(id=\"[SEP]\", ids=[102], tokens=[\"[SEP]\"])}), decoder=WordPiece(prefix=\"##\", cleanup=True), model=WordPiece(unk_token=\"[UNK]\", continuing_subword_prefix=\"##\", max_input_chars_per_word=100, vocab={\"[PAD]\":0, \"[unused0]\":1, \"[unused1]\":2, ...}))\r\n```\r\n\r\nThe `pre_tokenizer.Sequence` and `normalizer.Sequence` are also more accessible now:\r\n```python \r\nfrom tokenizers import normalizers\r\nnorm = normalizers.Sequence([normalizers.Strip(), normalizers.BertNormalizer()])\r\nnorm[0]\r\nnorm[1].lowercase=False\r\n```\r\n\r\n## What's Changed\r\n* remove enforcement of non special when adding tokens by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1521\r\n* [BREAKING CHANGE] Ignore added_tokens (both special and not) in the decoder by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1513\r\n* Make `USED_PARALLELISM` atomic by @nathaniel-daniel in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1532\r\n* Fixing for clippy 1.78 by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1548\r\n* feat(ci): add trufflehog secrets detection by @McPatate in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1551\r\n* Switch from `cached_download` to `hf_hub_download` in tests by @Wauplin in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1547\r\n* Fix \"dictionnary\" typo by @nprisbrey in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1511\r\n* make sure we don't warn on empty tokens by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1554\r\n* Enable `dropout = 0.0` as an equivalent to `none` in BPE by @mcognetta in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1550\r\n* Revert \"[BRE","2024-08-08T16:56:21",{"id":177,"version":178,"summary_zh":179,"released_at":180},127352,"v0.19.1","## What's Changed\r\n* add serialization for `ignore_merges` by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1504\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fcompare\u002Fv0.19.0...v0.19.1","2024-04-17T21:37:50",{"id":182,"version":183,"summary_zh":184,"released_at":185},127353,"v0.19.0","## What's Changed\r\n* chore: Remove CLI - this was originally intended for local development by @bryantbiggs in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1442\r\n* [`remove black`] And use ruff by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1436\r\n* Bump ip from 2.0.0 to 2.0.1 in \u002Fbindings\u002Fnode by @dependabot in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1456\r\n* Added ability to inspect a 'Sequence' decoder and the `AddedVocabulary`. by @eaplatanios in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1443\r\n* 🚨🚨 BREAKING CHANGE 🚨🚨: (add_prefix_space dropped everything is using prepend_scheme enum instead) Refactor metaspace by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1476\r\n* Add more support for tiktoken based tokenizers by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1493\r\n* PyO3 0.21. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1494\r\n* Remove 3.13 (potential undefined behavior.) by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1497\r\n* Bumping all versions 3 times (ty transformers :) ) by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1498\r\n* Fixing doc. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1499\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fcompare\u002Fv0.15.2...v0.19.0","2024-04-17T08:51:36",{"id":187,"version":188,"summary_zh":189,"released_at":190},127354,"v0.19.0rc0","Bumping 3 versions because of this: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers\u002Fblob\u002F60dea593edd0b94ee15dc3917900b26e3acfbbee\u002Fsetup.py#L177\r\n\r\n## What's Changed\r\n* chore: Remove CLI - this was originally intended for local development by @bryantbiggs in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1442\r\n* [`remove black`] And use ruff by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1436\r\n* Bump ip from 2.0.0 to 2.0.1 in \u002Fbindings\u002Fnode by @dependabot in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1456\r\n* Added ability to inspect a 'Sequence' decoder and the `AddedVocabulary`. by @eaplatanios in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1443\r\n* 🚨🚨 BREAKING CHANGE 🚨🚨:  (add_prefix_space dropped everything is using prepend_scheme enum instead) Refactor metaspace by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1476\r\n* Add more support for tiktoken based tokenizers by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1493\r\n* PyO3 0.21. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1494\r\n* Remove 3.13 (potential undefined behavior.) by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1497\r\n* Bumping all versions 3 times (ty transformers :) ) by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1498\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fcompare\u002Fv0.15.2...v0.19.0rc0","2024-04-16T14:06:36",{"id":192,"version":193,"summary_zh":194,"released_at":195},127355,"v0.15.2","## What's Changed\r\nBig shoutout to @rlrs for [the fast replace normalizers](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1413) PR. This boosts the performances of the tokenizers: \r\n![image](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fassets\u002F48595927\u002Fd8ee81b1-6d92-43d4-b74c-8775727763e3)\r\n\r\n* chore: Update dependencies to latest supported versions by @bryantbiggs in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1441\r\n* Convert word counts to u64 by @stephenroller in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1433\r\n* Efficient Replace normalizer by @rlrs in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1413\r\n\r\n## New Contributors\r\n* @bryantbiggs made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1441\r\n* @stephenroller made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1433\r\n* @rlrs made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1413\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fcompare\u002Fv0.15.1...v0.15.2rc1","2024-02-12T02:35:06",{"id":197,"version":198,"summary_zh":199,"released_at":200},127356,"v0.15.1","## What's Changed\r\n* udpate to version = \"0.15.1-dev0\" by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1390\r\n* Derive `Clone` on `Tokenizer`, add `Encoding.into_tokens()` method by @epwalsh in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1381\r\n* Stale bot. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1404\r\n* Fix doc links in readme by @Pierrci in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1367\r\n* Faster HF dataset iteration in docs by @mariosasko in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1414\r\n* Add quick doc to byte_level.rs by @steventrouble in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1420\r\n* Fix make bench. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1428\r\n* Bump follow-redirects from 1.15.1 to 1.15.4 in \u002Ftokenizers\u002Fexamples\u002Funstable_wasm\u002Fwww by @dependabot in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1430\r\n* pyo3: update to 0.20 by @mikelui in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1386\r\n* Encode special tokens by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1437\r\n* Update release for python3.12 windows by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1438\r\n\r\n## New Contributors\r\n* @steventrouble made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1420\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fcompare\u002Fv0.15.0...v0.15.1","2024-01-22T16:49:29",{"id":202,"version":203,"summary_zh":204,"released_at":205},127357,"v0.15.1.rc0","## What's Changed\r\n* pyo3: update to 0.19 by @mikelui in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1322\r\n* Add `expect()` for disabling truncation by @boyleconnor in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1316\r\n* Re-using scritpts from safetensors. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1328\r\n* Reduce number of different revisions by 1 by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1329\r\n* Python 38 arm by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1330\r\n* Move to maturing mimicking move for `safetensors`. + Rewritten node bindings. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1331\r\n* Updating the docs with the new command. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1333\r\n* Update added tokens by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1335\r\n* update package version for dev by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1339\r\n* Added ability to inspect a 'Sequence' pre-tokenizer. by @eaplatanios in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1341\r\n* Let's allow hf_hub \u003C 1.0 by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1344\r\n* Fixing the progressbar. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1353\r\n* Preparing release. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1355\r\n* fix a clerical error  in the comment by @tiandiweizun in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1356\r\n* fix: remove useless token by @rtrompier in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1371\r\n* Bump @babel\u002Ftraverse from 7.22.11 to 7.23.2 in \u002Fbindings\u002Fnode by @dependabot in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1370\r\n* Allow hf_hub 0.18 by @mariosasko in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1383\r\n* Allow `huggingface_hub\u003C1.0` by @Wauplin in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1385\r\n* [`pre_tokenizers`] Fix sentencepiece based Metaspace by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1357\r\n* udpate to version = \"0.15.1-dev0\" by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1390\r\n* Derive `Clone` on `Tokenizer`, add `Encoding.into_tokens()` method by @epwalsh in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1381\r\n* Stale bot. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1404\r\n* Fix doc links in readme by @Pierrci in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1367\r\n* Faster HF dataset iteration in docs by @mariosasko in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1414\r\n* Add quick doc to byte_level.rs by @steventrouble in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1420\r\n* Fix make bench. by @Narsil in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1428\r\n* Bump follow-redirects from 1.15.1 to 1.15.4 in \u002Ftokenizers\u002Fexamples\u002Funstable_wasm\u002Fwww by @dependabot in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1430\r\n* pyo3: update to 0.20 by @mikelui in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1386\r\n\r\n## New Contributors\r\n* @mikelui made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1322\r\n* @eaplatanios made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1341\r\n* @tiandiweizun made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1356\r\n* @rtrompier made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1371\r\n* @mariosasko made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1383\r\n* @Wauplin made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1385\r\n* @steventrouble made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1420\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fcompare\u002Fv0.13.4.rc2...v0.15.1.rc0","2024-01-18T16:34:03",{"id":207,"version":208,"summary_zh":209,"released_at":210},127358,"v0.15.0","## What's Changed\r\n* fix a clerical error  in the comment by @tiandiweizun in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1356\r\n* fix: remove useless token by @rtrompier in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1371\r\n* Bump @babel\u002Ftraverse from 7.22.11 to 7.23.2 in \u002Fbindings\u002Fnode by @dependabot in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1370\r\n* Allow hf_hub 0.18 by @mariosasko in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1383\r\n* Allow `huggingface_hub\u003C1.0` by @Wauplin in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1385\r\n* [`pre_tokenizers`] Fix sentencepiece based Metaspace by @ArthurZucker in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1357\r\n\r\n## New Contributors\r\n* @tiandiweizun made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1356\r\n* @rtrompier made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1371\r\n* @mariosasko made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1383\r\n* @Wauplin made their first contribution in https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fpull\u002F1385\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftokenizers\u002Fcompare\u002Fv0.14.1...v0.15.0","2023-11-14T19:06:30",[212,224,232,240,248,256],{"id":213,"name":214,"github_repo":215,"description_zh":216,"stars":217,"difficulty_score":218,"last_commit_at":219,"category_tags":220,"status":77},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[67,221,222,223],"开发框架","图像","数据工具",{"id":225,"name":226,"github_repo":227,"description_zh":228,"stars":229,"difficulty_score":218,"last_commit_at":230,"category_tags":231,"status":77},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[221,222,67],{"id":233,"name":234,"github_repo":235,"description_zh":236,"stars":237,"difficulty_score":76,"last_commit_at":238,"category_tags":239,"status":77},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",142651,"2026-04-06T23:34:12",[221,67,66],{"id":241,"name":242,"github_repo":243,"description_zh":244,"stars":245,"difficulty_score":76,"last_commit_at":246,"category_tags":247,"status":77},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107888,"2026-04-06T11:32:50",[221,222,67],{"id":249,"name":250,"github_repo":251,"description_zh":252,"stars":253,"difficulty_score":218,"last_commit_at":254,"category_tags":255,"status":77},4487,"LLMs-from-scratch","rasbt\u002FLLMs-from-scratch","LLMs-from-scratch 是一个基于 PyTorch 的开源教育项目，旨在引导用户从零开始一步步构建一个类似 ChatGPT 的大型语言模型（LLM）。它不仅是同名技术著作的官方代码库，更提供了一套完整的实践方案，涵盖模型开发、预训练及微调的全过程。\n\n该项目主要解决了大模型领域“黑盒化”的学习痛点。许多开发者虽能调用现成模型，却难以深入理解其内部架构与训练机制。通过亲手编写每一行核心代码，用户能够透彻掌握 Transformer 架构、注意力机制等关键原理，从而真正理解大模型是如何“思考”的。此外，项目还包含了加载大型预训练权重进行微调的代码，帮助用户将理论知识延伸至实际应用。\n\nLLMs-from-scratch 特别适合希望深入底层原理的 AI 开发者、研究人员以及计算机专业的学生。对于不满足于仅使用 API，而是渴望探究模型构建细节的技术人员而言，这是极佳的学习资源。其独特的技术亮点在于“循序渐进”的教学设计：将复杂的系统工程拆解为清晰的步骤，配合详细的图表与示例，让构建一个虽小但功能完备的大模型变得触手可及。无论你是想夯实理论基础，还是为未来研发更大规模的模型做准备",90106,"2026-04-06T11:19:32",[66,222,67,221],{"id":257,"name":258,"github_repo":259,"description_zh":260,"stars":261,"difficulty_score":218,"last_commit_at":262,"category_tags":263,"status":77},4292,"Deep-Live-Cam","hacksider\u002FDeep-Live-Cam","Deep-Live-Cam 是一款专注于实时换脸与视频生成的开源工具，用户仅需一张静态照片，即可通过“一键操作”实现摄像头画面的即时变脸或制作深度伪造视频。它有效解决了传统换脸技术流程繁琐、对硬件配置要求极高以及难以实时预览的痛点，让高质量的数字内容创作变得触手可及。\n\n这款工具不仅适合开发者和技术研究人员探索算法边界，更因其极简的操作逻辑（仅需三步：选脸、选摄像头、启动），广泛适用于普通用户、内容创作者、设计师及直播主播。无论是为了动画角色定制、服装展示模特替换，还是制作趣味短视频和直播互动，Deep-Live-Cam 都能提供流畅的支持。\n\n其核心技术亮点在于强大的实时处理能力，支持口型遮罩（Mouth Mask）以保留使用者原始的嘴部动作，确保表情自然精准；同时具备“人脸映射”功能，可同时对画面中的多个主体应用不同面孔。此外，项目内置了严格的内容安全过滤机制，自动拦截涉及裸露、暴力等不当素材，并倡导用户在获得授权及明确标注的前提下合规使用，体现了技术发展与伦理责任的平衡。",88924,"2026-04-06T03:28:53",[221,222,67,264],"视频"]