Various Transformers v5 config fixes (#38247)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2026-03-26 23:06:59 +00:00
committed by GitHub
parent 28048bd6b0
commit f73bcb1c51
7 changed files with 45 additions and 25 deletions
@@ -80,6 +80,9 @@ class Step3p5Config(PretrainedConfig):
self.att_impl_type = att_impl_type
self.use_head_wise_attn_gate = use_head_wise_attn_gate
# For some reason the checkpoint has longer layer_types than num_hidden_layers
if layer_types is not None:
layer_types = layer_types[: self.num_hidden_layers]
self.layer_types = layer_types
self.use_rope_layers = use_rope_layers
self.yarn_only_types = yarn_only_types