Repository navigation
build(deps): upgrade transformers to 5.18 - #698
Merged
Merged
Conversation
This was referenced Oct 16, 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.
Summary
Upgrade transformers 5.16 -> 5.18. The main gain is GGUF tokenizers: 5.18 registers a GGUF's USER_DEFINED and CONTROL tokens, so
<think>,<tool_call>and similar tokens are no longer split (the Flash-Next GGUF split<think>into 3 tokens).Changes
models/gguf/tokenizer.py), now a thin layer over transformers:get_gguf_tokenizer+convert_gguf_tokenizer, the tokenizer half ofAutoTokenizer.from_pretrained(gguf_file=...). The other half builds a model config, which needs the PyPIggufpackage and does not knowqwen4exp.unknown_token_id(Flash-Next) got a new<unk>with id 248320, past the vocabulary.<|endoftext|>and Gemma-4 gains<|tool_response>, matching their HF generation configs.tokenizer.ggml.add_bos_token/add_eos_token. Chat requests are not affected.qwen_sparse_attentionanddeepseek_sparse_attentiontoindexed_attention:qwen4_exp: Flash-Next (HF) silently lost its 12 index layers; now mapped to full attention.glm5_next: GLM-5.3-Flash raised on the new name;load_argsnow remaps legacy names and expectsindexed_attention.test_dsa_kpooluses the new name;test_glm_dsapasses an explicit causal mask to the HF indexer reference, which 5.18 requires.Validation
fused), Qwen3.5-2B, Flash-Next NVFP4 HF (offload): identical tokens.fused): prompt 98 -> 96 tokens, now equal to the HF tokenizer's; run to EOS, both answer 70.glm4,deepseek-v3).test_quant_configapodex index-only) also fails on main.