Update Gemma tokenizer.json after Google's recent fix

未关闭 适合新手
#1,057 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
json

调研方向

阅读链接的 Google 讨论,了解 Gemma 4 E4B、E2B 和 12B 合并了哪些 tokenizer 修复,然后在 FLM 的 Hugging Face 仓库中找到对应的 tokenizer.json 文件。分别更新每个 tokenizer 文件,并与 Google 的修复版本进行比较。完成标准是三个仓库的 tokenizer 都包含这些修复。

由索引模型根据 Issue 内容生成。

描述

Google recently updated their Gemma 4 tokenizers to resolve an issue that could result in garbage output.

Here is a pull request from Google for the update in Gemma 4 E4B:
https://huggingface.co/google/gemma-4-E4B-it/discussions/50
Here for Gemma 4 E2B:
https://huggingface.co/google/gemma-4-E2B-it/discussions/51
And here is the fix PR for Gemma 4 12B:
https://huggingface.co/google/gemma-4-12B-it/discussions/55

Note that I provided links to PRs so that it's easier to read the background/explanation of this issue, but all of them are already merged. All tokenizers are different files so they need to be updated separately.
This is easy-ish to fix for the end user (we can just substitute the tokenizer.json file in ~/.config/flm/(model), but it would be nice to see all the fixed tokenizers in FLM Huggingface repos too!

Example reproduction of the issue for Gemma 4 E4B, from Google:
Prompt the model to 'Please repeat the following string exactly, with nothing else: "drawingCodehint"'
Without the tokenizer fix, the model responds with non-latin letters and random-ish output. With the fix, it correctly follows the instruction.

主要语言
C++
星标
2k
派生
176
平均合并
11 小时 34 分钟
30 天内合并 PR
192

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ROCm/FastFlowLM 的其他 Issue

查看 ROCm/FastFlowLM 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。