import{S as j1,i as z1,s as C1,e as s,k as c,w as v,t as n,M as J1,c as r,d as t,m as u,a,x as k,h as o,b as f,N as E1,G as e,g as _,y as F,q as M,o as $,B as E,v as U1,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 I1(J){let d,b,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"),b=n("Transformer sequence pair mask has the following format:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=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,b),_(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 x1(J){let d,b,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"),b=n("Transformer sequence pair mask has the following format:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=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,b),_(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,b,h,m,T;return{c(){d=s("p"),b=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);b=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,b),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function Z1(J){let d,b,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"),b=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,b),_(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 q1(J){let d,b,h,m,T;return{c(){d=s("p"),b=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);b=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,b),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function N1(J){let d,b,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"),b=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,b),_(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,b,h,m,T;return{c(){d=s("p"),b=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);b=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,b),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function P1(J){let d,b,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"),b=n("Examples:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=o(p,"Examples:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,b),_(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 R1(J){let d,b,h,m,T;return{c(){d=s("p"),b=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);b=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,b),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function G1(J){let d,b,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"),b=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,b),_(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 A1(J){let d,b,h,m,T;return{c(){d=s("p"),b=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);b=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,b),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function V1(J){let d,b,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"),b=n("Example of single-label classification:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=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,b),_(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 X1(J){let d,b,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"),b=n("Example of multi-label classification:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=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,b),_(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,b,h,m,T;return{c(){d=s("p"),b=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);b=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,b),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function L1(J){let d,b,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"),b=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,b),_(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 D1(J){let d,b,h,m,T;return{c(){d=s("p"),b=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);b=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,b),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function Q1(J){let d,b,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"),b=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,b),_(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 O1(J){let d,b,h,m,T;return{c(){d=s("p"),b=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);b=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,b),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function Y1(J){let d,b,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"),b=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,b),_(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 H1(J){let d,b,h,m,T,i,p,C,Te,ge,P,ce,K,w,we,G,ue,Ie,S,ae,le,A,ie,ve,V,ke,_e,R,Fe,de,ne,U,x,pe,D,ye,he,X,Me,be,I,$e,L,se,fe,Q,Ee,me,B,je,q,ze,ee,W,Ce,Z,Je,Ue;return{c(){d=s("p"),b=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 `),S=s("code"),ae=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),A=s("code"),ie=n("fit()"),ve=n(" and "),V=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"),ye=n("input_ids"),he=n(" only and nothing else: "),X=s("code"),Me=n("model(input_ids)"),be=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);b=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 `),S=r(z,"CODE",{});var Re=a(S);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 `),A=r(z,"CODE",{});var xe=a(A);ie=o(xe,"fit()"),xe.forEach(t),ve=o(z," and "),V=r(z,"CODE",{});var Ge=a(V);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 Ae=a(R);Fe=o(Ae,"Functional"),Ae.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 Ve=a(D);ye=o(Ve,"input_ids"),Ve.forEach(t),he=o(O," only and nothing else: "),X=r(O,"CODE",{});var We=a(X);Me=o(We,"model(input_ids)"),We.forEach(t),O.forEach(t),be=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 Xe=a(L);se=o(Xe,"model([input_ids, attention_mask])"),Xe.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 Se=a(q);ze=o(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.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,b),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,S),e(S,ae),e(w,le),e(w,A),e(A,ie),e(w,ve),e(w,V),e(V,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,ye),e(x,he),e(x,X),e(X,Me),e(U,be),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,b,h,m,T;return{c(){d=s("p"),b=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);b=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,b),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function e0(J){let d,b,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"),b=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,b),_(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 t0(J){let d,b,h,m,T,i,p,C,Te,ge,P,ce,K,w,we,G,ue,Ie,S,ae,le,A,ie,ve,V,ke,_e,R,Fe,de,ne,U,x,pe,D,ye,he,X,Me,be,I,$e,L,se,fe,Q,Ee,me,B,je,q,ze,ee,W,Ce,Z,Je,Ue;return{c(){d=s("p"),b=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 `),S=s("code"),ae=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),A=s("code"),ie=n("fit()"),ve=n(" and "),V=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"),ye=n("input_ids"),he=n(" only and nothing else: "),X=s("code"),Me=n("model(input_ids)"),be=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);b=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 `),S=r(z,"CODE",{});var Re=a(S);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 `),A=r(z,"CODE",{});var xe=a(A);ie=o(xe,"fit()"),xe.forEach(t),ve=o(z," and "),V=r(z,"CODE",{});var Ge=a(V);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 Ae=a(R);Fe=o(Ae,"Functional"),Ae.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 Ve=a(D);ye=o(Ve,"input_ids"),Ve.forEach(t),he=o(O," only and nothing else: "),X=r(O,"CODE",{});var We=a(X);Me=o(We,"model(input_ids)"),We.forEach(t),O.forEach(t),be=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 Xe=a(L);se=o(Xe,"model([input_ids, attention_mask])"),Xe.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 Se=a(q);ze=o(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.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,b),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,S),e(S,ae),e(w,le),e(w,A),e(A,ie),e(w,ve),e(w,V),e(V,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,ye),e(x,he),e(x,X),e(X,Me),e(U,be),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 n0(J){let d,b,h,m,T;return{c(){d=s("p"),b=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);b=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,b),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function o0(J){let d,b,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"),b=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,b),_(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 s0(J){let d,b,h,m,T,i,p,C,Te,ge,P,ce,K,w,we,G,ue,Ie,S,ae,le,A,ie,ve,V,ke,_e,R,Fe,de,ne,U,x,pe,D,ye,he,X,Me,be,I,$e,L,se,fe,Q,Ee,me,B,je,q,ze,ee,W,Ce,Z,Je,Ue;return{c(){d=s("p"),b=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 `),S=s("code"),ae=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),A=s("code"),ie=n("fit()"),ve=n(" and "),V=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"),ye=n("input_ids"),he=n(" only and nothing else: "),X=s("code"),Me=n("model(input_ids)"),be=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);b=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 `),S=r(z,"CODE",{});var Re=a(S);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 `),A=r(z,"CODE",{});var xe=a(A);ie=o(xe,"fit()"),xe.forEach(t),ve=o(z," and "),V=r(z,"CODE",{});var Ge=a(V);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 Ae=a(R);Fe=o(Ae,"Functional"),Ae.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 Ve=a(D);ye=o(Ve,"input_ids"),Ve.forEach(t),he=o(O," only and nothing else: "),X=r(O,"CODE",{});var We=a(X);Me=o(We,"model(input_ids)"),We.forEach(t),O.forEach(t),be=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 Xe=a(L);se=o(Xe,"model([input_ids, attention_mask])"),Xe.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 Se=a(q);ze=o(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.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,b),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,S),e(S,ae),e(w,le),e(w,A),e(A,ie),e(w,ve),e(w,V),e(V,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,ye),e(x,he),e(x,X),e(X,Me),e(U,be),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 r0(J){let d,b,h,m,T;return{c(){d=s("p"),b=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);b=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,b),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function a0(J){let d,b,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"),b=n("Examples:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=o(p,"Examples:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,b),_(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 l0(J){let d,b,h,m,T,i,p,C,Te,ge,P,ce,K,w,we,G,ue,Ie,S,ae,le,A,ie,ve,V,ke,_e,R,Fe,de,ne,U,x,pe,D,ye,he,X,Me,be,I,$e,L,se,fe,Q,Ee,me,B,je,q,ze,ee,W,Ce,Z,Je,Ue;return{c(){d=s("p"),b=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 `),S=s("code"),ae=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),A=s("code"),ie=n("fit()"),ve=n(" and "),V=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"),ye=n("input_ids"),he=n(" only and nothing else: "),X=s("code"),Me=n("model(input_ids)"),be=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);b=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 `),S=r(z,"CODE",{});var Re=a(S);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 `),A=r(z,"CODE",{});var xe=a(A);ie=o(xe,"fit()"),xe.forEach(t),ve=o(z," and "),V=r(z,"CODE",{});var Ge=a(V);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 Ae=a(R);Fe=o(Ae,"Functional"),Ae.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 Ve=a(D);ye=o(Ve,"input_ids"),Ve.forEach(t),he=o(O," only and nothing else: "),X=r(O,"CODE",{});var We=a(X);Me=o(We,"model(input_ids)"),We.forEach(t),O.forEach(t),be=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 Xe=a(L);se=o(Xe,"model([input_ids, attention_mask])"),Xe.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 Se=a(q);ze=o(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.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,b),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,S),e(S,ae),e(w,le),e(w,A),e(A,ie),e(w,ve),e(w,V),e(V,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,ye),e(x,he),e(x,X),e(X,Me),e(U,be),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 i0(J){let d,b,h,m,T;return{c(){d=s("p"),b=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);b=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,b),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function d0(J){let d,b,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"),b=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,b),_(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 c0(J){let d,b;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),b=!0},p:Ye,i(h){b||(M(d.$$.fragment,h),b=!0)},o(h){$(d.$$.fragment,h),b=!1},d(h){E(d,h)}}}function u0(J){let d,b,h,m,T,i,p,C,Te,ge,P,ce,K,w,we,G,ue,Ie,S,ae,le,A,ie,ve,V,ke,_e,R,Fe,de,ne,U,x,pe,D,ye,he,X,Me,be,I,$e,L,se,fe,Q,Ee,me,B,je,q,ze,ee,W,Ce,Z,Je,Ue;return{c(){d=s("p"),b=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 `),S=s("code"),ae=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),A=s("code"),ie=n("fit()"),ve=n(" and "),V=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"),ye=n("input_ids"),he=n(" only and nothing else: "),X=s("code"),Me=n("model(input_ids)"),be=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);b=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 `),S=r(z,"CODE",{});var Re=a(S);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 `),A=r(z,"CODE",{});var xe=a(A);ie=o(xe,"fit()"),xe.forEach(t),ve=o(z," and "),V=r(z,"CODE",{});var Ge=a(V);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 Ae=a(R);Fe=o(Ae,"Functional"),Ae.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 Ve=a(D);ye=o(Ve,"input_ids"),Ve.forEach(t),he=o(O," only and nothing else: "),X=r(O,"CODE",{});var We=a(X);Me=o(We,"model(input_ids)"),We.forEach(t),O.forEach(t),be=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 Xe=a(L);se=o(Xe,"model([input_ids, attention_mask])"),Xe.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 Se=a(q);ze=o(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.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,b),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,S),e(S,ae),e(w,le),e(w,A),e(A,ie),e(w,ve),e(w,V),e(V,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,ye),e(x,he),e(x,X),e(X,Me),e(U,be),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 p0(J){let d,b,h,m,T;return{c(){d=s("p"),b=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);b=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,b),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function h0(J){let d,b,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"),b=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,b),_(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 f0(J){let d,b;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),b=!0},p:Ye,i(h){b||(M(d.$$.fragment,h),b=!0)},o(h){$(d.$$.fragment,h),b=!1},d(h){E(d,h)}}}function m0(J){let d,b,h,m,T,i,p,C,Te,ge,P,ce,K,w,we,G,ue,Ie,S,ae,le,A,ie,ve,V,ke,_e,R,Fe,de,ne,U,x,pe,D,ye,he,X,Me,be,I,$e,L,se,fe,Q,Ee,me,B,je,q,ze,ee,W,Ce,Z,Je,Ue;return{c(){d=s("p"),b=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 `),S=s("code"),ae=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),A=s("code"),ie=n("fit()"),ve=n(" and "),V=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"),ye=n("input_ids"),he=n(" only and nothing else: "),X=s("code"),Me=n("model(input_ids)"),be=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);b=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 `),S=r(z,"CODE",{});var Re=a(S);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 `),A=r(z,"CODE",{});var xe=a(A);ie=o(xe,"fit()"),xe.forEach(t),ve=o(z," and "),V=r(z,"CODE",{});var Ge=a(V);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 Ae=a(R);Fe=o(Ae,"Functional"),Ae.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 Ve=a(D);ye=o(Ve,"input_ids"),Ve.forEach(t),he=o(O," only and nothing else: "),X=r(O,"CODE",{});var We=a(X);Me=o(We,"model(input_ids)"),We.forEach(t),O.forEach(t),be=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 Xe=a(L);se=o(Xe,"model([input_ids, attention_mask])"),Xe.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 Se=a(q);ze=o(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.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,b),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,S),e(S,ae),e(w,le),e(w,A),e(A,ie),e(w,ve),e(w,V),e(V,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,ye),e(x,he),e(x,X),e(X,Me),e(U,be),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 g0(J){let d,b,h,m,T;return{c(){d=s("p"),b=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);b=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,b),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function _0(J){let d,b,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"),b=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,b),_(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 y0(J){let d,b,h,m,T,i,p,C,Te,ge,P,ce,K,w,we,G,ue,Ie,S,ae,le,A,ie,ve,V,ke,_e,R,Fe,de,ne,U,x,pe,D,ye,he,X,Me,be,I,$e,L,se,fe,Q,Ee,me,B,je,q,ze,ee,W,Ce,Z,Je,Ue;return{c(){d=s("p"),b=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 `),S=s("code"),ae=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),A=s("code"),ie=n("fit()"),ve=n(" and "),V=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"),ye=n("input_ids"),he=n(" only and nothing else: "),X=s("code"),Me=n("model(input_ids)"),be=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);b=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 `),S=r(z,"CODE",{});var Re=a(S);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 `),A=r(z,"CODE",{});var xe=a(A);ie=o(xe,"fit()"),xe.forEach(t),ve=o(z," and "),V=r(z,"CODE",{});var Ge=a(V);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 Ae=a(R);Fe=o(Ae,"Functional"),Ae.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 Ve=a(D);ye=o(Ve,"input_ids"),Ve.forEach(t),he=o(O," only and nothing else: "),X=r(O,"CODE",{});var We=a(X);Me=o(We,"model(input_ids)"),We.forEach(t),O.forEach(t),be=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 Xe=a(L);se=o(Xe,"model([input_ids, attention_mask])"),Xe.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 Se=a(q);ze=o(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.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,b),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,S),e(S,ae),e(w,le),e(w,A),e(A,ie),e(w,ve),e(w,V),e(V,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,ye),e(x,he),e(x,X),e(X,Me),e(U,be),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 b0(J){let d,b,h,m,T;return{c(){d=s("p"),b=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);b=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,b),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function T0(J){let d,b,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"),b=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,b),_(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 w0(J){let d,b;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),b=!0},p:Ye,i(h){b||(M(d.$$.fragment,h),b=!0)},o(h){$(d.$$.fragment,h),b=!1},d(h){E(d,h)}}}function v0(J){let d,b,h,m,T,i,p,C,Te,ge,P,ce,K,w,we,G,ue,Ie,S,ae,le,A,ie,ve,V,ke,_e,R,Fe,de,ne,U,x,pe,D,ye,he,X,Me,be,I,$e,L,se,fe,Q,Ee,me,B,je,q,ze,ee,W,Ce,Z,Je,Ue;return{c(){d=s("p"),b=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 `),S=s("code"),ae=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),A=s("code"),ie=n("fit()"),ve=n(" and "),V=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"),ye=n("input_ids"),he=n(" only and nothing else: "),X=s("code"),Me=n("model(input_ids)"),be=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);b=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 `),S=r(z,"CODE",{});var Re=a(S);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 `),A=r(z,"CODE",{});var xe=a(A);ie=o(xe,"fit()"),xe.forEach(t),ve=o(z," and "),V=r(z,"CODE",{});var Ge=a(V);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 Ae=a(R);Fe=o(Ae,"Functional"),Ae.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 Ve=a(D);ye=o(Ve,"input_ids"),Ve.forEach(t),he=o(O," only and nothing else: "),X=r(O,"CODE",{});var We=a(X);Me=o(We,"model(input_ids)"),We.forEach(t),O.forEach(t),be=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 Xe=a(L);se=o(Xe,"model([input_ids, attention_mask])"),Xe.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 Se=a(q);ze=o(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.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,b),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,S),e(S,ae),e(w,le),e(w,A),e(A,ie),e(w,ve),e(w,V),e(V,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,ye),e(x,he),e(x,X),e(X,Me),e(U,be),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 k0(J){let d,b,h,m,T;return{c(){d=s("p"),b=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);b=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,b),e(d,h),e(h,m),e(d,T)},d(i){i&&t(d)}}}function F0(J){let d,b,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"),b=n("Example:"),h=c(),v(m.$$.fragment)},l(i){d=r(i,"P",{});var p=a(d);b=o(p,"Example:"),p.forEach(t),h=u(i),k(m.$$.fragment,i)},m(i,p){_(i,d,p),e(d,b),_(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 M0(J){let d,b;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),b=!0},p:Ye,i(h){b||(M(d.$$.fragment,h),b=!0)},o(h){$(d.$$.fragment,h),b=!1},d(h){E(d,h)}}}function $0(J){let d,b,h,m,T,i,p,C,Te,ge,P,ce,K,w,we,G,ue,Ie,S,ae,le,A,ie,ve,V,ke,_e,R,Fe,de,ne,U,x,pe,D,ye,he,X,Me,be,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,Ae,N,O,Ve,We,Y,Xe,Ze,re,Se,H,Le,Uh,Is,Ih,xh,_u,cn,oo,Si,xs,Wh,Li,Zh,yu,_t,Di,El,qh,Nh,Qi,jl,Bh,Ph,Oi,zl,Rh,Gh,Yi,Cl,Ah,Vh,Hi,Jl,Xh,bu,un,so,Ki,Ws,Sh,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,yf,sd,bf,Tf,Gs,ql,wf,rd,vf,kf,Nl,Ff,ad,Mf,$f,ao,As,Ef,Vs,jf,ld,zf,Cf,Jf,It,Xs,Uf,id,If,xf,lo,Wf,fn,Zf,dd,qf,Nf,cd,Bf,Pf,Rf,Bl,Ss,ku,mn,io,ud,Ls,Gf,pd,Af,Fu,gt,Ds,Vf,Qs,Xf,hd,Sf,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,yd,hm,fm,bd,mm,gm,Mu,_n,uo,Td,er,_m,wd,ym,$u,yn,tr,bm,nr,Tm,Al,wm,vm,Eu,bn,or,km,sr,Fm,Vl,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,Xl,qm,Nm,Bm,cr,Pm,ur,Rm,Gm,Am,Wt,pr,Vm,wn,Xm,Sl,Sm,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,yr,ug,br,pg,hg,fg,Zt,Tr,mg,kn,gg,Dl,_g,yg,zd,bg,Tg,wg,go,vg,_o,Uu,Fn,yo,Cd,wr,kg,Jd,Fg,Iu,Mn,vr,Mg,qt,kr,$g,$n,Eg,Ql,jg,zg,Ud,Cg,Jg,Ug,bo,Ig,To,xu,En,wo,Id,Fr,xg,xd,Wg,Wu,ut,Mr,Zg,$r,qg,Wd,Ng,Bg,Pg,Er,Rg,jr,Gg,Ag,Vg,zr,Xg,Ol,Sg,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,__,y_,b_,Nr,T_,Br,w_,v_,k_,yt,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_,Ad,Z_,q_,Ar,N_,Vr,B_,P_,R_,Xr,G_,ei,A_,V_,X_,Sr,S_,Lr,L_,D_,Q_,Bt,Dr,O_,Un,Y_,ti,H_,K_,Vd,ey,ty,ny,zo,oy,Co,Pu,In,Jo,Xd,Qr,sy,Sd,ry,Ru,ft,Or,ay,Ld,ly,iy,Yr,dy,Hr,cy,uy,py,Kr,hy,ni,fy,my,gy,ea,_y,ta,yy,by,Ty,Pt,na,wy,xn,vy,oi,ky,Fy,Dd,My,$y,Ey,Uo,jy,Io,Gu,Wn,xo,Qd,oa,zy,Od,Cy,Au,mt,sa,Jy,Zn,Uy,Yd,Iy,xy,Hd,Wy,Zy,qy,ra,Ny,aa,By,Py,Ry,la,Gy,si,Ay,Vy,Xy,ia,Sy,da,Ly,Dy,Qy,Rt,ca,Oy,qn,Yy,ri,Hy,Ky,Kd,eb,tb,nb,Wo,ob,Zo,Vu,Nn,qo,ec,ua,sb,tc,rb,Xu,tt,pa,ab,nc,lb,ib,ha,db,fa,cb,ub,pb,ma,hb,ai,fb,mb,gb,ga,_b,_a,yb,bb,Tb,No,wb,Gt,ya,vb,Bn,kb,li,Fb,Mb,oc,$b,Eb,jb,Bo,zb,Po,Su,Pn,Ro,sc,ba,Cb,rc,Jb,Lu,nt,Ta,Ub,ac,Ib,xb,wa,Wb,va,Zb,qb,Nb,ka,Bb,ii,Pb,Rb,Gb,Fa,Ab,Ma,Vb,Xb,Sb,Go,Lb,At,$a,Db,Rn,Qb,di,Ob,Yb,lc,Hb,Kb,eT,Ao,tT,Vo,Du,Gn,Xo,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,yT,So,bT,Vt,xa,TT,An,wT,ui,vT,kT,uc,FT,MT,$T,Lo,ET,Do,Ou,Vn,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,AT,Ga,VT,XT,ST,Oo,LT,bt,Aa,DT,Xn,QT,hi,OT,YT,mc,HT,KT,ew,Yo,tw,Ho,nw,Ko,Hu,Sn,es,gc,Va,ow,_c,sw,Ku,rt,Xa,rw,yc,aw,lw,Sa,iw,La,dw,cw,uw,Da,pw,fi,hw,fw,mw,Qa,gw,Oa,_w,yw,bw,ts,Tw,Tt,Ya,ww,Ln,vw,mi,kw,Fw,bc,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,Aw,sl,Vw,Xw,Sw,as,Lw,Xt,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,yi,pv,hv,fv,ul,mv,pl,gv,_v,yv,cs,bv,wt,hl,Tv,Yn,wv,bi,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,yl,Gv,Ti,Av,Vv,Xv,bl,Sv,Tl,Lv,Dv,Qv,ms,Ov,vt,wl,Yv,eo,Hv,wi,Kv,ek,Uc,tk,nk,ok,gs,sk,_s,rk,ys,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.33.0/en/model_doc/funnel#transformers.FunnelModel">FunnelModel</a> or <a href="/docs/transformers/v4.33.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.33.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.33.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.33.0/src/transformers/models/funnel/tokenization_funnel.py#L240",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>
`}}),As=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.33.0/src/transformers/models/funnel/tokenization_funnel.py#L266",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>
`}}),Xs=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.33.0/src/transformers/models/funnel/tokenization_funnel.py#L294",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:[I1]},$$scope:{ctx:J}}}),Ss=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.33.0/src/transformers/models/funnel/tokenization_funnel.py#L324"}}),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.33.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.33.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.33.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:[x1]},$$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.33.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.33.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.33.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.33.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.33.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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.33.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.33.0/src/transformers/models/funnel/modeling_funnel.py#L942",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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:[W1]},$$scope:{ctx:J}}}),fo=new Oe({props:{anchor:"transformers.FunnelBaseModel.forward.example",$$slots:{default:[Z1]},$$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.33.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.33.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.33.0/src/transformers/models/funnel/modeling_funnel.py#L1003"}}),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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.33.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.33.0/src/transformers/models/funnel/modeling_funnel.py#L1020",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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:[q1]},$$scope:{ctx:J}}}),_o=new Oe({props:{anchor:"transformers.FunnelModel.forward.example",$$slots:{default:[N1]},$$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.33.0/src/transformers/models/funnel/modeling_funnel.py#L1111"}}),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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.33.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.33.0/src/transformers/models/funnel/modeling_funnel.py#L1120",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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>
`}}),bo=new De({props:{$$slots:{default:[B1]},$$scope:{ctx:J}}}),To=new Oe({props:{anchor:"transformers.FunnelForPreTraining.forward.example",$$slots:{default:[P1]},$$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.33.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.33.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.33.0/src/transformers/models/funnel/modeling_funnel.py#L1194"}}),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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.33.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.33.0/src/transformers/models/funnel/modeling_funnel.py#L1212",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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:[R1]},$$scope:{ctx:J}}}),ko=new Oe({props:{anchor:"transformers.FunnelForMaskedLM.forward.example",$$slots:{default:[G1]},$$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.33.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.33.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.33.0/src/transformers/models/funnel/modeling_funnel.py#L1275"}}),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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.33.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.33.0/src/transformers/models/funnel/modeling_funnel.py#L1286",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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:[A1]},$$scope:{ctx:J}}}),$o=new Oe({props:{anchor:"transformers.FunnelForSequenceClassification.forward.example",$$slots:{default:[V1]},$$scope:{ctx:J}}}),Eo=new Oe({props:{anchor:"transformers.FunnelForSequenceClassification.forward.example-2",$$slots:{default:[X1]},$$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.33.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.33.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.33.0/src/transformers/models/funnel/modeling_funnel.py#L1367"}}),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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.33.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.33.0/src/transformers/models/funnel/modeling_funnel.py#L1376",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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:[S1]},$$scope:{ctx:J}}}),Co=new Oe({props:{anchor:"transformers.FunnelForMultipleChoice.forward.example",$$slots:{default:[L1]},$$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.33.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.33.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.33.0/src/transformers/models/funnel/modeling_funnel.py#L1450"}}),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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.33.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.33.0/src/transformers/models/funnel/modeling_funnel.py#L1462",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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:[D1]},$$scope:{ctx:J}}}),Io=new Oe({props:{anchor:"transformers.FunnelForTokenClassification.forward.example",$$slots:{default:[Q1]},$$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.33.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.33.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.33.0/src/transformers/models/funnel/modeling_funnel.py#L1523"}}),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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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.33.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.33.0/src/transformers/models/funnel/modeling_funnel.py#L1534",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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:[O1]},$$scope:{ctx:J}}}),Zo=new Oe({props:{anchor:"transformers.FunnelForQuestionAnswering.forward.example",$$slots:{default:[Y1]},$$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.33.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.33.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1107"}}),No=new De({props:{$$slots:{default:[H1]},$$scope:{ctx:J}}}),ya=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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.33.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.33.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.33.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1112",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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:[K1]},$$scope:{ctx:J}}}),Po=new Oe({props:{anchor:"transformers.TFFunnelBaseModel.call.example",$$slots:{default:[e0]},$$scope:{ctx:J}}}),ba=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.33.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.33.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1155"}}),Go=new De({props:{$$slots:{default:[t0]},$$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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.33.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.33.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.33.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1160",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ao=new De({props:{$$slots:{default:[n0]},$$scope:{ctx:J}}}),Vo=new Oe({props:{anchor:"transformers.TFFunnelModel.call.example",$$slots:{default:[o0]},$$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.33.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.33.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1205"}}),So=new De({props:{$$slots:{default:[s0]},$$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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.33.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.33.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.33.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1212",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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:[r0]},$$scope:{ctx:J}}}),Do=new Oe({props:{anchor:"transformers.TFFunnelForPreTraining.call.example",$$slots:{default:[a0]},$$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.33.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.33.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1273"}}),Oo=new De({props:{$$slots:{default:[l0]},$$scope:{ctx:J}}}),Aa=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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.33.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.33.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.33.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1287",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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:[i0]},$$scope:{ctx:J}}}),Ho=new Oe({props:{anchor:"transformers.TFFunnelForMaskedLM.call.example",$$slots:{default:[d0]},$$scope:{ctx:J}}}),Ko=new Oe({props:{anchor:"transformers.TFFunnelForMaskedLM.call.example-2",$$slots:{default:[c0]},$$scope:{ctx:J}}}),Va=new Qe({}),Xa=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.33.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.33.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1351"}}),ts=new De({props:{$$slots:{default:[u0]},$$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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.33.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.33.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.33.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1359",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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:[p0]},$$scope:{ctx:J}}}),os=new Oe({props:{anchor:"transformers.TFFunnelForSequenceClassification.call.example",$$slots:{default:[h0]},$$scope:{ctx:J}}}),ss=new Oe({props:{anchor:"transformers.TFFunnelForSequenceClassification.call.example-2",$$slots:{default:[f0]},$$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.33.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.33.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1426"}}),as=new De({props:{$$slots:{default:[m0]},$$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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.33.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.33.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.33.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1437",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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:[g0]},$$scope:{ctx:J}}}),is=new Oe({props:{anchor:"transformers.TFFunnelForMultipleChoice.call.example",$$slots:{default:[_0]},$$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.33.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.33.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1521"}}),cs=new De({props:{$$slots:{default:[y0]},$$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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.33.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.33.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.33.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1532",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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:[b0]},$$scope:{ctx:J}}}),ps=new Oe({props:{anchor:"transformers.TFFunnelForTokenClassification.call.example",$$slots:{default:[T0]},$$scope:{ctx:J}}}),hs=new Oe({props:{anchor:"transformers.TFFunnelForTokenClassification.call.example-2",$$slots:{default:[w0]},$$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.33.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.33.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1598"}}),ms=new De({props:{$$slots:{default:[v0]},$$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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.33.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.33.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.33.0/src/transformers/models/funnel/modeling_tf_funnel.py#L1608",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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:[k0]},$$scope:{ctx:J}}}),_s=new Oe({props:{anchor:"transformers.TFFunnelForQuestionAnswering.call.example",$$slots:{default:[F0]},$$scope:{ctx:J}}}),ys=new Oe({props:{anchor:"transformers.TFFunnelForQuestionAnswering.call.example-2",$$slots:{default:[M0]},$$scope:{ctx:J}}}),{c(){d=s("meta"),b=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"),S=c(),ae=s("h2"),le=s("a"),A=s("span"),v(ie.$$.fragment),ve=c(),V=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:"),ye=c(),he=s("p"),X=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.`),be=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"),Ae=n(", "),N=s("a"),O=n("FunnelForSequenceClassification"),Ve=n(` and
`),We=s("a"),Y=n("FunnelForMultipleChoice"),Xe=n("."),Ze=c(),re=s("p"),Se=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"),Si=s("span"),v(xs.$$.fragment),Wh=c(),Li=s("span"),Zh=n("Documentation resources"),yu=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"),Ah=n("Masked language modeling task guide"),Vh=c(),Hi=s("li"),Jl=s("a"),Xh=n("Multiple choice task guide"),bu=c(),un=s("h2"),so=s("a"),Ki=s("span"),v(Ws.$$.fragment),Sh=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),yf=c(),sd=s("p"),bf=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(As.$$.fragment),Ef=c(),Vs=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(Xs.$$.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(Ss.$$.fragment),ku=c(),mn=s("h2"),io=s("a"),ud=s("span"),v(Ls.$$.fragment),Gf=c(),pd=s("span"),Af=n("FunnelTokenizerFast"),Fu=c(),gt=s("div"),v(Ds.$$.fragment),Vf=c(),Qs=s("p"),Xf=n("Construct a \u201Cfast\u201D Funnel Transformer tokenizer (backed by HuggingFace\u2019s "),hd=s("em"),Sf=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 "),yd=s("code"),hm=n("token_ids_1"),fm=n(" is "),bd=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"),ym=n("Funnel specific outputs"),$u=c(),yn=s("div"),v(tr.$$.fragment),bm=c(),nr=s("p"),Tm=n("Output type of "),Al=s("a"),wm=n("FunnelForPreTraining"),vm=n("."),Eu=c(),bn=s("div"),v(or.$$.fragment),km=c(),sr=s("p"),Fm=n("Output type of "),Vl=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 "),Xl=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.`),Am=c(),Wt=s("div"),v(pr.$$.fragment),Vm=c(),wn=s("p"),Xm=n("The "),Sl=s("a"),Sm=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(),yr=s("p"),ug=n("This model is also a PyTorch "),br=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"),yg=n(" forward method, overrides the "),zd=s("code"),bg=n("__call__"),Tg=n(" special method."),wg=c(),v(go.$$.fragment),vg=c(),v(_o.$$.fragment),Uu=c(),Fn=s("h2"),yo=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(bo.$$.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`),Ag=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Vg=c(),zr=s("p"),Xg=n("This model inherits from "),Ol=s("a"),Sg=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"),y_=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.)`),b_=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(),yt=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(),Ad=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(),Ar=s("p"),N_=n("The Funnel Transformer model was proposed in "),Vr=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(),Xr=s("p"),G_=n("This model inherits from "),ei=s("a"),A_=n("PreTrainedModel"),V_=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.)`),X_=c(),Sr=s("p"),S_=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 "),Vd=s("code"),ey=n("__call__"),ty=n(" special method."),ny=c(),v(zo.$$.fragment),oy=c(),v(Co.$$.fragment),Pu=c(),In=s("h2"),Jo=s("a"),Xd=s("span"),v(Qr.$$.fragment),sy=c(),Sd=s("span"),ry=n("FunnelForTokenClassification"),Ru=c(),ft=s("div"),v(Or.$$.fragment),ay=c(),Ld=s("p"),ly=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.`),iy=c(),Yr=s("p"),dy=n("The Funnel Transformer model was proposed in "),Hr=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(),Kr=s("p"),hy=n("This model inherits from "),ni=s("a"),fy=n("PreTrainedModel"),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(),ea=s("p"),_y=n("This model is also a PyTorch "),ta=s("a"),yy=n("torch.nn.Module"),by=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ty=c(),Pt=s("div"),v(na.$$.fragment),wy=c(),xn=s("p"),vy=n("The "),oi=s("a"),ky=n("FunnelForTokenClassification"),Fy=n(" forward method, overrides the "),Dd=s("code"),My=n("__call__"),$y=n(" special method."),Ey=c(),v(Uo.$$.fragment),jy=c(),v(Io.$$.fragment),Gu=c(),Wn=s("h2"),xo=s("a"),Qd=s("span"),v(oa.$$.fragment),zy=c(),Od=s("span"),Cy=n("FunnelForQuestionAnswering"),Au=c(),mt=s("div"),v(sa.$$.fragment),Jy=c(),Zn=s("p"),Uy=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"),Iy=n("span start logits"),xy=n(" and "),Hd=s("code"),Wy=n("span end logits"),Zy=n(")."),qy=c(),ra=s("p"),Ny=n("The Funnel Transformer model was proposed in "),aa=s("a"),By=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),Py=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Ry=c(),la=s("p"),Gy=n("This model inherits from "),si=s("a"),Ay=n("PreTrainedModel"),Vy=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.)`),Xy=c(),ia=s("p"),Sy=n("This model is also a PyTorch "),da=s("a"),Ly=n("torch.nn.Module"),Dy=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Qy=c(),Rt=s("div"),v(ca.$$.fragment),Oy=c(),qn=s("p"),Yy=n("The "),ri=s("a"),Hy=n("FunnelForQuestionAnswering"),Ky=n(" forward method, overrides the "),Kd=s("code"),eb=n("__call__"),tb=n(" special method."),nb=c(),v(Wo.$$.fragment),ob=c(),v(Zo.$$.fragment),Vu=c(),Nn=s("h2"),qo=s("a"),ec=s("span"),v(ua.$$.fragment),sb=c(),tc=s("span"),rb=n("TFFunnelBaseModel"),Xu=c(),tt=s("div"),v(pa.$$.fragment),ab=c(),nc=s("p"),lb=n(`The base Funnel Transformer Model transformer outputting raw hidden-states without upsampling head (also called
decoder) or any task-specific head on top.`),ib=c(),ha=s("p"),db=n("The Funnel Transformer model was proposed in "),fa=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(),ma=s("p"),hb=n("This model inherits from "),ai=s("a"),fb=n("TFPreTrainedModel"),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(),ga=s("p"),_b=n("This model is also a "),_a=s("a"),yb=n("tf.keras.Model"),bb=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.`),Tb=c(),v(No.$$.fragment),wb=c(),Gt=s("div"),v(ya.$$.fragment),vb=c(),Bn=s("p"),kb=n("The "),li=s("a"),Fb=n("TFFunnelBaseModel"),Mb=n(" forward method, overrides the "),oc=s("code"),$b=n("__call__"),Eb=n(" special method."),jb=c(),v(Bo.$$.fragment),zb=c(),v(Po.$$.fragment),Su=c(),Pn=s("h2"),Ro=s("a"),sc=s("span"),v(ba.$$.fragment),Cb=c(),rc=s("span"),Jb=n("TFFunnelModel"),Lu=c(),nt=s("div"),v(Ta.$$.fragment),Ub=c(),ac=s("p"),Ib=n("The bare Funnel Transformer Model transformer outputting raw hidden-states without any specific head on top."),xb=c(),wa=s("p"),Wb=n("The Funnel Transformer model was proposed in "),va=s("a"),Zb=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),qb=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Nb=c(),ka=s("p"),Bb=n("This model inherits from "),ii=s("a"),Pb=n("TFPreTrainedModel"),Rb=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(),Fa=s("p"),Ab=n("This model is also a "),Ma=s("a"),Vb=n("tf.keras.Model"),Xb=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.`),Sb=c(),v(Go.$$.fragment),Lb=c(),At=s("div"),v($a.$$.fragment),Db=c(),Rn=s("p"),Qb=n("The "),di=s("a"),Ob=n("TFFunnelModel"),Yb=n(" forward method, overrides the "),lc=s("code"),Hb=n("__call__"),Kb=n(" special method."),eT=c(),v(Ao.$$.fragment),tT=c(),v(Vo.$$.fragment),Du=c(),Gn=s("h2"),Xo=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.`),yT=c(),v(So.$$.fragment),bT=c(),Vt=s("div"),v(xa.$$.fragment),TT=c(),An=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(),Vn=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"),AT=n("This model is also a "),Ga=s("a"),VT=n("tf.keras.Model"),XT=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.`),ST=c(),v(Oo.$$.fragment),LT=c(),bt=s("div"),v(Aa.$$.fragment),DT=c(),Xn=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(),Sn=s("h2"),es=s("a"),gc=s("span"),v(Va.$$.fragment),ow=c(),_c=s("span"),sw=n("TFFunnelForSequenceClassification"),Ku=c(),rt=s("div"),v(Xa.$$.fragment),rw=c(),yc=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(),Sa=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"),yw=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.`),bw=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 "),bc=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"),Aw=n("This model is also a "),sl=s("a"),Vw=n("tf.keras.Model"),Xw=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.`),Sw=c(),v(as.$$.fragment),Lw=c(),Xt=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 "),yi=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.`),yv=c(),v(cs.$$.fragment),bv=c(),wt=s("div"),v(hl.$$.fragment),Tv=c(),Yn=s("p"),wv=n("The "),bi=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(),yl=s("p"),Gv=n("This model inherits from "),Ti=s("a"),Av=n("TFPreTrainedModel"),Vv=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.)`),Xv=c(),bl=s("p"),Sv=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(ys.$$.fragment),this.h()},l(l){const y=J1('[data-svelte="svelte-1phssyn"]',document.head);d=r(y,"META",{name:!0,content:!0}),y.forEach(t),b=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),S=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);A=r(Nc,"SPAN",{});var Bc=a(A);k(ie.$$.fragment,Bc),Bc.forEach(t),Nc.forEach(t),ve=u(Fl),V=r(Fl,"SPAN",{});var Pc=a(V);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),ye=u(l),he=r(l,"P",{});var Ac=a(he);X=r(Ac,"EM",{});var Vc=a(X);Me=o(Vc,`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.`),Vc.forEach(t),Ac.forEach(t),be=u(l),I=r(l,"P",{});var Xc=a(I);$e=o(Xc,"Tips:"),Xc.forEach(t),L=u(l),se=r(l,"UL",{});var to=a(se);fe=r(to,"LI",{});var Sc=a(fe);Q=o(Sc,`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.`),Sc.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),Ae=o(Ke,", "),N=r(Ke,"A",{href:!0});var eu=a(N);O=o(eu,"FunnelForSequenceClassification"),eu.forEach(t),Ve=o(Ke,` and
`),We=r(Ke,"A",{href:!0});var tu=a(We);Y=o(tu,"FunnelForMultipleChoice"),tu.forEach(t),Xe=o(Ke,"."),Ke.forEach(t),to.forEach(t),Ze=u(l),re=r(l,"P",{});var no=a(re);Se=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);Si=r(su,"SPAN",{});var ru=a(Si);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),yu=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);Ah=o(fu,"Masked language modeling task guide"),fu.forEach(t),hu.forEach(t),Vh=u(Ut),Hi=r(Ut,"LI",{});var mu=a(Hi);Jl=r(mu,"A",{href:!0});var gu=a(Jl);Xh=o(gu,"Multiple choice task guide"),gu.forEach(t),mu.forEach(t),Ut.forEach(t),bu=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),Sh=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 bs=a(en);Qh=o(bs,"This is the configuration class to store the configuration of a "),Ul=r(bs,"A",{href:!0});var hk=a(Ul);Oh=o(hk,"FunnelModel"),hk.forEach(t),Yh=o(bs," or a "),Il=r(bs,"A",{href:!0});var fk=a(Il);Hh=o(fk,"TFBertModel"),fk.forEach(t),Kh=o(bs,`. 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(bs,"A",{href:!0,rel:!0});var mk=a(qs);ef=o(mk,"funnel-transformer/small"),mk.forEach(t),tf=o(bs," architecture."),bs.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 yk=a(ro);td=r(yk,"SPAN",{});var bk=a(td);k(Ns.$$.fragment,bk),bk.forEach(t),yk.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),yf=u(Fi),sd=r(Fi,"P",{});var kk=a(sd);bf=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(As.$$.fragment,up),Ef=u(up),Vs=r(up,"P",{});var pp=a(Vs);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(Xs.$$.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(Ss.$$.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);Af=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),Vf=u(on),Qs=r(on,"P",{});var fp=a(Qs);Xf=o(fp,"Construct a \u201Cfast\u201D Funnel Transformer tokenizer (backed by HuggingFace\u2019s "),hd=r(fp,"EM",{});var xk=a(hd);Sf=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 "),yd=r(Ei,"CODE",{});var Pk=a(yd);hm=o(Pk,"token_ids_1"),Pk.forEach(t),fm=o(Ei," is "),bd=r(Ei,"CODE",{});var Rk=a(bd);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 Ak=a(Td);k(er.$$.fragment,Ak),Ak.forEach(t),Gk.forEach(t),_m=u(_p),wd=r(_p,"SPAN",{});var Vk=a(wd);ym=o(Vk,"Funnel specific outputs"),Vk.forEach(t),_p.forEach(t),$u=u(l),yn=r(l,"DIV",{class:!0});var yp=a(yn);k(tr.$$.fragment,yp),bm=u(yp),nr=r(yp,"P",{});var bp=a(nr);Tm=o(bp,"Output type of "),Al=r(bp,"A",{href:!0});var Xk=a(Al);wm=o(Xk,"FunnelForPreTraining"),Xk.forEach(t),vm=o(bp,"."),bp.forEach(t),yp.forEach(t),Eu=u(l),bn=r(l,"DIV",{class:!0});var Tp=a(bn);k(or.$$.fragment,Tp),km=u(Tp),sr=r(Tp,"P",{});var wp=a(sr);Fm=o(wp,"Output type of "),Vl=r(wp,"A",{href:!0});var Sk=a(Vl);Mm=o(Sk,"FunnelForPreTraining"),Sk.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 St=a(dt);k(ar.$$.fragment,St),zm=u(St),Fd=r(St,"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(St),lr=r(St,"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(St),dr=r(St,"P",{});var Fp=a(dr);Zm=o(Fp,"This model inherits from "),Xl=r(Fp,"A",{href:!0});var Hk=a(Xl);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(St),cr=r(St,"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),Am=u(St),Wt=r(St,"DIV",{class:!0});var vs=a(Wt);k(pr.$$.fragment,vs),Vm=u(vs),wn=r(vs,"P",{});var ji=a(wn);Xm=o(ji,"The "),Sl=r(ji,"A",{href:!0});var eF=a(Sl);Sm=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),St.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),yr=r(Lt,"P",{});var zp=a(yr);ug=o(zp,"This model is also a PyTorch "),br=r(zp,"A",{href:!0,rel:!0});var iF=a(br);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),yg=o(zi," forward method, overrides the "),zd=r(zi,"CODE",{});var cF=a(zd);bg=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);yo=r(Cp,"A",{id:!0,class:!0,href:!0});var uF=a(yo);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(bo.$$.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 yF=a(xd);Wg=o(yF,"FunnelForMaskedLM"),yF.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 bF=a(Wd);Ng=o(bF,"language modeling"),bF.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),Ag=o(xp," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),xp.forEach(t),Vg=u(Dt),zr=r(Dt,"P",{});var Wp=a(zr);Xg=o(Wp,"This model inherits from "),Ol=r(Wp,"A",{href:!0});var wF=a(Ol);Sg=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),y_=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),b_=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),yt=r(Qt,"DIV",{class:!0});var sn=a(yt);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),Ad=r(Ot,"P",{});var qF=a(Ad);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),Ar=r(Ot,"P",{});var Gp=a(Ar);N_=o(Gp,"The Funnel Transformer model was proposed in "),Vr=r(Gp,"A",{href:!0,rel:!0});var NF=a(Vr);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),Xr=r(Ot,"P",{});var Ap=a(Xr);G_=o(Ap,"This model inherits from "),ei=r(Ap,"A",{href:!0});var BF=a(ei);A_=o(BF,"PreTrainedModel"),BF.forEach(t),V_=o(Ap,`. 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.)`),Ap.forEach(t),X_=u(Ot),Sr=r(Ot,"P",{});var Vp=a(Sr);S_=o(Vp,"This model is also a PyTorch "),Lr=r(Vp,"A",{href:!0,rel:!0});var PF=a(Lr);L_=o(PF,"torch.nn.Module"),PF.forEach(t),D_=o(Vp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Vp.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 "),Vd=r(Ii,"CODE",{});var GF=a(Vd);ey=o(GF,"__call__"),GF.forEach(t),ty=o(Ii," special method."),Ii.forEach(t),ny=u($s),k(zo.$$.fragment,$s),oy=u($s),k(Co.$$.fragment,$s),$s.forEach(t),Ot.forEach(t),Pu=u(l),In=r(l,"H2",{class:!0});var Xp=a(In);Jo=r(Xp,"A",{id:!0,class:!0,href:!0});var AF=a(Jo);Xd=r(AF,"SPAN",{});var VF=a(Xd);k(Qr.$$.fragment,VF),VF.forEach(t),AF.forEach(t),sy=u(Xp),Sd=r(Xp,"SPAN",{});var XF=a(Sd);ry=o(XF,"FunnelForTokenClassification"),XF.forEach(t),Xp.forEach(t),Ru=u(l),ft=r(l,"DIV",{class:!0});var Yt=a(ft);k(Or.$$.fragment,Yt),ay=u(Yt),Ld=r(Yt,"P",{});var SF=a(Ld);ly=o(SF,`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.`),SF.forEach(t),iy=u(Yt),Yr=r(Yt,"P",{});var Sp=a(Yr);dy=o(Sp,"The Funnel Transformer model was proposed in "),Hr=r(Sp,"A",{href:!0,rel:!0});var LF=a(Hr);cy=o(LF,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),LF.forEach(t),uy=o(Sp," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Sp.forEach(t),py=u(Yt),Kr=r(Yt,"P",{});var Lp=a(Kr);hy=o(Lp,"This model inherits from "),ni=r(Lp,"A",{href:!0});var DF=a(ni);fy=o(DF,"PreTrainedModel"),DF.forEach(t),my=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),gy=u(Yt),ea=r(Yt,"P",{});var Dp=a(ea);_y=o(Dp,"This model is also a PyTorch "),ta=r(Dp,"A",{href:!0,rel:!0});var QF=a(ta);yy=o(QF,"torch.nn.Module"),QF.forEach(t),by=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),Ty=u(Yt),Pt=r(Yt,"DIV",{class:!0});var Es=a(Pt);k(na.$$.fragment,Es),wy=u(Es),xn=r(Es,"P",{});var xi=a(xn);vy=o(xi,"The "),oi=r(xi,"A",{href:!0});var OF=a(oi);ky=o(OF,"FunnelForTokenClassification"),OF.forEach(t),Fy=o(xi," forward method, overrides the "),Dd=r(xi,"CODE",{});var YF=a(Dd);My=o(YF,"__call__"),YF.forEach(t),$y=o(xi," special method."),xi.forEach(t),Ey=u(Es),k(Uo.$$.fragment,Es),jy=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),zy=u(Qp),Od=r(Qp,"SPAN",{});var eM=a(Od);Cy=o(eM,"FunnelForQuestionAnswering"),eM.forEach(t),Qp.forEach(t),Au=u(l),mt=r(l,"DIV",{class:!0});var Ht=a(mt);k(sa.$$.fragment,Ht),Jy=u(Ht),Zn=r(Ht,"P",{});var Wi=a(Zn);Uy=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 tM=a(Yd);Iy=o(tM,"span start logits"),tM.forEach(t),xy=o(Wi," and "),Hd=r(Wi,"CODE",{});var nM=a(Hd);Wy=o(nM,"span end logits"),nM.forEach(t),Zy=o(Wi,")."),Wi.forEach(t),qy=u(Ht),ra=r(Ht,"P",{});var Op=a(ra);Ny=o(Op,"The Funnel Transformer model was proposed in "),aa=r(Op,"A",{href:!0,rel:!0});var oM=a(aa);By=o(oM,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),oM.forEach(t),Py=o(Op," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Op.forEach(t),Ry=u(Ht),la=r(Ht,"P",{});var Yp=a(la);Gy=o(Yp,"This model inherits from "),si=r(Yp,"A",{href:!0});var sM=a(si);Ay=o(sM,"PreTrainedModel"),sM.forEach(t),Vy=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),Xy=u(Ht),ia=r(Ht,"P",{});var Hp=a(ia);Sy=o(Hp,"This model is also a PyTorch "),da=r(Hp,"A",{href:!0,rel:!0});var rM=a(da);Ly=o(rM,"torch.nn.Module"),rM.forEach(t),Dy=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),Qy=u(Ht),Rt=r(Ht,"DIV",{class:!0});var js=a(Rt);k(ca.$$.fragment,js),Oy=u(js),qn=r(js,"P",{});var Zi=a(qn);Yy=o(Zi,"The "),ri=r(Zi,"A",{href:!0});var aM=a(ri);Hy=o(aM,"FunnelForQuestionAnswering"),aM.forEach(t),Ky=o(Zi," forward method, overrides the "),Kd=r(Zi,"CODE",{});var lM=a(Kd);eb=o(lM,"__call__"),lM.forEach(t),tb=o(Zi," special method."),Zi.forEach(t),nb=u(js),k(Wo.$$.fragment,js),ob=u(js),k(Zo.$$.fragment,js),js.forEach(t),Ht.forEach(t),Vu=u(l),Nn=r(l,"H2",{class:!0});var Kp=a(Nn);qo=r(Kp,"A",{id:!0,class:!0,href:!0});var iM=a(qo);ec=r(iM,"SPAN",{});var dM=a(ec);k(ua.$$.fragment,dM),dM.forEach(t),iM.forEach(t),sb=u(Kp),tc=r(Kp,"SPAN",{});var cM=a(tc);rb=o(cM,"TFFunnelBaseModel"),cM.forEach(t),Kp.forEach(t),Xu=u(l),tt=r(l,"DIV",{class:!0});var Ft=a(tt);k(pa.$$.fragment,Ft),ab=u(Ft),nc=r(Ft,"P",{});var uM=a(nc);lb=o(uM,`The base Funnel Transformer Model transformer outputting raw hidden-states without upsampling head (also called
decoder) or any task-specific head on top.`),uM.forEach(t),ib=u(Ft),ha=r(Ft,"P",{});var eh=a(ha);db=o(eh,"The Funnel Transformer model was proposed in "),fa=r(eh,"A",{href:!0,rel:!0});var pM=a(fa);cb=o(pM,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),pM.forEach(t),ub=o(eh," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),eh.forEach(t),pb=u(Ft),ma=r(Ft,"P",{});var th=a(ma);hb=o(th,"This model inherits from "),ai=r(th,"A",{href:!0});var hM=a(ai);fb=o(hM,"TFPreTrainedModel"),hM.forEach(t),mb=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),gb=u(Ft),ga=r(Ft,"P",{});var nh=a(ga);_b=o(nh,"This model is also a "),_a=r(nh,"A",{href:!0,rel:!0});var fM=a(_a);yb=o(fM,"tf.keras.Model"),fM.forEach(t),bb=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),Tb=u(Ft),k(No.$$.fragment,Ft),wb=u(Ft),Gt=r(Ft,"DIV",{class:!0});var zs=a(Gt);k(ya.$$.fragment,zs),vb=u(zs),Bn=r(zs,"P",{});var qi=a(Bn);kb=o(qi,"The "),li=r(qi,"A",{href:!0});var mM=a(li);Fb=o(mM,"TFFunnelBaseModel"),mM.forEach(t),Mb=o(qi," forward method, overrides the "),oc=r(qi,"CODE",{});var gM=a(oc);$b=o(gM,"__call__"),gM.forEach(t),Eb=o(qi," special method."),qi.forEach(t),jb=u(zs),k(Bo.$$.fragment,zs),zb=u(zs),k(Po.$$.fragment,zs),zs.forEach(t),Ft.forEach(t),Su=u(l),Pn=r(l,"H2",{class:!0});var oh=a(Pn);Ro=r(oh,"A",{id:!0,class:!0,href:!0});var _M=a(Ro);sc=r(_M,"SPAN",{});var yM=a(sc);k(ba.$$.fragment,yM),yM.forEach(t),_M.forEach(t),Cb=u(oh),rc=r(oh,"SPAN",{});var bM=a(rc);Jb=o(bM,"TFFunnelModel"),bM.forEach(t),oh.forEach(t),Lu=u(l),nt=r(l,"DIV",{class:!0});var Mt=a(nt);k(Ta.$$.fragment,Mt),Ub=u(Mt),ac=r(Mt,"P",{});var TM=a(ac);Ib=o(TM,"The bare Funnel Transformer Model transformer outputting raw hidden-states without any specific head on top."),TM.forEach(t),xb=u(Mt),wa=r(Mt,"P",{});var sh=a(wa);Wb=o(sh,"The Funnel Transformer model was proposed in "),va=r(sh,"A",{href:!0,rel:!0});var wM=a(va);Zb=o(wM,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),wM.forEach(t),qb=o(sh," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),sh.forEach(t),Nb=u(Mt),ka=r(Mt,"P",{});var rh=a(ka);Bb=o(rh,"This model inherits from "),ii=r(rh,"A",{href:!0});var vM=a(ii);Pb=o(vM,"TFPreTrainedModel"),vM.forEach(t),Rb=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),Gb=u(Mt),Fa=r(Mt,"P",{});var ah=a(Fa);Ab=o(ah,"This model is also a "),Ma=r(ah,"A",{href:!0,rel:!0});var kM=a(Ma);Vb=o(kM,"tf.keras.Model"),kM.forEach(t),Xb=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),Sb=u(Mt),k(Go.$$.fragment,Mt),Lb=u(Mt),At=r(Mt,"DIV",{class:!0});var Cs=a(At);k($a.$$.fragment,Cs),Db=u(Cs),Rn=r(Cs,"P",{});var Ni=a(Rn);Qb=o(Ni,"The "),di=r(Ni,"A",{href:!0});var FM=a(di);Ob=o(FM,"TFFunnelModel"),FM.forEach(t),Yb=o(Ni," forward method, overrides the "),lc=r(Ni,"CODE",{});var MM=a(lc);Hb=o(MM,"__call__"),MM.forEach(t),Kb=o(Ni," special method."),Ni.forEach(t),eT=u(Cs),k(Ao.$$.fragment,Cs),tT=u(Cs),k(Vo.$$.fragment,Cs),Cs.forEach(t),Mt.forEach(t),Du=u(l),Gn=r(l,"H2",{class:!0});var lh=a(Gn);Xo=r(lh,"A",{id:!0,class:!0,href:!0});var $M=a(Xo);ic=r($M,"SPAN",{});var EM=a(ic);k(Ea.$$.fragment,EM),EM.forEach(t),$M.forEach(t),nT=u(lh),dc=r(lh,"SPAN",{});var jM=a(dc);oT=o(jM,"TFFunnelModelForPreTraining"),jM.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 zM=a(cc);rT=o(zM,"Funnel model with a binary classification head on top as used during pretraining for identifying generated tokens."),zM.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 CM=a(Ca);iT=o(CM,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),CM.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 JM=a(ci);pT=o(JM,"TFPreTrainedModel"),JM.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 UM=a(Ia);gT=o(UM,"tf.keras.Model"),UM.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),yT=u($t),k(So.$$.fragment,$t),bT=u($t),Vt=r($t,"DIV",{class:!0});var Js=a(Vt);k(xa.$$.fragment,Js),TT=u(Js),An=r(Js,"P",{});var Bi=a(An);wT=o(Bi,"The "),ui=r(Bi,"A",{href:!0});var IM=a(ui);vT=o(IM,"TFFunnelForPreTraining"),IM.forEach(t),kT=o(Bi," forward method, overrides the "),uc=r(Bi,"CODE",{});var xM=a(uc);FT=o(xM,"__call__"),xM.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),Vn=r(l,"H2",{class:!0});var uh=a(Vn);Qo=r(uh,"A",{id:!0,class:!0,href:!0});var WM=a(Qo);pc=r(WM,"SPAN",{});var ZM=a(pc);k(Wa.$$.fragment,ZM),ZM.forEach(t),WM.forEach(t),jT=u(uh),hc=r(uh,"SPAN",{});var qM=a(hc);zT=o(qM,"TFFunnelForMaskedLM"),qM.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 NM=a(fc);UT=o(NM,"language modeling"),NM.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 BM=a(Ba);ZT=o(BM,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),BM.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 PM=a(pi);PT=o(PM,"TFPreTrainedModel"),PM.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);AT=o(mh,"This model is also a "),Ga=r(mh,"A",{href:!0,rel:!0});var RM=a(Ga);VT=o(RM,"tf.keras.Model"),RM.forEach(t),XT=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),ST=u(Et),k(Oo.$$.fragment,Et),LT=u(Et),bt=r(Et,"DIV",{class:!0});var rn=a(bt);k(Aa.$$.fragment,rn),DT=u(rn),Xn=r(rn,"P",{});var Pi=a(Xn);QT=o(Pi,"The "),hi=r(Pi,"A",{href:!0});var GM=a(hi);OT=o(GM,"TFFunnelForMaskedLM"),GM.forEach(t),YT=o(Pi," forward method, overrides the "),mc=r(Pi,"CODE",{});var AM=a(mc);HT=o(AM,"__call__"),AM.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),Sn=r(l,"H2",{class:!0});var gh=a(Sn);es=r(gh,"A",{id:!0,class:!0,href:!0});var VM=a(es);gc=r(VM,"SPAN",{});var XM=a(gc);k(Va.$$.fragment,XM),XM.forEach(t),VM.forEach(t),ow=u(gh),_c=r(gh,"SPAN",{});var SM=a(_c);sw=o(SM,"TFFunnelForSequenceClassification"),SM.forEach(t),gh.forEach(t),Ku=u(l),rt=r(l,"DIV",{class:!0});var jt=a(rt);k(Xa.$$.fragment,jt),rw=u(jt),yc=r(jt,"P",{});var LM=a(yc);aw=o(LM,`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.`),LM.forEach(t),lw=u(jt),Sa=r(jt,"P",{});var _h=a(Sa);iw=o(_h,"The Funnel Transformer model was proposed in "),La=r(_h,"A",{href:!0,rel:!0});var DM=a(La);dw=o(DM,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),DM.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 yh=a(Da);pw=o(yh,"This model inherits from "),fi=r(yh,"A",{href:!0});var QM=a(fi);hw=o(QM,"TFPreTrainedModel"),QM.forEach(t),fw=o(yh,`. 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.)`),yh.forEach(t),mw=u(jt),Qa=r(jt,"P",{});var bh=a(Qa);gw=o(bh,"This model is also a "),Oa=r(bh,"A",{href:!0,rel:!0});var OM=a(Oa);_w=o(OM,"tf.keras.Model"),OM.forEach(t),yw=o(bh,` 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.`),bh.forEach(t),bw=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 YM=a(mi);kw=o(YM,"TFFunnelForSequenceClassification"),YM.forEach(t),Fw=o(Ri," forward method, overrides the "),bc=r(Ri,"CODE",{});var HM=a(bc);Mw=o(HM,"__call__"),HM.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 KM=a(rs);Tc=r(KM,"SPAN",{});var e1=a(Tc);k(Ha.$$.fragment,e1),e1.forEach(t),KM.forEach(t),Cw=u(Th),wc=r(Th,"SPAN",{});var t1=a(wc);Jw=o(t1,"TFFunnelForMultipleChoice"),t1.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 n1=a(vc);Iw=o(n1,`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.`),n1.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 o1=a(tl);Zw=o(o1,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),o1.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 s1=a(gi);Pw=o(s1,"TFPreTrainedModel"),s1.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);Aw=o(kh,"This model is also a "),sl=r(kh,"A",{href:!0,rel:!0});var r1=a(sl);Vw=o(r1,"tf.keras.Model"),r1.forEach(t),Xw=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),Sw=u(zt),k(as.$$.fragment,zt),Lw=u(zt),Xt=r(zt,"DIV",{class:!0});var Us=a(Xt);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 a1=a(_i);Ow=o(a1,"TFFunnelForMultipleChoice"),a1.forEach(t),Yw=o(Gi," forward method, overrides the "),kc=r(Gi,"CODE",{});var l1=a(kc);Hw=o(l1,"__call__"),l1.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 i1=a(ds);Fc=r(i1,"SPAN",{});var d1=a(Fc);k(al.$$.fragment,d1),d1.forEach(t),i1.forEach(t),nv=u(Fh),Mc=r(Fh,"SPAN",{});var c1=a(Mc);ov=o(c1,"TFFunnelForTokenClassification"),c1.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 u1=a($c);rv=o(u1,`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.`),u1.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 p1=a(dl);iv=o(p1,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),p1.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 "),yi=r($h,"A",{href:!0});var h1=a(yi);pv=o(h1,"TFPreTrainedModel"),h1.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 f1=a(pl);gv=o(f1,"tf.keras.Model"),f1.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),yv=u(Ct),k(cs.$$.fragment,Ct),bv=u(Ct),wt=r(Ct,"DIV",{class:!0});var ln=a(wt);k(hl.$$.fragment,ln),Tv=u(ln),Yn=r(ln,"P",{});var Ai=a(Yn);wv=o(Ai,"The "),bi=r(Ai,"A",{href:!0});var m1=a(bi);vv=o(m1,"TFFunnelForTokenClassification"),m1.forEach(t),kv=o(Ai," forward method, overrides the "),Ec=r(Ai,"CODE",{});var g1=a(Ec);Fv=o(g1,"__call__"),g1.forEach(t),Mv=o(Ai," special method."),Ai.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 _1=a(fs);jc=r(_1,"SPAN",{});var y1=a(jc);k(fl.$$.fragment,y1),y1.forEach(t),_1.forEach(t),zv=u(jh),zc=r(jh,"SPAN",{});var b1=a(zc);Cv=o(b1,"TFFunnelForQuestionAnswering"),b1.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 Vi=a(Kn);Uv=o(Vi,`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(Vi,"CODE",{});var T1=a(Cc);Iv=o(T1,"span start logits"),T1.forEach(t),xv=o(Vi," and "),Jc=r(Vi,"CODE",{});var w1=a(Jc);Wv=o(w1,"span end logits"),w1.forEach(t),Zv=o(Vi,")."),Vi.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 v1=a(_l);Bv=o(v1,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),v1.forEach(t),Pv=o(zh," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),zh.forEach(t),Rv=u(Jt),yl=r(Jt,"P",{});var Ch=a(yl);Gv=o(Ch,"This model inherits from "),Ti=r(Ch,"A",{href:!0});var k1=a(Ti);Av=o(k1,"TFPreTrainedModel"),k1.forEach(t),Vv=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),Xv=u(Jt),bl=r(Jt,"P",{});var Jh=a(bl);Sv=o(Jh,"This model is also a "),Tl=r(Jh,"A",{href:!0,rel:!0});var F1=a(Tl);Lv=o(F1,"tf.keras.Model"),F1.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 Xi=a(eo);Hv=o(Xi,"The "),wi=r(Xi,"A",{href:!0});var M1=a(wi);Kv=o(M1,"TFFunnelForQuestionAnswering"),M1.forEach(t),ek=o(Xi," forward method, overrides the "),Uc=r(Xi,"CODE",{});var $1=a(Uc);tk=o($1,"__call__"),$1.forEach(t),nk=o(Xi," special method."),Xi.forEach(t),ok=u(dn),k(gs.$$.fragment,dn),sk=u(dn),k(_s.$$.fragment,dn),rk=u(dn),k(ys.$$.fragment,dn),dn.forEach(t),Jt.forEach(t),this.h()},h(){f(d,"name","hf:doc:metadata"),f(d,"content",JSON.stringify(E0)),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"),E1(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"),E1(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.33.0/en/model_doc/funnel#transformers.FunnelModel"),f(Z,"href","/docs/transformers/v4.33.0/en/model_doc/funnel#transformers.FunnelForPreTraining"),f(g,"href","/docs/transformers/v4.33.0/en/model_doc/funnel#transformers.FunnelForMaskedLM"),f(te,"href","/docs/transformers/v4.33.0/en/model_doc/funnel#transformers.FunnelForTokenClassification"),f(z,"href","/docs/transformers/v4.33.0/en/model_doc/funnel#transformers.FunnelForQuestionAnswering"),f(xe,"href","/docs/transformers/v4.33.0/en/model_doc/funnel#transformers.FunnelBaseModel"),f(N,"href","/docs/transformers/v4.33.0/en/model_doc/funnel#transformers.FunnelForSequenceClassification"),f(We,"href","/docs/transformers/v4.33.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.33.0/en/model_doc/funnel#transformers.FunnelModel"),f(Il,"href","/docs/transformers/v4.33.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.33.0/en/main_classes/configuration#transformers.PretrainedConfig"),f(Wl,"href","/docs/transformers/v4.33.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.33.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.33.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(Al,"href","/docs/transformers/v4.33.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(Vl,"href","/docs/transformers/v4.33.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(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(Xl,"href","/docs/transformers/v4.33.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(Sl,"href","/docs/transformers/v4.33.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.33.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(Dl,"href","/docs/transformers/v4.33.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(yo,"id","transformers.FunnelForPreTraining"),f(yo,"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(yo,"href","#transformers.FunnelForPreTraining"),f(Fn,"class","relative group"),f(Ql,"href","/docs/transformers/v4.33.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.33.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.33.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.33.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.33.0/en/model_doc/funnel#transformers.FunnelForSequenceClassification"),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(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(Vr,"href","https://arxiv.org/abs/2006.03236"),f(Vr,"rel","nofollow"),f(ei,"href","/docs/transformers/v4.33.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.33.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.33.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.33.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.33.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.33.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.33.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.33.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.33.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.33.0/en/model_doc/funnel#transformers.TFFunnelModel"),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(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(Xo,"id","transformers.TFFunnelForPreTraining"),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.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.33.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.33.0/en/model_doc/funnel#transformers.TFFunnelForPreTraining"),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(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(Vn,"class","relative group"),f(Ba,"href","https://arxiv.org/abs/2006.03236"),f(Ba,"rel","nofollow"),f(pi,"href","/docs/transformers/v4.33.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.33.0/en/model_doc/funnel#transformers.TFFunnelForMaskedLM"),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(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(Sn,"class","relative group"),f(La,"href","https://arxiv.org/abs/2006.03236"),f(La,"rel","nofollow"),f(fi,"href","/docs/transformers/v4.33.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.33.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.33.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.33.0/en/model_doc/funnel#transformers.TFFunnelForMultipleChoice"),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(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(yi,"href","/docs/transformers/v4.33.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(bi,"href","/docs/transformers/v4.33.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.33.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.33.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,y){e(document.head,d),_(l,b,y),_(l,h,y),e(h,m),e(m,T),F(i,T,null),e(h,p),e(h,C),e(C,Te),_(l,ge,y),_(l,P,y),e(P,ce),e(ce,K),e(P,we),e(P,G),e(G,ue),_(l,S,y),_(l,ae,y),e(ae,le),e(le,A),F(ie,A,null),e(ae,ve),e(ae,V),e(V,ke),_(l,_e,y),_(l,R,y),e(R,Fe),e(R,de),e(de,ne),e(R,U),_(l,x,y),_(l,pe,y),e(pe,D),_(l,ye,y),_(l,he,y),e(he,X),e(X,Me),_(l,be,y),_(l,I,y),e(I,$e),_(l,L,y),_(l,se,y),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,Ae),e(q,N),e(N,O),e(q,Ve),e(q,We),e(We,Y),e(q,Xe),_(l,Ze,y),_(l,re,y),e(re,Se),e(re,H),e(H,Le),e(re,Uh),e(re,Is),e(Is,Ih),e(re,xh),_(l,_u,y),_(l,cn,y),e(cn,oo),e(oo,Si),F(xs,Si,null),e(cn,Wh),e(cn,Li),e(Li,Zh),_(l,yu,y),_(l,_t,y),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,Ah),e(_t,Vh),e(_t,Hi),e(Hi,Jl),e(Jl,Xh),_(l,bu,y),_(l,un,y),e(un,so),e(so,Ki),F(Ws,Ki,null),e(un,Sh),e(un,ed),e(ed,Lh),_(l,Tu,y),_(l,Kt,y),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,y),_(l,hn,y),e(hn,ro),e(ro,td),F(Ns,td,null),e(hn,df),e(hn,nd),e(nd,cf),_(l,vu,y),_(l,et,y),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,yf),e(tn,sd),e(sd,bf),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(As,ao,null),e(ao,Ef),e(ao,Vs),e(Vs,jf),e(Vs,ld),e(ld,zf),e(Vs,Cf),e(et,Jf),e(et,It),F(Xs,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(Ss,Bl,null),_(l,ku,y),_(l,mn,y),e(mn,io),e(io,ud),F(Ls,ud,null),e(mn,Gf),e(mn,pd),e(pd,Af),_(l,Fu,y),_(l,gt,y),F(Ds,gt,null),e(gt,Vf),e(gt,Qs),e(Qs,Xf),e(Qs,hd),e(hd,Sf),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,yd),e(yd,hm),e(gn,fm),e(gn,bd),e(bd,mm),e(gn,gm),_(l,Mu,y),_(l,_n,y),e(_n,uo),e(uo,Td),F(er,Td,null),e(_n,_m),e(_n,wd),e(wd,ym),_(l,$u,y),_(l,yn,y),F(tr,yn,null),e(yn,bm),e(yn,nr),e(nr,Tm),e(nr,Al),e(Al,wm),e(nr,vm),_(l,Eu,y),_(l,bn,y),F(or,bn,null),e(bn,km),e(bn,sr),e(sr,Fm),e(sr,Vl),e(Vl,Mm),e(sr,$m),_(l,ju,y),_(l,Tn,y),e(Tn,po),e(po,vd),F(rr,vd,null),e(Tn,Em),e(Tn,kd),e(kd,jm),_(l,zu,y),_(l,dt,y),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,Xl),e(Xl,qm),e(dr,Nm),e(dt,Bm),e(dt,cr),e(cr,Pm),e(cr,ur),e(ur,Rm),e(cr,Gm),e(dt,Am),e(dt,Wt),F(pr,Wt,null),e(Wt,Vm),e(Wt,wn),e(wn,Xm),e(wn,Sl),e(Sl,Sm),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,y),_(l,vn,y),e(vn,mo),e(mo,$d),F(hr,$d,null),e(vn,Hm),e(vn,Ed),e(Ed,Km),_(l,Ju,y),_(l,ct,y),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,yr),e(yr,ug),e(yr,br),e(br,pg),e(yr,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,yg),e(kn,zd),e(zd,bg),e(kn,Tg),e(Zt,wg),F(go,Zt,null),e(Zt,vg),F(_o,Zt,null),_(l,Uu,y),_(l,Fn,y),e(Fn,yo),e(yo,Cd),F(wr,Cd,null),e(Fn,kg),e(Fn,Jd),e(Jd,Fg),_(l,Iu,y),_(l,Mn,y),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(bo,qt,null),e(qt,Ig),F(To,qt,null),_(l,xu,y),_(l,En,y),e(En,wo),e(wo,Id),F(Fr,Id,null),e(En,xg),e(En,xd),e(xd,Wg),_(l,Wu,y),_(l,ut,y),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,Ag),e(ut,Vg),e(ut,zr),e(zr,Xg),e(zr,Ol),e(Ol,Sg),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,y),_(l,zn,y),e(zn,Fo),e(Fo,qd),F(Ir,qd,null),e(zn,l_),e(zn,Nd),e(Nd,i_),_(l,qu,y),_(l,pt,y),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,y_),e(pt,b_),e(pt,Nr),e(Nr,T_),e(Nr,Br),e(Br,w_),e(Nr,v_),e(pt,k_),e(pt,yt),F(Pr,yt,null),e(yt,F_),e(yt,Cn),e(Cn,M_),e(Cn,Kl),e(Kl,$_),e(Cn,E_),e(Cn,Pd),e(Pd,j_),e(Cn,z_),e(yt,C_),F(Mo,yt,null),e(yt,J_),F($o,yt,null),e(yt,U_),F(Eo,yt,null),_(l,Nu,y),_(l,Jn,y),e(Jn,jo),e(jo,Rd),F(Rr,Rd,null),e(Jn,I_),e(Jn,Gd),e(Gd,x_),_(l,Bu,y),_(l,ht,y),F(Gr,ht,null),e(ht,W_),e(ht,Ad),e(Ad,Z_),e(ht,q_),e(ht,Ar),e(Ar,N_),e(Ar,Vr),e(Vr,B_),e(Ar,P_),e(ht,R_),e(ht,Xr),e(Xr,G_),e(Xr,ei),e(ei,A_),e(Xr,V_),e(ht,X_),e(ht,Sr),e(Sr,S_),e(Sr,Lr),e(Lr,L_),e(Sr,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,Vd),e(Vd,ey),e(Un,ty),e(Bt,ny),F(zo,Bt,null),e(Bt,oy),F(Co,Bt,null),_(l,Pu,y),_(l,In,y),e(In,Jo),e(Jo,Xd),F(Qr,Xd,null),e(In,sy),e(In,Sd),e(Sd,ry),_(l,Ru,y),_(l,ft,y),F(Or,ft,null),e(ft,ay),e(ft,Ld),e(Ld,ly),e(ft,iy),e(ft,Yr),e(Yr,dy),e(Yr,Hr),e(Hr,cy),e(Yr,uy),e(ft,py),e(ft,Kr),e(Kr,hy),e(Kr,ni),e(ni,fy),e(Kr,my),e(ft,gy),e(ft,ea),e(ea,_y),e(ea,ta),e(ta,yy),e(ea,by),e(ft,Ty),e(ft,Pt),F(na,Pt,null),e(Pt,wy),e(Pt,xn),e(xn,vy),e(xn,oi),e(oi,ky),e(xn,Fy),e(xn,Dd),e(Dd,My),e(xn,$y),e(Pt,Ey),F(Uo,Pt,null),e(Pt,jy),F(Io,Pt,null),_(l,Gu,y),_(l,Wn,y),e(Wn,xo),e(xo,Qd),F(oa,Qd,null),e(Wn,zy),e(Wn,Od),e(Od,Cy),_(l,Au,y),_(l,mt,y),F(sa,mt,null),e(mt,Jy),e(mt,Zn),e(Zn,Uy),e(Zn,Yd),e(Yd,Iy),e(Zn,xy),e(Zn,Hd),e(Hd,Wy),e(Zn,Zy),e(mt,qy),e(mt,ra),e(ra,Ny),e(ra,aa),e(aa,By),e(ra,Py),e(mt,Ry),e(mt,la),e(la,Gy),e(la,si),e(si,Ay),e(la,Vy),e(mt,Xy),e(mt,ia),e(ia,Sy),e(ia,da),e(da,Ly),e(ia,Dy),e(mt,Qy),e(mt,Rt),F(ca,Rt,null),e(Rt,Oy),e(Rt,qn),e(qn,Yy),e(qn,ri),e(ri,Hy),e(qn,Ky),e(qn,Kd),e(Kd,eb),e(qn,tb),e(Rt,nb),F(Wo,Rt,null),e(Rt,ob),F(Zo,Rt,null),_(l,Vu,y),_(l,Nn,y),e(Nn,qo),e(qo,ec),F(ua,ec,null),e(Nn,sb),e(Nn,tc),e(tc,rb),_(l,Xu,y),_(l,tt,y),F(pa,tt,null),e(tt,ab),e(tt,nc),e(nc,lb),e(tt,ib),e(tt,ha),e(ha,db),e(ha,fa),e(fa,cb),e(ha,ub),e(tt,pb),e(tt,ma),e(ma,hb),e(ma,ai),e(ai,fb),e(ma,mb),e(tt,gb),e(tt,ga),e(ga,_b),e(ga,_a),e(_a,yb),e(ga,bb),e(tt,Tb),F(No,tt,null),e(tt,wb),e(tt,Gt),F(ya,Gt,null),e(Gt,vb),e(Gt,Bn),e(Bn,kb),e(Bn,li),e(li,Fb),e(Bn,Mb),e(Bn,oc),e(oc,$b),e(Bn,Eb),e(Gt,jb),F(Bo,Gt,null),e(Gt,zb),F(Po,Gt,null),_(l,Su,y),_(l,Pn,y),e(Pn,Ro),e(Ro,sc),F(ba,sc,null),e(Pn,Cb),e(Pn,rc),e(rc,Jb),_(l,Lu,y),_(l,nt,y),F(Ta,nt,null),e(nt,Ub),e(nt,ac),e(ac,Ib),e(nt,xb),e(nt,wa),e(wa,Wb),e(wa,va),e(va,Zb),e(wa,qb),e(nt,Nb),e(nt,ka),e(ka,Bb),e(ka,ii),e(ii,Pb),e(ka,Rb),e(nt,Gb),e(nt,Fa),e(Fa,Ab),e(Fa,Ma),e(Ma,Vb),e(Fa,Xb),e(nt,Sb),F(Go,nt,null),e(nt,Lb),e(nt,At),F($a,At,null),e(At,Db),e(At,Rn),e(Rn,Qb),e(Rn,di),e(di,Ob),e(Rn,Yb),e(Rn,lc),e(lc,Hb),e(Rn,Kb),e(At,eT),F(Ao,At,null),e(At,tT),F(Vo,At,null),_(l,Du,y),_(l,Gn,y),e(Gn,Xo),e(Xo,ic),F(Ea,ic,null),e(Gn,nT),e(Gn,dc),e(dc,oT),_(l,Qu,y),_(l,ot,y),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,yT),F(So,ot,null),e(ot,bT),e(ot,Vt),F(xa,Vt,null),e(Vt,TT),e(Vt,An),e(An,wT),e(An,ui),e(ui,vT),e(An,kT),e(An,uc),e(uc,FT),e(An,MT),e(Vt,$T),F(Lo,Vt,null),e(Vt,ET),F(Do,Vt,null),_(l,Ou,y),_(l,Vn,y),e(Vn,Qo),e(Qo,pc),F(Wa,pc,null),e(Vn,jT),e(Vn,hc),e(hc,zT),_(l,Yu,y),_(l,st,y),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,AT),e(Ra,Ga),e(Ga,VT),e(Ra,XT),e(st,ST),F(Oo,st,null),e(st,LT),e(st,bt),F(Aa,bt,null),e(bt,DT),e(bt,Xn),e(Xn,QT),e(Xn,hi),e(hi,OT),e(Xn,YT),e(Xn,mc),e(mc,HT),e(Xn,KT),e(bt,ew),F(Yo,bt,null),e(bt,tw),F(Ho,bt,null),e(bt,nw),F(Ko,bt,null),_(l,Hu,y),_(l,Sn,y),e(Sn,es),e(es,gc),F(Va,gc,null),e(Sn,ow),e(Sn,_c),e(_c,sw),_(l,Ku,y),_(l,rt,y),F(Xa,rt,null),e(rt,rw),e(rt,yc),e(yc,aw),e(rt,lw),e(rt,Sa),e(Sa,iw),e(Sa,La),e(La,dw),e(Sa,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,yw),e(rt,bw),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,bc),e(bc,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,y),_(l,Dn,y),e(Dn,rs),e(rs,Tc),F(Ha,Tc,null),e(Dn,Cw),e(Dn,wc),e(wc,Jw),_(l,tp,y),_(l,at,y),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,Aw),e(ol,sl),e(sl,Vw),e(ol,Xw),e(at,Sw),F(as,at,null),e(at,Lw),e(at,Xt),F(rl,Xt,null),e(Xt,Dw),e(Xt,Qn),e(Qn,Qw),e(Qn,_i),e(_i,Ow),e(Qn,Yw),e(Qn,kc),e(kc,Hw),e(Qn,Kw),e(Xt,ev),F(ls,Xt,null),e(Xt,tv),F(is,Xt,null),_(l,np,y),_(l,On,y),e(On,ds),e(ds,Fc),F(al,Fc,null),e(On,nv),e(On,Mc),e(Mc,ov),_(l,op,y),_(l,lt,y),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,yi),e(yi,pv),e(cl,hv),e(lt,fv),e(lt,ul),e(ul,mv),e(ul,pl),e(pl,gv),e(ul,_v),e(lt,yv),F(cs,lt,null),e(lt,bv),e(lt,wt),F(hl,wt,null),e(wt,Tv),e(wt,Yn),e(Yn,wv),e(Yn,bi),e(bi,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,y),_(l,Hn,y),e(Hn,fs),e(fs,jc),F(fl,jc,null),e(Hn,zv),e(Hn,zc),e(zc,Cv),_(l,rp,y),_(l,it,y),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,yl),e(yl,Gv),e(yl,Ti),e(Ti,Av),e(yl,Vv),e(it,Xv),e(it,bl),e(bl,Sv),e(bl,Tl),e(Tl,Lv),e(bl,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(ys,vt,null),ap=!0},p(l,[y]){const vl={};y&2&&(vl.$$scope={dirty:y,ctx:l}),lo.$set(vl);const Ic={};y&2&&(Ic.$$scope={dirty:y,ctx:l}),co.$set(Ic);const xc={};y&2&&(xc.$$scope={dirty:y,ctx:l}),ho.$set(xc);const Wc={};y&2&&(Wc.$$scope={dirty:y,ctx:l}),fo.$set(Wc);const kl={};y&2&&(kl.$$scope={dirty:y,ctx:l}),go.$set(kl);const Zc={};y&2&&(Zc.$$scope={dirty:y,ctx:l}),_o.$set(Zc);const qc={};y&2&&(qc.$$scope={dirty:y,ctx:l}),bo.$set(qc);const Fl={};y&2&&(Fl.$$scope={dirty:y,ctx:l}),To.$set(Fl);const Nc={};y&2&&(Nc.$$scope={dirty:y,ctx:l}),vo.$set(Nc);const Bc={};y&2&&(Bc.$$scope={dirty:y,ctx:l}),ko.$set(Bc);const Pc={};y&2&&(Pc.$$scope={dirty:y,ctx:l}),Mo.$set(Pc);const Ml={};y&2&&(Ml.$$scope={dirty:y,ctx:l}),$o.$set(Ml);const Rc={};y&2&&(Rc.$$scope={dirty:y,ctx:l}),Eo.$set(Rc);const Gc={};y&2&&(Gc.$$scope={dirty:y,ctx:l}),zo.$set(Gc);const Ac={};y&2&&(Ac.$$scope={dirty:y,ctx:l}),Co.$set(Ac);const Vc={};y&2&&(Vc.$$scope={dirty:y,ctx:l}),Uo.$set(Vc);const Xc={};y&2&&(Xc.$$scope={dirty:y,ctx:l}),Io.$set(Xc);const to={};y&2&&(to.$$scope={dirty:y,ctx:l}),Wo.$set(to);const Sc={};y&2&&(Sc.$$scope={dirty:y,ctx:l}),Zo.$set(Sc);const Lc={};y&2&&(Lc.$$scope={dirty:y,ctx:l}),No.$set(Lc);const Ke={};y&2&&(Ke.$$scope={dirty:y,ctx:l}),Bo.$set(Ke);const Dc={};y&2&&(Dc.$$scope={dirty:y,ctx:l}),Po.$set(Dc);const Qc={};y&2&&(Qc.$$scope={dirty:y,ctx:l}),Go.$set(Qc);const Oc={};y&2&&(Oc.$$scope={dirty:y,ctx:l}),Ao.$set(Oc);const Yc={};y&2&&(Yc.$$scope={dirty:y,ctx:l}),Vo.$set(Yc);const Hc={};y&2&&(Hc.$$scope={dirty:y,ctx:l}),So.$set(Hc);const Kc={};y&2&&(Kc.$$scope={dirty:y,ctx:l}),Lo.$set(Kc);const eu={};y&2&&(eu.$$scope={dirty:y,ctx:l}),Do.$set(eu);const tu={};y&2&&(tu.$$scope={dirty:y,ctx:l}),Oo.$set(tu);const no={};y&2&&(no.$$scope={dirty:y,ctx:l}),Yo.$set(no);const nu={};y&2&&(nu.$$scope={dirty:y,ctx:l}),Ho.$set(nu);const ou={};y&2&&(ou.$$scope={dirty:y,ctx:l}),Ko.$set(ou);const $l={};y&2&&($l.$$scope={dirty:y,ctx:l}),ts.$set($l);const su={};y&2&&(su.$$scope={dirty:y,ctx:l}),ns.$set(su);const ru={};y&2&&(ru.$$scope={dirty:y,ctx:l}),os.$set(ru);const au={};y&2&&(au.$$scope={dirty:y,ctx:l}),ss.$set(au);const Ut={};y&2&&(Ut.$$scope={dirty:y,ctx:l}),as.$set(Ut);const lu={};y&2&&(lu.$$scope={dirty:y,ctx:l}),ls.$set(lu);const iu={};y&2&&(iu.$$scope={dirty:y,ctx:l}),is.$set(iu);const du={};y&2&&(du.$$scope={dirty:y,ctx:l}),cs.$set(du);const cu={};y&2&&(cu.$$scope={dirty:y,ctx:l}),us.$set(cu);const uu={};y&2&&(uu.$$scope={dirty:y,ctx:l}),ps.$set(uu);const pu={};y&2&&(pu.$$scope={dirty:y,ctx:l}),hs.$set(pu);const hu={};y&2&&(hu.$$scope={dirty:y,ctx:l}),ms.$set(hu);const fu={};y&2&&(fu.$$scope={dirty:y,ctx:l}),gs.$set(fu);const mu={};y&2&&(mu.$$scope={dirty:y,ctx:l}),_s.$set(mu);const gu={};y&2&&(gu.$$scope={dirty:y,ctx:l}),ys.$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(As.$$.fragment,l),M(Xs.$$.fragment,l),M(lo.$$.fragment,l),M(Ss.$$.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(bo.$$.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(ya.$$.fragment,l),M(Bo.$$.fragment,l),M(Po.$$.fragment,l),M(ba.$$.fragment,l),M(Ta.$$.fragment,l),M(Go.$$.fragment,l),M($a.$$.fragment,l),M(Ao.$$.fragment,l),M(Vo.$$.fragment,l),M(Ea.$$.fragment,l),M(ja.$$.fragment,l),M(So.$$.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(Aa.$$.fragment,l),M(Yo.$$.fragment,l),M(Ho.$$.fragment,l),M(Ko.$$.fragment,l),M(Va.$$.fragment,l),M(Xa.$$.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(ys.$$.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),$(As.$$.fragment,l),$(Xs.$$.fragment,l),$(lo.$$.fragment,l),$(Ss.$$.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),$(bo.$$.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),$(ya.$$.fragment,l),$(Bo.$$.fragment,l),$(Po.$$.fragment,l),$(ba.$$.fragment,l),$(Ta.$$.fragment,l),$(Go.$$.fragment,l),$($a.$$.fragment,l),$(Ao.$$.fragment,l),$(Vo.$$.fragment,l),$(Ea.$$.fragment,l),$(ja.$$.fragment,l),$(So.$$.fragment,l),$(xa.$$.fragment,l),$(Lo.$$.fragment,l),$(Do.$$.fragment,l),$(Wa.$$.fragment,l),$(Za.$$.fragment,l),$(Oo.$$.fragment,l),$(Aa.$$.fragment,l),$(Yo.$$.fragment,l),$(Ho.$$.fragment,l),$(Ko.$$.fragment,l),$(Va.$$.fragment,l),$(Xa.$$.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),$(ys.$$.fragment,l),ap=!1},d(l){t(d),l&&t(b),l&&t(h),E(i),l&&t(ge),l&&t(P),l&&t(S),l&&t(ae),E(ie),l&&t(_e),l&&t(R),l&&t(x),l&&t(pe),l&&t(ye),l&&t(he),l&&t(be),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(yu),l&&t(_t),l&&t(bu),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(As),E(Xs),E(lo),E(Ss),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(yn),E(tr),l&&t(Eu),l&&t(bn),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(bo),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(Au),l&&t(mt),E(sa),E(ca),E(Wo),E(Zo),l&&t(Vu),l&&t(Nn),E(ua),l&&t(Xu),l&&t(tt),E(pa),E(No),E(ya),E(Bo),E(Po),l&&t(Su),l&&t(Pn),E(ba),l&&t(Lu),l&&t(nt),E(Ta),E(Go),E($a),E(Ao),E(Vo),l&&t(Du),l&&t(Gn),E(Ea),l&&t(Qu),l&&t(ot),E(ja),E(So),E(xa),E(Lo),E(Do),l&&t(Ou),l&&t(Vn),E(Wa),l&&t(Yu),l&&t(st),E(Za),E(Oo),E(Aa),E(Yo),E(Ho),E(Ko),l&&t(Hu),l&&t(Sn),E(Va),l&&t(Ku),l&&t(rt),E(Xa),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(ys)}}}const E0={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 j0(J){return U1(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class W0 extends j1{constructor(d){super();z1(this,d,j0,$0,C1,{})}}export{W0 as default,E0 as metadata};
