Detect and fix most _init_weights() issues - make it work for composite models (#37070)

* Update test_modeling_common.py

* Fix Llama and its modular children

* Update test_modeling_common.py

* qwen3

* first try at prioritizing models

* Update test_modeling_common.py

* Update test_modeling_common.py

* Update test_modeling_common.py

* test

* fix

* fix

* more models

* more

* more

* more

* smarter init for composite models!

* fix post rebase

* smol

* fix missing args

* more

* typo

* Super elegant and efficient init for submodels

* Update modeling_utils.py

* style

* last fixes

* cleanup

* finalize cleanup

* CIs

* improve docstring

* Update modeling_utils.py

* llama4

* style

* CIs

* style

* add dpt

* granite speech

* qwen 2.5 omni

* better fix

* Parse the config file instead

* CIs
This commit is contained in:
Cyril Vallez
2025-04-14 16:19:04 +02:00
committed by GitHub
parent 1897a02d83
commit 4e53840920
103 changed files with 1164 additions and 795 deletions

View File

@@ -85,6 +85,7 @@ class Phi4MultimodalModelTester:
intermediate_size=48,
depthwise_seperable_out_channel=128,
nemo_conv_channels=128,
initializer_range=1e-5,
),
vision_config=Phi4MultimodalVisionConfig(
num_hidden_layers=2,
@@ -92,6 +93,7 @@ class Phi4MultimodalModelTester:
intermediate_size=64,
num_attention_heads=8,
crop_size=16,
initializer_range=1e-5,
),
):
self.parent = parent