Repository navigation
[Deps] Bump transformers to 5.17.0 - #39012
Merged
Merged
Conversation
mmangkad
requested review from
Fridge003,
HaiShaw,
JustinTong0323,
ishandhanani,
ispobock,
merrymercy,
sogalin and
yctseng0211
as code owners
September 11, 2026 04:50
mmangkad
force-pushed
the
mmangkad/bump-transformers-5.17.0
branch
from
September 21, 2026 10:51
eb5e341 to
df35f7d
Compare
This was referenced Sep 22, 2026
krisztian-gajdar
added a commit
to superlinked/sie
that referenced
this pull request
Sep 22, 2026
GLM-5.3-Flash's chat template always opens a thinking block and never reads enable_thinking. The queued worker hides reasoning only when a model declares chat_template_kwargs.enable_thinking, so a queued response carried the reasoning and its closing </think> tag in front of the answer. Declaring it true marks that reasoning private there. On the direct route the glm45 reasoning parser splits it off in the engine, and the proxy already drops the split field. The image comment named the wrong cause. The pinned engine resolves transformers 5.12.1, which has no glm5_next processor, so SGLang falls back to a bare tokenizer and never expands an image (sgl-project/sglang#39831). The engine's transformers bump (sgl-project/sglang#39012) is the fix to wait for. A cold start on eight H100s exceeded the 1800 s startup budget when reading the 306 GiB checkpoint took 25 minutes. The budget is now 3600 s. Grammar and tool calling stay unclaimed, and the comment now says why.
krisztian-gajdar
added a commit
to superlinked/sie
that referenced
this pull request
Sep 22, 2026
* fix(config): keep GLM-5.3-Flash reasoning private on every route GLM-5.3-Flash's chat template always opens a thinking block and never reads enable_thinking. The queued worker hides reasoning only when a model declares chat_template_kwargs.enable_thinking, so a queued response carried the reasoning and its closing </think> tag in front of the answer. Declaring it true marks that reasoning private there. On the direct route the glm45 reasoning parser splits it off in the engine, and the proxy already drops the split field. The image comment named the wrong cause. The pinned engine resolves transformers 5.12.1, which has no glm5_next processor, so SGLang falls back to a bare tokenizer and never expands an image (sgl-project/sglang#39831). The engine's transformers bump (sgl-project/sglang#39012) is the fix to wait for. A cold start on eight H100s exceeded the 1800 s startup budget when reading the 306 GiB checkpoint took 25 minutes. The budget is now 3600 s. Grammar and tool calling stay unclaimed, and the comment now says why. * fix(config): size the GLM-5.3-Flash startup budget to the slowest measured cold start Two cold starts on slow hosts took about 32 and 36 minutes, most of it reading the checkpoint. 2400 s covers both without doubling the budget.
|
looking forward this change, it's needed to GLM-5.3-Flash, without it image processor is not working |
Collaborator
|
/rerun-failed-ci |
Collaborator
|
/rerun-failed-ci |
1 similar comment
Collaborator
|
/rerun-failed-ci |
Collaborator
|
@bingxche @michaelzhang-ai can you run a check on ROCm? |
Fridge003
approved these changes
Sep 29, 2026
Fridge003
approved these changes
Sep 30, 2026
Merged
3 of 5 tasks
adarshxs
added a commit
to adarshxs/sglang
that referenced
this pull request
Oct 26, 2026
Resolve conflicts and port the transformers backend to current main: - pyproject: keep main's transformers==5.19.0 and uvicorn>=0.51 pins (drop this branch's 5.15.0 bump). - model_config: keep main's EmbeddingGemma2 context clamp and apply the transformers embedding-plan clamp on top of it. - lora_manager.set_lora_module: keep main's **kwargs passthrough together with the transformers LoRA adapter wrap. - Delete the old models/transformers.py and port main's two changes to it: the embedding_rowwise TP-style alias (sgl-project#39012) into layers.py, and the pad_mm_tokens helper (sgl-project#44845) into MultiModalMixin.pad_input_ids. Export _normalize_tp_style from the package for test_hf_transformers. - trtllm_mha_backend: drop this branch's causal= kwarg; main added the identical line, and the auto-merge produced a repeated keyword. - Parallel linear layers take parallel_group instead of tp_rank/tp_size (sgl-project#42588): the fused QKV projection partitions on "attn_tp" and unfused K/V shards use ReplicatedParallelGroup("attn_tp", tp_size // kv_heads). TP unit tests build group stubs via sglang.test.parallel_groups. - test_transformers_graph: drop the TCPCG fullgraph compile test, since the backend is retired and its custom attention op removed (sgl-project#42287, sgl-project#42288); give the hand-built PrefillCudaGraphRunner the attributes main's replay path now reads. - test_embedding_model_spec: the support matrix has 10 rows (ModernBert and Roberta from this branch plus main's EmbeddingGemma2). - test_transformers_fallback: follow main's removal of the skip-substrs test (sgl-project#43503). Co-Authored-By: Claude Fable 5.1 <[email protected]>
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
Bump
transformers5.12.1 -> 5.17.0 (tokenizers0.22.2 -> 0.23.2, required by it), drop the compat patches upstream has made dead, and port the 5.17.0 vision rotary refactor.The
tokenizers<0.23note goes away: CLIPTokenizer round-trips identically on slow and fast backends at 0.23.2.Patches removed
_patch_nemotron_h_patternM/*->linear_attention/full_attentionand handles-. Forcing the legacy names now makes the config's own validator reject it._ensure_clean_up_tokenization_compatclean_up_tokenizationis back onPreTrainedTokenizerBase.is_flash_attn_greater_or_equal_2_10half of_patch_removed_symbolstransformers.utils.dynamic_module_utilssymlink hot-patchis_torch_fx_availableis still absent, so that patch stays.Changes that are not mechanical
Config registration. transformers now ships native configs for types SGLang defines its own classes for, and
AutoConfig.registerwithoutexist_oksilently lost to them. Register withexist_ok=Trueonly where no_CONFIG_REGISTRYre-parse backs the entry up (zaya,cosmos3_edge)._LazyAutoMappingkeys on the config class__name__, so a differently-named shadow would drop out of PROCESSOR/TOKENIZER/MODEL_MAPPING.cosmos3_omnikeeps losing to the nativeCosmos3OmniConfigfor that reason.Gemma4 attention shapes. transformers now states Gemma4's global/SWA split as a heterogeneous
per_layer_config-- the base attributes are the sliding-window values and the full-attention layers overridehead_dim(plusnum_key_value_headswhere the checkpoint sets it) -- and consumesglobal_head_dim/num_global_key_value_headsbuilding it. A plaintext_config.head_dimread raisesAmbiguousGlobalPerLayerAttributeError, so every Gemma4 launch died inget_config. The parser takes both shapes off concrete layer indices, then drops the spec once it has flattened them onto SGLang's base /swa_*pair. A spec declaring anything beyond those two attributes, or a layer type carrying more than one shape, is rejected rather than silently flattened: SGLang carries one shape per layer type, and dropping the spec would revert the rest to the global value with the weights still loading.embedding_rowwise. transformers appendsembed_tokens: embedding_rowwisetobase_model_tp_planfor every tied-embedding config. The style targets annn.Embedding, which the Transformers backend shards itself inreplace_vocab_embed_class, but_normalize_tp_planrejected the unknown name up front and those models stopped loading.layer_typeslength. Step-3.5-Flash lists an entry per main and next-n-predict layer (45 + 3), which the strictvalidate_layer_typein 5.17 rejects. The new patch re-runs the original validator against the wider count, so every other rule it applies -- per-list vocabularies, legacy remapping -- still holds._patch_rope_parameters_validation. Narrowed to swallow the missingmax_position_embeddingsrather than skipstandardize_rope_paramsoutright. The call also resolvesdefault_rope_type, so the blanket early return left every config withoutmax_position_embeddingson"default". Pixtral's vision config is exactly that, and its tower refuses to build unless it sees"axial".Pixtral's rope table is unchanged: the axial
PixtralVisionRotaryEmbeddingindexes the(h, w)grid pairs that this file's ownposition_meshgridalready produces, instead of the flattenedh * max_width + woffsets.TestPixtralVisionRopepins it to the closed form so an upstream change to the recomposition cannot silently rotate every patch by the wrong angle.Verification
4x GB300. Unit suites for configs, utils, tokenizer, parser, multimodal, managers, models, model_executor, server_args and entrypoints pass (3021 cases).
head_dim512 full / 256 SWACI States
Latest PR Test (Base): ✅ Run #36317514667⚠️ Not run on latest push -- push again to dispatch.
Latest PR Test (Extra):
Latest PR Test (AMD ROCm 10): ❌ Run #36317514605