§
    9²¸j2  ã                   óZ   — d Z dedeedf         defd„ZdeiZdedeedf         defd„ZdS )	a¿  Rebuilding a model config from a GGUF file's metadata.

A GGUF repo ships no `config.json`: the metadata is the config, under llama.cpp's key names. One
function per architecture turns those into a transformers config dict, so a file loads on its own.

Everything the file states about the model's shape is set even where it matches the config class's
default, since those defaults are one checkpoint's values and would silently apply to another.
ÚmetadataÚtensor_names.Úreturnc                 ó¢  ‡ — ˆ fd„} |d¦  «        } |d¦  «        }‰                       dd¦  «        }i dd“dd	g“d
 |d¦  «        “d |d¦  «        “d |d¦  «        “d |d¦  «        “d |d¦  «        “d|“d |d¦  «        “d |d¦  «        “d |d¦  «        “d |d¦  «        “d |d¦  «        “d|“d |d ¦  «        |z
  “d! |d"¦  «        |z  “d# |d$¦  «        d%„  |d&¦  «        D ¦   «         d' |d(¦  «        |z  d)œ“‰ d*         d+|v‰                       d,¦  «        ‰                       d-¦  «        ‰                       d.¦  «        d/œ¥S )0zOQwen3.5: hybrid GatedDeltaNet + full attention, with an mrope and an MTP block.c                 ó   •— ‰d| › �         S )Nzqwen35.© )Únamer   s    €ú‚/root/private/project/pallet_detection_v2/.venv/lib/python3.11/site-packages/transformers/integrations/gguf/gguf_config_mapping.pyú<lambda>z _qwen35_config.<locals>.<lambda>   s   ø€ �xÐ 0¨$Ð 0Ð 0Ô1€ ó    zattention.key_lengthzssm.time_step_rankzqwen35.nextn_predict_layersé    Ú
model_typeÚqwen3_5_textÚarchitecturesÚQwen3_5ForCausalLMÚmax_position_embeddingsÚcontext_lengthÚhidden_sizeÚembedding_lengthÚintermediate_sizeÚfeed_forward_lengthÚnum_attention_headszattention.head_countÚnum_key_value_headszattention.head_count_kvÚhead_dimÚrms_norm_epsz attention.layer_norm_rms_epsilonÚfull_attention_intervalÚlinear_conv_kernel_dimzssm.conv_kernelÚlinear_key_head_dimzssm.state_sizeÚlinear_num_key_headszssm.group_countÚlinear_num_value_headsÚnum_hidden_layersÚblock_countÚlinear_value_head_dimzssm.inner_sizeÚrope_parameterszrope.freq_basec                 ó   — g | ]}|¯|‘ŒS r   r   )Ú.0Úsections     r	   ú
<listcomp>z"_qwen35_config.<locals>.<listcomp>7   s   € Ð_Ð_Ð_¨'ÐW^Ð_˜gÐ_Ð_Ð_r   zrope.dimension_sectionsTzrope.dimension_count)Ú
rope_thetaÚmrope_sectionÚmrope_interleavedÚpartial_rotary_factorztokenizer.ggml.tokenszoutput.weightztokenizer.ggml.eos_token_idztokenizer.ggml.bos_token_idztokenizer.ggml.padding_token_id)Ú
vocab_sizeÚtie_word_embeddingsÚeos_token_idÚbos_token_idÚpad_token_id)Úget)r   r   Úkeyr   Úvalue_headsÚ
mtp_layerss   `     r	   Ú_qwen35_configr5      sE  ø€ à
1Ð
1Ð
1Ð
1€CØˆsÐ)Ñ*Ô*€HØ�#Ð*Ñ+Ô+€KØ—’Ð;¸QÑ?Ô?€Jð%Ø�nð%ð 	Ð.Ð/ð	%ð
 	" 3 3Ð'7Ñ#8Ô#8ð%ð 	�s�sÐ-Ñ.Ô.ð%ð 	˜S˜SÐ!6Ñ7Ô7ð%ð 	˜s˜sÐ#9Ñ:Ô:ð%ð 	˜s˜sÐ#<Ñ=Ô=ð%ð 	�Hð%ð 	˜˜Ð>Ñ?Ô?ð%ð 	" 3 3Ð'@Ñ#AÔ#Að%ð 	! # #Ð&7Ñ"8Ô"8ð%ð 	˜s˜sÐ#3Ñ4Ô4ð%ð 	  Ð$5Ñ 6Ô 6ð%ð  	! +ð!%ð$ 	˜S˜S Ñ/Ô/°*Ñ<ð%%ð( 	   Ð%5Ñ!6Ô!6¸+Ñ!Eð)%ð* 	Ø˜#Ð.Ñ/Ô/à_Ð_°S°SÐ9RÑ5SÔ5SÐ_Ñ_Ô_Ø!%à%( SÐ)?Ñ%@Ô%@À8Ñ%Kð
ð 
ð+%ð< Ð6Ô7à.°lÐBà ŸšÐ%BÑCÔCØ ŸšÐ%BÑCÔCØ ŸšÐ%FÑGÔGðI%ð %ð %ð %r   Úqwen35c                 ó    — | d         }|t           vr(t          d|›dt          t           ¦  «        › d�¦  «        ‚t          |         | |¦  «        S )zºThe transformers config dict for a file with this metadata and these tensors.

    Raises for an architecture with no entry above; callers with a fallback check `GGUF_CONFIG_ARCHS`.
    zgeneral.architecturez9Cannot rebuild a config from a GGUF file of architecture z. Supported: ú.)ÚGGUF_CONFIG_ARCHSÚ
ValueErrorÚsorted)r   r   Úarchitectures      r	   Úget_gguf_configr=   L   sp   € ð
 Ð2Ô3€LØÕ,Ð,Ð,Ýð7Èð 7ð 7Ý Õ!2Ñ3Ô3ð7ð 7ð 7ñ
ô 
ð 	
õ ˜\Ô*¨8°\ÑBÔBÐBr   N)Ú__doc__ÚdictÚtupleÚstrr5   r9   r=   r   r   r	   ú<module>rB      s”   ððð ð,˜Tð ,°°s¸C°x´ð ,ÀTð ,ð ,ð ,ð ,ð` ˆnðÐ ð
C˜dð C°%¸¸S¸´/ð CÀdð Cð Cð Cð Cð Cð Cr   