
    sg                       d Z ddlmZ ddlZddlZddlZddlmZ ddlm	Z	m
Z
mZmZ ddlZddlZddlmZ ddlmZmZmZmZmZ dd	lmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z% dd
l&m'Z'm(Z(m)Z) ddl*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0 ddl1m2Z2  e0jf                  e4      Z5dZ6dZ7dZ8dZ9d1dZ: G d de      Z; e.de8       G d de;             Z< G d de#jz                  j|                        Z? G d de#jz                  j|                        Z@e$ G d de#jz                  j|                               ZA G d de#jz                  j|                        ZBe G d  d!e,             ZC e.d"e8       G d# d$e;             ZD e.d%e8       G d& d'e;e             ZE e.d(e8       G d) d*e;e             ZF e.d+e8       G d, d-e;e!             ZG e.d.e8       G d/ d0e;e             ZHy)2z
TF 2.0 Flaubert model.
    )annotationsN)	dataclass)DictOptionalTupleUnion   )get_tf_activation)TFBaseModelOutputTFMultipleChoiceModelOutputTFQuestionAnsweringModelOutputTFSequenceClassifierOutputTFTokenClassifierOutput)TFModelInputTypeTFMultipleChoiceLossTFPreTrainedModelTFQuestionAnsweringLossTFSequenceClassificationLossTFSequenceSummaryTFSharedEmbeddingsTFTokenClassificationLossget_initializerkeraskeras_serializableunpack_inputs)check_embeddings_within_bounds
shape_liststable_softmax)MULTIPLE_CHOICE_DUMMY_INPUTSModelOutputadd_code_sample_docstringsadd_start_docstrings%add_start_docstrings_to_model_forwardlogging   )FlaubertConfigzflaubert/flaubert_base_casedr&   a~	  

    This model inherits from [`TFPreTrainedModel`]. Check the superclass documentation for the generic methods the
    library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
    etc.)

    This model is also a [keras.Model](https://www.tensorflow.org/api_docs/python/tf/keras/Model) subclass. Use it
    as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
    behavior.

    <Tip>

    TensorFlow models and layers in `transformers` accept two formats as input:

    - having all inputs as keyword arguments (like PyTorch models), or
    - having all inputs as a list, tuple or dict in the first positional argument.

    The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
    and layers. Because of this support, when using methods like `model.fit()` things should "just work" for you - just
    pass your inputs and labels in any format that `model.fit()` supports! If, however, you want to use the second
    format outside of Keras methods like `fit()` and `predict()`, such as when creating your own layers or models with
    the Keras `Functional` API, there are three possibilities you can use to gather all the input Tensors in the first
    positional argument:

    - a single Tensor with `input_ids` only and nothing else: `model(input_ids)`
    - a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
    `model([input_ids, attention_mask])` or `model([input_ids, attention_mask, token_type_ids])`
    - a dictionary with one or several input Tensors associated to the input names given in the docstring:
    `model({"input_ids": input_ids, "token_type_ids": token_type_ids})`

    Note that when creating models and layers with
    [subclassing](https://keras.io/guides/making_new_layers_and_models_via_subclassing/) then you don't need to worry
    about any of this, as you can just pass inputs like you would to any other Python function!

    </Tip>

    Parameters:
        config ([`FlaubertConfig`]): Model configuration class with all the parameters of the model.
            Initializing with a config file does not load the weights associated with the model, only the
            configuration. Check out the [`~PreTrainedModel.from_pretrained`] method to load the model weights.
a<  
    Args:
        input_ids (`Numpy array` or `tf.Tensor` of shape `(batch_size, sequence_length)`):
            Indices of input sequence tokens in the vocabulary.

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

            [What are input IDs?](../glossary#input-ids)
        attention_mask (`Numpy array` or `tf.Tensor` of shape `(batch_size, sequence_length)`, *optional*):
            Mask to avoid performing attention on padding token indices. Mask values selected in `[0, 1]`:

            - `1` for tokens that are **not masked**,
            - `0` for tokens that are **masked**.

            [What are attention masks?](../glossary#attention-mask)
        langs (`tf.Tensor` or `Numpy array` of shape `(batch_size, sequence_length)`, *optional*):
            A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
            languages ids which can be obtained from the language names by using two conversion mappings provided in
            the configuration of the model (only provided for multilingual models). More precisely, the *language name
            to language id* mapping is in `model.config.lang2id` (which is a dictionary string to int) and the
            *language id to language name* mapping is in `model.config.id2lang` (dictionary int to string).

            See usage examples detailed in the [multilingual documentation](../multilingual).
        token_type_ids (`tf.Tensor` or `Numpy array` of shape `(batch_size, sequence_length)`, *optional*):
            Segment token indices to indicate first and second portions of the inputs. Indices are selected in `[0,
            1]`:

            - `0` corresponds to a *sentence A* token,
            - `1` corresponds to a *sentence B* token.

            [What are token type IDs?](../glossary#token-type-ids)
        position_ids (`tf.Tensor` or `Numpy array` of shape `(batch_size, sequence_length)`, *optional*):
            Indices of positions of each input sequence tokens in the position embeddings. Selected in the range `[0,
            config.max_position_embeddings - 1]`.

            [What are position IDs?](../glossary#position-ids)
        lengths (`tf.Tensor` or `Numpy array` of shape `(batch_size,)`, *optional*):
            Length of each sentence that can be used to avoid performing attention on padding token indices. You can
            also use *attention_mask* for the same result (see above), kept here for compatibility Indices selected in
            `[0, ..., input_ids.size(-1)]`:
        cache (`Dict[str, tf.Tensor]`, *optional*):
            Dictionary string to `tf.FloatTensor` that contains precomputed hidden states (key and values in the
            attention blocks) as computed by the model (see `cache` output below). Can be used to speed up sequential
            decoding.

            The dictionary object will be modified in-place during the forward pass to add newly computed
            hidden-states.
        head_mask (`Numpy array` or `tf.Tensor` of shape `(num_heads,)` or `(num_layers, num_heads)`, *optional*):
            Mask to nullify selected heads of the self-attention modules. Mask values selected in `[0, 1]`:

            - `1` indicates the head is **not masked**,
            - `0` indicates the head is **masked**.

        inputs_embeds (`tf.Tensor` of shape `(batch_size, sequence_length, hidden_size)`, *optional*):
            Optionally, instead of passing `input_ids` you can choose to directly pass an embedded representation. This
            is useful if you want more control over how to convert `input_ids` indices into associated vectors than the
            model's internal embedding lookup matrix.
        output_attentions (`bool`, *optional*):
            Whether or not to return the attentions tensors of all attention layers. See `attentions` under returned
            tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
            config will be used instead.
        output_hidden_states (`bool`, *optional*):
            Whether or not to return the hidden states of all layers. See `hidden_states` under returned tensors for
            more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
            used instead.
        return_dict (`bool`, *optional*):
            Whether or not to return a [`~utils.ModelOutput`] instead of a plain tuple. This argument can be used in
            eager mode, in graph mode the value will always be set to True.
        training (`bool`, *optional*, defaults to `False`):
            Whether or not to use the model in training mode (some modules like dropout modules have different
            behaviors between training and evaluation).
c           
        t        |      d   }||}n;t        j                  | |j                        }|t        j                  |d      k  }|r\t        j
                  t        j                  t        j                  dd| f      || df      t        j                  |d| df            }n|}t        j                  j                  t        |      || g       |r,t        j                  j                  t        |      || | g       ||fS )zH
    Generate hidden states mask, and optionally an attention mask.
    r   dtyper%   axis)
r   tfranger)   expand_dims
less_equaltilereshape	debuggingassert_equal)slenlengthscausalpadding_maskbsmaskalen	attn_masks           d/var/www/html/venv/lib/python3.12/site-packages/transformers/models/flaubert/modeling_tf_flaubert.py	get_masksr=      s     
G	Q	B xxGMM2bnnW155 MMGGBJJtaD\2RqMBBJJtVWY]_`UaDb
	 	 LLj.T
;
!!*Y"7"dD9IJ?    c                  (    e Zd ZdZeZdZed        Zy)TFFlaubertPreTrainedModelz
    An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained
    models.
    transformerc                   t        j                  g dg dg dgt         j                        }t        j                  g dg dg dgt         j                        }| j                  j                  rK| j                  j
                  dkD  r2||t        j                  g dg dg dgt         j                        d	S ||d
S )N)      r   r   r%   )r%      r	   r   r   )r   r   r         r(   )r%   r%   r   r   r%   )r%   r%   r%   r   r   )r%   r   r   r%   r%   r%   )	input_idsattention_masklangs)rH   rI   )r,   constantint32configuse_lang_embn_langs)selfinputs_list
attns_lists      r<   dummy_inputsz&TFFlaubertPreTrainedModel.dummy_inputs   s     kk?O_"U]_]e]ef[[/?O!T\^\d\de
;;##(;(;a(?(",o%X`b`h`hi  "-
KKr>   N)	__name__
__module____qualname____doc__r&   config_classbase_model_prefixpropertyrS    r>   r<   r@   r@      s(    
 "L%L Lr>   r@   zbThe bare Flaubert Model transformer outputting raw hidden-states without any specific head on top.c                       e Zd Z fdZe ee       eee	e
      	 	 	 	 	 	 	 	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd                     ZddZ xZS )TFFlaubertModelc                P    t        |   |g|i | t        |d      | _        y )NrA   name)super__init__TFFlaubertMainLayerrA   rP   rM   inputskwargs	__class__s       r<   rb   zTFFlaubertModel.__init__   s)    3&3F3.vMJr>   
checkpointoutput_typerX   c                B    | j                  |||||||||	|
|||      }|S )NrH   rI   rJ   token_type_idsposition_idsr5   cache	head_maskinputs_embedsoutput_attentionsoutput_hidden_statesreturn_dicttraining)rA   )rP   rH   rI   rJ   rm   rn   r5   ro   rp   rq   rr   rs   rt   ru   outputss                  r<   callzTFFlaubertModel.call   sG    . ""))%'/!5# # 
  r>   c                    | j                   ry d| _         t        | dd       Nt        j                  | j                  j
                        5  | j                  j                  d        d d d        y y # 1 sw Y   y xY w)NTrA   )builtgetattrr,   
name_scoperA   r`   buildrP   input_shapes     r<   r|   zTFFlaubertModel.build"  sm    ::
4-9t//445 -  &&t,- - :- -s   A11A:NNNNNNNNNNNNFrH   np.ndarray | tf.Tensor | NonerI   r   rJ   r   rm   r   rn   r   r5   r   ro   Optional[Dict[str, tf.Tensor]]rp   r   rq   tf.Tensor | Nonerr   Optional[bool]rs   r   rt   r   ru   r   returnzUnion[Tuple, TFBaseModelOutput]N)rT   rU   rV   rb   r   r#   FLAUBERT_INPUTS_DOCSTRINGr!   _CHECKPOINT_FOR_DOCr   _CONFIG_FOR_DOCrw   r|   __classcell__rg   s   @r<   r]   r]      s    
K *+DE&%$ 488</38<6:150437*.,0/3&*#( 0  6  -	 
 6  4  /  .  1  (  *  -  $  !  
)  F  D-r>   r]   c                  V     e Zd Z ej                         Z fdZd ZddZddZ	 xZ
S )TFFlaubertMultiHeadAttentionc                2   t        |   di | t        t        j                        | _        || _        || _        |j                  | _        | j                  | j                  z  dk(  sJ t        j                  j                  |t        |j                        d      | _        t        j                  j                  |t        |j                        d      | _        t        j                  j                  |t        |j                        d      | _        t        j                  j                  |t        |j                        d      | _        t        j                  j%                  |j&                        | _        t+               | _        || _        y )Nr   q_linkernel_initializerr`   k_linv_linout_linr[   )ra   rb   nextr   NEW_IDlayer_iddimn_headsrr   r   layersDenser   init_stdr   r   r   r   Dropoutattention_dropoutdropoutsetpruned_heads)rP   r   r   rM   rf   rg   s        r<   rb   z%TFFlaubertMultiHeadAttention.__init__/  s2   "6"9@@A!'!9!9xx$,,&!+++\\''PVP_P_@`gn'o
\\''PVP_P_@`gn'o
\\''PVP_P_@`gn'o
||))#/RXRaRaBbir)s||++F,D,DEEr>   c                    t         r   )NotImplementedError)rP   headss     r<   prune_headsz(TFFlaubertMultiHeadAttention.prune_heads?  s    !!r>   c                \    t        |      \  }}	|||n|d   |z   }
nt        |      d   }
 j                   j                  z  t        t        |            dk(  rd||
fndd|
f} fd} fd} | j	                  |            }|/ | j                  |            } | j                  |            }nB| j                  |vr2|x}} | j                  |            } | j                  |            }|x j                  |v rY|E| j                     \  }}t        j                  |gd      }t        j                  |gd      }n| j                     \  }}f| j                  <   t        j                  |j                        }t        j                  |t        j                  j                  |            }t        j                  |j                        }t        j                  ||d	
      }t        j                   ||      }t        j                  ||j                        }|dd|z
  z  z
  }t#        |d      } j%                  ||      }|||z  }t        j                  |      } ||      } j'                  |      f}|r||fz   }|S )zd
        Self-attention (if kv is None) or attention over source sentence (provided by kv).
        r4   r%   r	   c           	     v    t        j                  t        j                  | dj                  f      d      S )
projectionr   rE   r%   r	   perm)r,   	transposer1   r   xr8   dim_per_headrP   s    r<   shapez0TFFlaubertMultiHeadAttention.call.<locals>.shapeS  s-    <<

1r2t||\.R SZfggr>   c                z    t        j                  t        j                  | d      dj                  z  f      S )zcompute contextr   r   r   )r,   r1   r   r   r   s    r<   unshapez2TFFlaubertMultiHeadAttention.call.<locals>.unshapeW  s0    ::bll1<@2r4<<ZfKfBghhr>   rE   r*   r(   T)transpose_bgꌠ9Y>)Fg      ?r   ru   )r   r   r   lenr   r   r   r   r,   concatcastr)   multiplymathrsqrtmatmulr1   r   r   r   )rP   inputr9   kvro   rp   rr   ru   qlenr   klenmask_reshaper   r   qkvk_v_f_dim_per_headscoresweightscontextrv   r8   r   s   `                       @@r<   rw   z!TFFlaubertMultiHeadAttention.callB  sx    #5)D#: =4eFmd.BDb>!$D xx4<</.1*T2B.Cq.HAtT*rSTVWY]N^	h	i $**U#$:djj'(Adjj'(A]dmm58JAdjjm$Adjjm$A}}%:"4==1FB		2q'2A		2q'2A /DAq$%q6E$-- QWW=KK277==89GGAQWW%1aT2zz$-wwt6<<0$#*-- b1,,w,:  	)G))GQ''"<<(*
*Gr>   c                   | j                   ry d| _         t        | dd       Zt        j                  | j                  j
                        5  | j                  j                  d d | j                  g       d d d        t        | dd       Zt        j                  | j                  j
                        5  | j                  j                  d d | j                  g       d d d        t        | dd       Zt        j                  | j                  j
                        5  | j                  j                  d d | j                  g       d d d        t        | dd       [t        j                  | j                  j
                        5  | j                  j                  d d | j                  g       d d d        y y # 1 sw Y   AxY w# 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   y xY w)NTr   r   r   r   )ry   rz   r,   r{   r   r`   r|   r   r   r   r   r}   s     r<   r|   z"TFFlaubertMultiHeadAttention.build  ss   ::
4$'3tzz/ 9

  $dhh!7894$'3tzz/ 9

  $dhh!7894$'3tzz/ 9

  $dhh!7894D)5t||001 ;""D$#9:; ; 69 99 99 9; ;s0   )F32)G )G )G3F= G	GG!Fr   )rT   rU   rV   	itertoolscountr   rb   r   rw   r|   r   r   s   @r<   r   r   ,  s'    Y__F "DL;r>   r   c                  .     e Zd Z fdZddZddZ xZS )TFFlaubertTransformerFFNc                   t        |   di | t        j                  j	                  |t        |j                        d      | _        t        j                  j	                  |t        |j                        d      | _        |j                  rt        d      n
t        d      | _        t        j                  j                  |j                        | _        || _        || _        y )Nlin1r   lin2gelurelur[   )ra   rb   r   r   r   r   r   r   r   gelu_activationr
   actr   r   in_dim
dim_hidden)rP   r   r   out_dimrM   rf   rg   s         r<   rb   z!TFFlaubertTransformerFFN.__init__  s    "6"LL&&zoV\VeVeFfms&t	LL&&w?SYSbSbCcjp&q	060F0F$V,L]^dLe||++FNN;$r>   c                    | j                  |      }| j                  |      }| j                  |      }| j                  ||      }|S )Nr   )r   r   r   r   )rP   r   ru   r   s       r<   rw   zTFFlaubertTransformerFFN.call  sA    IIeHHQKIIaLLLXL.r>   c                   | j                   ry d| _         t        | dd       Zt        j                  | j                  j
                        5  | j                  j                  d d | j                  g       d d d        t        | dd       [t        j                  | j                  j
                        5  | j                  j                  d d | j                  g       d d d        y y # 1 sw Y   rxY w# 1 sw Y   y xY w)NTr   r   )
ry   rz   r,   r{   r   r`   r|   r   r   r   r}   s     r<   r|   zTFFlaubertTransformerFFN.build  s    ::
4&2tyy~~. ;		tT[[ 9:;4&2tyy~~. ?		tT__ =>? ? 3; ;? ?s   )C%2)C1%C.1C:r   r   )rT   rU   rV   rb   rw   r|   r   r   s   @r<   r   r     s    %	?r>   r   c                       e Zd ZeZ fdZddZd Zd Ze		 	 	 	 	 	 	 	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd       Z
 xZS )	rc   c                   t        |   di | || _        |j                  | _        |j                  | _        |j
                  | _        | j                  dz  | _        |j                  | _        |j                  | _	        |j                  | _
        |j                  | _        |j                  | _        t        |dd      | _        t        |dd      | _        |j                   | _        |j"                  | _        |j$                  | _        |j(                  | _        |j*                  | _        t,        j.                  j1                  |j2                        | _        t5        | j                  | j                  |j*                  d      | _        t,        j.                  j9                  |j:                  d	      | _        g | _        g | _         g | _!        g | _"        tG        | j                        D ]  }| j>                  jI                  tK        | j                  | j                  |d
|              | j@                  jI                  t,        j.                  j9                  |j:                  d| 	             | jB                  jI                  tM        | j                  | j                  | j                  |d|              | jD                  jI                  t,        j.                  j9                  |j:                  d| 	              y )NrF   	layerdropg        pre_normF
embeddingsinitializer_ranger`   layer_norm_emb)epsilonr`   zattentions_._)rM   r`   zlayer_norm1_._zffns_._zlayer_norm2_._r[   )'ra   rb   rM   r   rO   emb_dimr   
hidden_dimn_words	pad_indexr6   n_layersrN   rz   r   r   rr   rs   use_return_dictrt   max_position_embeddingsembed_init_stdr   r   r   r   r   r   LayerNormalizationlayer_norm_epsr   
attentionslayer_norm1ffnslayer_norm2r-   appendr   r   )rP   rM   rf   irg   s       r<   rb   zTFFlaubertMainLayer.__init__  sl   "6"~~~~>>((Q,~~))mm"// c:
E:!'!9!9$*$?$?!!11'-'E'E$$33||++FNN;,LL$((f6K6KR^
 $ll==fF[F[br=s	t}}% 	AOO"",T\\488F[hijhkYlm ##//8M8MVdefdgTh/i II(4??DHHU[dklmknbop ##//8M8MVdefdgTh/i	r>   c                   t        j                  d      5  | j                  d| j                  | j                  gt        | j                              | _        d d d        | j                  dkD  rl| j                  r`t        j                  d      5  | j                  d| j                  | j                  gt        | j                              | _
        d d d        | j                  ry d| _        t        | dd       Mt        j                  | j                  j                        5  | j                  j                  d        d d d        t        | dd       Zt        j                  | j                   j                        5  | j                   j                  d d | j                  g       d d d        | j"                  D ];  }t        j                  |j                        5  |j                  d        d d d        = | j$                  D ]H  }t        j                  |j                        5  |j                  d d | j                  g       d d d        J | j&                  D ];  }t        j                  |j                        5  |j                  d        d d d        = | j(                  D ]H  }t        j                  |j                        5  |j                  d d | j                  g       d d d        J y # 1 sw Y   xY w# 1 sw Y   /xY w# 1 sw Y   xY w# 1 sw Y   txY w# 1 sw Y   uxY w# 1 sw Y   8xY w# 1 sw Y   xY w# 1 sw Y   xY w)Nposition_embeddingsr   )r`   r   initializerr%   lang_embeddingsTr   )r,   r{   
add_weightr   r   r   r   r   rO   rN   r   ry   rz   r   r`   r|   r   r   r   r   r   )rP   r~   layers      r<   r|   zTFFlaubertMainLayer.build  s   ]]01 	'+!33TXX>+D,?,?@ (7 (D$	 <<! 1 101 '+%<<2 /0C0C D (7 ($ ::
4t,8t334 ,%%d+,4)40<t22778 B##))4txx*@AB__ 	"Euzz* "D!" "	" %% 	4Euzz* 4T4234 4	4 YY 	"Euzz* "D!" "	" %% 	4Euzz* 4T4234 4	4C	 	 , ,B B" "4 4" "4 4sa   AK4AL&L )LL()L5 M
M4K>LLL%(L2	5L?	M	M	c                    | j                   S r   )r   rP   s    r<   get_input_embeddingsz(TFFlaubertMainLayer.get_input_embeddings      r>   c                `    || j                   _        t        |      d   | j                   _        y Nr   )r   weightr   
vocab_sizerP   values     r<   set_input_embeddingsz(TFFlaubertMainLayer.set_input_embeddings  s$    !&%/%6q%9"r>   c           
     4
   ||	t        d      |t        |      \  }}n|	t        |	      d d \  }}nt        d      |p|Ut        j                  t        j                  t        j
                  || j                        |j                        d      }nt        j                  |g|z        }t        j                  j                  t        |      d   |      dt        |      d    d	| d
f t        ||| j                  |      \  }}|Bt        j                  t        j                  |      d      }t        j                  ||df      }t        j                  j                  t        |      ||g      dt        |       d||g d
f |?t        j                  j                  t        |      ||g      dt        |       d||g d
f |t         d g| j"                  z  }|H|F||d   z
  }|d d | d f   }|d d | d f   }||d d | d f   }|d d | d f   }|d d | d f   }|	1t%        || j&                  j(                         | j'                  |      }	|	t        j*                  | j,                  |      z   }|/| j.                  r#|t        j*                  | j0                  |      z   }||| j'                  |      z   }| j3                  |      }| j5                  ||      }t        j                  ||j                        }|t        j                  |d      z  }|rdnd }|
rdnd }t        | j"                        D ]y  }t7        j8                  dd      }|r|| j:                  k  r,|r||fz   }| j<                  s] | j>                  |   ||d |||   |
|      }|d   }|
r	||d   fz   }| j5                  ||      }||z   } | j@                  |   |      }n\ | j@                  |   |      } | j>                  |   ||d |||   |
|      }|d   }|
r	||d   fz   }| j5                  ||      }||z   }| j<                  s.| | jB                  |   |      z   } | jD                  |   |      }n- | jD                  |   |      }| | jB                  |   |      z   }|t        j                  |d      z  }| |r||fz   }||dxx   |jG                  d      z  cc<   |stI        d |||fD              S tK        |||      S )NzDYou cannot specify both input_ids and inputs_embeds at the same timerE   z5You have to specify either input_ids or inputs_embedsr(   r%   r*   r   zExpected batch size z and received batch size z mismatched)r7   zPosition id shape z and input shape zLang shape r4   r   r   r[   c              3  &   K   | ]	  }||  y wr   r[   ).0r   s     r<   	<genexpr>z+TFFlaubertMainLayer.call.<locals>.<genexpr>  s     Yq1=Ys   )last_hidden_statehidden_statesr   )&
ValueErrorr   r,   
reduce_sumr   	not_equalr   r)   convert_to_tensorr2   r3   r=   r6   r.   r-   r0   r   r   r   r   r  gatherr   rN   r   r   r   randomuniformr   r   r   r   r   r   sizetupler   )rP   rH   rI   rJ   rm   rn   r5   ro   rp   rq   rr   rs   rt   ru   r8   r4   r9   r;   _slentensorr  r   r   dropout_probabilityattn_outputsattntensor_normalizeds                              r<   rw   zTFFlaubertMainLayer.call  s|   &  ]%>cdd"!),HB&!-0!4HBTUU?$--GGBLLDNNC9??[bc ..v{; LL%%j&9!&<bA":g#6q#9"::STVSWWbc	
 $D'4;;^\i
 >>"((4.qAL77<"a9L LL%%j&>T
K L!9 ::KRQUJ<Wbc	
  ))*U*;b$ZHj/00A2t*[Y  %%.I !65=(E!!eVW*-I'E67
3L a%j)E67
#D!!eVW*-I  *9doo6P6PQ OOI6M4+C+C\!RR!2!2bii(<(<eDDF%doon==F$$V,fx8wwt6<<0"..B77 3,R$
 t}}% ?	<A"(..A"604>>A# -	 9 ==1tq1aL%%  $A$!+|A.@!@J||D8|<$,))!,V4$7D$4$4Q$7$?!1tq1%aL%%  $A$!+|A.@!@J||D8|<$ ==,$))A,v"66,))!,V4$7D$4$4Q$7$?!,$))A,/@"AAbnnT;;F?	<D  )VI5M &MV[[^+M
 YV]J$GYYY 6cmnnr>   r   r   r   )rT   rU   rV   r&   rX   rb   r|   r   r  r   rw   r   r   s   @r<   rc   rc     s   !L-^$4L:  488</38<6:150437*.,0/3&*#(Do0Do 6Do -	Do
 6Do 4Do /Do .Do 1Do (Do *Do -Do $Do !Do 
)Do Dor>   rc   c                  J     e Zd ZdZ fdZ fdZd Zd Zd Zd Z	d Z
 xZS )	TFFlaubertPredLayerz?
    Prediction layer (cross_entropy or adaptive_softmax).
    c                    t        |   di | |j                  | _        |j                  | _        |j                  | _        |j                  du r|| _        y t        )NFr[   )ra   rb   asmr   r   input_embeddingsr   )rP   rM   r   rf   rg   s       r<   rb   zTFFlaubertPredLayer.__init__  sP    "6"::~~))::$4D!%%r>   c                n    | j                  | j                  fddd      | _        t        |   |       y )NzerosTbias)r   r   	trainabler`   )r   r   r#  ra   r|   )rP   r~   rg   s     r<   r|   zTFFlaubertPredLayer.build  s/    OO4<</wZ^ekOl	k"r>   c                    | j                   S r   )r   r   s    r<   get_output_embeddingsz)TFFlaubertPredLayer.get_output_embeddings  s    $$$r>   c                `    || j                   _        t        |      d   | j                   _        y r  )r   r  r   r  r  s     r<   set_output_embeddingsz)TFFlaubertPredLayer.set_output_embeddings  s(    ',$+5e+<Q+?(r>   c                    d| j                   iS )Nr#  )r#  r   s    r<   get_biaszTFFlaubertPredLayer.get_bias  s    		""r>   c                D    |d   | _         t        |d         d   | _        y )Nr#  r   )r#  r   r  r  s     r<   set_biaszTFFlaubertPredLayer.set_bias  s"    &M	$U6]3A6r>   c                J    | j                  |d      }|| j                  z   }|S )Nlinear)mode)r   r#  )rP   r  s     r<   rw   zTFFlaubertPredLayer.call  s+    --m(-K%		1r>   )rT   rU   rV   rW   rb   r|   r&  r(  r*  r,  rw   r   r   s   @r<   r  r    s,    
&&#%@#7r>   r  c                  <    e Zd ZU dZdZded<   dZded<   dZded<   y)TFFlaubertWithLMHeadModelOutputac  
    Base class for [`TFFlaubertWithLMHeadModel`] outputs.

    Args:
        logits (`tf.Tensor` of shape `(batch_size, sequence_length, config.vocab_size)`):
            Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).
        hidden_states (`tuple(tf.Tensor)`, *optional*, returned when `output_hidden_states=True` is passed or when `config.output_hidden_states=True`):
            Tuple of `tf.Tensor` (one for the output of the embeddings + 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 initial embedding outputs.
        attentions (`tuple(tf.Tensor)`, *optional*, returned when `output_attentions=True` is passed or when `config.output_attentions=True`):
            Tuple of `tf.Tensor` (one for each layer) of shape `(batch_size, num_heads, sequence_length,
            sequence_length)`.

            Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
            heads.
    Nz	tf.TensorlogitszTuple[tf.Tensor] | Noner  r   )rT   rU   rV   rW   r2  __annotations__r  r   r[   r>   r<   r1  r1    s)    & FI-1M*1*.J'.r>   r1  z
    The Flaubert Model transformer with a language modeling head on top (linear layer with weights tied to the input
    embeddings).
    c                       e Zd Z fdZd Zd Zd Ze ee	       e
eee      	 	 	 	 	 	 	 	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d	d                     Zd
dZ xZS )TFFlaubertWithLMHeadModelc                    t        |   |g|i | t        |d      | _        t	        || j                  j
                  d      | _        d| _        y )NrA   r_   zpred_layer_._projF)ra   rb   rc   rA   r  r   
pred_layersupports_xla_generationrd   s       r<   rb   z"TFFlaubertWithLMHeadModel.__init__8  sN    3&3F3.vMJ-fd6F6F6Q6QXkl',$r>   c                    | j                   S r   )r7  r   s    r<   get_lm_headz%TFFlaubertWithLMHeadModel.get_lm_head?  r   r>   c                    t        j                  dt               | j                  dz   | j                  j                  z   S )NzMThe method get_prefix_bias_name is deprecated. Please use `get_bias` instead./)warningswarnFutureWarningr`   r7  r   s    r<   get_prefix_bias_namez.TFFlaubertWithLMHeadModel.get_prefix_bias_nameB  s/    egtuyy3!5!555r>   c                $   | j                   j                  }| j                   j                  }|j                  d   }t	        j
                  |dfd      |z  }t	        j                  ||gd      }|t	        j                  |      |z  }nd }||dS )Nr   r%   r*   rH   rJ   )rM   mask_token_idlang_idr   r,   fillr   	ones_like)rP   re   rf   rC  rD  effective_batch_size
mask_tokenrJ   s           r<   prepare_inputs_for_generationz7TFFlaubertWithLMHeadModel.prepare_inputs_for_generationF  s    11++%%%||AWW2A6:]J
FJ/a8LL(72EE#e44r>   rh   c                    | j                  |||||||||	|
|||      }|d   }| j                  |      }|s	|f|dd  z   S t        ||j                  |j                        S )Nrl   r   r%   )r2  r  r   )rA   r7  r1  r  r   )rP   rH   rI   rJ   rm   rn   r5   ro   rp   rq   rr   rs   rt   ru   transformer_outputsoutputrv   s                    r<   rw   zTFFlaubertWithLMHeadModel.callT  s    . #..))%'/!5# / 
 %Q'//&): 3AB 777.*=*K*KXkXvXv
 	
r>   c                   | j                   ry d| _         t        | dd       Mt        j                  | j                  j
                        5  | j                  j                  d        d d d        t        | dd       Nt        j                  | j                  j
                        5  | j                  j                  d        d d d        y y # 1 sw Y   exY w# 1 sw Y   y xY w)NTrA   r7  )ry   rz   r,   r{   rA   r`   r|   r7  r}   s     r<   r|   zTFFlaubertWithLMHeadModel.build  s    ::
4-9t//445 -  &&t,-4t,8t334 ,%%d+, , 9- -, ,   C%CCC r   )rH   r   rI   r   rJ   r   rm   r   rn   r   r5   r   ro   r   rp   r   rq   r   rr   r   rs   r   rt   r   ru   r   r   z-Union[Tuple, TFFlaubertWithLMHeadModelOutput]r   )rT   rU   rV   rb   r:  r@  rI  r   r#   r   r!   r   r1  r   rw   r|   r   r   s   @r<   r5  r5  0  s	   -65 *+DE&3$ 488</38<6:150437*.,0/3&*#('
0'
 6'
 -	'

 6'
 4'
 /'
 .'
 1'
 ('
 *'
 -'
 $'
 !'
 
7'
 F '
R	,r>   r5  z
    Flaubert Model with a sequence classification/regression head on top (a linear layer on top of the pooled output)
    e.g. for GLUE tasks.
    c                       e Zd Z fdZe eej                  d             ee	e
e      	 	 	 	 	 	 	 	 	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd                     ZddZ xZS )	#TFFlaubertForSequenceClassificationc                    t        |   |g|i | |j                  | _        t        |d      | _        t        ||j                  d      | _        y )NrA   r_   sequence_summaryr   )ra   rb   
num_labelsrc   rA   r   r   rR  rd   s       r<   rb   z,TFFlaubertForSequenceClassification.__init__  sL    3&3F3 ++.vMJ 1&FOObt ur>   batch_size, sequence_lengthrh   c                   | j                  |||||||||	|
|||      }|d   }| j                  |      }|dn| j                  ||      }|s|f|dd z   }||f|z   S |S t        |||j                  |j
                        S )a  
        labels (`tf.Tensor` of shape `(batch_size,)`, *optional*):
            Labels for computing the sequence classification/regression loss. Indices should be in `[0, ...,
            config.num_labels - 1]`. If `config.num_labels == 1` a regression loss is computed (Mean-Square loss), If
            `config.num_labels > 1` a classification loss is computed (Cross-Entropy).
        rl   r   Nr%   lossr2  r  r   )rA   rR  hf_compute_lossr   r  r   )rP   rH   rI   rJ   rm   rn   r5   ro   rp   rq   rr   rs   rt   labelsru   rK  rL  r2  rW  s                      r<   rw   z(TFFlaubertForSequenceClassification.call  s    < #..))%'/!5# / 
 %Q'&&v.~t4+?+?+OY!4QR!88F)-)9TGf$EvE)-;;*55	
 	
r>   c                   | j                   ry d| _         t        | dd       Mt        j                  | j                  j
                        5  | j                  j                  d        d d d        t        | dd       Nt        j                  | j                  j
                        5  | j                  j                  d        d d d        y y # 1 sw Y   exY w# 1 sw Y   y xY w)NTrA   rR  )ry   rz   r,   r{   rA   r`   r|   rR  r}   s     r<   r|   z)TFFlaubertForSequenceClassification.build  s    ::
4-9t//445 -  &&t,-4+T2>t4499: 2%%++D12 2 ?- -2 2rN  NNNNNNNNNNNNNF)rH   TFModelInputType | NonerI   r   rJ   r   rm   r   rn   r   r5   r   ro   r   rp   r   rq   r   rr   r   rs   r   rt   r   rY  r   ru   boolr   z3Union[TFSequenceClassifierOutput, Tuple[tf.Tensor]]r   )rT   rU   rV   rb   r   r#   r   formatr!   r   r   r   rw   r|   r   r   s   @r<   rP  rP    s   v *+D+K+KLi+jk&.$ .28</38<6:1504377;,0/3&*045
*5
 65
 -	5

 65
 45
 /5
 .5
 15
 55
 *5
 -5
 $5
 .5
 5
  
=!5
 l 5
n	2r>   rP  z
    Flaubert Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
    layer on top of the hidden-states output to compute `span start logits` and `span end logits`).
    c                       e Zd Z fdZe eej                  d             ee	e
e      	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd                     ZddZ xZS )	$TFFlaubertForQuestionAnsweringSimplec                    t        |   |g|i | t        |d      | _        t        j
                  j                  |j                  t        |j                        d      | _
        || _        y )NrA   r_   
qa_outputsr   )ra   rb   rc   rA   r   r   r   rS  r   r   rb  rM   rd   s       r<   rb   z-TFFlaubertForQuestionAnsweringSimple.__init__  sd    3&3F3.vMJ,,,,/&//2RYe - 
 r>   rT  rh   c                   | j                  |||||||||	|
|||      }|d   }| j                  |      }t        j                  |dd      \  }}t        j                  |d      }t        j                  |d      }d}||d|i}||d<   | j                  |||f      }|s||f|d	d z   }||f|z   S |S t        ||||j                  |j                  
      S )a  
        start_positions (`tf.Tensor` of shape `(batch_size,)`, *optional*):
            Labels for position (index) of the start of the labelled span for computing the token classification loss.
            Positions are clamped to the length of the sequence (`sequence_length`). Position outside of the sequence
            are not taken into account for computing the loss.
        end_positions (`tf.Tensor` of shape `(batch_size,)`, *optional*):
            Labels for position (index) of the end of the labelled span for computing the token classification loss.
            Positions are clamped to the length of the sequence (`sequence_length`). Position outside of the sequence
            are not taken into account for computing the loss.
        rl   r   rE   r   r*   Nstart_positionend_positionr%   )rW  start_logits
end_logitsr  r   )	rA   rb  r,   splitsqueezerX  r   r  r   )rP   rH   rI   rJ   rm   rn   r5   ro   rp   rq   rr   rs   rt   start_positionsend_positionsru   rK  sequence_outputr2  rf  rg  rW  rY  rL  s                           r<   rw   z)TFFlaubertForQuestionAnsweringSimple.call  s'   F #..))%'/!5# / 
 .a01#%88FAB#? jzz,R8ZZ
4
&=+D&8F%2F>"''z0JKD"J/2Eab2IIF)-)9TGf$EvE-%!-;;*55
 	
r>   c                   | j                   ry d| _         t        | dd       Mt        j                  | j                  j
                        5  | j                  j                  d        d d d        t        | dd       et        j                  | j                  j
                        5  | j                  j                  d d | j                  j                  g       d d d        y y # 1 sw Y   |xY w# 1 sw Y   y xY w)NTrA   rb  )
ry   rz   r,   r{   rA   r`   r|   rb  rM   hidden_sizer}   s     r<   r|   z*TFFlaubertForQuestionAnsweringSimple.buildF      ::
4-9t//445 -  &&t,-4t,8t334 M%%tT4;;3J3J&KLM M 9- -M M   C"%3C."C+.C7)NNNNNNNNNNNNNNF) rH   r\  rI   r   rJ   r   rm   r   rn   r   r5   r   ro   r   rp   r   rq   r   rr   r   rs   r   rt   r   rj  r   rk  r   ru   r]  r   z7Union[TFQuestionAnsweringModelOutput, Tuple[tf.Tensor]]r   )rT   rU   rV   rb   r   r#   r   r^  r!   r   r   r   rw   r|   r   r   s   @r<   r`  r`    s4    *+D+K+KLi+jk&2$ .28</38<6:1504377;,0/3&*9=7;!B
*B
 6B
 -	B

 6B
 4B
 /B
 .B
 1B
 5B
 *B
 -B
 $B
 7B
 5B
  !B
" 
A#B
 l B
H	Mr>   r`  z
    Flaubert Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
    Named-Entity-Recognition (NER) tasks.
    c                       e Zd Z fdZe eej                  d             ee	e
e      	 	 	 	 	 	 	 	 	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd                     ZddZ xZS )	 TFFlaubertForTokenClassificationc                d   t        |   |g|i | |j                  | _        t        |d      | _        t
        j                  j                  |j                        | _        t
        j                  j                  |j                  t        |j                        d      | _        || _        y )NrA   r_   
classifierr   )ra   rb   rS  rc   rA   r   r   r   r   r   r   r   rt  rM   rd   s       r<   rb   z)TFFlaubertForTokenClassification.__init__[  s    3&3F3 ++.vMJ||++FNN;,,,,/&//2RYe - 
 r>   rT  rh   c                ,   | j                  |||||||||	|
|||      }|d   }| j                  ||      }| j                  |      }|dn| j                  ||      }|s|f|dd z   }||f|z   S |S t	        |||j
                  |j                        S )z
        labels (`tf.Tensor` of shape `(batch_size, sequence_length)`, *optional*):
            Labels for computing the token classification loss. Indices should be in `[0, ..., config.num_labels - 1]`.
        rl   r   r   Nr%   rV  )rA   r   rt  rX  r   r  r   )rP   rH   rI   rJ   rm   rn   r5   ro   rp   rq   rr   rs   rt   rY  ru   rK  rl  r2  rW  rL  s                       r<   rw   z%TFFlaubertForTokenClassification.callf  s    8 #..))%'/!5# / 
 .a0,,,J1~t4+?+?+OY!4QR!88F)-)9TGf$EvE&-;;*55	
 	
r>   c                   | j                   ry d| _         t        | dd       Mt        j                  | j                  j
                        5  | j                  j                  d        d d d        t        | dd       et        j                  | j                  j
                        5  | j                  j                  d d | j                  j                  g       d d d        y y # 1 sw Y   |xY w# 1 sw Y   y xY w)NTrA   rt  )
ry   rz   r,   r{   rA   r`   r|   rt  rM   rn  r}   s     r<   r|   z&TFFlaubertForTokenClassification.build  ro  rp  r[  )rH   r\  rI   r   rJ   r   rm   r   rn   r   r5   r   ro   r   rp   r   rq   r   rr   r   rs   r   rt   r   rY  r   ru   r]  r   z0Union[TFTokenClassifierOutput, Tuple[tf.Tensor]]r   )rT   rU   rV   rb   r   r#   r   r^  r!   r   r   r   rw   r|   r   r   s   @r<   rr  rr  R  s   	 *+D+K+KLi+jk&+$ .28</38<6:1504377;,0/3&*044
*4
 64
 -	4

 64
 44
 /4
 .4
 14
 54
 *4
 -4
 $4
 .4
 4
  
:!4
 l 4
l	Mr>   rr  z
    Flaubert Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
    softmax) e.g. for RocStories/SWAG tasks.
    c                       e Zd Z fdZed        Ze eej                  d             e
eee      	 	 	 	 	 	 	 	 	 	 	 	 	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd                     Zd	dZ xZS )
TFFlaubertForMultipleChoicec                   t        |   |g|i | t        |d      | _        t	        ||j
                  d      | _        t        j                  j                  dt        |j                        d      | _        || _        y )NrA   r_   rR  r   r%   logits_projr   )ra   rb   rc   rA   r   r   rR  r   r   r   r   r   rz  rM   rd   s       r<   rb   z$TFFlaubertForMultipleChoice.__init__  sw    3&3F3.vMJ 1&FOObt u <<--/&2J2J"KR_ . 
 r>   c                \   | j                   j                  rl| j                   j                  dkD  rSt        j                  t
        t        j                        t        j                  t
        t        j                        dS dt        j                  t
        t        j                        iS )zn
        Dummy inputs to build the network.

        Returns:
            tf.Tensor with dummy inputs
        r%   r(   rB  rH   )rM   rN   rO   r,   rK   r   rL   r   s    r<   rS   z(TFFlaubertForMultipleChoice.dummy_inputs  ss     ;;##(;(;a(?[[)ERXXV%AR  R[[)ERXXV r>   z(batch_size, num_choices, sequence_lengthrh   c                j   |t        |      d   }t        |      d   }nt        |	      d   }t        |	      d   }|t        j                  |d|f      nd }|t        j                  |d|f      nd }|t        j                  |d|f      nd }|t        j                  |d|f      nd }|t        j                  |d|f      nd }|	%t        j                  |	d|t        |	      d   f      nd }|t        j	                  d       d }| j                  ||||||||||
|||      }|d   }| j                  |      }| j                  |      }t        j                  |d|f      }|d n| j                  ||      }|s|f|dd  z   }||f|z   S |S t        |||j                  |j                        S )	Nr%   rE   r   r	   zwThe `lengths` parameter cannot be used with the Flaubert multiple choice models. Please use the attention mask instead.)rt   ru   r   rV  )r   r,   r1   loggerwarningrA   rR  rz  rX  r   r  r   )rP   rH   rI   rJ   rm   rn   r5   ro   rp   rq   rr   rs   rt   rY  ru   num_choices
seq_lengthflat_input_idsflat_attention_maskflat_token_type_idsflat_position_ids
flat_langsflat_inputs_embedsrK  rL  r2  reshaped_logitsrW  s                               r<   rw   z TFFlaubertForMultipleChoice.call  s   4  $Y/2K#I.q1J$]3A6K#M215JDMDYIJ/?@_cN\Nhbjj"j9IJnrN\Nhbjj"j9IJnrJVJbBJJ|b*5EFhl<A<MRZZJ'78SW
 ( JJ}r:z-7PQR7S&TU 	 NN* G".. # / 
 %Q'&&v.!!&)**Vb+->?~t4+?+?+X%'*=ab*AAF)-)9TGf$EvE*"-;;*55	
 	
r>   c                   | j                   ry d| _         t        | dd       Mt        j                  | j                  j
                        5  | j                  j                  d        d d d        t        | dd       Mt        j                  | j                  j
                        5  | j                  j                  d        d d d        t        | dd       et        j                  | j                  j
                        5  | j                  j                  d d | j                  j                  g       d d d        y y # 1 sw Y   xY w# 1 sw Y   xY w# 1 sw Y   y xY w)NTrA   rR  rz  )ry   rz   r,   r{   rA   r`   r|   rR  rz  rM   rS  r}   s     r<   r|   z!TFFlaubertForMultipleChoice.build)  s$   ::
4-9t//445 -  &&t,-4+T2>t4499: 2%%++D124-9t//445 M  &&dDKK4J4J'KLM M :- -2 2M Ms$   D<%E?3E<EEEr[  )rH   r\  rI   r   rJ   r   rm   r   rn   r   r5   r   ro   r   rp   r   rq   r   rr   r   rs   r   rt   r   rY  r   ru   r]  r   z4Union[TFMultipleChoiceModelOutput, Tuple[tf.Tensor]]r   )rT   rU   rV   rb   rZ   rS   r   r#   r   r^  r!   r   r   r   rw   r|   r   r   s   @r<   rx  rx    s<     $ *!(()ST  &/$ .28</38<6:1504377;,0/3&*04I
*I
 6I
 -	I

 6I
 4I
 /I
 .I
 1I
 5I
 *I
 -I
 $I
 .I
 I
  
>!I
 I
VMr>   rx  r   )IrW   
__future__r   r   r  r=  dataclassesr   typingr   r   r   r   numpynp
tensorflowr,   activations_tfr
   modeling_tf_outputsr   r   r   r   r   modeling_tf_utilsr   r   r   r   r   r   r   r   r   r   r   r   tf_utilsr   r   r   utilsr   r    r!   r"   r#   r$   configuration_flaubertr&   
get_loggerrT   r}  r   r   FLAUBERT_START_DOCSTRINGr   r=   r@   r]   r   Layerr   r   rc   r  r1  r5  rP  r`  rr  rx  r[   r>   r<   <module>r     sZ   #    ! / /   /     S R  3 
		H	%4 "( TH V:L 1 L0 h4-/ 4-	4-pk;5<<#5#5 k;^?u||11 ?> do%,,,, do doP	0%,,,, 0f /k / /2  V, 9 V,V,r  O2*CEa O2O2d  ]M+DF] ]M]M@  RM'@B[ RMRMj  ~M";=Q ~M~Mr>   