
    <h                     J   S SK Jr  S SKJrJrJr  S SKrS SKJr  S SK	J
r
  SSKJr  SSKJrJr  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  SSKJrJr  SSKJrJ r   SSK!J"r"  SSK#J$r$J%r%J&r&J'r'J(r(  SSK)J*r*  SSK+J,r,J-r-  SSK.J/r/  \(R`                  " \15      r2\\&" SS9 " S S\$5      5       5       r3\" S5       " S S\Rh                  5      5       r5 " S S\Rh                  5      r6 " S S \Rh                  5      r7S! r8SFS" jr9S#\Rt                  S$\;S%\Rt                  4S& jr< SGS'\Rh                  S(\Rt                  S)\Rt                  S*\Rt                  S+\\Rt                     S,\=S-\=S.\"\%   4S/ jjr> " S0 S1\Rh                  5      r? " S2 S3\5      r@\&" S4S9\& " S5 S6\ 5      5       5       rA\& " S7 S8\A5      5       rB " S9 S:\Rh                  5      rC\&" S;S9 " S< S=\A\5      5       rD " S> S?\Rh                  5      rE\& " S@ SA\A5      5       rF\&" SBS9 " SC SD\A\/5      5       rG/ SEQrHg)H    )	dataclass)CallableOptionalUnionN)check_model_inputs   )ACT2FN)CacheDynamicCache)GenerationMixin)use_kernel_forward_from_hub)create_causal_mask)GradientCheckpointingLayer)BaseModelOutputWithPastCausalLMOutputWithPast)ROPE_INIT_FUNCTIONSdynamic_rope_update)ALL_ATTENTION_FUNCTIONSPreTrainedModel)Unpack)ModelOutputTransformersKwargsauto_docstringcan_return_tuplelogging   )	AutoModel   )	CsmConfigCsmDepthDecoderConfig)CsmGenerationMixinz:
    Base class for the model autoregressive outputs.
    )custom_introc                      \ rS rSr% SrSr\\R                     \	S'   Sr
\R                  \	S'   Sr\\\\R                           \	S'   Sr\\\R                  S4      \	S'   Sr\\\R                  S4      \	S	'   Sr\\R                     \	S
'   Sr\R                  \	S'   Sr\\\\R                           \	S'   Sr\\\R                  S4      \	S'   Sr\\\R                  S4      \	S'   Sr\\R                     \	S'   Srg)CsmOutputWithPast1   a	  
loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned when `labels` is provided):
    Language modeling loss (for next-token prediction).
logits (`torch.FloatTensor` of shape `(batch_size, sequence_length, config.vocab_size)`):
    Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).
past_key_values (`Cache`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
    Tuple of `tuple(torch.FloatTensor)` of length `config.n_layers`, with each tuple having 2 tensors of shape
    `(batch_size, num_heads, sequence_length, embed_size_per_head)`)

    Contains pre-computed hidden-states (key and values in the self-attention blocks) that can be used (see
    `past_key_values` input) to speed up sequential decoding.
depth_decoder_loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned when `labels` is provided):
    Language modeling loss (for next-token prediction) of the depth decoder model.
depth_decoder_logits (`torch.FloatTensor` of shape `(batch_size, sequence_length, config.vocab_size)`):
    Prediction scores of the depth decoder (scores for each vocabulary token before SoftMax).
depth_decoder_past_key_values (`tuple(tuple(torch.FloatTensor))`, *optional*, returned when `use_cache=True` is passed or when `config.use_cache=True`):
    Tuple of `tuple(torch.FloatTensor)` of length `config.n_layers`, with each tuple having 2 tensors of shape
    `(batch_size, num_heads, sequence_length, embed_size_per_head)`)
depth_decoder_hidden_states (`tuple(torch.FloatTensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
    Tuple of `torch.FloatTensor` (one for the output of the embeddings, if the model has an embedding layer, +
    one for the output of each layer) of shape `(batch_size, sequence_length, hidden_size)`.

    Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.
depth_decoder_attentions (`tuple(torch.FloatTensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
    Tuple of `torch.FloatTensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
    sequence_length)`.
backbone_loss (`torch.FloatTensor` of shape `(1,)`, *optional*, returned when `labels` is provided):
    Language modeling loss (for next-token prediction) of the backbone model.
Nlosslogitspast_key_values.hidden_states
attentionsdepth_decoder_lossdepth_decoder_logitsdepth_decoder_past_key_valuesdepth_decoder_hidden_statesdepth_decoder_attentionsbackbone_loss )__name__
__module____qualname____firstlineno____doc__r&   r   torchFloatTensor__annotations__r'   r(   tupler)   r*   r+   r,   r-   r.   r/   r0   __static_attributes__r1       \/var/www/html/shao/venv/lib/python3.13/site-packages/transformers/models/csm/modeling_csm.pyr$   r$   1   s'   < )-D(5$$
%, $FE$AEOXeE%*;*;$<=>E=AM8E%"3"3S"89:A:>Ju00#567>6:!2!23:.2%++2OS!8E%8I8I2J,K#LSKO%0A0A30F*G!HOHLhuU->->-C'DEL15M8E--.5r<   r$   RMSNormc                   8   ^  \ rS rSrSU 4S jjrS rS rSrU =r$ )
CsmRMSNormc   c                    > [         TU ]  5         [        R                  " [        R
                  " U5      5      U l        X l        g)z)
CsmRMSNorm is equivalent to T5LayerNorm
N)super__init__nn	Parameterr7   onesweightvariance_epsilon)selfhidden_sizeeps	__class__s      r=   rD   CsmRMSNorm.__init__e   s/     	ll5::k#:; #r<   c                    UR                   nUR                  [        R                  5      nUR	                  S5      R                  SSS9nU[        R                  " X0R                  -   5      -  nU R                  UR                  U5      -  $ )Nr   T)keepdim)	dtypetor7   float32powmeanrsqrtrI   rH   )rJ   r)   input_dtypevariances       r=   forwardCsmRMSNorm.forwardm   sw    #))%((7 $$Q',,R,>%H?T?T4T(UU{{]--k:::r<   c                 ^    [        U R                  R                  5       SU R                   3$ )Nz, eps=)r:   rH   shaperI   rJ   s    r=   
extra_reprCsmRMSNorm.extra_reprt   s*    ))*+6$2G2G1HIIr<   )rI   rH   )gư>)	r2   r3   r4   r5   rD   rZ   r_   r;   __classcell__rM   s   @r=   r@   r@   c   s    $;J Jr<   r@   c                   l   ^  \ rS rSrSS\4U 4S jjjr\R                  " 5       \S 5       5       r	Sr
U =r$ )CsmRotaryEmbeddingx   configc                   > [         TU ]  5         [        US5      (       aZ  [        UR                  [
        5      (       a;  UR                  R                  SUR                  R                  S5      5      U l        OSU l        UR                  U l	        UR                  U l
        Xl        [        U R                     U l        U R                  U R                  U5      u  o0l        U R                  SUSS9  U R                   U l        g )Nrope_scaling	rope_typetypedefaultinv_freqF
persistent)rC   rD   hasattr
isinstancerh   dictgetri   max_position_embeddingsmax_seq_len_cachedoriginal_max_seq_lenrf   r   rope_init_fnattention_scalingregister_bufferrl   original_inv_freq)rJ   rf   devicerl   rM   s       r=   rD   CsmRotaryEmbedding.__init__y   s    6>**z&:M:Mt/T/T#0044[&BUBUBYBYZ`BabDN&DN"("@"@$*$B$B!/?+/+<+<T[[&+Q((ZeD!%r<   c                 b   U R                   S S S 2S 4   R                  5       R                  UR                  S   SS5      R	                  UR
                  5      nUS S 2S S S 24   R                  5       n[        UR
                  R                  [        5      (       a0  UR
                  R                  S:w  a  UR
                  R                  OSn[        R                  " USS9   UR                  5       UR                  5       -  R                  SS5      n[        R                  " Xf4SS	9nUR                  5       U R                  -  nUR                  5       U R                  -  n	S S S 5        WR	                  UR                   S
9W	R	                  UR                   S
94$ ! , (       d  f       N@= f)Nr   rP   r   mpscpuF)device_typeenabledr   dim)rR   )rl   floatexpandr]   rS   rz   rp   rj   strr7   autocast	transposecatcosrw   sinrR   )
rJ   xposition_idsinv_freq_expandedposition_ids_expandedr   freqsembr   r   s
             r=   rZ   CsmRotaryEmbedding.forward   sR    !MM$4-8>>@GGHZHZ[\H]_acdehhijiqiqr ,QaZ 8 > > @'1!((--'E'E!((--[`J`ahhmmfk^^UC&,,.1F1L1L1NNYYZ[]^_E))UN3C'')d444C'')d444C	 D vvAGGv$cff177f&;;; DCs   $BF  
F.)rw   rf   rt   ry   ru   rv   ri   N)r2   r3   r4   r5   r   rD   r7   no_gradr   rZ   r;   ra   rb   s   @r=   rd   rd   x   s6    /y / /" ]]_<  <r<   rd   c                   .   ^  \ rS rSrU 4S jrS rSrU =r$ )CsmMLP   c                   > [         TU ]  5         Xl        UR                  U l        UR                  U l        [
        R                  " U R                  U R                  UR                  S9U l        [
        R                  " U R                  U R                  UR                  S9U l	        [
        R                  " U R                  U R                  UR                  S9U l
        [        UR                     U l        g )Nbias)rC   rD   rf   rK   intermediate_sizerE   Linearmlp_bias	gate_projup_proj	down_projr	   
hidden_actact_fnrJ   rf   rM   s     r=   rD   CsmMLP.__init__   s    !--!'!9!94#3#3T5K5KRXRaRabyy!1!143I3IPVP_P_`4#9#94;K;KRXRaRabV../r<   c                     U R                  U R                  U R                  U5      5      U R                  U5      -  5      nU$ r   )r   r   r   r   )rJ   r   r   s      r=   rZ   CsmMLP.forward   s6    NN4;;t~~a/@#ADLLQRO#ST	r<   )r   rf   r   r   rK   r   r   r2   r3   r4   r5   rD   rZ   r;   ra   rb   s   @r=   r   r      s    0 r<   r   c                     U SSU R                   S   S-  24   nU SU R                   S   S-  S24   n[        R                  " U* U4SS9$ )z*Rotates half the hidden dims of the input..NrP   r   r   )r]   r7   r   )r   x1x2s      r=   rotate_halfr      sZ    	
3"!''"+"""	#B	
3q ""	#B99rc2YB''r<   c                     UR                  U5      nUR                  U5      nX-  [        U 5      U-  -   nX-  [        U5      U-  -   nXg4$ )a  Applies Rotary Position Embedding to the query and key tensors.

Args:
    q (`torch.Tensor`): The query tensor.
    k (`torch.Tensor`): The key tensor.
    cos (`torch.Tensor`): The cosine part of the rotary embedding.
    sin (`torch.Tensor`): The sine part of the rotary embedding.
    position_ids (`torch.Tensor`, *optional*):
        Deprecated and unused.
    unsqueeze_dim (`int`, *optional*, defaults to 1):
        The 'unsqueeze_dim' argument specifies the dimension along which to unsqueeze cos[position_ids] and
        sin[position_ids] so that they can be properly broadcasted to the dimensions of q and k. For example, note
        that cos[position_ids] and sin[position_ids] have the shape [batch_size, seq_len, head_dim]. Then, if q and
        k have the shape [batch_size, heads, seq_len, head_dim], then setting unsqueeze_dim=1 makes
        cos[position_ids] and sin[position_ids] broadcastable to the shapes of q and k. Similarly, if q and k have
        the shape [batch_size, seq_len, heads, head_dim], then set unsqueeze_dim=2.
Returns:
    `tuple(torch.Tensor)` comprising of the query and key tensors rotated using the Rotary Position Embedding.
)	unsqueezer   )qkr   r   r   unsqueeze_dimq_embedk_embeds           r=   apply_rotary_pos_embr      sS    ( --
&C
--
&Cw;q>C/0Gw;q>C/0Gr<   r)   n_repreturnc                     U R                   u  p#pEUS:X  a  U $ U SS2SS2SSS2SS24   R                  X#XU5      n U R                  X#U-  XE5      $ )z
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch,
num_key_value_heads, seqlen, head_dim) to (batch, num_attention_heads, seqlen, head_dim)
r   N)r]   r   reshape)r)   r   batchnum_key_value_headsslenhead_dims         r=   	repeat_kvr      s_    
 2?1D1D.Ez!!Qa"23::5W\dlmM  e(CTTTr<   modulequerykeyvalueattention_maskscalingdropoutkwargsc                 @   [        X R                  5      n[        X0R                  5      n	[        R                  " XR	                  SS5      5      U-  n
Ub"  US S 2S S 2S S 2S UR
                  S   24   nX-   n
[        R                  R                  U
S[        R                  S9R                  UR                  5      n
[        R                  R                  XU R                  S9n
[        R                  " X5      nUR	                  SS5      R                  5       nX4$ )Nr   r   rP   )r   rR   )ptrainingr   )r   num_key_value_groupsr7   matmulr   r]   rE   
functionalsoftmaxrT   rS   rR   r   r   
contiguous)r   r   r   r   r   r   r   r   
key_statesvalue_statesattn_weightscausal_maskattn_outputs                r=   eager_attention_forwardr      s     3 ; ;<JU$?$?@L<<';';Aq'ABWLL!$Q1.D
0@0@0D.D%DE#1==((2U]](SVVW\WbWbcL==((6??([L,,|:K''1-88:K$$r<   c                     ^  \ rS rSrSrS\S\4U 4S jjr  SS\R                  S\
\R                  \R                  4   S\\R                     S	\\   S
\\R                     S\\   S\
\R                  \R                  4   4S jjrSrU =r$ )CsmAttention   z=Multi-headed attention from 'Attention Is All You Need' paperrf   	layer_idxc                 P  > [         TU ]  5         Xl        X l        [	        USUR
                  UR                  -  5      U l        UR                  UR                  -  U l	        U R                  S-  U l
        UR                  U l        SU l        [        R                  " UR
                  UR                  U R                  -  UR                  S9U l        [        R                  " UR
                  UR                  U R                  -  UR                  S9U l        [        R                  " UR
                  UR                  U R                  -  UR                  S9U l        [        R                  " UR                  U R                  -  UR
                  UR                  S9U l        g )Nr   g      Tr   )rC   rD   rf   r   getattrrK   num_attention_headsr   r   r   r   attention_dropout	is_causalrE   r   attention_biasq_projk_projv_projo_projrJ   rf   r   rM   s      r=   rD   CsmAttention.__init__   sI   "
F4F4F&JdJd4de$*$>$>&B\B\$\!}}d*!'!9!9ii : :T]] JQWQfQf
 ii : :T]] JQWQfQf
 ii : :T]] JQWQfQf
 ii&&68J8JQWQfQf
r<   r)   position_embeddingsr   past_key_valuecache_positionr   r   c                 4   UR                   S S n/ UQSPU R                  P7nU R                  U5      R                  U5      R	                  SS5      n	U R                  U5      R                  U5      R	                  SS5      n
U R                  U5      R                  U5      R	                  SS5      nUu  p[        XX5      u  pUb$  XUS.nUR                  XU R                  U5      u  p[        nU R                  R                  S:w  a  [        U R                  R                     nU" U U	U
UU4U R                  (       d  SOU R                  U R                   S.UD6u  nnUR"                  " / UQSP76 R%                  5       nU R'                  U5      nUU4$ )NrP   r   r   )r   r   r   eager        )r   r   )r]   r   r   viewr   r   r   r   updater   r   rf   _attn_implementationr   r   r   r   r   r   r   )rJ   r)   r   r   r   r   r   input_shapehidden_shapequery_statesr   r   r   r   cache_kwargsattention_interfacer   r   s                     r=   rZ   CsmAttention.forward  s    $))#2.88b8$--8{{=166|DNNqRST[[/44\BLLQPQR
{{=166|DNNqRST&#7RU#[ %#&nUL'5'<'<ZW[WeWegs't$J(?;;++w6"9$++:Z:Z"[$7	%
  $}}C$2H2HLL	%
 	%
!\ "));;;;FFHkk+.L((r<   )r   rf   r   r   r   r   r   r   r   r   r   )NN)r2   r3   r4   r5   r6   r   intrD   r7   Tensorr:   r   r
   
LongTensorr   r   rZ   r;   ra   rb   s   @r=   r   r      s    G
y 
S 
8 +/59))||)) #5<<#=>)) !.	))
 !)) !!1!12)) +,)) 
u||U\\)	*)) ))r<   r   c                   8  ^  \ rS rSrS\S\4U 4S jjr      SS\R                  S\	\R                     S\	\R                     S\	\   S	\	\   S
\	\R                     S\	\\R                  \R                  4      S\\   S\\R                     4S jjrSrU =r$ )CsmDecoderLayeri8  rf   r   c                   > [         TU ]  5         UR                  U l        [        XS9U l        [        U5      U l        [        UR                  UR                  S9U l	        [        UR                  UR                  S9U l
        g )N)rf   r   rL   )rC   rD   rK   r   	self_attnr   mlpr@   rms_norm_epsinput_layernormpost_attention_layernormr   s      r=   rD   CsmDecoderLayer.__init__9  si    !--%VI&>)&*<*<&BUBUV(263E3E6K^K^(_%r<   r)   r   r   r   	use_cacher   r   r   r   c                     Un	U R                  U5      nU R                  " SUUUUUUUS.UD6u  pX-   nUn	U R                  U5      nU R                  U5      nX-   nU$ )N)r)   r   r   r   r   r   r   r1   )r   r   r   r   )rJ   r)   r   r   r   r   r   r   r   residual_s              r=   rZ   CsmDecoderLayer.forwardC  s     !,,];>> 	
')%)) 3	
 	
 !0 !55mD/ 0r<   )rK   r   r   r   r   )NNNFNN)r2   r3   r4   r5   r   r   rD   r7   r   r   r   r
   boolr:   r   r   rZ   r;   ra   rb   s   @r=   r   r   8  s    `y `S ` 2637*.$)59KO|| !. u//0	
 ! D> !!1!12 &eELL%,,,F&GH +, 
u||	 r<   r   z[
    The bare Csm Model outputting raw hidden-states without any specific head on top.
    c                   b   ^  \ rS rSr% \\S'   SrSrS/rS/r	Sr
SrSrSr\\S.rU 4S jrS	rU =r$ )
CsmPreTrainedModelie  rf   modelTr   r(   )r)   r*   c                   > [         TU ]  U5        [        U[        5      (       a]  UR                  n[        US-
  5       H>  nUR                  R                  U   R                  SU R                  R                  S9  M@     g g )Nr   r   )rV   std)rC   _init_weightsrp   CsmCodebooksHeadnum_codebooksrangerH   datanormal_rf   initializer_range)rJ   r   r  irM   s       r=   r
   CsmPreTrainedModel._init_weights}  sn    f%f.//"00M=1,-""1%--3DKK<Y<Y-Z . 0r<   r1   )r2   r3   r4   r5   r   r9   base_model_prefixsupports_gradient_checkpointing_no_split_modules_skip_keys_device_placement_supports_flash_attn_supports_sdpa_can_compile_fullgraph_supports_attention_backendr   r   _can_record_outputsr
  r;   ra   rb   s   @r=   r  r  e  s\     &*#*+#4"5N ""&("
[ [r<   r  c                   @  ^  \ rS rSr% \\S'   U 4S jr\\        SS\	R                  S\\	R                     S\\	R                     S\\	R                     S\\   S	\\	R                     S
\\   S\\	R                     S\\   S\\\4   4S jj5       5       rSrU =r$ )CsmDepthDecoderModeli  rf   c           	      h  > [         TU ]  U5        UR                  U l        UR                  U l        [
        R                  " UR                  UR                  -  UR                  5      U l	        [
        R                  " [        UR                  5       Vs/ sH  n[        X5      PM     sn5      U l        [        UR                   UR"                  S9U l        ['        US9U l        SU l        [
        R,                  " UR                  UR                   SS9U l        U R1                  5         g s  snf )Nr   rf   Fr   )rC   rD   pad_token_idpadding_idx
vocab_sizerE   	Embeddingr  backbone_hidden_sizeembed_tokens
ModuleListr  num_hidden_layersr   layersr@   rK   r   normrd   
rotary_embgradient_checkpointingr   inputs_embeds_projector	post_initr   s      r=   rD   CsmDepthDecoderModel.__init__  s     !.. ++LL&*>*>ARAR*RU[UpUpqmmAFvG_G_A`aA`I_V/A`a
 v11v7J7JK	,F;&+#')yy1L1LfN`N`gl'm$ 	 bs   D/	input_idsbackbone_last_hidden_stater   r   r(   inputs_embedsr   r   r   r   c	                 (   Ub:  [         R                  R                  5       (       d  [        R	                  S5        SnUSL USL-  (       a  [        S5      eU(       a  Uc
  [        5       nUci  Ub  UR                  5       OSn
Ub  UR                  S   OUR                  S   nUb  UR                  OUR                  n[         R                  " XU-   US9nUc  [         R                  " US-
  SS9nXR                  -  nU R                  X-   5      nUS   S:H  nUb	  X&SS2S4'   O?[         R                  R                  5       (       d  U(       a  [        R                  S5        U R                  U5      n[!        U R"                  UUUUUS	9nUnUR%                  S5      nU R'                  UU5      nU R(                  SU R"                  R*                    H  nU" U4UUUUUUS
.U	D6nM     U R-                  U5      n[/        UU(       a  US9$ SS9$ )a*  
backbone_last_hidden_state (`torch.FloatTensor` of shape `(batch_size, backbone_hidden_size)`, *optional*):
    The last hidden state of the backbone model. Such input is required when the first codebook token (the one generated by the backbone model)
    is provided in the `input_ids` argument.
NzCustom `position_ids` were provided but will be ignored. CSM depth decoder automatically determines position_ids from `cache_position` and as it requires them to be identical across the batch, the provided position_ids will be ignored.z;You must specify exactly one of input_ids or inputs_embeds.r   r   rz   )minzvWhen the first codebook token is provided, `backbone_last_hidden_state` should also be provided for correct inference.rf   input_embedsr   r   r(   r   )r   r   r   r   r   r   last_hidden_stater(   )r7   compileris_compilingloggerwarning_once
ValueErrorr   get_seq_lengthr]   rz   arangeclampr"  r%  warningr,  r   rf   r   r*  r(  r'  r)  r   )rJ   r/  r0  r   r   r(   r1  r   r   r   past_seen_tokensinputs_seq_lengthrz   codebook_idxsoffsetinput_ids_are_first_codebookr   r)   r   decoder_layers                       r=   rZ   CsmDepthDecoderModel.forward  s7   & #ENN,G,G,I,IM  L-t";<Z[[0*nO!CRC^==?de:G:S 3 3A 6YbYhYhijYk-:-F]))IL\L\F"\\*:O`<`iopN !KK(:BM"__4F --i.@AM+9!+<+A()5&@ad#~~22449UNN Q 44]C(;;&))+%
 & &//2"oom\J![[)H4;;+H+HIM)	*).#-$7	 	M J 		-0&+/8O
 	
>B
 	
r<   )r%  r+  r,  r(  r)  r!  r*  r"  )NNNNNNNN)r2   r3   r4   r5   r    r9   rD   r   r   r7   r   r   r8   r   r
   r  r   r   r   r:   r   rZ   r;   ra   rb   s   @r=   r  r    s   !!   '+BF1537+/59$(59R
##R
 %-U->->$?R
 !.	R

 u//0R
 "%R
   1 12R
 D>R
 !!1!12R
 +,R
 
u--	.R
  R
r<   r  c                   2   ^  \ rS rSrU 4S jrSS jrSrU =r$ )r  i  c                    > [         TU ]  5         X l        [        R                  " [
        R                  " U R                  S-
  X5      5      U l        g Nr   )rC   rD   r  rE   rF   r7   emptyrH   )rJ   rK   r  r"  rM   s       r=   rD   CsmCodebooksHead.__init__  s:    *ll5;;t/A/AA/E{#_`r<   c           
         Uc3  UR                   S   nU R                  [        R                  " U5         nOUS-
  nU R                  U   n[	        UR                   S   5       Vs/ sH9  n[
        R                  R                  US S 2US S 24   XF   R                  5      PM;     nn[        R                  " USS9nU$ s  snf )Nr   r   r   )
r]   rH   r7   r?  r  rE   r   linearTstack)rJ   r)   r   
seq_lengthcodebook_weightrD  codebook_idxs          r=   rZ   CsmCodebooksHead.forward  s    !&,,Q/J"kk%,,z*BCO*Q.M"kk-8O !&o&;&;A&> ?
 ? MM  q,/A!BODaDcDcd ? 	 
 Mq9
s   %?B=)r  rH   r   r   rb   s   @r=   r  r    s    a
 r<   r  a$  
    The CsmDepthDecoder Model transformer, with a [`CsmCodebooksHead`] on top,
    which can be seen a position-specific language modeling head, allowing to use a different linear layer for each codebook
    (e.g. position 0 is the first codebook and uses the first codebook head, etc.)
    c                   L  ^  \ rS rSrSrSrSrU 4S jrS rS r	\
\          SS\R                  S\\R                     S\\R                      S	\\R                     S
\\\\\R                     4      S\\R                     S\\R                     S\\   S\\R                     S\\\R                   4   S\\   S\\\4   4S jj5       5       r    SS\R                  S
\\   S\\R                     S\\R                     S\\R                     4
U 4S jjjrSrU =r$ )CsmDepthDecoderForCausalLMi  Nc                    > [         TU ]  U5        [        U5      U l        UR                  U l        [        UR                  UR                  UR                  5      U l        U R                  5         g r   )
rC   rD   r  r  r"  r  rK   r  codebooks_headr-  r   s     r=   rD   #CsmDepthDecoderForCausalLM.__init__  sY     )&1
 ++.v/A/A6CWCWY_YjYjk 	r<   c                     Xl         g r   r  )rJ   decoders     r=   set_decoder&CsmDepthDecoderForCausalLM.set_decoder  s    
r<   c                     U R                   $ r   r\  r^   s    r=   get_decoder&CsmDepthDecoderForCausalLM.get_decoder  s    zzr<   r/  r0  r   r   r(   r1  labelsr   r   logits_to_keepr   r   c                    U R                   " SUUUUUUUU	S.UD6nUS   n[        U
[        5      (       a!  U
S:X  a  [        SS5      nO[        U
* S5      nOU
nU R	                  USS2USS24   U	b  X   OS5      nUR                  5       nSnUbB  USSS24   R                  5       nU R                  " SUSU R                  R                  US.UD6n[        UUUR                  UR                  UR                  S9$ )	a  
backbone_last_hidden_state (`torch.FloatTensor` of shape `(batch_size, backbone_hidden_size)`, *optional*):
    The last hidden state of the backbone model. Such input is required when the first codebook token (the one generated by the backbone model)
    is provided in the `input_ids` argument.
labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
    Labels for computing the masked language modeling loss. Indices should either be in `[0, ...,
    config.vocab_size]` or -100 (see `input_ids` docstring). Tokens with indices set to `-100` are ignored
    (masked), the loss is only computed for the tokens with labels in `[0, ..., config.vocab_size]`.
)r/  r0  r   r   r(   r1  r   r   r   r   N.)r'   rc  r"  shift_labels)r&   r'   r(   r)   r*   r1   )r  rp   r   slicerY  r   loss_functionrf   r"  r   r(   r)   r*   )rJ   r/  r0  r   r   r(   r1  rc  r   r   rd  r   outputsr)   slice_indicesr'   r&   rf  s                     r=   rZ   "CsmDepthDecoderForCausalLM.forward"  s8   2 ** 

'A)%+')

 

  
nc**" %a %~ot <*M$$!]A-.Q_Qk0Mqu
 ""$!#qr'?557L%% dt{{7M7M\hlrD &#33!//))
 	
r<   c                    > [         T	U ]  " XX4U40 UD6nUS   S   S:H  nU(       d  UR                  S5        UR                  S5        U$ )Nr   r   r0  r   )rC   prepare_inputs_for_generationpop)
rJ   r/  r(   r   r1  r   r   model_inputsis_first_generation_steprM   s
            r=   rm  8CsmDepthDecoderForCausalLM.prepare_inputs_for_generationf  sc     w<~
Y_
 $00@#A!#D#I '9: 	(r<   )rY  r  r"  )
NNNNNNNNNr   NNNN)r2   r3   r4   r5   _tied_weights_keys_tp_plan_pp_planrD   r^  ra  r   r   r7   r   r   r8   r   r   r
   listr  r   r   r   r:   r   rZ   rm  r;   ra   rb   s   @r=   rW  rW    s    HH  '+BF1537KO59-1$(5934@
##@
 %-U->->$?@
 !.	@

 u//0@
 "%tE4E4E/F(F"GH@
   1 12@
 ))*@
 D>@
 !!1!12@
 c5<</0@
 +,@
 
u,,	-@
  @
J ,0595959## "% !!1!12	
   1 12 !!1!12 r<   rW  c                   .   ^  \ rS rSrU 4S jrS rSrU =r$ )CsmBackboneModelEmbeddingsi}  c                   > [         TU ]  5         [        R                  " UR                  UR
                  -  UR                  5      U l        U R                  S[        R                  " UR                  5      UR
                  -  SS9  g )Naudio_tokens_offsetsFrm   )rC   rD   rE   r#  r  r"  rK   embed_audio_tokensrx   r7   r?  r   s     r=   rD   #CsmBackboneModelEmbeddings.__init__~  sn    "$,,0D0DvGXGX0X[a[m[m"n"ELL1E1E$FIZIZ$Zgl 	 	
r<   c                 ^    U R                  XR                  -   5      nUR                  SS9nU$ )Nr   r   )r{  rz  sum)rJ   r/  r6  s      r=   rZ   "CsmBackboneModelEmbeddings.forward  s4    ..y;T;T/TU#''A'.r<   )r{  r   rb   s   @r=   rx  rx  }  s    
 r<   rx  c                     ^  \ rS rSrU 4S jr\\       SS\\R                     S\\R                     S\\R                     S\\   S\\R                     S\\R                     S	\\   S
\\   S\4S jj5       5       rSrU =r$ )CsmBackboneModeli  c           	        > [         TU ]  U5        UR                  U l        UR                  U l        [        U5      U l        [        R                  " [        UR                  5       Vs/ sH  n[        X5      PM     sn5      U l        [        UR                  UR                  S9U l        [#        US9U l        SU l        U R)                  5         g s  snf )Nr   r  F)rC   rD   r   r!  r"  rx  r%  rE   r&  r  r'  r   r(  r@   rK   r   r)  rd   r*  r+  r-  r   s      r=   rD   CsmBackboneModel.__init__  s     !.. ++6v>mmAFvG_G_A`aA`I_V/A`a
 v11v7J7JK	,F;&+# 	 bs   *Cr/  r   r   r(   r1  r   r   r   r   c           
      8   USL USL-  (       a  [        S5      eUc  U R                  U5      nU(       a  Uc
  [        5       nUcD  Ub  UR                  5       OSn	[        R
                  " XUR                  S   -   UR                  S9nUc  UR                  S5      n[        U R                  UUUUUS9n
UnU R                  X5      nU R                  SU R                  R                    H  nU" U4U
UUUUS.UD6nM     U R                  U5      n[        UUS9$ )	a  
input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length, num_codebooks) or (batch_size, sequence_length)`):
    1. (batch_size, sequence_length): corresponds to the input sequence prepared with the processor from the text prompt. Such input
    requires `input_values` to be provided so that audio can be encoded in codebook tokens and then merged with the text tokens.

    2. (batch_size, sequence_length, num_codebooks): codebook tokens generated during the autoregressive decoding. Such input is not meant to be used by end users.

    Indices can be obtained using [`AutoTokenizer`]. See [`PreTrainedTokenizer.encode`] and
    [`PreTrainedTokenizer.__call__`] for details.

    [What are input IDs?](../glossary#input-ids)
Nz:You must specify exactly one of input_ids or inputs_embedsr   r   r3  r5  )r   r   r   r   r   r7  )r=  r%  r   r>  r7   r?  r]   rz   r   r   rf   r*  r(  r'  r)  r   )rJ   r/  r   r   r(   r1  r   r   r   rB  r   r)   r   rG  s                 r=   rZ   CsmBackboneModel.forward  sK   2 -t";<YZZ *.*;*;I*FM0*nO!CRC^==?de+0<< ]5H5H5K"KTaThTh,N )33A6L(;;&))+%
 &"oomJ![[)H4;;+H+HIM)*).-$7 M J 		-0&++
 	
r<   )r%  r+  r(  r)  r!  r*  r"  )NNNNNNN)r2   r3   r4   r5   rD   r   r   r   r7   r   r   r
   r8   r  r   r   r   rZ   r;   ra   rb   s   @r=   r  r    s      151537+/5959$(D
E,,-D
 !.D
 u//0	D

 "%D
   1 12D
 !!1!12D
 D>D
 +,D
 
!D
  D
r<   r  z
    The Csm model consists of two llama-like auto-regressive transformer models: a backbone model that predicts the first codebook token and a depth decoder that predicts the other codebook tokens.
    c                   <  ^  \ rS rSrSS/rU 4S jrS rS rS r\	U 4S j5       r
U 4S	 jr    SS
\\R                     S\\R                     S\\R                     S\\R                     S\\R                     4
S jjr    SS
\R                   S\\   S\\R                      S\\R$                     S\\R                      4
U 4S jjjr\\           SS
\R                   S\\R                     S\\R                     S\\R                     S\\R                      S\\\\\R$                     4      S\\R$                     S\\R                      S\\   S\\R                      S\\\R                  4   S\\   S\\\4   4S jj5       5       rSrU =r $ )CsmForConditionalGenerationi  z5backbone_model.embed_tokens.embed_audio_tokens.weightz'depth_decoder.model.embed_tokens.weightc                   > [         TU ]  U5        UR                  U l        [        R                  " UR
                  UR                  SS9U l        [        R                  " UR                  UR
                  5      U l	        [        R                  U5      U l        [        R                  UR                  5      U l        [         R"                  " UR$                  5      U l        U R)                  5         g )NFr   )rC   rD   r"  rE   r   rK   lm_headr#  text_vocab_sizeembed_text_tokensr  _from_configbackbone_modelrW  depth_decoder_configdepth_decoderr   from_configcodec_configcodec_modelr-  r   s     r=   rD   $CsmForConditionalGeneration.__init__  s      ++yy!3!3V5F5FUS!#f.D.DfFXFX!Y.;;FC7DDVE`E`a$001D1DEr<   c                 .    U R                   R                  $ r   r  r%  r^   s    r=   get_input_embeddings0CsmForConditionalGeneration.get_input_embeddings  s    ""///r<   c                 $    XR                   l        g r   r  )rJ   r   s     r=   set_input_embeddings0CsmForConditionalGeneration.set_input_embeddings  s    +0(r<   c                     U R                   R                  (       aO  U R                  U R                  R                  R
                  U R                  R                  R                  5        g g r   )rf   tie_codebooks_embeddings_tie_or_clone_weightsr  r%  r{  r  r  r^   s    r=   _tie_weights(CsmForConditionalGeneration._tie_weights   sL    ;;//&&##00CC""((55 0r<   c                   > UR                  SS5      (       a  [        T
U ]  " U0 UD6u  p4O[        T
U ]  " U0 UD6nSn[        U5      n[	        UR
                  5      R                  5        VVs0 sH"  u  pxUR                  U5      (       d  M  XvS  U_M$     n	nn[	        UR                  R
                  5      R                  SS0U	E5        U	 H  n[        UR
                  XW-   5        M     SU;   a  UW4$ U$ s  snnf )Noutput_loading_infoFdepth_decoder__from_model_config)rr   rC   from_pretrainedlenvarsgeneration_configitems
startswithr  r   delattr)clsargsr   r  loading_infoprefix
prefix_lenattrr   depth_decoder_attrsrM   s             r=   r  +CsmForConditionalGeneration.from_pretrained  s   ::+U33"''"94"J6"JE<G+T<V<E "[
  $E$;$;<BBD
Dv& %Du$D 	 
 	U  223::<PRW;o[n;op (DE++V]; ( !F*,&&L
s   /C9	C9c                    > SnU R                   R                  R                  5       nUR                  SS 5        UR	                  5        H  u  pV[        U R                  X5-   U5        M      [        TU ]  " U0 UD6  g )Nr  transformers_version)r  r  to_diff_dictrn  r  setattrrC   save_pretrained)rJ   r  r   r  r  r  r   rM   s          r=   r  +CsmForConditionalGeneration.save_pretrained"  sq    !"00BBOOQ 6=.446KDD**FM5A 7 	00r<   r/  input_valuesinput_values_cutoffsrc  r   c                    U R                  U5      nUGbM  [        R                  R                  US5      nX3S:     R	                  5       nXfS:     n[
        R                  " UR                  5       UR                  S9R                  [        U5      S5      nXvR                  S5      :  n[
        R                  " 5          / n[        X#5       H  u  pXS:     n
[        U
R                  S   S-
  5       Hp  nX   nXS-      nU	SX24   nU R                   R#                  UR                  S5      5      nUR$                  R'                  SS5      nUR)                  US   5        Mr     M     [        S U 5       5      n[
        R*                  " U Vs/ sH7  n[        R                  R                  USSSUUR                  S   -
  45      PM9     sn5      nU R                   R-                  U5      nSSS5        U R.                  R0                  nUU:H  nU R2                  R5                  W5      nUW   UU'   [
        R6                  " SSU R.                  R8                  4UR                  [
        R:                  S	9U R.                  R<                  -  nU R2                  R5                  U5      R?                  S5      nXR.                  R@                  :H  nURC                  URE                  5       S5      UU'   Ubg  UR                  S5      RC                  SSU R.                  R8                  5      nUU   UU'   UUU'   US
:H  RG                  SS9nSUUS   US   SS24'   UnXTS.$ s  snf ! , (       d  f       GN= f)a8  
Merges the input_ids and input_values to produce a single inputs_embeds tensor:
1 - Infers the codec model on the input_values to retreive codebook token.
2 - Embeds codebook tokens and places them at the correct positions in the inputs_embeds tensor.
3 - If labels are provided, expands them to match codebook dimensions and position the target codebook tokens in the inputs_embeds tensor.

Args:
    input_ids (`torch.Tensor` of shape `(batch_size, sequence_length)`):
        The input ids to embed.
    input_values (`torch.Tensor` of shape `(batch_size, channels, audio_sequence_length)`):
        The audio input values to embed.
    input_values_cutoffs (`torch.Tensor` of shape `(batch_size, max_num_audio)`):
        The cutoffs of the audio input values relative to its batch index, padded with -1 when no audio.
Nr   r   r   r3  rP   r   .c              3   <   #    U H  oR                   S    v   M     g7f)r   N)r]   ).0els     r=   	<genexpr>QCsmForConditionalGeneration._merge_input_ids_with_input_values.<locals>.<genexpr>\  s     &O=Nrxx{=Ns   )rz   rR   iTas_tuple)r1  rc  )$r  rE   r   paddiffr7   r?  maxrz   r   r  r   r   zipr  r]   r  encodeaudio_codesr   appendrQ  get_audio_codes_maskrf   audio_token_idr  r%  rG   r  longcodebook_eos_token_idsqueezeaudio_eos_token_idrepeatr~  nonzero)rJ   r/  r  r  rc  r1  audio_lengthsinput_values_maskaudio_tokens_listbatch_input_valuesbatch_input_values_cutoffsr  	start_idxend_idxaudio_batchcodec_outputscodebook_idsmax_audio_framesr  batched_audio_token_idsaudio_codes_maskr  audio_token_maskaudio_embedsaudio_eos_frame_idsaudio_eos_embedsaudio_eos_token_masklabels_expanded depth_decoder_ignore_frames_idxss                                r=   "_merge_input_ids_with_input_values>CsmForConditionalGeneration._merge_input_ids_with_input_values,  su   * ..y9##%==#4#45I6#R 01JKPPRM)!*;<M %-A-E-E-GP\PcPc d k kM"B! !24K4KA4N N
 $&!FI,FmB&1KjkLk1l."#=#C#CA#F#JK$>$A	"<U"C&8i>O9O&P(,(8(8(?(?@U@UVW@X(Y'4'@'@'J'J1b'Q)00aA L Gn $'&O=N&O#O */++`qr`qZ\R]]&&rAq!5EQR5S+TU`qr+' $(#3#3#H#HIZ#[ ! !$ "[[77N(N:..;;<STL.:;K.LM*+ 

Aq$++";";<YEUEU]b]g]gh++334    $22??@ST\\]^_#,0N0N#N 2B2I2IJ^JbJbJdfg2hM./ !"("2"22"6"="=aDKKD]D]"^4KL\4] 018K 454:dN3K3KUY3K3Z0pt @ CEefgEhjkjl lm(!.AA= s !s    CM,=M'
"M,'M,,
M;r(   r   r1  r   c           	      2  > [         T	U ]  " S	UUUUUS.UD6nUb|  UR                  S:X  al  UR                  S5      cZ  U R	                  UUR                  S5      UR                  S5      UR                  S5      S9nUR                  US   US   S S.5        U$ )
N)r/  r(   r   r1  r   r   r1  r  r  rc  )r/  r  r  rc  )r1  rc  r/  r1   )rC   rm  ndimrr   r  r   )
rJ   r/  r(   r   r1  r   r   ro  merged_inputsrM   s
            r=   rm  9CsmForConditionalGeneration.prepare_inputs_for_generation~  s     w< 
+)')
 
  Y^^q%8\=M=Mo=^=f CC##ZZ7%+ZZ0F%Gzz(+	 D M "/"@MZbLcrvw r<   r   r   rd  r   c                    Ub.  UR                   S:X  a  U R                  XXH5      nUS   nUS   nSnU R                  " SUUUUUU	U
S.UD6nUS   n[        U[        5      (       a  [        U* S5      OUnU R                  USS2USS24   5      nSnSnSnSnUb  USS2SS2S4   nU R                  " SUUU R                  R                  S.UD6nUSS2SS2SS24   S	:H  R                  S
S9) nUU   SSU R                  R                  S-
  24   n[        R                  R                  USSS9nUR                  SS9nUUS   US   S-
  SS24   nUU   nU R                   " SUUU	SUS.UD6nUR"                  nUU-   n[%        UUUUUR&                  UR(                  UR*                  Ub  UR,                  OSUb  UR&                  OSUb  UR(                  OSUb  UR*                  S9$ SS9$ )a_  
input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length, num_codebooks) or (batch_size, sequence_length)`):
    1. (batch_size, sequence_length): corresponds to the input sequence prepared with the processor from the text prompt. Such input
    requires `input_values` to be provided so that audio can be encoded in codebook tokens and then merged with the text tokens.

    2. (batch_size, sequence_length, num_codebooks): codebook tokens generated during the autoregressive decoding. Such input is not meant to be used by end users.

    Indices can be obtained using [`AutoTokenizer`]. See [`PreTrainedTokenizer.encode`] and
    [`PreTrainedTokenizer.__call__`] for details.

    [What are input IDs?](../glossary#input-ids)
input_values_cutoffs (`torch.Tensor` of shape `(batch_size, max_num_audio)`, *optional*):
    Specify the end positions of audio segments within each batch entry, relative to the concatenated audio input.
    If a batch entry has fewer segments than the maximum, it is padded with -1. For example, in a batch of 2 sequences
    where the first contains 2 audio segments of length l1, and the second contains 1 audio segment of length l2,
    the input_values_cutoffs would be: [[l1, 2 * l1], [l2, -1]].
labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*):
    Labels for computing the masked language modeling loss. Indices should be in `[config.audio_token_id, -100, -101]`.
    Requires targeted `input_values` to be provided as audio tokens will be infered from it using the `codec_model`.
    - `config.audio_token_id` indicates an audio frames (considering sequence length elements as frames)
    - `-100` will be ignored in the loss computation
    - `-101` indicates the audio frame will be used only for the backbone model (using the first codebook token as labels)

    Such labels can be prepared using `output_labels=True` when calling [`CsmProcessor`].
logits_to_keep (`int` or `torch.Tensor`, *optional*):
    Kept for compatibility. Does not support another value than:
    1. `0`, which is equivalent to keeping all logits, used in the training regime
    2. `1`, which is equivalent to keeping only the last logit, used in the generation regime

Example:

```python
>>> import torch
>>> from transformers import CsmForConditionalGeneration, AutoProcessor
>>> from datasets import load_dataset, Audio

>>> model_id = "sesame/csm-1b"
>>> torch_device = "cuda" if torch.cuda.is_available() else "cpu"

>>> processor = AutoProcessor.from_pretrained(model_id)

>>> ds = load_dataset("hf-internal-testing/dailytalk-dummy", split="train")
>>> # ensure the audio is 24kHz
>>> ds = ds.cast_column("audio", Audio(sampling_rate=24000))

>>> conversation = []
>>> # prepare a conversation with text and corresponding audio
>>> for text, audio, speaker_id in zip(ds[:4]["text"], ds[:4]["audio"], ds[:4]["speaker_id"]):
...     conversation.append(
...         {
...             "role": f"{speaker_id}",
...             "content": [{"type": "text", "text": text}, {"type": "audio", "path": audio["array"]}],
...         }
...     )

>>> inputs = processor.apply_chat_template(
...     conversation,
...     tokenize=True,
...     return_dict=True,
...     output_labels=True,
... ).to(torch_device)

>>> model = CsmForConditionalGeneration.from_pretrained(model_id, device_map=torch_device)
>>> output = model(**inputs)
>>> output.loss.backward()
```Nr   r1  rc  )r/  r   r   r(   r1  r   r   r   )r'   rc  r"  r   r  rP   r   .r  )r   Tr  )r/  r0  r   return_dictrc  )r&   r0   r+   r'   r(   r)   r*   r,   r-   r.   r/   r1   )r  r  r  rp   r   rg  r  rh  rf   r"  allr  rE   r   r  r  r  r&   r$   r(   r)   r*   r'   )rJ   r/  r  r   r  r   r(   r1  rc  r   r   rd  r   r  backbone_outputsbackbone_hidden_statesrj  backbone_logitsr&   r0   r+   depth_decoder_outputsbackbone_labels
train_maskdepth_decoder_input_ids
train_idxsbackbone_last_hidden_statesdepth_decoder_labelss                               r=   rZ   #CsmForConditionalGeneration.forward  s   f  Y^^q%8 CC)=M */:M"8,FI.. 	
)%+')	
 	
 "2!!48B>SV8W8W~ot4]k,,'=aPQ>Q'RS! $$Q1WoO .. &4;;KaKaekM "!Q(+t388R8@@J&,Z&8>]@Y@Y\]@]>]9]&^#&(mm&7&78OQW_`&7&a##++T+:J*@APZ[\P]`aPacdAd*e'#)*#5 $($6$6 %1+F# +% %! "7!;!; #55D '1",<<*88'22AVAb!6!=!=hl$0 +@*O*O$0 )>(K(KI^Ij%:%E%E
 	
 qu
 	
r<   )r  r  r  r  r  r"  rr  )NNNNNNNNNNr   )!r2   r3   r4   r5   rs  rD   r  r  r  classmethodr  r  r   r7   r   r  r   r
   r8   rm  r   r   r   rv  r  r   r   r   r:   r$   rZ   r;   ra   rb   s   @r=   r  r    s    	@1
01  41 -1/37;)-PBELL)PB u||,PB 'u||4	PB
 &PB 
%,,	PBj ,0595959## "% !!1!12	
   1 12 !!1!12 >  '+/3157;37KO59-1$(5934[
##[
 u||,[
 !.	[

 'u||4[
 u//0[
 "%tE4E4E/F(F"GH[
   1 12[
 ))*[
 D>[
 !!1!12[
 c5<</0[
 +,[
 
u''	([
  [
r<   r  )r  r  r  rW  r  rK  )r   )Idataclassesr   typingr   r   r   r7   torch.nnrE   transformers.utils.genericr   activationsr	   cache_utilsr
   r   
generationr   integrationsr   masking_utilsr   modeling_layersr   modeling_outputsr   r   modeling_rope_utilsr   r   modeling_utilsr   r   processing_utilsr   utilsr   r   r   r   r   autor   configuration_csmr   r    generation_csmr!   
get_loggerr2   r;  r$   Moduler@   rd   r   r   r   r   r   r   r   r   r   r   r  r  r  rW  rx  r  r  __all__r1   r<   r=   <module>r     s  , " , ,   9 ! . ) 7 / 9 O K F & _ _  ? . 
		H	% 
)6 )6 )6X Y'J J (J(< <DRYY  (6	UU\\ 	U# 	U%,, 	U& %II%<<% 
% <<	%
 U\\*% % % '(%4C)299 C)L*0 *Z 
 [ [ [4 g
- g
 g
Tryy . l!3_ ll^  V
) V
 V
r 
P
"46H P

P
f
r<   