
    3jJ                   
   S SK Jr  S SKJr  S SKJr  S SKJr  SSKJ	r	J
r
JrJrJrJrJrJrJr  \(       a  SSKJr  SSKJr  0 S	S
_SS
_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_SS_0 SS_SS_SS_SS_S S_S!S_S"S_S#S$_S%S$_S&S$_S'S(_S)S*_S+S*_S,S*_S-S*_S.S*_S/S*_E0 S0S*_S1S*_S2S*_S3S4_S5S4_S6S4_S7S4_S8S4_S9S:_S;S:_S<S:_S=S:_S>S:_S?S:_S@S:_SAS:_SBSC_E0 SDSC_SESC_SFSC_SGSC_SHSI_SJSK_SLSK_SMSN_SOSN_SPSQ_SRSQ_SSSQ_STSQ_SUSQ_SVSQ_SWSQ_SXSQ_E0 SYSQ_SZSQ_S[SQ_S\SQ_S]SQ_S^S__S`S__SaS__SbS__ScS__SdSe_SfSg_ShSi_SjSk_SlSk_SmSk_SnSk_ESkSkSkSo.ErSp rSqqSr r Sv       SwSs jjr    SxSt jr   Sy         SzSu jjrgq){    )annotations)defaultdict)deepcopy)TYPE_CHECKING   )	ChunkConcatenate"ErnieFuseAndSplitTextVisionExpertsMergeModulelistPrefixChange	TransposeWeightConverterWeightRenamingWeightTransformPreTrainedModel)HfQuantizerminimaxmixtral
minimax_m2afmoe	qwen2_moedeepseek_v2deepseek_v3deepseek_v32dots1ernie4_5_moeglm4_moeglm4_moe_liteglm_moe_dsa	glm4v_moelongcat_flash
solar_openmellum	qwen3_moeqwen3_omni_moeqwen3_omni_moe_thinker
qwen3_nexthunyuan_v1_moe	flex_olmoolmoe
exaone_moecohere2_moe
rt_detr_v2rt_detrpp_doclayout_v2pp_doclayout_v3sam3_tracker_videosam3_trackerAltCLIPVisionModelCLIPVisionModelChineseCLIPVisionModelCLIPSegVisionModelMetaClip2VisionModelmlcd_visionmlcdSiglipVisionModelSiglip2VisionModelxCLIPVisionModelCLIPSegTextModelCLIPTextModelMetaClip2TextModelSiglipTextModelSiglip2TextModelxCLIPTextModel	paligemmallava
aya_visiongot_ocr2gemma3internvlvipllavamistral3pp_chart2tablevoxtralqwen2_audiovoxtral_realtimeaudioflamingo3glmasrmusicflamingogranite_speech_plusgranite_speechgemma3n_textqwen3_5_textqwen3_5_moe_textllava_next_video
llava_nextllava_onevisionPaliGemmaModel
LlavaModelAyaVisionModelGotOcr2ModelGemma3ModelInternVLModelVipLlavaModelMistral3ModelPPChart2TableModelLlavaNextModelLlavaNextVideoModelLlavaOnevisionModel	FuyuModelMllamaModelVoxtralModelQwen2AudioModelVoxtralRealtimeModelAudioFlamingo3ModelGlmAsrModelMusicFlamingoModelGraniteSpeechPlusModelGraniteSpeechModelMaskFormerDetrDecoder	DetrModel"Qwen2_5_VLForConditionalGenerationQwen2VLForConditionalGenerationASTModelViTModel	BeitModel	DeiTModel
IJepaModel)ViTMAEModelViTMSNModel
VivitModelc            $     7   0 S[        SSS9[        SSS9[        SSS9[        S	S
S9[        SSS9[        SSS9/_S[        SSS/[        SS9/S9[        S/ SQ[        SS9/S9[        SSS9/_S[        SS5      [        SS5      [        SS 5      [        S!S"5      [        S#S$5      [        S%S&5      [        S'S(5      /_S)[        S*S+5      /_S,[        SS5      [        SS 5      [        S!S"5      [        S#S$5      [        S%S&5      [        S'S(5      /_S-[        S.S/5      [        S0S15      [        S2S35      [        S4S55      [        S6S75      [        S8S95      [        SS5      [        SS 5      [        S!S"5      [        S#S$5      [        S%S&5      [        S'S(5      /_S:[        S;S<5      [        S=S>5      [        S.S/5      [        S0S15      [        S2S35      [        S4S55      [        S?S@5      [        SASB5      [        SCSD5      /	_SE[        SFSG5      [        SHSI5      [        SJSK5      [        SLS$5      /_SM[        SNSO5      [        SPSQ5      [        SRSS5      [        STSG5      [        SUSI5      [        SVSK5      [        SWSX5      [        SYSZ5      [        S#S$5      [        S[S&5      [        S\S(5      [        S]S^5      [        S_S`5      /_Sa[        SbSc5      /_Sd[        STSG5      [        SUSI5      [        SVSK5      [        SeSf5      [        S#S$5      [        S%S&5      [        S'S(5      /_Sg[        S*Sh5      [        S8Si5      /_Sj[        SkSS9/_Sl/ [        SmSnS9P[        SoSpS9P[        SqSrS9P[        SsStS9P[        SuSvS9P[        SwSxS9P[        SySzS9P[        S{S|S9P[        S}S~S9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SSS9P[        SS/S[        SS9[	        SS9/S9P[        SS[        SS9/S9P_S[        SSS9/_S[        SSS9[        SSS9[        SSS9[        SSS9/_S[        SSS9[        SSS9[        SSS9[        SSS9[        SSS9[        SSS9[        SSS9[        SSS9[        SSS9[        SSS9[        SSS9[        SSS9[        SSS9[        SSS9[        SSS9[        SSS9[        SSS9[        SS/S[        SS9[	        SS9/S9[        SS[        SS9/S9[        SS/S[	        SS9/S9[        SS/S[	        SS9/S9/_0 S[        SSS9[        SSS9[        SSS9[        SSS9/_S[        SSS9/_S[        SSS9[        SSS9[        SSS9[        SSS9/_S[        SSS9/_S[        SSS9[        SSS9[        SSS9[        GS GSS9[        SSS9/_GS[        SSS9/_GS[        SSS9[        SSS9[        SSS9[        SSS9[        GSGSS9/_GS[        GSGS9/_GS	[        GS
GS9/_GS[        SSS9/_GS[        SSS9[        SSS9[        GSGSS9[        GSGSS9[        SSS9/_GS[        SSS9[        SSS9[        GSGSS9/_GS[        SSS9[        SSS9[        GSGSS9[        SSS9/_GS[        GSGS
S9/_GS[        GSSS9[        GSGSS9[        GSGSS9/_GS[        GS SS9[        GS!GS"S9[        GS#SS9/_GS$[        GS!GS"S9[        GS%SS9/_E0 GS&[        GS'GS(S9[        GS)GS*S9[        GS+GS,S9[        GS-GS.S9[        GS/GS0S9[        GS1GS2S9[        GS3GS4S9[        GS5GS6S9[        GS7GS8S9[        GS9GS:S9[        GS;GS<S9[        GS=GS>S9[        GS?GS@S9[        GSAGSBS9[        GSCGSDS9[        GSEGSFS9[        GSGGSHS9[        GSIGSJS9[        GSKGSLS9[        GSMGSNS9[        GSOGSPS9[        GSQGSR/S[        SS9[	        SS9/S9[        GSSS[        SS9/S9/_GST[        GSUGSVGSW9/_GSX[        GSUGSUGSY9/_GSZ[        GS[GS\9/_GS][        GS^GS_S9[        GS`GSaS9[        GSbGScS9[        GSdGSeS9[        GSfGSgS9[        GShGSiS9[        GSjGSkS9[        GSlGSmS9/_GSn[        GSoGSp5      /_GSq[        GSrGSs5      /_GSt[        GSuGSv5      /_GSw[        GSxGSy5      [        GSzGS{5      /_GS|[        GS}GS~5      [        GSGS5      /_GS[        SGSUGSW9/_GS[        GSGSS9[        GSGSS9[        GSGSS9/_GS[        GSGS5      [        GSGS5      [        GSGS5      /_GS[        GSGS5      [        GSGS/GS[        SS9[	        SS9/S9[        GS/GS[        SS9/S9/_GS[        GSQGSR/S[        SS9[	        SS9/S9[        GSSS[        SS9/S9/_GS[        SS[        SGSGSGS9/S9[        SS[        SGSGSGS9/S9/_GS[        GSGSS9[        GSGSS9[        GSGSS9[        GSGSS9[        GSGSS9[        GSSS9[        GSGSS9[        GSGSS9/_E0 GS[        GSGS5      [        GSGS5      [        GSGS/GS[        SS9[	        SS9/S9[        GSGS[        SS9/S9/_GS[        GSGS/GS[        SS9[	        SS9/S9[        GSGS[        SS9/S9/_GS[        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS[        SSGS9/S9[        GSGS[        SSGS9/S9[        GS/GSGS/[        SS9/S9[        GS/GSGS/[        SSGS9/S9[        GSGS/GSGS/[        SSGS9/S9/_GS[        GSGS5      [        GSGS5      /_GS[        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      /_GS[        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      /_GS[        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GS GS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS	5      [        GS
GS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GS/ GSQ[        SS9/S9[        GS/ GSQ[        SS9/S9/_GS[        GSGSS9/_GS[        GS GSS9[        GS!GS"5      [        GS#GS$5      [        GS%GS&5      [        GS'GS(5      [        GS)GS*5      [        GS+GS,5      [        GS-GS.5      [        GS/GS05      [        GS1GS25      /
_GS3[        GSGS5      [        GSGS5      [        GS4GS55      [        GSGS5      [        GSGS5      [        GS6GS75      [        GS8GS95      [        GS:GS;5      [        GS<GS=5      [        GS>GS?5      [        GS@GSA5      [        GSBGSC5      [        GSDGSE5      [        GSFGSG5      [        GSHGSI5      [        GSJGSK5      /_GSL[        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      /_GSM[        GSGS5      [        GSGSN5      [        GSGSO5      [        GSGS5      /_GSP[        GSQGS5      [        GSRGSS5      [        GST/GSU[        SS9/S9[        GSV/GSW[        SS9/S9/_GSX[        GSYGSZ/GS[        SS9[	        SS9/S9[        GS[GS[        SS9/S9/_GS\[        GS]GS^5      [        GS_GS`5      [        GSaGS5      [        GSbGSc5      [        GSdGSe5      [        GS{GSf5      [        GSgGS5      [        GShGSi5      [        GSj// GSkQ[        SS9/S9/	_GSl[        GS_GS`S9[        GS]GS^S9[        GSmGSS9[        GSgGSS9[        GShGSiS9[        GSn/ GSkQ[        SS9/S9/_GSo[        GSpGSq5      [        GSrGSs5      [        GStGSu5      [        GSvGSw5      [        GSxGSy5      [        GSzGS
5      [        GS{GS|5      [        GS}GS~5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      /_E[        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        SGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GS// GSQ[        SS9/S9[        GS// GSQ[        SS9/S9/[        GSGSS9[        GSGSS9/[        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSSS/[        SS9/S9[        GSGSGS/[        SS9/S9/[        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS 5      /[        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS 5      /[        GSGS5      [        GSGS5      [        GSGS5      [        GSGS	5      [        GSGS5      [        GSGS5      [        GSGS5      [        GS
GS 5      /[        GSGS5      [        GSGS5      [        GSGS5      [        GSGS	5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS 5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS5      /[        GSGS5      [        GSGS5      [        GSGS5      [        GSGS	5      [        GSGS5      [        GSGS5      [        GSGS5      [        GSGS 5      /GS.En U GSn==   U GS    R                  5       -  ss'   U GS ==   [        GS!GS"S9[        GS#GS$S9/-  ss'   [        GS%GS&5      [        GS'GS(5      [        GS)GS*5      [        GS+GS,5      [        GS-GS.5      [        GS/GS05      [        GS1GS25      [        GS3GS45      [        GS5GS65      [        GS7GS85      [        GS9GS:5      [        GS;GS<5      [        GS=GS>5      [        GS?GS@5      [        GSAGSB5      [        GSCGSD5      /U GSE'   U GSE   R                  5       U GSF'   U GS   R                  5       U GSG'   U GSG==   [        GSGSH5      /-  ss'   U S   R                  5       [        GSIGSJ5      [        GSKGSL5      /-   U GSM'   U S   R                  5       U GSN'   U GSN==   [        GSgS^5      [        GShS`5      [        S*GSO5      /-  ss'   U GS   R                  5       U GSP'   U GSP==   [        GSQGSR5      /-  ss'   U GS   R                  5       U GSS'   U GSS==   [        GSTGSU5      /-  ss'   U GS   R                  5       U GSV'   U GSV==   [        GSWGSS9[        GSXGSTS9[        GSYGSZS9/-  ss'   U GS   R                  5       U GS['   U GS[==   U GS   R                  5       -  ss'   U GS   R                  5       U GS\'   U GS\==   [        GS]GSU5      [        GS^GSZ5      /-  ss'   [        R                  5        H   u  pX;   a  M  X   R                  5       X'   M"     U $ (_  Ngemma4_unifiedzvision_embedder\.patch_ln1zembed_vision.patch_ln1source_patternstarget_patternszvision_embedder\.patch_densezembed_vision.patch_densezvision_embedder\.patch_ln2zembed_vision.patch_ln2zvision_embedder\.pos_embeddingzembed_vision.pos_embeddingzvision_embedder\.pos_normzembed_vision.pos_normz"embed_vision\.embedding_projectionz5embed_vision.multimodal_embedder.embedding_projectionhrm_textzmlp.gate_up_proj.weightzmlp.gate_proj.weightzmlp.up_proj.weightr   )dim)r   r   
operationszattn.gqkv_proj.weight)zself_attn.gate_proj.weightself_attn.q_proj.weightself_attn.k_proj.weightself_attn.v_proj.weightz\.attn\.o_proj\.z.self_attn.o_proj.rv   zencoder\.layer\.zlayers.zattention.queryq_projzattention.keyk_projzattention.valuev_projzattention.output.densezattention.o_projzintermediate.densezmlp.fc1zoutput.densezmlp.fc2ViTMSNForImageClassificationz
^encoder\.zvit.encoder.ViTMAEForPreTrainingBeitBackbonez
^fpn1\.0\.zfpn.fpn1.conv_transpose1.z
^fpn1\.1\.zfpn.fpn1.normalization.z
^fpn1\.3\.zfpn.fpn1.conv_transpose2.z
^fpn2\.0\.z	fpn.fpn2.z^encoder\.layer\.zbeit.encoder.layer.z^embeddings\.zbeit.embeddings.BeitForSemanticSegmentationz (?<!psp_modules\.[0-9]\.1\.)bn\.znormalization.z((?<!psp_modules\.[0-9]\.1\.)conv\.weightzconvolution.weightzdecode_head.bottleneck.zdecode_head.psp_bottleneck.z0decode_head\.psp_modules\.(\d+)\.1\.conv\.weightz9decode_head.psp_modules.blocks.\1.conv.convolution.weightz(decode_head\.psp_modules\.(\d+)\.1\.bn\.z5decode_head.psp_modules.blocks.\1.conv.normalization.lw_detrzattention.attention.queryzattention.q_projzattention.attention.keyzattention.k_projzattention.attention.valuezattention.v_projzattention.outputSegformerModelzencoder.patch_embeddings.(\d+).zstages.\1.patch_embeddings.zencoder.block.(\d+).zstages.\1.blocks.zencoder.layer_norm.(\d+)zstages.\1.layer_normzattention.self.queryzattention.self.keyzattention.self.valuezattention.self.srz/attention.sequence_reduction.sequence_reductionzattention.self.layer_normz'attention.sequence_reduction.layer_normz
mlp.dense1z
mlp.dense2layer_norm_1layernorm_beforelayer_norm_2layernorm_after SegformerForSemanticSegmentationzdecode_head.linear_czdecode_head.linear_projectionsswinz+attention.self.relative_position_bias_tablez=attention.relative_position_bias.relative_position_bias_tableSwinBackbonezswin.encoder.zswin.embeddings.altclipzlayer\.deepseek_v4z^embed\.weight$zembed_tokens.weightz^head\.weight$zlm_head.weightz^norm\.weight$znorm.weightz^hc_head_fn$zhc_head.hc_fnz^hc_head_base$zhc_head.hc_basez^hc_head_scale$zhc_head.hc_scalez^layers\.(\d+)\.attn_norm\.zlayers.\1.input_layernorm.z^layers\.(\d+)\.ffn_norm\.z#layers.\1.post_attention_layernorm.z^layers\.(\d+)\.hc_attn_fn$zlayers.\1.attn_hc.fnz^layers\.(\d+)\.hc_attn_base$zlayers.\1.attn_hc.basez^layers\.(\d+)\.hc_attn_scale$zlayers.\1.attn_hc.scalez^layers\.(\d+)\.hc_ffn_fn$zlayers.\1.ffn_hc.fnz^layers\.(\d+)\.hc_ffn_base$zlayers.\1.ffn_hc.basez^layers\.(\d+)\.hc_ffn_scale$zlayers.\1.ffn_hc.scalez^layers\.(\d+)\.attn\.zlayers.\1.self_attn.z^layers\.(\d+)\.ffn\.zlayers.\1.mlp.z%^layers\.(\d+)\.self_attn\.attn_sink$zlayers.\1.self_attn.sinksz6^layers\.(\d+)\.self_attn\.indexer\.compressor\.norm\.z/layers.\1.self_attn.compressor.indexer.kv_norm.z4^layers\.(\d+)\.self_attn\.indexer\.compressor\.ape$z4layers.\1.self_attn.compressor.indexer.position_biasz0^layers\.(\d+)\.self_attn\.indexer\.compressor\.z'layers.\1.self_attn.compressor.indexer.z$^layers\.(\d+)\.self_attn\.indexer\.z>^layers\.(\d+)\.self_attn\.compressor\.indexer\.weights_proj\.z;layers.\1.self_attn.compressor.indexer.scorer.weights_proj.z-^layers\.(\d+)\.self_attn\.compressor\.norm\.z'layers.\1.self_attn.compressor.kv_norm.z+^layers\.(\d+)\.self_attn\.compressor\.ape$z,layers.\1.self_attn.compressor.position_biasz(^layers\.(\d+)\.self_attn\.(.*?)\.wq_a\.z layers.\1.self_attn.\2.q_a_proj.z(^layers\.(\d+)\.self_attn\.(.*?)\.wq_b\.z layers.\1.self_attn.\2.q_b_proj.z'^layers\.(\d+)\.self_attn\.(.*?)\.wkv\.zlayers.\1.self_attn.\2.kv_proj.z)^layers\.(\d+)\.self_attn\.(.*?)\.wgate\.z!layers.\1.self_attn.\2.gate_proj.z(^layers\.(\d+)\.self_attn\.(.*?)\.wo_a\.z layers.\1.self_attn.\2.o_a_proj.z(^layers\.(\d+)\.self_attn\.(.*?)\.wo_b\.z layers.\1.self_attn.\2.o_b_proj.z!^layers\.(\d+)\.self_attn\.wq_a\.zlayers.\1.self_attn.q_a_proj.z!^layers\.(\d+)\.self_attn\.wq_b\.zlayers.\1.self_attn.q_b_proj.z ^layers\.(\d+)\.self_attn\.wkv\.zlayers.\1.self_attn.kv_proj.z!^layers\.(\d+)\.self_attn\.wo_a\.zlayers.\1.self_attn.o_a_proj.z!^layers\.(\d+)\.self_attn\.wo_b\.zlayers.\1.self_attn.o_b_proj.z#^layers\.(\d+)\.self_attn\.q_norm\.zlayers.\1.self_attn.q_a_norm.z ^layers\.(\d+)\.mlp\.gate\.bias$z*layers.\1.mlp.gate.e_score_correction_biasz)^layers\.(\d+)\.mlp\.shared_experts\.w1\.z'layers.\1.mlp.shared_experts.gate_proj.z)^layers\.(\d+)\.mlp\.shared_experts\.w2\.z'layers.\1.mlp.shared_experts.down_proj.z)^layers\.(\d+)\.mlp\.shared_experts\.w3\.z%layers.\1.mlp.shared_experts.up_proj.zmlp.experts.*.w1.weightzmlp.experts.*.w3.weightzmlp.experts.gate_up_projr   zmlp.experts.*.w2.weightzmlp.experts.down_projr\   z^language_model.modellanguage_modelrE   z^language_model.lm_headlm_headz^language_modelzmodel.language_modelz^vision_towerzmodel.vision_towerz^multi_modal_projectorzmodel.multi_modal_projectorminimax_m3_vlz^language_model\.lm_headz^language_model\.model\.zmodel.language_model.z:^vision_tower\.vision_model\.embeddings\.patch_embedding\.z#model.vision_tower.embeddings.proj.z.^vision_tower\.vision_model\.encoder\.layers\.zmodel.vision_tower.layers.z+^vision_tower\.vision_model\.pre_layrnorm\.z model.vision_tower.pre_layrnorm.z"^multi_modal_projector\.linear_1\.z%model.multi_modal_projector.linear_1.z"^multi_modal_projector\.linear_2\.z%model.multi_modal_projector.linear_2.z^patch_merge_mlp\.linear_1\.z+model.multi_modal_projector.merge_linear_1.z^patch_merge_mlp\.linear_2\.z+model.multi_modal_projector.merge_linear_2.z<\.language_model\.layers\.(\d+)\.block_sparse_moe\.experts\.z&.language_model.layers.\1.mlp.experts.zC\.language_model\.layers\.(\d+)\.block_sparse_moe\.shared_experts\.z-.language_model.layers.\1.mlp.shared_experts.z?\.language_model\.layers\.(\d+)\.block_sparse_moe\.gate\.weightz).language_model.layers.\1.mlp.gate.weightzJ\.language_model\.layers\.(\d+)\.block_sparse_moe\.e_score_correction_biasz:.language_model.layers.\1.mlp.gate.e_score_correction_biasz\.self_attn\.index_q_proj\.z.self_attn.indexer.q_proj.z\.self_attn\.index_k_proj\.z.self_attn.indexer.k_proj.z\.self_attn\.index_q_norm\.z.self_attn.indexer.q_norm.z\.self_attn\.index_k_norm\.z.self_attn.indexer.k_norm.z#mlp.shared_experts.gate_proj.weightz!mlp.shared_experts.up_proj.weightz&mlp.shared_experts.gate_up_proj.weightrN   z^audio_towerzmodel.audio_towerrj   rT   z^encoderzmodel.encoderz
^projectorzmodel.projectorrp   vibevoice_asrz^acoustic_tokenizer_encoderz model.acoustic_tokenizer_encoderz^semantic_tokenizer_encoderz model.semantic_tokenizer_encoderVibeVoiceAsrModelrY   z^image_newlinezmodel.image_newliner5   vision_model)prefix_to_remover?   
text_modelVideoLlavaModelvideo_llavaz^image_towerzmodel.image_towerz^video_towerzmodel.video_towerfuyuz^vision_embed_tokenszmodel.vision_embed_tokensmllamaz^vision_modelzmodel.vision_model	Emu3Modelz^text_model.modelemu3z^text_model.lm_headz^text_modelzmodel.text_modelz^vqmodelzmodel.vqmodelpaddleocr_vlz^mlp_ARz^visualzmodel.visualz1^model(?!(\.visual|\.projector|\.language_model))rt   z#^model(?!\.(language_model|visual))deepseek_ocr2z!sam_model\.blocks\.(\d+)\.norm1\.z/vision_tower.sam_encoder.layers.\1.layer_norm1.z!sam_model\.blocks\.(\d+)\.norm2\.z/vision_tower.sam_encoder.layers.\1.layer_norm2.z sam_model\.blocks\.(\d+)\.attn\.z(vision_tower.sam_encoder.layers.\1.attn.zsam_model\.blocks\.(\d+)\.mlp\.z'vision_tower.sam_encoder.layers.\1.mlp.zsam_model\.patch_embed\.proj\.z0vision_tower.sam_encoder.patch_embed.projection.zsam_model\.pos_embedz"vision_tower.sam_encoder.pos_embedzsam_model\.neck\.0\.z$vision_tower.sam_encoder.neck.conv1.zsam_model\.neck\.1\.z*vision_tower.sam_encoder.neck.layer_norm1.zsam_model\.neck\.2\.z$vision_tower.sam_encoder.neck.conv2.zsam_model\.neck\.3\.z*vision_tower.sam_encoder.neck.layer_norm2.zsam_model\.net_2\.z$vision_tower.sam_encoder.proj.conv1.zsam_model\.net_3\.z$vision_tower.sam_encoder.proj.conv2.z#qwen2_model\.model\.model\.layers\.z#vision_tower.vision_encoder.layers.z!qwen2_model\.model\.model\.norm\.z!vision_tower.vision_encoder.norm.zqwen2_model\.query_768\.z"vision_tower.query_768_resolution.zqwen2_model\.query_1024\.z#vision_tower.query_1024_resolution.zprojector\.layers\.zmulti_modal_projector.view_seperatorview_separatorz(^|model\.)embed_tokens\.z\1language_model.embed_tokens.z(^|model\.)layers\.z\1language_model.layers.z(^|model\.)norm\.z\1language_model.norm.zmlp.experts.*.gate_proj.weightzmlp.experts.*.up_proj.weightzmlp.experts.*.down_proj.weightcolqwen2modelvlm)r   model_prefixshieldgemma2)prefix_to_addr   timm_wrapper
timm_model)r   pi0
state_projzembed_action_time.state_projaction_in_projz embed_action_time.action_in_projaction_time_mlp_inz$embed_action_time.action_time_mlp_inaction_time_mlp_outz%embed_action_time.action_time_mlp_outz&^paligemma_with_expert.paligemma.modelz	model.vlmz)^paligemma_with_expert.gemma_expert.modelz	model.ditz+^paligemma_with_expert.gemma_expert.lm_headzmodel.dit.embed_tokensz(^paligemma_with_expert.paligemma.lm_headz%model.vlm.language_model.embed_tokensesmz9encoder.layer.*.attention.self.rotary_embeddings.inv_freqzrotary_embeddings.inv_freqdinov3_convnextz(?<!model\.)stageszmodel.stages
dinov3_vitz(?<!model\.)layer.zmodel.layer.
timesfm2_5ff0fc1ff1fc2olmo_hybridattention_layer_norminput_layernormfeedforward_layer_normpost_attention_layernormrV   r3   z'detector_model.vision_encoder.backbone.zvision_encoder.backbone.ztracker_neck.zvision_encoder.neck.ztracker_model.(.+)z\1t5gemma2_encoderz-(?<!decoder\.)(?<!text_model\.)embed_tokens\.ztext_model.embed_tokens.z5(?<!decoder\.)(?<!text_model\.)(?<!layer)(?<!_)norm\.ztext_model.norm.zA(?<!vision_model.encoder\.)(?<!decoder\.)(?<!text_model\.)layers.ztext_model.layers.r   z.block_sparse_moe.z.mlp.z.experts.*.w1.weightz.experts.*.w3.weightz.experts.gate_up_projz.experts.*.w2.weightz.experts.down_projr   qwen3_vl_moe   T)
check_dimscosmos3_omniz!^(layers\.|embed_tokens\.|norm\.)zmodel.language_model.\1zF^(blocks\.|merger\.|patch_embed\.|pos_embed\.|deepstack_merger_list\.)zmodel.visual.\1z\.self_attn\.to_q\.z.self_attn.q_proj.z\.self_attn\.to_k\.z.self_attn.k_proj.z\.self_attn\.to_v\.z.self_attn.v_proj.z\.self_attn\.to_out\.z\.self_attn\.norm_q\.z.self_attn.q_norm.z\.self_attn\.norm_k\.z.self_attn.k_norm.phimoez.gate.weightz.router.weightlfm2_moez feed_forward.experts.*.w1.weightz feed_forward.experts.*.w3.weightz!feed_forward.experts.gate_up_projz feed_forward.experts.*.w2.weightzfeed_forward.experts.down_projernie4_5_vl_moevision_towerzspatial_linear.0zspatial_linear.fc1zspatial_linear.2zspatial_linear.fc2zspatial_linear.3zspatial_linear.lnztemporal_linear.0ztemporal_linear.fc1ztemporal_linear.2ztemporal_linear.fc2ztemporal_linear.3ztemporal_linear.lnz!(?<!language_model\.)embed_tokenszlanguage_model.embed_tokensz(?<!language_model\.)layerszlanguage_model.layersz(?<!_)(?<!\w)norm\.zlanguage_model.norm.zmlp.gate.weight_1zmlp.vision_moe.gate.weight)dim0dim1zmlp.gate.weightzmlp.text_moe.gate.weightz'mlp.moe_statics.e_score_correction_biasz5mlp.text_moe.gate.moe_statics.e_score_correction_biasz7mlp.vision_moe.gate.moe_statics.e_score_correction_biaszexperts.*.down_proj.weightztext_moe.experts.down_projzvision_moe.experts.down_proj)	stack_dim
concat_dimzexperts.*.gate_proj.weightzexperts.*.up_proj.weightztext_moe.experts.gate_up_projzvision_moe.experts.gate_up_proj
maskformerzlayers.(\d+).fc1zlayers.\1.mlp.fc1zlayers.(\d+).fc2zlayers.\1.mlp.fc2rr   zbackbone.conv_encoderbackboneout_projo_projr/   zencoder.encoder.(\d+).layerszencoder.aifi.\1.layersRfDetrModelzbackbone.0.encoder.encoderzbackbone.backbonezbackbone.0.projectorzbackbone.projectorzprojector.stages.0.0.cv1.convz$projector.projector_layer.conv1.convzprojector.stages.0.0.cv1.bnz$projector.projector_layer.conv1.normzprojector.stages.0.0.cv2.convz$projector.projector_layer.conv2.convzprojector.stages.0.0.cv2.bnz$projector.projector_layer.conv2.normzprojector.stages.0.1zprojector.layer_normz%projector.stages.0.0.m.(\d+).cv1.convz3projector.projector_layer.bottlenecks.\1.conv1.convz#projector.stages.0.0.m.(\d+).cv1.bnz3projector.projector_layer.bottlenecks.\1.conv1.normz%projector.stages.0.0.m.(\d+).cv2.convz3projector.projector_layer.bottlenecks.\1.conv2.convz#projector.stages.0.0.m.(\d+).cv2.bnz3projector.projector_layer.bottlenecks.\1.conv2.normztransformer.decoderdecoderzdecoder.layers.(\d+).norm1z&decoder.layers.\1.self_attn_layer_normzdecoder.layers.(\d+).norm2z'decoder.layers.\1.cross_attn_layer_normzdecoder.layers.(\d+).linear1zdecoder.layers.\1.mlp.fc1zdecoder.layers.(\d+).linear2zdecoder.layers.\1.mlp.fc2zdecoder.layers.(\d+).norm3zdecoder.layers.\1.layer_normzdecoder.normzdecoder.layernormz^transformer\.enc_output_normenc_output_normz^transformer\.enc_output
enc_outputztransformer.enc_out_class_embedenc_out_class_embedztransformer.enc_out_bbox_embedenc_out_bbox_embedzrefpoint_embed\.weightzreference_point_embed.weightzself_attn.out_projzself_attn.o_projzself_attn.in_proj_bias)zself_attn.q_proj.biaszself_attn.k_proj.biaszself_attn.v_proj.biaszself_attn.in_proj_weight)r   r   r   RfDetrForObjectDetection^zmodel.RfDetrForInstanceSegmentationz^(?!segmentation_head)z2segmentation_head\.query_features_block\.layers\.0zquery_features_block.mlp.fc1z2segmentation_head\.query_features_block\.layers\.2zquery_features_block.mlp.fc2z0segmentation_head\.query_features_block\.norm_inzquery_features_block.normz&segmentation_head\.blocks\.(\d+)\.normzblocks.\1.layernormz(segmentation_head\.blocks\.(\d+)\.dwconvzblocks.\1.depthwise_convz)segmentation_head\.blocks\.(\d+)\.pwconv1zblocks.\1.pointwise_convz(segmentation_head\.spatial_features_projspatial_features_projz&segmentation_head\.query_features_projquery_features_projzsegmentation_head\.biassegmentation_biasConditionalDetrModelzencoder_attn.out_projzencoder_attn.o_projz%decoder.layers.(\d+).sa_qcontent_projz*decoder.layers.\1.self_attn.q_content_projz!decoder.layers.(\d+).sa_qpos_projz&decoder.layers.\1.self_attn.q_pos_projz%decoder.layers.(\d+).sa_kcontent_projz*decoder.layers.\1.self_attn.k_content_projz!decoder.layers.(\d+).sa_kpos_projz&decoder.layers.\1.self_attn.k_pos_projzdecoder.layers.(\d+).sa_v_projz"decoder.layers.\1.self_attn.v_projz%decoder.layers.(\d+).ca_qcontent_projz-decoder.layers.\1.encoder_attn.q_content_projz!decoder.layers.(\d+).ca_qpos_projz)decoder.layers.\1.encoder_attn.q_pos_projz%decoder.layers.(\d+).ca_kcontent_projz-decoder.layers.\1.encoder_attn.k_content_projz!decoder.layers.(\d+).ca_kpos_projz)decoder.layers.\1.encoder_attn.k_pos_projzdecoder.layers.(\d+).ca_v_projz%decoder.layers.\1.encoder_attn.v_projz&decoder.layers.(\d+).ca_qpos_sine_projz.decoder.layers.\1.encoder_attn.q_pos_sine_projdeformable_detrd_finezlayers.\1.mlp.layers.0zlayers.\1.mlp.layers.1
nemotron_hz	backbone.zembedding.weightzembeddings.weightzmixer.experts.*.up_proj.weightzmixer.experts.up_projz mixer.experts.*.down_proj.weightzmixer.experts.down_projjambaz'feed_forward.experts.*.gate_proj.weightz%feed_forward.experts.*.up_proj.weightz'feed_forward.experts.*.down_proj.weight
nomic_bertzencoder.layerslayersemb_lnzembeddings.LayerNormzattn.out_projfc11up_projfc12	gate_proj	down_projnorm1norm2post_mlp_layernormz	attn.Wqkv)zself_attn.q_projzself_attn.k_projzself_attn.v_projjina_embeddings_v3zmixer.out_projz
mixer.Wqkv
cohere_asrzencoder\.pre_encode\.conv\.zencoder.subsampling.layers.zencoder\.pre_encode\.out\.zencoder.subsampling.linear.z7transf_decoder\._embedding\.position_embedding\.pos_enczdecoder.pos_emb.weightz+transf_decoder\._embedding\.token_embeddingzdecoder.embed_tokensz&transf_decoder\._embedding\.layer_normzdecoder.embedding_layernormz*transf_decoder\._decoder\.final_layer_normz transf_decoder\._decoder\.layerszdecoder.layerszencoder_decoder_proj\.zdecoder.proj.z"encoder\.(.+)\.self_attn\.linear_qzencoder.\1.self_attn.q_projz"encoder\.(.+)\.self_attn\.linear_kzencoder.\1.self_attn.k_projz"encoder\.(.+)\.self_attn\.linear_vzencoder.\1.self_attn.v_projz$encoder\.(.+)\.self_attn\.linear_outzencoder.\1.self_attn.o_projz$encoder\.(.+)\.self_attn\.linear_posz$encoder.\1.self_attn.relative_k_projz$encoder\.(.+)\.self_attn\.pos_bias_uzencoder.\1.self_attn.bias_uz$encoder\.(.+)\.self_attn\.pos_bias_vzencoder.\1.self_attn.bias_vz)decoder\.(.+)\.first_sub_layer\.query_netzdecoder.\1.self_attn.q_projz'decoder\.(.+)\.first_sub_layer\.key_netzdecoder.\1.self_attn.k_projz)decoder\.(.+)\.first_sub_layer\.value_netzdecoder.\1.self_attn.v_projz.decoder\.(.+)\.first_sub_layer\.out_projectionzdecoder.\1.self_attn.o_projz\.second_sub_layer\.query_netz.encoder_attn.q_projz\.second_sub_layer\.key_netz.encoder_attn.k_projz\.second_sub_layer\.value_netz.encoder_attn.v_projz"\.second_sub_layer\.out_projectionz.encoder_attn.o_projz\.third_sub_layer\.dense_inz.mlp.fc1z\.third_sub_layer\.dense_outz.mlp.fc2z\.layer_norm_1\.z.input_layernorm.z\.layer_norm_2\.z.post_attention_layernorm.z\.layer_norm_3\.z.final_layernorm.z\.conv\.batch_normz
.conv.normzlog_softmax\.mlp\.layer0proj_outz^vision_model\.zmodel\.vision_tower\.zencoder\.layers\.zlayers\.z\.ls1z
\.lambda_1z\.ls2z
\.lambda_2z(layers\.\d+)\.attn\.proj\.z\1.attention.projection_layer.z	\.norm1\.z\.layernorm_before\.z	\.norm2\.z\.layernorm_after\.z\.embeddings\.class_embeddingz\.embeddings\.cls_tokenz \.embeddings\.position_embeddingz!\.embeddings\.position_embeddingsz\.embeddings\.patch_embedding\.z,\.embeddings\.patch_embeddings\.projection\.zmodel\.language_model\.z^language_model\.lm_head\.z	lm_head\.z
^mlp1\.0\.z*model\.multi_modal_projector\.layer_norm\.z
^mlp1\.1\.z(model\.multi_modal_projector\.linear_1\.z
^mlp1\.3\.z(model\.multi_modal_projector\.linear_2\.zattn.qkv.weight)zattention.q_proj.weightzattention.k_proj.weightzattention.v_proj.weightzattn.qkv.bias)zattention.q_proj.biaszattention.k_proj.biaszattention.v_proj.biaszLayerNorm.gammazLayerNorm.weightzLayerNorm.betazLayerNorm.biasz^cls_token$zembeddings.cls_tokenz^storage_tokens$zembeddings.register_tokensz^patch_embed\.projection\.zembeddings.patch_embeddings.zblocks\.(\d+)\.zmodel.layer.\1.zattn\.proj\.zattention.o_proj.z
attn\.wq\.zattention.q_proj.z
attn\.wk\.zattention.k_proj.z
attn\.wv\.zattention.v_proj.zattn\.q_norm\.zattention.q_norm.zattn\.k_norm\.zattention.k_norm.zattn\.gamma\.weight$zlayer_scale1.lambda1z	ffn\.w3\.zmlp.down_proj.z\.ln1\.z.norm1.z\.ln2\.z.norm2.z^ln1\.znorm.zffn\.w12\.weightzffn\.w12\.biaszmlp.gate_proj.biaszmlp.up_proj.biasz^backbone\.z%decode_head\.deconv_layers\.0\.weightz0decode_head.upsample_layers.0.convolution.weightz%decode_head\.deconv_layers\.3\.weightz0decode_head.upsample_layers.1.convolution.weightz%decode_head\.deconv_layers\.6\.weightz0decode_head.upsample_layers.2.convolution.weightz%decode_head\.deconv_layers\.9\.weightz0decode_head.upsample_layers.3.convolution.weightz*decode_head\.conv_layers\.0\.(weight|bias)z(decode_head.conv_layers.0.convolution.\1z*decode_head\.conv_layers\.3\.(weight|bias)z(decode_head.conv_layers.1.convolution.\1zdecode_head\.conv_seg\.zdecode_head.predictor.z*decode_head\.conv_layers\.6\.(weight|bias)z(decode_head.conv_layers.2.convolution.\1zdecode_head\.conv_pose\.z)decode_head\.input_conv\.0\.(weight|bias)z%decode_head.input_conv.convolution.\1z.decode_head\.upsample_blocks\.(\d+)\.0\.weightz1decode_head.upsample_layers.\1.convolution.weightz,decode_head\.upsample_blocks\.(\d+)\.0\.biasz/decode_head.upsample_layers.\1.convolution.biaszdecode_head\.conv_normal\.zdecode_head\.conv_pointmap\.z)decode_head\.scale_conv_layers\.0\.weightz+scale_head.conv_layers.0.convolution.weightz'decode_head\.scale_conv_layers\.0\.biasz)scale_head.conv_layers.0.convolution.biasz)decode_head\.scale_conv_layers\.3\.weightz+scale_head.conv_layers.1.convolution.weightz'decode_head\.scale_conv_layers\.3\.biasz)scale_head.conv_layers.1.convolution.biasz)decode_head\.scale_conv_layers\.6\.weightz+scale_head.conv_layers.2.convolution.weightz'decode_head\.scale_conv_layers\.6\.biasz)scale_head.conv_layers.2.convolution.biasz#decode_head\.scale_final_layer\.1\.z%scale_head.predictor.block1.layers.0.z#decode_head\.scale_final_layer\.3\.z%scale_head.predictor.block2.layers.0.z#decode_head\.scale_final_layer\.5\.zscale_head.predictor.proj.zdecode_head\.conv_matting\.)qianfan_ocrlegacysapiens2Sapiens2ForSemanticSegmentationSapiens2ForPoseEstimationSapiens2ForNormalEstimationSapiens2ForPointmapEstimationSapiens2ForImageMattingr   z
.weight_g$z".parametrizations.weight.original0z
.weight_v$z".parametrizations.weight.original1zbbox_attention.q_linearzbbox_attention.q_projzbbox_attention.k_linearzbbox_attention.k_projzmask_head.lay1zmask_head.conv1.convzmask_head.gn1zmask_head.conv1.normzmask_head.lay2zmask_head.conv2.convzmask_head.gn2zmask_head.conv2.normzmask_head.adapter1z"mask_head.fpn_stages.0.fpn_adapterzmask_head.lay3z"mask_head.fpn_stages.0.refine.convzmask_head.gn3z"mask_head.fpn_stages.0.refine.normzmask_head.adapter2z"mask_head.fpn_stages.1.fpn_adapterzmask_head.lay4z"mask_head.fpn_stages.1.refine.convzmask_head.gn4z"mask_head.fpn_stages.1.refine.normzmask_head.adapter3z"mask_head.fpn_stages.2.fpn_adapterzmask_head.lay5z"mask_head.fpn_stages.2.refine.convzmask_head.gn5z"mask_head.fpn_stages.2.refine.normzmask_head.out_layzmask_head.output_convDetrForSegmentationConditionalDetrForSegmentationr   z,mlp.gate.moe_statics.e_score_correction_biaszencoder.relative_position_biasshared_position_biaszGattention.attention.relative_position_bias.relative_position_bias_tablez3relative_position_bias.relative_position_bias_tablerw   pixiozpixio.r   z).block_sparse_moe.e_score_correction_biasz.mlp.e_score_correction_biasr,   zmlp.e_score_correction_biasz mlp.gate.e_score_correction_biashy_v3zmlp\.router\.gate\.weightzmlp\.expert_biaszmlp\.shared_mlp\.zmlp.shared_experts.rW   lagunaz#mlp.experts.e_score_correction_biaszmlp.shared_expert.)r   r   r   r   r	   r   r   r
   copy_MODEL_TO_CONVERSION_PATTERNitems)mapping
model_typebase_patterns      Y/home/wildlama/miniconda3/lib/python3.13/site-packages/transformers/conversion_mapping.py$_build_checkpoint_conversion_mappingr     sf$   _+HZrs ?Qk +HZrs ASo +GYpq E W
_  	 9!79M N!aL>
  7! "aL>	 +>Pde!
!_D 	.	:,h7?H5,h735GH/;>95
E_V 	'=.9)
W_\ 	,h7?H5,h735GH/;>95!
]_l 	=*EF=*CD=*EF=+6/1FG+-?@,h7?H5,h735GH/;>95
m_H 	&>@PQFH\]=*EF=*CD=*EF=+646STCL ;H(
I_j 	68JK46HI68JK-/AB	
k_v 	=?]^24HI68OP13EF/1CD13EF.0ab68ab35GH<3<3>+=>>+<=
w_T 	+^<RTt-u,vU_V 	13EF/1CD13EF=O 35GH/;>95
W_n 	=/:+-?@
o_v 	:yQ
w_| 	 z
6 +=Ode7z
8 +<N^_9z
: +<m\;z
< ?O\=z
> +<N_`?z
@ +=OabAz
B  > =Cz
J  = FKz
R +I[rsSz
T  @RkUz
Z  ASm[z
` +HZpqaz
b +J\tucz
d  @Rkez
j  9 7kz
r  8 1sz
D  H <Ez
L  Y RMz
T  W WUz
\  S J]z
d  G Jez
l  a ^mz
t  P Juz
|  N O}z
N  K COz
V  K CWz
^  J B_z
f  L Dgz
n  K Coz
v  K Cwz
~  D @z
F  D @Gz
N  C ?Oz
V  D @Wz
^  D @_z
n  F @oz
z  C M{z
B  L JCz
J  L JKz
R  L HSz
Z --! !;+2KA4FG[z
j  9 7+23kz
}_r	 	+CUef
s	_x	 	+EW`a+=Oef+;Mab+DVst	
y	_D
 	 +FXab+FXop
  ] E  Q <  N B  E G  E G  ? M  ? M  _ I  f P  b L  m ]  > <  > <  > <  > < --! !;+2KA4FG  9 7+23
 !79M N 9'A./
 97! !I'A./Il
E
_^ 	+CUkl+EW`a?L_`+DVst	
__j 	+CUef
k_p 	+CUkl+EW`a;X=J[\	
q_| 	+CUef
}_B 	+CUkl+EW`a >Pr  >Pr +DVst

C_X 	+CUef
Y_^ 	+EW`a+=Oef+;Mab+DVst+<Ncd
__n 	L.IJo_p 	,EFq_r 	+CUef
s_x 	+EW`a+=Oef?L_`?L_`+DVst
y_F 	+EW`a+=Oef+BTop
G_P 	+EW`a+=Oef+;Mab+DVst	
Q_\ 	+?Q]^
]_b 	+AS\]>K]^;X
c_l 	:GXY:~V T 6
m_| 	*:~V FXn,
}_H 	 D R  D R  C K  B J  A R  7 D  7 F  7 L  7 F  7 L  5 F  5 F  F E  D C  ; D  < E  6 8 +<N^_ < A +ASno+?Qjk42! !;+2KA4FG  @ 7+23iY
I_| 	\7OP}_~ 	G'RS_@ 	LABA_B 	=Jhi+<Npq 5Gm  6Ho +Tfqr+Witu N 8  K G!
C_l 	K,
m_x 	N+@/RSy_z 	~&;_MN{_| 	5%(5%(
}_D 	13DE35OP
E_L 	7GV]^_M_N 	 J\v +;Mcd+@RWX
O_^ 	KMghSUgh_auv
__h 	/9**! !8#  A&	 *! !5#

i_^ 	42! !;+2KA4FG  @ 7+23
__| 	 : :%at<=
  7 7%at<=
}_T 	  D :  i 2 +ASgh+ASgh+ASgh+CUij+CUij+CUij'
U_~ 	/9>+;<**! !8+2KA4FG  6 4+23
_` 	66! !D+2KA4FG  B @+23
a_~ 	>>:-/CD-/CD-/BC.0EF.0EF.0DE?A^_9;RS13IJ 3 <%1156
  1 :%1156
 !J KKM! "aL> != >02! ?WXYZ 0.!
 45! ?WXYZ
Q3
_t 	.0DE.0DE
u_| 	2J?:x0.0DE.0DE	
}_H 	:x0.0DE.0DE:<UV	
I_T 	8:NO24IJ;=de9;bc;=de9;bc24KL8:p 68n 8:p 68n 1:>8:cd8:de:<XY:<XY8:YZ?,@A;=OP6F=?UV<>ST46UV02EF 9 n!aL>
  ; t!aL>S.
U_r 	#3I%
s_x 	(+CU]^PRqrPRqrNPlmDF\]FHcdGIdeFH`aDF\]57KL*
y_P 	2J?/1CD24IJ.0DE.0DECErs?AjkCErs?Ajk<>cdCEuv?AmnCEuv?Amn<>fg9;l%!
Q_| 	2J?/1CD.0DE.0DE	
}_H 	:x0.0IJ.0IJ:<UV	
I_T 	;1-/BC4! !8+23 6! !:+23
U_x 	=;! !D+2KA4FG  I @+23
y_V 	,i89&=>+-@A7J/7L16<08%@A% !,!
 "aL>
W_B 	8E[\+;XV+;M_`7D^_7DXY ,!
 "aL>
C_b 	9;YZ8:XYUWpqIKbcDFdeH/Z>@QR46FG@B`a@B`a@B`aBDbcBDklBDbcBDbcGIghEGefGIghLNlm;=TU9;RS;=TU@BYZ9;G:KH.0DE.0MN.0DE0-@6D=
c_d  -/GH/=8]38]39;\]<)@A<)?@;=WX>@de=?no68RS8,G=*WX=*UV=*UV!2 3 q!aL>
 !0 1 k!aL>+
8  1 2  0 0	
 >+BC.0MN8:YZ-/AB?,@A=*>?=*>?=*>?,.BC,.BC24KL<):;:z2:z29h/ 3!8:O P!aL>
  1!68K L!aL>+
8 >958:m 8:m 8:m 8:m HJuvHJuv57PQ!,
& >958:m 8:m HJuvHJuvHJuv68QR&
 >95<8 AD ?B =; =; =; 8:ST5(
: >95<8 AD ?B =; =; =; :<UV<> :< <> :< <> :< ACklACklAC`ak6*
p >95<8 AD ?B =; =; =; 9;TU5$
G&_GB' ENgh',,..NH(@	
 	(@	
	 	 	02IJ02IJ')?@(>?')?@(>?+-QR')MN(LM+-QR')MN(LM+-QR')MN(LM*,CD!&G!"$ 188M0N0S0S0UG,-%k2779GNN@Bpq   #:.33579OPUA	
9 GK z*//1GGGw 23w 12}h/  $I.335GLLBDbc  $K0557GLLn-JLnopp {+002GGG'CUfg':Lij';Mbc 
 #*."9">">"@G7;#7#<#<#>>,113GHH<>`a+-BC 
 %A$F$F$H 
 %388: %I
 N    Nc                `    [         c
  [        5       q [        [         R                  U 5      5      $ )N)$_checkpoint_conversion_mapping_cacher  r   get)r  s    r
  !get_checkpoint_conversion_mappingr    s(    +3/S/U,8<<ZHIIr  c                x    [         c
  [        5       q U [         ;   a  U(       d  [        SU  S35      eU[         U '   g)a:  
Register a conversion mapping for a model type string or a class name.

Class names take priority over `model_type` strings during lookup (see
`extract_weight_conversions_for_model`), making it possible to define
task-head-specific or class-specific conversions that differ from the shared
`model_type` baseline.
NzConversion mapping for 'z4' already exists. Pass overwrite=True to replace it.)r  r  
ValueError)model_type_or_class_namer  	overwrites      r
  &register_checkpoint_conversion_mappingr    sK     ,3/S/U,#GGPY&'?&@@tu
 	
 FM()ABr  c                    [        U 5      R                  nU R                  R                  n[	        U5      nUc  U(       a  [	        U5      nU$ )a2  
Return the registered conversion list for `model`, or `None` if none exists.

Looks up by class name first (enables task-head-specific overrides), then
falls back to `model.config.model_type`.  Transforms are returned
unmodified; the caller sets `scope_prefix` on each transform for sub-module isolation.
)type__name__configr  r  )r   
class_namer  conversionss       r
  $extract_weight_conversions_for_modelr    sF     e%%J((J 4J?Kz7
Cr  c           	       ^ SSK Jn  / nUb+  UR                  5        VVs/ s H  u  pg[        XgS9PM     nnn[	        [
        5      nU R                  5        GHT  u  mn	[        X5      (       d  M  [        U	5      R                  n
U	R                  R                  n[        U4S jX    5       5      (       a  Mb  [        U
5      nUSLnU(       d3  U(       a  [        U4S jX    5       5      (       a  M  Ub  [        U5      nUc  M  TS:H  nU(       dM  TR                  U R                  5      nTR                  S5      nU H  nUUl        U R                  Ul        M     UR#                  U5        X   R%                  T5        U(       a  GM7  U(       d  GMA  X   R%                  T5        GMW     U(       a  UR#                  [        S	5      5        Ub  UR'                  U5      nU$ s  snnf )
a	  
Collect the ordered list of weight transforms for `model` (used during
loading and, when reversed, during saving).

Each `PreTrainedModel` sub-module is looked up by class name then
`model_type`.  Root transforms are applied globally; sub-module transforms
have their `scope_prefix` set so they only match keys under that prefix.  After any
sub-module is processed, both its class name and `model_type` are marked
seen to prevent `XForY` / `XModel` pairs from applying the same mapping
twice via different lookup paths.
r   r   Nr   c              3  b   >#    U  H$  oS :H  =(       d    TR                  US-   5      v   M&     g7f .N
startswith.0seenmodule_names     r
  	<genexpr>/get_model_conversion_mapping.<locals>.<genexpr>  s,     iLhDrz?[33D3J??Lh   ,/c              3  b   >#    U  H$  oS :H  =(       d    TR                  US-   5      v   M&     g7fr  r"  r$  s     r
  r(  r)  (  s.      "MiT
@k44TCZ@@Mir*  r   r!  r   )modeling_utilsr   r  r   r   listnamed_modules
isinstancer  r  r  r  anyr  removeprefixbase_model_prefixscope_prefixextendappendupdate_weight_conversions)r   key_mappinghf_quantizer
add_legacyr   weight_conversionskvseen_identifiers	submoduler  r  r  found_via_classis_root_modelr3  	transformr'  s                    @r
  get_model_conversion_mappingrB    s   " 0  _j_p_p_rs_rW[WXnQR_rs 5@4E"'"5"5"7Y)55)_--
%%00
 iL\Lhiii
 8
C%T1c "M]Mi"   %?
K#r) '33E4K4KLL&33C8L(	)5	&.3.E.E	+ ) 	!!+.$++K8
 ::(//<a #8d !!"CH"MN )CCDVWM ts   G')F)r  strr  z&list[WeightConverter | WeightRenaming]r  boolreturnNone)r   r   rE  zlist[WeightTransform] | None)NNT)
r   r   r7  zdict[str, str] | Noner8  zHfQuantizer | Noner9  rD  rE  zlist[WeightTransform])
__future__r   collectionsr   r  r   typingr   core_model_loadingr   r	   r
   r   r   r   r   r   r   r,  r   
quantizersr   r  r  r  r  r  r  rB   r  r
  <module>rM     s   # #   
 
 
 /'] y]  )] 
 []  ;]  ;]  K]  []  K]  ]  []  ;]  ]  []   +!] " k#] $ %] & k'] ( k)] * ++] , k-] . /] 0 [1] 2 +3] 4 ;5] 6 )7] 8 y9] : y;] < .=] > +?] @ /A] B +C] D -E] F $G] H I] J *K] L +M] N )O] P Q] R /S] T U] V W] X oY] Z [] \ ']] ^ _] ` ga] b c] d e] f g] h gi] j }k] l m] n mo] p mq] r ]s] t +u] v Nw] x y] z {] | |}] @ lA] B lC] D LE] F <G] H \I] J \K] L \M] N ,O] P lQ] R <S] T <U] V W] X <Y] Z %[] \ -]] ^ ,_] ` $a] b +c] d 2e] f [g] h )*Ki] l 
m] n o] p q] r *s] t y]  @sl) (, $J M!M3M M 
	M.!, *.'+	^^&^ %^ 	^
 ^r  