Repository navigation
Conversation
The CUDA engine took its stop ids from config.json: the top-level eos_token_id, else text_config's. EXL3 packs of Flash Next (turboderp 3.05bpw_h5_ng5, CYBER-FROST SAGE 3.5 bpw) have no top-level id, and text_config names <|endoftext|> (248044) only; the turn's end, <|im_end|> (248046), is listed in generation_config.json alone. Served chat replies ran past their turn: a thinking-on tool request streamed "<|im_end|>\n<|im_start|>user..." as content, repeated the call three times and leaked <think> into the answer. Config.read now adds generation_config.json's eos_token_id to config.json's, in order and without duplicates. The MLX checkpoint, whose top level already lists both, is unchanged.
The 27B's CUDA Config took its stop ids from config.json only, as Flash Next's did. turboderp's 27B EXL3 packs (3.00 and 4.00 bpw) have no top-level eos_token_id and text_config names <|endoftext|> (248044) only, so Config.read returned (248044,) and <|im_end|> (248046), which these packs list in generation_config.json alone, did not end a reply. The MLX 4-bit checkpoint lists both at the top level and reads (248046, 248044), as before. Config.read now adds generation_config.json's eos_token_id after config.json's, in order and without duplicates, and a checkpoint that names no stop id anywhere fails with a clear error. GLM-5.3-Flash is not affected: its EXL3 checkpoint lists its three stop ids in text_config, which its loader reads first.
Owner
|
Thank you, @vcruz305. This shipped in 0.3.6.2 under your name (e5d3a2ae, 57028f34). Flash Next and 27B EXL3 packs now stop at |
This was referenced Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On EXL3 checkpoints of Qwen3.8 Flash Next and Qwen3.8-27B, the CUDA engine does not stop a reply at the end of the chat turn. It reads its stop ids from config.json only: the top-level
eos_token_id, elsetext_config's. These packs have no top-level id, andtext_confignames only<|endoftext|>(248044). The turn's end,<|im_end|>(248046), is listed ingeneration_config.jsonalone.So on 0.3.6.1,
Config.readreturns(248044,)for turboderp's Flash Next pack (3.05bpw_h5_ng5), for the SAGE Flash Next packs I serve (4.15 bpw, and CYBER-FROST-3.8 at 3.5 bpw), and for turboderp's 27B packs at 3.00 and 4.00 bpw. The MLX checkpoints are fine because they list both ids at the top level.On one DGX Spark (GB10), CYBER-FROST-3.8-EXL3-SAGE-3.5bpw served on 0.3.6 with a ~16k-token prompt, thinking on and a
get_weathertool request streamed<|im_end|>\n<|im_start|>user...as content, called the tool three times and leaked<think>into the answer.The change
Both families'
Config.readnow addgeneration_config.json'seos_token_idafter config.json's, in order and without duplicates. A checkpoint that names no stop id anywhere raises aValueErrorinstead of failing later.families/qwen4_exp/cuda/weights.py: a smallstop_ids()helper, used byConfig.read.families/qwen3_5/cuda/weights.py: the same logic inline inConfig.read.tests/test_flashnext_eos.pyandtests/test_qwen27b_eos.py: CPU tests with synthetic configs for the EXL3 layout, the MLX layout, no generation_config.json, scalar values, and no id at all.ple_eos(the n-gram tables' end id) still comes fromtext_config, so the Flash Next n-gram path reads the same id as before.Checked
Against the real configs on disk, with this branch at 0.3.6.1,
Config.readreturns:The new tests pass along with
tests/test_cuda_cli.pyandtests/test_cuda_build.py(26 tests, CPU).End to end on the Spark with the Flash Next change: CYBER-FROST served on 0.3.6 with the same ~16k-token thinking-on prompt and tool request now returns one
get_weathercall withfinish_reason: tool_calls, and no leaked tags. Its token hash matches 0.3.6 serving a copy of the pack whose config.json lists both ids.Not claimed
text_configfirst, and Mia-AiLab's EXL3 checkpoint lists its three stop ids there.Overlap
qwen4_exp/cuda/weights.py. It merges cleanly with this branch.