fix: Remediate 1490 glitch tokens in tokenizer.json

#34
by gkielian - opened

Glitch Token Remediation — Tokenizer Patch

Summary

This PR patches tokenizer.json to remediate 1490 glitch tokens identified
by embedding vector analysis. Glitch tokens are vocabulary entries whose embeddings
have collapsed to near-identical representations, causing unpredictable model behavior
when they appear in input.

No model weights are modified — this is a tokenizer-only fix.

Technique: Hybrid (merge pruning + placeholder rename)

The patch uses two complementary strategies:

1. Merge pruning (755 tokens): Removes the BPE merge rules that
produce multi-character glitch tokens. The vocab entry stays (ID preserved) but
becomes unreachable — text that would have matched is now tokenized as trained
constituent subwords instead.

2. Placeholder rename (735 tokens): For single-character glitch tokens
(rare Unicode characters) that have no producing merge rule, the vocab string is renamed to
<glitch_pruned_ID>. The original character now falls through to byte_fallback,
encoding as well-trained UTF-8 byte tokens.

Safety: Placeholder strings cannot be triggered by user input. BPE builds tokens
bottom-up from characters via merge rules only — since no merge rule produces these strings,
they are permanently unreachable. Gemma's split-digits tokenization policy provides an
additional layer of safety.

935 merges were removed for 755 merge-pruned tokens because some glitch tokens have more than one BPE merge path, and every path must be removed.

Before / after examples: google/gemma-3-270m

Merge prune example: dfsonic, token ID 213759

Prompt: Please repeat the following string exactly, with nothing else: "dfsonic"

Tokens for the string Model output
Before ['dfsonic'] → [213759] xQ7_tz ❌
After ['df', 'sonic'] → [3405, 60532] dfsonic ✅

Placeholder rename example: 𡉺 (U+2127A), token ID 249788

Prompt: Please repeat the following string exactly, with nothing else: "𡉺"

Tokens for the string Model output
Before ['𡉺'] → [249788] xQ7_tz ❌
After ['<0xF0>', '<0xA1>', '<0x89>', '<0xBA>'] → [478, 399, 375, 424] 𡉺 ✅

⚠️ Note for Agentic Systems

Many remediated glitch tokens are shared across Gemma model families (Gemma 1, 2, 3, 4).
In agentic pipelines, care should be taken that these token strings are not inadvertently
injected into prompts for unpatched models. We recommend applying this patch consistently
across all Gemma models used in a pipeline.

What is preserved

  • ✅ len(tokenizer) — unchanged (262,144)
  • ✅ All token IDs — stable, no re-indexing
  • ✅ Chat template — identical to original
  • ✅ tokenizer_config.json — identical to original
  • ✅ All special tokens and added_tokens — unchanged
  • ✅ Normal text tokenization — verified via benchmarks
  • ✅ Zero model weight changes

Diff summary

Original Patched Delta
Vocab size 262,144 262,144 0
Merges 514,906 513,971 −935
Vocab renamed — 735 +735

Vocab renames (735 entries)

Click to expand the first 200 renamed vocab entries

Showing the first 200 of 735 renamed entries (renamed_vocab.tsv). Full list: https://huggingface.co/gkielian/gemma-glitch-staging/tree/main/google_gemma-3-270m

ID Original Patched
243766 ၣ (U+1063) <glitch_pruned_243766>
245643 𒋙 (U+122D9) <glitch_pruned_245643>
245655 (U+F533) <glitch_pruned_245655>
246972 𒂟 (U+1209F) <glitch_pruned_246972>
246974 𒉽 (U+1227D) <glitch_pruned_246974>
247241 𓁜 (U+1305C) <glitch_pruned_247241>
247349 𓁝 (U+1305D) <glitch_pruned_247349>
247361 𒄴 (U+12134) <glitch_pruned_247361>
247545 ⮃ (U+2B83) <glitch_pruned_247545>
247569 𒋰 (U+122F0) <glitch_pruned_247569>
247826 𒃰 (U+120F0) <glitch_pruned_247826>
247828 𒆸 (U+121B8) <glitch_pruned_247828>
247829 𒈦 (U+12226) <glitch_pruned_247829>
247831 𒌍 (U+1230D) <glitch_pruned_247831>
247832 𒍤 (U+12364) <glitch_pruned_247832>
247835 𒋺 (U+122FA) <glitch_pruned_247835>
248403 𒋞 (U+122DE) <glitch_pruned_248403>
248409 𒄊 (U+1210A) <glitch_pruned_248409>
248412 𒇧 (U+121E7) <glitch_pruned_248412>
248413 𒇬 (U+121EC) <glitch_pruned_248413>
248414 𒈣 (U+12223) <glitch_pruned_248414>
248415 𒈫 (U+1222B) <glitch_pruned_248415>
248417 𒉭 (U+1226D) <glitch_pruned_248417>
248418 𒊐 (U+12290) <glitch_pruned_248418>
248786 𒄘 (U+12118) <glitch_pruned_248786>
248787 𒐴 (U+12434) <glitch_pruned_248787>
249289 𒆚 (U+1219A) <glitch_pruned_249289>
249290 𒋒 (U+122D2) <glitch_pruned_249290>
249292 𒋚 (U+122DA) <glitch_pruned_249292>
249293 𒋜 (U+122DC) <glitch_pruned_249293>
249295 𒋝 (U+122DD) <glitch_pruned_249295>
249296 𒀖 (U+12016) <glitch_pruned_249296>
249297 𒀜 (U+1201C) <glitch_pruned_249297>
249299 𒀾 (U+1203E) <glitch_pruned_249299>
249300 𒁇 (U+12047) <glitch_pruned_249300>
249302 𒁴 (U+12074) <glitch_pruned_249302>
249303 𒁵 (U+12075) <glitch_pruned_249303>
249305 𒂈 (U+12088) <glitch_pruned_249305>
249308 𒂡 (U+120A1) <glitch_pruned_249308>
249309 𒂷 (U+120B7) <glitch_pruned_249309>
249310 𒃮 (U+120EE) <glitch_pruned_249310>
249312 𒃼 (U+120FC) <glitch_pruned_249312>
249313 𒄝 (U+1211D) <glitch_pruned_249313>
249314 𒄢 (U+12122) <glitch_pruned_249314>
249315 𒄥 (U+12125) <glitch_pruned_249315>
249317 𒅁 (U+12141) <glitch_pruned_249317>
249318 𒅊 (U+1214A) <glitch_pruned_249318>
249323 𒆲 (U+121B2) <glitch_pruned_249323>
249324 𒇺 (U+121FA) <glitch_pruned_249324>
249329 𒈮 (U+1222E) <glitch_pruned_249329>
249330 𒉀 (U+12240) <glitch_pruned_249330>
249331 𒉄 (U+12244) <glitch_pruned_249331>
249334 𒉚 (U+1225A) <glitch_pruned_249334>
249335 𒉣 (U+12263) <glitch_pruned_249335>
249338 𒋁 (U+122C1) <glitch_pruned_249338>
249342 𒐈 (U+12408) <glitch_pruned_249342>
249343 𒐉 (U+12409) <glitch_pruned_249343>
249344 𒐊 (U+1240A) <glitch_pruned_249344>
249345 𒐋 (U+1240B) <glitch_pruned_249345>
249349 𒀯 (U+1202F) <glitch_pruned_249349>
249350 𒁯 (U+1206F) <glitch_pruned_249350>
249351 𒃵 (U+120F5) <glitch_pruned_249351>
249352 𒄬 (U+1212C) <glitch_pruned_249352>
249354 𒈿 (U+1223F) <glitch_pruned_249354>
249357 𒌪 (U+1232A) <glitch_pruned_249357>
249626 (U+F4D8) <glitch_pruned_249626>
249628 (U+F54B) <glitch_pruned_249628>
249776 𒇉 (U+121C9) <glitch_pruned_249776>
249779 𒋖 (U+122D6) <glitch_pruned_249779>
249785 𒍞 (U+1235E) <glitch_pruned_249785>
249786 𒐺 (U+1243A) <glitch_pruned_249786>
249788 𡉺 (U+2127A) <glitch_pruned_249788>
250210 𒈲 (U+12232) <glitch_pruned_250210>
250237 ꗎ (U+A5CE) <glitch_pruned_250237>
250238 ꗏ (U+A5CF) <glitch_pruned_250238>
250239 ꗐ (U+A5D0) <glitch_pruned_250239>
250240 ꗑ (U+A5D1) <glitch_pruned_250240>
250241 ꗒ (U+A5D2) <glitch_pruned_250241>
250242 ꗓ (U+A5D3) <glitch_pruned_250242>
250243 ꗔ (U+A5D4) <glitch_pruned_250243>
250244 ꗕ (U+A5D5) <glitch_pruned_250244>
250245 ꗖ (U+A5D6) <glitch_pruned_250245>
250246 ꗗ (U+A5D7) <glitch_pruned_250246>
250247 ꗘ (U+A5D8) <glitch_pruned_250247>
250248 ꗙ (U+A5D9) <glitch_pruned_250248>
250249 ꗚ (U+A5DA) <glitch_pruned_250249>
250250 ꗛ (U+A5DB) <glitch_pruned_250250>
250251 ꗜ (U+A5DC) <glitch_pruned_250251>
250252 ꗝ (U+A5DD) <glitch_pruned_250252>
250253 ꗞ (U+A5DE) <glitch_pruned_250253>
250256 ꗡ (U+A5E1) <glitch_pruned_250256>
250257 ꗢ (U+A5E2) <glitch_pruned_250257>
250260 ꗦ (U+A5E6) <glitch_pruned_250260>
250262 ꗨ (U+A5E8) <glitch_pruned_250262>
250263 ꗩ (U+A5E9) <glitch_pruned_250263>
250264 ꗪ (U+A5EA) <glitch_pruned_250264>
250265 ꗫ (U+A5EB) <glitch_pruned_250265>
250268 ꗮ (U+A5EE) <glitch_pruned_250268>
250311 𒌇 (U+12307) <glitch_pruned_250311>
250315 𒉎 (U+1224E) <glitch_pruned_250315>
250372 𒀁 (U+12001) <glitch_pruned_250372>
250373 𒀂 (U+12002) <glitch_pruned_250373>
250374 𒀅 (U+12005) <glitch_pruned_250374>
250377 𒀐 (U+12010) <glitch_pruned_250377>
250378 𒀗 (U+12017) <glitch_pruned_250378>
250379 𒀙 (U+12019) <glitch_pruned_250379>
250380 𒀚 (U+1201A) <glitch_pruned_250380>
250381 𒀞 (U+1201E) <glitch_pruned_250381>
250382 𒀠 (U+12020) <glitch_pruned_250382>
250383 𒀩 (U+12029) <glitch_pruned_250383>
250384 𒀪 (U+1202A) <glitch_pruned_250384>
250385 𒀫 (U+1202B) <glitch_pruned_250385>
250386 𒀬 (U+1202C) <glitch_pruned_250386>
250387 𒀮 (U+1202E) <glitch_pruned_250387>
250388 𒀲 (U+12032) <glitch_pruned_250388>
250389 𒀳 (U+12033) <glitch_pruned_250389>
250390 𒀴 (U+12034) <glitch_pruned_250390>
250391 𒀵 (U+12035) <glitch_pruned_250391>
250393 𒁁 (U+12041) <glitch_pruned_250393>
250394 𒁄 (U+12044) <glitch_pruned_250394>
250395 𒁆 (U+12046) <glitch_pruned_250395>
250396 𒁈 (U+12048) <glitch_pruned_250396>
250398 𒁎 (U+1204E) <glitch_pruned_250398>
250399 𒁑 (U+12051) <glitch_pruned_250399>
250400 𒁓 (U+12053) <glitch_pruned_250400>
250401 𒁔 (U+12054) <glitch_pruned_250401>
250403 𒁙 (U+12059) <glitch_pruned_250403>
250404 𒁝 (U+1205D) <glitch_pruned_250404>
250405 𒁦 (U+12066) <glitch_pruned_250405>
250406 𒁨 (U+12068) <glitch_pruned_250406>
250407 𒁫 (U+1206B) <glitch_pruned_250407>
250408 𒁬 (U+1206C) <glitch_pruned_250408>
250409 𒁭 (U+1206D) <glitch_pruned_250409>
250410 𒁮 (U+1206E) <glitch_pruned_250410>
250411 𒁰 (U+12070) <glitch_pruned_250411>
250412 𒁱 (U+12071) <glitch_pruned_250412>
250414 𒁶 (U+12076) <glitch_pruned_250414>
250415 𒁷 (U+12077) <glitch_pruned_250415>
250417 𒁻 (U+1207B) <glitch_pruned_250417>
250418 𒁼 (U+1207C) <glitch_pruned_250418>
250419 𒁽 (U+1207D) <glitch_pruned_250419>
250420 𒂁 (U+12081) <glitch_pruned_250420>
250421 𒂂 (U+12082) <glitch_pruned_250421>
250422 𒂄 (U+12084) <glitch_pruned_250422>
250423 𒂅 (U+12085) <glitch_pruned_250423>
250424 𒂆 (U+12086) <glitch_pruned_250424>
250425 𒂇 (U+12087) <glitch_pruned_250425>
250426 𒂉 (U+12089) <glitch_pruned_250426>
250427 𒂔 (U+12094) <glitch_pruned_250427>
250428 𒂕 (U+12095) <glitch_pruned_250428>
250429 𒂖 (U+12096) <glitch_pruned_250429>
250431 𒂘 (U+12098) <glitch_pruned_250431>
250432 𒂞 (U+1209E) <glitch_pruned_250432>
250433 𒂦 (U+120A6) <glitch_pruned_250433>
250434 𒂬 (U+120AC) <glitch_pruned_250434>
250435 𒂼 (U+120BC) <glitch_pruned_250435>
250436 𒃕 (U+120D5) <glitch_pruned_250436>
250437 𒃞 (U+120DE) <glitch_pruned_250437>
250438 𒃠 (U+120E0) <glitch_pruned_250438>
250439 𒃡 (U+120E1) <glitch_pruned_250439>
250440 𒃢 (U+120E2) <glitch_pruned_250440>
250441 𒃣 (U+120E3) <glitch_pruned_250441>
250442 𒃤 (U+120E4) <glitch_pruned_250442>
250443 𒃥 (U+120E5) <glitch_pruned_250443>
250445 𒃴 (U+120F4) <glitch_pruned_250445>
250446 𒃷 (U+120F7) <glitch_pruned_250446>
250447 𒃸 (U+120F8) <glitch_pruned_250447>
250448 𒃽 (U+120FD) <glitch_pruned_250448>
250449 𒃾 (U+120FE) <glitch_pruned_250449>
250451 𒄃 (U+12103) <glitch_pruned_250451>
250452 𒄄 (U+12104) <glitch_pruned_250452>
250453 𒄇 (U+12107) <glitch_pruned_250453>
250454 𒄈 (U+12108) <glitch_pruned_250454>
250455 𒄉 (U+12109) <glitch_pruned_250455>
250456 𒄋 (U+1210B) <glitch_pruned_250456>
250458 𒄒 (U+12112) <glitch_pruned_250458>
250459 𒄕 (U+12115) <glitch_pruned_250459>
250460 𒄖 (U+12116) <glitch_pruned_250460>
250461 𒄗 (U+12117) <glitch_pruned_250461>
250462 𒄙 (U+12119) <glitch_pruned_250462>
250463 𒄛 (U+1211B) <glitch_pruned_250463>
250464 𒄞 (U+1211E) <glitch_pruned_250464>
250465 𒄠 (U+12120) <glitch_pruned_250465>
250466 𒄡 (U+12121) <glitch_pruned_250466>
250467 𒄣 (U+12123) <glitch_pruned_250467>
250468 𒄤 (U+12124) <glitch_pruned_250468>
250469 𒄦 (U+12126) <glitch_pruned_250469>
250470 𒄧 (U+12127) <glitch_pruned_250470>
250472 𒄫 (U+1212B) <glitch_pruned_250472>
250473 𒄮 (U+1212E) <glitch_pruned_250473>
250474 𒄰 (U+12130) <glitch_pruned_250474>
250475 𒄵 (U+12135) <glitch_pruned_250475>
250476 𒄽 (U+1213D) <glitch_pruned_250476>
250477 𒄾 (U+1213E) <glitch_pruned_250477>
250479 𒅇 (U+12147) <glitch_pruned_250479>
250481 𒅋 (U+1214B) <glitch_pruned_250481>
250482 𒅍 (U+1214D) <glitch_pruned_250482>
250484 𒅔 (U+12154) <glitch_pruned_250484>
250485 𒅕 (U+12155) <glitch_pruned_250485>
250486 𒅘 (U+12158) <glitch_pruned_250486>

Removed merges (935)

Click to expand the first 200 of 935 removed merges

Showing the first 200 of 935 removed merges (removed_merges.txt). Full list: https://huggingface.co/gkielian/gemma-glitch-staging/tree/main/google_gemma-3-270m

["", ""]  →  
[")", "$\--"]  →  )$\--
[")$\", "--"]  →  )$\--
["."", "+"|"]  →  ."+"|
["."+"|", ""+""]  →  ."+"|"+"
[".",", "[("]  →  .",[(
[".", "",[("]  →  .",[(
[".",[", "("]  →  .",[(
["AB", "Tracker"]  →  ABTracker
["AGE", "moji"]  →  AGEmoji
["AG", "Emoji"]  →  AGEmoji
["AWS", "JavaScript"]  →  AWSJavaScript
["Actions", "ForRule"]  →  ActionsForRule
["Ad", "xRtList"]  →  AdxRtList
["Aile", "Droite"]  →  AileDroite
["Aile", "Gauche"]  →  AileGauche
["AllFilesIn", "MkvDir"]  →  AllFilesInMkvDir
["Ani", "Paf"]  →  AniPaf
["AreaData", "Index"]  →  AreaDataIndex
["Auto", "Stabilise"]  →  AutoStabilise
["Autor", "Label"]  →  AutorLabel
["Autor", "TextBox"]  →  AutorTextBox
["Avg", "Summer"]  →  AvgSummer
["BF", "AppLink"]  →  BFAppLink
["BSData", "Type"]  →  BSDataType
["BS", "DataType"]  →  BSDataType
["Backup", "Arch"]  →  BackupArch
["Base", "codes"]  →  Basecodes
["Black", "Sholes"]  →  BlackSholes
["Blitz", "ID"]  →  BlitzID
["CBC", "Pksc"]  →  CBCPksc
["C", "ImgBoard"]  →  CImgBoard
["CYCL", "ONEDB"]  →  CYCLONEDB
["Case", "Missense"]  →  CaseMissense
["Case", "PTV"]  →  CasePTV
["ChooseServer", "Grid"]  →  ChooseServerGrid
["Collin", "ToDO"]  →  CollinToDO
["Configure", "Arg"]  →  ConfigureArg
["Consec", "HtIdx"]  →  ConsecHtIdx
["Control", "PTV"]  →  ControlPTV
["Create", "SaveFolder"]  →  CreateSaveFolder
["Custom", "Glare"]  →  CustomGlare
["CustomGlare", "Def"]  →  CustomGlareDef
["Cxx", "Interop"]  →  CxxInterop
["DT", "MakeRectInCM"]  →  DTMakeRectInCM
["DUN", "LAND"]  →  DUNLAND
["Damage", "Took"]  →  DamageTook
["Days", "GE"]  →  DaysGE
["Deferred", "Group"]  →  DeferredGroup
["Denovo", "Mis"]  →  DenovoMis
["DetailUI", "Job"]  →  DetailUIJob
["DetailUIJob", "Icon"]  →  DetailUIJobIcon
["Drv", "GPIO"]  →  DrvGPIO
["EC", "aut"]  →  ECaut
["E", "Caut"]  →  ECaut
["ELEASE", "STR"]  →  ELEASESTR
["ENEMY", "PLACE"]  →  ENEMYPLACE
["En", "CPP"]  →  EnCPP
["Enter", "Expr"]  →  EnterExpr
["Ephemeral", "Shroud"]  →  EphemeralShroud
["External", "TaskPojo"]  →  ExternalTaskPojo
["FBSDK", "Bridge"]  →  FBSDKBridge
["FBSDKBridge", "API"]  →  FBSDKBridgeAPI
["FBSDK", "Macros"]  →  FBSDKMacros
["Fcm", "Error"]  →  FcmError
["Fcm", "Php"]  →  FcmPhp
["Flex", "str"]  →  Flexstr
["Focus", "Bracketing"]  →  FocusBracketing
["Focus", "Moving"]  →  FocusMoving
["Foldout", "GC"]  →  FoldoutGC
["From", "Pda"]  →  FromPda
["Func", "ParamNum"]  →  FuncParamNum
["GALAD", "HRIM"]  →  GALADHRIM
["GTBase", "Alert"]  →  GTBaseAlert
["GT", "UIKit"]  →  GTUIKit
["GULD", "UR"]  →  GULDUR
["GetChar", "ByIndex"]  →  GetCharByIndex
["Get", "ParaPkg"]  →  GetParaPkg
["GoObject", "AllRef"]  →  GoObjectAllRef
["Go", "PrintError"]  →  GoPrintError
["Go", "RawContext"]  →  GoRawContext
["Go", "SrvGroupIndex"]  →  GoSrvGroupIndex
["HAO", "AVOA"]  →  HAOAVOA
["HDR", "Off"]  →  HDROff
["HD", "ROff"]  →  HDROff
["HDR", "Offsets"]  →  HDROffsets
["HDROff", "sets"]  →  HDROffsets
["HDR", "Processor"]  →  HDRProcessor
["H", "IMQTTRVM"]  →  HIMQTTRVM
["HR", "MGMT"]  →  HRMGMT
["Hash", "mapKey"]  →  HashmapKey
["Histogram", "Details"]  →  HistogramDetails
["Hist", "ogramDetails"]  →  HistogramDetails
["History", "Marks"]  →  HistoryMarks
["Hlav", "niOkno"]  →  HlavniOkno
["Ht", "Idx"]  →  HtIdx
["IM", "QTTR"]  →  IMQTTR
["IMQTTR", "VM"]  →  IMQTTRVM
["Iam", "AuthConfig"]  →  IamAuthConfig
["ImageQueue", "Empty"]  →  ImageQueueEmpty
["Image", "TargetPath"]  →  ImageTargetPath
["Im", "putted"]  →  Imputted
["Is", "ClearedBy"]  →  IsClearedBy
["Jpeg", "Len"]  →  JpegLen
["KAK", "KIA"]  →  KAKKIA
["KAKKIA", "INEN"]  →  KAKKIAINEN
["Lens", "Glare"]  →  LensGlare
["Letter", "Location"]  →  LetterLocation
["LuaPush", "Int"]  →  LuaPushInt
["Lua", "ToJavaResult"]  →  LuaToJavaResult
["MAPb", "BrI"]  →  MAPbBrI
["MDEw", "Ol"]  →  MDEwOl
["MI", "Tank"]  →  MITank
["MIT", "ank"]  →  MITank
["MainNav", "Show"]  →  MainNavShow
["MakeRect", "InCM"]  →  MakeRectInCM
["Malay", "Marks"]  →  MalayMarks
["Mesh", "VD"]  →  MeshVD
["Metaxy", "onycha"]  →  Metaxyonycha
["Mkv", "Dir"]  →  MkvDir
["Module", "InitFlag"]  →  ModuleInitFlag
["Mogo", "Button"]  →  MogoButton
["M", "qua"]  →  Mqua
["Mq", "ua"]  →  Mqua
["MyShop", "name"]  →  MyShopname
["NavBar", "PanelView"]  →  NavBarPanelView
["New", "ParaPkg"]  →  NewParaPkg
["Object", "Defer"]  →  ObjectDefer
["OfDeath", "Condition"]  →  OfDeathCondition
["OrderFlight", "Dto"]  →  OrderFlightDto
["Ordinate", "Tuple"]  →  OrdinateTuple
["Outgoing", "River"]  →  OutgoingRiver
["PAF", "Struct"]  →  PAFStruct
["PE", "GBuf"]  →  PEGBuf
["PEG", "Buf"]  →  PEGBuf
["P", "QAry"]  →  PQAry
["PQ", "Ary"]  →  PQAry
["PRIM", "ATEC"]  →  PRIMATEC
["P", "Seqlist"]  →  PSeqlist
["Paf", "Handle"]  →  PafHandle
["Pages", "ScrollView"]  →  PagesScrollView
["Para", "Package"]  →  ParaPackage
["Para", "Pkg"]  →  ParaPkg
["Perm", "utacji"]  →  Permutacji
["Phase", "Hound"]  →  PhaseHound
["Photo", "VideoButton"]  →  PhotoVideoButton
["Pict", "Image"]  →  PictImage
["Pk", "sc"]  →  Pksc
["PlayerData", "Cache"]  →  PlayerDataCache
["Pol", "ynucleaires"]  →  Polynucleaires
["Pos", "Delimiter"]  →  PosDelimiter
["Powers", "Controls"]  →  PowersControls
["Preview", "Paused"]  →  PreviewPaused
["Price", "Dtls"]  →  PriceDtls
["Print", "NumConst"]  →  PrintNumConst
["Process", "Avg"]  →  ProcessAvg
["Radi", "ux"]  →  Radiux
["Raz", "ibul"]  →  Razibul
["RefIn", "SrvGroup"]  →  RefInSrvGroup
["Resources", "Errors"]  →  ResourcesErrors
["Ret", "JpegLen"]  →  RetJpegLen
["Rite", "OfThe"]  →  RiteOfThe
["RxDocument", "Base"]  →  RxDocumentBase
["RxDocument", "Type"]  →  RxDocumentType
["SAFER", "ELEASESTR"]  →  SAFERELEASESTR
["SAF", "PreferenceKey"]  →  SAFPreferenceKey
["SCE", "corr"]  →  SCEcorr
["SHUNT", "LIST"]  →  SHUNTLIST
["SQL", "form"]  →  SQLform
["SRP", "Basic"]  →  SRPBasic
["SRP", "BinBuf"]  →  SRPBinBuf
["SRP", "CS"]  →  SRPCS
["SR", "PCS"]  →  SRPCS
["SRPC", "S"]  →  SRPCS
["SRP", "Control"]  →  SRPControl
["SRPC", "ontrol"]  →  SRPControl
["SRPC", "ore"]  →  SRPCore
["SRP", "Core"]  →  SRPCore
["SRPCore", "Shell"]  →  SRPCoreShell
["SRP", "Interface"]  →  SRPInterface
["SRPInterface", "Item"]  →  SRPInterfaceItem
["SRP", "Object"]  →  SRPObject
["SRP", "ParaPkg"]  →  SRPParaPkg
["SRPS", "XML"]  →  SRPSXML
["SRP", "SrvGroup"]  →  SRPSrvGroup
["SRPS", "rvGroup"]  →  SRPSrvGroup
["Same", "WordInterval"]  →  SameWordInterval
["Send", "AllResult"]  →  SendAllResult
["Simulator", "Flood"]  →  SimulatorFlood
["Slice", "Temp"]  →  SliceTemp
["Source", "Finding"]  →  SourceFinding
["Spring", "MVCProject"]  →  SpringMVCProject
["S", "rvGroup"]  →  SrvGroup
["SrvGroup", "Index"]  →  SrvGroupIndex
["Star", "BinBuf"]  →  StarBinBuf
["StarBinBuf", "Body"]  →  StarBinBufBody
["StarObject", "Body"]  →  StarObjectBody
["Star", "ParaPkg"]  →  StarParaPkg
["StarParaPkg", "Body"]  →  StarParaPkgBody
["Star", "SXml"]  →  StarSXml

Files changed

  • tokenizer.json — BPE merge rules pruned, 735 vocab entries renamed

Algorithm Details

For full details on the glitch token collection algorithm and remediation techniques,
reach out to gkielian.

Related

This is part of a series of tokenizer fixes across all Gemma model repositories
(Gemma 1, 2, 3, 4, and MedGemma — 18 models total).

cc @dougreid @ssmoot

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment