
    h
Z                        d Z ddlZddlmZ ddlmZmZ ddlZddlm	Z	 ddl
m	c mZ ddlmZ ddlmZmZ dd	lmZ d
dlmZ e G d de             Ze G d de             Ze G d de             Z G d de	j2                        Z G d de	j2                        Z G d de	j2                        Z G d de	j2                        Z G d de	j2                        Z G d de	j2                        Z G d de	j2                        Z  G d  d!e	j2                        Z!e G d" d#e             Z" ed$%       G d& d'e"             Z#d'd#gZ$y)(zTransformers Xcodec model.    N)	dataclass)OptionalUnion   )PreTrainedAudioTokenizerBase)ModelOutputauto_docstring   )	AutoModel   )XcodecConfigc                   b    e Zd ZU dZdZeej                     ed<   dZ	eej                     ed<   y)XcodecOutputao  
    Args:
        audio_codes (`torch.LongTensor`  of shape `(batch_size, num_quantizers, codes_length)`, *optional*):
            Discrete code indices computed using `model.encode`.
        audio_values (`torch.FloatTensor` of shape `(batch_size, channels, num_samples)`, *optional*)
            Decoded audio values obtained using the decoder part of Xcodec.
    Naudio_codesaudio_values)__name__
__module____qualname____doc__r   r   torch
LongTensor__annotations__r   FloatTensor     h/var/www/html/eduruby.in/venv/lib/python3.12/site-packages/transformers/models/xcodec/modeling_xcodec.pyr   r      s3     /3K%**+204L(5,,-4r   r   c                   :    e Zd ZU dZdZeej                     ed<   y)XcodecEncoderOutputz
    Args:
        audio_codes (`torch.LongTensor`  of shape `(batch_size, num_quantizers, codes_length)`, *optional*):
            Discrete code indices computed using `model.encode`.
    Nr   )	r   r   r   r   r   r   r   r   r   r   r   r   r   r   -   s     /3K%**+2r   r   c                   :    e Zd ZU dZdZeej                     ed<   y)XcodecDecoderOutputz
    Args:
        audio_values (`torch.FloatTensor`  of shape `(batch_size, channels, num_samples)`, *optional*):
            Decoded audio values obtained using the decoder part of Xcodec.
    Nr   )	r   r   r   r   r   r   r   r   r   r   r   r   r    r    8   s     15L(5,,-4r   r    c                   l     e Zd ZdZdedededef fdZdej                  dej                  fd	Z	 xZ
S )
ResidualUnitzFResidual block for SemanticEncoder and SemanticDecoder used in Xcodec.configin_channelsout_channelsdilationc           
         t         |           t        j                         | _        |j
                  dz
  dz  |z  }t        j                  |||j
                  d||dd      | _        t        j                  ||dd      | _        y )Nr   r
   F)stridepaddingr&   groupsbias)r$   r%   kernel_sizer+   )	super__init__nnELU
activationunit_kernel_sizeConv1dconv1conv2)selfr#   r$   r%   r&   r)   	__class__s         r   r.   zResidualUnit.__init__F   s}    &&(++a/A5AYY##	

 YY<l`ahmn
r   hidden_statereturnc                     | j                  |      }| j                  |      }| j                  |      }| j                  |      }||z   S N)r1   r4   r5   )r6   r8   output_tensors      r   forwardzResidualUnit.forwardV   sE    5

=16

=1m++r   )r   r   r   r   r   intr.   r   Tensorr=   __classcell__r7   s   @r   r"   r"   C   sH    Po| o# oS o\_ o ,ELL ,U\\ ,r   r"   c                   h     e Zd Zdedededef fdZdej                  dej                  fdZ xZ	S )	SemanticEncoderBlockr#   r$   r%   r(   c                    t         |           t        j                  |j                  D cg c]  }t        ||||       c}      | _        |dk(  rdnd|z  }|dz
  dz  }t        j                  |||||d      | _        y c c}w )Nr   r   r
   Tr,   r(   r)   r+   )	r-   r.   r/   
ModuleListblock_dilationsr"   	res_unitsr3   conv)	r6   r#   r$   r%   r(   r&   kernelr)   r7   s	           r   r.   zSemanticEncoderBlock.__init___   s    V\VlVlm(\&+{HEm

 kF
A:!#IIk<VTZdkrvw	 ns   Br8   r9   c                 Z    | j                   D ]
  } ||      } | j                  |      }|S r;   )rH   rI   r6   r8   units      r   r=   zSemanticEncoderBlock.forwardj   s3    NN 	.D-L	.yy.r   
r   r   r   r   r>   r.   r   r?   r=   r@   rA   s   @r   rC   rC   ^   sE    	x| 	x# 	xS 	xZ] 	xELL U\\ r   rC   c                   V     e Zd Z fdZdej
                  dej
                  fdZ xZS )SemanticEncoderc                     t         |           t        |j                        t        |j                        k7  rt        d      t        j                  |j                  |j                  |j                  d|j                  dz  d      | _
        |j                  }g }t        |j                        D ]>  \  }}t        |j                  |j                  |   z        }|t        ||||      gz  }|}@ t        j                  |      | _        y )Nz:Number of strides must match the number of channel_ratios.r   r
   Fr+   )r-   r.   lenstrideschannel_ratios
ValueErrorr/   r3   semantic_hidden_sizer,   rI   	enumerater>   rC   rF   conv_blocks)r6   r#   r$   rY   ir(   r%   r7   s          r   r.   zSemanticEncoder.__init__r   s    v~~#f&;&;"<<YZZII''''!#
	 11"6>>2 	'IAvv::V=R=RST=UUVL0lTZ[\\K&K	'
 ==5r   r8   r9   c                 Z    | j                  |      }| j                  D ]
  } ||      } |S r;   )rI   rY   r6   r8   blocks      r   r=   zSemanticEncoder.forward   s5    yy.%% 	/E .L	/r   r   r   r   r.   r   r?   r=   r@   rA   s   @r   rP   rP   q   s#    6,ELL U\\ r   rP   c                   h     e Zd Zdedededef fdZdej                  dej                  fdZ xZ	S )	SemanticDecoderBlockr#   r$   r%   r(   c                 h   t         	|           |dk(  r!t        j                  ||dddd      | _        n:d|z  }|dz   dz  }|dz  dk(  rdnd}t        j
                  ||||||d      | _        t        j                  |j                  D cg c]  }t        ||||       c}      | _	        y c c}w )	Nr   r   TrE   r
   r   FrR   )
r-   r.   r/   r3   rI   ConvTranspose1drF   rG   r"   rH   )
r6   r#   r$   r%   r(   r,   r)   output_paddingr&   r7   s
            r   r.   zSemanticDecoderBlock.__init__   s    Q;		DI f*Kza'G"(1*/QqN**\;^cDI X^XnXnoH\&,hGo
os   B/r8   r9   c                 Z    | j                  |      }| j                  D ]
  } ||      } |S r;   )rI   rH   rL   s      r   r=   zSemanticDecoderBlock.forward   s3    yy.NN 	.D-L	.r   rN   rA   s   @r   r`   r`      s@    
| 
# 
S 
Z] 
.ELL U\\ r   r`   c                   V     e Zd Z fdZdej
                  dej
                  fdZ xZS )SemanticDecoderc                     t         |           t        j                  |j                  t        |j                  |j                  d   z        |j                  d|j                  dz  d      | _        g }t        |j                        D ]  \  }}t        |j                  |j                  |   z        }|t        |j                        dz
  k  r)t        |j                  |j                  |dz      z        }n|j                  }|t        ||||      gz  } t        j                  |      | _        t        j                  |j                  |j                  |j                  d|j                  dz  d      | _        y )Nr   r   r
   F)r$   r%   r,   r(   r)   r+   )r(   r)   r+   )r-   r.   r/   r3   rW   r>   rU   r,   r4   rX   rT   rS   r`   rF   rY   r5   )r6   r#   rY   rZ   r(   r$   r%   r7   s          r   r.   zSemanticDecoder.__init__   s_   YY33V886;P;PQR;SST**&&!+

 "6>>2 	]IAvf99F<Q<QRS<TTUKC--.23"6#>#>AVAVWX[\W\A]#]^%::0lTZ[\\K	] ==5YY''''&&!+

r   r8   r9   c                 |    | j                  |      }| j                  D ]
  } ||      } | j                  |      }|S r;   )r4   rY   r5   r\   s      r   r=   zSemanticDecoder.forward   sC    zz,/%% 	/E .L	/zz,/r   r^   rA   s   @r   rf   rf      s#    
>ELL U\\ r   rf   c                   4     e Zd ZdZ fdZd Zd Zd Z xZS )XcodecEuclideanCodebookz!Codebook with Euclidean distance.c                    t         |           t        j                  |j                  |j
                        }|j                  | _        | j                  dt        j                  dg             | j                  dt        j                  |j                               | j                  d|       | j                  d|j                                y )NinitedTcluster_sizeembed	embed_avg)	r-   r.   r   zeroscodebook_sizecodebook_dimregister_bufferr?   clone)r6   r#   rn   r7   s      r   r.   z XcodecEuclideanCodebook.__init__   s    F00&2E2EF#11Xu||TF';<^U[[9M9M-NOWe,[%++-8r   c                    | j                   j                         }|j                  d      j                  dd      }|d|z  |z  z
  |j                  d      j                  dd      z    }|j	                  d      j
                  }|S )Nr
   r   T)keepdimr   dim)rn   tpowsummaxindices)r6   hidden_statesrn   scaled_statesdist	embed_inds         r   quantizez XcodecEuclideanCodebook.quantize   s    

%))!,00D0A]!2U!::UYYq\=M=MaY]=M=^^_HHH$,,	r   c                     |j                   }|j                  d|d   f      }| j                  |      } |j                  |d d  }|S )Nrw   )shapereshaper   view)r6   r   r   r   s       r   encodezXcodecEuclideanCodebook.encode   sO    ##%--r59o>MM-0	"INNE#2J/	r   c                 F    t        j                  || j                        }|S r;   )F	embeddingrn   )r6   r   	quantizeds      r   decodezXcodecEuclideanCodebook.decode   s    KK	4::6	r   )	r   r   r   r   r.   r   r   r   r@   rA   s   @r   rj   rj      s    +9r   rj   c                   4     e Zd ZdZdef fdZd Zd Z xZS )XcodecVectorQuantizationzY
    Vector quantization implementation. Currently supports only euclidean distance.
    r#   c                 B    t         |           t        |      | _        y r;   )r-   r.   rj   codebook)r6   r#   r7   s     r   r.   z!XcodecVectorQuantization.__init__   s    /7r   c                 b    |j                  ddd      }| j                  j                  |      }|S Nr   r
   r   )permuter   r   )r6   r   embed_ins      r   r   zXcodecVectorQuantization.encode   s/    %--aA6==''6r   c                 b    | j                   j                  |      }|j                  ddd      }|S r   )r   r   r   )r6   r   r   s      r   r   zXcodecVectorQuantization.decode  s/    ==''	2##Aq!,r   )	r   r   r   r   r   r.   r   r   r@   rA   s   @r   r   r      s    8| 8
r   r   c                        e Zd ZdZdef fdZd ZddefdZdde	j                  de	j                  fdZd	e	j                  de	j                  fd
Z xZS ) XcodecResidualVectorQuantizationzv
    Residual vector quantization implementation. Follows Algorithm 1 in https://huggingface.co/papers/2107.03312
    r#   c                    t         |           t        j                  t	        |j
                        D cg c]  }t        |       c}      | _        |j                  | _        |j                  | _	        |j
                  | _        y c c}w r;   )
r-   r.   r/   rF   rangenum_quantizersr   
quantizers
frame_raterq   )r6   r#   _r7   s      r   r.   z)XcodecResidualVectorQuantization.__init__  sk    --SXY_YnYnSo(pa)A&)I(pq ++#11$33 )qs   Bc                 `    t        j                  | j                        | j                  z  dz  S )zReturn bandwidth per quantizer.i  )mathlog2rq   r   )r6   s    r   get_bandwidth_per_quantizerz<XcodecResidualVectorQuantization.get_bandwidth_per_quantizer  s%    yy++,t>EEr   r9   c           	          | j                         }| j                  }|0|dkD  r+t        t        dt	        j
                  ||z                    }|S )z:Return num_quantizers based on specified target bandwidth.        r   )r   r   r>   r}   r   floor)r6   	bandwidthbw_per_qr   s       r    get_num_quantizers_for_bandwidthzAXcodecResidualVectorQuantization.get_num_quantizers_for_bandwidth  sL    335,, Y_ Q

9x3G(H!IJNr   
embeddingsc                     | j                  |      }|}g }| j                  d| D ]:  }|j                  |      }|j                  |      }||z
  }|j	                  |       < t        j                  |      }	|	S )a  
        Encode the input tensor into discrete indices using RVQ, with the number of quantizers selected based on the given bandwidth.
        Each quantizer /codebook residually quantizes the input and returns the nearest indices in terms of Euclidian distance.
        N)r   r   r   r   appendr   stack)
r6   r   r   r   residualall_indices	quantizerr~   r   out_indicess
             r   r   z'XcodecResidualVectorQuantization.encode$  s    
 >>yI.9 	(I&&x0G!((1I)+Hw'		(
 kk+.r   codesc                     t        j                  d|j                        }t        |      D ]*  \  }}| j                  |   }|j                  |      }||z   }, |S )z9Decode the given codes to their quantized representation.r   )device)r   tensorr   rX   r   r   )r6   r   quantized_outrZ   r~   r   r   s          r   r   z'XcodecResidualVectorQuantization.decode4  s^    S>#E* 	6JAw*I!((1I)I5M	6 r   r;   )r   r   r   r   r   r.   r   r>   r   r   r?   r   r   r@   rA   s   @r   r   r     s\    4| 4F#  %,,  ELL U\\ r   r   c                   .    e Zd ZdZeZdZdZd Zd Z	d Z
y)XcodecPreTrainedModelz
    An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
    models.
    xcodecinput_valuesc                 n   t        |t        j                        rm|j                  j                  j                  d| j                  j                         |j                  %|j                  j                  j                          yyt        |t        j                  t        j                  f      rJ|j                  j                  j                          |j                  j                  j                  d       yt        |t        j                        rt        j                  j                  |j                         |j                  jt!        j"                  |j$                  |j&                  |j(                  d   z  z        }t        j                  j+                  |j                  | |       yyy)zInitialize the weightsr   )meanstdNg      ?r   )ab)
isinstancer/   Linearweightdatanormal_r#   initializer_ranger+   zero_	LayerNorm	GroupNormfill_r3   initkaiming_normal_r   sqrtr*   r$   r,   uniform_)r6   moduleks      r   _init_weightsz#XcodecPreTrainedModel._init_weightsI  s(   fbii(MM&&CT[[5R5R&S{{&  &&( ' r|| <=KK""$MM$$S)		*GG##FMM2{{&IIfmmv/A/AFDVDVWXDY/YZ[  a 8 ' +r   c                    t         j                  j                  j                  }t	        t         j                  j                  j
                  d      r.t         j                  j                  j
                  j                  } || j                  j                          || j                  j                         | j                  j                  D ]`  } ||j                         |j                  |j                  |j                  fD ]&  } ||j                          ||j                         ( b  || j                  j                  d        || j                  j                  d       | j                  j                  D ]f  } ||j                  d       |j                  |j                  |j                  fD ]*  } ||j                  d        ||j                  d       , h y)znApply weight norm in the acoustic encoder and decoder because the original checkpoint has weight norm applied.weight_normr   nameN)r   r/   utilsr   hasattrparametrizationsacoustic_encoderr4   r5   r]   	res_unit1	res_unit2	res_unit3acoustic_decoderconv_t1)r6   r   r]   res_units       r   apply_weight_normz'XcodecPreTrainedModel.apply_weight_normY  sd   hhnn00588>>22MB((..99EEKD))//0D))//0**00 	,E$"__eoouO ,HNN+HNN+,	, 	D))//h?D))//h?**00 	;EH5"__eoouO ;HNN:HNN:;	;r   c                    | j                   | j                  fD ]  }|j                         D ]  }	 t        j                  j
                  j                  |d       t        |d      s<d|j                  v sKt        j                  j
                  j                  j                  |dd         y# t        t        f$ r Y hw xY w)z=Remove the weight norm from the acoustic encoder and decoder.r   r   r   T)leave_parametrizedN)r   r   modulesr   r/   r   remove_weight_normrV   AttributeErrorr   r   parametrizeremove_parametrizations)r6   r   ms      r   r   z(XcodecPreTrainedModel.remove_weight_normq  s    ,,d.C.CD 	mF^^% mHHNN55ah5G 101h!BTBT6THHNN..FFq(gkFlm	m #N3 s   +B22CCN)r   r   r   r   r   config_classbase_model_prefixmain_input_namer   r   r   r   r   r   r   r   >  s)    
  L $O9 ;0	mr   r   z$The Xcodec neural audio codec model.)custom_introc                       e Zd Z fdZedej                  fd       Zdej                  dej                  fdZ
e	 	 ddej                  dee   dee   deej                  ef   fd	       Ze	 dd
ej                  dee   deej                  ef   fd       Ze	 	 	 ddej                  d
eej                     dee   dee   deeej                  ej                  f   ef   f
d       Z xZS )XcodecModelc                    t         |   |       || _        |j                  dz  | _        t        j                  |j                        }|j                  | _	        |j                  | _        | j                  | j                         t        |      | _        t        |      | _        t        j                  |j"                        j%                         | _        t)        j*                  |j,                  |j,                        | _        t)        j*                  |j,                  |j"                  j,                        | _        t)        j*                  |j,                  |j                  j,                        | _        t5        |      | _        y )Nr
   )r-   r.   r#   
hop_lengthpadr   from_configacoustic_model_configencoderr   decoderr   _adjust_dac_decoderrP   encoder_semanticrf   decoder_semanticsemantic_model_configevalsemantic_modelr/   r   hidden_sizefcfc1fc2r   r   )r6   r#   acoustic_modelr7   s      r   r.   zXcodecModel.__init__  s    $$)"..v/K/KL . 6 6 . 6 6  !6!67 / 7 / 7'33F4P4PQVVX))F..0B0BC99V//1M1M1Y1YZ99V//1M1M1Y1YZ9&Ar   r   c                 z   | j                         D ]]  }t        |t        j                        st        |j                  t
              r|j                  d   n|j                  }|dz  f|_        _ t        | d      r?t        | j                  t        j                        rt        j                         | _        yyy)z
        DAC implemented in Xcodec is slightly different from the HF version.
        DAC in Xcodec adjusts the output padding in every ConvTranspose1d in the decoder and removes
        the final `nn.Tanh` activation function.
        r   r
   tanhN)r   r   r/   rb   r(   tuplerc   r   r   TanhIdentity)r   r   r(   s      r   r   zXcodecModel._adjust_dac_decoder  s     oo' 	6F&""4"45-7u-Mq)SYS`S`)/!%	6 7F#
7<<(I;;=GL )J#r   r   r9   c                 T   |d d dd d f   }t        j                  || j                  | j                  f      }t        j                         5  | j	                  |d      }|j
                  }d d d        t        j                  d      }|j                  d      S # 1 sw Y   2xY w)Nr   T)output_hidden_statesr   rx   )r   r   r   no_gradr   r   r   r   )r6   r   outputsr   stackeds        r   _extract_semantic_featuresz&XcodecModel._extract_semantic_features  s    #Aq!G,uu\DHHdhh+?@]]_ 	2)),T)RG#11M	2 ++m3|||""	2 	2s    BB'r   return_dictc           	         ||n| j                   j                  }|j                  d   }|dk7  rt        d|       || j                   j                  d   }n>|| j                   j                  vr&t        d| d| j                   j                   d      | j                  |      j                         }| j                  |j                  dd            }| j                  |      }|j                  d   |j                  d   k7  rT| j                  t        j                  |ddd	ddf   | j                  | j                  f      j                  d            }t        j                  ||gd
      }| j                  |j                  dd            j                  dd      }| j                   j#                  ||      }	|	j                  d	d      }	|s|	S t%        |	      S )ac  
        input_values (`torch.FloatTensor` of shape `(batch_size, channels, num_samples)`):
            Float values of the input audio waveform.
        bandwidth (`float`, *optional*):
            The target bandwidth in (kbps) supports only values in `config.target_bandwidths`.
            Defaults to the highest available bandwidth `4.0` kbps.
        return_dict (`bool`, *optional*):
            Whether or not to return a [`~utils.ModelOutput`].

        Returns:
            `torch.LongTensor` of shape `(batch_size, num_quantizers, codes_length)` containing the discrete encoded audio codes.
        Nr   zAudio must be mono, but got rw   z)This model doesn't support the bandwidth z. Select one of .r
   r   rx   )r#   r
  r   rV   target_bandwidthsr	  detachr   	transposer   r   r   	unsqueezer   catr   r   r   r   )
r6   r   r   r
  channelse_semantic_input
e_semantic
e_acousticr   r   s
             r   r   zXcodecModel.encode  s   & &1%<k$++BYBY%%a(q=;H:FGG55b9Idkk;;;;I;FVW[WbWbWtWtVuuvw   ::<HOOQ**+;+E+Ea+KL
**<8
A*"2"21"55..quu\!Q'5JTXXW[W_W_L`/a/k/klm/noJYY
J7Q?
WWZ11!Q78BB1aH
nn++J	B!++Aq1";//r   r   c                 2   ||n| j                   j                  }|j                  dd      }| j                  j	                  |      }| j                  |j                  dd            j                  dd      }| j                  |      }|s|S t        |      S )a  
        audio_codes (`torch.LongTensor`  of shape `(batch_size, num_quantizers, codes_length)`):
            Discrete code indices computed using `model.encode`.
        return_dict (`bool`, *optional*):
            Whether or not to return a [`~utils.ModelOutput`]

        Returns:
            Decoded audio values of shape `(batch_size, channels, num_samples)` obtained using the decoder part of
            Xcodec.
        r   r   r
   )r#   r
  r  r   r   r   r   r    )r6   r   r
  r   quantized_acousticr   s         r   r   zXcodecModel.decode  s      &1%<k$++BYBY!++Aq1NN))+6	!XXi&9&9!Q&?@JJ1aP,,-?@"<00r   c                     ||n| j                   j                  }|j                  d   }|| j                  ||d      }| j	                  ||      d   dd|f   }|s||fS t        ||      S )a  
        input_values (`torch.FloatTensor` of shape `(batch_size, channels, num_samples)`):
            The raw float values of the input audio waveform.
        audio_codes (`torch.LongTensor`  of shape `(batch_size, num_quantizers, codes_length)`:
            Discrete code indices computed using `model.encode`.
        bandwidth (`float`, *optional*):
            Target bandwidth in kbps. Must be one of `config.target_bandwidths`. Defaults to the highest available bandwidth.
        bandwidth (`float`, *optional*):
            Target bandwidth in kbps. Must be one of `config.target_bandwidths`. Defaults to the highest available bandwidth.
        return_dict (`bool`, *optional*):
            Whether to return a [`XcodecOutput`] instead of a plain tuple.

        Returns:
            `XcodecOutput` or tuple `(audio_codes, audio_values)`:
            - `audio_codes` of shape `(batch_size, num_quantizers, codes_length)`: the quantized discrete codes.
            - `audio_values` of shape `(batch_size, channels, num_samples)`: the reconstructed audio waveform given the codes.

        Example:

        ```python
        >>> from datasets import load_dataset
        >>> from transformers import AutoFeatureExtractor, XcodecModel

        >>> model_id = "hf-audio/xcodec-hubert-librispeech"
        >>> model = XcodecModel.from_pretrained(model_id)
        >>> feature_extractor = AutoFeatureExtractor.from_pretrained(model_id)

        >>> dataset = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
        >>> dataset = dataset.cast_column("audio", Audio(sampling_rate=feature_extractor.sampling_rate))
        >>> audio_sample = dataset[0]['audio']['array']

        >>> inputs = feature_extractor(raw_audio=audio_sample, return_tensors="pt")

        >>> outputs = model(**inputs)
        >>> audio_codes = outputs.audio_codes
        >>> audio_values = outputs.audio_values
        ```
        Nrw   F)r
  r   .)r   r   )r#   r
  r   r   r   r   )r6   r   r   r   r
  lengthr   s          r   r=   zXcodecModel.forward  s    \ &1%<k$++BYBY##B'++lI5+QK{{;K{HKCQXRXQXLY..,OOr   )NNr;   )NNN)r   r   r   r.   staticmethodr/   Moduler   r   r   r	  r	   r?   r   floatboolr   r   r   r    r   r  r   r=   r@   rA   s   @r   r   r   }  sx   B  )RYY ) )#u7H7H #UM^M^ #  &*&*	/0ll/0 E?/0 d^	/0
 
u||00	1/0 /0b  '+1\\1 d^1 
u||00	1	1 16  /3%)&*8Pll8P ell+8P E?	8P
 d^8P 
uU\\5<</0,>	?8P 8Pr   r   )%r   r   dataclassesr   typingr   r   r   torch.nnr/   torch.nn.functional
functionalr   modeling_utilsr   r   r   r	   autor   configuration_xcodecr   r   r   r    r  r"   rC   rP   r`   rf   rj   r   r   r   r   __all__r   r   r   <module>r'     sV   !  ! "     : 0  . 
5; 
5 
5 3+ 3 3 5+ 5 5,299 ,6299 &bii <299 >%bii %Pbii @ryy ,/ryy /d ;m8 ;m ;m| GHpP' pP IpPf 1
2r   