Update Gemma tokenizer.json after Google's recent fix

オープン 初心者向け
#1,057 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
json

調査の方向性

リンクされたGemma 4 E4B、E2B、12Bに関するGoogleのディスカッションを読み、取り込まれたtokenizerの修正を特定します。次に、FLMのHugging Faceリポジトリで対応するtokenizer.jsonファイルを探します。各tokenizerファイルを個別に更新し、Googleの修正版と比較します。3つすべてのリポジトリの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分
マージ済み PR(30日)
192

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ROCm/FastFlowLM のほかの issue

ROCm/FastFlowLM の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。