import{S as jM,i as zM,s as CM,e as s,k as c,w as v,t as n,M as JM,c as r,d as t,m as u,a,x as k,h as o,b as f,N as EM,G as e,g as _,y as F,q as M,o as $,B as E,v as UM,L as Ye}from"../../chunks/vendor-hf-doc-builder.js";import{T as De}from"../../chunks/Tip-hf-doc-builder.js";import{D as oe}from"../../chunks/Docstring-hf-doc-builder.js";import{C as He}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Qe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Oe}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function IM(J){let d,y,h,m,T;return m=new He({props:{code:"MiUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",highlighted:`2<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=s("p"),y=n("Transformer sequence pair mask has the following format:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Transformer sequence pair mask has the following format:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function xM(J){let d,y,h,m,T;return m=new He({props:{code:"MiUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",highlighted:`2<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=s("p"),y=n("Transformer sequence pair mask has the following format:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Transformer sequence pair mask has the following format:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function WM(J){let d,y,h,m,T;return{c(){d=s("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),m=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(p,"CODE",{});var C=a(h);m=o(C,"Module"),C.forEach(t),T=o(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(i,p){_(i,d,p),e(d,y),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function ZM(J){let d,y,h,m,T;return m=new He({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGdW5uZWxCYXNlTW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZ1bm5lbC10cmFuc2Zvcm1lciUyRnNtYWxsLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBGdW5uZWxCYXNlTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmZ1bm5lbC10cmFuc2Zvcm1lciUyRnNtYWxsLWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FunnelBaseModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FunnelBaseModel.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=s("p"),y=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function qM(J){let d,y,h,m,T;return{c(){d=s("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),m=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(p,"CODE",{});var C=a(h);m=o(C,"Module"),C.forEach(t),T=o(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(i,p){_(i,d,p),e(d,y),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function NM(J){let d,y,h,m,T;return m=new He({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGdW5uZWxNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZnVubmVsLXRyYW5zZm9ybWVyJTJGc21hbGwlMjIpJTBBbW9kZWwlMjAlM0QlMjBGdW5uZWxNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZnVubmVsLXRyYW5zZm9ybWVyJTJGc21hbGwlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FunnelModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FunnelModel.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=s("p"),y=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function BM(J){let d,y,h,m,T;return{c(){d=s("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),m=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(p,"CODE",{});var C=a(h);m=o(C,"Module"),C.forEach(t),T=o(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(i,p){_(i,d,p),e(d,y),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function PM(J){let d,y,h,m,T;return m=new He({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGdW5uZWxGb3JQcmVUcmFpbmluZyUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZnVubmVsLXRyYW5zZm9ybWVyJTJGc21hbGwlMjIpJTBBbW9kZWwlMjAlM0QlMjBGdW5uZWxGb3JQcmVUcmFpbmluZy5mcm9tX3ByZXRyYWluZWQoJTIyZnVubmVsLXRyYW5zZm9ybWVyJTJGc21hbGwlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FunnelForPreTraining
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FunnelForPreTraining.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits`}}),{c(){d=s("p"),y=n("Examples:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Examples:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function RM(J){let d,y,h,m,T;return{c(){d=s("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),m=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(p,"CODE",{});var C=a(h);m=o(C,"Module"),C.forEach(t),T=o(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(i,p){_(i,d,p),e(d,y),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function GM(J){let d,y,h,m,T;return m=new He({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGdW5uZWxGb3JNYXNrZWRMTSUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZnVubmVsLXRyYW5zZm9ybWVyJTJGc21hbGwlMjIpJTBBbW9kZWwlMjAlM0QlMjBGdW5uZWxGb3JNYXNrZWRMTS5mcm9tX3ByZXRyYWluZWQoJTIyZnVubmVsLXRyYW5zZm9ybWVyJTJGc21hbGwlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwJTNDbWFzayUzRS4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwcmV0cmlldmUlMjBpbmRleCUyMG9mJTIwJTNDbWFzayUzRSUwQW1hc2tfdG9rZW5faW5kZXglMjAlM0QlMjAoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkKSU1QjAlNUQubm9uemVybyhhc190dXBsZSUzRFRydWUpJTVCMCU1RCUwQSUwQXByZWRpY3RlZF90b2tlbl9pZCUyMCUzRCUyMGxvZ2l0cyU1QjAlMkMlMjBtYXNrX3Rva2VuX2luZGV4JTVELmFyZ21heChheGlzJTNELTEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwUGFyaXMuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMjMlMjBtYXNrJTIwbGFiZWxzJTIwb2YlMjBub24tJTNDbWFzayUzRSUyMHRva2VucyUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLndoZXJlKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCUyQyUyMGxhYmVscyUyQyUyMC0xMDApJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FunnelForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FunnelForMaskedLM.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is &lt;mask&gt;.&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve index of &lt;mask&gt;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>].nonzero(as_tuple=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = logits[<span class="hljs-number">0</span>, mask_token_index].argmax(axis=-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(<span class="hljs-string">&quot;The capital of France is Paris.&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># mask labels of non-&lt;mask&gt; tokens</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.where(inputs.input_ids == tokenizer.mask_token_id, labels, -<span class="hljs-number">100</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)`}}),{c(){d=s("p"),y=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function VM(J){let d,y,h,m,T;return{c(){d=s("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),m=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(p,"CODE",{});var C=a(h);m=o(C,"Module"),C.forEach(t),T=o(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(i,p){_(i,d,p),e(d,y),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function AM(J){let d,y,h,m,T;return m=new He({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEZ1bm5lbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmdW5uZWwtdHJhbnNmb3JtZXIlMkZzbWFsbC1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwRnVubmVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZnVubmVsLXRyYW5zZm9ybWVyJTJGc21hbGwtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWQlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KCkuaXRlbSgpJTBBJTBBJTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwRnVubmVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZnVubmVsLXRyYW5zZm9ybWVyJTJGc21hbGwtYmFzZSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FunnelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FunnelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = logits.argmax().item()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FunnelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small-base&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=s("p"),y=n("Example of single-label classification:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Example of single-label classification:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function SM(J){let d,y,h,m,T;return m=new He({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEZ1bm5lbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmdW5uZWwtdHJhbnNmb3JtZXIlMkZzbWFsbC1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwRnVubmVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZnVubmVsLXRyYW5zZm9ybWVyJTJGc21hbGwtYmFzZSUyMiUyQyUyMHByb2JsZW1fdHlwZSUzRCUyMm11bHRpX2xhYmVsX2NsYXNzaWZpY2F0aW9uJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZHMlMjAlM0QlMjB0b3JjaC5hcmFuZ2UoMCUyQyUyMGxvZ2l0cy5zaGFwZSU1Qi0xJTVEKSU1QnRvcmNoLnNpZ21vaWQobG9naXRzKS5zcXVlZXplKGRpbSUzRDApJTIwJTNFJTIwMC41JTVEJTBBJTBBJTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwRnVubmVsRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyZnVubmVsLXRyYW5zZm9ybWVyJTJGc21hbGwtYmFzZSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FunnelForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FunnelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small-base&quot;</span>, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = torch.arange(<span class="hljs-number">0</span>, logits.shape[-<span class="hljs-number">1</span>])[torch.sigmoid(logits).squeeze(dim=<span class="hljs-number">0</span>) &gt; <span class="hljs-number">0.5</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FunnelForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;funnel-transformer/small-base&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.<span class="hljs-built_in">sum</span>(
<span class="hljs-meta">... </span>    torch.nn.functional.one_hot(predicted_class_ids[<span class="hljs-literal">None</span>, :].clone(), num_classes=num_labels), dim=<span class="hljs-number">1</span>
<span class="hljs-meta">... </span>).to(torch.<span class="hljs-built_in">float</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=s("p"),y=n("Example of multi-label classification:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Example of multi-label classification:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function XM(J){let d,y,h,m,T;return{c(){d=s("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),m=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(p,"CODE",{});var C=a(h);m=o(C,"Module"),C.forEach(t),T=o(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(i,p){_(i,d,p),e(d,y),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function LM(J){let d,y,h,m,T;return m=new He({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGdW5uZWxGb3JNdWx0aXBsZUNob2ljZSUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZnVubmVsLXRyYW5zZm9ybWVyJTJGc21hbGwtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEZ1bm5lbEZvck11bHRpcGxlQ2hvaWNlLmZyb21fcHJldHJhaW5lZCglMjJmdW5uZWwtdHJhbnNmb3JtZXIlMkZzbWFsbC1iYXNlJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkluJTIwSXRhbHklMkMlMjBwaXp6YSUyMHNlcnZlZCUyMGluJTIwZm9ybWFsJTIwc2V0dGluZ3MlMkMlMjBzdWNoJTIwYXMlMjBhdCUyMGElMjByZXN0YXVyYW50JTJDJTIwaXMlMjBwcmVzZW50ZWQlMjB1bnNsaWNlZC4lMjIlMEFjaG9pY2UwJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2l0aCUyMGElMjBmb3JrJTIwYW5kJTIwYSUyMGtuaWZlLiUyMiUwQWNob2ljZTElMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aGlsZSUyMGhlbGQlMjBpbiUyMHRoZSUyMGhhbmQuJTIyJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2gudGVuc29yKDApLnVuc3F1ZWV6ZSgwKSUyMCUyMCUyMyUyMGNob2ljZTAlMjBpcyUyMGNvcnJlY3QlMjAoYWNjb3JkaW5nJTIwdG8lMjBXaWtpcGVkaWElMjAlM0IpKSUyQyUyMGJhdGNoJTIwc2l6ZSUyMDElMEElMEFlbmNvZGluZyUyMCUzRCUyMHRva2VuaXplciglNUJwcm9tcHQlMkMlMjBwcm9tcHQlNUQlMkMlMjAlNUJjaG9pY2UwJTJDJTIwY2hvaWNlMSU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMkMlMjBwYWRkaW5nJTNEVHJ1ZSklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKiolN0JrJTNBJTIwdi51bnNxdWVlemUoMCklMjBmb3IlMjBrJTJDJTIwdiUyMGluJTIwZW5jb2RpbmcuaXRlbXMoKSU3RCUyQyUyMGxhYmVscyUzRGxhYmVscyklMjAlMjAlMjMlMjBiYXRjaCUyMHNpemUlMjBpcyUyMDElMEElMEElMjMlMjB0aGUlMjBsaW5lYXIlMjBjbGFzc2lmaWVyJTIwc3RpbGwlMjBuZWVkcyUyMHRvJTIwYmUlMjB0cmFpbmVkJTBBbG9zcyUyMCUzRCUyMG91dHB1dHMubG9zcyUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FunnelForMultipleChoice
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FunnelForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice0 = <span class="hljs-string">&quot;It is eaten with a fork and a knife.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice1 = <span class="hljs-string">&quot;It is eaten while held in the hand.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor(<span class="hljs-number">0</span>).unsqueeze(<span class="hljs-number">0</span>)  <span class="hljs-comment"># choice0 is correct (according to Wikipedia ;)), batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**{k: v.unsqueeze(<span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()}, labels=labels)  <span class="hljs-comment"># batch size is 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),y=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function DM(J){let d,y,h,m,T;return{c(){d=s("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),m=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(p,"CODE",{});var C=a(h);m=o(C,"Module"),C.forEach(t),T=o(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(i,p){_(i,d,p),e(d,y),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function QM(J){let d,y,h,m,T;return m=new He({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGdW5uZWxGb3JUb2tlbkNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmdW5uZWwtdHJhbnNmb3JtZXIlMkZzbWFsbCUyMiklMEFtb2RlbCUyMCUzRCUyMEZ1bm5lbEZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZ1bm5lbC10cmFuc2Zvcm1lciUyRnNtYWxsJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjAlMjJIdWdnaW5nRmFjZSUyMGlzJTIwYSUyMGNvbXBhbnklMjBiYXNlZCUyMGluJTIwUGFyaXMlMjBhbmQlMjBOZXclMjBZb3JrJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTBBKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoLTEpJTBBJTBBJTIzJTIwTm90ZSUyMHRoYXQlMjB0b2tlbnMlMjBhcmUlMjBjbGFzc2lmaWVkJTIwcmF0aGVyJTIwdGhlbiUyMGlucHV0JTIwd29yZHMlMjB3aGljaCUyMG1lYW5zJTIwdGhhdCUwQSUyMyUyMHRoZXJlJTIwbWlnaHQlMjBiZSUyMG1vcmUlMjBwcmVkaWN0ZWQlMjB0b2tlbiUyMGNsYXNzZXMlMjB0aGFuJTIwd29yZHMuJTBBJTIzJTIwTXVsdGlwbGUlMjB0b2tlbiUyMGNsYXNzZXMlMjBtaWdodCUyMGFjY291bnQlMjBmb3IlMjB0aGUlMjBzYW1lJTIwd29yZCUwQXByZWRpY3RlZF90b2tlbnNfY2xhc3NlcyUyMCUzRCUyMCU1Qm1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnQuaXRlbSgpJTVEJTIwZm9yJTIwdCUyMGluJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyU1QjAlNUQlNUQlMEElMEFsYWJlbHMlMjAlM0QlMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTBBbG9zcyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3Nz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FunnelForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FunnelForTokenClassification.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;HuggingFace is a company based in Paris and New York&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = logits.argmax(-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t.item()] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>]]

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=s("p"),y=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function OM(J){let d,y,h,m,T;return{c(){d=s("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),m=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(p,"CODE",{});var C=a(h);m=o(C,"Module"),C.forEach(t),T=o(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(i,p){_(i,d,p),e(d,y),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function YM(J){let d,y,h,m,T;return m=new He({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGdW5uZWxGb3JRdWVzdGlvbkFuc3dlcmluZyUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZnVubmVsLXRyYW5zZm9ybWVyJTJGc21hbGwlMjIpJTBBbW9kZWwlMjAlM0QlMjBGdW5uZWxGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyZnVubmVsLXRyYW5zZm9ybWVyJTJGc21hbGwlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWFuc3dlcl9zdGFydF9pbmRleCUyMCUzRCUyMG91dHB1dHMuc3RhcnRfbG9naXRzLmFyZ21heCgpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMG91dHB1dHMuZW5kX2xvZ2l0cy5hcmdtYXgoKSUwQSUwQXByZWRpY3RfYW5zd2VyX3Rva2VucyUyMCUzRCUyMGlucHV0cy5pbnB1dF9pZHMlNUIwJTJDJTIwYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNBJTIwYW5zd2VyX2VuZF9pbmRleCUyMCUyQiUyMDElNUQlMEElMEElMjMlMjB0YXJnZXQlMjBpcyUyMCUyMm5pY2UlMjBwdXBwZXQlMjIlMEF0YXJnZXRfc3RhcnRfaW5kZXglMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxNSU1RCklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBzdGFydF9wb3NpdGlvbnMlM0R0YXJnZXRfc3RhcnRfaW5kZXglMkMlMjBlbmRfcG9zaXRpb25zJTNEdGFyZ2V0X2VuZF9pbmRleCklMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3Nz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FunnelForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FunnelForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = outputs.start_logits.argmax()
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = outputs.end_logits.argmax()

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = torch.tensor([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss`}}),{c(){d=s("p"),y=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function HM(J){let d,y,h,m,T,i,p,C,Te,ge,P,ce,K,w,we,G,ue,Ie,X,ae,le,V,ie,ve,A,ke,_e,R,Fe,de,ne,U,x,pe,D,be,he,S,Me,ye,I,$e,L,se,fe,Q,Ee,me,B,je,q,ze,ee,W,Ce,Z,Je,Ue;return{c(){d=s("p"),y=n("TensorFlow models and layers in "),h=s("code"),m=n("transformers"),T=n(" accept two formats as input:"),i=c(),p=s("ul"),C=s("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=c(),P=s("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),K=c(),w=s("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=s("code"),ue=n("model.fit()"),Ie=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),X=s("code"),ae=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=s("code"),ie=n("fit()"),ve=n(" and "),A=s("code"),ke=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),R=s("code"),Fe=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),U=s("ul"),x=s("li"),pe=n("a single Tensor with "),D=s("code"),be=n("input_ids"),he=n(" only and nothing else: "),S=s("code"),Me=n("model(input_ids)"),ye=c(),I=s("li"),$e=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),L=s("code"),se=n("model([input_ids, attention_mask])"),fe=n(" or "),Q=s("code"),Ee=n("model([input_ids, attention_mask, token_type_ids])"),me=c(),B=s("li"),je=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=s("code"),ze=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),W=s("p"),Ce=n(`Note that when creating models and layers with
`),Z=s("a"),Je=n("subclassing"),Ue=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var j=a(d);y=o(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var qe=a(h);m=o(qe,"transformers"),qe.forEach(t),T=o(j," accept two formats as input:"),j.forEach(t),i=u(g),p=r(g,"UL",{});var te=a(p);C=r(te,"LI",{});var Ne=a(C);Te=o(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),ge=u(te),P=r(te,"LI",{});var Be=a(P);ce=o(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),te.forEach(t),K=u(g),w=r(g,"P",{});var z=a(w);we=o(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=r(z,"CODE",{});var Pe=a(G);ue=o(Pe,"model.fit()"),Pe.forEach(t),Ie=o(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),X=r(z,"CODE",{});var Re=a(X);ae=o(Re,"model.fit()"),Re.forEach(t),le=o(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(z,"CODE",{});var xe=a(V);ie=o(xe,"fit()"),xe.forEach(t),ve=o(z," and "),A=r(z,"CODE",{});var Ge=a(A);ke=o(Ge,"predict()"),Ge.forEach(t),_e=o(z,`, such as when creating your own layers or models with
the Keras `),R=r(z,"CODE",{});var Ve=a(R);Fe=o(Ve,"Functional"),Ve.forEach(t),de=o(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=u(g),U=r(g,"UL",{});var N=a(U);x=r(N,"LI",{});var O=a(x);pe=o(O,"a single Tensor with "),D=r(O,"CODE",{});var Ae=a(D);be=o(Ae,"input_ids"),Ae.forEach(t),he=o(O," only and nothing else: "),S=r(O,"CODE",{});var We=a(S);Me=o(We,"model(input_ids)"),We.forEach(t),O.forEach(t),ye=u(N),I=r(N,"LI",{});var Y=a(I);$e=o(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),L=r(Y,"CODE",{});var Se=a(L);se=o(Se,"model([input_ids, attention_mask])"),Se.forEach(t),fe=o(Y," or "),Q=r(Y,"CODE",{});var Ze=a(Q);Ee=o(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),Y.forEach(t),me=u(N),B=r(N,"LI",{});var re=a(B);je=o(re,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=r(re,"CODE",{});var Xe=a(q);ze=o(Xe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Xe.forEach(t),re.forEach(t),N.forEach(t),ee=u(g),W=r(g,"P",{});var H=a(W);Ce=o(H,`Note that when creating models and layers with
`),Z=r(H,"A",{href:!0,rel:!0});var Le=a(Z);Je=o(Le,"subclassing"),Le.forEach(t),Ue=o(H,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),H.forEach(t),this.h()},h(){f(Z,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(Z,"rel","nofollow")},m(g,j){_(g,d,j),e(d,y),e(d,h),e(h,m),e(d,T),_(g,i,j),_(g,p,j),e(p,C),e(C,Te),e(p,ge),e(p,P),e(P,ce),_(g,K,j),_(g,w,j),e(w,we),e(w,G),e(G,ue),e(w,Ie),e(w,X),e(X,ae),e(w,le),e(w,V),e(V,ie),e(w,ve),e(w,A),e(A,ke),e(w,_e),e(w,R),e(R,Fe),e(w,de),_(g,ne,j),_(g,U,j),e(U,x),e(x,pe),e(x,D),e(D,be),e(x,he),e(x,S),e(S,Me),e(U,ye),e(U,I),e(I,$e),e(I,L),e(L,se),e(I,fe),e(I,Q),e(Q,Ee),e(U,me),e(U,B),e(B,je),e(B,q),e(q,ze),_(g,ee,j),_(g,W,j),e(W,Ce),e(W,Z),e(Z,Je),e(W,Ue)},d(g){g&&t(d),g&&t(i),g&&t(p),g&&t(K),g&&t(w),g&&t(ne),g&&t(U),g&&t(ee),g&&t(W)}}}function KM(J){let d,y,h,m,T;return{c(){d=s("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),m=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(p,"CODE",{});var C=a(h);m=o(C,"Module"),C.forEach(t),T=o(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(i,p){_(i,d,p),e(d,y),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function e1(J){let d,y,h,m,T;return m=new He({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkZ1bm5lbEJhc2VNb2RlbCUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZnVubmVsLXRyYW5zZm9ybWVyJTJGc21hbGwtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGRnVubmVsQmFzZU1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJmdW5uZWwtdHJhbnNmb3JtZXIlMkZzbWFsbC1iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFunnelBaseModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFFunnelBaseModel.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=s("p"),y=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function t1(J){let d,y,h,m,T,i,p,C,Te,ge,P,ce,K,w,we,G,ue,Ie,X,ae,le,V,ie,ve,A,ke,_e,R,Fe,de,ne,U,x,pe,D,be,he,S,Me,ye,I,$e,L,se,fe,Q,Ee,me,B,je,q,ze,ee,W,Ce,Z,Je,Ue;return{c(){d=s("p"),y=n("TensorFlow models and layers in "),h=s("code"),m=n("transformers"),T=n(" accept two formats as input:"),i=c(),p=s("ul"),C=s("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=c(),P=s("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),K=c(),w=s("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=s("code"),ue=n("model.fit()"),Ie=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),X=s("code"),ae=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=s("code"),ie=n("fit()"),ve=n(" and "),A=s("code"),ke=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),R=s("code"),Fe=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),U=s("ul"),x=s("li"),pe=n("a single Tensor with "),D=s("code"),be=n("input_ids"),he=n(" only and nothing else: "),S=s("code"),Me=n("model(input_ids)"),ye=c(),I=s("li"),$e=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),L=s("code"),se=n("model([input_ids, attention_mask])"),fe=n(" or "),Q=s("code"),Ee=n("model([input_ids, attention_mask, token_type_ids])"),me=c(),B=s("li"),je=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=s("code"),ze=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),W=s("p"),Ce=n(`Note that when creating models and layers with
`),Z=s("a"),Je=n("subclassing"),Ue=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var j=a(d);y=o(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var qe=a(h);m=o(qe,"transformers"),qe.forEach(t),T=o(j," accept two formats as input:"),j.forEach(t),i=u(g),p=r(g,"UL",{});var te=a(p);C=r(te,"LI",{});var Ne=a(C);Te=o(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),ge=u(te),P=r(te,"LI",{});var Be=a(P);ce=o(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),te.forEach(t),K=u(g),w=r(g,"P",{});var z=a(w);we=o(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=r(z,"CODE",{});var Pe=a(G);ue=o(Pe,"model.fit()"),Pe.forEach(t),Ie=o(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),X=r(z,"CODE",{});var Re=a(X);ae=o(Re,"model.fit()"),Re.forEach(t),le=o(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(z,"CODE",{});var xe=a(V);ie=o(xe,"fit()"),xe.forEach(t),ve=o(z," and "),A=r(z,"CODE",{});var Ge=a(A);ke=o(Ge,"predict()"),Ge.forEach(t),_e=o(z,`, such as when creating your own layers or models with
the Keras `),R=r(z,"CODE",{});var Ve=a(R);Fe=o(Ve,"Functional"),Ve.forEach(t),de=o(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=u(g),U=r(g,"UL",{});var N=a(U);x=r(N,"LI",{});var O=a(x);pe=o(O,"a single Tensor with "),D=r(O,"CODE",{});var Ae=a(D);be=o(Ae,"input_ids"),Ae.forEach(t),he=o(O," only and nothing else: "),S=r(O,"CODE",{});var We=a(S);Me=o(We,"model(input_ids)"),We.forEach(t),O.forEach(t),ye=u(N),I=r(N,"LI",{});var Y=a(I);$e=o(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),L=r(Y,"CODE",{});var Se=a(L);se=o(Se,"model([input_ids, attention_mask])"),Se.forEach(t),fe=o(Y," or "),Q=r(Y,"CODE",{});var Ze=a(Q);Ee=o(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),Y.forEach(t),me=u(N),B=r(N,"LI",{});var re=a(B);je=o(re,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=r(re,"CODE",{});var Xe=a(q);ze=o(Xe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Xe.forEach(t),re.forEach(t),N.forEach(t),ee=u(g),W=r(g,"P",{});var H=a(W);Ce=o(H,`Note that when creating models and layers with
`),Z=r(H,"A",{href:!0,rel:!0});var Le=a(Z);Je=o(Le,"subclassing"),Le.forEach(t),Ue=o(H,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),H.forEach(t),this.h()},h(){f(Z,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(Z,"rel","nofollow")},m(g,j){_(g,d,j),e(d,y),e(d,h),e(h,m),e(d,T),_(g,i,j),_(g,p,j),e(p,C),e(C,Te),e(p,ge),e(p,P),e(P,ce),_(g,K,j),_(g,w,j),e(w,we),e(w,G),e(G,ue),e(w,Ie),e(w,X),e(X,ae),e(w,le),e(w,V),e(V,ie),e(w,ve),e(w,A),e(A,ke),e(w,_e),e(w,R),e(R,Fe),e(w,de),_(g,ne,j),_(g,U,j),e(U,x),e(x,pe),e(x,D),e(D,be),e(x,he),e(x,S),e(S,Me),e(U,ye),e(U,I),e(I,$e),e(I,L),e(L,se),e(I,fe),e(I,Q),e(Q,Ee),e(U,me),e(U,B),e(B,je),e(B,q),e(q,ze),_(g,ee,j),_(g,W,j),e(W,Ce),e(W,Z),e(Z,Je),e(W,Ue)},d(g){g&&t(d),g&&t(i),g&&t(p),g&&t(K),g&&t(w),g&&t(ne),g&&t(U),g&&t(ee),g&&t(W)}}}function n1(J){let d,y,h,m,T;return{c(){d=s("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),m=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(p,"CODE",{});var C=a(h);m=o(C,"Module"),C.forEach(t),T=o(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(i,p){_(i,d,p),e(d,y),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function o1(J){let d,y,h,m,T;return m=new He({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkZ1bm5lbE1vZGVsJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmdW5uZWwtdHJhbnNmb3JtZXIlMkZzbWFsbCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGRnVubmVsTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmZ1bm5lbC10cmFuc2Zvcm1lciUyRnNtYWxsJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFunnelModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFFunnelModel.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=s("p"),y=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function s1(J){let d,y,h,m,T,i,p,C,Te,ge,P,ce,K,w,we,G,ue,Ie,X,ae,le,V,ie,ve,A,ke,_e,R,Fe,de,ne,U,x,pe,D,be,he,S,Me,ye,I,$e,L,se,fe,Q,Ee,me,B,je,q,ze,ee,W,Ce,Z,Je,Ue;return{c(){d=s("p"),y=n("TensorFlow models and layers in "),h=s("code"),m=n("transformers"),T=n(" accept two formats as input:"),i=c(),p=s("ul"),C=s("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=c(),P=s("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),K=c(),w=s("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=s("code"),ue=n("model.fit()"),Ie=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),X=s("code"),ae=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=s("code"),ie=n("fit()"),ve=n(" and "),A=s("code"),ke=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),R=s("code"),Fe=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),U=s("ul"),x=s("li"),pe=n("a single Tensor with "),D=s("code"),be=n("input_ids"),he=n(" only and nothing else: "),S=s("code"),Me=n("model(input_ids)"),ye=c(),I=s("li"),$e=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),L=s("code"),se=n("model([input_ids, attention_mask])"),fe=n(" or "),Q=s("code"),Ee=n("model([input_ids, attention_mask, token_type_ids])"),me=c(),B=s("li"),je=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=s("code"),ze=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),W=s("p"),Ce=n(`Note that when creating models and layers with
`),Z=s("a"),Je=n("subclassing"),Ue=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var j=a(d);y=o(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var qe=a(h);m=o(qe,"transformers"),qe.forEach(t),T=o(j," accept two formats as input:"),j.forEach(t),i=u(g),p=r(g,"UL",{});var te=a(p);C=r(te,"LI",{});var Ne=a(C);Te=o(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),ge=u(te),P=r(te,"LI",{});var Be=a(P);ce=o(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),te.forEach(t),K=u(g),w=r(g,"P",{});var z=a(w);we=o(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=r(z,"CODE",{});var Pe=a(G);ue=o(Pe,"model.fit()"),Pe.forEach(t),Ie=o(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),X=r(z,"CODE",{});var Re=a(X);ae=o(Re,"model.fit()"),Re.forEach(t),le=o(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(z,"CODE",{});var xe=a(V);ie=o(xe,"fit()"),xe.forEach(t),ve=o(z," and "),A=r(z,"CODE",{});var Ge=a(A);ke=o(Ge,"predict()"),Ge.forEach(t),_e=o(z,`, such as when creating your own layers or models with
the Keras `),R=r(z,"CODE",{});var Ve=a(R);Fe=o(Ve,"Functional"),Ve.forEach(t),de=o(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=u(g),U=r(g,"UL",{});var N=a(U);x=r(N,"LI",{});var O=a(x);pe=o(O,"a single Tensor with "),D=r(O,"CODE",{});var Ae=a(D);be=o(Ae,"input_ids"),Ae.forEach(t),he=o(O," only and nothing else: "),S=r(O,"CODE",{});var We=a(S);Me=o(We,"model(input_ids)"),We.forEach(t),O.forEach(t),ye=u(N),I=r(N,"LI",{});var Y=a(I);$e=o(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),L=r(Y,"CODE",{});var Se=a(L);se=o(Se,"model([input_ids, attention_mask])"),Se.forEach(t),fe=o(Y," or "),Q=r(Y,"CODE",{});var Ze=a(Q);Ee=o(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),Y.forEach(t),me=u(N),B=r(N,"LI",{});var re=a(B);je=o(re,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=r(re,"CODE",{});var Xe=a(q);ze=o(Xe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Xe.forEach(t),re.forEach(t),N.forEach(t),ee=u(g),W=r(g,"P",{});var H=a(W);Ce=o(H,`Note that when creating models and layers with
`),Z=r(H,"A",{href:!0,rel:!0});var Le=a(Z);Je=o(Le,"subclassing"),Le.forEach(t),Ue=o(H,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),H.forEach(t),this.h()},h(){f(Z,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(Z,"rel","nofollow")},m(g,j){_(g,d,j),e(d,y),e(d,h),e(h,m),e(d,T),_(g,i,j),_(g,p,j),e(p,C),e(C,Te),e(p,ge),e(p,P),e(P,ce),_(g,K,j),_(g,w,j),e(w,we),e(w,G),e(G,ue),e(w,Ie),e(w,X),e(X,ae),e(w,le),e(w,V),e(V,ie),e(w,ve),e(w,A),e(A,ke),e(w,_e),e(w,R),e(R,Fe),e(w,de),_(g,ne,j),_(g,U,j),e(U,x),e(x,pe),e(x,D),e(D,be),e(x,he),e(x,S),e(S,Me),e(U,ye),e(U,I),e(I,$e),e(I,L),e(L,se),e(I,fe),e(I,Q),e(Q,Ee),e(U,me),e(U,B),e(B,je),e(B,q),e(q,ze),_(g,ee,j),_(g,W,j),e(W,Ce),e(W,Z),e(Z,Je),e(W,Ue)},d(g){g&&t(d),g&&t(i),g&&t(p),g&&t(K),g&&t(w),g&&t(ne),g&&t(U),g&&t(ee),g&&t(W)}}}function r1(J){let d,y,h,m,T;return{c(){d=s("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),m=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(p,"CODE",{});var C=a(h);m=o(C,"Module"),C.forEach(t),T=o(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(i,p){_(i,d,p),e(d,y),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function a1(J){let d,y,h,m,T;return m=new He({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkZ1bm5lbEZvclByZVRyYWluaW5nJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmdW5uZWwtdHJhbnNmb3JtZXIlMkZzbWFsbCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGRnVubmVsRm9yUHJlVHJhaW5pbmcuZnJvbV9wcmV0cmFpbmVkKCUyMmZ1bm5lbC10cmFuc2Zvcm1lciUyRnNtYWxsJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFsb2dpdHMlMjAlM0QlMjBtb2RlbChpbnB1dHMpLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFunnelForPreTraining
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFFunnelForPreTraining.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(inputs).logits`}}),{c(){d=s("p"),y=n("Examples:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Examples:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function l1(J){let d,y,h,m,T,i,p,C,Te,ge,P,ce,K,w,we,G,ue,Ie,X,ae,le,V,ie,ve,A,ke,_e,R,Fe,de,ne,U,x,pe,D,be,he,S,Me,ye,I,$e,L,se,fe,Q,Ee,me,B,je,q,ze,ee,W,Ce,Z,Je,Ue;return{c(){d=s("p"),y=n("TensorFlow models and layers in "),h=s("code"),m=n("transformers"),T=n(" accept two formats as input:"),i=c(),p=s("ul"),C=s("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=c(),P=s("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),K=c(),w=s("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=s("code"),ue=n("model.fit()"),Ie=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),X=s("code"),ae=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=s("code"),ie=n("fit()"),ve=n(" and "),A=s("code"),ke=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),R=s("code"),Fe=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),U=s("ul"),x=s("li"),pe=n("a single Tensor with "),D=s("code"),be=n("input_ids"),he=n(" only and nothing else: "),S=s("code"),Me=n("model(input_ids)"),ye=c(),I=s("li"),$e=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),L=s("code"),se=n("model([input_ids, attention_mask])"),fe=n(" or "),Q=s("code"),Ee=n("model([input_ids, attention_mask, token_type_ids])"),me=c(),B=s("li"),je=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=s("code"),ze=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),W=s("p"),Ce=n(`Note that when creating models and layers with
`),Z=s("a"),Je=n("subclassing"),Ue=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var j=a(d);y=o(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var qe=a(h);m=o(qe,"transformers"),qe.forEach(t),T=o(j," accept two formats as input:"),j.forEach(t),i=u(g),p=r(g,"UL",{});var te=a(p);C=r(te,"LI",{});var Ne=a(C);Te=o(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),ge=u(te),P=r(te,"LI",{});var Be=a(P);ce=o(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),te.forEach(t),K=u(g),w=r(g,"P",{});var z=a(w);we=o(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=r(z,"CODE",{});var Pe=a(G);ue=o(Pe,"model.fit()"),Pe.forEach(t),Ie=o(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),X=r(z,"CODE",{});var Re=a(X);ae=o(Re,"model.fit()"),Re.forEach(t),le=o(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(z,"CODE",{});var xe=a(V);ie=o(xe,"fit()"),xe.forEach(t),ve=o(z," and "),A=r(z,"CODE",{});var Ge=a(A);ke=o(Ge,"predict()"),Ge.forEach(t),_e=o(z,`, such as when creating your own layers or models with
the Keras `),R=r(z,"CODE",{});var Ve=a(R);Fe=o(Ve,"Functional"),Ve.forEach(t),de=o(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=u(g),U=r(g,"UL",{});var N=a(U);x=r(N,"LI",{});var O=a(x);pe=o(O,"a single Tensor with "),D=r(O,"CODE",{});var Ae=a(D);be=o(Ae,"input_ids"),Ae.forEach(t),he=o(O," only and nothing else: "),S=r(O,"CODE",{});var We=a(S);Me=o(We,"model(input_ids)"),We.forEach(t),O.forEach(t),ye=u(N),I=r(N,"LI",{});var Y=a(I);$e=o(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),L=r(Y,"CODE",{});var Se=a(L);se=o(Se,"model([input_ids, attention_mask])"),Se.forEach(t),fe=o(Y," or "),Q=r(Y,"CODE",{});var Ze=a(Q);Ee=o(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),Y.forEach(t),me=u(N),B=r(N,"LI",{});var re=a(B);je=o(re,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=r(re,"CODE",{});var Xe=a(q);ze=o(Xe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Xe.forEach(t),re.forEach(t),N.forEach(t),ee=u(g),W=r(g,"P",{});var H=a(W);Ce=o(H,`Note that when creating models and layers with
`),Z=r(H,"A",{href:!0,rel:!0});var Le=a(Z);Je=o(Le,"subclassing"),Le.forEach(t),Ue=o(H,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),H.forEach(t),this.h()},h(){f(Z,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(Z,"rel","nofollow")},m(g,j){_(g,d,j),e(d,y),e(d,h),e(h,m),e(d,T),_(g,i,j),_(g,p,j),e(p,C),e(C,Te),e(p,ge),e(p,P),e(P,ce),_(g,K,j),_(g,w,j),e(w,we),e(w,G),e(G,ue),e(w,Ie),e(w,X),e(X,ae),e(w,le),e(w,V),e(V,ie),e(w,ve),e(w,A),e(A,ke),e(w,_e),e(w,R),e(R,Fe),e(w,de),_(g,ne,j),_(g,U,j),e(U,x),e(x,pe),e(x,D),e(D,be),e(x,he),e(x,S),e(S,Me),e(U,ye),e(U,I),e(I,$e),e(I,L),e(L,se),e(I,fe),e(I,Q),e(Q,Ee),e(U,me),e(U,B),e(B,je),e(B,q),e(q,ze),_(g,ee,j),_(g,W,j),e(W,Ce),e(W,Z),e(Z,Je),e(W,Ue)},d(g){g&&t(d),g&&t(i),g&&t(p),g&&t(K),g&&t(w),g&&t(ne),g&&t(U),g&&t(ee),g&&t(W)}}}function i1(J){let d,y,h,m,T;return{c(){d=s("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),m=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(p,"CODE",{});var C=a(h);m=o(C,"Module"),C.forEach(t),T=o(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(i,p){_(i,d,p),e(d,y),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function d1(J){let d,y,h,m,T;return m=new He({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkZ1bm5lbEZvck1hc2tlZExNJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmdW5uZWwtdHJhbnNmb3JtZXIlMkZzbWFsbCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGRnVubmVsRm9yTWFza2VkTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmZ1bm5lbC10cmFuc2Zvcm1lciUyRnNtYWxsJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJUaGUlMjBjYXBpdGFsJTIwb2YlMjBGcmFuY2UlMjBpcyUyMCU1Qk1BU0slNUQuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwcmV0cmlldmUlMjBpbmRleCUyMG9mJTIwJTVCTUFTSyU1RCUwQW1hc2tfdG9rZW5faW5kZXglMjAlM0QlMjB0Zi53aGVyZSgoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkKSU1QjAlNUQpJTBBc2VsZWN0ZWRfbG9naXRzJTIwJTNEJTIwdGYuZ2F0aGVyX25kKGxvZ2l0cyU1QjAlNUQlMkMlMjBpbmRpY2VzJTNEbWFza190b2tlbl9pbmRleCklMEElMEFwcmVkaWN0ZWRfdG9rZW5faWQlMjAlM0QlMjB0Zi5tYXRoLmFyZ21heChzZWxlY3RlZF9sb2dpdHMlMkMlMjBheGlzJTNELTEp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFunnelForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFFunnelForMaskedLM.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is [MASK].&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve index of [MASK]</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = tf.where((inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>selected_logits = tf.gather_nd(logits[<span class="hljs-number">0</span>], indices=mask_token_index)

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = tf.math.argmax(selected_logits, axis=-<span class="hljs-number">1</span>)`}}),{c(){d=s("p"),y=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function c1(J){let d,y;return d=new He({props:{code:"bGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwUGFyaXMuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMjMlMjBtYXNrJTIwbGFiZWxzJTIwb2YlMjBub24tJTVCTUFTSyU1RCUyMHRva2VucyUwQWxhYmVscyUyMCUzRCUyMHRmLndoZXJlKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCUyQyUyMGxhYmVscyUyQyUyMC0xMDApJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(<span class="hljs-string">&quot;The capital of France is Paris.&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># mask labels of non-[MASK] tokens</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.where(inputs.input_ids == tokenizer.mask_token_id, labels, -<span class="hljs-number">100</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)`}}),{c(){v(d.$$.fragment)},l(h){k(d.$$.fragment,h)},m(h,m){F(d,h,m),y=!0},p:Ye,i(h){y||(M(d.$$.fragment,h),y=!0)},o(h){$(d.$$.fragment,h),y=!1},d(h){E(d,h)}}}function u1(J){let d,y,h,m,T,i,p,C,Te,ge,P,ce,K,w,we,G,ue,Ie,X,ae,le,V,ie,ve,A,ke,_e,R,Fe,de,ne,U,x,pe,D,be,he,S,Me,ye,I,$e,L,se,fe,Q,Ee,me,B,je,q,ze,ee,W,Ce,Z,Je,Ue;return{c(){d=s("p"),y=n("TensorFlow models and layers in "),h=s("code"),m=n("transformers"),T=n(" accept two formats as input:"),i=c(),p=s("ul"),C=s("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=c(),P=s("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),K=c(),w=s("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=s("code"),ue=n("model.fit()"),Ie=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),X=s("code"),ae=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=s("code"),ie=n("fit()"),ve=n(" and "),A=s("code"),ke=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),R=s("code"),Fe=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),U=s("ul"),x=s("li"),pe=n("a single Tensor with "),D=s("code"),be=n("input_ids"),he=n(" only and nothing else: "),S=s("code"),Me=n("model(input_ids)"),ye=c(),I=s("li"),$e=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),L=s("code"),se=n("model([input_ids, attention_mask])"),fe=n(" or "),Q=s("code"),Ee=n("model([input_ids, attention_mask, token_type_ids])"),me=c(),B=s("li"),je=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=s("code"),ze=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),W=s("p"),Ce=n(`Note that when creating models and layers with
`),Z=s("a"),Je=n("subclassing"),Ue=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var j=a(d);y=o(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var qe=a(h);m=o(qe,"transformers"),qe.forEach(t),T=o(j," accept two formats as input:"),j.forEach(t),i=u(g),p=r(g,"UL",{});var te=a(p);C=r(te,"LI",{});var Ne=a(C);Te=o(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),ge=u(te),P=r(te,"LI",{});var Be=a(P);ce=o(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),te.forEach(t),K=u(g),w=r(g,"P",{});var z=a(w);we=o(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=r(z,"CODE",{});var Pe=a(G);ue=o(Pe,"model.fit()"),Pe.forEach(t),Ie=o(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),X=r(z,"CODE",{});var Re=a(X);ae=o(Re,"model.fit()"),Re.forEach(t),le=o(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(z,"CODE",{});var xe=a(V);ie=o(xe,"fit()"),xe.forEach(t),ve=o(z," and "),A=r(z,"CODE",{});var Ge=a(A);ke=o(Ge,"predict()"),Ge.forEach(t),_e=o(z,`, such as when creating your own layers or models with
the Keras `),R=r(z,"CODE",{});var Ve=a(R);Fe=o(Ve,"Functional"),Ve.forEach(t),de=o(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=u(g),U=r(g,"UL",{});var N=a(U);x=r(N,"LI",{});var O=a(x);pe=o(O,"a single Tensor with "),D=r(O,"CODE",{});var Ae=a(D);be=o(Ae,"input_ids"),Ae.forEach(t),he=o(O," only and nothing else: "),S=r(O,"CODE",{});var We=a(S);Me=o(We,"model(input_ids)"),We.forEach(t),O.forEach(t),ye=u(N),I=r(N,"LI",{});var Y=a(I);$e=o(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),L=r(Y,"CODE",{});var Se=a(L);se=o(Se,"model([input_ids, attention_mask])"),Se.forEach(t),fe=o(Y," or "),Q=r(Y,"CODE",{});var Ze=a(Q);Ee=o(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),Y.forEach(t),me=u(N),B=r(N,"LI",{});var re=a(B);je=o(re,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=r(re,"CODE",{});var Xe=a(q);ze=o(Xe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Xe.forEach(t),re.forEach(t),N.forEach(t),ee=u(g),W=r(g,"P",{});var H=a(W);Ce=o(H,`Note that when creating models and layers with
`),Z=r(H,"A",{href:!0,rel:!0});var Le=a(Z);Je=o(Le,"subclassing"),Le.forEach(t),Ue=o(H,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),H.forEach(t),this.h()},h(){f(Z,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(Z,"rel","nofollow")},m(g,j){_(g,d,j),e(d,y),e(d,h),e(h,m),e(d,T),_(g,i,j),_(g,p,j),e(p,C),e(C,Te),e(p,ge),e(p,P),e(P,ce),_(g,K,j),_(g,w,j),e(w,we),e(w,G),e(G,ue),e(w,Ie),e(w,X),e(X,ae),e(w,le),e(w,V),e(V,ie),e(w,ve),e(w,A),e(A,ke),e(w,_e),e(w,R),e(R,Fe),e(w,de),_(g,ne,j),_(g,U,j),e(U,x),e(x,pe),e(x,D),e(D,be),e(x,he),e(x,S),e(S,Me),e(U,ye),e(U,I),e(I,$e),e(I,L),e(L,se),e(I,fe),e(I,Q),e(Q,Ee),e(U,me),e(U,B),e(B,je),e(B,q),e(q,ze),_(g,ee,j),_(g,W,j),e(W,Ce),e(W,Z),e(Z,Je),e(W,Ue)},d(g){g&&t(d),g&&t(i),g&&t(p),g&&t(K),g&&t(w),g&&t(ne),g&&t(U),g&&t(ee),g&&t(W)}}}function p1(J){let d,y,h,m,T;return{c(){d=s("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),m=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(p,"CODE",{});var C=a(h);m=o(C,"Module"),C.forEach(t),T=o(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(i,p){_(i,d,p),e(d,y),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function h1(J){let d,y,h,m,T;return m=new He({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkZ1bm5lbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZ1bm5lbC10cmFuc2Zvcm1lciUyRnNtYWxsLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkZ1bm5lbEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmZ1bm5lbC10cmFuc2Zvcm1lciUyRnNtYWxsLWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWQlMjAlM0QlMjBpbnQodGYubWF0aC5hcmdtYXgobG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFunnelForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFFunnelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = <span class="hljs-built_in">int</span>(tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])`}}),{c(){d=s("p"),y=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function f1(J){let d,y;return d=new He({props:{code:"JTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwVEZGdW5uZWxGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmdW5uZWwtdHJhbnNmb3JtZXIlMkZzbWFsbC1iYXNlJTIyJTJDJTIwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdGYuY29uc3RhbnQoMSklMEFsb3NzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpLmxvc3M=",highlighted:'<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on `num_labels` classes, you can pass `num_labels=num_labels` to `.from_pretrained(...)`</span>\n<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)\n<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFFunnelForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small-base&quot;</span>, num_labels=num_labels)\n\n<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.constant(<span class="hljs-number">1</span>)\n<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss'}}),{c(){v(d.$$.fragment)},l(h){k(d.$$.fragment,h)},m(h,m){F(d,h,m),y=!0},p:Ye,i(h){y||(M(d.$$.fragment,h),y=!0)},o(h){$(d.$$.fragment,h),y=!1},d(h){E(d,h)}}}function m1(J){let d,y,h,m,T,i,p,C,Te,ge,P,ce,K,w,we,G,ue,Ie,X,ae,le,V,ie,ve,A,ke,_e,R,Fe,de,ne,U,x,pe,D,be,he,S,Me,ye,I,$e,L,se,fe,Q,Ee,me,B,je,q,ze,ee,W,Ce,Z,Je,Ue;return{c(){d=s("p"),y=n("TensorFlow models and layers in "),h=s("code"),m=n("transformers"),T=n(" accept two formats as input:"),i=c(),p=s("ul"),C=s("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=c(),P=s("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),K=c(),w=s("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=s("code"),ue=n("model.fit()"),Ie=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),X=s("code"),ae=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=s("code"),ie=n("fit()"),ve=n(" and "),A=s("code"),ke=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),R=s("code"),Fe=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),U=s("ul"),x=s("li"),pe=n("a single Tensor with "),D=s("code"),be=n("input_ids"),he=n(" only and nothing else: "),S=s("code"),Me=n("model(input_ids)"),ye=c(),I=s("li"),$e=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),L=s("code"),se=n("model([input_ids, attention_mask])"),fe=n(" or "),Q=s("code"),Ee=n("model([input_ids, attention_mask, token_type_ids])"),me=c(),B=s("li"),je=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=s("code"),ze=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),W=s("p"),Ce=n(`Note that when creating models and layers with
`),Z=s("a"),Je=n("subclassing"),Ue=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var j=a(d);y=o(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var qe=a(h);m=o(qe,"transformers"),qe.forEach(t),T=o(j," accept two formats as input:"),j.forEach(t),i=u(g),p=r(g,"UL",{});var te=a(p);C=r(te,"LI",{});var Ne=a(C);Te=o(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),ge=u(te),P=r(te,"LI",{});var Be=a(P);ce=o(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),te.forEach(t),K=u(g),w=r(g,"P",{});var z=a(w);we=o(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=r(z,"CODE",{});var Pe=a(G);ue=o(Pe,"model.fit()"),Pe.forEach(t),Ie=o(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),X=r(z,"CODE",{});var Re=a(X);ae=o(Re,"model.fit()"),Re.forEach(t),le=o(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(z,"CODE",{});var xe=a(V);ie=o(xe,"fit()"),xe.forEach(t),ve=o(z," and "),A=r(z,"CODE",{});var Ge=a(A);ke=o(Ge,"predict()"),Ge.forEach(t),_e=o(z,`, such as when creating your own layers or models with
the Keras `),R=r(z,"CODE",{});var Ve=a(R);Fe=o(Ve,"Functional"),Ve.forEach(t),de=o(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=u(g),U=r(g,"UL",{});var N=a(U);x=r(N,"LI",{});var O=a(x);pe=o(O,"a single Tensor with "),D=r(O,"CODE",{});var Ae=a(D);be=o(Ae,"input_ids"),Ae.forEach(t),he=o(O," only and nothing else: "),S=r(O,"CODE",{});var We=a(S);Me=o(We,"model(input_ids)"),We.forEach(t),O.forEach(t),ye=u(N),I=r(N,"LI",{});var Y=a(I);$e=o(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),L=r(Y,"CODE",{});var Se=a(L);se=o(Se,"model([input_ids, attention_mask])"),Se.forEach(t),fe=o(Y," or "),Q=r(Y,"CODE",{});var Ze=a(Q);Ee=o(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),Y.forEach(t),me=u(N),B=r(N,"LI",{});var re=a(B);je=o(re,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=r(re,"CODE",{});var Xe=a(q);ze=o(Xe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Xe.forEach(t),re.forEach(t),N.forEach(t),ee=u(g),W=r(g,"P",{});var H=a(W);Ce=o(H,`Note that when creating models and layers with
`),Z=r(H,"A",{href:!0,rel:!0});var Le=a(Z);Je=o(Le,"subclassing"),Le.forEach(t),Ue=o(H,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),H.forEach(t),this.h()},h(){f(Z,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(Z,"rel","nofollow")},m(g,j){_(g,d,j),e(d,y),e(d,h),e(h,m),e(d,T),_(g,i,j),_(g,p,j),e(p,C),e(C,Te),e(p,ge),e(p,P),e(P,ce),_(g,K,j),_(g,w,j),e(w,we),e(w,G),e(G,ue),e(w,Ie),e(w,X),e(X,ae),e(w,le),e(w,V),e(V,ie),e(w,ve),e(w,A),e(A,ke),e(w,_e),e(w,R),e(R,Fe),e(w,de),_(g,ne,j),_(g,U,j),e(U,x),e(x,pe),e(x,D),e(D,be),e(x,he),e(x,S),e(S,Me),e(U,ye),e(U,I),e(I,$e),e(I,L),e(L,se),e(I,fe),e(I,Q),e(Q,Ee),e(U,me),e(U,B),e(B,je),e(B,q),e(q,ze),_(g,ee,j),_(g,W,j),e(W,Ce),e(W,Z),e(Z,Je),e(W,Ue)},d(g){g&&t(d),g&&t(i),g&&t(p),g&&t(K),g&&t(w),g&&t(ne),g&&t(U),g&&t(ee),g&&t(W)}}}function g1(J){let d,y,h,m,T;return{c(){d=s("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),m=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(p,"CODE",{});var C=a(h);m=o(C,"Module"),C.forEach(t),T=o(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(i,p){_(i,d,p),e(d,y),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function _1(J){let d,y,h,m,T;return m=new He({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkZ1bm5lbEZvck11bHRpcGxlQ2hvaWNlJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmdW5uZWwtdHJhbnNmb3JtZXIlMkZzbWFsbC1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZGdW5uZWxGb3JNdWx0aXBsZUNob2ljZS5mcm9tX3ByZXRyYWluZWQoJTIyZnVubmVsLXRyYW5zZm9ybWVyJTJGc21hbGwtYmFzZSUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJJbiUyMEl0YWx5JTJDJTIwcGl6emElMjBzZXJ2ZWQlMjBpbiUyMGZvcm1hbCUyMHNldHRpbmdzJTJDJTIwc3VjaCUyMGFzJTIwYXQlMjBhJTIwcmVzdGF1cmFudCUyQyUyMGlzJTIwcHJlc2VudGVkJTIwdW5zbGljZWQuJTIyJTBBY2hvaWNlMCUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdpdGglMjBhJTIwZm9yayUyMGFuZCUyMGElMjBrbmlmZS4lMjIlMEFjaG9pY2UxJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2hpbGUlMjBoZWxkJTIwaW4lMjB0aGUlMjBoYW5kLiUyMiUwQSUwQWVuY29kaW5nJTIwJTNEJTIwdG9rZW5pemVyKCU1QnByb21wdCUyQyUyMHByb21wdCU1RCUyQyUyMCU1QmNob2ljZTAlMkMlMjBjaG9pY2UxJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiUyQyUyMHBhZGRpbmclM0RUcnVlKSUwQWlucHV0cyUyMCUzRCUyMCU3QmslM0ElMjB0Zi5leHBhbmRfZGltcyh2JTJDJTIwMCklMjBmb3IlMjBrJTJDJTIwdiUyMGluJTIwZW5jb2RpbmcuaXRlbXMoKSU3RCUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbChpbnB1dHMpJTIwJTIwJTIzJTIwYmF0Y2glMjBzaXplJTIwaXMlMjAxJTBBJTBBJTIzJTIwdGhlJTIwbGluZWFyJTIwY2xhc3NpZmllciUyMHN0aWxsJTIwbmVlZHMlMjB0byUyMGJlJTIwdHJhaW5lZCUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFunnelForMultipleChoice
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFFunnelForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice0 = <span class="hljs-string">&quot;It is eaten with a fork and a knife.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice1 = <span class="hljs-string">&quot;It is eaten while held in the hand.&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;tf&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = {k: tf.expand_dims(v, <span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()}
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)  <span class="hljs-comment"># batch size is 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),y=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function b1(J){let d,y,h,m,T,i,p,C,Te,ge,P,ce,K,w,we,G,ue,Ie,X,ae,le,V,ie,ve,A,ke,_e,R,Fe,de,ne,U,x,pe,D,be,he,S,Me,ye,I,$e,L,se,fe,Q,Ee,me,B,je,q,ze,ee,W,Ce,Z,Je,Ue;return{c(){d=s("p"),y=n("TensorFlow models and layers in "),h=s("code"),m=n("transformers"),T=n(" accept two formats as input:"),i=c(),p=s("ul"),C=s("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=c(),P=s("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),K=c(),w=s("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=s("code"),ue=n("model.fit()"),Ie=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),X=s("code"),ae=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=s("code"),ie=n("fit()"),ve=n(" and "),A=s("code"),ke=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),R=s("code"),Fe=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),U=s("ul"),x=s("li"),pe=n("a single Tensor with "),D=s("code"),be=n("input_ids"),he=n(" only and nothing else: "),S=s("code"),Me=n("model(input_ids)"),ye=c(),I=s("li"),$e=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),L=s("code"),se=n("model([input_ids, attention_mask])"),fe=n(" or "),Q=s("code"),Ee=n("model([input_ids, attention_mask, token_type_ids])"),me=c(),B=s("li"),je=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=s("code"),ze=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),W=s("p"),Ce=n(`Note that when creating models and layers with
`),Z=s("a"),Je=n("subclassing"),Ue=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var j=a(d);y=o(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var qe=a(h);m=o(qe,"transformers"),qe.forEach(t),T=o(j," accept two formats as input:"),j.forEach(t),i=u(g),p=r(g,"UL",{});var te=a(p);C=r(te,"LI",{});var Ne=a(C);Te=o(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),ge=u(te),P=r(te,"LI",{});var Be=a(P);ce=o(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),te.forEach(t),K=u(g),w=r(g,"P",{});var z=a(w);we=o(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=r(z,"CODE",{});var Pe=a(G);ue=o(Pe,"model.fit()"),Pe.forEach(t),Ie=o(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),X=r(z,"CODE",{});var Re=a(X);ae=o(Re,"model.fit()"),Re.forEach(t),le=o(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(z,"CODE",{});var xe=a(V);ie=o(xe,"fit()"),xe.forEach(t),ve=o(z," and "),A=r(z,"CODE",{});var Ge=a(A);ke=o(Ge,"predict()"),Ge.forEach(t),_e=o(z,`, such as when creating your own layers or models with
the Keras `),R=r(z,"CODE",{});var Ve=a(R);Fe=o(Ve,"Functional"),Ve.forEach(t),de=o(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=u(g),U=r(g,"UL",{});var N=a(U);x=r(N,"LI",{});var O=a(x);pe=o(O,"a single Tensor with "),D=r(O,"CODE",{});var Ae=a(D);be=o(Ae,"input_ids"),Ae.forEach(t),he=o(O," only and nothing else: "),S=r(O,"CODE",{});var We=a(S);Me=o(We,"model(input_ids)"),We.forEach(t),O.forEach(t),ye=u(N),I=r(N,"LI",{});var Y=a(I);$e=o(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),L=r(Y,"CODE",{});var Se=a(L);se=o(Se,"model([input_ids, attention_mask])"),Se.forEach(t),fe=o(Y," or "),Q=r(Y,"CODE",{});var Ze=a(Q);Ee=o(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),Y.forEach(t),me=u(N),B=r(N,"LI",{});var re=a(B);je=o(re,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=r(re,"CODE",{});var Xe=a(q);ze=o(Xe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Xe.forEach(t),re.forEach(t),N.forEach(t),ee=u(g),W=r(g,"P",{});var H=a(W);Ce=o(H,`Note that when creating models and layers with
`),Z=r(H,"A",{href:!0,rel:!0});var Le=a(Z);Je=o(Le,"subclassing"),Le.forEach(t),Ue=o(H,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),H.forEach(t),this.h()},h(){f(Z,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(Z,"rel","nofollow")},m(g,j){_(g,d,j),e(d,y),e(d,h),e(h,m),e(d,T),_(g,i,j),_(g,p,j),e(p,C),e(C,Te),e(p,ge),e(p,P),e(P,ce),_(g,K,j),_(g,w,j),e(w,we),e(w,G),e(G,ue),e(w,Ie),e(w,X),e(X,ae),e(w,le),e(w,V),e(V,ie),e(w,ve),e(w,A),e(A,ke),e(w,_e),e(w,R),e(R,Fe),e(w,de),_(g,ne,j),_(g,U,j),e(U,x),e(x,pe),e(x,D),e(D,be),e(x,he),e(x,S),e(S,Me),e(U,ye),e(U,I),e(I,$e),e(I,L),e(L,se),e(I,fe),e(I,Q),e(Q,Ee),e(U,me),e(U,B),e(B,je),e(B,q),e(q,ze),_(g,ee,j),_(g,W,j),e(W,Ce),e(W,Z),e(Z,Je),e(W,Ue)},d(g){g&&t(d),g&&t(i),g&&t(p),g&&t(K),g&&t(w),g&&t(ne),g&&t(U),g&&t(ee),g&&t(W)}}}function y1(J){let d,y,h,m,T;return{c(){d=s("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),m=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(p,"CODE",{});var C=a(h);m=o(C,"Module"),C.forEach(t),T=o(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(i,p){_(i,d,p),e(d,y),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function T1(J){let d,y,h,m,T;return m=new He({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkZ1bm5lbEZvclRva2VuQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmZ1bm5lbC10cmFuc2Zvcm1lciUyRnNtYWxsJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZGdW5uZWxGb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJmdW5uZWwtdHJhbnNmb3JtZXIlMkZzbWFsbCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTIySHVnZ2luZ0ZhY2UlMjBpcyUyMGElMjBjb21wYW55JTIwYmFzZWQlMjBpbiUyMFBhcmlzJTIwYW5kJTIwTmV3JTIwWW9yayUyMiUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzREZhbHNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiUwQSklMEElMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUyMCUzRCUyMHRmLm1hdGguYXJnbWF4KGxvZ2l0cyUyQyUyMGF4aXMlM0QtMSklMEElMEElMjMlMjBOb3RlJTIwdGhhdCUyMHRva2VucyUyMGFyZSUyMGNsYXNzaWZpZWQlMjByYXRoZXIlMjB0aGVuJTIwaW5wdXQlMjB3b3JkcyUyMHdoaWNoJTIwbWVhbnMlMjB0aGF0JTBBJTIzJTIwdGhlcmUlMjBtaWdodCUyMGJlJTIwbW9yZSUyMHByZWRpY3RlZCUyMHRva2VuJTIwY2xhc3NlcyUyMHRoYW4lMjB3b3Jkcy4lMEElMjMlMjBNdWx0aXBsZSUyMHRva2VuJTIwY2xhc3NlcyUyMG1pZ2h0JTIwYWNjb3VudCUyMGZvciUyMHRoZSUyMHNhbWUlMjB3b3JkJTBBcHJlZGljdGVkX3Rva2Vuc19jbGFzc2VzJTIwJTNEJTIwJTVCbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCdCU1RCUyMGZvciUyMHQlMjBpbiUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlNUIwJTVELm51bXB5KCkudG9saXN0KCklNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFunnelForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFFunnelForTokenClassification.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;HuggingFace is a company based in Paris and New York&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>].numpy().tolist()]`}}),{c(){d=s("p"),y=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function w1(J){let d,y;return d=new He({props:{code:"bGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3NzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(model(**inputs, labels=labels).loss)`}}),{c(){v(d.$$.fragment)},l(h){k(d.$$.fragment,h)},m(h,m){F(d,h,m),y=!0},p:Ye,i(h){y||(M(d.$$.fragment,h),y=!0)},o(h){$(d.$$.fragment,h),y=!1},d(h){E(d,h)}}}function v1(J){let d,y,h,m,T,i,p,C,Te,ge,P,ce,K,w,we,G,ue,Ie,X,ae,le,V,ie,ve,A,ke,_e,R,Fe,de,ne,U,x,pe,D,be,he,S,Me,ye,I,$e,L,se,fe,Q,Ee,me,B,je,q,ze,ee,W,Ce,Z,Je,Ue;return{c(){d=s("p"),y=n("TensorFlow models and layers in "),h=s("code"),m=n("transformers"),T=n(" accept two formats as input:"),i=c(),p=s("ul"),C=s("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),ge=c(),P=s("li"),ce=n("having all inputs as a list, tuple or dict in the first positional argument."),K=c(),w=s("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=s("code"),ue=n("model.fit()"),Ie=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),X=s("code"),ae=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=s("code"),ie=n("fit()"),ve=n(" and "),A=s("code"),ke=n("predict()"),_e=n(`, such as when creating your own layers or models with
the Keras `),R=s("code"),Fe=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=c(),U=s("ul"),x=s("li"),pe=n("a single Tensor with "),D=s("code"),be=n("input_ids"),he=n(" only and nothing else: "),S=s("code"),Me=n("model(input_ids)"),ye=c(),I=s("li"),$e=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),L=s("code"),se=n("model([input_ids, attention_mask])"),fe=n(" or "),Q=s("code"),Ee=n("model([input_ids, attention_mask, token_type_ids])"),me=c(),B=s("li"),je=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=s("code"),ze=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ee=c(),W=s("p"),Ce=n(`Note that when creating models and layers with
`),Z=s("a"),Je=n("subclassing"),Ue=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var j=a(d);y=o(j,"TensorFlow models and layers in "),h=r(j,"CODE",{});var qe=a(h);m=o(qe,"transformers"),qe.forEach(t),T=o(j," accept two formats as input:"),j.forEach(t),i=u(g),p=r(g,"UL",{});var te=a(p);C=r(te,"LI",{});var Ne=a(C);Te=o(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),ge=u(te),P=r(te,"LI",{});var Be=a(P);ce=o(Be,"having all inputs as a list, tuple or dict in the first positional argument."),Be.forEach(t),te.forEach(t),K=u(g),w=r(g,"P",{});var z=a(w);we=o(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=r(z,"CODE",{});var Pe=a(G);ue=o(Pe,"model.fit()"),Pe.forEach(t),Ie=o(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),X=r(z,"CODE",{});var Re=a(X);ae=o(Re,"model.fit()"),Re.forEach(t),le=o(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(z,"CODE",{});var xe=a(V);ie=o(xe,"fit()"),xe.forEach(t),ve=o(z," and "),A=r(z,"CODE",{});var Ge=a(A);ke=o(Ge,"predict()"),Ge.forEach(t),_e=o(z,`, such as when creating your own layers or models with
the Keras `),R=r(z,"CODE",{});var Ve=a(R);Fe=o(Ve,"Functional"),Ve.forEach(t),de=o(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=u(g),U=r(g,"UL",{});var N=a(U);x=r(N,"LI",{});var O=a(x);pe=o(O,"a single Tensor with "),D=r(O,"CODE",{});var Ae=a(D);be=o(Ae,"input_ids"),Ae.forEach(t),he=o(O," only and nothing else: "),S=r(O,"CODE",{});var We=a(S);Me=o(We,"model(input_ids)"),We.forEach(t),O.forEach(t),ye=u(N),I=r(N,"LI",{});var Y=a(I);$e=o(Y,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),L=r(Y,"CODE",{});var Se=a(L);se=o(Se,"model([input_ids, attention_mask])"),Se.forEach(t),fe=o(Y," or "),Q=r(Y,"CODE",{});var Ze=a(Q);Ee=o(Ze,"model([input_ids, attention_mask, token_type_ids])"),Ze.forEach(t),Y.forEach(t),me=u(N),B=r(N,"LI",{});var re=a(B);je=o(re,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),q=r(re,"CODE",{});var Xe=a(q);ze=o(Xe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Xe.forEach(t),re.forEach(t),N.forEach(t),ee=u(g),W=r(g,"P",{});var H=a(W);Ce=o(H,`Note that when creating models and layers with
`),Z=r(H,"A",{href:!0,rel:!0});var Le=a(Z);Je=o(Le,"subclassing"),Le.forEach(t),Ue=o(H,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),H.forEach(t),this.h()},h(){f(Z,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(Z,"rel","nofollow")},m(g,j){_(g,d,j),e(d,y),e(d,h),e(h,m),e(d,T),_(g,i,j),_(g,p,j),e(p,C),e(C,Te),e(p,ge),e(p,P),e(P,ce),_(g,K,j),_(g,w,j),e(w,we),e(w,G),e(G,ue),e(w,Ie),e(w,X),e(X,ae),e(w,le),e(w,V),e(V,ie),e(w,ve),e(w,A),e(A,ke),e(w,_e),e(w,R),e(R,Fe),e(w,de),_(g,ne,j),_(g,U,j),e(U,x),e(x,pe),e(x,D),e(D,be),e(x,he),e(x,S),e(S,Me),e(U,ye),e(U,I),e(I,$e),e(I,L),e(L,se),e(I,fe),e(I,Q),e(Q,Ee),e(U,me),e(U,B),e(B,je),e(B,q),e(q,ze),_(g,ee,j),_(g,W,j),e(W,Ce),e(W,Z),e(Z,Je),e(W,Ue)},d(g){g&&t(d),g&&t(i),g&&t(p),g&&t(K),g&&t(w),g&&t(ne),g&&t(U),g&&t(ee),g&&t(W)}}}function k1(J){let d,y,h,m,T;return{c(){d=s("p"),y=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),m=n("Module"),T=n(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(p,"CODE",{});var C=a(h);m=o(C,"Module"),C.forEach(t),T=o(p,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),p.forEach(t)},m(i,p){_(i,d,p),e(d,y),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function F1(J){let d,y,h,m,T;return m=new He({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkZ1bm5lbEZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJmdW5uZWwtdHJhbnNmb3JtZXIlMkZzbWFsbCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGRnVubmVsRm9yUXVlc3Rpb25BbnN3ZXJpbmcuZnJvbV9wcmV0cmFpbmVkKCUyMmZ1bm5lbC10cmFuc2Zvcm1lciUyRnNtYWxsJTIyKSUwQSUwQXF1ZXN0aW9uJTJDJTIwdGV4dCUyMCUzRCUyMCUyMldobyUyMHdhcyUyMEppbSUyMEhlbnNvbiUzRiUyMiUyQyUyMCUyMkppbSUyMEhlbnNvbiUyMHdhcyUyMGElMjBuaWNlJTIwcHVwcGV0JTIyJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHF1ZXN0aW9uJTJDJTIwdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWFuc3dlcl9zdGFydF9pbmRleCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChvdXRwdXRzLnN0YXJ0X2xvZ2l0cyUyQyUyMGF4aXMlM0QtMSklNUIwJTVEKSUwQWFuc3dlcl9lbmRfaW5kZXglMjAlM0QlMjBpbnQodGYubWF0aC5hcmdtYXgob3V0cHV0cy5lbmRfbG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQpJTBBJTBBcHJlZGljdF9hbnN3ZXJfdG9rZW5zJTIwJTNEJTIwaW5wdXRzLmlucHV0X2lkcyU1QjAlMkMlMjBhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0ElMjBhbnN3ZXJfZW5kX2luZGV4JTIwJTJCJTIwMSU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFunnelForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFFunnelForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;funnel-transformer/small&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = <span class="hljs-built_in">int</span>(tf.math.argmax(outputs.start_logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = <span class="hljs-built_in">int</span>(tf.math.argmax(outputs.end_logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]`}}),{c(){d=s("p"),y=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);y=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,y),_(i,h,p),F(m,i,p),T=!0},p:Ye,i(i){T||(M(m.$$.fragment,i),T=!0)},o(i){$(m.$$.fragment,i),T=!1},d(i){i&&t(d),i&&t(h),E(m,i)}}}function M1(J){let d,y;return d=new He({props:{code:"JTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdGYuY29uc3RhbnQoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRmLmNvbnN0YW50KCU1QjE1JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG91dHB1dHMubG9zcyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = tf.constant([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = tf.constant([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(outputs.loss)`}}),{c(){v(d.$$.fragment)},l(h){k(d.$$.fragment,h)},m(h,m){F(d,h,m),y=!0},p:Ye,i(h){y||(M(d.$$.fragment,h),y=!0)},o(h){$(d.$$.fragment,h),y=!1},d(h){E(d,h)}}}function $1(J){let d,y,h,m,T,i,p,C,Te,ge,P,ce,K,w,we,G,ue,Ie,X,ae,le,V,ie,ve,A,ke,_e,R,Fe,de,ne,U,x,pe,D,be,he,S,Me,ye,I,$e,L,se,fe,Q,Ee,me,B,je,q,ze,ee,W,Ce,Z,Je,Ue,g,j,qe,te,Ne,Be,z,Pe,Re,xe,Ge,Ve,N,O,Ae,We,Y,Se,Ze,re,Xe,H,Le,Uh,Is,Ih,xh,_u,cn,oo,Xi,xs,Wh,Li,Zh,bu,_t,Di,El,qh,Nh,Qi,jl,Bh,Ph,Oi,zl,Rh,Gh,Yi,Cl,Vh,Ah,Hi,Jl,Sh,yu,un,so,Ki,Ws,Xh,ed,Lh,Tu,Kt,Zs,Dh,en,Qh,Ul,Oh,Yh,Il,Hh,Kh,qs,ef,tf,nf,pn,of,xl,sf,rf,Wl,af,lf,wu,hn,ro,td,Ns,df,nd,cf,vu,et,Bs,uf,od,pf,hf,Ps,ff,Zl,mf,gf,_f,tn,Rs,bf,sd,yf,Tf,Gs,ql,wf,rd,vf,kf,Nl,Ff,ad,Mf,$f,ao,Vs,Ef,As,jf,ld,zf,Cf,Jf,It,Ss,Uf,id,If,xf,lo,Wf,fn,Zf,dd,qf,Nf,cd,Bf,Pf,Rf,Bl,Xs,ku,mn,io,ud,Ls,Gf,pd,Vf,Fu,gt,Ds,Af,Qs,Sf,hd,Xf,Lf,Df,Os,Qf,Pl,Of,Yf,Hf,nn,Ys,Kf,fd,em,tm,Hs,Rl,nm,md,om,sm,Gl,rm,gd,am,lm,xt,Ks,im,_d,dm,cm,co,um,gn,pm,bd,hm,fm,yd,mm,gm,Mu,_n,uo,Td,er,_m,wd,bm,$u,bn,tr,ym,nr,Tm,Vl,wm,vm,Eu,yn,or,km,sr,Fm,Al,Mm,$m,ju,Tn,po,vd,rr,Em,kd,jm,zu,dt,ar,zm,Fd,Cm,Jm,lr,Um,ir,Im,xm,Wm,dr,Zm,Sl,qm,Nm,Bm,cr,Pm,ur,Rm,Gm,Vm,Wt,pr,Am,wn,Sm,Xl,Xm,Lm,Md,Dm,Qm,Om,ho,Ym,fo,Cu,vn,mo,$d,hr,Hm,Ed,Km,Ju,ct,fr,eg,jd,tg,ng,mr,og,gr,sg,rg,ag,_r,lg,Ll,ig,dg,cg,br,ug,yr,pg,hg,fg,Zt,Tr,mg,kn,gg,Dl,_g,bg,zd,yg,Tg,wg,go,vg,_o,Uu,Fn,bo,Cd,wr,kg,Jd,Fg,Iu,Mn,vr,Mg,qt,kr,$g,$n,Eg,Ql,jg,zg,Ud,Cg,Jg,Ug,yo,Ig,To,xu,En,wo,Id,Fr,xg,xd,Wg,Wu,ut,Mr,Zg,$r,qg,Wd,Ng,Bg,Pg,Er,Rg,jr,Gg,Vg,Ag,zr,Sg,Ol,Xg,Lg,Dg,Cr,Qg,Jr,Og,Yg,Hg,Nt,Ur,Kg,jn,e_,Yl,t_,n_,Zd,o_,s_,r_,vo,a_,ko,Zu,zn,Fo,qd,Ir,l_,Nd,i_,qu,pt,xr,d_,Bd,c_,u_,Wr,p_,Zr,h_,f_,m_,qr,g_,Hl,__,b_,y_,Nr,T_,Br,w_,v_,k_,bt,Pr,F_,Cn,M_,Kl,$_,E_,Pd,j_,z_,C_,Mo,J_,$o,U_,Eo,Nu,Jn,jo,Rd,Rr,I_,Gd,x_,Bu,ht,Gr,W_,Vd,Z_,q_,Vr,N_,Ar,B_,P_,R_,Sr,G_,ei,V_,A_,S_,Xr,X_,Lr,L_,D_,Q_,Bt,Dr,O_,Un,Y_,ti,H_,K_,Ad,eb,tb,nb,zo,ob,Co,Pu,In,Jo,Sd,Qr,sb,Xd,rb,Ru,ft,Or,ab,Ld,lb,ib,Yr,db,Hr,cb,ub,pb,Kr,hb,ni,fb,mb,gb,ea,_b,ta,bb,yb,Tb,Pt,na,wb,xn,vb,oi,kb,Fb,Dd,Mb,$b,Eb,Uo,jb,Io,Gu,Wn,xo,Qd,oa,zb,Od,Cb,Vu,mt,sa,Jb,Zn,Ub,Yd,Ib,xb,Hd,Wb,Zb,qb,ra,Nb,aa,Bb,Pb,Rb,la,Gb,si,Vb,Ab,Sb,ia,Xb,da,Lb,Db,Qb,Rt,ca,Ob,qn,Yb,ri,Hb,Kb,Kd,ey,ty,ny,Wo,oy,Zo,Au,Nn,qo,ec,ua,sy,tc,ry,Su,tt,pa,ay,nc,ly,iy,ha,dy,fa,cy,uy,py,ma,hy,ai,fy,my,gy,ga,_y,_a,by,yy,Ty,No,wy,Gt,ba,vy,Bn,ky,li,Fy,My,oc,$y,Ey,jy,Bo,zy,Po,Xu,Pn,Ro,sc,ya,Cy,rc,Jy,Lu,nt,Ta,Uy,ac,Iy,xy,wa,Wy,va,Zy,qy,Ny,ka,By,ii,Py,Ry,Gy,Fa,Vy,Ma,Ay,Sy,Xy,Go,Ly,Vt,$a,Dy,Rn,Qy,di,Oy,Yy,lc,Hy,Ky,eT,Vo,tT,Ao,Du,Gn,So,ic,Ea,nT,dc,oT,Qu,ot,ja,sT,cc,rT,aT,za,lT,Ca,iT,dT,cT,Ja,uT,ci,pT,hT,fT,Ua,mT,Ia,gT,_T,bT,Xo,yT,At,xa,TT,Vn,wT,ui,vT,kT,uc,FT,MT,$T,Lo,ET,Do,Ou,An,Qo,pc,Wa,jT,hc,zT,Yu,st,Za,CT,qa,JT,fc,UT,IT,xT,Na,WT,Ba,ZT,qT,NT,Pa,BT,pi,PT,RT,GT,Ra,VT,Ga,AT,ST,XT,Oo,LT,yt,Va,DT,Sn,QT,hi,OT,YT,mc,HT,KT,ew,Yo,tw,Ho,nw,Ko,Hu,Xn,es,gc,Aa,ow,_c,sw,Ku,rt,Sa,rw,bc,aw,lw,Xa,iw,La,dw,cw,uw,Da,pw,fi,hw,fw,mw,Qa,gw,Oa,_w,bw,yw,ts,Tw,Tt,Ya,ww,Ln,vw,mi,kw,Fw,yc,Mw,$w,Ew,ns,jw,os,zw,ss,ep,Dn,rs,Tc,Ha,Cw,wc,Jw,tp,at,Ka,Uw,vc,Iw,xw,el,Ww,tl,Zw,qw,Nw,nl,Bw,gi,Pw,Rw,Gw,ol,Vw,sl,Aw,Sw,Xw,as,Lw,St,rl,Dw,Qn,Qw,_i,Ow,Yw,kc,Hw,Kw,ev,ls,tv,is,np,On,ds,Fc,al,nv,Mc,ov,op,lt,ll,sv,$c,rv,av,il,lv,dl,iv,dv,cv,cl,uv,bi,pv,hv,fv,ul,mv,pl,gv,_v,bv,cs,yv,wt,hl,Tv,Yn,wv,yi,vv,kv,Ec,Fv,Mv,$v,us,Ev,ps,jv,hs,sp,Hn,fs,jc,fl,zv,zc,Cv,rp,it,ml,Jv,Kn,Uv,Cc,Iv,xv,Jc,Wv,Zv,qv,gl,Nv,_l,Bv,Pv,Rv,bl,Gv,Ti,Vv,Av,Sv,yl,Xv,Tl,Lv,Dv,Qv,ms,Ov,vt,wl,Yv,eo,Hv,wi,Kv,ek,Uc,tk,nk,ok,gs,sk,_s,rk,bs,ap;return i=new Qe({}),ie=new Qe({}),xs=new Qe({}),Ws=new Qe({}),Zs=new oe({props:{name:"class transformers.FunnelConfig",anchor:"transformers.FunnelConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"block_sizes",val:" = [4, 4, 4]"},{name:"block_repeats",val:" = None"},{name:"num_decoder_layers",val:" = 2"},{name:"d_model",val:" = 768"},{name:"n_head",val:" = 12"},{name:"d_head",val:" = 64"},{name:"d_inner",val:" = 3072"},{name:"hidden_act",val:" = 'gelu_new'"},{name:"hidden_dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.1"},{name:"activation_dropout",val:" = 0.0"},{name:"initializer_range",val:" = 0.1"},{name:"initializer_std",val:" = None"},{name:"layer_norm_eps",val:" = 1e-09"},{name:"pooling_type",val:" = 'mean'"},{name:"attention_type",val:" = 'relative_shift'"},{name:"separate_cls",val:" = True"},{name:"truncate_seq",val:" = True"},{name:"pool_q_only",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FunnelConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the Funnel transformer. Defines the number of different tokens that can be represented
by the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelModel">FunnelModel</a> or <a href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.TFFunnelModel">TFFunnelModel</a>.`,name:"vocab_size"},{anchor:"transformers.FunnelConfig.block_sizes",description:`<strong>block_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[4, 4, 4]</code>) &#x2014;
The sizes of the blocks used in the model.`,name:"block_sizes"},{anchor:"transformers.FunnelConfig.block_repeats",description:`<strong>block_repeats</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
If passed along, each layer of each block is repeated the number of times indicated.`,name:"block_repeats"},{anchor:"transformers.FunnelConfig.num_decoder_layers",description:`<strong>num_decoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The number of layers in the decoder (when not using the base model).`,name:"num_decoder_layers"},{anchor:"transformers.FunnelConfig.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the model&#x2019;s hidden states.`,name:"d_model"},{anchor:"transformers.FunnelConfig.n_head",description:`<strong>n_head</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"n_head"},{anchor:"transformers.FunnelConfig.d_head",description:`<strong>d_head</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Dimensionality of the model&#x2019;s heads.`,name:"d_head"},{anchor:"transformers.FunnelConfig.d_inner",description:`<strong>d_inner</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Inner dimension in the feed-forward blocks.`,name:"d_inner"},{anchor:"transformers.FunnelConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>callable</code>, <em>optional</em>, defaults to <code>&quot;gelu_new&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.FunnelConfig.hidden_dropout",description:`<strong>hidden_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout"},{anchor:"transformers.FunnelConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.FunnelConfig.activation_dropout",description:`<strong>activation_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability used between the two layers of the feed-forward blocks.`,name:"activation_dropout"},{anchor:"transformers.FunnelConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The upper bound of the <em>uniform initializer</em> for initializing all weight matrices in attention layers.`,name:"initializer_range"},{anchor:"transformers.FunnelConfig.initializer_std",description:`<strong>initializer_std</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The standard deviation of the <em>normal initializer</em> for initializing the embedding matrix and the weight of
linear layers. Will default to 1 for the embedding matrix and the value given by Xavier initialization for
linear layers.`,name:"initializer_std"},{anchor:"transformers.FunnelConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-9) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.FunnelConfig.pooling_type",description:`<strong>pooling_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;mean&quot;</code>) &#x2014;
Possible values are <code>&quot;mean&quot;</code> or <code>&quot;max&quot;</code>. The way pooling is performed at the beginning of each block.`,name:"pooling_type"},{anchor:"transformers.FunnelConfig.attention_type",description:`<strong>attention_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;relative_shift&quot;</code>) &#x2014;
Possible values are <code>&quot;relative_shift&quot;</code> or <code>&quot;factorized&quot;</code>. The former is faster on CPU/GPU while the latter
is faster on TPU.`,name:"attention_type"},{anchor:"transformers.FunnelConfig.separate_cls",description:`<strong>separate_cls</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to separate the cls token when applying pooling.`,name:"separate_cls"},{anchor:"transformers.FunnelConfig.truncate_seq",description:`<strong>truncate_seq</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
When using <code>separate_cls</code>, whether or not to truncate the last token when pooling, to avoid getting a
sequence length that is not a multiple of 2.`,name:"truncate_seq"},{anchor:"transformers.FunnelConfig.pool_q_only",description:`<strong>pool_q_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to apply the pooling only to the query or to query, key and values for the attention layers.`,name:"pool_q_only"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/configuration_funnel.py#L41"}}),Ns=new Qe({}),Bs=new oe({props:{name:"class transformers.FunnelTokenizer",anchor:"transformers.FunnelTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = True"},{name:"do_basic_tokenize",val:" = True"},{name:"never_split",val:" = None"},{name:"unk_token",val:" = '<unk>'"},{name:"sep_token",val:" = '<sep>'"},{name:"pad_token",val:" = '<pad>'"},{name:"cls_token",val:" = '<cls>'"},{name:"mask_token",val:" = '<mask>'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FunnelTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.FunnelTokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.FunnelTokenizer.do_basic_tokenize",description:`<strong>do_basic_tokenize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to do basic tokenization before WordPiece.`,name:"do_basic_tokenize"},{anchor:"transformers.FunnelTokenizer.never_split",description:`<strong>never_split</strong> (<code>Iterable</code>, <em>optional</em>) &#x2014;
Collection of tokens which will never be split during tokenization. Only has an effect when
<code>do_basic_tokenize=True</code>`,name:"never_split"},{anchor:"transformers.FunnelTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.FunnelTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;sep&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.FunnelTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.FunnelTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;cls&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.FunnelTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.FunnelTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <code>optional</code>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sentence token.`,name:"bos_token"},{anchor:"transformers.FunnelTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <code>optional</code>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sentence token.`,name:"eos_token"},{anchor:"transformers.FunnelTokenizer.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters.</p>
<p>This should likely be deactivated for Japanese (see this
<a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">issue</a>).`,name:"tokenize_chinese_chars"},{anchor:"transformers.FunnelTokenizer.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original BERT).`,name:"strip_accents"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/tokenization_funnel.py#L91"}}),Rs=new oe({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.FunnelTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.FunnelTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.FunnelTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/tokenization_funnel.py#L238",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Vs=new oe({props:{name:"get_special_tokens_mask",anchor:"transformers.FunnelTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.FunnelTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.FunnelTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.FunnelTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/tokenization_funnel.py#L264",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Ss=new oe({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.FunnelTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.FunnelTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.FunnelTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/tokenization_funnel.py#L292",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),lo=new Oe({props:{anchor:"transformers.FunnelTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[IM]},$$scope:{ctx:J}}}),Xs=new oe({props:{name:"save_vocabulary",anchor:"transformers.FunnelTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/tokenization_funnel.py#L322"}}),Ls=new Qe({}),Ds=new oe({props:{name:"class transformers.FunnelTokenizerFast",anchor:"transformers.FunnelTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{name:"unk_token",val:" = '<unk>'"},{name:"sep_token",val:" = '<sep>'"},{name:"pad_token",val:" = '<pad>'"},{name:"cls_token",val:" = '<cls>'"},{name:"mask_token",val:" = '<mask>'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"clean_text",val:" = True"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"wordpieces_prefix",val:" = '##'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FunnelTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.FunnelTokenizerFast.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.FunnelTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.FunnelTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;sep&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.FunnelTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.FunnelTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;cls&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.FunnelTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.FunnelTokenizerFast.clean_text",description:`<strong>clean_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to clean the text before tokenization by removing any control characters and replacing all
whitespaces by the classic one.`,name:"clean_text"},{anchor:"transformers.FunnelTokenizerFast.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters. This should likely be deactivated for Japanese (see <a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">this
issue</a>).`,name:"tokenize_chinese_chars"},{anchor:"transformers.FunnelTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <code>optional</code>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sentence token.`,name:"bos_token"},{anchor:"transformers.FunnelTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <code>optional</code>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sentence token.`,name:"eos_token"},{anchor:"transformers.FunnelTokenizerFast.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original BERT).`,name:"strip_accents"},{anchor:"transformers.FunnelTokenizerFast.wordpieces_prefix",description:`<strong>wordpieces_prefix</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;##&quot;</code>) &#x2014;
The prefix for subwords.`,name:"wordpieces_prefix"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/tokenization_funnel_fast.py#L94"}}),Ys=new oe({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.FunnelTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.FunnelTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.FunnelTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/tokenization_funnel_fast.py#L196",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Ks=new oe({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.FunnelTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.FunnelTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.FunnelTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/tokenization_funnel_fast.py#L220",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),co=new Oe({props:{anchor:"transformers.FunnelTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[xM]},$$scope:{ctx:J}}}),er=new Qe({}),tr=new oe({props:{name:"class transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput",anchor:"transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"logits",val:": FloatTensor = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],parametersDescription:[{anchor:"transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput.loss",description:`<strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) &#x2014;
Total loss of the ELECTRA-style objective.`,name:"loss"},{anchor:"transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput.logits",description:`<strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Prediction scores of the head (scores for each token before SoftMax).`,name:"logits"},{anchor:"transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput.hidden_states",description:`<strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.`,name:"hidden_states"},{anchor:"transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput.attentions",description:`<strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_funnel.py#L833"}}),or=new oe({props:{name:"class transformers.models.funnel.modeling_tf_funnel.TFFunnelForPreTrainingOutput",anchor:"transformers.models.funnel.modeling_tf_funnel.TFFunnelForPreTrainingOutput",parameters:[{name:"logits",val:": tf.Tensor = None"},{name:"hidden_states",val:": Tuple[tf.Tensor] | None = None"},{name:"attentions",val:": Tuple[tf.Tensor] | None = None"}],parametersDescription:[{anchor:"transformers.models.funnel.modeling_tf_funnel.TFFunnelForPreTrainingOutput.logits",description:`<strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Prediction scores of the head (scores for each token before SoftMax).`,name:"logits"},{anchor:"transformers.models.funnel.modeling_tf_funnel.TFFunnelForPreTrainingOutput.hidden_states",description:`<strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.`,name:"hidden_states"},{anchor:"transformers.models.funnel.modeling_tf_funnel.TFFunnelForPreTrainingOutput.attentions",description:`<strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_tf_funnel.py#L985"}}),rr=new Qe({}),ar=new oe({props:{name:"class transformers.FunnelBaseModel",anchor:"transformers.FunnelBaseModel",parameters:[{name:"config",val:": FunnelConfig"}],parametersDescription:[{anchor:"transformers.FunnelBaseModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig">FunnelConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_funnel.py#L926"}}),pr=new oe({props:{name:"forward",anchor:"transformers.FunnelBaseModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FunnelBaseModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FunnelBaseModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FunnelBaseModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FunnelBaseModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FunnelBaseModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FunnelBaseModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FunnelBaseModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/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.30.0/src/transformers/models/funnel/modeling_funnel.py#L942",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</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 (<a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ho=new De({props:{$$slots:{default:[WM]},$$scope:{ctx:J}}}),fo=new Oe({props:{anchor:"transformers.FunnelBaseModel.forward.example",$$slots:{default:[ZM]},$$scope:{ctx:J}}}),hr=new Qe({}),fr=new oe({props:{name:"class transformers.FunnelModel",anchor:"transformers.FunnelModel",parameters:[{name:"config",val:": FunnelConfig"}],parametersDescription:[{anchor:"transformers.FunnelModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig">FunnelConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_funnel.py#L1002"}}),Tr=new oe({props:{name:"forward",anchor:"transformers.FunnelModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FunnelModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FunnelModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FunnelModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FunnelModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FunnelModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FunnelModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FunnelModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/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.30.0/src/transformers/models/funnel/modeling_funnel.py#L1019",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</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 (<a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),go=new De({props:{$$slots:{default:[qM]},$$scope:{ctx:J}}}),_o=new Oe({props:{anchor:"transformers.FunnelModel.forward.example",$$slots:{default:[NM]},$$scope:{ctx:J}}}),wr=new Qe({}),vr=new oe({props:{name:"class transformers.FunnelForPreTraining",anchor:"transformers.FunnelForPreTraining",parameters:[{name:"config",val:": FunnelConfig"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_funnel.py#L1109"}}),kr=new oe({props:{name:"forward",anchor:"transformers.FunnelForPreTraining.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FunnelForPreTraining.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FunnelForPreTraining.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FunnelForPreTraining.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FunnelForPreTraining.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FunnelForPreTraining.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FunnelForPreTraining.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FunnelForPreTraining.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FunnelForPreTraining.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the ELECTRA-style loss. Input should be a sequence of tokens (see <code>input_ids</code>
docstring) Indices should be in <code>[0, 1]</code>:</p>
<ul>
<li>0 indicates the token is an original token,</li>
<li>1 indicates the token was replaced.</li>
</ul>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_funnel.py#L1118",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput"
>transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput</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 (<a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) \u2014 Total loss of the ELECTRA-style objective.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Prediction scores of the head (scores for each token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput"
>transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),yo=new De({props:{$$slots:{default:[BM]},$$scope:{ctx:J}}}),To=new Oe({props:{anchor:"transformers.FunnelForPreTraining.forward.example",$$slots:{default:[PM]},$$scope:{ctx:J}}}),Fr=new Qe({}),Mr=new oe({props:{name:"class transformers.FunnelForMaskedLM",anchor:"transformers.FunnelForMaskedLM",parameters:[{name:"config",val:": FunnelConfig"}],parametersDescription:[{anchor:"transformers.FunnelForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig">FunnelConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_funnel.py#L1192"}}),Ur=new oe({props:{name:"forward",anchor:"transformers.FunnelForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FunnelForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FunnelForMaskedLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FunnelForMaskedLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FunnelForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FunnelForMaskedLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FunnelForMaskedLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FunnelForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FunnelForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_funnel.py#L1210",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</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 (<a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),vo=new De({props:{$$slots:{default:[RM]},$$scope:{ctx:J}}}),ko=new Oe({props:{anchor:"transformers.FunnelForMaskedLM.forward.example",$$slots:{default:[GM]},$$scope:{ctx:J}}}),Ir=new Qe({}),xr=new oe({props:{name:"class transformers.FunnelForSequenceClassification",anchor:"transformers.FunnelForSequenceClassification",parameters:[{name:"config",val:": FunnelConfig"}],parametersDescription:[{anchor:"transformers.FunnelForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig">FunnelConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_funnel.py#L1273"}}),Pr=new oe({props:{name:"forward",anchor:"transformers.FunnelForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FunnelForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FunnelForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FunnelForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FunnelForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FunnelForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FunnelForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FunnelForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FunnelForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_funnel.py#L1284",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</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 (<a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Mo=new De({props:{$$slots:{default:[VM]},$$scope:{ctx:J}}}),$o=new Oe({props:{anchor:"transformers.FunnelForSequenceClassification.forward.example",$$slots:{default:[AM]},$$scope:{ctx:J}}}),Eo=new Oe({props:{anchor:"transformers.FunnelForSequenceClassification.forward.example-2",$$slots:{default:[SM]},$$scope:{ctx:J}}}),Rr=new Qe({}),Gr=new oe({props:{name:"class transformers.FunnelForMultipleChoice",anchor:"transformers.FunnelForMultipleChoice",parameters:[{name:"config",val:": FunnelConfig"}],parametersDescription:[{anchor:"transformers.FunnelForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig">FunnelConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_funnel.py#L1365"}}),Dr=new oe({props:{name:"forward",anchor:"transformers.FunnelForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FunnelForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FunnelForMultipleChoice.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FunnelForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FunnelForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FunnelForMultipleChoice.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FunnelForMultipleChoice.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FunnelForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FunnelForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_funnel.py#L1374",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</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 (<a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),zo=new De({props:{$$slots:{default:[XM]},$$scope:{ctx:J}}}),Co=new Oe({props:{anchor:"transformers.FunnelForMultipleChoice.forward.example",$$slots:{default:[LM]},$$scope:{ctx:J}}}),Qr=new Qe({}),Or=new oe({props:{name:"class transformers.FunnelForTokenClassification",anchor:"transformers.FunnelForTokenClassification",parameters:[{name:"config",val:": FunnelConfig"}],parametersDescription:[{anchor:"transformers.FunnelForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig">FunnelConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_funnel.py#L1448"}}),na=new oe({props:{name:"forward",anchor:"transformers.FunnelForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FunnelForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FunnelForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FunnelForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FunnelForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FunnelForTokenClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FunnelForTokenClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FunnelForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FunnelForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_funnel.py#L1460",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</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 (<a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Uo=new De({props:{$$slots:{default:[DM]},$$scope:{ctx:J}}}),Io=new Oe({props:{anchor:"transformers.FunnelForTokenClassification.forward.example",$$slots:{default:[QM]},$$scope:{ctx:J}}}),oa=new Qe({}),sa=new oe({props:{name:"class transformers.FunnelForQuestionAnswering",anchor:"transformers.FunnelForQuestionAnswering",parameters:[{name:"config",val:": FunnelConfig"}],parametersDescription:[{anchor:"transformers.FunnelForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig">FunnelConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_funnel.py#L1521"}}),ca=new oe({props:{name:"forward",anchor:"transformers.FunnelForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"start_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"end_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FunnelForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FunnelForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FunnelForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FunnelForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FunnelForQuestionAnswering.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FunnelForQuestionAnswering.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FunnelForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FunnelForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.FunnelForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_funnel.py#L1532",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</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 (<a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Wo=new De({props:{$$slots:{default:[OM]},$$scope:{ctx:J}}}),Zo=new Oe({props:{anchor:"transformers.FunnelForQuestionAnswering.forward.example",$$slots:{default:[YM]},$$scope:{ctx:J}}}),ua=new Qe({}),pa=new oe({props:{name:"class transformers.TFFunnelBaseModel",anchor:"transformers.TFFunnelBaseModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFunnelBaseModel.config",description:`<strong>config</strong> (<code>XxxConfig</code>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1107"}}),No=new De({props:{$$slots:{default:[HM]},$$scope:{ctx:J}}}),ba=new oe({props:{name:"call",anchor:"transformers.TFFunnelBaseModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFFunnelBaseModel.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFunnelBaseModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFunnelBaseModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFunnelBaseModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFunnelBaseModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFunnelBaseModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFunnelBaseModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFunnelBaseModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1112",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Bo=new De({props:{$$slots:{default:[KM]},$$scope:{ctx:J}}}),Po=new Oe({props:{anchor:"transformers.TFFunnelBaseModel.call.example",$$slots:{default:[e1]},$$scope:{ctx:J}}}),ya=new Qe({}),Ta=new oe({props:{name:"class transformers.TFFunnelModel",anchor:"transformers.TFFunnelModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFunnelModel.config",description:`<strong>config</strong> (<code>XxxConfig</code>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1155"}}),Go=new De({props:{$$slots:{default:[t1]},$$scope:{ctx:J}}}),$a=new oe({props:{name:"call",anchor:"transformers.TFFunnelModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFFunnelModel.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFunnelModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFunnelModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFunnelModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFunnelModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFunnelModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFunnelModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFunnelModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1160",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Vo=new De({props:{$$slots:{default:[n1]},$$scope:{ctx:J}}}),Ao=new Oe({props:{anchor:"transformers.TFFunnelModel.call.example",$$slots:{default:[o1]},$$scope:{ctx:J}}}),Ea=new Qe({}),ja=new oe({props:{name:"class transformers.TFFunnelForPreTraining",anchor:"transformers.TFFunnelForPreTraining",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFunnelForPreTraining.config",description:`<strong>config</strong> (<code>XxxConfig</code>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1205"}}),Xo=new De({props:{$$slots:{default:[s1]},$$scope:{ctx:J}}}),xa=new oe({props:{name:"call",anchor:"transformers.TFFunnelForPreTraining.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFunnelForPreTraining.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFunnelForPreTraining.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFunnelForPreTraining.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFunnelForPreTraining.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFunnelForPreTraining.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFunnelForPreTraining.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFunnelForPreTraining.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFunnelForPreTraining.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1212",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.models.funnel.modeling_tf_funnel.TFFunnelForPreTrainingOutput"
>transformers.models.funnel.modeling_tf_funnel.TFFunnelForPreTrainingOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Prediction scores of the head (scores for each token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.models.funnel.modeling_tf_funnel.TFFunnelForPreTrainingOutput"
>transformers.models.funnel.modeling_tf_funnel.TFFunnelForPreTrainingOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Lo=new De({props:{$$slots:{default:[r1]},$$scope:{ctx:J}}}),Do=new Oe({props:{anchor:"transformers.TFFunnelForPreTraining.call.example",$$slots:{default:[a1]},$$scope:{ctx:J}}}),Wa=new Qe({}),Za=new oe({props:{name:"class transformers.TFFunnelForMaskedLM",anchor:"transformers.TFFunnelForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFunnelForMaskedLM.config",description:`<strong>config</strong> (<code>XxxConfig</code>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1273"}}),Oo=new De({props:{$$slots:{default:[l1]},$$scope:{ctx:J}}}),Va=new oe({props:{name:"call",anchor:"transformers.TFFunnelForMaskedLM.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFFunnelForMaskedLM.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFunnelForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFunnelForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFunnelForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFunnelForMaskedLM.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFunnelForMaskedLM.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFunnelForMaskedLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFunnelForMaskedLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFFunnelForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1287",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Yo=new De({props:{$$slots:{default:[i1]},$$scope:{ctx:J}}}),Ho=new Oe({props:{anchor:"transformers.TFFunnelForMaskedLM.call.example",$$slots:{default:[d1]},$$scope:{ctx:J}}}),Ko=new Oe({props:{anchor:"transformers.TFFunnelForMaskedLM.call.example-2",$$slots:{default:[c1]},$$scope:{ctx:J}}}),Aa=new Qe({}),Sa=new oe({props:{name:"class transformers.TFFunnelForSequenceClassification",anchor:"transformers.TFFunnelForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFunnelForSequenceClassification.config",description:`<strong>config</strong> (<code>XxxConfig</code>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1351"}}),ts=new De({props:{$$slots:{default:[u1]},$$scope:{ctx:J}}}),Ya=new oe({props:{name:"call",anchor:"transformers.TFFunnelForSequenceClassification.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFFunnelForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFunnelForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFunnelForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFunnelForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFunnelForSequenceClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFunnelForSequenceClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFunnelForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFunnelForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFFunnelForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1359",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ns=new De({props:{$$slots:{default:[p1]},$$scope:{ctx:J}}}),os=new Oe({props:{anchor:"transformers.TFFunnelForSequenceClassification.call.example",$$slots:{default:[h1]},$$scope:{ctx:J}}}),ss=new Oe({props:{anchor:"transformers.TFFunnelForSequenceClassification.call.example-2",$$slots:{default:[f1]},$$scope:{ctx:J}}}),Ha=new Qe({}),Ka=new oe({props:{name:"class transformers.TFFunnelForMultipleChoice",anchor:"transformers.TFFunnelForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFunnelForMultipleChoice.config",description:`<strong>config</strong> (<code>XxxConfig</code>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1426"}}),as=new De({props:{$$slots:{default:[m1]},$$scope:{ctx:J}}}),rl=new oe({props:{name:"call",anchor:"transformers.TFFunnelForMultipleChoice.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFFunnelForMultipleChoice.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFunnelForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFunnelForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFunnelForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFunnelForMultipleChoice.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFunnelForMultipleChoice.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFunnelForMultipleChoice.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFunnelForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFFunnelForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1437",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ls=new De({props:{$$slots:{default:[g1]},$$scope:{ctx:J}}}),is=new Oe({props:{anchor:"transformers.TFFunnelForMultipleChoice.call.example",$$slots:{default:[_1]},$$scope:{ctx:J}}}),al=new Qe({}),ll=new oe({props:{name:"class transformers.TFFunnelForTokenClassification",anchor:"transformers.TFFunnelForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFunnelForTokenClassification.config",description:`<strong>config</strong> (<code>XxxConfig</code>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1521"}}),cs=new De({props:{$$slots:{default:[b1]},$$scope:{ctx:J}}}),hl=new oe({props:{name:"call",anchor:"transformers.TFFunnelForTokenClassification.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFFunnelForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFunnelForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFunnelForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFunnelForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFunnelForTokenClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFunnelForTokenClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFunnelForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFunnelForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFFunnelForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1532",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),us=new De({props:{$$slots:{default:[y1]},$$scope:{ctx:J}}}),ps=new Oe({props:{anchor:"transformers.TFFunnelForTokenClassification.call.example",$$slots:{default:[T1]},$$scope:{ctx:J}}}),hs=new Oe({props:{anchor:"transformers.TFFunnelForTokenClassification.call.example-2",$$slots:{default:[w1]},$$scope:{ctx:J}}}),fl=new Qe({}),ml=new oe({props:{name:"class transformers.TFFunnelForQuestionAnswering",anchor:"transformers.TFFunnelForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFunnelForQuestionAnswering.config",description:`<strong>config</strong> (<code>XxxConfig</code>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1598"}}),ms=new De({props:{$$slots:{default:[v1]},$$scope:{ctx:J}}}),wl=new oe({props:{name:"call",anchor:"transformers.TFFunnelForQuestionAnswering.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"start_positions",val:": np.ndarray | tf.Tensor | None = None"},{name:"end_positions",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFFunnelForQuestionAnswering.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFunnelForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFunnelForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFunnelForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFunnelForQuestionAnswering.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFunnelForQuestionAnswering.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFunnelForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFunnelForQuestionAnswering.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFFunnelForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.TFFunnelForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1608",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),gs=new De({props:{$$slots:{default:[k1]},$$scope:{ctx:J}}}),_s=new Oe({props:{anchor:"transformers.TFFunnelForQuestionAnswering.call.example",$$slots:{default:[F1]},$$scope:{ctx:J}}}),bs=new Oe({props:{anchor:"transformers.TFFunnelForQuestionAnswering.call.example-2",$$slots:{default:[M1]},$$scope:{ctx:J}}}),{c(){d=s("meta"),y=c(),h=s("h1"),m=s("a"),T=s("span"),v(i.$$.fragment),p=c(),C=s("span"),Te=n("Funnel Transformer"),ge=c(),P=s("div"),ce=s("a"),K=s("img"),we=c(),G=s("a"),ue=s("img"),X=c(),ae=s("h2"),le=s("a"),V=s("span"),v(ie.$$.fragment),ve=c(),A=s("span"),ke=n("Overview"),_e=c(),R=s("p"),Fe=n("The Funnel Transformer model was proposed in the paper "),de=s("a"),ne=n(`Funnel-Transformer: Filtering out Sequential Redundancy for
Efficient Language Processing`),U=n(`. It is a bidirectional transformer model, like
BERT, but with a pooling operation after each block of layers, a bit like in traditional convolutional neural networks
(CNN) in computer vision.`),x=c(),pe=s("p"),D=n("The abstract from the paper is the following:"),be=c(),he=s("p"),S=s("em"),Me=n(`With the success of language pretraining, it is highly desirable to develop more efficient architectures of good
scalability that can exploit the abundant unlabeled data at a lower cost. To improve the efficiency, we examine the
much-overlooked redundancy in maintaining a full-length token-level presentation, especially for tasks that only
require a single-vector presentation of the sequence. With this intuition, we propose Funnel-Transformer which
gradually compresses the sequence of hidden states to a shorter one and hence reduces the computation cost. More
importantly, by re-investing the saved FLOPs from length reduction in constructing a deeper or wider model, we further
improve the model capacity. In addition, to perform token-level predictions as required by common pretraining
objectives, Funnel-Transformer is able to recover a deep representation for each token from the reduced hidden sequence
via a decoder. Empirically, with comparable or fewer FLOPs, Funnel-Transformer outperforms the standard Transformer on
a wide variety of sequence-level prediction tasks, including text classification, language understanding, and reading
comprehension.`),ye=c(),I=s("p"),$e=n("Tips:"),L=c(),se=s("ul"),fe=s("li"),Q=n(`Since Funnel Transformer uses pooling, the sequence length of the hidden states changes after each block of layers. This way, their length is divided by 2, which speeds up the computation of the next hidden states.
The base model therefore has a final sequence length that is a quarter of the original one. This model can be used
directly for tasks that just require a sentence summary (like sequence classification or multiple choice). For other
tasks, the full model is used; this full model has a decoder that upsamples the final hidden states to the same
sequence length as the input.`),Ee=c(),me=s("li"),B=n("For tasks such as classification, this is not a problem, but for tasks like masked language modeling or token classification, we need a hidden state with the same sequence length as the original input. In those cases, the final hidden states are upsampled to the input sequence length and go through two additional layers. That\u2019s why there are two versions of each checkpoint. The version suffixed with \u201C-base\u201D contains only the three blocks, while the version without that suffix contains the three blocks and the upsampling head with its additional layers."),je=c(),q=s("li"),ze=n(`The Funnel Transformer checkpoints are all available with a full version and a base version. The first ones should be
used for `),ee=s("a"),W=n("FunnelModel"),Ce=n(", "),Z=s("a"),Je=n("FunnelForPreTraining"),Ue=n(`,
`),g=s("a"),j=n("FunnelForMaskedLM"),qe=n(", "),te=s("a"),Ne=n("FunnelForTokenClassification"),Be=n(` and
`),z=s("a"),Pe=n("FunnelForQuestionAnswering"),Re=n(`. The second ones should be used for
`),xe=s("a"),Ge=n("FunnelBaseModel"),Ve=n(", "),N=s("a"),O=n("FunnelForSequenceClassification"),Ae=n(` and
`),We=s("a"),Y=n("FunnelForMultipleChoice"),Se=n("."),Ze=c(),re=s("p"),Xe=n("This model was contributed by "),H=s("a"),Le=n("sgugger"),Uh=n(". The original code can be found "),Is=s("a"),Ih=n("here"),xh=n("."),_u=c(),cn=s("h2"),oo=s("a"),Xi=s("span"),v(xs.$$.fragment),Wh=c(),Li=s("span"),Zh=n("Documentation resources"),bu=c(),_t=s("ul"),Di=s("li"),El=s("a"),qh=n("Text classification task guide"),Nh=c(),Qi=s("li"),jl=s("a"),Bh=n("Token classification task guide"),Ph=c(),Oi=s("li"),zl=s("a"),Rh=n("Question answering task guide"),Gh=c(),Yi=s("li"),Cl=s("a"),Vh=n("Masked language modeling task guide"),Ah=c(),Hi=s("li"),Jl=s("a"),Sh=n("Multiple choice task guide"),yu=c(),un=s("h2"),so=s("a"),Ki=s("span"),v(Ws.$$.fragment),Xh=c(),ed=s("span"),Lh=n("FunnelConfig"),Tu=c(),Kt=s("div"),v(Zs.$$.fragment),Dh=c(),en=s("p"),Qh=n("This is the configuration class to store the configuration of a "),Ul=s("a"),Oh=n("FunnelModel"),Yh=n(" or a "),Il=s("a"),Hh=n("TFBertModel"),Kh=n(`. It is used to
instantiate a Funnel Transformer model according to the specified arguments, defining the model architecture.
Instantiating a configuration with the defaults will yield a similar configuration to that of the Funnel
Transformer `),qs=s("a"),ef=n("funnel-transformer/small"),tf=n(" architecture."),nf=c(),pn=s("p"),of=n("Configuration objects inherit from "),xl=s("a"),sf=n("PretrainedConfig"),rf=n(` and can be used to control the model outputs. Read the
documentation from `),Wl=s("a"),af=n("PretrainedConfig"),lf=n(" for more information."),wu=c(),hn=s("h2"),ro=s("a"),td=s("span"),v(Ns.$$.fragment),df=c(),nd=s("span"),cf=n("FunnelTokenizer"),vu=c(),et=s("div"),v(Bs.$$.fragment),uf=c(),od=s("p"),pf=n("Construct a Funnel Transformer tokenizer. Based on WordPiece."),hf=c(),Ps=s("p"),ff=n("This tokenizer inherits from "),Zl=s("a"),mf=n("PreTrainedTokenizer"),gf=n(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),_f=c(),tn=s("div"),v(Rs.$$.fragment),bf=c(),sd=s("p"),yf=n(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A BERT sequence has the following format:`),Tf=c(),Gs=s("ul"),ql=s("li"),wf=n("single sequence: "),rd=s("code"),vf=n("[CLS] X [SEP]"),kf=c(),Nl=s("li"),Ff=n("pair of sequences: "),ad=s("code"),Mf=n("[CLS] A [SEP] B [SEP]"),$f=c(),ao=s("div"),v(Vs.$$.fragment),Ef=c(),As=s("p"),jf=n(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),ld=s("code"),zf=n("prepare_for_model"),Cf=n(" method."),Jf=c(),It=s("div"),v(Ss.$$.fragment),Uf=c(),id=s("p"),If=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Funnel"),xf=c(),v(lo.$$.fragment),Wf=c(),fn=s("p"),Zf=n("If "),dd=s("code"),qf=n("token_ids_1"),Nf=n(" is "),cd=s("code"),Bf=n("None"),Pf=n(", this method only returns the first portion of the mask (0s)."),Rf=c(),Bl=s("div"),v(Xs.$$.fragment),ku=c(),mn=s("h2"),io=s("a"),ud=s("span"),v(Ls.$$.fragment),Gf=c(),pd=s("span"),Vf=n("FunnelTokenizerFast"),Fu=c(),gt=s("div"),v(Ds.$$.fragment),Af=c(),Qs=s("p"),Sf=n("Construct a \u201Cfast\u201D Funnel Transformer tokenizer (backed by HuggingFace\u2019s "),hd=s("em"),Xf=n("tokenizers"),Lf=n(" library). Based on WordPiece."),Df=c(),Os=s("p"),Qf=n("This tokenizer inherits from "),Pl=s("a"),Of=n("PreTrainedTokenizerFast"),Yf=n(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Hf=c(),nn=s("div"),v(Ys.$$.fragment),Kf=c(),fd=s("p"),em=n(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Funnel sequence has the following format:`),tm=c(),Hs=s("ul"),Rl=s("li"),nm=n("single sequence: "),md=s("code"),om=n("[CLS] X [SEP]"),sm=c(),Gl=s("li"),rm=n("pair of sequences: "),gd=s("code"),am=n("[CLS] A [SEP] B [SEP]"),lm=c(),xt=s("div"),v(Ks.$$.fragment),im=c(),_d=s("p"),dm=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Funnel"),cm=c(),v(co.$$.fragment),um=c(),gn=s("p"),pm=n("If "),bd=s("code"),hm=n("token_ids_1"),fm=n(" is "),yd=s("code"),mm=n("None"),gm=n(", this method only returns the first portion of the mask (0s)."),Mu=c(),_n=s("h2"),uo=s("a"),Td=s("span"),v(er.$$.fragment),_m=c(),wd=s("span"),bm=n("Funnel specific outputs"),$u=c(),bn=s("div"),v(tr.$$.fragment),ym=c(),nr=s("p"),Tm=n("Output type of "),Vl=s("a"),wm=n("FunnelForPreTraining"),vm=n("."),Eu=c(),yn=s("div"),v(or.$$.fragment),km=c(),sr=s("p"),Fm=n("Output type of "),Al=s("a"),Mm=n("FunnelForPreTraining"),$m=n("."),ju=c(),Tn=s("h2"),po=s("a"),vd=s("span"),v(rr.$$.fragment),Em=c(),kd=s("span"),jm=n("FunnelBaseModel"),zu=c(),dt=s("div"),v(ar.$$.fragment),zm=c(),Fd=s("p"),Cm=n(`The base Funnel Transformer Model transformer outputting raw hidden-states without upsampling head (also called
decoder) or any task-specific head on top.`),Jm=c(),lr=s("p"),Um=n("The Funnel Transformer model was proposed in "),ir=s("a"),Im=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),xm=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Wm=c(),dr=s("p"),Zm=n("This model inherits from "),Sl=s("a"),qm=n("PreTrainedModel"),Nm=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Bm=c(),cr=s("p"),Pm=n("This model is also a PyTorch "),ur=s("a"),Rm=n("torch.nn.Module"),Gm=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Vm=c(),Wt=s("div"),v(pr.$$.fragment),Am=c(),wn=s("p"),Sm=n("The "),Xl=s("a"),Xm=n("FunnelBaseModel"),Lm=n(" forward method, overrides the "),Md=s("code"),Dm=n("__call__"),Qm=n(" special method."),Om=c(),v(ho.$$.fragment),Ym=c(),v(fo.$$.fragment),Cu=c(),vn=s("h2"),mo=s("a"),$d=s("span"),v(hr.$$.fragment),Hm=c(),Ed=s("span"),Km=n("FunnelModel"),Ju=c(),ct=s("div"),v(fr.$$.fragment),eg=c(),jd=s("p"),tg=n("The bare Funnel Transformer Model transformer outputting raw hidden-states without any specific head on top."),ng=c(),mr=s("p"),og=n("The Funnel Transformer model was proposed in "),gr=s("a"),sg=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),rg=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),ag=c(),_r=s("p"),lg=n("This model inherits from "),Ll=s("a"),ig=n("PreTrainedModel"),dg=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),cg=c(),br=s("p"),ug=n("This model is also a PyTorch "),yr=s("a"),pg=n("torch.nn.Module"),hg=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),fg=c(),Zt=s("div"),v(Tr.$$.fragment),mg=c(),kn=s("p"),gg=n("The "),Dl=s("a"),_g=n("FunnelModel"),bg=n(" forward method, overrides the "),zd=s("code"),yg=n("__call__"),Tg=n(" special method."),wg=c(),v(go.$$.fragment),vg=c(),v(_o.$$.fragment),Uu=c(),Fn=s("h2"),bo=s("a"),Cd=s("span"),v(wr.$$.fragment),kg=c(),Jd=s("span"),Fg=n("FunnelModelForPreTraining"),Iu=c(),Mn=s("div"),v(vr.$$.fragment),Mg=c(),qt=s("div"),v(kr.$$.fragment),$g=c(),$n=s("p"),Eg=n("The "),Ql=s("a"),jg=n("FunnelForPreTraining"),zg=n(" forward method, overrides the "),Ud=s("code"),Cg=n("__call__"),Jg=n(" special method."),Ug=c(),v(yo.$$.fragment),Ig=c(),v(To.$$.fragment),xu=c(),En=s("h2"),wo=s("a"),Id=s("span"),v(Fr.$$.fragment),xg=c(),xd=s("span"),Wg=n("FunnelForMaskedLM"),Wu=c(),ut=s("div"),v(Mr.$$.fragment),Zg=c(),$r=s("p"),qg=n("Funnel Transformer Model with a "),Wd=s("code"),Ng=n("language modeling"),Bg=n(" head on top."),Pg=c(),Er=s("p"),Rg=n("The Funnel Transformer model was proposed in "),jr=s("a"),Gg=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),Vg=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Ag=c(),zr=s("p"),Sg=n("This model inherits from "),Ol=s("a"),Xg=n("PreTrainedModel"),Lg=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Dg=c(),Cr=s("p"),Qg=n("This model is also a PyTorch "),Jr=s("a"),Og=n("torch.nn.Module"),Yg=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Hg=c(),Nt=s("div"),v(Ur.$$.fragment),Kg=c(),jn=s("p"),e_=n("The "),Yl=s("a"),t_=n("FunnelForMaskedLM"),n_=n(" forward method, overrides the "),Zd=s("code"),o_=n("__call__"),s_=n(" special method."),r_=c(),v(vo.$$.fragment),a_=c(),v(ko.$$.fragment),Zu=c(),zn=s("h2"),Fo=s("a"),qd=s("span"),v(Ir.$$.fragment),l_=c(),Nd=s("span"),i_=n("FunnelForSequenceClassification"),qu=c(),pt=s("div"),v(xr.$$.fragment),d_=c(),Bd=s("p"),c_=n(`Funnel Transformer Model with a sequence classification/regression head on top (two linear layer on top of the
first timestep of the last hidden state) e.g. for GLUE tasks.`),u_=c(),Wr=s("p"),p_=n("The Funnel Transformer model was proposed in "),Zr=s("a"),h_=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),f_=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),m_=c(),qr=s("p"),g_=n("This model inherits from "),Hl=s("a"),__=n("PreTrainedModel"),b_=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),y_=c(),Nr=s("p"),T_=n("This model is also a PyTorch "),Br=s("a"),w_=n("torch.nn.Module"),v_=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),k_=c(),bt=s("div"),v(Pr.$$.fragment),F_=c(),Cn=s("p"),M_=n("The "),Kl=s("a"),$_=n("FunnelForSequenceClassification"),E_=n(" forward method, overrides the "),Pd=s("code"),j_=n("__call__"),z_=n(" special method."),C_=c(),v(Mo.$$.fragment),J_=c(),v($o.$$.fragment),U_=c(),v(Eo.$$.fragment),Nu=c(),Jn=s("h2"),jo=s("a"),Rd=s("span"),v(Rr.$$.fragment),I_=c(),Gd=s("span"),x_=n("FunnelForMultipleChoice"),Bu=c(),ht=s("div"),v(Gr.$$.fragment),W_=c(),Vd=s("p"),Z_=n(`Funnel Transformer Model with a multiple choice classification head on top (two linear layer on top of the first
timestep of the last hidden state, and a softmax) e.g. for RocStories/SWAG tasks.`),q_=c(),Vr=s("p"),N_=n("The Funnel Transformer model was proposed in "),Ar=s("a"),B_=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),P_=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),R_=c(),Sr=s("p"),G_=n("This model inherits from "),ei=s("a"),V_=n("PreTrainedModel"),A_=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),S_=c(),Xr=s("p"),X_=n("This model is also a PyTorch "),Lr=s("a"),L_=n("torch.nn.Module"),D_=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Q_=c(),Bt=s("div"),v(Dr.$$.fragment),O_=c(),Un=s("p"),Y_=n("The "),ti=s("a"),H_=n("FunnelForMultipleChoice"),K_=n(" forward method, overrides the "),Ad=s("code"),eb=n("__call__"),tb=n(" special method."),nb=c(),v(zo.$$.fragment),ob=c(),v(Co.$$.fragment),Pu=c(),In=s("h2"),Jo=s("a"),Sd=s("span"),v(Qr.$$.fragment),sb=c(),Xd=s("span"),rb=n("FunnelForTokenClassification"),Ru=c(),ft=s("div"),v(Or.$$.fragment),ab=c(),Ld=s("p"),lb=n(`Funnel Transformer Model with a token classification head on top (a linear layer on top of the hidden-states
output) e.g. for Named-Entity-Recognition (NER) tasks.`),ib=c(),Yr=s("p"),db=n("The Funnel Transformer model was proposed in "),Hr=s("a"),cb=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),ub=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),pb=c(),Kr=s("p"),hb=n("This model inherits from "),ni=s("a"),fb=n("PreTrainedModel"),mb=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),gb=c(),ea=s("p"),_b=n("This model is also a PyTorch "),ta=s("a"),bb=n("torch.nn.Module"),yb=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Tb=c(),Pt=s("div"),v(na.$$.fragment),wb=c(),xn=s("p"),vb=n("The "),oi=s("a"),kb=n("FunnelForTokenClassification"),Fb=n(" forward method, overrides the "),Dd=s("code"),Mb=n("__call__"),$b=n(" special method."),Eb=c(),v(Uo.$$.fragment),jb=c(),v(Io.$$.fragment),Gu=c(),Wn=s("h2"),xo=s("a"),Qd=s("span"),v(oa.$$.fragment),zb=c(),Od=s("span"),Cb=n("FunnelForQuestionAnswering"),Vu=c(),mt=s("div"),v(sa.$$.fragment),Jb=c(),Zn=s("p"),Ub=n(`Funnel Transformer Model with a span classification head on top for extractive question-answering tasks like SQuAD
(a linear layer on top of the hidden-states output to compute `),Yd=s("code"),Ib=n("span start logits"),xb=n(" and "),Hd=s("code"),Wb=n("span end logits"),Zb=n(")."),qb=c(),ra=s("p"),Nb=n("The Funnel Transformer model was proposed in "),aa=s("a"),Bb=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),Pb=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Rb=c(),la=s("p"),Gb=n("This model inherits from "),si=s("a"),Vb=n("PreTrainedModel"),Ab=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Sb=c(),ia=s("p"),Xb=n("This model is also a PyTorch "),da=s("a"),Lb=n("torch.nn.Module"),Db=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Qb=c(),Rt=s("div"),v(ca.$$.fragment),Ob=c(),qn=s("p"),Yb=n("The "),ri=s("a"),Hb=n("FunnelForQuestionAnswering"),Kb=n(" forward method, overrides the "),Kd=s("code"),ey=n("__call__"),ty=n(" special method."),ny=c(),v(Wo.$$.fragment),oy=c(),v(Zo.$$.fragment),Au=c(),Nn=s("h2"),qo=s("a"),ec=s("span"),v(ua.$$.fragment),sy=c(),tc=s("span"),ry=n("TFFunnelBaseModel"),Su=c(),tt=s("div"),v(pa.$$.fragment),ay=c(),nc=s("p"),ly=n(`The base Funnel Transformer Model transformer outputting raw hidden-states without upsampling head (also called
decoder) or any task-specific head on top.`),iy=c(),ha=s("p"),dy=n("The Funnel Transformer model was proposed in "),fa=s("a"),cy=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),uy=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),py=c(),ma=s("p"),hy=n("This model inherits from "),ai=s("a"),fy=n("TFPreTrainedModel"),my=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),gy=c(),ga=s("p"),_y=n("This model is also a "),_a=s("a"),by=n("tf.keras.Model"),yy=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Ty=c(),v(No.$$.fragment),wy=c(),Gt=s("div"),v(ba.$$.fragment),vy=c(),Bn=s("p"),ky=n("The "),li=s("a"),Fy=n("TFFunnelBaseModel"),My=n(" forward method, overrides the "),oc=s("code"),$y=n("__call__"),Ey=n(" special method."),jy=c(),v(Bo.$$.fragment),zy=c(),v(Po.$$.fragment),Xu=c(),Pn=s("h2"),Ro=s("a"),sc=s("span"),v(ya.$$.fragment),Cy=c(),rc=s("span"),Jy=n("TFFunnelModel"),Lu=c(),nt=s("div"),v(Ta.$$.fragment),Uy=c(),ac=s("p"),Iy=n("The bare Funnel Transformer Model transformer outputting raw hidden-states without any specific head on top."),xy=c(),wa=s("p"),Wy=n("The Funnel Transformer model was proposed in "),va=s("a"),Zy=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),qy=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Ny=c(),ka=s("p"),By=n("This model inherits from "),ii=s("a"),Py=n("TFPreTrainedModel"),Ry=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Gy=c(),Fa=s("p"),Vy=n("This model is also a "),Ma=s("a"),Ay=n("tf.keras.Model"),Sy=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Xy=c(),v(Go.$$.fragment),Ly=c(),Vt=s("div"),v($a.$$.fragment),Dy=c(),Rn=s("p"),Qy=n("The "),di=s("a"),Oy=n("TFFunnelModel"),Yy=n(" forward method, overrides the "),lc=s("code"),Hy=n("__call__"),Ky=n(" special method."),eT=c(),v(Vo.$$.fragment),tT=c(),v(Ao.$$.fragment),Du=c(),Gn=s("h2"),So=s("a"),ic=s("span"),v(Ea.$$.fragment),nT=c(),dc=s("span"),oT=n("TFFunnelModelForPreTraining"),Qu=c(),ot=s("div"),v(ja.$$.fragment),sT=c(),cc=s("p"),rT=n("Funnel model with a binary classification head on top as used during pretraining for identifying generated tokens."),aT=c(),za=s("p"),lT=n("The Funnel Transformer model was proposed in "),Ca=s("a"),iT=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),dT=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),cT=c(),Ja=s("p"),uT=n("This model inherits from "),ci=s("a"),pT=n("TFPreTrainedModel"),hT=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),fT=c(),Ua=s("p"),mT=n("This model is also a "),Ia=s("a"),gT=n("tf.keras.Model"),_T=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),bT=c(),v(Xo.$$.fragment),yT=c(),At=s("div"),v(xa.$$.fragment),TT=c(),Vn=s("p"),wT=n("The "),ui=s("a"),vT=n("TFFunnelForPreTraining"),kT=n(" forward method, overrides the "),uc=s("code"),FT=n("__call__"),MT=n(" special method."),$T=c(),v(Lo.$$.fragment),ET=c(),v(Do.$$.fragment),Ou=c(),An=s("h2"),Qo=s("a"),pc=s("span"),v(Wa.$$.fragment),jT=c(),hc=s("span"),zT=n("TFFunnelForMaskedLM"),Yu=c(),st=s("div"),v(Za.$$.fragment),CT=c(),qa=s("p"),JT=n("Funnel Model with a "),fc=s("code"),UT=n("language modeling"),IT=n(" head on top."),xT=c(),Na=s("p"),WT=n("The Funnel Transformer model was proposed in "),Ba=s("a"),ZT=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),qT=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),NT=c(),Pa=s("p"),BT=n("This model inherits from "),pi=s("a"),PT=n("TFPreTrainedModel"),RT=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),GT=c(),Ra=s("p"),VT=n("This model is also a "),Ga=s("a"),AT=n("tf.keras.Model"),ST=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),XT=c(),v(Oo.$$.fragment),LT=c(),yt=s("div"),v(Va.$$.fragment),DT=c(),Sn=s("p"),QT=n("The "),hi=s("a"),OT=n("TFFunnelForMaskedLM"),YT=n(" forward method, overrides the "),mc=s("code"),HT=n("__call__"),KT=n(" special method."),ew=c(),v(Yo.$$.fragment),tw=c(),v(Ho.$$.fragment),nw=c(),v(Ko.$$.fragment),Hu=c(),Xn=s("h2"),es=s("a"),gc=s("span"),v(Aa.$$.fragment),ow=c(),_c=s("span"),sw=n("TFFunnelForSequenceClassification"),Ku=c(),rt=s("div"),v(Sa.$$.fragment),rw=c(),bc=s("p"),aw=n(`Funnel Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),lw=c(),Xa=s("p"),iw=n("The Funnel Transformer model was proposed in "),La=s("a"),dw=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),cw=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),uw=c(),Da=s("p"),pw=n("This model inherits from "),fi=s("a"),hw=n("TFPreTrainedModel"),fw=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),mw=c(),Qa=s("p"),gw=n("This model is also a "),Oa=s("a"),_w=n("tf.keras.Model"),bw=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),yw=c(),v(ts.$$.fragment),Tw=c(),Tt=s("div"),v(Ya.$$.fragment),ww=c(),Ln=s("p"),vw=n("The "),mi=s("a"),kw=n("TFFunnelForSequenceClassification"),Fw=n(" forward method, overrides the "),yc=s("code"),Mw=n("__call__"),$w=n(" special method."),Ew=c(),v(ns.$$.fragment),jw=c(),v(os.$$.fragment),zw=c(),v(ss.$$.fragment),ep=c(),Dn=s("h2"),rs=s("a"),Tc=s("span"),v(Ha.$$.fragment),Cw=c(),wc=s("span"),Jw=n("TFFunnelForMultipleChoice"),tp=c(),at=s("div"),v(Ka.$$.fragment),Uw=c(),vc=s("p"),Iw=n(`Funnel Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),xw=c(),el=s("p"),Ww=n("The Funnel Transformer model was proposed in "),tl=s("a"),Zw=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),qw=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Nw=c(),nl=s("p"),Bw=n("This model inherits from "),gi=s("a"),Pw=n("TFPreTrainedModel"),Rw=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Gw=c(),ol=s("p"),Vw=n("This model is also a "),sl=s("a"),Aw=n("tf.keras.Model"),Sw=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Xw=c(),v(as.$$.fragment),Lw=c(),St=s("div"),v(rl.$$.fragment),Dw=c(),Qn=s("p"),Qw=n("The "),_i=s("a"),Ow=n("TFFunnelForMultipleChoice"),Yw=n(" forward method, overrides the "),kc=s("code"),Hw=n("__call__"),Kw=n(" special method."),ev=c(),v(ls.$$.fragment),tv=c(),v(is.$$.fragment),np=c(),On=s("h2"),ds=s("a"),Fc=s("span"),v(al.$$.fragment),nv=c(),Mc=s("span"),ov=n("TFFunnelForTokenClassification"),op=c(),lt=s("div"),v(ll.$$.fragment),sv=c(),$c=s("p"),rv=n(`Funnel Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),av=c(),il=s("p"),lv=n("The Funnel Transformer model was proposed in "),dl=s("a"),iv=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),dv=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),cv=c(),cl=s("p"),uv=n("This model inherits from "),bi=s("a"),pv=n("TFPreTrainedModel"),hv=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),fv=c(),ul=s("p"),mv=n("This model is also a "),pl=s("a"),gv=n("tf.keras.Model"),_v=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),bv=c(),v(cs.$$.fragment),yv=c(),wt=s("div"),v(hl.$$.fragment),Tv=c(),Yn=s("p"),wv=n("The "),yi=s("a"),vv=n("TFFunnelForTokenClassification"),kv=n(" forward method, overrides the "),Ec=s("code"),Fv=n("__call__"),Mv=n(" special method."),$v=c(),v(us.$$.fragment),Ev=c(),v(ps.$$.fragment),jv=c(),v(hs.$$.fragment),sp=c(),Hn=s("h2"),fs=s("a"),jc=s("span"),v(fl.$$.fragment),zv=c(),zc=s("span"),Cv=n("TFFunnelForQuestionAnswering"),rp=c(),it=s("div"),v(ml.$$.fragment),Jv=c(),Kn=s("p"),Uv=n(`Funnel Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Cc=s("code"),Iv=n("span start logits"),xv=n(" and "),Jc=s("code"),Wv=n("span end logits"),Zv=n(")."),qv=c(),gl=s("p"),Nv=n("The Funnel Transformer model was proposed in "),_l=s("a"),Bv=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),Pv=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Rv=c(),bl=s("p"),Gv=n("This model inherits from "),Ti=s("a"),Vv=n("TFPreTrainedModel"),Av=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Sv=c(),yl=s("p"),Xv=n("This model is also a "),Tl=s("a"),Lv=n("tf.keras.Model"),Dv=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Qv=c(),v(ms.$$.fragment),Ov=c(),vt=s("div"),v(wl.$$.fragment),Yv=c(),eo=s("p"),Hv=n("The "),wi=s("a"),Kv=n("TFFunnelForQuestionAnswering"),ek=n(" forward method, overrides the "),Uc=s("code"),tk=n("__call__"),nk=n(" special method."),ok=c(),v(gs.$$.fragment),sk=c(),v(_s.$$.fragment),rk=c(),v(bs.$$.fragment),this.h()},l(l){const b=JM('[data-svelte="svelte-1phssyn"]',document.head);d=r(b,"META",{name:!0,content:!0}),b.forEach(t),y=u(l),h=r(l,"H1",{class:!0});var vl=a(h);m=r(vl,"A",{id:!0,class:!0,href:!0});var Ic=a(m);T=r(Ic,"SPAN",{});var xc=a(T);k(i.$$.fragment,xc),xc.forEach(t),Ic.forEach(t),p=u(vl),C=r(vl,"SPAN",{});var Wc=a(C);Te=o(Wc,"Funnel Transformer"),Wc.forEach(t),vl.forEach(t),ge=u(l),P=r(l,"DIV",{class:!0});var kl=a(P);ce=r(kl,"A",{href:!0});var Zc=a(ce);K=r(Zc,"IMG",{alt:!0,src:!0}),Zc.forEach(t),we=u(kl),G=r(kl,"A",{href:!0});var qc=a(G);ue=r(qc,"IMG",{alt:!0,src:!0}),qc.forEach(t),kl.forEach(t),X=u(l),ae=r(l,"H2",{class:!0});var Fl=a(ae);le=r(Fl,"A",{id:!0,class:!0,href:!0});var Nc=a(le);V=r(Nc,"SPAN",{});var Bc=a(V);k(ie.$$.fragment,Bc),Bc.forEach(t),Nc.forEach(t),ve=u(Fl),A=r(Fl,"SPAN",{});var Pc=a(A);ke=o(Pc,"Overview"),Pc.forEach(t),Fl.forEach(t),_e=u(l),R=r(l,"P",{});var Ml=a(R);Fe=o(Ml,"The Funnel Transformer model was proposed in the paper "),de=r(Ml,"A",{href:!0,rel:!0});var Rc=a(de);ne=o(Rc,`Funnel-Transformer: Filtering out Sequential Redundancy for
Efficient Language Processing`),Rc.forEach(t),U=o(Ml,`. It is a bidirectional transformer model, like
BERT, but with a pooling operation after each block of layers, a bit like in traditional convolutional neural networks
(CNN) in computer vision.`),Ml.forEach(t),x=u(l),pe=r(l,"P",{});var Gc=a(pe);D=o(Gc,"The abstract from the paper is the following:"),Gc.forEach(t),be=u(l),he=r(l,"P",{});var Vc=a(he);S=r(Vc,"EM",{});var Ac=a(S);Me=o(Ac,`With the success of language pretraining, it is highly desirable to develop more efficient architectures of good
scalability that can exploit the abundant unlabeled data at a lower cost. To improve the efficiency, we examine the
much-overlooked redundancy in maintaining a full-length token-level presentation, especially for tasks that only
require a single-vector presentation of the sequence. With this intuition, we propose Funnel-Transformer which
gradually compresses the sequence of hidden states to a shorter one and hence reduces the computation cost. More
importantly, by re-investing the saved FLOPs from length reduction in constructing a deeper or wider model, we further
improve the model capacity. In addition, to perform token-level predictions as required by common pretraining
objectives, Funnel-Transformer is able to recover a deep representation for each token from the reduced hidden sequence
via a decoder. Empirically, with comparable or fewer FLOPs, Funnel-Transformer outperforms the standard Transformer on
a wide variety of sequence-level prediction tasks, including text classification, language understanding, and reading
comprehension.`),Ac.forEach(t),Vc.forEach(t),ye=u(l),I=r(l,"P",{});var Sc=a(I);$e=o(Sc,"Tips:"),Sc.forEach(t),L=u(l),se=r(l,"UL",{});var to=a(se);fe=r(to,"LI",{});var Xc=a(fe);Q=o(Xc,`Since Funnel Transformer uses pooling, the sequence length of the hidden states changes after each block of layers. This way, their length is divided by 2, which speeds up the computation of the next hidden states.
The base model therefore has a final sequence length that is a quarter of the original one. This model can be used
directly for tasks that just require a sentence summary (like sequence classification or multiple choice). For other
tasks, the full model is used; this full model has a decoder that upsamples the final hidden states to the same
sequence length as the input.`),Xc.forEach(t),Ee=u(to),me=r(to,"LI",{});var Lc=a(me);B=o(Lc,"For tasks such as classification, this is not a problem, but for tasks like masked language modeling or token classification, we need a hidden state with the same sequence length as the original input. In those cases, the final hidden states are upsampled to the input sequence length and go through two additional layers. That\u2019s why there are two versions of each checkpoint. The version suffixed with \u201C-base\u201D contains only the three blocks, while the version without that suffix contains the three blocks and the upsampling head with its additional layers."),Lc.forEach(t),je=u(to),q=r(to,"LI",{});var Ke=a(q);ze=o(Ke,`The Funnel Transformer checkpoints are all available with a full version and a base version. The first ones should be
used for `),ee=r(Ke,"A",{href:!0});var Dc=a(ee);W=o(Dc,"FunnelModel"),Dc.forEach(t),Ce=o(Ke,", "),Z=r(Ke,"A",{href:!0});var Qc=a(Z);Je=o(Qc,"FunnelForPreTraining"),Qc.forEach(t),Ue=o(Ke,`,
`),g=r(Ke,"A",{href:!0});var Oc=a(g);j=o(Oc,"FunnelForMaskedLM"),Oc.forEach(t),qe=o(Ke,", "),te=r(Ke,"A",{href:!0});var Yc=a(te);Ne=o(Yc,"FunnelForTokenClassification"),Yc.forEach(t),Be=o(Ke,` and
`),z=r(Ke,"A",{href:!0});var Hc=a(z);Pe=o(Hc,"FunnelForQuestionAnswering"),Hc.forEach(t),Re=o(Ke,`. The second ones should be used for
`),xe=r(Ke,"A",{href:!0});var Kc=a(xe);Ge=o(Kc,"FunnelBaseModel"),Kc.forEach(t),Ve=o(Ke,", "),N=r(Ke,"A",{href:!0});var eu=a(N);O=o(eu,"FunnelForSequenceClassification"),eu.forEach(t),Ae=o(Ke,` and
`),We=r(Ke,"A",{href:!0});var tu=a(We);Y=o(tu,"FunnelForMultipleChoice"),tu.forEach(t),Se=o(Ke,"."),Ke.forEach(t),to.forEach(t),Ze=u(l),re=r(l,"P",{});var no=a(re);Xe=o(no,"This model was contributed by "),H=r(no,"A",{href:!0,rel:!0});var nu=a(H);Le=o(nu,"sgugger"),nu.forEach(t),Uh=o(no,". The original code can be found "),Is=r(no,"A",{href:!0,rel:!0});var ou=a(Is);Ih=o(ou,"here"),ou.forEach(t),xh=o(no,"."),no.forEach(t),_u=u(l),cn=r(l,"H2",{class:!0});var $l=a(cn);oo=r($l,"A",{id:!0,class:!0,href:!0});var su=a(oo);Xi=r(su,"SPAN",{});var ru=a(Xi);k(xs.$$.fragment,ru),ru.forEach(t),su.forEach(t),Wh=u($l),Li=r($l,"SPAN",{});var au=a(Li);Zh=o(au,"Documentation resources"),au.forEach(t),$l.forEach(t),bu=u(l),_t=r(l,"UL",{});var Ut=a(_t);Di=r(Ut,"LI",{});var lu=a(Di);El=r(lu,"A",{href:!0});var iu=a(El);qh=o(iu,"Text classification task guide"),iu.forEach(t),lu.forEach(t),Nh=u(Ut),Qi=r(Ut,"LI",{});var du=a(Qi);jl=r(du,"A",{href:!0});var cu=a(jl);Bh=o(cu,"Token classification task guide"),cu.forEach(t),du.forEach(t),Ph=u(Ut),Oi=r(Ut,"LI",{});var uu=a(Oi);zl=r(uu,"A",{href:!0});var pu=a(zl);Rh=o(pu,"Question answering task guide"),pu.forEach(t),uu.forEach(t),Gh=u(Ut),Yi=r(Ut,"LI",{});var hu=a(Yi);Cl=r(hu,"A",{href:!0});var fu=a(Cl);Vh=o(fu,"Masked language modeling task guide"),fu.forEach(t),hu.forEach(t),Ah=u(Ut),Hi=r(Ut,"LI",{});var mu=a(Hi);Jl=r(mu,"A",{href:!0});var gu=a(Jl);Sh=o(gu,"Multiple choice task guide"),gu.forEach(t),mu.forEach(t),Ut.forEach(t),yu=u(l),un=r(l,"H2",{class:!0});var lp=a(un);so=r(lp,"A",{id:!0,class:!0,href:!0});var ck=a(so);Ki=r(ck,"SPAN",{});var uk=a(Ki);k(Ws.$$.fragment,uk),uk.forEach(t),ck.forEach(t),Xh=u(lp),ed=r(lp,"SPAN",{});var pk=a(ed);Lh=o(pk,"FunnelConfig"),pk.forEach(t),lp.forEach(t),Tu=u(l),Kt=r(l,"DIV",{class:!0});var vi=a(Kt);k(Zs.$$.fragment,vi),Dh=u(vi),en=r(vi,"P",{});var ys=a(en);Qh=o(ys,"This is the configuration class to store the configuration of a "),Ul=r(ys,"A",{href:!0});var hk=a(Ul);Oh=o(hk,"FunnelModel"),hk.forEach(t),Yh=o(ys," or a "),Il=r(ys,"A",{href:!0});var fk=a(Il);Hh=o(fk,"TFBertModel"),fk.forEach(t),Kh=o(ys,`. It is used to
instantiate a Funnel Transformer model according to the specified arguments, defining the model architecture.
Instantiating a configuration with the defaults will yield a similar configuration to that of the Funnel
Transformer `),qs=r(ys,"A",{href:!0,rel:!0});var mk=a(qs);ef=o(mk,"funnel-transformer/small"),mk.forEach(t),tf=o(ys," architecture."),ys.forEach(t),nf=u(vi),pn=r(vi,"P",{});var ki=a(pn);of=o(ki,"Configuration objects inherit from "),xl=r(ki,"A",{href:!0});var gk=a(xl);sf=o(gk,"PretrainedConfig"),gk.forEach(t),rf=o(ki,` and can be used to control the model outputs. Read the
documentation from `),Wl=r(ki,"A",{href:!0});var _k=a(Wl);af=o(_k,"PretrainedConfig"),_k.forEach(t),lf=o(ki," for more information."),ki.forEach(t),vi.forEach(t),wu=u(l),hn=r(l,"H2",{class:!0});var ip=a(hn);ro=r(ip,"A",{id:!0,class:!0,href:!0});var bk=a(ro);td=r(bk,"SPAN",{});var yk=a(td);k(Ns.$$.fragment,yk),yk.forEach(t),bk.forEach(t),df=u(ip),nd=r(ip,"SPAN",{});var Tk=a(nd);cf=o(Tk,"FunnelTokenizer"),Tk.forEach(t),ip.forEach(t),vu=u(l),et=r(l,"DIV",{class:!0});var kt=a(et);k(Bs.$$.fragment,kt),uf=u(kt),od=r(kt,"P",{});var wk=a(od);pf=o(wk,"Construct a Funnel Transformer tokenizer. Based on WordPiece."),wk.forEach(t),hf=u(kt),Ps=r(kt,"P",{});var dp=a(Ps);ff=o(dp,"This tokenizer inherits from "),Zl=r(dp,"A",{href:!0});var vk=a(Zl);mf=o(vk,"PreTrainedTokenizer"),vk.forEach(t),gf=o(dp,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),dp.forEach(t),_f=u(kt),tn=r(kt,"DIV",{class:!0});var Fi=a(tn);k(Rs.$$.fragment,Fi),bf=u(Fi),sd=r(Fi,"P",{});var kk=a(sd);yf=o(kk,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A BERT sequence has the following format:`),kk.forEach(t),Tf=u(Fi),Gs=r(Fi,"UL",{});var cp=a(Gs);ql=r(cp,"LI",{});var ak=a(ql);wf=o(ak,"single sequence: "),rd=r(ak,"CODE",{});var Fk=a(rd);vf=o(Fk,"[CLS] X [SEP]"),Fk.forEach(t),ak.forEach(t),kf=u(cp),Nl=r(cp,"LI",{});var lk=a(Nl);Ff=o(lk,"pair of sequences: "),ad=r(lk,"CODE",{});var Mk=a(ad);Mf=o(Mk,"[CLS] A [SEP] B [SEP]"),Mk.forEach(t),lk.forEach(t),cp.forEach(t),Fi.forEach(t),$f=u(kt),ao=r(kt,"DIV",{class:!0});var up=a(ao);k(Vs.$$.fragment,up),Ef=u(up),As=r(up,"P",{});var pp=a(As);jf=o(pp,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),ld=r(pp,"CODE",{});var $k=a(ld);zf=o($k,"prepare_for_model"),$k.forEach(t),Cf=o(pp," method."),pp.forEach(t),up.forEach(t),Jf=u(kt),It=r(kt,"DIV",{class:!0});var Ts=a(It);k(Ss.$$.fragment,Ts),Uf=u(Ts),id=r(Ts,"P",{});var Ek=a(id);If=o(Ek,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Funnel"),Ek.forEach(t),xf=u(Ts),k(lo.$$.fragment,Ts),Wf=u(Ts),fn=r(Ts,"P",{});var Mi=a(fn);Zf=o(Mi,"If "),dd=r(Mi,"CODE",{});var jk=a(dd);qf=o(jk,"token_ids_1"),jk.forEach(t),Nf=o(Mi," is "),cd=r(Mi,"CODE",{});var zk=a(cd);Bf=o(zk,"None"),zk.forEach(t),Pf=o(Mi,", this method only returns the first portion of the mask (0s)."),Mi.forEach(t),Ts.forEach(t),Rf=u(kt),Bl=r(kt,"DIV",{class:!0});var Ck=a(Bl);k(Xs.$$.fragment,Ck),Ck.forEach(t),kt.forEach(t),ku=u(l),mn=r(l,"H2",{class:!0});var hp=a(mn);io=r(hp,"A",{id:!0,class:!0,href:!0});var Jk=a(io);ud=r(Jk,"SPAN",{});var Uk=a(ud);k(Ls.$$.fragment,Uk),Uk.forEach(t),Jk.forEach(t),Gf=u(hp),pd=r(hp,"SPAN",{});var Ik=a(pd);Vf=o(Ik,"FunnelTokenizerFast"),Ik.forEach(t),hp.forEach(t),Fu=u(l),gt=r(l,"DIV",{class:!0});var on=a(gt);k(Ds.$$.fragment,on),Af=u(on),Qs=r(on,"P",{});var fp=a(Qs);Sf=o(fp,"Construct a \u201Cfast\u201D Funnel Transformer tokenizer (backed by HuggingFace\u2019s "),hd=r(fp,"EM",{});var xk=a(hd);Xf=o(xk,"tokenizers"),xk.forEach(t),Lf=o(fp," library). Based on WordPiece."),fp.forEach(t),Df=u(on),Os=r(on,"P",{});var mp=a(Os);Qf=o(mp,"This tokenizer inherits from "),Pl=r(mp,"A",{href:!0});var Wk=a(Pl);Of=o(Wk,"PreTrainedTokenizerFast"),Wk.forEach(t),Yf=o(mp,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),mp.forEach(t),Hf=u(on),nn=r(on,"DIV",{class:!0});var $i=a(nn);k(Ys.$$.fragment,$i),Kf=u($i),fd=r($i,"P",{});var Zk=a(fd);em=o(Zk,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Funnel sequence has the following format:`),Zk.forEach(t),tm=u($i),Hs=r($i,"UL",{});var gp=a(Hs);Rl=r(gp,"LI",{});var ik=a(Rl);nm=o(ik,"single sequence: "),md=r(ik,"CODE",{});var qk=a(md);om=o(qk,"[CLS] X [SEP]"),qk.forEach(t),ik.forEach(t),sm=u(gp),Gl=r(gp,"LI",{});var dk=a(Gl);rm=o(dk,"pair of sequences: "),gd=r(dk,"CODE",{});var Nk=a(gd);am=o(Nk,"[CLS] A [SEP] B [SEP]"),Nk.forEach(t),dk.forEach(t),gp.forEach(t),$i.forEach(t),lm=u(on),xt=r(on,"DIV",{class:!0});var ws=a(xt);k(Ks.$$.fragment,ws),im=u(ws),_d=r(ws,"P",{});var Bk=a(_d);dm=o(Bk,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Funnel"),Bk.forEach(t),cm=u(ws),k(co.$$.fragment,ws),um=u(ws),gn=r(ws,"P",{});var Ei=a(gn);pm=o(Ei,"If "),bd=r(Ei,"CODE",{});var Pk=a(bd);hm=o(Pk,"token_ids_1"),Pk.forEach(t),fm=o(Ei," is "),yd=r(Ei,"CODE",{});var Rk=a(yd);mm=o(Rk,"None"),Rk.forEach(t),gm=o(Ei,", this method only returns the first portion of the mask (0s)."),Ei.forEach(t),ws.forEach(t),on.forEach(t),Mu=u(l),_n=r(l,"H2",{class:!0});var _p=a(_n);uo=r(_p,"A",{id:!0,class:!0,href:!0});var Gk=a(uo);Td=r(Gk,"SPAN",{});var Vk=a(Td);k(er.$$.fragment,Vk),Vk.forEach(t),Gk.forEach(t),_m=u(_p),wd=r(_p,"SPAN",{});var Ak=a(wd);bm=o(Ak,"Funnel specific outputs"),Ak.forEach(t),_p.forEach(t),$u=u(l),bn=r(l,"DIV",{class:!0});var bp=a(bn);k(tr.$$.fragment,bp),ym=u(bp),nr=r(bp,"P",{});var yp=a(nr);Tm=o(yp,"Output type of "),Vl=r(yp,"A",{href:!0});var Sk=a(Vl);wm=o(Sk,"FunnelForPreTraining"),Sk.forEach(t),vm=o(yp,"."),yp.forEach(t),bp.forEach(t),Eu=u(l),yn=r(l,"DIV",{class:!0});var Tp=a(yn);k(or.$$.fragment,Tp),km=u(Tp),sr=r(Tp,"P",{});var wp=a(sr);Fm=o(wp,"Output type of "),Al=r(wp,"A",{href:!0});var Xk=a(Al);Mm=o(Xk,"FunnelForPreTraining"),Xk.forEach(t),$m=o(wp,"."),wp.forEach(t),Tp.forEach(t),ju=u(l),Tn=r(l,"H2",{class:!0});var vp=a(Tn);po=r(vp,"A",{id:!0,class:!0,href:!0});var Lk=a(po);vd=r(Lk,"SPAN",{});var Dk=a(vd);k(rr.$$.fragment,Dk),Dk.forEach(t),Lk.forEach(t),Em=u(vp),kd=r(vp,"SPAN",{});var Qk=a(kd);jm=o(Qk,"FunnelBaseModel"),Qk.forEach(t),vp.forEach(t),zu=u(l),dt=r(l,"DIV",{class:!0});var Xt=a(dt);k(ar.$$.fragment,Xt),zm=u(Xt),Fd=r(Xt,"P",{});var Ok=a(Fd);Cm=o(Ok,`The base Funnel Transformer Model transformer outputting raw hidden-states without upsampling head (also called
decoder) or any task-specific head on top.`),Ok.forEach(t),Jm=u(Xt),lr=r(Xt,"P",{});var kp=a(lr);Um=o(kp,"The Funnel Transformer model was proposed in "),ir=r(kp,"A",{href:!0,rel:!0});var Yk=a(ir);Im=o(Yk,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),Yk.forEach(t),xm=o(kp," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),kp.forEach(t),Wm=u(Xt),dr=r(Xt,"P",{});var Fp=a(dr);Zm=o(Fp,"This model inherits from "),Sl=r(Fp,"A",{href:!0});var Hk=a(Sl);qm=o(Hk,"PreTrainedModel"),Hk.forEach(t),Nm=o(Fp,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Fp.forEach(t),Bm=u(Xt),cr=r(Xt,"P",{});var Mp=a(cr);Pm=o(Mp,"This model is also a PyTorch "),ur=r(Mp,"A",{href:!0,rel:!0});var Kk=a(ur);Rm=o(Kk,"torch.nn.Module"),Kk.forEach(t),Gm=o(Mp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Mp.forEach(t),Vm=u(Xt),Wt=r(Xt,"DIV",{class:!0});var vs=a(Wt);k(pr.$$.fragment,vs),Am=u(vs),wn=r(vs,"P",{});var ji=a(wn);Sm=o(ji,"The "),Xl=r(ji,"A",{href:!0});var eF=a(Xl);Xm=o(eF,"FunnelBaseModel"),eF.forEach(t),Lm=o(ji," forward method, overrides the "),Md=r(ji,"CODE",{});var tF=a(Md);Dm=o(tF,"__call__"),tF.forEach(t),Qm=o(ji," special method."),ji.forEach(t),Om=u(vs),k(ho.$$.fragment,vs),Ym=u(vs),k(fo.$$.fragment,vs),vs.forEach(t),Xt.forEach(t),Cu=u(l),vn=r(l,"H2",{class:!0});var $p=a(vn);mo=r($p,"A",{id:!0,class:!0,href:!0});var nF=a(mo);$d=r(nF,"SPAN",{});var oF=a($d);k(hr.$$.fragment,oF),oF.forEach(t),nF.forEach(t),Hm=u($p),Ed=r($p,"SPAN",{});var sF=a(Ed);Km=o(sF,"FunnelModel"),sF.forEach(t),$p.forEach(t),Ju=u(l),ct=r(l,"DIV",{class:!0});var Lt=a(ct);k(fr.$$.fragment,Lt),eg=u(Lt),jd=r(Lt,"P",{});var rF=a(jd);tg=o(rF,"The bare Funnel Transformer Model transformer outputting raw hidden-states without any specific head on top."),rF.forEach(t),ng=u(Lt),mr=r(Lt,"P",{});var Ep=a(mr);og=o(Ep,"The Funnel Transformer model was proposed in "),gr=r(Ep,"A",{href:!0,rel:!0});var aF=a(gr);sg=o(aF,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),aF.forEach(t),rg=o(Ep," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Ep.forEach(t),ag=u(Lt),_r=r(Lt,"P",{});var jp=a(_r);lg=o(jp,"This model inherits from "),Ll=r(jp,"A",{href:!0});var lF=a(Ll);ig=o(lF,"PreTrainedModel"),lF.forEach(t),dg=o(jp,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),jp.forEach(t),cg=u(Lt),br=r(Lt,"P",{});var zp=a(br);ug=o(zp,"This model is also a PyTorch "),yr=r(zp,"A",{href:!0,rel:!0});var iF=a(yr);pg=o(iF,"torch.nn.Module"),iF.forEach(t),hg=o(zp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),zp.forEach(t),fg=u(Lt),Zt=r(Lt,"DIV",{class:!0});var ks=a(Zt);k(Tr.$$.fragment,ks),mg=u(ks),kn=r(ks,"P",{});var zi=a(kn);gg=o(zi,"The "),Dl=r(zi,"A",{href:!0});var dF=a(Dl);_g=o(dF,"FunnelModel"),dF.forEach(t),bg=o(zi," forward method, overrides the "),zd=r(zi,"CODE",{});var cF=a(zd);yg=o(cF,"__call__"),cF.forEach(t),Tg=o(zi," special method."),zi.forEach(t),wg=u(ks),k(go.$$.fragment,ks),vg=u(ks),k(_o.$$.fragment,ks),ks.forEach(t),Lt.forEach(t),Uu=u(l),Fn=r(l,"H2",{class:!0});var Cp=a(Fn);bo=r(Cp,"A",{id:!0,class:!0,href:!0});var uF=a(bo);Cd=r(uF,"SPAN",{});var pF=a(Cd);k(wr.$$.fragment,pF),pF.forEach(t),uF.forEach(t),kg=u(Cp),Jd=r(Cp,"SPAN",{});var hF=a(Jd);Fg=o(hF,"FunnelModelForPreTraining"),hF.forEach(t),Cp.forEach(t),Iu=u(l),Mn=r(l,"DIV",{class:!0});var Jp=a(Mn);k(vr.$$.fragment,Jp),Mg=u(Jp),qt=r(Jp,"DIV",{class:!0});var Fs=a(qt);k(kr.$$.fragment,Fs),$g=u(Fs),$n=r(Fs,"P",{});var Ci=a($n);Eg=o(Ci,"The "),Ql=r(Ci,"A",{href:!0});var fF=a(Ql);jg=o(fF,"FunnelForPreTraining"),fF.forEach(t),zg=o(Ci," forward method, overrides the "),Ud=r(Ci,"CODE",{});var mF=a(Ud);Cg=o(mF,"__call__"),mF.forEach(t),Jg=o(Ci," special method."),Ci.forEach(t),Ug=u(Fs),k(yo.$$.fragment,Fs),Ig=u(Fs),k(To.$$.fragment,Fs),Fs.forEach(t),Jp.forEach(t),xu=u(l),En=r(l,"H2",{class:!0});var Up=a(En);wo=r(Up,"A",{id:!0,class:!0,href:!0});var gF=a(wo);Id=r(gF,"SPAN",{});var _F=a(Id);k(Fr.$$.fragment,_F),_F.forEach(t),gF.forEach(t),xg=u(Up),xd=r(Up,"SPAN",{});var bF=a(xd);Wg=o(bF,"FunnelForMaskedLM"),bF.forEach(t),Up.forEach(t),Wu=u(l),ut=r(l,"DIV",{class:!0});var Dt=a(ut);k(Mr.$$.fragment,Dt),Zg=u(Dt),$r=r(Dt,"P",{});var Ip=a($r);qg=o(Ip,"Funnel Transformer Model with a "),Wd=r(Ip,"CODE",{});var yF=a(Wd);Ng=o(yF,"language modeling"),yF.forEach(t),Bg=o(Ip," head on top."),Ip.forEach(t),Pg=u(Dt),Er=r(Dt,"P",{});var xp=a(Er);Rg=o(xp,"The Funnel Transformer model was proposed in "),jr=r(xp,"A",{href:!0,rel:!0});var TF=a(jr);Gg=o(TF,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),TF.forEach(t),Vg=o(xp," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),xp.forEach(t),Ag=u(Dt),zr=r(Dt,"P",{});var Wp=a(zr);Sg=o(Wp,"This model inherits from "),Ol=r(Wp,"A",{href:!0});var wF=a(Ol);Xg=o(wF,"PreTrainedModel"),wF.forEach(t),Lg=o(Wp,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Wp.forEach(t),Dg=u(Dt),Cr=r(Dt,"P",{});var Zp=a(Cr);Qg=o(Zp,"This model is also a PyTorch "),Jr=r(Zp,"A",{href:!0,rel:!0});var vF=a(Jr);Og=o(vF,"torch.nn.Module"),vF.forEach(t),Yg=o(Zp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Zp.forEach(t),Hg=u(Dt),Nt=r(Dt,"DIV",{class:!0});var Ms=a(Nt);k(Ur.$$.fragment,Ms),Kg=u(Ms),jn=r(Ms,"P",{});var Ji=a(jn);e_=o(Ji,"The "),Yl=r(Ji,"A",{href:!0});var kF=a(Yl);t_=o(kF,"FunnelForMaskedLM"),kF.forEach(t),n_=o(Ji," forward method, overrides the "),Zd=r(Ji,"CODE",{});var FF=a(Zd);o_=o(FF,"__call__"),FF.forEach(t),s_=o(Ji," special method."),Ji.forEach(t),r_=u(Ms),k(vo.$$.fragment,Ms),a_=u(Ms),k(ko.$$.fragment,Ms),Ms.forEach(t),Dt.forEach(t),Zu=u(l),zn=r(l,"H2",{class:!0});var qp=a(zn);Fo=r(qp,"A",{id:!0,class:!0,href:!0});var MF=a(Fo);qd=r(MF,"SPAN",{});var $F=a(qd);k(Ir.$$.fragment,$F),$F.forEach(t),MF.forEach(t),l_=u(qp),Nd=r(qp,"SPAN",{});var EF=a(Nd);i_=o(EF,"FunnelForSequenceClassification"),EF.forEach(t),qp.forEach(t),qu=u(l),pt=r(l,"DIV",{class:!0});var Qt=a(pt);k(xr.$$.fragment,Qt),d_=u(Qt),Bd=r(Qt,"P",{});var jF=a(Bd);c_=o(jF,`Funnel Transformer Model with a sequence classification/regression head on top (two linear layer on top of the
first timestep of the last hidden state) e.g. for GLUE tasks.`),jF.forEach(t),u_=u(Qt),Wr=r(Qt,"P",{});var Np=a(Wr);p_=o(Np,"The Funnel Transformer model was proposed in "),Zr=r(Np,"A",{href:!0,rel:!0});var zF=a(Zr);h_=o(zF,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),zF.forEach(t),f_=o(Np," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Np.forEach(t),m_=u(Qt),qr=r(Qt,"P",{});var Bp=a(qr);g_=o(Bp,"This model inherits from "),Hl=r(Bp,"A",{href:!0});var CF=a(Hl);__=o(CF,"PreTrainedModel"),CF.forEach(t),b_=o(Bp,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Bp.forEach(t),y_=u(Qt),Nr=r(Qt,"P",{});var Pp=a(Nr);T_=o(Pp,"This model is also a PyTorch "),Br=r(Pp,"A",{href:!0,rel:!0});var JF=a(Br);w_=o(JF,"torch.nn.Module"),JF.forEach(t),v_=o(Pp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Pp.forEach(t),k_=u(Qt),bt=r(Qt,"DIV",{class:!0});var sn=a(bt);k(Pr.$$.fragment,sn),F_=u(sn),Cn=r(sn,"P",{});var Ui=a(Cn);M_=o(Ui,"The "),Kl=r(Ui,"A",{href:!0});var UF=a(Kl);$_=o(UF,"FunnelForSequenceClassification"),UF.forEach(t),E_=o(Ui," forward method, overrides the "),Pd=r(Ui,"CODE",{});var IF=a(Pd);j_=o(IF,"__call__"),IF.forEach(t),z_=o(Ui," special method."),Ui.forEach(t),C_=u(sn),k(Mo.$$.fragment,sn),J_=u(sn),k($o.$$.fragment,sn),U_=u(sn),k(Eo.$$.fragment,sn),sn.forEach(t),Qt.forEach(t),Nu=u(l),Jn=r(l,"H2",{class:!0});var Rp=a(Jn);jo=r(Rp,"A",{id:!0,class:!0,href:!0});var xF=a(jo);Rd=r(xF,"SPAN",{});var WF=a(Rd);k(Rr.$$.fragment,WF),WF.forEach(t),xF.forEach(t),I_=u(Rp),Gd=r(Rp,"SPAN",{});var ZF=a(Gd);x_=o(ZF,"FunnelForMultipleChoice"),ZF.forEach(t),Rp.forEach(t),Bu=u(l),ht=r(l,"DIV",{class:!0});var Ot=a(ht);k(Gr.$$.fragment,Ot),W_=u(Ot),Vd=r(Ot,"P",{});var qF=a(Vd);Z_=o(qF,`Funnel Transformer Model with a multiple choice classification head on top (two linear layer on top of the first
timestep of the last hidden state, and a softmax) e.g. for RocStories/SWAG tasks.`),qF.forEach(t),q_=u(Ot),Vr=r(Ot,"P",{});var Gp=a(Vr);N_=o(Gp,"The Funnel Transformer model was proposed in "),Ar=r(Gp,"A",{href:!0,rel:!0});var NF=a(Ar);B_=o(NF,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),NF.forEach(t),P_=o(Gp," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Gp.forEach(t),R_=u(Ot),Sr=r(Ot,"P",{});var Vp=a(Sr);G_=o(Vp,"This model inherits from "),ei=r(Vp,"A",{href:!0});var BF=a(ei);V_=o(BF,"PreTrainedModel"),BF.forEach(t),A_=o(Vp,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Vp.forEach(t),S_=u(Ot),Xr=r(Ot,"P",{});var Ap=a(Xr);X_=o(Ap,"This model is also a PyTorch "),Lr=r(Ap,"A",{href:!0,rel:!0});var PF=a(Lr);L_=o(PF,"torch.nn.Module"),PF.forEach(t),D_=o(Ap,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ap.forEach(t),Q_=u(Ot),Bt=r(Ot,"DIV",{class:!0});var $s=a(Bt);k(Dr.$$.fragment,$s),O_=u($s),Un=r($s,"P",{});var Ii=a(Un);Y_=o(Ii,"The "),ti=r(Ii,"A",{href:!0});var RF=a(ti);H_=o(RF,"FunnelForMultipleChoice"),RF.forEach(t),K_=o(Ii," forward method, overrides the "),Ad=r(Ii,"CODE",{});var GF=a(Ad);eb=o(GF,"__call__"),GF.forEach(t),tb=o(Ii," special method."),Ii.forEach(t),nb=u($s),k(zo.$$.fragment,$s),ob=u($s),k(Co.$$.fragment,$s),$s.forEach(t),Ot.forEach(t),Pu=u(l),In=r(l,"H2",{class:!0});var Sp=a(In);Jo=r(Sp,"A",{id:!0,class:!0,href:!0});var VF=a(Jo);Sd=r(VF,"SPAN",{});var AF=a(Sd);k(Qr.$$.fragment,AF),AF.forEach(t),VF.forEach(t),sb=u(Sp),Xd=r(Sp,"SPAN",{});var SF=a(Xd);rb=o(SF,"FunnelForTokenClassification"),SF.forEach(t),Sp.forEach(t),Ru=u(l),ft=r(l,"DIV",{class:!0});var Yt=a(ft);k(Or.$$.fragment,Yt),ab=u(Yt),Ld=r(Yt,"P",{});var XF=a(Ld);lb=o(XF,`Funnel Transformer Model with a token classification head on top (a linear layer on top of the hidden-states
output) e.g. for Named-Entity-Recognition (NER) tasks.`),XF.forEach(t),ib=u(Yt),Yr=r(Yt,"P",{});var Xp=a(Yr);db=o(Xp,"The Funnel Transformer model was proposed in "),Hr=r(Xp,"A",{href:!0,rel:!0});var LF=a(Hr);cb=o(LF,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),LF.forEach(t),ub=o(Xp," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Xp.forEach(t),pb=u(Yt),Kr=r(Yt,"P",{});var Lp=a(Kr);hb=o(Lp,"This model inherits from "),ni=r(Lp,"A",{href:!0});var DF=a(ni);fb=o(DF,"PreTrainedModel"),DF.forEach(t),mb=o(Lp,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Lp.forEach(t),gb=u(Yt),ea=r(Yt,"P",{});var Dp=a(ea);_b=o(Dp,"This model is also a PyTorch "),ta=r(Dp,"A",{href:!0,rel:!0});var QF=a(ta);bb=o(QF,"torch.nn.Module"),QF.forEach(t),yb=o(Dp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Dp.forEach(t),Tb=u(Yt),Pt=r(Yt,"DIV",{class:!0});var Es=a(Pt);k(na.$$.fragment,Es),wb=u(Es),xn=r(Es,"P",{});var xi=a(xn);vb=o(xi,"The "),oi=r(xi,"A",{href:!0});var OF=a(oi);kb=o(OF,"FunnelForTokenClassification"),OF.forEach(t),Fb=o(xi," forward method, overrides the "),Dd=r(xi,"CODE",{});var YF=a(Dd);Mb=o(YF,"__call__"),YF.forEach(t),$b=o(xi," special method."),xi.forEach(t),Eb=u(Es),k(Uo.$$.fragment,Es),jb=u(Es),k(Io.$$.fragment,Es),Es.forEach(t),Yt.forEach(t),Gu=u(l),Wn=r(l,"H2",{class:!0});var Qp=a(Wn);xo=r(Qp,"A",{id:!0,class:!0,href:!0});var HF=a(xo);Qd=r(HF,"SPAN",{});var KF=a(Qd);k(oa.$$.fragment,KF),KF.forEach(t),HF.forEach(t),zb=u(Qp),Od=r(Qp,"SPAN",{});var e0=a(Od);Cb=o(e0,"FunnelForQuestionAnswering"),e0.forEach(t),Qp.forEach(t),Vu=u(l),mt=r(l,"DIV",{class:!0});var Ht=a(mt);k(sa.$$.fragment,Ht),Jb=u(Ht),Zn=r(Ht,"P",{});var Wi=a(Zn);Ub=o(Wi,`Funnel Transformer Model with a span classification head on top for extractive question-answering tasks like SQuAD
(a linear layer on top of the hidden-states output to compute `),Yd=r(Wi,"CODE",{});var t0=a(Yd);Ib=o(t0,"span start logits"),t0.forEach(t),xb=o(Wi," and "),Hd=r(Wi,"CODE",{});var n0=a(Hd);Wb=o(n0,"span end logits"),n0.forEach(t),Zb=o(Wi,")."),Wi.forEach(t),qb=u(Ht),ra=r(Ht,"P",{});var Op=a(ra);Nb=o(Op,"The Funnel Transformer model was proposed in "),aa=r(Op,"A",{href:!0,rel:!0});var o0=a(aa);Bb=o(o0,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),o0.forEach(t),Pb=o(Op," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Op.forEach(t),Rb=u(Ht),la=r(Ht,"P",{});var Yp=a(la);Gb=o(Yp,"This model inherits from "),si=r(Yp,"A",{href:!0});var s0=a(si);Vb=o(s0,"PreTrainedModel"),s0.forEach(t),Ab=o(Yp,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Yp.forEach(t),Sb=u(Ht),ia=r(Ht,"P",{});var Hp=a(ia);Xb=o(Hp,"This model is also a PyTorch "),da=r(Hp,"A",{href:!0,rel:!0});var r0=a(da);Lb=o(r0,"torch.nn.Module"),r0.forEach(t),Db=o(Hp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Hp.forEach(t),Qb=u(Ht),Rt=r(Ht,"DIV",{class:!0});var js=a(Rt);k(ca.$$.fragment,js),Ob=u(js),qn=r(js,"P",{});var Zi=a(qn);Yb=o(Zi,"The "),ri=r(Zi,"A",{href:!0});var a0=a(ri);Hb=o(a0,"FunnelForQuestionAnswering"),a0.forEach(t),Kb=o(Zi," forward method, overrides the "),Kd=r(Zi,"CODE",{});var l0=a(Kd);ey=o(l0,"__call__"),l0.forEach(t),ty=o(Zi," special method."),Zi.forEach(t),ny=u(js),k(Wo.$$.fragment,js),oy=u(js),k(Zo.$$.fragment,js),js.forEach(t),Ht.forEach(t),Au=u(l),Nn=r(l,"H2",{class:!0});var Kp=a(Nn);qo=r(Kp,"A",{id:!0,class:!0,href:!0});var i0=a(qo);ec=r(i0,"SPAN",{});var d0=a(ec);k(ua.$$.fragment,d0),d0.forEach(t),i0.forEach(t),sy=u(Kp),tc=r(Kp,"SPAN",{});var c0=a(tc);ry=o(c0,"TFFunnelBaseModel"),c0.forEach(t),Kp.forEach(t),Su=u(l),tt=r(l,"DIV",{class:!0});var Ft=a(tt);k(pa.$$.fragment,Ft),ay=u(Ft),nc=r(Ft,"P",{});var u0=a(nc);ly=o(u0,`The base Funnel Transformer Model transformer outputting raw hidden-states without upsampling head (also called
decoder) or any task-specific head on top.`),u0.forEach(t),iy=u(Ft),ha=r(Ft,"P",{});var eh=a(ha);dy=o(eh,"The Funnel Transformer model was proposed in "),fa=r(eh,"A",{href:!0,rel:!0});var p0=a(fa);cy=o(p0,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),p0.forEach(t),uy=o(eh," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),eh.forEach(t),py=u(Ft),ma=r(Ft,"P",{});var th=a(ma);hy=o(th,"This model inherits from "),ai=r(th,"A",{href:!0});var h0=a(ai);fy=o(h0,"TFPreTrainedModel"),h0.forEach(t),my=o(th,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),th.forEach(t),gy=u(Ft),ga=r(Ft,"P",{});var nh=a(ga);_y=o(nh,"This model is also a "),_a=r(nh,"A",{href:!0,rel:!0});var f0=a(_a);by=o(f0,"tf.keras.Model"),f0.forEach(t),yy=o(nh,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),nh.forEach(t),Ty=u(Ft),k(No.$$.fragment,Ft),wy=u(Ft),Gt=r(Ft,"DIV",{class:!0});var zs=a(Gt);k(ba.$$.fragment,zs),vy=u(zs),Bn=r(zs,"P",{});var qi=a(Bn);ky=o(qi,"The "),li=r(qi,"A",{href:!0});var m0=a(li);Fy=o(m0,"TFFunnelBaseModel"),m0.forEach(t),My=o(qi," forward method, overrides the "),oc=r(qi,"CODE",{});var g0=a(oc);$y=o(g0,"__call__"),g0.forEach(t),Ey=o(qi," special method."),qi.forEach(t),jy=u(zs),k(Bo.$$.fragment,zs),zy=u(zs),k(Po.$$.fragment,zs),zs.forEach(t),Ft.forEach(t),Xu=u(l),Pn=r(l,"H2",{class:!0});var oh=a(Pn);Ro=r(oh,"A",{id:!0,class:!0,href:!0});var _0=a(Ro);sc=r(_0,"SPAN",{});var b0=a(sc);k(ya.$$.fragment,b0),b0.forEach(t),_0.forEach(t),Cy=u(oh),rc=r(oh,"SPAN",{});var y0=a(rc);Jy=o(y0,"TFFunnelModel"),y0.forEach(t),oh.forEach(t),Lu=u(l),nt=r(l,"DIV",{class:!0});var Mt=a(nt);k(Ta.$$.fragment,Mt),Uy=u(Mt),ac=r(Mt,"P",{});var T0=a(ac);Iy=o(T0,"The bare Funnel Transformer Model transformer outputting raw hidden-states without any specific head on top."),T0.forEach(t),xy=u(Mt),wa=r(Mt,"P",{});var sh=a(wa);Wy=o(sh,"The Funnel Transformer model was proposed in "),va=r(sh,"A",{href:!0,rel:!0});var w0=a(va);Zy=o(w0,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),w0.forEach(t),qy=o(sh," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),sh.forEach(t),Ny=u(Mt),ka=r(Mt,"P",{});var rh=a(ka);By=o(rh,"This model inherits from "),ii=r(rh,"A",{href:!0});var v0=a(ii);Py=o(v0,"TFPreTrainedModel"),v0.forEach(t),Ry=o(rh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),rh.forEach(t),Gy=u(Mt),Fa=r(Mt,"P",{});var ah=a(Fa);Vy=o(ah,"This model is also a "),Ma=r(ah,"A",{href:!0,rel:!0});var k0=a(Ma);Ay=o(k0,"tf.keras.Model"),k0.forEach(t),Sy=o(ah,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),ah.forEach(t),Xy=u(Mt),k(Go.$$.fragment,Mt),Ly=u(Mt),Vt=r(Mt,"DIV",{class:!0});var Cs=a(Vt);k($a.$$.fragment,Cs),Dy=u(Cs),Rn=r(Cs,"P",{});var Ni=a(Rn);Qy=o(Ni,"The "),di=r(Ni,"A",{href:!0});var F0=a(di);Oy=o(F0,"TFFunnelModel"),F0.forEach(t),Yy=o(Ni," forward method, overrides the "),lc=r(Ni,"CODE",{});var M0=a(lc);Hy=o(M0,"__call__"),M0.forEach(t),Ky=o(Ni," special method."),Ni.forEach(t),eT=u(Cs),k(Vo.$$.fragment,Cs),tT=u(Cs),k(Ao.$$.fragment,Cs),Cs.forEach(t),Mt.forEach(t),Du=u(l),Gn=r(l,"H2",{class:!0});var lh=a(Gn);So=r(lh,"A",{id:!0,class:!0,href:!0});var $0=a(So);ic=r($0,"SPAN",{});var E0=a(ic);k(Ea.$$.fragment,E0),E0.forEach(t),$0.forEach(t),nT=u(lh),dc=r(lh,"SPAN",{});var j0=a(dc);oT=o(j0,"TFFunnelModelForPreTraining"),j0.forEach(t),lh.forEach(t),Qu=u(l),ot=r(l,"DIV",{class:!0});var $t=a(ot);k(ja.$$.fragment,$t),sT=u($t),cc=r($t,"P",{});var z0=a(cc);rT=o(z0,"Funnel model with a binary classification head on top as used during pretraining for identifying generated tokens."),z0.forEach(t),aT=u($t),za=r($t,"P",{});var ih=a(za);lT=o(ih,"The Funnel Transformer model was proposed in "),Ca=r(ih,"A",{href:!0,rel:!0});var C0=a(Ca);iT=o(C0,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),C0.forEach(t),dT=o(ih," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),ih.forEach(t),cT=u($t),Ja=r($t,"P",{});var dh=a(Ja);uT=o(dh,"This model inherits from "),ci=r(dh,"A",{href:!0});var J0=a(ci);pT=o(J0,"TFPreTrainedModel"),J0.forEach(t),hT=o(dh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),dh.forEach(t),fT=u($t),Ua=r($t,"P",{});var ch=a(Ua);mT=o(ch,"This model is also a "),Ia=r(ch,"A",{href:!0,rel:!0});var U0=a(Ia);gT=o(U0,"tf.keras.Model"),U0.forEach(t),_T=o(ch,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),ch.forEach(t),bT=u($t),k(Xo.$$.fragment,$t),yT=u($t),At=r($t,"DIV",{class:!0});var Js=a(At);k(xa.$$.fragment,Js),TT=u(Js),Vn=r(Js,"P",{});var Bi=a(Vn);wT=o(Bi,"The "),ui=r(Bi,"A",{href:!0});var I0=a(ui);vT=o(I0,"TFFunnelForPreTraining"),I0.forEach(t),kT=o(Bi," forward method, overrides the "),uc=r(Bi,"CODE",{});var x0=a(uc);FT=o(x0,"__call__"),x0.forEach(t),MT=o(Bi," special method."),Bi.forEach(t),$T=u(Js),k(Lo.$$.fragment,Js),ET=u(Js),k(Do.$$.fragment,Js),Js.forEach(t),$t.forEach(t),Ou=u(l),An=r(l,"H2",{class:!0});var uh=a(An);Qo=r(uh,"A",{id:!0,class:!0,href:!0});var W0=a(Qo);pc=r(W0,"SPAN",{});var Z0=a(pc);k(Wa.$$.fragment,Z0),Z0.forEach(t),W0.forEach(t),jT=u(uh),hc=r(uh,"SPAN",{});var q0=a(hc);zT=o(q0,"TFFunnelForMaskedLM"),q0.forEach(t),uh.forEach(t),Yu=u(l),st=r(l,"DIV",{class:!0});var Et=a(st);k(Za.$$.fragment,Et),CT=u(Et),qa=r(Et,"P",{});var ph=a(qa);JT=o(ph,"Funnel Model with a "),fc=r(ph,"CODE",{});var N0=a(fc);UT=o(N0,"language modeling"),N0.forEach(t),IT=o(ph," head on top."),ph.forEach(t),xT=u(Et),Na=r(Et,"P",{});var hh=a(Na);WT=o(hh,"The Funnel Transformer model was proposed in "),Ba=r(hh,"A",{href:!0,rel:!0});var B0=a(Ba);ZT=o(B0,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),B0.forEach(t),qT=o(hh," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),hh.forEach(t),NT=u(Et),Pa=r(Et,"P",{});var fh=a(Pa);BT=o(fh,"This model inherits from "),pi=r(fh,"A",{href:!0});var P0=a(pi);PT=o(P0,"TFPreTrainedModel"),P0.forEach(t),RT=o(fh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),fh.forEach(t),GT=u(Et),Ra=r(Et,"P",{});var mh=a(Ra);VT=o(mh,"This model is also a "),Ga=r(mh,"A",{href:!0,rel:!0});var R0=a(Ga);AT=o(R0,"tf.keras.Model"),R0.forEach(t),ST=o(mh,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),mh.forEach(t),XT=u(Et),k(Oo.$$.fragment,Et),LT=u(Et),yt=r(Et,"DIV",{class:!0});var rn=a(yt);k(Va.$$.fragment,rn),DT=u(rn),Sn=r(rn,"P",{});var Pi=a(Sn);QT=o(Pi,"The "),hi=r(Pi,"A",{href:!0});var G0=a(hi);OT=o(G0,"TFFunnelForMaskedLM"),G0.forEach(t),YT=o(Pi," forward method, overrides the "),mc=r(Pi,"CODE",{});var V0=a(mc);HT=o(V0,"__call__"),V0.forEach(t),KT=o(Pi," special method."),Pi.forEach(t),ew=u(rn),k(Yo.$$.fragment,rn),tw=u(rn),k(Ho.$$.fragment,rn),nw=u(rn),k(Ko.$$.fragment,rn),rn.forEach(t),Et.forEach(t),Hu=u(l),Xn=r(l,"H2",{class:!0});var gh=a(Xn);es=r(gh,"A",{id:!0,class:!0,href:!0});var A0=a(es);gc=r(A0,"SPAN",{});var S0=a(gc);k(Aa.$$.fragment,S0),S0.forEach(t),A0.forEach(t),ow=u(gh),_c=r(gh,"SPAN",{});var X0=a(_c);sw=o(X0,"TFFunnelForSequenceClassification"),X0.forEach(t),gh.forEach(t),Ku=u(l),rt=r(l,"DIV",{class:!0});var jt=a(rt);k(Sa.$$.fragment,jt),rw=u(jt),bc=r(jt,"P",{});var L0=a(bc);aw=o(L0,`Funnel Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),L0.forEach(t),lw=u(jt),Xa=r(jt,"P",{});var _h=a(Xa);iw=o(_h,"The Funnel Transformer model was proposed in "),La=r(_h,"A",{href:!0,rel:!0});var D0=a(La);dw=o(D0,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),D0.forEach(t),cw=o(_h," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),_h.forEach(t),uw=u(jt),Da=r(jt,"P",{});var bh=a(Da);pw=o(bh,"This model inherits from "),fi=r(bh,"A",{href:!0});var Q0=a(fi);hw=o(Q0,"TFPreTrainedModel"),Q0.forEach(t),fw=o(bh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),bh.forEach(t),mw=u(jt),Qa=r(jt,"P",{});var yh=a(Qa);gw=o(yh,"This model is also a "),Oa=r(yh,"A",{href:!0,rel:!0});var O0=a(Oa);_w=o(O0,"tf.keras.Model"),O0.forEach(t),bw=o(yh,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),yh.forEach(t),yw=u(jt),k(ts.$$.fragment,jt),Tw=u(jt),Tt=r(jt,"DIV",{class:!0});var an=a(Tt);k(Ya.$$.fragment,an),ww=u(an),Ln=r(an,"P",{});var Ri=a(Ln);vw=o(Ri,"The "),mi=r(Ri,"A",{href:!0});var Y0=a(mi);kw=o(Y0,"TFFunnelForSequenceClassification"),Y0.forEach(t),Fw=o(Ri," forward method, overrides the "),yc=r(Ri,"CODE",{});var H0=a(yc);Mw=o(H0,"__call__"),H0.forEach(t),$w=o(Ri," special method."),Ri.forEach(t),Ew=u(an),k(ns.$$.fragment,an),jw=u(an),k(os.$$.fragment,an),zw=u(an),k(ss.$$.fragment,an),an.forEach(t),jt.forEach(t),ep=u(l),Dn=r(l,"H2",{class:!0});var Th=a(Dn);rs=r(Th,"A",{id:!0,class:!0,href:!0});var K0=a(rs);Tc=r(K0,"SPAN",{});var eM=a(Tc);k(Ha.$$.fragment,eM),eM.forEach(t),K0.forEach(t),Cw=u(Th),wc=r(Th,"SPAN",{});var tM=a(wc);Jw=o(tM,"TFFunnelForMultipleChoice"),tM.forEach(t),Th.forEach(t),tp=u(l),at=r(l,"DIV",{class:!0});var zt=a(at);k(Ka.$$.fragment,zt),Uw=u(zt),vc=r(zt,"P",{});var nM=a(vc);Iw=o(nM,`Funnel Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),nM.forEach(t),xw=u(zt),el=r(zt,"P",{});var wh=a(el);Ww=o(wh,"The Funnel Transformer model was proposed in "),tl=r(wh,"A",{href:!0,rel:!0});var oM=a(tl);Zw=o(oM,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),oM.forEach(t),qw=o(wh," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),wh.forEach(t),Nw=u(zt),nl=r(zt,"P",{});var vh=a(nl);Bw=o(vh,"This model inherits from "),gi=r(vh,"A",{href:!0});var sM=a(gi);Pw=o(sM,"TFPreTrainedModel"),sM.forEach(t),Rw=o(vh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),vh.forEach(t),Gw=u(zt),ol=r(zt,"P",{});var kh=a(ol);Vw=o(kh,"This model is also a "),sl=r(kh,"A",{href:!0,rel:!0});var rM=a(sl);Aw=o(rM,"tf.keras.Model"),rM.forEach(t),Sw=o(kh,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),kh.forEach(t),Xw=u(zt),k(as.$$.fragment,zt),Lw=u(zt),St=r(zt,"DIV",{class:!0});var Us=a(St);k(rl.$$.fragment,Us),Dw=u(Us),Qn=r(Us,"P",{});var Gi=a(Qn);Qw=o(Gi,"The "),_i=r(Gi,"A",{href:!0});var aM=a(_i);Ow=o(aM,"TFFunnelForMultipleChoice"),aM.forEach(t),Yw=o(Gi," forward method, overrides the "),kc=r(Gi,"CODE",{});var lM=a(kc);Hw=o(lM,"__call__"),lM.forEach(t),Kw=o(Gi," special method."),Gi.forEach(t),ev=u(Us),k(ls.$$.fragment,Us),tv=u(Us),k(is.$$.fragment,Us),Us.forEach(t),zt.forEach(t),np=u(l),On=r(l,"H2",{class:!0});var Fh=a(On);ds=r(Fh,"A",{id:!0,class:!0,href:!0});var iM=a(ds);Fc=r(iM,"SPAN",{});var dM=a(Fc);k(al.$$.fragment,dM),dM.forEach(t),iM.forEach(t),nv=u(Fh),Mc=r(Fh,"SPAN",{});var cM=a(Mc);ov=o(cM,"TFFunnelForTokenClassification"),cM.forEach(t),Fh.forEach(t),op=u(l),lt=r(l,"DIV",{class:!0});var Ct=a(lt);k(ll.$$.fragment,Ct),sv=u(Ct),$c=r(Ct,"P",{});var uM=a($c);rv=o(uM,`Funnel Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),uM.forEach(t),av=u(Ct),il=r(Ct,"P",{});var Mh=a(il);lv=o(Mh,"The Funnel Transformer model was proposed in "),dl=r(Mh,"A",{href:!0,rel:!0});var pM=a(dl);iv=o(pM,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),pM.forEach(t),dv=o(Mh," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Mh.forEach(t),cv=u(Ct),cl=r(Ct,"P",{});var $h=a(cl);uv=o($h,"This model inherits from "),bi=r($h,"A",{href:!0});var hM=a(bi);pv=o(hM,"TFPreTrainedModel"),hM.forEach(t),hv=o($h,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),$h.forEach(t),fv=u(Ct),ul=r(Ct,"P",{});var Eh=a(ul);mv=o(Eh,"This model is also a "),pl=r(Eh,"A",{href:!0,rel:!0});var fM=a(pl);gv=o(fM,"tf.keras.Model"),fM.forEach(t),_v=o(Eh,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Eh.forEach(t),bv=u(Ct),k(cs.$$.fragment,Ct),yv=u(Ct),wt=r(Ct,"DIV",{class:!0});var ln=a(wt);k(hl.$$.fragment,ln),Tv=u(ln),Yn=r(ln,"P",{});var Vi=a(Yn);wv=o(Vi,"The "),yi=r(Vi,"A",{href:!0});var mM=a(yi);vv=o(mM,"TFFunnelForTokenClassification"),mM.forEach(t),kv=o(Vi," forward method, overrides the "),Ec=r(Vi,"CODE",{});var gM=a(Ec);Fv=o(gM,"__call__"),gM.forEach(t),Mv=o(Vi," special method."),Vi.forEach(t),$v=u(ln),k(us.$$.fragment,ln),Ev=u(ln),k(ps.$$.fragment,ln),jv=u(ln),k(hs.$$.fragment,ln),ln.forEach(t),Ct.forEach(t),sp=u(l),Hn=r(l,"H2",{class:!0});var jh=a(Hn);fs=r(jh,"A",{id:!0,class:!0,href:!0});var _M=a(fs);jc=r(_M,"SPAN",{});var bM=a(jc);k(fl.$$.fragment,bM),bM.forEach(t),_M.forEach(t),zv=u(jh),zc=r(jh,"SPAN",{});var yM=a(zc);Cv=o(yM,"TFFunnelForQuestionAnswering"),yM.forEach(t),jh.forEach(t),rp=u(l),it=r(l,"DIV",{class:!0});var Jt=a(it);k(ml.$$.fragment,Jt),Jv=u(Jt),Kn=r(Jt,"P",{});var Ai=a(Kn);Uv=o(Ai,`Funnel Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Cc=r(Ai,"CODE",{});var TM=a(Cc);Iv=o(TM,"span start logits"),TM.forEach(t),xv=o(Ai," and "),Jc=r(Ai,"CODE",{});var wM=a(Jc);Wv=o(wM,"span end logits"),wM.forEach(t),Zv=o(Ai,")."),Ai.forEach(t),qv=u(Jt),gl=r(Jt,"P",{});var zh=a(gl);Nv=o(zh,"The Funnel Transformer model was proposed in "),_l=r(zh,"A",{href:!0,rel:!0});var vM=a(_l);Bv=o(vM,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),vM.forEach(t),Pv=o(zh," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),zh.forEach(t),Rv=u(Jt),bl=r(Jt,"P",{});var Ch=a(bl);Gv=o(Ch,"This model inherits from "),Ti=r(Ch,"A",{href:!0});var kM=a(Ti);Vv=o(kM,"TFPreTrainedModel"),kM.forEach(t),Av=o(Ch,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ch.forEach(t),Sv=u(Jt),yl=r(Jt,"P",{});var Jh=a(yl);Xv=o(Jh,"This model is also a "),Tl=r(Jh,"A",{href:!0,rel:!0});var FM=a(Tl);Lv=o(FM,"tf.keras.Model"),FM.forEach(t),Dv=o(Jh,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Jh.forEach(t),Qv=u(Jt),k(ms.$$.fragment,Jt),Ov=u(Jt),vt=r(Jt,"DIV",{class:!0});var dn=a(vt);k(wl.$$.fragment,dn),Yv=u(dn),eo=r(dn,"P",{});var Si=a(eo);Hv=o(Si,"The "),wi=r(Si,"A",{href:!0});var MM=a(wi);Kv=o(MM,"TFFunnelForQuestionAnswering"),MM.forEach(t),ek=o(Si," forward method, overrides the "),Uc=r(Si,"CODE",{});var $M=a(Uc);tk=o($M,"__call__"),$M.forEach(t),nk=o(Si," special method."),Si.forEach(t),ok=u(dn),k(gs.$$.fragment,dn),sk=u(dn),k(_s.$$.fragment,dn),rk=u(dn),k(bs.$$.fragment,dn),dn.forEach(t),Jt.forEach(t),this.h()},h(){f(d,"name","hf:doc:metadata"),f(d,"content",JSON.stringify(E1)),f(m,"id","funnel-transformer"),f(m,"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"),f(m,"href","#funnel-transformer"),f(h,"class","relative group"),f(K,"alt","Models"),EM(K.src,w="https://img.shields.io/badge/All_model_pages-funnel-blueviolet")||f(K,"src",w),f(ce,"href","https://huggingface.co/models?filter=funnel"),f(ue,"alt","Spaces"),EM(ue.src,Ie="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||f(ue,"src",Ie),f(G,"href","https://huggingface.co/spaces/docs-demos/funnel-transformer-small"),f(P,"class","flex flex-wrap space-x-1"),f(le,"id","overview"),f(le,"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"),f(le,"href","#overview"),f(ae,"class","relative group"),f(de,"href","https://arxiv.org/abs/2006.03236"),f(de,"rel","nofollow"),f(ee,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelModel"),f(Z,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelForPreTraining"),f(g,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelForMaskedLM"),f(te,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelForTokenClassification"),f(z,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelForQuestionAnswering"),f(xe,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelBaseModel"),f(N,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelForSequenceClassification"),f(We,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelForMultipleChoice"),f(H,"href","https://huggingface.co/sgugger"),f(H,"rel","nofollow"),f(Is,"href","https://github.com/laiguokun/Funnel-Transformer"),f(Is,"rel","nofollow"),f(oo,"id","documentation-resources"),f(oo,"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"),f(oo,"href","#documentation-resources"),f(cn,"class","relative group"),f(El,"href","../tasks/sequence_classification"),f(jl,"href","../tasks/token_classification"),f(zl,"href","../tasks/question_answering"),f(Cl,"href","../tasks/masked_language_modeling"),f(Jl,"href","../tasks/multiple_choice"),f(so,"id","transformers.FunnelConfig"),f(so,"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"),f(so,"href","#transformers.FunnelConfig"),f(un,"class","relative group"),f(Ul,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelModel"),f(Il,"href","/docs/transformers/v4.30.0/en/model_doc/bert#transformers.TFBertModel"),f(qs,"href","https://huggingface.co/funnel-transformer/small"),f(qs,"rel","nofollow"),f(xl,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),f(Wl,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),f(Kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ro,"id","transformers.FunnelTokenizer"),f(ro,"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"),f(ro,"href","#transformers.FunnelTokenizer"),f(hn,"class","relative group"),f(Zl,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),f(tn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ao,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(It,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Bl,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(io,"id","transformers.FunnelTokenizerFast"),f(io,"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"),f(io,"href","#transformers.FunnelTokenizerFast"),f(mn,"class","relative group"),f(Pl,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),f(nn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(uo,"id","transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput"),f(uo,"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"),f(uo,"href","#transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput"),f(_n,"class","relative group"),f(Vl,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelForPreTraining"),f(bn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Al,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelForPreTraining"),f(yn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(po,"id","transformers.FunnelBaseModel"),f(po,"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"),f(po,"href","#transformers.FunnelBaseModel"),f(Tn,"class","relative group"),f(ir,"href","https://arxiv.org/abs/2006.03236"),f(ir,"rel","nofollow"),f(Sl,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),f(ur,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(ur,"rel","nofollow"),f(Xl,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelBaseModel"),f(Wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(mo,"id","transformers.FunnelModel"),f(mo,"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"),f(mo,"href","#transformers.FunnelModel"),f(vn,"class","relative group"),f(gr,"href","https://arxiv.org/abs/2006.03236"),f(gr,"rel","nofollow"),f(Ll,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),f(yr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(yr,"rel","nofollow"),f(Dl,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelModel"),f(Zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(bo,"id","transformers.FunnelForPreTraining"),f(bo,"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"),f(bo,"href","#transformers.FunnelForPreTraining"),f(Fn,"class","relative group"),f(Ql,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelForPreTraining"),f(qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Mn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(wo,"id","transformers.FunnelForMaskedLM"),f(wo,"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"),f(wo,"href","#transformers.FunnelForMaskedLM"),f(En,"class","relative group"),f(jr,"href","https://arxiv.org/abs/2006.03236"),f(jr,"rel","nofollow"),f(Ol,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),f(Jr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Jr,"rel","nofollow"),f(Yl,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelForMaskedLM"),f(Nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Fo,"id","transformers.FunnelForSequenceClassification"),f(Fo,"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"),f(Fo,"href","#transformers.FunnelForSequenceClassification"),f(zn,"class","relative group"),f(Zr,"href","https://arxiv.org/abs/2006.03236"),f(Zr,"rel","nofollow"),f(Hl,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),f(Br,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Br,"rel","nofollow"),f(Kl,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelForSequenceClassification"),f(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(jo,"id","transformers.FunnelForMultipleChoice"),f(jo,"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"),f(jo,"href","#transformers.FunnelForMultipleChoice"),f(Jn,"class","relative group"),f(Ar,"href","https://arxiv.org/abs/2006.03236"),f(Ar,"rel","nofollow"),f(ei,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),f(Lr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Lr,"rel","nofollow"),f(ti,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelForMultipleChoice"),f(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Jo,"id","transformers.FunnelForTokenClassification"),f(Jo,"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"),f(Jo,"href","#transformers.FunnelForTokenClassification"),f(In,"class","relative group"),f(Hr,"href","https://arxiv.org/abs/2006.03236"),f(Hr,"rel","nofollow"),f(ni,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),f(ta,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(ta,"rel","nofollow"),f(oi,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelForTokenClassification"),f(Pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(xo,"id","transformers.FunnelForQuestionAnswering"),f(xo,"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"),f(xo,"href","#transformers.FunnelForQuestionAnswering"),f(Wn,"class","relative group"),f(aa,"href","https://arxiv.org/abs/2006.03236"),f(aa,"rel","nofollow"),f(si,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),f(da,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(da,"rel","nofollow"),f(ri,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.FunnelForQuestionAnswering"),f(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(qo,"id","transformers.TFFunnelBaseModel"),f(qo,"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"),f(qo,"href","#transformers.TFFunnelBaseModel"),f(Nn,"class","relative group"),f(fa,"href","https://arxiv.org/abs/2006.03236"),f(fa,"rel","nofollow"),f(ai,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(_a,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(_a,"rel","nofollow"),f(li,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.TFFunnelBaseModel"),f(Gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ro,"id","transformers.TFFunnelModel"),f(Ro,"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"),f(Ro,"href","#transformers.TFFunnelModel"),f(Pn,"class","relative group"),f(va,"href","https://arxiv.org/abs/2006.03236"),f(va,"rel","nofollow"),f(ii,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(Ma,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Ma,"rel","nofollow"),f(di,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.TFFunnelModel"),f(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(So,"id","transformers.TFFunnelForPreTraining"),f(So,"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"),f(So,"href","#transformers.TFFunnelForPreTraining"),f(Gn,"class","relative group"),f(Ca,"href","https://arxiv.org/abs/2006.03236"),f(Ca,"rel","nofollow"),f(ci,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(Ia,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Ia,"rel","nofollow"),f(ui,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.TFFunnelForPreTraining"),f(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(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Qo,"id","transformers.TFFunnelForMaskedLM"),f(Qo,"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"),f(Qo,"href","#transformers.TFFunnelForMaskedLM"),f(An,"class","relative group"),f(Ba,"href","https://arxiv.org/abs/2006.03236"),f(Ba,"rel","nofollow"),f(pi,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(Ga,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Ga,"rel","nofollow"),f(hi,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.TFFunnelForMaskedLM"),f(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(es,"id","transformers.TFFunnelForSequenceClassification"),f(es,"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"),f(es,"href","#transformers.TFFunnelForSequenceClassification"),f(Xn,"class","relative group"),f(La,"href","https://arxiv.org/abs/2006.03236"),f(La,"rel","nofollow"),f(fi,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(Oa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Oa,"rel","nofollow"),f(mi,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.TFFunnelForSequenceClassification"),f(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(rs,"id","transformers.TFFunnelForMultipleChoice"),f(rs,"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"),f(rs,"href","#transformers.TFFunnelForMultipleChoice"),f(Dn,"class","relative group"),f(tl,"href","https://arxiv.org/abs/2006.03236"),f(tl,"rel","nofollow"),f(gi,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(sl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(sl,"rel","nofollow"),f(_i,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.TFFunnelForMultipleChoice"),f(St,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(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(ds,"id","transformers.TFFunnelForTokenClassification"),f(ds,"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"),f(ds,"href","#transformers.TFFunnelForTokenClassification"),f(On,"class","relative group"),f(dl,"href","https://arxiv.org/abs/2006.03236"),f(dl,"rel","nofollow"),f(bi,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(pl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(pl,"rel","nofollow"),f(yi,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.TFFunnelForTokenClassification"),f(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(fs,"id","transformers.TFFunnelForQuestionAnswering"),f(fs,"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"),f(fs,"href","#transformers.TFFunnelForQuestionAnswering"),f(Hn,"class","relative group"),f(_l,"href","https://arxiv.org/abs/2006.03236"),f(_l,"rel","nofollow"),f(Ti,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(Tl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Tl,"rel","nofollow"),f(wi,"href","/docs/transformers/v4.30.0/en/model_doc/funnel#transformers.TFFunnelForQuestionAnswering"),f(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(l,b){e(document.head,d),_(l,y,b),_(l,h,b),e(h,m),e(m,T),F(i,T,null),e(h,p),e(h,C),e(C,Te),_(l,ge,b),_(l,P,b),e(P,ce),e(ce,K),e(P,we),e(P,G),e(G,ue),_(l,X,b),_(l,ae,b),e(ae,le),e(le,V),F(ie,V,null),e(ae,ve),e(ae,A),e(A,ke),_(l,_e,b),_(l,R,b),e(R,Fe),e(R,de),e(de,ne),e(R,U),_(l,x,b),_(l,pe,b),e(pe,D),_(l,be,b),_(l,he,b),e(he,S),e(S,Me),_(l,ye,b),_(l,I,b),e(I,$e),_(l,L,b),_(l,se,b),e(se,fe),e(fe,Q),e(se,Ee),e(se,me),e(me,B),e(se,je),e(se,q),e(q,ze),e(q,ee),e(ee,W),e(q,Ce),e(q,Z),e(Z,Je),e(q,Ue),e(q,g),e(g,j),e(q,qe),e(q,te),e(te,Ne),e(q,Be),e(q,z),e(z,Pe),e(q,Re),e(q,xe),e(xe,Ge),e(q,Ve),e(q,N),e(N,O),e(q,Ae),e(q,We),e(We,Y),e(q,Se),_(l,Ze,b),_(l,re,b),e(re,Xe),e(re,H),e(H,Le),e(re,Uh),e(re,Is),e(Is,Ih),e(re,xh),_(l,_u,b),_(l,cn,b),e(cn,oo),e(oo,Xi),F(xs,Xi,null),e(cn,Wh),e(cn,Li),e(Li,Zh),_(l,bu,b),_(l,_t,b),e(_t,Di),e(Di,El),e(El,qh),e(_t,Nh),e(_t,Qi),e(Qi,jl),e(jl,Bh),e(_t,Ph),e(_t,Oi),e(Oi,zl),e(zl,Rh),e(_t,Gh),e(_t,Yi),e(Yi,Cl),e(Cl,Vh),e(_t,Ah),e(_t,Hi),e(Hi,Jl),e(Jl,Sh),_(l,yu,b),_(l,un,b),e(un,so),e(so,Ki),F(Ws,Ki,null),e(un,Xh),e(un,ed),e(ed,Lh),_(l,Tu,b),_(l,Kt,b),F(Zs,Kt,null),e(Kt,Dh),e(Kt,en),e(en,Qh),e(en,Ul),e(Ul,Oh),e(en,Yh),e(en,Il),e(Il,Hh),e(en,Kh),e(en,qs),e(qs,ef),e(en,tf),e(Kt,nf),e(Kt,pn),e(pn,of),e(pn,xl),e(xl,sf),e(pn,rf),e(pn,Wl),e(Wl,af),e(pn,lf),_(l,wu,b),_(l,hn,b),e(hn,ro),e(ro,td),F(Ns,td,null),e(hn,df),e(hn,nd),e(nd,cf),_(l,vu,b),_(l,et,b),F(Bs,et,null),e(et,uf),e(et,od),e(od,pf),e(et,hf),e(et,Ps),e(Ps,ff),e(Ps,Zl),e(Zl,mf),e(Ps,gf),e(et,_f),e(et,tn),F(Rs,tn,null),e(tn,bf),e(tn,sd),e(sd,yf),e(tn,Tf),e(tn,Gs),e(Gs,ql),e(ql,wf),e(ql,rd),e(rd,vf),e(Gs,kf),e(Gs,Nl),e(Nl,Ff),e(Nl,ad),e(ad,Mf),e(et,$f),e(et,ao),F(Vs,ao,null),e(ao,Ef),e(ao,As),e(As,jf),e(As,ld),e(ld,zf),e(As,Cf),e(et,Jf),e(et,It),F(Ss,It,null),e(It,Uf),e(It,id),e(id,If),e(It,xf),F(lo,It,null),e(It,Wf),e(It,fn),e(fn,Zf),e(fn,dd),e(dd,qf),e(fn,Nf),e(fn,cd),e(cd,Bf),e(fn,Pf),e(et,Rf),e(et,Bl),F(Xs,Bl,null),_(l,ku,b),_(l,mn,b),e(mn,io),e(io,ud),F(Ls,ud,null),e(mn,Gf),e(mn,pd),e(pd,Vf),_(l,Fu,b),_(l,gt,b),F(Ds,gt,null),e(gt,Af),e(gt,Qs),e(Qs,Sf),e(Qs,hd),e(hd,Xf),e(Qs,Lf),e(gt,Df),e(gt,Os),e(Os,Qf),e(Os,Pl),e(Pl,Of),e(Os,Yf),e(gt,Hf),e(gt,nn),F(Ys,nn,null),e(nn,Kf),e(nn,fd),e(fd,em),e(nn,tm),e(nn,Hs),e(Hs,Rl),e(Rl,nm),e(Rl,md),e(md,om),e(Hs,sm),e(Hs,Gl),e(Gl,rm),e(Gl,gd),e(gd,am),e(gt,lm),e(gt,xt),F(Ks,xt,null),e(xt,im),e(xt,_d),e(_d,dm),e(xt,cm),F(co,xt,null),e(xt,um),e(xt,gn),e(gn,pm),e(gn,bd),e(bd,hm),e(gn,fm),e(gn,yd),e(yd,mm),e(gn,gm),_(l,Mu,b),_(l,_n,b),e(_n,uo),e(uo,Td),F(er,Td,null),e(_n,_m),e(_n,wd),e(wd,bm),_(l,$u,b),_(l,bn,b),F(tr,bn,null),e(bn,ym),e(bn,nr),e(nr,Tm),e(nr,Vl),e(Vl,wm),e(nr,vm),_(l,Eu,b),_(l,yn,b),F(or,yn,null),e(yn,km),e(yn,sr),e(sr,Fm),e(sr,Al),e(Al,Mm),e(sr,$m),_(l,ju,b),_(l,Tn,b),e(Tn,po),e(po,vd),F(rr,vd,null),e(Tn,Em),e(Tn,kd),e(kd,jm),_(l,zu,b),_(l,dt,b),F(ar,dt,null),e(dt,zm),e(dt,Fd),e(Fd,Cm),e(dt,Jm),e(dt,lr),e(lr,Um),e(lr,ir),e(ir,Im),e(lr,xm),e(dt,Wm),e(dt,dr),e(dr,Zm),e(dr,Sl),e(Sl,qm),e(dr,Nm),e(dt,Bm),e(dt,cr),e(cr,Pm),e(cr,ur),e(ur,Rm),e(cr,Gm),e(dt,Vm),e(dt,Wt),F(pr,Wt,null),e(Wt,Am),e(Wt,wn),e(wn,Sm),e(wn,Xl),e(Xl,Xm),e(wn,Lm),e(wn,Md),e(Md,Dm),e(wn,Qm),e(Wt,Om),F(ho,Wt,null),e(Wt,Ym),F(fo,Wt,null),_(l,Cu,b),_(l,vn,b),e(vn,mo),e(mo,$d),F(hr,$d,null),e(vn,Hm),e(vn,Ed),e(Ed,Km),_(l,Ju,b),_(l,ct,b),F(fr,ct,null),e(ct,eg),e(ct,jd),e(jd,tg),e(ct,ng),e(ct,mr),e(mr,og),e(mr,gr),e(gr,sg),e(mr,rg),e(ct,ag),e(ct,_r),e(_r,lg),e(_r,Ll),e(Ll,ig),e(_r,dg),e(ct,cg),e(ct,br),e(br,ug),e(br,yr),e(yr,pg),e(br,hg),e(ct,fg),e(ct,Zt),F(Tr,Zt,null),e(Zt,mg),e(Zt,kn),e(kn,gg),e(kn,Dl),e(Dl,_g),e(kn,bg),e(kn,zd),e(zd,yg),e(kn,Tg),e(Zt,wg),F(go,Zt,null),e(Zt,vg),F(_o,Zt,null),_(l,Uu,b),_(l,Fn,b),e(Fn,bo),e(bo,Cd),F(wr,Cd,null),e(Fn,kg),e(Fn,Jd),e(Jd,Fg),_(l,Iu,b),_(l,Mn,b),F(vr,Mn,null),e(Mn,Mg),e(Mn,qt),F(kr,qt,null),e(qt,$g),e(qt,$n),e($n,Eg),e($n,Ql),e(Ql,jg),e($n,zg),e($n,Ud),e(Ud,Cg),e($n,Jg),e(qt,Ug),F(yo,qt,null),e(qt,Ig),F(To,qt,null),_(l,xu,b),_(l,En,b),e(En,wo),e(wo,Id),F(Fr,Id,null),e(En,xg),e(En,xd),e(xd,Wg),_(l,Wu,b),_(l,ut,b),F(Mr,ut,null),e(ut,Zg),e(ut,$r),e($r,qg),e($r,Wd),e(Wd,Ng),e($r,Bg),e(ut,Pg),e(ut,Er),e(Er,Rg),e(Er,jr),e(jr,Gg),e(Er,Vg),e(ut,Ag),e(ut,zr),e(zr,Sg),e(zr,Ol),e(Ol,Xg),e(zr,Lg),e(ut,Dg),e(ut,Cr),e(Cr,Qg),e(Cr,Jr),e(Jr,Og),e(Cr,Yg),e(ut,Hg),e(ut,Nt),F(Ur,Nt,null),e(Nt,Kg),e(Nt,jn),e(jn,e_),e(jn,Yl),e(Yl,t_),e(jn,n_),e(jn,Zd),e(Zd,o_),e(jn,s_),e(Nt,r_),F(vo,Nt,null),e(Nt,a_),F(ko,Nt,null),_(l,Zu,b),_(l,zn,b),e(zn,Fo),e(Fo,qd),F(Ir,qd,null),e(zn,l_),e(zn,Nd),e(Nd,i_),_(l,qu,b),_(l,pt,b),F(xr,pt,null),e(pt,d_),e(pt,Bd),e(Bd,c_),e(pt,u_),e(pt,Wr),e(Wr,p_),e(Wr,Zr),e(Zr,h_),e(Wr,f_),e(pt,m_),e(pt,qr),e(qr,g_),e(qr,Hl),e(Hl,__),e(qr,b_),e(pt,y_),e(pt,Nr),e(Nr,T_),e(Nr,Br),e(Br,w_),e(Nr,v_),e(pt,k_),e(pt,bt),F(Pr,bt,null),e(bt,F_),e(bt,Cn),e(Cn,M_),e(Cn,Kl),e(Kl,$_),e(Cn,E_),e(Cn,Pd),e(Pd,j_),e(Cn,z_),e(bt,C_),F(Mo,bt,null),e(bt,J_),F($o,bt,null),e(bt,U_),F(Eo,bt,null),_(l,Nu,b),_(l,Jn,b),e(Jn,jo),e(jo,Rd),F(Rr,Rd,null),e(Jn,I_),e(Jn,Gd),e(Gd,x_),_(l,Bu,b),_(l,ht,b),F(Gr,ht,null),e(ht,W_),e(ht,Vd),e(Vd,Z_),e(ht,q_),e(ht,Vr),e(Vr,N_),e(Vr,Ar),e(Ar,B_),e(Vr,P_),e(ht,R_),e(ht,Sr),e(Sr,G_),e(Sr,ei),e(ei,V_),e(Sr,A_),e(ht,S_),e(ht,Xr),e(Xr,X_),e(Xr,Lr),e(Lr,L_),e(Xr,D_),e(ht,Q_),e(ht,Bt),F(Dr,Bt,null),e(Bt,O_),e(Bt,Un),e(Un,Y_),e(Un,ti),e(ti,H_),e(Un,K_),e(Un,Ad),e(Ad,eb),e(Un,tb),e(Bt,nb),F(zo,Bt,null),e(Bt,ob),F(Co,Bt,null),_(l,Pu,b),_(l,In,b),e(In,Jo),e(Jo,Sd),F(Qr,Sd,null),e(In,sb),e(In,Xd),e(Xd,rb),_(l,Ru,b),_(l,ft,b),F(Or,ft,null),e(ft,ab),e(ft,Ld),e(Ld,lb),e(ft,ib),e(ft,Yr),e(Yr,db),e(Yr,Hr),e(Hr,cb),e(Yr,ub),e(ft,pb),e(ft,Kr),e(Kr,hb),e(Kr,ni),e(ni,fb),e(Kr,mb),e(ft,gb),e(ft,ea),e(ea,_b),e(ea,ta),e(ta,bb),e(ea,yb),e(ft,Tb),e(ft,Pt),F(na,Pt,null),e(Pt,wb),e(Pt,xn),e(xn,vb),e(xn,oi),e(oi,kb),e(xn,Fb),e(xn,Dd),e(Dd,Mb),e(xn,$b),e(Pt,Eb),F(Uo,Pt,null),e(Pt,jb),F(Io,Pt,null),_(l,Gu,b),_(l,Wn,b),e(Wn,xo),e(xo,Qd),F(oa,Qd,null),e(Wn,zb),e(Wn,Od),e(Od,Cb),_(l,Vu,b),_(l,mt,b),F(sa,mt,null),e(mt,Jb),e(mt,Zn),e(Zn,Ub),e(Zn,Yd),e(Yd,Ib),e(Zn,xb),e(Zn,Hd),e(Hd,Wb),e(Zn,Zb),e(mt,qb),e(mt,ra),e(ra,Nb),e(ra,aa),e(aa,Bb),e(ra,Pb),e(mt,Rb),e(mt,la),e(la,Gb),e(la,si),e(si,Vb),e(la,Ab),e(mt,Sb),e(mt,ia),e(ia,Xb),e(ia,da),e(da,Lb),e(ia,Db),e(mt,Qb),e(mt,Rt),F(ca,Rt,null),e(Rt,Ob),e(Rt,qn),e(qn,Yb),e(qn,ri),e(ri,Hb),e(qn,Kb),e(qn,Kd),e(Kd,ey),e(qn,ty),e(Rt,ny),F(Wo,Rt,null),e(Rt,oy),F(Zo,Rt,null),_(l,Au,b),_(l,Nn,b),e(Nn,qo),e(qo,ec),F(ua,ec,null),e(Nn,sy),e(Nn,tc),e(tc,ry),_(l,Su,b),_(l,tt,b),F(pa,tt,null),e(tt,ay),e(tt,nc),e(nc,ly),e(tt,iy),e(tt,ha),e(ha,dy),e(ha,fa),e(fa,cy),e(ha,uy),e(tt,py),e(tt,ma),e(ma,hy),e(ma,ai),e(ai,fy),e(ma,my),e(tt,gy),e(tt,ga),e(ga,_y),e(ga,_a),e(_a,by),e(ga,yy),e(tt,Ty),F(No,tt,null),e(tt,wy),e(tt,Gt),F(ba,Gt,null),e(Gt,vy),e(Gt,Bn),e(Bn,ky),e(Bn,li),e(li,Fy),e(Bn,My),e(Bn,oc),e(oc,$y),e(Bn,Ey),e(Gt,jy),F(Bo,Gt,null),e(Gt,zy),F(Po,Gt,null),_(l,Xu,b),_(l,Pn,b),e(Pn,Ro),e(Ro,sc),F(ya,sc,null),e(Pn,Cy),e(Pn,rc),e(rc,Jy),_(l,Lu,b),_(l,nt,b),F(Ta,nt,null),e(nt,Uy),e(nt,ac),e(ac,Iy),e(nt,xy),e(nt,wa),e(wa,Wy),e(wa,va),e(va,Zy),e(wa,qy),e(nt,Ny),e(nt,ka),e(ka,By),e(ka,ii),e(ii,Py),e(ka,Ry),e(nt,Gy),e(nt,Fa),e(Fa,Vy),e(Fa,Ma),e(Ma,Ay),e(Fa,Sy),e(nt,Xy),F(Go,nt,null),e(nt,Ly),e(nt,Vt),F($a,Vt,null),e(Vt,Dy),e(Vt,Rn),e(Rn,Qy),e(Rn,di),e(di,Oy),e(Rn,Yy),e(Rn,lc),e(lc,Hy),e(Rn,Ky),e(Vt,eT),F(Vo,Vt,null),e(Vt,tT),F(Ao,Vt,null),_(l,Du,b),_(l,Gn,b),e(Gn,So),e(So,ic),F(Ea,ic,null),e(Gn,nT),e(Gn,dc),e(dc,oT),_(l,Qu,b),_(l,ot,b),F(ja,ot,null),e(ot,sT),e(ot,cc),e(cc,rT),e(ot,aT),e(ot,za),e(za,lT),e(za,Ca),e(Ca,iT),e(za,dT),e(ot,cT),e(ot,Ja),e(Ja,uT),e(Ja,ci),e(ci,pT),e(Ja,hT),e(ot,fT),e(ot,Ua),e(Ua,mT),e(Ua,Ia),e(Ia,gT),e(Ua,_T),e(ot,bT),F(Xo,ot,null),e(ot,yT),e(ot,At),F(xa,At,null),e(At,TT),e(At,Vn),e(Vn,wT),e(Vn,ui),e(ui,vT),e(Vn,kT),e(Vn,uc),e(uc,FT),e(Vn,MT),e(At,$T),F(Lo,At,null),e(At,ET),F(Do,At,null),_(l,Ou,b),_(l,An,b),e(An,Qo),e(Qo,pc),F(Wa,pc,null),e(An,jT),e(An,hc),e(hc,zT),_(l,Yu,b),_(l,st,b),F(Za,st,null),e(st,CT),e(st,qa),e(qa,JT),e(qa,fc),e(fc,UT),e(qa,IT),e(st,xT),e(st,Na),e(Na,WT),e(Na,Ba),e(Ba,ZT),e(Na,qT),e(st,NT),e(st,Pa),e(Pa,BT),e(Pa,pi),e(pi,PT),e(Pa,RT),e(st,GT),e(st,Ra),e(Ra,VT),e(Ra,Ga),e(Ga,AT),e(Ra,ST),e(st,XT),F(Oo,st,null),e(st,LT),e(st,yt),F(Va,yt,null),e(yt,DT),e(yt,Sn),e(Sn,QT),e(Sn,hi),e(hi,OT),e(Sn,YT),e(Sn,mc),e(mc,HT),e(Sn,KT),e(yt,ew),F(Yo,yt,null),e(yt,tw),F(Ho,yt,null),e(yt,nw),F(Ko,yt,null),_(l,Hu,b),_(l,Xn,b),e(Xn,es),e(es,gc),F(Aa,gc,null),e(Xn,ow),e(Xn,_c),e(_c,sw),_(l,Ku,b),_(l,rt,b),F(Sa,rt,null),e(rt,rw),e(rt,bc),e(bc,aw),e(rt,lw),e(rt,Xa),e(Xa,iw),e(Xa,La),e(La,dw),e(Xa,cw),e(rt,uw),e(rt,Da),e(Da,pw),e(Da,fi),e(fi,hw),e(Da,fw),e(rt,mw),e(rt,Qa),e(Qa,gw),e(Qa,Oa),e(Oa,_w),e(Qa,bw),e(rt,yw),F(ts,rt,null),e(rt,Tw),e(rt,Tt),F(Ya,Tt,null),e(Tt,ww),e(Tt,Ln),e(Ln,vw),e(Ln,mi),e(mi,kw),e(Ln,Fw),e(Ln,yc),e(yc,Mw),e(Ln,$w),e(Tt,Ew),F(ns,Tt,null),e(Tt,jw),F(os,Tt,null),e(Tt,zw),F(ss,Tt,null),_(l,ep,b),_(l,Dn,b),e(Dn,rs),e(rs,Tc),F(Ha,Tc,null),e(Dn,Cw),e(Dn,wc),e(wc,Jw),_(l,tp,b),_(l,at,b),F(Ka,at,null),e(at,Uw),e(at,vc),e(vc,Iw),e(at,xw),e(at,el),e(el,Ww),e(el,tl),e(tl,Zw),e(el,qw),e(at,Nw),e(at,nl),e(nl,Bw),e(nl,gi),e(gi,Pw),e(nl,Rw),e(at,Gw),e(at,ol),e(ol,Vw),e(ol,sl),e(sl,Aw),e(ol,Sw),e(at,Xw),F(as,at,null),e(at,Lw),e(at,St),F(rl,St,null),e(St,Dw),e(St,Qn),e(Qn,Qw),e(Qn,_i),e(_i,Ow),e(Qn,Yw),e(Qn,kc),e(kc,Hw),e(Qn,Kw),e(St,ev),F(ls,St,null),e(St,tv),F(is,St,null),_(l,np,b),_(l,On,b),e(On,ds),e(ds,Fc),F(al,Fc,null),e(On,nv),e(On,Mc),e(Mc,ov),_(l,op,b),_(l,lt,b),F(ll,lt,null),e(lt,sv),e(lt,$c),e($c,rv),e(lt,av),e(lt,il),e(il,lv),e(il,dl),e(dl,iv),e(il,dv),e(lt,cv),e(lt,cl),e(cl,uv),e(cl,bi),e(bi,pv),e(cl,hv),e(lt,fv),e(lt,ul),e(ul,mv),e(ul,pl),e(pl,gv),e(ul,_v),e(lt,bv),F(cs,lt,null),e(lt,yv),e(lt,wt),F(hl,wt,null),e(wt,Tv),e(wt,Yn),e(Yn,wv),e(Yn,yi),e(yi,vv),e(Yn,kv),e(Yn,Ec),e(Ec,Fv),e(Yn,Mv),e(wt,$v),F(us,wt,null),e(wt,Ev),F(ps,wt,null),e(wt,jv),F(hs,wt,null),_(l,sp,b),_(l,Hn,b),e(Hn,fs),e(fs,jc),F(fl,jc,null),e(Hn,zv),e(Hn,zc),e(zc,Cv),_(l,rp,b),_(l,it,b),F(ml,it,null),e(it,Jv),e(it,Kn),e(Kn,Uv),e(Kn,Cc),e(Cc,Iv),e(Kn,xv),e(Kn,Jc),e(Jc,Wv),e(Kn,Zv),e(it,qv),e(it,gl),e(gl,Nv),e(gl,_l),e(_l,Bv),e(gl,Pv),e(it,Rv),e(it,bl),e(bl,Gv),e(bl,Ti),e(Ti,Vv),e(bl,Av),e(it,Sv),e(it,yl),e(yl,Xv),e(yl,Tl),e(Tl,Lv),e(yl,Dv),e(it,Qv),F(ms,it,null),e(it,Ov),e(it,vt),F(wl,vt,null),e(vt,Yv),e(vt,eo),e(eo,Hv),e(eo,wi),e(wi,Kv),e(eo,ek),e(eo,Uc),e(Uc,tk),e(eo,nk),e(vt,ok),F(gs,vt,null),e(vt,sk),F(_s,vt,null),e(vt,rk),F(bs,vt,null),ap=!0},p(l,[b]){const vl={};b&2&&(vl.$$scope={dirty:b,ctx:l}),lo.$set(vl);const Ic={};b&2&&(Ic.$$scope={dirty:b,ctx:l}),co.$set(Ic);const xc={};b&2&&(xc.$$scope={dirty:b,ctx:l}),ho.$set(xc);const Wc={};b&2&&(Wc.$$scope={dirty:b,ctx:l}),fo.$set(Wc);const kl={};b&2&&(kl.$$scope={dirty:b,ctx:l}),go.$set(kl);const Zc={};b&2&&(Zc.$$scope={dirty:b,ctx:l}),_o.$set(Zc);const qc={};b&2&&(qc.$$scope={dirty:b,ctx:l}),yo.$set(qc);const Fl={};b&2&&(Fl.$$scope={dirty:b,ctx:l}),To.$set(Fl);const Nc={};b&2&&(Nc.$$scope={dirty:b,ctx:l}),vo.$set(Nc);const Bc={};b&2&&(Bc.$$scope={dirty:b,ctx:l}),ko.$set(Bc);const Pc={};b&2&&(Pc.$$scope={dirty:b,ctx:l}),Mo.$set(Pc);const Ml={};b&2&&(Ml.$$scope={dirty:b,ctx:l}),$o.$set(Ml);const Rc={};b&2&&(Rc.$$scope={dirty:b,ctx:l}),Eo.$set(Rc);const Gc={};b&2&&(Gc.$$scope={dirty:b,ctx:l}),zo.$set(Gc);const Vc={};b&2&&(Vc.$$scope={dirty:b,ctx:l}),Co.$set(Vc);const Ac={};b&2&&(Ac.$$scope={dirty:b,ctx:l}),Uo.$set(Ac);const Sc={};b&2&&(Sc.$$scope={dirty:b,ctx:l}),Io.$set(Sc);const to={};b&2&&(to.$$scope={dirty:b,ctx:l}),Wo.$set(to);const Xc={};b&2&&(Xc.$$scope={dirty:b,ctx:l}),Zo.$set(Xc);const Lc={};b&2&&(Lc.$$scope={dirty:b,ctx:l}),No.$set(Lc);const Ke={};b&2&&(Ke.$$scope={dirty:b,ctx:l}),Bo.$set(Ke);const Dc={};b&2&&(Dc.$$scope={dirty:b,ctx:l}),Po.$set(Dc);const Qc={};b&2&&(Qc.$$scope={dirty:b,ctx:l}),Go.$set(Qc);const Oc={};b&2&&(Oc.$$scope={dirty:b,ctx:l}),Vo.$set(Oc);const Yc={};b&2&&(Yc.$$scope={dirty:b,ctx:l}),Ao.$set(Yc);const Hc={};b&2&&(Hc.$$scope={dirty:b,ctx:l}),Xo.$set(Hc);const Kc={};b&2&&(Kc.$$scope={dirty:b,ctx:l}),Lo.$set(Kc);const eu={};b&2&&(eu.$$scope={dirty:b,ctx:l}),Do.$set(eu);const tu={};b&2&&(tu.$$scope={dirty:b,ctx:l}),Oo.$set(tu);const no={};b&2&&(no.$$scope={dirty:b,ctx:l}),Yo.$set(no);const nu={};b&2&&(nu.$$scope={dirty:b,ctx:l}),Ho.$set(nu);const ou={};b&2&&(ou.$$scope={dirty:b,ctx:l}),Ko.$set(ou);const $l={};b&2&&($l.$$scope={dirty:b,ctx:l}),ts.$set($l);const su={};b&2&&(su.$$scope={dirty:b,ctx:l}),ns.$set(su);const ru={};b&2&&(ru.$$scope={dirty:b,ctx:l}),os.$set(ru);const au={};b&2&&(au.$$scope={dirty:b,ctx:l}),ss.$set(au);const Ut={};b&2&&(Ut.$$scope={dirty:b,ctx:l}),as.$set(Ut);const lu={};b&2&&(lu.$$scope={dirty:b,ctx:l}),ls.$set(lu);const iu={};b&2&&(iu.$$scope={dirty:b,ctx:l}),is.$set(iu);const du={};b&2&&(du.$$scope={dirty:b,ctx:l}),cs.$set(du);const cu={};b&2&&(cu.$$scope={dirty:b,ctx:l}),us.$set(cu);const uu={};b&2&&(uu.$$scope={dirty:b,ctx:l}),ps.$set(uu);const pu={};b&2&&(pu.$$scope={dirty:b,ctx:l}),hs.$set(pu);const hu={};b&2&&(hu.$$scope={dirty:b,ctx:l}),ms.$set(hu);const fu={};b&2&&(fu.$$scope={dirty:b,ctx:l}),gs.$set(fu);const mu={};b&2&&(mu.$$scope={dirty:b,ctx:l}),_s.$set(mu);const gu={};b&2&&(gu.$$scope={dirty:b,ctx:l}),bs.$set(gu)},i(l){ap||(M(i.$$.fragment,l),M(ie.$$.fragment,l),M(xs.$$.fragment,l),M(Ws.$$.fragment,l),M(Zs.$$.fragment,l),M(Ns.$$.fragment,l),M(Bs.$$.fragment,l),M(Rs.$$.fragment,l),M(Vs.$$.fragment,l),M(Ss.$$.fragment,l),M(lo.$$.fragment,l),M(Xs.$$.fragment,l),M(Ls.$$.fragment,l),M(Ds.$$.fragment,l),M(Ys.$$.fragment,l),M(Ks.$$.fragment,l),M(co.$$.fragment,l),M(er.$$.fragment,l),M(tr.$$.fragment,l),M(or.$$.fragment,l),M(rr.$$.fragment,l),M(ar.$$.fragment,l),M(pr.$$.fragment,l),M(ho.$$.fragment,l),M(fo.$$.fragment,l),M(hr.$$.fragment,l),M(fr.$$.fragment,l),M(Tr.$$.fragment,l),M(go.$$.fragment,l),M(_o.$$.fragment,l),M(wr.$$.fragment,l),M(vr.$$.fragment,l),M(kr.$$.fragment,l),M(yo.$$.fragment,l),M(To.$$.fragment,l),M(Fr.$$.fragment,l),M(Mr.$$.fragment,l),M(Ur.$$.fragment,l),M(vo.$$.fragment,l),M(ko.$$.fragment,l),M(Ir.$$.fragment,l),M(xr.$$.fragment,l),M(Pr.$$.fragment,l),M(Mo.$$.fragment,l),M($o.$$.fragment,l),M(Eo.$$.fragment,l),M(Rr.$$.fragment,l),M(Gr.$$.fragment,l),M(Dr.$$.fragment,l),M(zo.$$.fragment,l),M(Co.$$.fragment,l),M(Qr.$$.fragment,l),M(Or.$$.fragment,l),M(na.$$.fragment,l),M(Uo.$$.fragment,l),M(Io.$$.fragment,l),M(oa.$$.fragment,l),M(sa.$$.fragment,l),M(ca.$$.fragment,l),M(Wo.$$.fragment,l),M(Zo.$$.fragment,l),M(ua.$$.fragment,l),M(pa.$$.fragment,l),M(No.$$.fragment,l),M(ba.$$.fragment,l),M(Bo.$$.fragment,l),M(Po.$$.fragment,l),M(ya.$$.fragment,l),M(Ta.$$.fragment,l),M(Go.$$.fragment,l),M($a.$$.fragment,l),M(Vo.$$.fragment,l),M(Ao.$$.fragment,l),M(Ea.$$.fragment,l),M(ja.$$.fragment,l),M(Xo.$$.fragment,l),M(xa.$$.fragment,l),M(Lo.$$.fragment,l),M(Do.$$.fragment,l),M(Wa.$$.fragment,l),M(Za.$$.fragment,l),M(Oo.$$.fragment,l),M(Va.$$.fragment,l),M(Yo.$$.fragment,l),M(Ho.$$.fragment,l),M(Ko.$$.fragment,l),M(Aa.$$.fragment,l),M(Sa.$$.fragment,l),M(ts.$$.fragment,l),M(Ya.$$.fragment,l),M(ns.$$.fragment,l),M(os.$$.fragment,l),M(ss.$$.fragment,l),M(Ha.$$.fragment,l),M(Ka.$$.fragment,l),M(as.$$.fragment,l),M(rl.$$.fragment,l),M(ls.$$.fragment,l),M(is.$$.fragment,l),M(al.$$.fragment,l),M(ll.$$.fragment,l),M(cs.$$.fragment,l),M(hl.$$.fragment,l),M(us.$$.fragment,l),M(ps.$$.fragment,l),M(hs.$$.fragment,l),M(fl.$$.fragment,l),M(ml.$$.fragment,l),M(ms.$$.fragment,l),M(wl.$$.fragment,l),M(gs.$$.fragment,l),M(_s.$$.fragment,l),M(bs.$$.fragment,l),ap=!0)},o(l){$(i.$$.fragment,l),$(ie.$$.fragment,l),$(xs.$$.fragment,l),$(Ws.$$.fragment,l),$(Zs.$$.fragment,l),$(Ns.$$.fragment,l),$(Bs.$$.fragment,l),$(Rs.$$.fragment,l),$(Vs.$$.fragment,l),$(Ss.$$.fragment,l),$(lo.$$.fragment,l),$(Xs.$$.fragment,l),$(Ls.$$.fragment,l),$(Ds.$$.fragment,l),$(Ys.$$.fragment,l),$(Ks.$$.fragment,l),$(co.$$.fragment,l),$(er.$$.fragment,l),$(tr.$$.fragment,l),$(or.$$.fragment,l),$(rr.$$.fragment,l),$(ar.$$.fragment,l),$(pr.$$.fragment,l),$(ho.$$.fragment,l),$(fo.$$.fragment,l),$(hr.$$.fragment,l),$(fr.$$.fragment,l),$(Tr.$$.fragment,l),$(go.$$.fragment,l),$(_o.$$.fragment,l),$(wr.$$.fragment,l),$(vr.$$.fragment,l),$(kr.$$.fragment,l),$(yo.$$.fragment,l),$(To.$$.fragment,l),$(Fr.$$.fragment,l),$(Mr.$$.fragment,l),$(Ur.$$.fragment,l),$(vo.$$.fragment,l),$(ko.$$.fragment,l),$(Ir.$$.fragment,l),$(xr.$$.fragment,l),$(Pr.$$.fragment,l),$(Mo.$$.fragment,l),$($o.$$.fragment,l),$(Eo.$$.fragment,l),$(Rr.$$.fragment,l),$(Gr.$$.fragment,l),$(Dr.$$.fragment,l),$(zo.$$.fragment,l),$(Co.$$.fragment,l),$(Qr.$$.fragment,l),$(Or.$$.fragment,l),$(na.$$.fragment,l),$(Uo.$$.fragment,l),$(Io.$$.fragment,l),$(oa.$$.fragment,l),$(sa.$$.fragment,l),$(ca.$$.fragment,l),$(Wo.$$.fragment,l),$(Zo.$$.fragment,l),$(ua.$$.fragment,l),$(pa.$$.fragment,l),$(No.$$.fragment,l),$(ba.$$.fragment,l),$(Bo.$$.fragment,l),$(Po.$$.fragment,l),$(ya.$$.fragment,l),$(Ta.$$.fragment,l),$(Go.$$.fragment,l),$($a.$$.fragment,l),$(Vo.$$.fragment,l),$(Ao.$$.fragment,l),$(Ea.$$.fragment,l),$(ja.$$.fragment,l),$(Xo.$$.fragment,l),$(xa.$$.fragment,l),$(Lo.$$.fragment,l),$(Do.$$.fragment,l),$(Wa.$$.fragment,l),$(Za.$$.fragment,l),$(Oo.$$.fragment,l),$(Va.$$.fragment,l),$(Yo.$$.fragment,l),$(Ho.$$.fragment,l),$(Ko.$$.fragment,l),$(Aa.$$.fragment,l),$(Sa.$$.fragment,l),$(ts.$$.fragment,l),$(Ya.$$.fragment,l),$(ns.$$.fragment,l),$(os.$$.fragment,l),$(ss.$$.fragment,l),$(Ha.$$.fragment,l),$(Ka.$$.fragment,l),$(as.$$.fragment,l),$(rl.$$.fragment,l),$(ls.$$.fragment,l),$(is.$$.fragment,l),$(al.$$.fragment,l),$(ll.$$.fragment,l),$(cs.$$.fragment,l),$(hl.$$.fragment,l),$(us.$$.fragment,l),$(ps.$$.fragment,l),$(hs.$$.fragment,l),$(fl.$$.fragment,l),$(ml.$$.fragment,l),$(ms.$$.fragment,l),$(wl.$$.fragment,l),$(gs.$$.fragment,l),$(_s.$$.fragment,l),$(bs.$$.fragment,l),ap=!1},d(l){t(d),l&&t(y),l&&t(h),E(i),l&&t(ge),l&&t(P),l&&t(X),l&&t(ae),E(ie),l&&t(_e),l&&t(R),l&&t(x),l&&t(pe),l&&t(be),l&&t(he),l&&t(ye),l&&t(I),l&&t(L),l&&t(se),l&&t(Ze),l&&t(re),l&&t(_u),l&&t(cn),E(xs),l&&t(bu),l&&t(_t),l&&t(yu),l&&t(un),E(Ws),l&&t(Tu),l&&t(Kt),E(Zs),l&&t(wu),l&&t(hn),E(Ns),l&&t(vu),l&&t(et),E(Bs),E(Rs),E(Vs),E(Ss),E(lo),E(Xs),l&&t(ku),l&&t(mn),E(Ls),l&&t(Fu),l&&t(gt),E(Ds),E(Ys),E(Ks),E(co),l&&t(Mu),l&&t(_n),E(er),l&&t($u),l&&t(bn),E(tr),l&&t(Eu),l&&t(yn),E(or),l&&t(ju),l&&t(Tn),E(rr),l&&t(zu),l&&t(dt),E(ar),E(pr),E(ho),E(fo),l&&t(Cu),l&&t(vn),E(hr),l&&t(Ju),l&&t(ct),E(fr),E(Tr),E(go),E(_o),l&&t(Uu),l&&t(Fn),E(wr),l&&t(Iu),l&&t(Mn),E(vr),E(kr),E(yo),E(To),l&&t(xu),l&&t(En),E(Fr),l&&t(Wu),l&&t(ut),E(Mr),E(Ur),E(vo),E(ko),l&&t(Zu),l&&t(zn),E(Ir),l&&t(qu),l&&t(pt),E(xr),E(Pr),E(Mo),E($o),E(Eo),l&&t(Nu),l&&t(Jn),E(Rr),l&&t(Bu),l&&t(ht),E(Gr),E(Dr),E(zo),E(Co),l&&t(Pu),l&&t(In),E(Qr),l&&t(Ru),l&&t(ft),E(Or),E(na),E(Uo),E(Io),l&&t(Gu),l&&t(Wn),E(oa),l&&t(Vu),l&&t(mt),E(sa),E(ca),E(Wo),E(Zo),l&&t(Au),l&&t(Nn),E(ua),l&&t(Su),l&&t(tt),E(pa),E(No),E(ba),E(Bo),E(Po),l&&t(Xu),l&&t(Pn),E(ya),l&&t(Lu),l&&t(nt),E(Ta),E(Go),E($a),E(Vo),E(Ao),l&&t(Du),l&&t(Gn),E(Ea),l&&t(Qu),l&&t(ot),E(ja),E(Xo),E(xa),E(Lo),E(Do),l&&t(Ou),l&&t(An),E(Wa),l&&t(Yu),l&&t(st),E(Za),E(Oo),E(Va),E(Yo),E(Ho),E(Ko),l&&t(Hu),l&&t(Xn),E(Aa),l&&t(Ku),l&&t(rt),E(Sa),E(ts),E(Ya),E(ns),E(os),E(ss),l&&t(ep),l&&t(Dn),E(Ha),l&&t(tp),l&&t(at),E(Ka),E(as),E(rl),E(ls),E(is),l&&t(np),l&&t(On),E(al),l&&t(op),l&&t(lt),E(ll),E(cs),E(hl),E(us),E(ps),E(hs),l&&t(sp),l&&t(Hn),E(fl),l&&t(rp),l&&t(it),E(ml),E(ms),E(wl),E(gs),E(_s),E(bs)}}}const E1={local:"funnel-transformer",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.FunnelConfig",title:"FunnelConfig"},{local:"transformers.FunnelTokenizer",title:"FunnelTokenizer"},{local:"transformers.FunnelTokenizerFast",title:"FunnelTokenizerFast"},{local:"transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput",title:"Funnel specific outputs"},{local:"transformers.FunnelBaseModel",title:"FunnelBaseModel"},{local:"transformers.FunnelModel",title:"FunnelModel"},{local:"transformers.FunnelForPreTraining",title:"FunnelModelForPreTraining"},{local:"transformers.FunnelForMaskedLM",title:"FunnelForMaskedLM"},{local:"transformers.FunnelForSequenceClassification",title:"FunnelForSequenceClassification"},{local:"transformers.FunnelForMultipleChoice",title:"FunnelForMultipleChoice"},{local:"transformers.FunnelForTokenClassification",title:"FunnelForTokenClassification"},{local:"transformers.FunnelForQuestionAnswering",title:"FunnelForQuestionAnswering"},{local:"transformers.TFFunnelBaseModel",title:"TFFunnelBaseModel"},{local:"transformers.TFFunnelModel",title:"TFFunnelModel"},{local:"transformers.TFFunnelForPreTraining",title:"TFFunnelModelForPreTraining"},{local:"transformers.TFFunnelForMaskedLM",title:"TFFunnelForMaskedLM"},{local:"transformers.TFFunnelForSequenceClassification",title:"TFFunnelForSequenceClassification"},{local:"transformers.TFFunnelForMultipleChoice",title:"TFFunnelForMultipleChoice"},{local:"transformers.TFFunnelForTokenClassification",title:"TFFunnelForTokenClassification"},{local:"transformers.TFFunnelForQuestionAnswering",title:"TFFunnelForQuestionAnswering"}],title:"Funnel Transformer"};function j1(J){return UM(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class W1 extends jM{constructor(d){super();zM(this,d,j1,$1,CM,{})}}export{W1 as default,E1 as metadata};
