You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(diffusion_gemma): demote tool-parser markers from special tokens at load #778
DiffusionGemma checkpoints can register the tool-parsing markers <|tool_call>, <tool_call|>, <|"|>, <|channel>, <channel|> as special added tokens in the tokenizer. When they are special, they encode atomically instead of as the multi-token text the model was trained on, and decoding with skip-special-tokens strips them, so the server tool-call parser (src/server/tool_calls/parser.rs) never sees the markers. Demote these five markers to non-special at DiffusionGemma tokenizer load.
Implementation plan
Verify the premise first on the actual checkpoint: inspect tokenizer.json / tokenizer_config.json (added_tokens_decoder) of the published DiffusionGemma checkpoint and confirm the five markers are flagged special. If they are not, close this issue with a comment stating the finding.
If confirmed: in the tokenizer load path (src/tokenizer/mod.rs, special-token registration around lines 37-44 and 358-363), add a model-scoped demotion hook applied for the diffusion_gemma family: keep the tokens registered as added tokens (so they do not split during encode) but clear their special flag (so decode retains them).
Watch the interaction with the reasoning-channel detection in src/tokenizer/thinking.rs (the <|channel> / <channel|> pair): thinking extraction must keep working after demotion; add a test covering it.
Tests: encode/decode round-trip keeps the markers; skip-special decode retains them; a tool-call parse over a synthetic diffusion output containing <|tool_call> markup succeeds.
Acceptance criteria
The premise check is documented in the issue or PR.
Activity
fix(diffusion_gemma): demote tool-parser markers from special tokens …
fix: correct LocateAnything bf16 ordering and added-token defaults
fix(diffusion_gemma): demote tool-parser markers from special tokens …