mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 19:04:50 +07:00
[GH-ISSUE #27] server.py uses the Qwen pre-tokenizer for GLM, so numbers get split into single digits #12
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mab776 on GitHub (Oct 8, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/27
In my needle-in-a-haystack test with long prompts, Maya-S and Maya-M were giving me garbled numbers back (
504→5504,696→6969). It's fine at 8k and broken from ~12–20k, on every quant and config I tried.Cause:
serve/server.pybuildsST.Tokenizer(tokens, merges, types)withoutpre=, so it defaults toqwen35and splits every number into single digits. GLM uses 1–3 digit groups, and the pack'stokenizer.jsonalready says"pre": "glm4". Against the official tokenizer,504=50|4vs Maya's5|0|4, and a 32k prompt is 29,241 vs 30,646 tokens.Fix:
With it the encoding matches the official tokenizer, and the needles went to 6/6 exact at 32k and 128k (Maya-S, v1.0.12).
@mw00 commented on GitHub (Oct 8, 2026):
Thank you! A real bug, found and diagnosed exactly. Fixed in v1.0.15 and credited to you.
strata_tokenizer.Tokenizer.from_dir()now reads the pack'stokenizer/with thepreand special ids from itstokenizer.json, as in your fix. The server,--benchand the detokenizer test all build their tokenizer through it, so the qwen35 default can't sneak back in at one of them.504is now50|4and696is6|96;12345is123|45. The old path gave one digit a token.glm4and its digit grouping, and a directory withouttokenizer.jsonkeepsqwen35."pre": "glm4"into the pack.