import{s as Yr,o as es,n as to}from"../chunks/scheduler.9bc65507.js";import{S as ts,i as os,g as n,s,u as f,A as ns,h as r,f as t,c as a,j as p,v as u,y as m,k as c,o,a as l,w as h,d as g,t as _,x as v}from"../chunks/index.78c82d43.js";import{T as fo}from"../chunks/Tip.87d55b76.js";import{D as $}from"../chunks/Docstring.f3d04bd2.js";import{C as rs}from"../chunks/CodeBlock.48618ec2.js";import{I as eo}from"../chunks/IconCopyLink.bedaa44d.js";import{E as ss}from"../chunks/ExampleCodeBlock.872b014d.js";function as(T){let d,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(){d=n("p"),d.innerHTML=x},l(b){d=r(b,"P",{"data-svelte-h":!0}),m(d)!=="svelte-1oii8ff"&&(d.innerHTML=x)},m(b,w){l(b,d,w)},p:to,d(b){b&&t(d)}}}function is(T){let d,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(){d=n("p"),d.innerHTML=x},l(b){d=r(b,"P",{"data-svelte-h":!0}),m(d)!=="svelte-1oii8ff"&&(d.innerHTML=x)},m(b,w){l(b,d,w)},p:to,d(b){b&&t(d)}}}function ls(T){let d,x="Examples:",b,w,C;return w=new rs({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)`}}),{c(){d=n("p"),d.textContent=x,b=s(),f(w.$$.fragment)},l(y){d=r(y,"P",{"data-svelte-h":!0}),m(d)!=="svelte-kvfsh7"&&(d.textContent=x),b=a(y),u(w.$$.fragment,y)},m(y,j){l(y,d,j),l(y,b,j),h(w,y,j),C=!0},p:to,i(y){C||(g(w.$$.fragment,y),C=!0)},o(y){_(w.$$.fragment,y),C=!1},d(y){y&&(t(d),t(b)),v(w,y)}}}function ds(T){let d,x="Any label of -100 will be ignored (along with the corresponding logits) in the loss computation.";return{c(){d=n("p"),d.textContent=x},l(b){d=r(b,"P",{"data-svelte-h":!0}),m(d)!=="svelte-14hlsz0"&&(d.textContent=x)},m(b,w){l(b,d,w)},p:to,d(b){b&&t(d)}}}function cs(T){let d,x="Any label of -100 will be ignored (along with the corresponding logits) in the loss computation.";return{c(){d=n("p"),d.textContent=x},l(b){d=r(b,"P",{"data-svelte-h":!0}),m(d)!=="svelte-14hlsz0"&&(d.textContent=x)},m(b,w){l(b,d,w)},p:to,d(b){b&&t(d)}}}function ps(T){let d,x="Any label of -100 will be ignored (along with the corresponding logits) in the loss computation.";return{c(){d=n("p"),d.textContent=x},l(b){d=r(b,"P",{"data-svelte-h":!0}),m(d)!=="svelte-14hlsz0"&&(d.textContent=x)},m(b,w){l(b,d,w)},p:to,d(b){b&&t(d)}}}function ms(T){let d,x,b,w,C,y,j,_e,ln,tt,nr="Custom Layers and Utilities",uo,ve,rr="This page lists all the custom layers used by the library, as well as the utility functions it provides for modeling.",ho,be,sr="Most of those are only useful if you are studying the code of the models in the library.",go,O,te,oo,$e,dn,ot,ar="Pytorch custom modules",_o,D,ye,cn,nt,ir="1D-convolutional layer as defined by Radford et al. for OpenAI GPT (and also used in GPT-2).",pn,rt,lr="Basically works like a linear layer but the weights are transposed.",vo,P,xe,mn,st,dr="Compute SQuAD start logits from sequence hidden states.",fn,at,we,bo,z,Te,un,it,cr="Compute SQuAD end logits from sequence hidden states.",hn,oe,Ce,gn,ne,$o,S,ke,_n,lt,pr="Compute SQuAD 2.0 answer class from classification and start tokens hidden states.",vn,re,Le,bn,se,yo,J,De,$n,dt,mr='Base class for outputs of question answering models using a <a href="/docs/transformers/v4.33.3/en/internal/modeling_utils#transformers.modeling_utils.SQuADHead">SQuADHead</a>.',xo,F,Pe,yn,ct,fr="A SQuAD head inspired by XLNet.",xn,pt,ze,wo,q,Se,wn,mt,ur="Compute a single vector summary of a sequence hidden states.",Tn,ae,Fe,Cn,ft,hr="Compute a single vector summary of a sequence hidden states.",To,G,ie,no,qe,kn,ut,gr="PyTorch Helper Functions",Co,k,Ae,Ln,ht,_r=`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.`,Dn,gt,vr=`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>.`,Pn,le,ko,Z,Ee,zn,_t,br="Finds the heads and their indices taking <code>already_pruned_heads</code> into account.",Lo,A,Me,Sn,vt,$r="Prune a Conv1D or linear layer to keep only entries in index.",Fn,bt,yr="Used to remove heads.",Do,E,Ie,qn,$t,xr=`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.`,An,yt,wr="Used to remove heads.",Po,M,He,En,xt,Tr="Prune a linear layer to keep only entries in index.",Mn,wt,Cr="Used to remove heads.",zo,Q,de,ro,Ne,In,Tt,kr="TensorFlow custom layers",So,I,Ve,Hn,Ct,Lr="1D-convolutional layer as defined by Radford et al. for OpenAI GPT (and also used in GPT-2).",Nn,kt,Dr="Basically works like a linear layer but the weights are transposed.",Fo,U,je,Vn,Lt,Pr="Compute a single vector summary of a sequence hidden states.",qo,B,ce,so,Oe,jn,Dt,zr="TensorFlow loss functions",Ao,H,Je,On,Pt,Sr="Loss function suitable for causal language modeling (CLM), that is, the task of guessing the next token.",Jn,pe,Eo,N,Ge,Gn,zt,Fr="Loss function suitable for masked language modeling (MLM), that is, the task of guessing the masked tokens.",Zn,me,Mo,X,Ze,Qn,St,qr="Loss function suitable for multiple choice tasks.",Io,R,Qe,Un,Ft,Ar="Loss function suitable for question answering.",Ho,W,Ue,Bn,qt,Er="Loss function suitable for sequence classification.",No,V,Be,Xn,At,Mr="Loss function suitable for token classification.",Rn,fe,Vo,K,ue,ao,Xe,Wn,Et,Ir="TensorFlow Helper Functions",jo,Y,Re,Kn,Mt,Hr="Creates a <code>tf.keras.initializers.TruncatedNormal</code> with the given range.",Oo,L,We,Yn,It,Nr="Decorate a Keras Layer class to support Keras serialization.",er,Ht,Vr="This is done by:",tr,Nt,jr=`<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>tf.keras.models.load_model</code>.</li>`,Jo,ee,Ke,or,Vt,Or="Deal with dynamic shape in tensorflow cleanly.",Go,io,Zo;return _e=new eo({}),$e=new eo({}),ye=new $({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/v4.33.3/src/transformers/pytorch_utils.py#L86"}}),xe=new $({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/v4.33.3/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/v4.33.3/src/transformers/modeling_utils.py#L3844"}}),we=new $({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/v4.33.3/src/transformers/modeling_utils.py#L3857",returnDescription:`
<p>The start logits for SQuAD.</p>
`,returnType:`
<p><code>torch.FloatTensor</code></p>
`}}),Te=new $({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/v4.33.3/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/v4.33.3/src/transformers/modeling_utils.py#L3882"}}),Ce=new $({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/v4.33.3/src/transformers/modeling_utils.py#L3899",returnDescription:`
<p>The end logits for SQuAD.</p>
`,returnType:`
<p><code>torch.FloatTensor</code></p>
`}}),ne=new fo({props:{$$slots:{default:[as]},$$scope:{ctx:T}}}),ke=new $({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/v4.33.3/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/v4.33.3/src/transformers/modeling_utils.py#L3951"}}),Le=new $({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/v4.33.3/src/transformers/modeling_utils.py#L3966",returnDescription:`
<p>The SQuAD 2.0 answer class.</p>
`,returnType:`
<p><code>torch.FloatTensor</code></p>
`}}),se=new fo({props:{$$slots:{default:[is]},$$scope:{ctx:T}}}),De=new $({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/v4.33.3/src/transformers/modeling_utils.py#L4017"}}),Pe=new $({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/v4.33.3/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/v4.33.3/src/transformers/modeling_utils.py#L4047"}}),ze=new $({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/v4.33.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/modeling_utils.py#L4066",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/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:`
<p><a
  href="/docs/transformers/v4.33.3/en/internal/modeling_utils#transformers.modeling_utils.SquadHeadOutput"
>transformers.modeling_utils.SquadHeadOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Se=new $({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/v4.33.3/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/v4.33.3/src/transformers/modeling_utils.py#L4164"}}),Fe=new $({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/v4.33.3/src/transformers/modeling_utils.py#L4219",returnDescription:`
<p>The summary of the sequence hidden states.</p>
`,returnType:`
<p><code>torch.FloatTensor</code></p>
`}}),qe=new eo({}),Ae=new $({props:{name:"transformers.apply_chunking_to_forward",anchor:"transformers.apply_chunking_to_forward",parameters:[{name:"forward_fn",val:": typing.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/v4.33.3/src/transformers/pytorch_utils.py#L168",returnDescription:`
<p>A tensor with the same shape as the <code>forward_fn</code> would have given if applied\`.</p>
`,returnType:`
<p><code>torch.Tensor</code></p>
`}}),le=new ss({props:{anchor:"transformers.apply_chunking_to_forward.example",$$slots:{default:[ls]},$$scope:{ctx:T}}}),Ee=new $({props:{name:"transformers.pytorch_utils.find_pruneable_heads_and_indices",anchor:"transformers.pytorch_utils.find_pruneable_heads_and_indices",parameters:[{name:"heads",val:": typing.List[int]"},{name:"n_heads",val:": int"},{name:"head_size",val:": int"},{name:"already_pruned_heads",val:": typing.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/v4.33.3/src/transformers/pytorch_utils.py#L243",returnDescription:`
<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:`
<p><code>Tuple[Set[int], torch.LongTensor]</code></p>
`}}),Me=new $({props:{name:"transformers.prune_layer",anchor:"transformers.prune_layer",parameters:[{name:"layer",val:": typing.Union[torch.nn.modules.linear.Linear, transformers.pytorch_utils.Conv1D]"},{name:"index",val:": LongTensor"},{name:"dim",val:": typing.Optional[int] = 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/v4.33.3/src/transformers/pytorch_utils.py#L144",returnDescription:`
<p>The pruned layer as a new layer with <code>requires_grad=True</code>.</p>
`,returnType:`
<p><code>torch.nn.Linear</code> or <a
  href="/docs/transformers/v4.33.3/en/internal/modeling_utils#transformers.Conv1D"
>Conv1D</a></p>
`}}),Ie=new $({props:{name:"transformers.pytorch_utils.prune_conv1d_layer",anchor:"transformers.pytorch_utils.prune_conv1d_layer",parameters:[{name:"layer",val:": Conv1D"},{name:"index",val:": LongTensor"},{name:"dim",val:": int = 1"}],parametersDescription:[{anchor:"transformers.pytorch_utils.prune_conv1d_layer.layer",description:'<strong>layer</strong> (<a href="/docs/transformers/v4.33.3/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/v4.33.3/src/transformers/pytorch_utils.py#L111",returnDescription:`
<p>The pruned layer as a new layer with <code>requires_grad=True</code>.</p>
`,returnType:`
<p><a
  href="/docs/transformers/v4.33.3/en/internal/modeling_utils#transformers.Conv1D"
>Conv1D</a></p>
`}}),He=new $({props:{name:"transformers.pytorch_utils.prune_linear_layer",anchor:"transformers.pytorch_utils.prune_linear_layer",parameters:[{name:"layer",val:": Linear"},{name:"index",val:": 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/v4.33.3/src/transformers/pytorch_utils.py#L52",returnDescription:`
<p>The pruned layer as a new layer with <code>requires_grad=True</code>.</p>
`,returnType:`
<p><code>torch.nn.Linear</code></p>
`}}),Ne=new eo({}),Ve=new $({props:{name:"class transformers.modeling_tf_utils.TFConv1D",anchor:"transformers.modeling_tf_utils.TFConv1D",parameters:[{name:"*args",val:""},{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>tf.keras.layers.Layer</code>.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/modeling_tf_utils.py#L3182"}}),je=new $({props:{name:"class transformers.TFSequenceSummary",anchor:"transformers.TFSequenceSummary",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFSequenceSummary.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/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>, 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>tf.keras.layers.Layer</code>.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/modeling_tf_utils.py#L3325"}}),Oe=new eo({}),Je=new $({props:{name:"class transformers.modeling_tf_utils.TFCausalLanguageModelingLoss",anchor:"transformers.modeling_tf_utils.TFCausalLanguageModelingLoss",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/modeling_tf_utils.py#L192"}}),pe=new fo({props:{$$slots:{default:[ds]},$$scope:{ctx:T}}}),Ge=new $({props:{name:"class transformers.modeling_tf_utils.TFMaskedLanguageModelingLoss",anchor:"transformers.modeling_tf_utils.TFMaskedLanguageModelingLoss",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/modeling_tf_utils.py#L311"}}),me=new fo({props:{$$slots:{default:[cs]},$$scope:{ctx:T}}}),Ze=new $({props:{name:"class transformers.modeling_tf_utils.TFMultipleChoiceLoss",anchor:"transformers.modeling_tf_utils.TFMultipleChoiceLoss",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/modeling_tf_utils.py#L301"}}),Qe=new $({props:{name:"class transformers.modeling_tf_utils.TFQuestionAnsweringLoss",anchor:"transformers.modeling_tf_utils.TFQuestionAnsweringLoss",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/modeling_tf_utils.py#L223"}}),Ue=new $({props:{name:"class transformers.modeling_tf_utils.TFSequenceClassificationLoss",anchor:"transformers.modeling_tf_utils.TFSequenceClassificationLoss",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/modeling_tf_utils.py#L282"}}),Be=new $({props:{name:"class transformers.modeling_tf_utils.TFTokenClassificationLoss",anchor:"transformers.modeling_tf_utils.TFTokenClassificationLoss",parameters:[],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/modeling_tf_utils.py#L238"}}),fe=new fo({props:{$$slots:{default:[ps]},$$scope:{ctx:T}}}),Xe=new eo({}),Re=new $({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/v4.33.3/src/transformers/modeling_tf_utils.py#L3441",returnDescription:`
<p>The truncated normal initializer.</p>
`,returnType:`
<p><code>tf.keras.initializers.TruncatedNormal</code></p>
`}}),We=new $({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>tf.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/v4.33.3/src/transformers/modeling_tf_utils.py#L127",returnDescription:`
<p>The same class object, with modifications for Keras deserialization.</p>
`}}),Ke=new $({props:{name:"transformers.shape_list",anchor:"transformers.shape_list",parameters:[{name:"tensor",val:": typing.Union[tensorflow.python.framework.ops.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/v4.33.3/src/transformers/tf_utils.py#L26",returnDescription:`
<p>The shape of the tensor as a list.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),{c(){d=n("meta"),x=s(),b=n("p"),w=s(),C=n("h1"),y=n("a"),j=n("span"),f(_e.$$.fragment),ln=s(),tt=n("span"),tt.textContent=nr,uo=s(),ve=n("p"),ve.textContent=rr,ho=s(),be=n("p"),be.textContent=sr,go=s(),O=n("h2"),te=n("a"),oo=n("span"),f($e.$$.fragment),dn=s(),ot=n("span"),ot.textContent=ar,_o=s(),D=n("div"),f(ye.$$.fragment),cn=s(),nt=n("p"),nt.textContent=ir,pn=s(),rt=n("p"),rt.textContent=lr,vo=s(),P=n("div"),f(xe.$$.fragment),mn=s(),st=n("p"),st.textContent=dr,fn=s(),at=n("div"),f(we.$$.fragment),bo=s(),z=n("div"),f(Te.$$.fragment),un=s(),it=n("p"),it.textContent=cr,hn=s(),oe=n("div"),f(Ce.$$.fragment),gn=s(),f(ne.$$.fragment),$o=s(),S=n("div"),f(ke.$$.fragment),_n=s(),lt=n("p"),lt.textContent=pr,vn=s(),re=n("div"),f(Le.$$.fragment),bn=s(),f(se.$$.fragment),yo=s(),J=n("div"),f(De.$$.fragment),$n=s(),dt=n("p"),dt.innerHTML=mr,xo=s(),F=n("div"),f(Pe.$$.fragment),yn=s(),ct=n("p"),ct.textContent=fr,xn=s(),pt=n("div"),f(ze.$$.fragment),wo=s(),q=n("div"),f(Se.$$.fragment),wn=s(),mt=n("p"),mt.textContent=ur,Tn=s(),ae=n("div"),f(Fe.$$.fragment),Cn=s(),ft=n("p"),ft.textContent=hr,To=s(),G=n("h2"),ie=n("a"),no=n("span"),f(qe.$$.fragment),kn=s(),ut=n("span"),ut.textContent=gr,Co=s(),k=n("div"),f(Ae.$$.fragment),Ln=s(),ht=n("p"),ht.innerHTML=_r,Dn=s(),gt=n("p"),gt.innerHTML=vr,Pn=s(),f(le.$$.fragment),ko=s(),Z=n("div"),f(Ee.$$.fragment),zn=s(),_t=n("p"),_t.innerHTML=br,Lo=s(),A=n("div"),f(Me.$$.fragment),Sn=s(),vt=n("p"),vt.textContent=$r,Fn=s(),bt=n("p"),bt.textContent=yr,Do=s(),E=n("div"),f(Ie.$$.fragment),qn=s(),$t=n("p"),$t.textContent=xr,An=s(),yt=n("p"),yt.textContent=wr,Po=s(),M=n("div"),f(He.$$.fragment),En=s(),xt=n("p"),xt.textContent=Tr,Mn=s(),wt=n("p"),wt.textContent=Cr,zo=s(),Q=n("h2"),de=n("a"),ro=n("span"),f(Ne.$$.fragment),In=s(),Tt=n("span"),Tt.textContent=kr,So=s(),I=n("div"),f(Ve.$$.fragment),Hn=s(),Ct=n("p"),Ct.textContent=Lr,Nn=s(),kt=n("p"),kt.textContent=Dr,Fo=s(),U=n("div"),f(je.$$.fragment),Vn=s(),Lt=n("p"),Lt.textContent=Pr,qo=s(),B=n("h2"),ce=n("a"),so=n("span"),f(Oe.$$.fragment),jn=s(),Dt=n("span"),Dt.textContent=zr,Ao=s(),H=n("div"),f(Je.$$.fragment),On=s(),Pt=n("p"),Pt.textContent=Sr,Jn=s(),f(pe.$$.fragment),Eo=s(),N=n("div"),f(Ge.$$.fragment),Gn=s(),zt=n("p"),zt.textContent=Fr,Zn=s(),f(me.$$.fragment),Mo=s(),X=n("div"),f(Ze.$$.fragment),Qn=s(),St=n("p"),St.textContent=qr,Io=s(),R=n("div"),f(Qe.$$.fragment),Un=s(),Ft=n("p"),Ft.textContent=Ar,Ho=s(),W=n("div"),f(Ue.$$.fragment),Bn=s(),qt=n("p"),qt.textContent=Er,No=s(),V=n("div"),f(Be.$$.fragment),Xn=s(),At=n("p"),At.textContent=Mr,Rn=s(),f(fe.$$.fragment),Vo=s(),K=n("h2"),ue=n("a"),ao=n("span"),f(Xe.$$.fragment),Wn=s(),Et=n("span"),Et.textContent=Ir,jo=s(),Y=n("div"),f(Re.$$.fragment),Kn=s(),Mt=n("p"),Mt.innerHTML=Hr,Oo=s(),L=n("div"),f(We.$$.fragment),Yn=s(),It=n("p"),It.textContent=Nr,er=s(),Ht=n("p"),Ht.textContent=Vr,tr=s(),Nt=n("ol"),Nt.innerHTML=jr,Jo=s(),ee=n("div"),f(Ke.$$.fragment),or=s(),Vt=n("p"),Vt.textContent=Or,Go=s(),io=n("p"),this.h()},l(e){const i=ns("svelte-1phssyn",document.head);d=r(i,"META",{name:!0,content:!0}),i.forEach(t),x=a(e),b=r(e,"P",{}),p(b).forEach(t),w=a(e),C=r(e,"H1",{class:!0});var Ye=p(C);y=r(Ye,"A",{id:!0,class:!0,href:!0});var lo=p(y);j=r(lo,"SPAN",{});var co=p(j);u(_e.$$.fragment,co),co.forEach(t),lo.forEach(t),ln=a(Ye),tt=r(Ye,"SPAN",{"data-svelte-h":!0}),m(tt)!=="svelte-1y1pksh"&&(tt.textContent=nr),Ye.forEach(t),uo=a(e),ve=r(e,"P",{"data-svelte-h":!0}),m(ve)!=="svelte-gv04lw"&&(ve.textContent=rr),ho=a(e),be=r(e,"P",{"data-svelte-h":!0}),m(be)!=="svelte-1ui7w53"&&(be.textContent=sr),go=a(e),O=r(e,"H2",{class:!0});var et=p(O);te=r(et,"A",{id:!0,class:!0,href:!0});var po=p(te);oo=r(po,"SPAN",{});var mo=p(oo);u($e.$$.fragment,mo),mo.forEach(t),po.forEach(t),dn=a(et),ot=r(et,"SPAN",{"data-svelte-h":!0}),m(ot)!=="svelte-167av1k"&&(ot.textContent=ar),et.forEach(t),_o=a(e),D=r(e,"DIV",{class:!0});var jt=p(D);u(ye.$$.fragment,jt),cn=a(jt),nt=r(jt,"P",{"data-svelte-h":!0}),m(nt)!=="svelte-1lta4gb"&&(nt.textContent=ir),pn=a(jt),rt=r(jt,"P",{"data-svelte-h":!0}),m(rt)!=="svelte-6u0wx8"&&(rt.textContent=lr),jt.forEach(t),vo=a(e),P=r(e,"DIV",{class:!0});var Ot=p(P);u(xe.$$.fragment,Ot),mn=a(Ot),st=r(Ot,"P",{"data-svelte-h":!0}),m(st)!=="svelte-nykzs4"&&(st.textContent=dr),fn=a(Ot),at=r(Ot,"DIV",{class:!0});var Jr=p(at);u(we.$$.fragment,Jr),Jr.forEach(t),Ot.forEach(t),bo=a(e),z=r(e,"DIV",{class:!0});var Jt=p(z);u(Te.$$.fragment,Jt),un=a(Jt),it=r(Jt,"P",{"data-svelte-h":!0}),m(it)!=="svelte-1xgtkjp"&&(it.textContent=cr),hn=a(Jt),oe=r(Jt,"DIV",{class:!0});var Qo=p(oe);u(Ce.$$.fragment,Qo),gn=a(Qo),u(ne.$$.fragment,Qo),Qo.forEach(t),Jt.forEach(t),$o=a(e),S=r(e,"DIV",{class:!0});var Gt=p(S);u(ke.$$.fragment,Gt),_n=a(Gt),lt=r(Gt,"P",{"data-svelte-h":!0}),m(lt)!=="svelte-i1ac0w"&&(lt.textContent=pr),vn=a(Gt),re=r(Gt,"DIV",{class:!0});var Uo=p(re);u(Le.$$.fragment,Uo),bn=a(Uo),u(se.$$.fragment,Uo),Uo.forEach(t),Gt.forEach(t),yo=a(e),J=r(e,"DIV",{class:!0});var Bo=p(J);u(De.$$.fragment,Bo),$n=a(Bo),dt=r(Bo,"P",{"data-svelte-h":!0}),m(dt)!=="svelte-g9acaw"&&(dt.innerHTML=mr),Bo.forEach(t),xo=a(e),F=r(e,"DIV",{class:!0});var Zt=p(F);u(Pe.$$.fragment,Zt),yn=a(Zt),ct=r(Zt,"P",{"data-svelte-h":!0}),m(ct)!=="svelte-vm79b9"&&(ct.textContent=fr),xn=a(Zt),pt=r(Zt,"DIV",{class:!0});var Gr=p(pt);u(ze.$$.fragment,Gr),Gr.forEach(t),Zt.forEach(t),wo=a(e),q=r(e,"DIV",{class:!0});var Qt=p(q);u(Se.$$.fragment,Qt),wn=a(Qt),mt=r(Qt,"P",{"data-svelte-h":!0}),m(mt)!=="svelte-1cor2i2"&&(mt.textContent=ur),Tn=a(Qt),ae=r(Qt,"DIV",{class:!0});var Xo=p(ae);u(Fe.$$.fragment,Xo),Cn=a(Xo),ft=r(Xo,"P",{"data-svelte-h":!0}),m(ft)!=="svelte-1cor2i2"&&(ft.textContent=hr),Xo.forEach(t),Qt.forEach(t),To=a(e),G=r(e,"H2",{class:!0});var Ro=p(G);ie=r(Ro,"A",{id:!0,class:!0,href:!0});var Zr=p(ie);no=r(Zr,"SPAN",{});var Qr=p(no);u(qe.$$.fragment,Qr),Qr.forEach(t),Zr.forEach(t),kn=a(Ro),ut=r(Ro,"SPAN",{"data-svelte-h":!0}),m(ut)!=="svelte-1s2lwq9"&&(ut.textContent=gr),Ro.forEach(t),Co=a(e),k=r(e,"DIV",{class:!0});var he=p(k);u(Ae.$$.fragment,he),Ln=a(he),ht=r(he,"P",{"data-svelte-h":!0}),m(ht)!=="svelte-16kfis2"&&(ht.innerHTML=_r),Dn=a(he),gt=r(he,"P",{"data-svelte-h":!0}),m(gt)!=="svelte-1ufp6tv"&&(gt.innerHTML=vr),Pn=a(he),u(le.$$.fragment,he),he.forEach(t),ko=a(e),Z=r(e,"DIV",{class:!0});var Wo=p(Z);u(Ee.$$.fragment,Wo),zn=a(Wo),_t=r(Wo,"P",{"data-svelte-h":!0}),m(_t)!=="svelte-o28a6l"&&(_t.innerHTML=br),Wo.forEach(t),Lo=a(e),A=r(e,"DIV",{class:!0});var Ut=p(A);u(Me.$$.fragment,Ut),Sn=a(Ut),vt=r(Ut,"P",{"data-svelte-h":!0}),m(vt)!=="svelte-by2rhc"&&(vt.textContent=$r),Fn=a(Ut),bt=r(Ut,"P",{"data-svelte-h":!0}),m(bt)!=="svelte-14zrzk1"&&(bt.textContent=yr),Ut.forEach(t),Do=a(e),E=r(e,"DIV",{class:!0});var Bt=p(E);u(Ie.$$.fragment,Bt),qn=a(Bt),$t=r(Bt,"P",{"data-svelte-h":!0}),m($t)!=="svelte-1xogpwx"&&($t.textContent=xr),An=a(Bt),yt=r(Bt,"P",{"data-svelte-h":!0}),m(yt)!=="svelte-14zrzk1"&&(yt.textContent=wr),Bt.forEach(t),Po=a(e),M=r(e,"DIV",{class:!0});var Xt=p(M);u(He.$$.fragment,Xt),En=a(Xt),xt=r(Xt,"P",{"data-svelte-h":!0}),m(xt)!=="svelte-1edz4x0"&&(xt.textContent=Tr),Mn=a(Xt),wt=r(Xt,"P",{"data-svelte-h":!0}),m(wt)!=="svelte-14zrzk1"&&(wt.textContent=Cr),Xt.forEach(t),zo=a(e),Q=r(e,"H2",{class:!0});var Ko=p(Q);de=r(Ko,"A",{id:!0,class:!0,href:!0});var Ur=p(de);ro=r(Ur,"SPAN",{});var Br=p(ro);u(Ne.$$.fragment,Br),Br.forEach(t),Ur.forEach(t),In=a(Ko),Tt=r(Ko,"SPAN",{"data-svelte-h":!0}),m(Tt)!=="svelte-1vn3yqn"&&(Tt.textContent=kr),Ko.forEach(t),So=a(e),I=r(e,"DIV",{class:!0});var Rt=p(I);u(Ve.$$.fragment,Rt),Hn=a(Rt),Ct=r(Rt,"P",{"data-svelte-h":!0}),m(Ct)!=="svelte-1lta4gb"&&(Ct.textContent=Lr),Nn=a(Rt),kt=r(Rt,"P",{"data-svelte-h":!0}),m(kt)!=="svelte-6u0wx8"&&(kt.textContent=Dr),Rt.forEach(t),Fo=a(e),U=r(e,"DIV",{class:!0});var Yo=p(U);u(je.$$.fragment,Yo),Vn=a(Yo),Lt=r(Yo,"P",{"data-svelte-h":!0}),m(Lt)!=="svelte-1cor2i2"&&(Lt.textContent=Pr),Yo.forEach(t),qo=a(e),B=r(e,"H2",{class:!0});var en=p(B);ce=r(en,"A",{id:!0,class:!0,href:!0});var Xr=p(ce);so=r(Xr,"SPAN",{});var Rr=p(so);u(Oe.$$.fragment,Rr),Rr.forEach(t),Xr.forEach(t),jn=a(en),Dt=r(en,"SPAN",{"data-svelte-h":!0}),m(Dt)!=="svelte-1mcpxu"&&(Dt.textContent=zr),en.forEach(t),Ao=a(e),H=r(e,"DIV",{class:!0});var Wt=p(H);u(Je.$$.fragment,Wt),On=a(Wt),Pt=r(Wt,"P",{"data-svelte-h":!0}),m(Pt)!=="svelte-1obn9c"&&(Pt.textContent=Sr),Jn=a(Wt),u(pe.$$.fragment,Wt),Wt.forEach(t),Eo=a(e),N=r(e,"DIV",{class:!0});var Kt=p(N);u(Ge.$$.fragment,Kt),Gn=a(Kt),zt=r(Kt,"P",{"data-svelte-h":!0}),m(zt)!=="svelte-16f7wip"&&(zt.textContent=Fr),Zn=a(Kt),u(me.$$.fragment,Kt),Kt.forEach(t),Mo=a(e),X=r(e,"DIV",{class:!0});var tn=p(X);u(Ze.$$.fragment,tn),Qn=a(tn),St=r(tn,"P",{"data-svelte-h":!0}),m(St)!=="svelte-yqule2"&&(St.textContent=qr),tn.forEach(t),Io=a(e),R=r(e,"DIV",{class:!0});var on=p(R);u(Qe.$$.fragment,on),Un=a(on),Ft=r(on,"P",{"data-svelte-h":!0}),m(Ft)!=="svelte-1mrk13b"&&(Ft.textContent=Ar),on.forEach(t),Ho=a(e),W=r(e,"DIV",{class:!0});var nn=p(W);u(Ue.$$.fragment,nn),Bn=a(nn),qt=r(nn,"P",{"data-svelte-h":!0}),m(qt)!=="svelte-13vmm2k"&&(qt.textContent=Er),nn.forEach(t),No=a(e),V=r(e,"DIV",{class:!0});var Yt=p(V);u(Be.$$.fragment,Yt),Xn=a(Yt),At=r(Yt,"P",{"data-svelte-h":!0}),m(At)!=="svelte-biydvq"&&(At.textContent=Mr),Rn=a(Yt),u(fe.$$.fragment,Yt),Yt.forEach(t),Vo=a(e),K=r(e,"H2",{class:!0});var rn=p(K);ue=r(rn,"A",{id:!0,class:!0,href:!0});var Wr=p(ue);ao=r(Wr,"SPAN",{});var Kr=p(ao);u(Xe.$$.fragment,Kr),Kr.forEach(t),Wr.forEach(t),Wn=a(rn),Et=r(rn,"SPAN",{"data-svelte-h":!0}),m(Et)!=="svelte-1qfgoeh"&&(Et.textContent=Ir),rn.forEach(t),jo=a(e),Y=r(e,"DIV",{class:!0});var sn=p(Y);u(Re.$$.fragment,sn),Kn=a(sn),Mt=r(sn,"P",{"data-svelte-h":!0}),m(Mt)!=="svelte-iigt0"&&(Mt.innerHTML=Hr),sn.forEach(t),Oo=a(e),L=r(e,"DIV",{class:!0});var ge=p(L);u(We.$$.fragment,ge),Yn=a(ge),It=r(ge,"P",{"data-svelte-h":!0}),m(It)!=="svelte-5ynxmr"&&(It.textContent=Nr),er=a(ge),Ht=r(ge,"P",{"data-svelte-h":!0}),m(Ht)!=="svelte-19x4elj"&&(Ht.textContent=Vr),tr=a(ge),Nt=r(ge,"OL",{"data-svelte-h":!0}),m(Nt)!=="svelte-1g7pa8n"&&(Nt.innerHTML=jr),ge.forEach(t),Jo=a(e),ee=r(e,"DIV",{class:!0});var an=p(ee);u(Ke.$$.fragment,an),or=a(an),Vt=r(an,"P",{"data-svelte-h":!0}),m(Vt)!=="svelte-pubhri"&&(Vt.textContent=Or),an.forEach(t),Go=a(e),io=r(e,"P",{}),p(io).forEach(t),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(fs)),c(y,"id","custom-layers-and-utilities"),c(y,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(y,"href","#custom-layers-and-utilities"),c(C,"class","relative group"),c(te,"id","transformers.Conv1D"),c(te,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(te,"href","#transformers.Conv1D"),c(O,"class","relative group"),c(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(J,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ie,"id","transformers.apply_chunking_to_forward"),c(ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ie,"href","#transformers.apply_chunking_to_forward"),c(G,"class","relative group"),c(k,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(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(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(M,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(de,"id","transformers.modeling_tf_utils.TFConv1D"),c(de,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(de,"href","#transformers.modeling_tf_utils.TFConv1D"),c(Q,"class","relative group"),c(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ce,"id","transformers.modeling_tf_utils.TFCausalLanguageModelingLoss"),c(ce,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ce,"href","#transformers.modeling_tf_utils.TFCausalLanguageModelingLoss"),c(B,"class","relative group"),c(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ue,"id","transformers.modeling_tf_utils.get_initializer"),c(ue,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ue,"href","#transformers.modeling_tf_utils.get_initializer"),c(K,"class","relative group"),c(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ee,"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,i){o(document.head,d),l(e,x,i),l(e,b,i),l(e,w,i),l(e,C,i),o(C,y),o(y,j),h(_e,j,null),o(C,ln),o(C,tt),l(e,uo,i),l(e,ve,i),l(e,ho,i),l(e,be,i),l(e,go,i),l(e,O,i),o(O,te),o(te,oo),h($e,oo,null),o(O,dn),o(O,ot),l(e,_o,i),l(e,D,i),h(ye,D,null),o(D,cn),o(D,nt),o(D,pn),o(D,rt),l(e,vo,i),l(e,P,i),h(xe,P,null),o(P,mn),o(P,st),o(P,fn),o(P,at),h(we,at,null),l(e,bo,i),l(e,z,i),h(Te,z,null),o(z,un),o(z,it),o(z,hn),o(z,oe),h(Ce,oe,null),o(oe,gn),h(ne,oe,null),l(e,$o,i),l(e,S,i),h(ke,S,null),o(S,_n),o(S,lt),o(S,vn),o(S,re),h(Le,re,null),o(re,bn),h(se,re,null),l(e,yo,i),l(e,J,i),h(De,J,null),o(J,$n),o(J,dt),l(e,xo,i),l(e,F,i),h(Pe,F,null),o(F,yn),o(F,ct),o(F,xn),o(F,pt),h(ze,pt,null),l(e,wo,i),l(e,q,i),h(Se,q,null),o(q,wn),o(q,mt),o(q,Tn),o(q,ae),h(Fe,ae,null),o(ae,Cn),o(ae,ft),l(e,To,i),l(e,G,i),o(G,ie),o(ie,no),h(qe,no,null),o(G,kn),o(G,ut),l(e,Co,i),l(e,k,i),h(Ae,k,null),o(k,Ln),o(k,ht),o(k,Dn),o(k,gt),o(k,Pn),h(le,k,null),l(e,ko,i),l(e,Z,i),h(Ee,Z,null),o(Z,zn),o(Z,_t),l(e,Lo,i),l(e,A,i),h(Me,A,null),o(A,Sn),o(A,vt),o(A,Fn),o(A,bt),l(e,Do,i),l(e,E,i),h(Ie,E,null),o(E,qn),o(E,$t),o(E,An),o(E,yt),l(e,Po,i),l(e,M,i),h(He,M,null),o(M,En),o(M,xt),o(M,Mn),o(M,wt),l(e,zo,i),l(e,Q,i),o(Q,de),o(de,ro),h(Ne,ro,null),o(Q,In),o(Q,Tt),l(e,So,i),l(e,I,i),h(Ve,I,null),o(I,Hn),o(I,Ct),o(I,Nn),o(I,kt),l(e,Fo,i),l(e,U,i),h(je,U,null),o(U,Vn),o(U,Lt),l(e,qo,i),l(e,B,i),o(B,ce),o(ce,so),h(Oe,so,null),o(B,jn),o(B,Dt),l(e,Ao,i),l(e,H,i),h(Je,H,null),o(H,On),o(H,Pt),o(H,Jn),h(pe,H,null),l(e,Eo,i),l(e,N,i),h(Ge,N,null),o(N,Gn),o(N,zt),o(N,Zn),h(me,N,null),l(e,Mo,i),l(e,X,i),h(Ze,X,null),o(X,Qn),o(X,St),l(e,Io,i),l(e,R,i),h(Qe,R,null),o(R,Un),o(R,Ft),l(e,Ho,i),l(e,W,i),h(Ue,W,null),o(W,Bn),o(W,qt),l(e,No,i),l(e,V,i),h(Be,V,null),o(V,Xn),o(V,At),o(V,Rn),h(fe,V,null),l(e,Vo,i),l(e,K,i),o(K,ue),o(ue,ao),h(Xe,ao,null),o(K,Wn),o(K,Et),l(e,jo,i),l(e,Y,i),h(Re,Y,null),o(Y,Kn),o(Y,Mt),l(e,Oo,i),l(e,L,i),h(We,L,null),o(L,Yn),o(L,It),o(L,er),o(L,Ht),o(L,tr),o(L,Nt),l(e,Jo,i),l(e,ee,i),h(Ke,ee,null),o(ee,or),o(ee,Vt),l(e,Go,i),l(e,io,i),Zo=!0},p(e,[i]){const Ye={};i&2&&(Ye.$$scope={dirty:i,ctx:e}),ne.$set(Ye);const lo={};i&2&&(lo.$$scope={dirty:i,ctx:e}),se.$set(lo);const co={};i&2&&(co.$$scope={dirty:i,ctx:e}),le.$set(co);const et={};i&2&&(et.$$scope={dirty:i,ctx:e}),pe.$set(et);const po={};i&2&&(po.$$scope={dirty:i,ctx:e}),me.$set(po);const mo={};i&2&&(mo.$$scope={dirty:i,ctx:e}),fe.$set(mo)},i(e){Zo||(g(_e.$$.fragment,e),g($e.$$.fragment,e),g(ye.$$.fragment,e),g(xe.$$.fragment,e),g(we.$$.fragment,e),g(Te.$$.fragment,e),g(Ce.$$.fragment,e),g(ne.$$.fragment,e),g(ke.$$.fragment,e),g(Le.$$.fragment,e),g(se.$$.fragment,e),g(De.$$.fragment,e),g(Pe.$$.fragment,e),g(ze.$$.fragment,e),g(Se.$$.fragment,e),g(Fe.$$.fragment,e),g(qe.$$.fragment,e),g(Ae.$$.fragment,e),g(le.$$.fragment,e),g(Ee.$$.fragment,e),g(Me.$$.fragment,e),g(Ie.$$.fragment,e),g(He.$$.fragment,e),g(Ne.$$.fragment,e),g(Ve.$$.fragment,e),g(je.$$.fragment,e),g(Oe.$$.fragment,e),g(Je.$$.fragment,e),g(pe.$$.fragment,e),g(Ge.$$.fragment,e),g(me.$$.fragment,e),g(Ze.$$.fragment,e),g(Qe.$$.fragment,e),g(Ue.$$.fragment,e),g(Be.$$.fragment,e),g(fe.$$.fragment,e),g(Xe.$$.fragment,e),g(Re.$$.fragment,e),g(We.$$.fragment,e),g(Ke.$$.fragment,e),Zo=!0)},o(e){_(_e.$$.fragment,e),_($e.$$.fragment,e),_(ye.$$.fragment,e),_(xe.$$.fragment,e),_(we.$$.fragment,e),_(Te.$$.fragment,e),_(Ce.$$.fragment,e),_(ne.$$.fragment,e),_(ke.$$.fragment,e),_(Le.$$.fragment,e),_(se.$$.fragment,e),_(De.$$.fragment,e),_(Pe.$$.fragment,e),_(ze.$$.fragment,e),_(Se.$$.fragment,e),_(Fe.$$.fragment,e),_(qe.$$.fragment,e),_(Ae.$$.fragment,e),_(le.$$.fragment,e),_(Ee.$$.fragment,e),_(Me.$$.fragment,e),_(Ie.$$.fragment,e),_(He.$$.fragment,e),_(Ne.$$.fragment,e),_(Ve.$$.fragment,e),_(je.$$.fragment,e),_(Oe.$$.fragment,e),_(Je.$$.fragment,e),_(pe.$$.fragment,e),_(Ge.$$.fragment,e),_(me.$$.fragment,e),_(Ze.$$.fragment,e),_(Qe.$$.fragment,e),_(Ue.$$.fragment,e),_(Be.$$.fragment,e),_(fe.$$.fragment,e),_(Xe.$$.fragment,e),_(Re.$$.fragment,e),_(We.$$.fragment,e),_(Ke.$$.fragment,e),Zo=!1},d(e){e&&(t(x),t(b),t(w),t(C),t(uo),t(ve),t(ho),t(be),t(go),t(O),t(_o),t(D),t(vo),t(P),t(bo),t(z),t($o),t(S),t(yo),t(J),t(xo),t(F),t(wo),t(q),t(To),t(G),t(Co),t(k),t(ko),t(Z),t(Lo),t(A),t(Do),t(E),t(Po),t(M),t(zo),t(Q),t(So),t(I),t(Fo),t(U),t(qo),t(B),t(Ao),t(H),t(Eo),t(N),t(Mo),t(X),t(Io),t(R),t(Ho),t(W),t(No),t(V),t(Vo),t(K),t(jo),t(Y),t(Oo),t(L),t(Jo),t(ee),t(Go),t(io)),t(d),v(_e),v($e),v(ye),v(xe),v(we),v(Te),v(Ce),v(ne),v(ke),v(Le),v(se),v(De),v(Pe),v(ze),v(Se),v(Fe),v(qe),v(Ae),v(le),v(Ee),v(Me),v(Ie),v(He),v(Ne),v(Ve),v(je),v(Oe),v(Je),v(pe),v(Ge),v(me),v(Ze),v(Qe),v(Ue),v(Be),v(fe),v(Xe),v(Re),v(We),v(Ke)}}}const fs={local:"custom-layers-and-utilities",sections:[{local:"transformers.Conv1D",title:"Pytorch custom modules"},{local:"transformers.apply_chunking_to_forward",title:"PyTorch Helper Functions"},{local:"transformers.modeling_tf_utils.TFConv1D",title:"TensorFlow custom layers"},{local:"transformers.modeling_tf_utils.TFCausalLanguageModelingLoss",title:"TensorFlow loss functions"},{local:"transformers.modeling_tf_utils.get_initializer",title:"TensorFlow Helper Functions"}],title:"Custom Layers and Utilities"};function us(T){return es(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class xs extends ts{constructor(d){super(),os(this,d,us,ms,Yr,{})}}export{xs as component};
