File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 77from lightllm .models .vit .layer_weights .pre_and_post_layer_weight import ViTPreAndPostLayerWeight
88from lightllm .models .vit .layer_weights .transformer_layer_weight import ViTTransformerLayerWeight
99from lightllm .models .vit .layer_weights .hf_load_utils import load_hf_weights
10+ from lightllm .common .build_utils import repair_config
1011from lightllm .utils .log_utils import init_logger
1112from lightllm .models .vit import get_load_image_func
1213import torchvision .transforms as T
@@ -59,6 +60,9 @@ def _init_config(self):
5960 self .config ["vision_config" ]["llm_hidden_size" ] = self .config ["llm_config" ]["hidden_size" ]
6061 self .config ["vision_config" ]["downsample_ratio" ] = self .config ["downsample_ratio" ]
6162 self .config = self .config ["vision_config" ]
63+ repair_config (self .config , same_names = ["num_attention_heads" , "n_head" ])
64+ repair_config (self .config , same_names = ["hidden_size" , "n_embd" , "n_embed" ])
65+ repair_config (self .config , same_names = ["num_hidden_layers" , "n_layer" ])
6266 self .layers_num = self .config ["num_hidden_layers" ]
6367 return
6468
You can’t perform that action at this time.
0 commit comments