convert: ZAYA special tokens are CONTROL, so chat templates tokenize - #27
Merged
bong-water-water-bong merged 1 commit intoSep 27, 2026
Merged
Conversation
LlamaHfVocab left <|im_start|> (105) and <eos> (1) NORMAL although tokenizer.json marks them special. llama.cpp only matches special-token text for CONTROL and USER_DEFINED tokens, so every chat turn's <|im_start|> reached the model as seven text tokens and ZAYA1-8B answered off-template (12 + 30 -> 22). Tokens tokenizer.json lists as special are now CONTROL. Converting ZAYA1-8B now gives the published GGUF's 1283 tensors unchanged and token types with 1 and 105 CONTROL.
bong-water-water-bong
merged commit Sep 27, 2026
fa226f9
into
1bit/hrx-vulkan-patched
1 of 4 checks passed
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.
Bug: in every ZAYA GGUF our converter wrote,
<|im_start|>(id 105) and<eos>(id 1) had token type NORMAL, althoughtokenizer.jsonmarks bothspecial: true(LlamaHfVocableft them normal; both are also in the base vocab). llama.cpp matches special-token text in a prompt only for CONTROL and USER_DEFINED tokens. So every chat turn's<|im_start|>reached the model as seven text tokens instead of token 105:Chat answers were off-template: "What is 12 + 30?" gave "22". The teacher-forced checks never saw this, because they feed token IDs directly.
Fix: every token
tokenizer.jsonlists as special becomes CONTROL, for ZAYA and ZAYA1-VL.Checked:
general.*model-card fields (base model, licence, name).llama-servernow tokenizes<|im_start|>useras[2, 105, 2364].The published GGUFs on Hugging Face get the same two-byte metadata fix in place, so they needn't be reconverted.
🤖 Generated with Claude Code