Archived
Gemma 4 sometimes skips the <|"|> that closes a string and writes the object's `}` and <tool_call|> straight after the text (measured on the 31B: the close delimiter at p=0.86, `}` at p=0.08). The object reader only ended a dialect string at its own close, so the call's close, a repeated close, an empty thought channel and the next call's opening were read into the value -- up to the next call's <|"|>, which then "closed" it. Inside a string, the call's close now ends the string and the call when the closers just before it close every open bracket of the object, as vLLM's and HF's Gemma 4 parsers end a call at the first `}<tool_call|>`. Those closers are the object's and leave the value, a repeated close goes with them, and a quote or backtick just before them that leaves the string with an odd count of its kind was the string's close in the wrong spelling (seen with thinking on). The call's close inside a string that does not close the object is text, as before. A value opened with a plain `"` or `'` in a dialect with strings of its own is read the way the model writes it there (measured: `'...'` for nested arguments, `"..."` verbatim, or with only `\"` escaped): verbatim but for an escaped quote, never with JSON's other escapes -- `\n` stays the two characters, as in the JS source it came from. It ends at a quote the object's syntax goes on after (a member, an element, the closers and the call's close), or at <|"|>. Single-quoted values were read as bare words before. The object grammar admits such a value too. Refused, the model took the next token the grammar allowed, a `-`, and every single-quoted string came out as a number (-1, -2, ... at temperature 0). Held bytes stay bounded (a 16-byte run, 32 bytes of lookahead).