import{s as Tr,o as wr,n as Bt}from"../chunks/scheduler.01eeda35.js";import{S as Cr,i as kr,g as a,s as r,r as c,A as Lr,h as i,f as t,c as s,j as b,u as m,x as h,k as $,y as o,a as d,v as p,d as f,t as u,w as g}from"../chunks/index.6dd51b66.js";import{T as Yt}from"../chunks/Tip.de9bae2b.js";import{D as v}from"../chunks/Docstring.cb556860.js";import{C as Dr}from"../chunks/CodeBlock.19ec9b8c.js";import{E as Pr}from"../chunks/ExampleCodeBlock.69db56ad.js";import{H as pe,E as zr}from"../chunks/index.58fe8f9d.js";function Fr(w){let l,x=`One of <code>start_states</code> or <code>start_positions</code> should be not <code>None</code>. If both are set, <code>start_positions</code> overrides
<code>start_states</code>.`;return{c(){l=a("p"),l.innerHTML=x},l(_){l=i(_,"P",{"data-svelte-h":!0}),h(l)!=="svelte-1oii8ff"&&(l.innerHTML=x)},m(_,y){d(_,l,y)},p:Bt,d(_){_&&t(l)}}}function qr(w){let l,x=`One of <code>start_states</code> or <code>start_positions</code> should be not <code>None</code>. If both are set, <code>start_positions</code> overrides
<code>start_states</code>.`;return{c(){l=a("p"),l.innerHTML=x},l(_){l=i(_,"P",{"data-svelte-h":!0}),h(l)!=="svelte-1oii8ff"&&(l.innerHTML=x)},m(_,y){d(_,l,y)},p:Bt,d(_){_&&t(l)}}}function Sr(w){let l,x="Examples:",_,y,L;return y=new Dr({props:{code:"JTIzJTIwcmVuYW1lJTIwdGhlJTIwdXN1YWwlMjBmb3J3YXJkKCklMjBmbiUyMHRvJTIwZm9yd2FyZF9jaHVuaygpJTBBZGVmJTIwZm9yd2FyZF9jaHVuayhzZWxmJTJDJTIwaGlkZGVuX3N0YXRlcyklM0ElMEElMjAlMjAlMjAlMjBoaWRkZW5fc3RhdGVzJTIwJTNEJTIwc2VsZi5kZWNvZGVyKGhpZGRlbl9zdGF0ZXMpJTBBJTIwJTIwJTIwJTIwcmV0dXJuJTIwaGlkZGVuX3N0YXRlcyUwQSUwQSUwQSUyMyUyMGltcGxlbWVudCUyMGElMjBjaHVua2VkJTIwZm9yd2FyZCUyMGZ1bmN0aW9uJTBBZGVmJTIwZm9yd2FyZChzZWxmJTJDJTIwaGlkZGVuX3N0YXRlcyklM0ElMEElMjAlMjAlMjAlMjByZXR1cm4lMjBhcHBseV9jaHVua2luZ190b19mb3J3YXJkKHNlbGYuZm9yd2FyZF9jaHVuayUyQyUyMHNlbGYuY2h1bmtfc2l6ZV9sbV9oZWFkJTJDJTIwc2VsZi5zZXFfbGVuX2RpbSUyQyUyMGhpZGRlbl9zdGF0ZXMp",highlighted:`<span class="hljs-comment"># rename the usual forward() fn to forward_chunk()</span>
<span class="hljs-keyword">def</span> <span class="hljs-title function_">forward_chunk</span>(<span class="hljs-params">self, hidden_states</span>):
    hidden_states = self.decoder(hidden_states)
    <span class="hljs-keyword">return</span> hidden_states


<span class="hljs-comment"># implement a chunked forward function</span>
<span class="hljs-keyword">def</span> <span class="hljs-title function_">forward</span>(<span class="hljs-params">self, hidden_states</span>):
    <span class="hljs-keyword">return</span> apply_chunking_to_forward(self.forward_chunk, self.chunk_size_lm_head, self.seq_len_dim, hidden_states)`,wrap:!1}}),{c(){l=a("p"),l.textContent=x,_=r(),c(y.$$.fragment)},l(T){l=i(T,"P",{"data-svelte-h":!0}),h(l)!=="svelte-kvfsh7"&&(l.textContent=x),_=s(T),m(y.$$.fragment,T)},m(T,D){d(T,l,D),d(T,_,D),p(y,T,D),L=!0},p:Bt,i(T){L||(f(y.$$.fragment,T),L=!0)},o(T){u(y.$$.fragment,T),L=!1},d(T){T&&(t(l),t(_)),g(y,T)}}}function Ir(w){let l,x="Any label of -100 will be ignored (along with the corresponding logits) in the loss computation.";return{c(){l=a("p"),l.textContent=x},l(_){l=i(_,"P",{"data-svelte-h":!0}),h(l)!=="svelte-14hlsz0"&&(l.textContent=x)},m(_,y){d(_,l,y)},p:Bt,d(_){_&&t(l)}}}function Ar(w){let l,x="Any label of -100 will be ignored (along with the corresponding logits) in the loss computation.";return{c(){l=a("p"),l.textContent=x},l(_){l=i(_,"P",{"data-svelte-h":!0}),h(l)!=="svelte-14hlsz0"&&(l.textContent=x)},m(_,y){d(_,l,y)},p:Bt,d(_){_&&t(l)}}}function Er(w){let l,x="Any label of -100 will be ignored (along with the corresponding logits) in the loss computation.";return{c(){l=a("p"),l.textContent=x},l(_){l=i(_,"P",{"data-svelte-h":!0}),h(l)!=="svelte-14hlsz0"&&(l.textContent=x)},m(_,y){d(_,l,y)},p:Bt,d(_){_&&t(l)}}}function Mr(w){let l,x,_,y,L,T,D,jo="This page lists all the custom layers used by the library, as well as the utility functions and classes it provides for modeling.",Kt,fe,Oo="Most of those are only useful if you are studying the code of the models in the library.",en,ue,tn,P,ge,Rn,et,No=`Dict-like object keeping track of allowed attention functions. You can easily add a new attention function
with a call to <code>register()</code>. If a model needs to locally overwrite an existing attention function, say <code>sdpa</code>,
it needs to declare a new instance of this class inside the <code>modeling_&lt;model&gt;.py</code>, and declare it on that instance.`,Bn,tt,he,nn,_e,on,G,be,Un,nt,Go=`Decorator function to update the RoPE parameters in the forward pass, if the model is using a dynamic RoPE
(i.e. a RoPE implementation that may recompute its frequencies in the forward pass).`,rn,$e,sn,z,ve,Xn,ot,Jo="1D-convolutional layer as defined by Radford et al. for OpenAI GPT (and also used in GPT-2).",Wn,rt,Zo="Basically works like a linear layer but the weights are transposed.",an,F,xe,Yn,st,Qo="Compute SQuAD start logits from sequence hidden states.",Kn,at,ye,dn,q,Te,eo,it,Ro="Compute SQuAD end logits from sequence hidden states.",to,te,we,no,ne,ln,S,Ce,oo,dt,Bo="Compute SQuAD 2.0 answer class from classification and start tokens hidden states.",ro,oe,ke,so,re,cn,J,Le,ao,lt,Uo='Base class for outputs of question answering models using a <a href="/docs/transformers/main/en/internal/modeling_utils#transformers.modeling_utils.SQuADHead">SQuADHead</a>.',mn,I,De,io,ct,Xo="A SQuAD head inspired by XLNet.",lo,mt,Pe,pn,A,ze,co,pt,Wo="Compute a single vector summary of a sequence hidden states.",mo,se,Fe,po,ft,Yo="Compute a single vector summary of a sequence hidden states.",fn,qe,un,C,Se,fo,ut,Ko=`This function chunks the <code>input_tensors</code> into smaller input tensor parts of size <code>chunk_size</code> over the dimension
<code>chunk_dim</code>. It then applies a layer <code>forward_fn</code> to each chunk independently to save memory.`,uo,gt,er=`If the <code>forward_fn</code> is independent across the <code>chunk_dim</code> this function will yield the same result as directly
applying <code>forward_fn</code> to <code>input_tensors</code>.`,go,ae,gn,Z,Ie,ho,ht,tr="Finds the heads and their indices taking <code>already_pruned_heads</code> into account.",hn,E,Ae,_o,_t,nr="Prune a Conv1D or linear layer to keep only entries in index.",bo,bt,or="Used to remove heads.",_n,M,Ee,$o,$t,rr=`Prune a Conv1D layer to keep only entries in index. A Conv1D work as a Linear layer (see e.g. BERT) but the weights
are transposed.`,vo,vt,sr="Used to remove heads.",bn,H,Me,xo,xt,ar="Prune a linear layer to keep only entries in index.",yo,yt,ir="Used to remove heads.",$n,He,vn,V,Ve,To,Tt,dr="1D-convolutional layer as defined by Radford et al. for OpenAI GPT (and also used in GPT-2).",wo,wt,lr="Basically works like a linear layer but the weights are transposed.",xn,Q,je,Co,Ct,cr="Compute a single vector summary of a sequence hidden states.",yn,Oe,Tn,j,Ne,ko,kt,mr="Loss function suitable for causal language modeling (CLM), that is, the task of guessing the next token.",Lo,ie,wn,O,Ge,Do,Lt,pr="Loss function suitable for masked language modeling (MLM), that is, the task of guessing the masked tokens.",Po,de,Cn,R,Je,zo,Dt,fr="Loss function suitable for multiple choice tasks.",kn,B,Ze,Fo,Pt,ur="Loss function suitable for question answering.",Ln,U,Qe,qo,zt,gr="Loss function suitable for sequence classification.",Dn,N,Re,So,Ft,hr="Loss function suitable for token classification.",Io,le,Pn,Be,zn,X,Ue,Ao,qt,_r="Creates a <code>keras.initializers.TruncatedNormal</code> with the given range.",Fn,k,Xe,Eo,St,br="Decorate a Keras Layer class to support Keras serialization.",Mo,It,$r="This is done by:",Ho,At,vr=`<li>Adding a <code>transformers_config</code> dict to the Keras config dictionary in <code>get_config</code> (called by Keras at
serialization time.</li> <li>Wrapping <code>__init__</code> to accept that <code>transformers_config</code> dict (passed by Keras at deserialization time) and
convert it to a config object for the actual layer initializer.</li> <li>Registering the class as a custom object in Keras (if the Tensorflow version supports this), so that it does not
need to be supplied in <code>custom_objects</code> in the call to <code>keras.models.load_model</code>.</li>`,qn,W,We,Vo,Et,xr="Deal with dynamic shape in tensorflow cleanly.",Sn,Ye,In,Ut,An;return L=new pe({props:{title:"Custom Layers and Utilities",local:"custom-layers-and-utilities",headingTag:"h1"}}),ue=new pe({props:{title:"Attention Functions",local:"transformers.AttentionInterface",headingTag:"h2"}}),ge=new v({props:{name:"class transformers.AttentionInterface",anchor:"transformers.AttentionInterface",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L5809"}}),he=new v({props:{name:"register",anchor:"transformers.AttentionInterface.register",parameters:[{name:"key",val:": str"},{name:"value",val:": typing.Callable"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L5847"}}),_e=new pe({props:{title:"Rotary Position Embedding Functions",local:"transformers.dynamic_rope_update",headingTag:"h2"}}),be=new v({props:{name:"transformers.dynamic_rope_update",anchor:"transformers.dynamic_rope_update",parameters:[{name:"rope_forward",val:""}],parametersDescription:[{anchor:"transformers.dynamic_rope_update.rope_forward",description:`<strong>rope_forward</strong> (Callable) &#x2014;
The forward pass of the RoPE implementation.`,name:"rope_forward"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_rope_utils.py#L30",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The decorated forward pass.</p>
`}}),$e=new pe({props:{title:"Pytorch custom modules",local:"transformers.Conv1D",headingTag:"h2"}}),ve=new v({props:{name:"class transformers.Conv1D",anchor:"transformers.Conv1D",parameters:[{name:"nf",val:""},{name:"nx",val:""}],parametersDescription:[{anchor:"transformers.Conv1D.nf",description:"<strong>nf</strong> (<code>int</code>) &#x2014; The number of output features.",name:"nf"},{anchor:"transformers.Conv1D.nx",description:"<strong>nx</strong> (<code>int</code>) &#x2014; The number of input features.",name:"nx"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pytorch_utils.py#L94"}}),xe=new v({props:{name:"class transformers.modeling_utils.PoolerStartLogits",anchor:"transformers.modeling_utils.PoolerStartLogits",parameters:[{name:"config",val:": PretrainedConfig"}],parametersDescription:[{anchor:"transformers.modeling_utils.PoolerStartLogits.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>) &#x2014;
The config used by the model, will be used to grab the <code>hidden_size</code> of the model.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L5281"}}),ye=new v({props:{name:"forward",anchor:"transformers.modeling_utils.PoolerStartLogits.forward",parameters:[{name:"hidden_states",val:": FloatTensor"},{name:"p_mask",val:": typing.Optional[torch.FloatTensor] = None"}],parametersDescription:[{anchor:"transformers.modeling_utils.PoolerStartLogits.forward.hidden_states",description:`<strong>hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, seq_len, hidden_size)</code>) &#x2014;
The final hidden states of the model.`,name:"hidden_states"},{anchor:"transformers.modeling_utils.PoolerStartLogits.forward.p_mask",description:`<strong>p_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, seq_len)</code>, <em>optional</em>) &#x2014;
Mask for tokens at invalid position, such as query and special symbols (PAD, SEP, CLS). 1.0 means token
should be masked.`,name:"p_mask"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L5294",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The start logits for SQuAD.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.FloatTensor</code></p>
`}}),Te=new v({props:{name:"class transformers.modeling_utils.PoolerEndLogits",anchor:"transformers.modeling_utils.PoolerEndLogits",parameters:[{name:"config",val:": PretrainedConfig"}],parametersDescription:[{anchor:"transformers.modeling_utils.PoolerEndLogits.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>) &#x2014;
The config used by the model, will be used to grab the <code>hidden_size</code> of the model and the <code>layer_norm_eps</code>
to use.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L5319"}}),we=new v({props:{name:"forward",anchor:"transformers.modeling_utils.PoolerEndLogits.forward",parameters:[{name:"hidden_states",val:": FloatTensor"},{name:"start_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"p_mask",val:": typing.Optional[torch.FloatTensor] = None"}],parametersDescription:[{anchor:"transformers.modeling_utils.PoolerEndLogits.forward.hidden_states",description:`<strong>hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, seq_len, hidden_size)</code>) &#x2014;
The final hidden states of the model.`,name:"hidden_states"},{anchor:"transformers.modeling_utils.PoolerEndLogits.forward.start_states",description:`<strong>start_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, seq_len, hidden_size)</code>, <em>optional</em>) &#x2014;
The hidden states of the first tokens for the labeled span.`,name:"start_states"},{anchor:"transformers.modeling_utils.PoolerEndLogits.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
The position of the first token for the labeled span.`,name:"start_positions"},{anchor:"transformers.modeling_utils.PoolerEndLogits.forward.p_mask",description:`<strong>p_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, seq_len)</code>, <em>optional</em>) &#x2014;
Mask for tokens at invalid position, such as query and special symbols (PAD, SEP, CLS). 1.0 means token
should be masked.`,name:"p_mask"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L5336",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The end logits for SQuAD.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.FloatTensor</code></p>
`}}),ne=new Yt({props:{$$slots:{default:[Fr]},$$scope:{ctx:w}}}),Ce=new v({props:{name:"class transformers.modeling_utils.PoolerAnswerClass",anchor:"transformers.modeling_utils.PoolerAnswerClass",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.modeling_utils.PoolerAnswerClass.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>) &#x2014;
The config used by the model, will be used to grab the <code>hidden_size</code> of the model.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L5388"}}),ke=new v({props:{name:"forward",anchor:"transformers.modeling_utils.PoolerAnswerClass.forward",parameters:[{name:"hidden_states",val:": FloatTensor"},{name:"start_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"cls_index",val:": typing.Optional[torch.LongTensor] = None"}],parametersDescription:[{anchor:"transformers.modeling_utils.PoolerAnswerClass.forward.hidden_states",description:`<strong>hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, seq_len, hidden_size)</code>) &#x2014;
The final hidden states of the model.`,name:"hidden_states"},{anchor:"transformers.modeling_utils.PoolerAnswerClass.forward.start_states",description:`<strong>start_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, seq_len, hidden_size)</code>, <em>optional</em>) &#x2014;
The hidden states of the first tokens for the labeled span.`,name:"start_states"},{anchor:"transformers.modeling_utils.PoolerAnswerClass.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
The position of the first token for the labeled span.`,name:"start_positions"},{anchor:"transformers.modeling_utils.PoolerAnswerClass.forward.cls_index",description:`<strong>cls_index</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Position of the CLS token for each sentence in the batch. If <code>None</code>, takes the last token.`,name:"cls_index"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L5403",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The SQuAD 2.0 answer class.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.FloatTensor</code></p>
`}}),re=new Yt({props:{$$slots:{default:[qr]},$$scope:{ctx:w}}}),Le=new v({props:{name:"class transformers.modeling_utils.SquadHeadOutput",anchor:"transformers.modeling_utils.SquadHeadOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_top_log_probs",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_top_index",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_top_log_probs",val:": typing.Optional[torch.FloatTensor] = None"},{name:"end_top_index",val:": typing.Optional[torch.LongTensor] = None"},{name:"cls_logits",val:": typing.Optional[torch.FloatTensor] = None"}],parametersDescription:[{anchor:"transformers.modeling_utils.SquadHeadOutput.loss",description:`<strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned if both <code>start_positions</code> and <code>end_positions</code> are provided) &#x2014;
Classification loss as the sum of start token, end token (and is_impossible if provided) classification
losses.`,name:"loss"},{anchor:"transformers.modeling_utils.SquadHeadOutput.start_top_log_probs",description:`<strong>start_top_log_probs</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.start_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) &#x2014;
Log probabilities for the top config.start_n_top start token possibilities (beam-search).`,name:"start_top_log_probs"},{anchor:"transformers.modeling_utils.SquadHeadOutput.start_top_index",description:`<strong>start_top_index</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, config.start_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) &#x2014;
Indices for the top config.start_n_top start token possibilities (beam-search).`,name:"start_top_index"},{anchor:"transformers.modeling_utils.SquadHeadOutput.end_top_log_probs",description:`<strong>end_top_log_probs</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.start_n_top * config.end_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) &#x2014;
Log probabilities for the top <code>config.start_n_top * config.end_n_top</code> end token possibilities
(beam-search).`,name:"end_top_log_probs"},{anchor:"transformers.modeling_utils.SquadHeadOutput.end_top_index",description:`<strong>end_top_index</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, config.start_n_top * config.end_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) &#x2014;
Indices for the top <code>config.start_n_top * config.end_n_top</code> end token possibilities (beam-search).`,name:"end_top_index"},{anchor:"transformers.modeling_utils.SquadHeadOutput.cls_logits",description:`<strong>cls_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) &#x2014;
Log probabilities for the <code>is_impossible</code> label of the answers.`,name:"cls_logits"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L5453"}}),De=new v({props:{name:"class transformers.modeling_utils.SQuADHead",anchor:"transformers.modeling_utils.SQuADHead",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.modeling_utils.SQuADHead.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>) &#x2014;
The config used by the model, will be used to grab the <code>hidden_size</code> of the model and the <code>layer_norm_eps</code>
to use.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L5484"}}),Pe=new v({props:{name:"forward",anchor:"transformers.modeling_utils.SQuADHead.forward",parameters:[{name:"hidden_states",val:": FloatTensor"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"cls_index",val:": typing.Optional[torch.LongTensor] = None"},{name:"is_impossible",val:": typing.Optional[torch.LongTensor] = None"},{name:"p_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"return_dict",val:": bool = False"}],parametersDescription:[{anchor:"transformers.modeling_utils.SQuADHead.forward.hidden_states",description:`<strong>hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, seq_len, hidden_size)</code>) &#x2014;
Final hidden states of the model on the sequence tokens.`,name:"hidden_states"},{anchor:"transformers.modeling_utils.SQuADHead.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Positions of the first token for the labeled span.`,name:"start_positions"},{anchor:"transformers.modeling_utils.SQuADHead.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Positions of the last token for the labeled span.`,name:"end_positions"},{anchor:"transformers.modeling_utils.SQuADHead.forward.cls_index",description:`<strong>cls_index</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Position of the CLS token for each sentence in the batch. If <code>None</code>, takes the last token.`,name:"cls_index"},{anchor:"transformers.modeling_utils.SQuADHead.forward.is_impossible",description:`<strong>is_impossible</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Whether the question has a possible answer in the paragraph or not.`,name:"is_impossible"},{anchor:"transformers.modeling_utils.SQuADHead.forward.p_mask",description:`<strong>p_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, seq_len)</code>, <em>optional</em>) &#x2014;
Mask for tokens at invalid position, such as query and special symbols (PAD, SEP, CLS). 1.0 means token
should be masked.`,name:"p_mask"},{anchor:"transformers.modeling_utils.SQuADHead.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L5503",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/main/en/internal/modeling_utils#transformers.modeling_utils.SquadHeadOutput"
>transformers.modeling_utils.SquadHeadOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<code>&lt;class 'transformers.configuration_utils.PretrainedConfig'&gt;</code>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned if both <code>start_positions</code> and <code>end_positions</code> are provided) — Classification loss as the sum of start token, end token (and is_impossible if provided) classification
losses.</li>
<li><strong>start_top_log_probs</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.start_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) — Log probabilities for the top config.start_n_top start token possibilities (beam-search).</li>
<li><strong>start_top_index</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, config.start_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) — Indices for the top config.start_n_top start token possibilities (beam-search).</li>
<li><strong>end_top_log_probs</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.start_n_top * config.end_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) — Log probabilities for the top <code>config.start_n_top * config.end_n_top</code> end token possibilities
(beam-search).</li>
<li><strong>end_top_index</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, config.start_n_top * config.end_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) — Indices for the top <code>config.start_n_top * config.end_n_top</code> end token possibilities (beam-search).</li>
<li><strong>cls_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) — Log probabilities for the <code>is_impossible</code> label of the answers.</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/internal/modeling_utils#transformers.modeling_utils.SquadHeadOutput"
>transformers.modeling_utils.SquadHeadOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ze=new v({props:{name:"class transformers.modeling_utils.SequenceSummary",anchor:"transformers.modeling_utils.SequenceSummary",parameters:[{name:"config",val:": PretrainedConfig"}],parametersDescription:[{anchor:"transformers.modeling_utils.SequenceSummary.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>) &#x2014;
The config used by the model. Relevant arguments in the config class of the model are (refer to the actual
config class of your model for the default values it uses):</p>
<ul>
<li>
<p><strong>summary_type</strong> (<code>str</code>) &#x2014; The method to use to make this summary. Accepted values are:</p>
<ul>
<li><code>&quot;last&quot;</code> &#x2014; Take the last token hidden state (like XLNet)</li>
<li><code>&quot;first&quot;</code> &#x2014; Take the first token hidden state (like Bert)</li>
<li><code>&quot;mean&quot;</code> &#x2014; Take the mean of all tokens hidden states</li>
<li><code>&quot;cls_index&quot;</code> &#x2014; Supply a Tensor of classification token position (GPT/GPT-2)</li>
<li><code>&quot;attn&quot;</code> &#x2014; Not implemented now, use multi-head attention</li>
</ul>
</li>
<li>
<p><strong>summary_use_proj</strong> (<code>bool</code>) &#x2014; Add a projection after the vector extraction.</p>
</li>
<li>
<p><strong>summary_proj_to_labels</strong> (<code>bool</code>) &#x2014; If <code>True</code>, the projection outputs to <code>config.num_labels</code> classes
(otherwise to <code>config.hidden_size</code>).</p>
</li>
<li>
<p><strong>summary_activation</strong> (<code>Optional[str]</code>) &#x2014; Set to <code>&quot;tanh&quot;</code> to add a tanh activation to the output,
another string or <code>None</code> will add no activation.</p>
</li>
<li>
<p><strong>summary_first_dropout</strong> (<code>float</code>) &#x2014; Optional dropout probability before the projection and activation.</p>
</li>
<li>
<p><strong>summary_last_dropout</strong> (<code>float</code>)&#x2014; Optional dropout probability after the projection and activation.</p>
</li>
</ul>`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L5601"}}),Fe=new v({props:{name:"forward",anchor:"transformers.modeling_utils.SequenceSummary.forward",parameters:[{name:"hidden_states",val:": FloatTensor"},{name:"cls_index",val:": typing.Optional[torch.LongTensor] = None"}],parametersDescription:[{anchor:"transformers.modeling_utils.SequenceSummary.forward.hidden_states",description:`<strong>hidden_states</strong> (<code>torch.FloatTensor</code> of shape <code>[batch_size, seq_len, hidden_size]</code>) &#x2014;
The hidden states of the last layer.`,name:"hidden_states"},{anchor:"transformers.modeling_utils.SequenceSummary.forward.cls_index",description:`<strong>cls_index</strong> (<code>torch.LongTensor</code> of shape <code>[batch_size]</code> or <code>[batch_size, ...]</code> where &#x2026; are optional leading dimensions of <code>hidden_states</code>, <em>optional</em>) &#x2014;
Used if <code>summary_type == &quot;cls_index&quot;</code> and takes the last token of the sequence as classification token.`,name:"cls_index"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L5656",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The summary of the sequence hidden states.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.FloatTensor</code></p>
`}}),qe=new pe({props:{title:"PyTorch Helper Functions",local:"transformers.apply_chunking_to_forward",headingTag:"h2"}}),Se=new v({props:{name:"transformers.apply_chunking_to_forward",anchor:"transformers.apply_chunking_to_forward",parameters:[{name:"forward_fn",val:": Callable[..., torch.Tensor]"},{name:"chunk_size",val:": int"},{name:"chunk_dim",val:": int"},{name:"*input_tensors",val:""}],parametersDescription:[{anchor:"transformers.apply_chunking_to_forward.forward_fn",description:`<strong>forward_fn</strong> (<code>Callable[..., torch.Tensor]</code>) &#x2014;
The forward function of the model.`,name:"forward_fn"},{anchor:"transformers.apply_chunking_to_forward.chunk_size",description:`<strong>chunk_size</strong> (<code>int</code>) &#x2014;
The chunk size of a chunked tensor: <code>num_chunks = len(input_tensors[0]) / chunk_size</code>.`,name:"chunk_size"},{anchor:"transformers.apply_chunking_to_forward.chunk_dim",description:`<strong>chunk_dim</strong> (<code>int</code>) &#x2014;
The dimension over which the <code>input_tensors</code> should be chunked.`,name:"chunk_dim"},{anchor:"transformers.apply_chunking_to_forward.input_tensors",description:`<strong>input_tensors</strong> (<code>Tuple[torch.Tensor]</code>) &#x2014;
The input tensors of <code>forward_fn</code> which will be chunked`,name:"input_tensors"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pytorch_utils.py#L178",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A tensor with the same shape as the <code>forward_fn</code> would have given if applied\`.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.Tensor</code></p>
`}}),ae=new Pr({props:{anchor:"transformers.apply_chunking_to_forward.example",$$slots:{default:[Sr]},$$scope:{ctx:w}}}),Ie=new v({props:{name:"transformers.pytorch_utils.find_pruneable_heads_and_indices",anchor:"transformers.pytorch_utils.find_pruneable_heads_and_indices",parameters:[{name:"heads",val:": list[int]"},{name:"n_heads",val:": int"},{name:"head_size",val:": int"},{name:"already_pruned_heads",val:": set[int]"}],parametersDescription:[{anchor:"transformers.pytorch_utils.find_pruneable_heads_and_indices.heads",description:"<strong>heads</strong> (<code>List[int]</code>) &#x2014; List of the indices of heads to prune.",name:"heads"},{anchor:"transformers.pytorch_utils.find_pruneable_heads_and_indices.n_heads",description:"<strong>n_heads</strong> (<code>int</code>) &#x2014; The number of heads in the model.",name:"n_heads"},{anchor:"transformers.pytorch_utils.find_pruneable_heads_and_indices.head_size",description:"<strong>head_size</strong> (<code>int</code>) &#x2014; The size of each head.",name:"head_size"},{anchor:"transformers.pytorch_utils.find_pruneable_heads_and_indices.already_pruned_heads",description:"<strong>already_pruned_heads</strong> (<code>Set[int]</code>) &#x2014; A set of already pruned heads.",name:"already_pruned_heads"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pytorch_utils.py#L256",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A tuple with the indices of heads to prune taking <code>already_pruned_heads</code>
into account and the indices of rows/columns to keep in the layer weight.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>Tuple[Set[int], torch.LongTensor]</code></p>
`}}),Ae=new v({props:{name:"transformers.prune_layer",anchor:"transformers.prune_layer",parameters:[{name:"layer",val:": nn.Linear | Conv1D"},{name:"index",val:": torch.LongTensor"},{name:"dim",val:": int | None = None"}],parametersDescription:[{anchor:"transformers.prune_layer.layer",description:"<strong>layer</strong> (<code>Union[torch.nn.Linear, Conv1D]</code>) &#x2014; The layer to prune.",name:"layer"},{anchor:"transformers.prune_layer.index",description:"<strong>index</strong> (<code>torch.LongTensor</code>) &#x2014; The indices to keep in the layer.",name:"index"},{anchor:"transformers.prune_layer.dim",description:"<strong>dim</strong> (<code>int</code>, <em>optional</em>) &#x2014; The dimension on which to keep the indices.",name:"dim"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pytorch_utils.py#L156",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The pruned layer as a new layer with <code>requires_grad=True</code>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.nn.Linear</code> or <a
  href="/docs/transformers/main/en/internal/modeling_utils#transformers.Conv1D"
>Conv1D</a></p>
`}}),Ee=new v({props:{name:"transformers.pytorch_utils.prune_conv1d_layer",anchor:"transformers.pytorch_utils.prune_conv1d_layer",parameters:[{name:"layer",val:": Conv1D"},{name:"index",val:": torch.LongTensor"},{name:"dim",val:": int = 1"}],parametersDescription:[{anchor:"transformers.pytorch_utils.prune_conv1d_layer.layer",description:'<strong>layer</strong> (<a href="/docs/transformers/main/en/internal/modeling_utils#transformers.Conv1D">Conv1D</a>) &#x2014; The layer to prune.',name:"layer"},{anchor:"transformers.pytorch_utils.prune_conv1d_layer.index",description:"<strong>index</strong> (<code>torch.LongTensor</code>) &#x2014; The indices to keep in the layer.",name:"index"},{anchor:"transformers.pytorch_utils.prune_conv1d_layer.dim",description:"<strong>dim</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014; The dimension on which to keep the indices.",name:"dim"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pytorch_utils.py#L123",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The pruned layer as a new layer with <code>requires_grad=True</code>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/main/en/internal/modeling_utils#transformers.Conv1D"
>Conv1D</a></p>
`}}),Me=new v({props:{name:"transformers.pytorch_utils.prune_linear_layer",anchor:"transformers.pytorch_utils.prune_linear_layer",parameters:[{name:"layer",val:": nn.Linear"},{name:"index",val:": torch.LongTensor"},{name:"dim",val:": int = 0"}],parametersDescription:[{anchor:"transformers.pytorch_utils.prune_linear_layer.layer",description:"<strong>layer</strong> (<code>torch.nn.Linear</code>) &#x2014; The layer to prune.",name:"layer"},{anchor:"transformers.pytorch_utils.prune_linear_layer.index",description:"<strong>index</strong> (<code>torch.LongTensor</code>) &#x2014; The indices to keep in the layer.",name:"index"},{anchor:"transformers.pytorch_utils.prune_linear_layer.dim",description:"<strong>dim</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014; The dimension on which to keep the indices.",name:"dim"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/pytorch_utils.py#L60",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The pruned layer as a new layer with <code>requires_grad=True</code>.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>torch.nn.Linear</code></p>
`}}),He=new pe({props:{title:"TensorFlow custom layers",local:"transformers.modeling_tf_utils.TFConv1D",headingTag:"h2"}}),Ve=new v({props:{name:"class transformers.modeling_tf_utils.TFConv1D",anchor:"transformers.modeling_tf_utils.TFConv1D",parameters:[{name:"nf",val:""},{name:"nx",val:""},{name:"initializer_range",val:" = 0.02"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.modeling_tf_utils.TFConv1D.nf",description:`<strong>nf</strong> (<code>int</code>) &#x2014;
The number of output features.`,name:"nf"},{anchor:"transformers.modeling_tf_utils.TFConv1D.nx",description:`<strong>nx</strong> (<code>int</code>) &#x2014;
The number of input features.`,name:"nx"},{anchor:"transformers.modeling_tf_utils.TFConv1D.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation to use to initialize the weights.`,name:"initializer_range"},{anchor:"transformers.modeling_tf_utils.TFConv1D.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments passed along to the <code>__init__</code> of <code>keras.layers.Layer</code>.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L3253"}}),je=new v({props:{name:"class transformers.TFSequenceSummary",anchor:"transformers.TFSequenceSummary",parameters:[{name:"config",val:": PretrainedConfig"},{name:"initializer_range",val:": float = 0.02"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFSequenceSummary.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a>) &#x2014;
The config used by the model. Relevant arguments in the config class of the model are (refer to the actual
config class of your model for the default values it uses):</p>
<ul>
<li>
<p><strong>summary_type</strong> (<code>str</code>) &#x2014; The method to use to make this summary. Accepted values are:</p>
<ul>
<li><code>&quot;last&quot;</code> &#x2014; Take the last token hidden state (like XLNet)</li>
<li><code>&quot;first&quot;</code> &#x2014; Take the first token hidden state (like Bert)</li>
<li><code>&quot;mean&quot;</code> &#x2014; Take the mean of all tokens hidden states</li>
<li><code>&quot;cls_index&quot;</code> &#x2014; Supply a Tensor of classification token position (GPT/GPT-2)</li>
<li><code>&quot;attn&quot;</code> &#x2014; Not implemented now, use multi-head attention</li>
</ul>
</li>
<li>
<p><strong>summary_use_proj</strong> (<code>bool</code>) &#x2014; Add a projection after the vector extraction.</p>
</li>
<li>
<p><strong>summary_proj_to_labels</strong> (<code>bool</code>) &#x2014; If <code>True</code>, the projection outputs to <code>config.num_labels</code> classes
(otherwise to <code>config.hidden_size</code>).</p>
</li>
<li>
<p><strong>summary_activation</strong> (<code>Optional[str]</code>) &#x2014; Set to <code>&quot;tanh&quot;</code> to add a tanh activation to the output,
another string or <code>None</code> will add no activation.</p>
</li>
<li>
<p><strong>summary_first_dropout</strong> (<code>float</code>) &#x2014; Optional dropout probability before the projection and activation.</p>
</li>
<li>
<p><strong>summary_last_dropout</strong> (<code>float</code>)&#x2014; Optional dropout probability after the projection and activation.</p>
</li>
</ul>`,name:"config"},{anchor:"transformers.TFSequenceSummary.initializer_range",description:"<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014; The standard deviation to use to initialize the weights.",name:"initializer_range"},{anchor:"transformers.TFSequenceSummary.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, Any]</code>, <em>optional</em>) &#x2014;
Additional keyword arguments passed along to the <code>__init__</code> of <code>keras.layers.Layer</code>.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L3400"}}),Oe=new pe({props:{title:"TensorFlow loss functions",local:"transformers.modeling_tf_utils.TFCausalLanguageModelingLoss",headingTag:"h2"}}),Ne=new v({props:{name:"class transformers.modeling_tf_utils.TFCausalLanguageModelingLoss",anchor:"transformers.modeling_tf_utils.TFCausalLanguageModelingLoss",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L213"}}),ie=new Yt({props:{$$slots:{default:[Ir]},$$scope:{ctx:w}}}),Ge=new v({props:{name:"class transformers.modeling_tf_utils.TFMaskedLanguageModelingLoss",anchor:"transformers.modeling_tf_utils.TFMaskedLanguageModelingLoss",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L324"}}),de=new Yt({props:{$$slots:{default:[Ar]},$$scope:{ctx:w}}}),Je=new v({props:{name:"class transformers.modeling_tf_utils.TFMultipleChoiceLoss",anchor:"transformers.modeling_tf_utils.TFMultipleChoiceLoss",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L316"}}),Ze=new v({props:{name:"class transformers.modeling_tf_utils.TFQuestionAnsweringLoss",anchor:"transformers.modeling_tf_utils.TFQuestionAnsweringLoss",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L242"}}),Qe=new v({props:{name:"class transformers.modeling_tf_utils.TFSequenceClassificationLoss",anchor:"transformers.modeling_tf_utils.TFSequenceClassificationLoss",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L297"}}),Re=new v({props:{name:"class transformers.modeling_tf_utils.TFTokenClassificationLoss",anchor:"transformers.modeling_tf_utils.TFTokenClassificationLoss",parameters:[],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L255"}}),le=new Yt({props:{$$slots:{default:[Er]},$$scope:{ctx:w}}}),Be=new pe({props:{title:"TensorFlow Helper Functions",local:"transformers.modeling_tf_utils.get_initializer",headingTag:"h2"}}),Ue=new v({props:{name:"transformers.modeling_tf_utils.get_initializer",anchor:"transformers.modeling_tf_utils.get_initializer",parameters:[{name:"initializer_range",val:": float = 0.02"}],parametersDescription:[{anchor:"transformers.modeling_tf_utils.get_initializer.initializer_range",description:"<strong>initializer_range</strong> (<em>float</em>, defaults to 0.02) &#x2014; Standard deviation of the initializer range.",name:"initializer_range"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L3525",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The truncated normal initializer.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>keras.initializers.TruncatedNormal</code></p>
`}}),Xe=new v({props:{name:"transformers.modeling_tf_utils.keras_serializable",anchor:"transformers.modeling_tf_utils.keras_serializable",parameters:[],parametersDescription:[{anchor:"transformers.modeling_tf_utils.keras_serializable.cls",description:`<strong>cls</strong> (a <code>keras.layers.Layers subclass</code>) &#x2014;
Typically a <code>TF.MainLayer</code> class in this project, in general must accept a <code>config</code> argument to its
initializer.`,name:"cls"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_tf_utils.py#L148",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The same class object, with modifications for Keras deserialization.</p>
`}}),We=new v({props:{name:"transformers.shape_list",anchor:"transformers.shape_list",parameters:[{name:"tensor",val:": typing.Union[tensorflow.python.framework.tensor.Tensor, numpy.ndarray]"}],parametersDescription:[{anchor:"transformers.shape_list.tensor",description:"<strong>tensor</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code>) &#x2014; The tensor we want the shape of.",name:"tensor"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/tf_utils.py#L28",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>The shape of the tensor as a list.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),Ye=new zr({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/internal/modeling_utils.md"}}),{c(){l=a("meta"),x=r(),_=a("p"),y=r(),c(L.$$.fragment),T=r(),D=a("p"),D.textContent=jo,Kt=r(),fe=a("p"),fe.textContent=Oo,en=r(),c(ue.$$.fragment),tn=r(),P=a("div"),c(ge.$$.fragment),Rn=r(),et=a("p"),et.innerHTML=No,Bn=r(),tt=a("div"),c(he.$$.fragment),nn=r(),c(_e.$$.fragment),on=r(),G=a("div"),c(be.$$.fragment),Un=r(),nt=a("p"),nt.textContent=Go,rn=r(),c($e.$$.fragment),sn=r(),z=a("div"),c(ve.$$.fragment),Xn=r(),ot=a("p"),ot.textContent=Jo,Wn=r(),rt=a("p"),rt.textContent=Zo,an=r(),F=a("div"),c(xe.$$.fragment),Yn=r(),st=a("p"),st.textContent=Qo,Kn=r(),at=a("div"),c(ye.$$.fragment),dn=r(),q=a("div"),c(Te.$$.fragment),eo=r(),it=a("p"),it.textContent=Ro,to=r(),te=a("div"),c(we.$$.fragment),no=r(),c(ne.$$.fragment),ln=r(),S=a("div"),c(Ce.$$.fragment),oo=r(),dt=a("p"),dt.textContent=Bo,ro=r(),oe=a("div"),c(ke.$$.fragment),so=r(),c(re.$$.fragment),cn=r(),J=a("div"),c(Le.$$.fragment),ao=r(),lt=a("p"),lt.innerHTML=Uo,mn=r(),I=a("div"),c(De.$$.fragment),io=r(),ct=a("p"),ct.textContent=Xo,lo=r(),mt=a("div"),c(Pe.$$.fragment),pn=r(),A=a("div"),c(ze.$$.fragment),co=r(),pt=a("p"),pt.textContent=Wo,mo=r(),se=a("div"),c(Fe.$$.fragment),po=r(),ft=a("p"),ft.textContent=Yo,fn=r(),c(qe.$$.fragment),un=r(),C=a("div"),c(Se.$$.fragment),fo=r(),ut=a("p"),ut.innerHTML=Ko,uo=r(),gt=a("p"),gt.innerHTML=er,go=r(),c(ae.$$.fragment),gn=r(),Z=a("div"),c(Ie.$$.fragment),ho=r(),ht=a("p"),ht.innerHTML=tr,hn=r(),E=a("div"),c(Ae.$$.fragment),_o=r(),_t=a("p"),_t.textContent=nr,bo=r(),bt=a("p"),bt.textContent=or,_n=r(),M=a("div"),c(Ee.$$.fragment),$o=r(),$t=a("p"),$t.textContent=rr,vo=r(),vt=a("p"),vt.textContent=sr,bn=r(),H=a("div"),c(Me.$$.fragment),xo=r(),xt=a("p"),xt.textContent=ar,yo=r(),yt=a("p"),yt.textContent=ir,$n=r(),c(He.$$.fragment),vn=r(),V=a("div"),c(Ve.$$.fragment),To=r(),Tt=a("p"),Tt.textContent=dr,wo=r(),wt=a("p"),wt.textContent=lr,xn=r(),Q=a("div"),c(je.$$.fragment),Co=r(),Ct=a("p"),Ct.textContent=cr,yn=r(),c(Oe.$$.fragment),Tn=r(),j=a("div"),c(Ne.$$.fragment),ko=r(),kt=a("p"),kt.textContent=mr,Lo=r(),c(ie.$$.fragment),wn=r(),O=a("div"),c(Ge.$$.fragment),Do=r(),Lt=a("p"),Lt.textContent=pr,Po=r(),c(de.$$.fragment),Cn=r(),R=a("div"),c(Je.$$.fragment),zo=r(),Dt=a("p"),Dt.textContent=fr,kn=r(),B=a("div"),c(Ze.$$.fragment),Fo=r(),Pt=a("p"),Pt.textContent=ur,Ln=r(),U=a("div"),c(Qe.$$.fragment),qo=r(),zt=a("p"),zt.textContent=gr,Dn=r(),N=a("div"),c(Re.$$.fragment),So=r(),Ft=a("p"),Ft.textContent=hr,Io=r(),c(le.$$.fragment),Pn=r(),c(Be.$$.fragment),zn=r(),X=a("div"),c(Ue.$$.fragment),Ao=r(),qt=a("p"),qt.innerHTML=_r,Fn=r(),k=a("div"),c(Xe.$$.fragment),Eo=r(),St=a("p"),St.textContent=br,Mo=r(),It=a("p"),It.textContent=$r,Ho=r(),At=a("ol"),At.innerHTML=vr,qn=r(),W=a("div"),c(We.$$.fragment),Vo=r(),Et=a("p"),Et.textContent=xr,Sn=r(),c(Ye.$$.fragment),In=r(),Ut=a("p"),this.h()},l(e){const n=Lr("svelte-u9bgzb",document.head);l=i(n,"META",{name:!0,content:!0}),n.forEach(t),x=s(e),_=i(e,"P",{}),b(_).forEach(t),y=s(e),m(L.$$.fragment,e),T=s(e),D=i(e,"P",{"data-svelte-h":!0}),h(D)!=="svelte-1xex0ip"&&(D.textContent=jo),Kt=s(e),fe=i(e,"P",{"data-svelte-h":!0}),h(fe)!=="svelte-1ui7w53"&&(fe.textContent=Oo),en=s(e),m(ue.$$.fragment,e),tn=s(e),P=i(e,"DIV",{class:!0});var Y=b(P);m(ge.$$.fragment,Y),Rn=s(Y),et=i(Y,"P",{"data-svelte-h":!0}),h(et)!=="svelte-1md8jok"&&(et.innerHTML=No),Bn=s(Y),tt=i(Y,"DIV",{class:!0});var Xt=b(tt);m(he.$$.fragment,Xt),Xt.forEach(t),Y.forEach(t),nn=s(e),m(_e.$$.fragment,e),on=s(e),G=i(e,"DIV",{class:!0});var Ke=b(G);m(be.$$.fragment,Ke),Un=s(Ke),nt=i(Ke,"P",{"data-svelte-h":!0}),h(nt)!=="svelte-199au1f"&&(nt.textContent=Go),Ke.forEach(t),rn=s(e),m($e.$$.fragment,e),sn=s(e),z=i(e,"DIV",{class:!0});var K=b(z);m(ve.$$.fragment,K),Xn=s(K),ot=i(K,"P",{"data-svelte-h":!0}),h(ot)!=="svelte-1lta4gb"&&(ot.textContent=Jo),Wn=s(K),rt=i(K,"P",{"data-svelte-h":!0}),h(rt)!=="svelte-6u0wx8"&&(rt.textContent=Zo),K.forEach(t),an=s(e),F=i(e,"DIV",{class:!0});var ee=b(F);m(xe.$$.fragment,ee),Yn=s(ee),st=i(ee,"P",{"data-svelte-h":!0}),h(st)!=="svelte-nykzs4"&&(st.textContent=Qo),Kn=s(ee),at=i(ee,"DIV",{class:!0});var Wt=b(at);m(ye.$$.fragment,Wt),Wt.forEach(t),ee.forEach(t),dn=s(e),q=i(e,"DIV",{class:!0});var Mt=b(q);m(Te.$$.fragment,Mt),eo=s(Mt),it=i(Mt,"P",{"data-svelte-h":!0}),h(it)!=="svelte-1xgtkjp"&&(it.textContent=Ro),to=s(Mt),te=i(Mt,"DIV",{class:!0});var En=b(te);m(we.$$.fragment,En),no=s(En),m(ne.$$.fragment,En),En.forEach(t),Mt.forEach(t),ln=s(e),S=i(e,"DIV",{class:!0});var Ht=b(S);m(Ce.$$.fragment,Ht),oo=s(Ht),dt=i(Ht,"P",{"data-svelte-h":!0}),h(dt)!=="svelte-i1ac0w"&&(dt.textContent=Bo),ro=s(Ht),oe=i(Ht,"DIV",{class:!0});var Mn=b(oe);m(ke.$$.fragment,Mn),so=s(Mn),m(re.$$.fragment,Mn),Mn.forEach(t),Ht.forEach(t),cn=s(e),J=i(e,"DIV",{class:!0});var Hn=b(J);m(Le.$$.fragment,Hn),ao=s(Hn),lt=i(Hn,"P",{"data-svelte-h":!0}),h(lt)!=="svelte-1rfgevq"&&(lt.innerHTML=Uo),Hn.forEach(t),mn=s(e),I=i(e,"DIV",{class:!0});var Vt=b(I);m(De.$$.fragment,Vt),io=s(Vt),ct=i(Vt,"P",{"data-svelte-h":!0}),h(ct)!=="svelte-vm79b9"&&(ct.textContent=Xo),lo=s(Vt),mt=i(Vt,"DIV",{class:!0});var yr=b(mt);m(Pe.$$.fragment,yr),yr.forEach(t),Vt.forEach(t),pn=s(e),A=i(e,"DIV",{class:!0});var jt=b(A);m(ze.$$.fragment,jt),co=s(jt),pt=i(jt,"P",{"data-svelte-h":!0}),h(pt)!=="svelte-1cor2i2"&&(pt.textContent=Wo),mo=s(jt),se=i(jt,"DIV",{class:!0});var Vn=b(se);m(Fe.$$.fragment,Vn),po=s(Vn),ft=i(Vn,"P",{"data-svelte-h":!0}),h(ft)!=="svelte-1cor2i2"&&(ft.textContent=Yo),Vn.forEach(t),jt.forEach(t),fn=s(e),m(qe.$$.fragment,e),un=s(e),C=i(e,"DIV",{class:!0});var ce=b(C);m(Se.$$.fragment,ce),fo=s(ce),ut=i(ce,"P",{"data-svelte-h":!0}),h(ut)!=="svelte-16kfis2"&&(ut.innerHTML=Ko),uo=s(ce),gt=i(ce,"P",{"data-svelte-h":!0}),h(gt)!=="svelte-1ufp6tv"&&(gt.innerHTML=er),go=s(ce),m(ae.$$.fragment,ce),ce.forEach(t),gn=s(e),Z=i(e,"DIV",{class:!0});var jn=b(Z);m(Ie.$$.fragment,jn),ho=s(jn),ht=i(jn,"P",{"data-svelte-h":!0}),h(ht)!=="svelte-o28a6l"&&(ht.innerHTML=tr),jn.forEach(t),hn=s(e),E=i(e,"DIV",{class:!0});var Ot=b(E);m(Ae.$$.fragment,Ot),_o=s(Ot),_t=i(Ot,"P",{"data-svelte-h":!0}),h(_t)!=="svelte-by2rhc"&&(_t.textContent=nr),bo=s(Ot),bt=i(Ot,"P",{"data-svelte-h":!0}),h(bt)!=="svelte-14zrzk1"&&(bt.textContent=or),Ot.forEach(t),_n=s(e),M=i(e,"DIV",{class:!0});var Nt=b(M);m(Ee.$$.fragment,Nt),$o=s(Nt),$t=i(Nt,"P",{"data-svelte-h":!0}),h($t)!=="svelte-1xogpwx"&&($t.textContent=rr),vo=s(Nt),vt=i(Nt,"P",{"data-svelte-h":!0}),h(vt)!=="svelte-14zrzk1"&&(vt.textContent=sr),Nt.forEach(t),bn=s(e),H=i(e,"DIV",{class:!0});var Gt=b(H);m(Me.$$.fragment,Gt),xo=s(Gt),xt=i(Gt,"P",{"data-svelte-h":!0}),h(xt)!=="svelte-1edz4x0"&&(xt.textContent=ar),yo=s(Gt),yt=i(Gt,"P",{"data-svelte-h":!0}),h(yt)!=="svelte-14zrzk1"&&(yt.textContent=ir),Gt.forEach(t),$n=s(e),m(He.$$.fragment,e),vn=s(e),V=i(e,"DIV",{class:!0});var Jt=b(V);m(Ve.$$.fragment,Jt),To=s(Jt),Tt=i(Jt,"P",{"data-svelte-h":!0}),h(Tt)!=="svelte-1lta4gb"&&(Tt.textContent=dr),wo=s(Jt),wt=i(Jt,"P",{"data-svelte-h":!0}),h(wt)!=="svelte-6u0wx8"&&(wt.textContent=lr),Jt.forEach(t),xn=s(e),Q=i(e,"DIV",{class:!0});var On=b(Q);m(je.$$.fragment,On),Co=s(On),Ct=i(On,"P",{"data-svelte-h":!0}),h(Ct)!=="svelte-1cor2i2"&&(Ct.textContent=cr),On.forEach(t),yn=s(e),m(Oe.$$.fragment,e),Tn=s(e),j=i(e,"DIV",{class:!0});var Zt=b(j);m(Ne.$$.fragment,Zt),ko=s(Zt),kt=i(Zt,"P",{"data-svelte-h":!0}),h(kt)!=="svelte-1obn9c"&&(kt.textContent=mr),Lo=s(Zt),m(ie.$$.fragment,Zt),Zt.forEach(t),wn=s(e),O=i(e,"DIV",{class:!0});var Qt=b(O);m(Ge.$$.fragment,Qt),Do=s(Qt),Lt=i(Qt,"P",{"data-svelte-h":!0}),h(Lt)!=="svelte-16f7wip"&&(Lt.textContent=pr),Po=s(Qt),m(de.$$.fragment,Qt),Qt.forEach(t),Cn=s(e),R=i(e,"DIV",{class:!0});var Nn=b(R);m(Je.$$.fragment,Nn),zo=s(Nn),Dt=i(Nn,"P",{"data-svelte-h":!0}),h(Dt)!=="svelte-yqule2"&&(Dt.textContent=fr),Nn.forEach(t),kn=s(e),B=i(e,"DIV",{class:!0});var Gn=b(B);m(Ze.$$.fragment,Gn),Fo=s(Gn),Pt=i(Gn,"P",{"data-svelte-h":!0}),h(Pt)!=="svelte-1mrk13b"&&(Pt.textContent=ur),Gn.forEach(t),Ln=s(e),U=i(e,"DIV",{class:!0});var Jn=b(U);m(Qe.$$.fragment,Jn),qo=s(Jn),zt=i(Jn,"P",{"data-svelte-h":!0}),h(zt)!=="svelte-13vmm2k"&&(zt.textContent=gr),Jn.forEach(t),Dn=s(e),N=i(e,"DIV",{class:!0});var Rt=b(N);m(Re.$$.fragment,Rt),So=s(Rt),Ft=i(Rt,"P",{"data-svelte-h":!0}),h(Ft)!=="svelte-biydvq"&&(Ft.textContent=hr),Io=s(Rt),m(le.$$.fragment,Rt),Rt.forEach(t),Pn=s(e),m(Be.$$.fragment,e),zn=s(e),X=i(e,"DIV",{class:!0});var Zn=b(X);m(Ue.$$.fragment,Zn),Ao=s(Zn),qt=i(Zn,"P",{"data-svelte-h":!0}),h(qt)!=="svelte-xpqleu"&&(qt.innerHTML=_r),Zn.forEach(t),Fn=s(e),k=i(e,"DIV",{class:!0});var me=b(k);m(Xe.$$.fragment,me),Eo=s(me),St=i(me,"P",{"data-svelte-h":!0}),h(St)!=="svelte-5ynxmr"&&(St.textContent=br),Mo=s(me),It=i(me,"P",{"data-svelte-h":!0}),h(It)!=="svelte-19x4elj"&&(It.textContent=$r),Ho=s(me),At=i(me,"OL",{"data-svelte-h":!0}),h(At)!=="svelte-16g9ved"&&(At.innerHTML=vr),me.forEach(t),qn=s(e),W=i(e,"DIV",{class:!0});var Qn=b(W);m(We.$$.fragment,Qn),Vo=s(Qn),Et=i(Qn,"P",{"data-svelte-h":!0}),h(Et)!=="svelte-pubhri"&&(Et.textContent=xr),Qn.forEach(t),Sn=s(e),m(Ye.$$.fragment,e),In=s(e),Ut=i(e,"P",{}),b(Ut).forEach(t),this.h()},h(){$(l,"name","hf:doc:metadata"),$(l,"content",Hr),$(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),$(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,n){o(document.head,l),d(e,x,n),d(e,_,n),d(e,y,n),p(L,e,n),d(e,T,n),d(e,D,n),d(e,Kt,n),d(e,fe,n),d(e,en,n),p(ue,e,n),d(e,tn,n),d(e,P,n),p(ge,P,null),o(P,Rn),o(P,et),o(P,Bn),o(P,tt),p(he,tt,null),d(e,nn,n),p(_e,e,n),d(e,on,n),d(e,G,n),p(be,G,null),o(G,Un),o(G,nt),d(e,rn,n),p($e,e,n),d(e,sn,n),d(e,z,n),p(ve,z,null),o(z,Xn),o(z,ot),o(z,Wn),o(z,rt),d(e,an,n),d(e,F,n),p(xe,F,null),o(F,Yn),o(F,st),o(F,Kn),o(F,at),p(ye,at,null),d(e,dn,n),d(e,q,n),p(Te,q,null),o(q,eo),o(q,it),o(q,to),o(q,te),p(we,te,null),o(te,no),p(ne,te,null),d(e,ln,n),d(e,S,n),p(Ce,S,null),o(S,oo),o(S,dt),o(S,ro),o(S,oe),p(ke,oe,null),o(oe,so),p(re,oe,null),d(e,cn,n),d(e,J,n),p(Le,J,null),o(J,ao),o(J,lt),d(e,mn,n),d(e,I,n),p(De,I,null),o(I,io),o(I,ct),o(I,lo),o(I,mt),p(Pe,mt,null),d(e,pn,n),d(e,A,n),p(ze,A,null),o(A,co),o(A,pt),o(A,mo),o(A,se),p(Fe,se,null),o(se,po),o(se,ft),d(e,fn,n),p(qe,e,n),d(e,un,n),d(e,C,n),p(Se,C,null),o(C,fo),o(C,ut),o(C,uo),o(C,gt),o(C,go),p(ae,C,null),d(e,gn,n),d(e,Z,n),p(Ie,Z,null),o(Z,ho),o(Z,ht),d(e,hn,n),d(e,E,n),p(Ae,E,null),o(E,_o),o(E,_t),o(E,bo),o(E,bt),d(e,_n,n),d(e,M,n),p(Ee,M,null),o(M,$o),o(M,$t),o(M,vo),o(M,vt),d(e,bn,n),d(e,H,n),p(Me,H,null),o(H,xo),o(H,xt),o(H,yo),o(H,yt),d(e,$n,n),p(He,e,n),d(e,vn,n),d(e,V,n),p(Ve,V,null),o(V,To),o(V,Tt),o(V,wo),o(V,wt),d(e,xn,n),d(e,Q,n),p(je,Q,null),o(Q,Co),o(Q,Ct),d(e,yn,n),p(Oe,e,n),d(e,Tn,n),d(e,j,n),p(Ne,j,null),o(j,ko),o(j,kt),o(j,Lo),p(ie,j,null),d(e,wn,n),d(e,O,n),p(Ge,O,null),o(O,Do),o(O,Lt),o(O,Po),p(de,O,null),d(e,Cn,n),d(e,R,n),p(Je,R,null),o(R,zo),o(R,Dt),d(e,kn,n),d(e,B,n),p(Ze,B,null),o(B,Fo),o(B,Pt),d(e,Ln,n),d(e,U,n),p(Qe,U,null),o(U,qo),o(U,zt),d(e,Dn,n),d(e,N,n),p(Re,N,null),o(N,So),o(N,Ft),o(N,Io),p(le,N,null),d(e,Pn,n),p(Be,e,n),d(e,zn,n),d(e,X,n),p(Ue,X,null),o(X,Ao),o(X,qt),d(e,Fn,n),d(e,k,n),p(Xe,k,null),o(k,Eo),o(k,St),o(k,Mo),o(k,It),o(k,Ho),o(k,At),d(e,qn,n),d(e,W,n),p(We,W,null),o(W,Vo),o(W,Et),d(e,Sn,n),p(Ye,e,n),d(e,In,n),d(e,Ut,n),An=!0},p(e,[n]){const Y={};n&2&&(Y.$$scope={dirty:n,ctx:e}),ne.$set(Y);const Xt={};n&2&&(Xt.$$scope={dirty:n,ctx:e}),re.$set(Xt);const Ke={};n&2&&(Ke.$$scope={dirty:n,ctx:e}),ae.$set(Ke);const K={};n&2&&(K.$$scope={dirty:n,ctx:e}),ie.$set(K);const ee={};n&2&&(ee.$$scope={dirty:n,ctx:e}),de.$set(ee);const Wt={};n&2&&(Wt.$$scope={dirty:n,ctx:e}),le.$set(Wt)},i(e){An||(f(L.$$.fragment,e),f(ue.$$.fragment,e),f(ge.$$.fragment,e),f(he.$$.fragment,e),f(_e.$$.fragment,e),f(be.$$.fragment,e),f($e.$$.fragment,e),f(ve.$$.fragment,e),f(xe.$$.fragment,e),f(ye.$$.fragment,e),f(Te.$$.fragment,e),f(we.$$.fragment,e),f(ne.$$.fragment,e),f(Ce.$$.fragment,e),f(ke.$$.fragment,e),f(re.$$.fragment,e),f(Le.$$.fragment,e),f(De.$$.fragment,e),f(Pe.$$.fragment,e),f(ze.$$.fragment,e),f(Fe.$$.fragment,e),f(qe.$$.fragment,e),f(Se.$$.fragment,e),f(ae.$$.fragment,e),f(Ie.$$.fragment,e),f(Ae.$$.fragment,e),f(Ee.$$.fragment,e),f(Me.$$.fragment,e),f(He.$$.fragment,e),f(Ve.$$.fragment,e),f(je.$$.fragment,e),f(Oe.$$.fragment,e),f(Ne.$$.fragment,e),f(ie.$$.fragment,e),f(Ge.$$.fragment,e),f(de.$$.fragment,e),f(Je.$$.fragment,e),f(Ze.$$.fragment,e),f(Qe.$$.fragment,e),f(Re.$$.fragment,e),f(le.$$.fragment,e),f(Be.$$.fragment,e),f(Ue.$$.fragment,e),f(Xe.$$.fragment,e),f(We.$$.fragment,e),f(Ye.$$.fragment,e),An=!0)},o(e){u(L.$$.fragment,e),u(ue.$$.fragment,e),u(ge.$$.fragment,e),u(he.$$.fragment,e),u(_e.$$.fragment,e),u(be.$$.fragment,e),u($e.$$.fragment,e),u(ve.$$.fragment,e),u(xe.$$.fragment,e),u(ye.$$.fragment,e),u(Te.$$.fragment,e),u(we.$$.fragment,e),u(ne.$$.fragment,e),u(Ce.$$.fragment,e),u(ke.$$.fragment,e),u(re.$$.fragment,e),u(Le.$$.fragment,e),u(De.$$.fragment,e),u(Pe.$$.fragment,e),u(ze.$$.fragment,e),u(Fe.$$.fragment,e),u(qe.$$.fragment,e),u(Se.$$.fragment,e),u(ae.$$.fragment,e),u(Ie.$$.fragment,e),u(Ae.$$.fragment,e),u(Ee.$$.fragment,e),u(Me.$$.fragment,e),u(He.$$.fragment,e),u(Ve.$$.fragment,e),u(je.$$.fragment,e),u(Oe.$$.fragment,e),u(Ne.$$.fragment,e),u(ie.$$.fragment,e),u(Ge.$$.fragment,e),u(de.$$.fragment,e),u(Je.$$.fragment,e),u(Ze.$$.fragment,e),u(Qe.$$.fragment,e),u(Re.$$.fragment,e),u(le.$$.fragment,e),u(Be.$$.fragment,e),u(Ue.$$.fragment,e),u(Xe.$$.fragment,e),u(We.$$.fragment,e),u(Ye.$$.fragment,e),An=!1},d(e){e&&(t(x),t(_),t(y),t(T),t(D),t(Kt),t(fe),t(en),t(tn),t(P),t(nn),t(on),t(G),t(rn),t(sn),t(z),t(an),t(F),t(dn),t(q),t(ln),t(S),t(cn),t(J),t(mn),t(I),t(pn),t(A),t(fn),t(un),t(C),t(gn),t(Z),t(hn),t(E),t(_n),t(M),t(bn),t(H),t($n),t(vn),t(V),t(xn),t(Q),t(yn),t(Tn),t(j),t(wn),t(O),t(Cn),t(R),t(kn),t(B),t(Ln),t(U),t(Dn),t(N),t(Pn),t(zn),t(X),t(Fn),t(k),t(qn),t(W),t(Sn),t(In),t(Ut)),t(l),g(L,e),g(ue,e),g(ge),g(he),g(_e,e),g(be),g($e,e),g(ve),g(xe),g(ye),g(Te),g(we),g(ne),g(Ce),g(ke),g(re),g(Le),g(De),g(Pe),g(ze),g(Fe),g(qe,e),g(Se),g(ae),g(Ie),g(Ae),g(Ee),g(Me),g(He,e),g(Ve),g(je),g(Oe,e),g(Ne),g(ie),g(Ge),g(de),g(Je),g(Ze),g(Qe),g(Re),g(le),g(Be,e),g(Ue),g(Xe),g(We),g(Ye,e)}}}const Hr='{"title":"Custom Layers and Utilities","local":"custom-layers-and-utilities","sections":[{"title":"Attention Functions","local":"transformers.AttentionInterface","sections":[],"depth":2},{"title":"Rotary Position Embedding Functions","local":"transformers.dynamic_rope_update","sections":[],"depth":2},{"title":"Pytorch custom modules","local":"transformers.Conv1D","sections":[],"depth":2},{"title":"PyTorch Helper Functions","local":"transformers.apply_chunking_to_forward","sections":[],"depth":2},{"title":"TensorFlow custom layers","local":"transformers.modeling_tf_utils.TFConv1D","sections":[],"depth":2},{"title":"TensorFlow loss functions","local":"transformers.modeling_tf_utils.TFCausalLanguageModelingLoss","sections":[],"depth":2},{"title":"TensorFlow Helper Functions","local":"transformers.modeling_tf_utils.get_initializer","sections":[],"depth":2}],"depth":1}';function Vr(w){return wr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Rr extends Cr{constructor(l){super(),kr(this,l,Vr,Mr,Tr,{})}}export{Rr as component};
