Repository navigation
qwen: one EOS rule for the family readers; qwen27 reads generation_config.json - #4678
Conversation
|
Served A/Bs of this PR's head against main (
So on this checkpoint the one-rule change keeps every finish reason and token the same, and costs nothing. Thanks @devopsfortunato. The 24-config before/after snapshot from @jschmied's table is the remaining check before it comes out of draft.
|
|
Both checks this draft was waiting on are in: the served A/Bs above (tokens equal on M3, M5 and GB10, no slower cell) and @jschmied's 24-config snapshot on #3701, where only qwen27's runtime EOS set changes, on the ten configs that declare it. I've marked this ready and put it in the landing queue, with you as the author. Thanks @devopsfortunato.
|
|
Thank you both — the A/B sweeps and the 24-config snapshot are exactly the gate the issue asked for, and both are green:
With the host suite (49/49 EOS tests, HIP loader 6/6, qwen27 config 22/22) already green on this head, I've marked the PR ready for review. @jschmied, the driver + dumps would be a useful receipt to keep with the issue if you can attach them, but nothing further is needed from my side. |
f072be5 to
2aa73ea
Compare
|
Thank you @devopsfortunato. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes. |
Refs #3701. Draft until the Metal comparison below has run: host tests cannot show this one landing, as the issue's gate says.
What
The Qwen 3.5 readers now resolve EOS ids one way, and qwen27's runtime reads
generation_config.json.core/tokenizer/eos.zig: one precedence for every policy: the root's ids,text_config's only when the root gave none, thengeneration_config.json's. That is whatservedalready did, soresolve,mergeand their callers (serverhf_text, dots_mocr, dory, kolibri1) behave byte-for-byte as before. TheOrderenum and its two other arms are gone.qwen35_hipandqwen27_metalbecome oneqwen35policy (nested arrays, at most 8 ids, at least one). Those are validation limits, not precedence, soservedkeeps its own. The server-only tokenizereos_tokenstep stays where it is.qwen27/model.zig(Model.load) reads<dir>/generation_config.json(missing is none; any other read error propagates, as in the HIP loader) and passes it toparseWhy. This is the only runtime EOS path (dflash/generation.zigreadsmodel.config.eos); the othercfg.parse(..., null)callers are width previews, the memory budget and test fixtures, none reads the ids.What changes
248046(<|im_end|>):[248044]becomes[248044, 248046], the set the served reader already has. Without it a qwen27 DFlashrun()with no stop override does not stop at<|im_end|>.nullor[]and a tower id takes the tower's instead ofMissingEos.Tests
eos_policy_test.zig: one fixture table forservedandqwen35, plus mutation tests for rootnull, root[]and root-versus-tower disagreement, each with a planted wrong reader (ignoresgeneration_config, falls through on a present root, reads the tower in place of the root, unions every source) that the rule must differ from.qwen27/config_test.zig: an HF-layout config gives{248044, 248046}with the file passed,{248044}without (main's behaviour), and the same ids aseos.resolve.Linux host, Zig 0.17.0, on the head of this branch:
test-qwen-dense-geometry-hostonly exists on macOS hosts, so I ran itsconfig_test.zigpart directly with the same module graph;model.zigis Metal-only, so only the new read's shape was compiled on its own here.Not run
Overlap
atc overlapreports other open pulls touchingqwen27/model.zigandqwen27/config_test.zig(#3239, #1434, #2375). My hunks there are one read block and one test with its fixture; whichever lands second rebases onto the other.