import{s as vs,o as xs,n as q}from"../chunks/scheduler.25b97de1.js";import{S as Cs,i as js,g as i,s as r,r as T,A as zs,h as d,f as l,c as a,j as Z,u as b,x as f,k as I,y as s,a as c,v as y,d as M,t as w,w as k}from"../chunks/index.d9030fc9.js";import{T as ce}from"../chunks/Tip.baa67368.js";import{D as B}from"../chunks/Docstring.e257edda.js";import{C as Te}from"../chunks/CodeBlock.e6cd0d95.js";import{F as Js,M as $s}from"../chunks/Markdown.7217f838.js";import{E as _e}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{H as ue,E as Us}from"../chunks/EditOnGithub.91d95064.js";function Ws($){let e,g="Transformer sequence pair mask has the following format:",n,o,F;return o=new Te({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 |`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-12v5j2d"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function qs($){let e,g="Transformer sequence pair mask has the following format:",n,o,F;return o=new Te({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 |`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-12v5j2d"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Is($){let e,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=i("p"),e.innerHTML=g},l(n){e=d(n,"P",{"data-svelte-h":!0}),f(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(n,o){c(n,e,o)},p:q,d(n){n&&l(e)}}}function Zs($){let e,g="Example:",n,o,F;return o=new Te({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`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Bs($){let e,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=i("p"),e.innerHTML=g},l(n){e=d(n,"P",{"data-svelte-h":!0}),f(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(n,o){c(n,e,o)},p:q,d(n){n&&l(e)}}}function Ls($){let e,g="Example:",n,o,F;return o=new Te({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`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Hs($){let e,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=i("p"),e.innerHTML=g},l(n){e=d(n,"P",{"data-svelte-h":!0}),f(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(n,o){c(n,e,o)},p:q,d(n){n&&l(e)}}}function Ns($){let e,g="Examples:",n,o,F;return o=new Te({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`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-kvfsh7"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Gs($){let e,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=i("p"),e.innerHTML=g},l(n){e=d(n,"P",{"data-svelte-h":!0}),f(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(n,o){c(n,e,o)},p:q,d(n){n&&l(e)}}}function Vs($){let e,g="Example:",n,o,F;return o=new Te({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)`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Rs($){let e,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=i("p"),e.innerHTML=g},l(n){e=d(n,"P",{"data-svelte-h":!0}),f(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(n,o){c(n,e,o)},p:q,d(n){n&&l(e)}}}function Xs($){let e,g="Example of single-label classification:",n,o,F;return o=new Te({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`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-ykxpe4"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Ps($){let e,g="Example of multi-label classification:",n,o,F;return o=new Te({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`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-1l8e32d"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Es($){let e,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=i("p"),e.innerHTML=g},l(n){e=d(n,"P",{"data-svelte-h":!0}),f(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(n,o){c(n,e,o)},p:q,d(n){n&&l(e)}}}function Qs($){let e,g="Example:",n,o,F;return o=new Te({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`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Ss($){let e,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=i("p"),e.innerHTML=g},l(n){e=d(n,"P",{"data-svelte-h":!0}),f(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(n,o){c(n,e,o)},p:q,d(n){n&&l(e)}}}function As($){let e,g="Example:",n,o,F;return o=new Te({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`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Ys($){let e,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=i("p"),e.innerHTML=g},l(n){e=d(n,"P",{"data-svelte-h":!0}),f(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(n,o){c(n,e,o)},p:q,d(n){n&&l(e)}}}function Ds($){let e,g="Example:",n,o,F;return o=new Te({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`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Os($){let e,g,n,o,F,t,_=`The base Funnel Transformer Model transformer outputting raw hidden-states without upsampling head (also called
decoder) or any task-specific head on top.`,N,W,j=`The Funnel Transformer model was proposed in <a href="https://arxiv.org/abs/2006.03236" rel="nofollow">Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing</a> by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.`,L,U,z=`This model inherits from <a href="/docs/transformers/pr_31051/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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,p,x=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Zn,S,nn,$e,be,ko='The <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelBaseModel">FunnelBaseModel</a> forward method, overrides the <code>__call__</code> special method.',Nt,Ge,Bn,oe,Dn,ve,ft,E,Je,te,Ve,on="The bare Funnel Transformer Model transformer outputting raw hidden-states without any specific head on top.",Gt,xe,sn=`The Funnel Transformer model was proposed in <a href="https://arxiv.org/abs/2006.03236" rel="nofollow">Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing</a> by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.`,rn,jt,Fo=`This model inherits from <a href="/docs/transformers/pr_31051/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,an,zt,$o=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Vt,pe,Jt,R,Ke,Re='The <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelModel">FunnelModel</a> forward method, overrides the <code>__call__</code> special method.',et,Rt,ln,tt,On,Ue,Xe,ne,Ut,nt,We,X,ot,bn,yn='The <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelForPreTraining">FunnelForPreTraining</a> forward method, overrides the <code>__call__</code> special method.',Xt,qe,dn,st,Kn,rt,Ie,A,at,Mn,wn,Pt="Funnel Transformer Model with a <code>language modeling</code> head on top.",Wt,me,ht=`The Funnel Transformer model was proposed in <a href="https://arxiv.org/abs/2006.03236" rel="nofollow">Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing</a> by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.`,fo,gt,Ln=`This model inherits from <a href="/docs/transformers/pr_31051/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,Et,Ze,cn=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,_t,G,fe,Hn,V,kn='The <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelForMaskedLM">FunnelForMaskedLM</a> forward method, overrides the <code>__call__</code> special method.',eo,ye,vo,qt,Me,lt,Nn,P,Fn,to,Be,Io=`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.`,no,D,un=`The Funnel Transformer model was proposed in <a href="https://arxiv.org/abs/2006.03236" rel="nofollow">Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing</a> by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.`,we,Ce,xo=`This model inherits from <a href="/docs/transformers/pr_31051/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,pn,it,ho=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Pe,je,ze,Qt,Le,Tt='The <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelForSequenceClassification">FunnelForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',Ee,bt,Q,Qe,Gn,se,St,At,dt,he,It,Se,mn,fn=`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.`,Yt,Dt,oo=`The Funnel Transformer model was proposed in <a href="https://arxiv.org/abs/2006.03236" rel="nofollow">Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing</a> by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.`,h,J,O=`This model inherits from <a href="/docs/transformers/pr_31051/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Y,He,hn=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Ot,Ae,K,gn,ae,so='The <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelForMultipleChoice">FunnelForMultipleChoice</a> forward method, overrides the <code>__call__</code> special method.',yt,$n,ro,vn,le,Kt,Zo,ie,go,Go,xn,es=`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.`,Vo,Cn,ts=`The Funnel Transformer model was proposed in <a href="https://arxiv.org/abs/2006.03236" rel="nofollow">Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing</a> by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.`,Ro,jn,ns=`This model inherits from <a href="/docs/transformers/pr_31051/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,Xo,en,Eo=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Zt,Ne,ao,_o,Co,Qo='The <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelForTokenClassification">FunnelForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',Vn,Rn,Xn,zn,Pn,En,de,re,lo,To,jo,So=`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 <code>span start logits</code> and <code>span end logits</code>).`,bo,zo,Ao=`The Funnel Transformer model was proposed in <a href="https://arxiv.org/abs/2006.03236" rel="nofollow">Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing</a> by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.`,yo,Jo,Yo=`This model inherits from <a href="/docs/transformers/pr_31051/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,Mo,Uo,Do=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Qn,Bt,ke,io,wo,Wo='The <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelForQuestionAnswering">FunnelForQuestionAnswering</a> forward method, overrides the <code>__call__</code> special method.',Oo,Sn,An,Yn,Jn;return e=new ue({props:{title:"FunnelBaseModel",local:"transformers.FunnelBaseModel",headingTag:"h2"}}),o=new B({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/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_funnel.py#L907"}}),nn=new B({props:{name:"forward",anchor:"transformers.FunnelBaseModel.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31051/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31051/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31051/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/pr_31051/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31051/src/transformers/models/funnel/modeling_funnel.py#L930",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31051/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/pr_31051/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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31051/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ge=new ce({props:{$$slots:{default:[Is]},$$scope:{ctx:$}}}),oe=new _e({props:{anchor:"transformers.FunnelBaseModel.forward.example",$$slots:{default:[Zs]},$$scope:{ctx:$}}}),ve=new ue({props:{title:"FunnelModel",local:"transformers.FunnelModel",headingTag:"h2"}}),Je=new B({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/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_funnel.py#L986"}}),Jt=new B({props:{name:"forward",anchor:"transformers.FunnelModel.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31051/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31051/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31051/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/pr_31051/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31051/src/transformers/models/funnel/modeling_funnel.py#L1007",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31051/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/pr_31051/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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31051/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Rt=new ce({props:{$$slots:{default:[Bs]},$$scope:{ctx:$}}}),tt=new _e({props:{anchor:"transformers.FunnelModel.forward.example",$$slots:{default:[Ls]},$$scope:{ctx:$}}}),Ue=new ue({props:{title:"FunnelModelForPreTraining",local:"transformers.FunnelForPreTraining",headingTag:"h2"}}),Ut=new B({props:{name:"class transformers.FunnelForPreTraining",anchor:"transformers.FunnelForPreTraining",parameters:[{name:"config",val:": FunnelConfig"}],source:"https://github.com/huggingface/transformers/blob/vr_31051/src/transformers/models/funnel/modeling_funnel.py#L1097"}}),X=new B({props:{name:"forward",anchor:"transformers.FunnelForPreTraining.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31051/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31051/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_funnel.py#L1106",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31051/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/pr_31051/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>) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput"
>transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qe=new ce({props:{$$slots:{default:[Hs]},$$scope:{ctx:$}}}),st=new _e({props:{anchor:"transformers.FunnelForPreTraining.forward.example",$$slots:{default:[Ns]},$$scope:{ctx:$}}}),rt=new ue({props:{title:"FunnelForMaskedLM",local:"transformers.FunnelForMaskedLM",headingTag:"h2"}}),at=new B({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/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_funnel.py#L1179"}}),fe=new B({props:{name:"forward",anchor:"transformers.FunnelForMaskedLM.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31051/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31051/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_funnel.py#L1198",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31051/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/pr_31051/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) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31051/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ye=new ce({props:{$$slots:{default:[Gs]},$$scope:{ctx:$}}}),qt=new _e({props:{anchor:"transformers.FunnelForMaskedLM.forward.example",$$slots:{default:[Vs]},$$scope:{ctx:$}}}),lt=new ue({props:{title:"FunnelForSequenceClassification",local:"transformers.FunnelForSequenceClassification",headingTag:"h2"}}),Fn=new B({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/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_funnel.py#L1254"}}),ze=new B({props:{name:"forward",anchor:"transformers.FunnelForSequenceClassification.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31051/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31051/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_funnel.py#L1272",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31051/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/pr_31051/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) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31051/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),bt=new ce({props:{$$slots:{default:[Rs]},$$scope:{ctx:$}}}),Qe=new _e({props:{anchor:"transformers.FunnelForSequenceClassification.forward.example",$$slots:{default:[Xs]},$$scope:{ctx:$}}}),se=new _e({props:{anchor:"transformers.FunnelForSequenceClassification.forward.example-2",$$slots:{default:[Ps]},$$scope:{ctx:$}}}),At=new ue({props:{title:"FunnelForMultipleChoice",local:"transformers.FunnelForMultipleChoice",headingTag:"h2"}}),It=new B({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/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_funnel.py#L1346"}}),K=new B({props:{name:"forward",anchor:"transformers.FunnelForMultipleChoice.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31051/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31051/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_funnel.py#L1362",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31051/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/pr_31051/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) — Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) — <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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31051/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$n=new ce({props:{$$slots:{default:[Es]},$$scope:{ctx:$}}}),vn=new _e({props:{anchor:"transformers.FunnelForMultipleChoice.forward.example",$$slots:{default:[Qs]},$$scope:{ctx:$}}}),Kt=new ue({props:{title:"FunnelForTokenClassification",local:"transformers.FunnelForTokenClassification",headingTag:"h2"}}),go=new B({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/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_funnel.py#L1429"}}),ao=new B({props:{name:"forward",anchor:"transformers.FunnelForTokenClassification.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31051/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31051/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_funnel.py#L1448",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31051/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/pr_31051/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)  — Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31051/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Rn=new ce({props:{$$slots:{default:[Ss]},$$scope:{ctx:$}}}),zn=new _e({props:{anchor:"transformers.FunnelForTokenClassification.forward.example",$$slots:{default:[As]},$$scope:{ctx:$}}}),En=new ue({props:{title:"FunnelForQuestionAnswering",local:"transformers.FunnelForQuestionAnswering",headingTag:"h2"}}),lo=new B({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/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_funnel.py#L1502"}}),ke=new B({props:{name:"forward",anchor:"transformers.FunnelForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"start_positions",val:": Optional = None"},{name:"end_positions",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31051/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31051/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_funnel.py#L1520",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31051/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/pr_31051/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) — 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>) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31051/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Sn=new ce({props:{$$slots:{default:[Ys]},$$scope:{ctx:$}}}),Yn=new _e({props:{anchor:"transformers.FunnelForQuestionAnswering.forward.example",$$slots:{default:[Ds]},$$scope:{ctx:$}}}),{c(){T(e.$$.fragment),g=r(),n=i("div"),T(o.$$.fragment),F=r(),t=i("p"),t.textContent=_,N=r(),W=i("p"),W.innerHTML=j,L=r(),U=i("p"),U.innerHTML=z,H=r(),p=i("p"),p.innerHTML=x,Zn=r(),S=i("div"),T(nn.$$.fragment),$e=r(),be=i("p"),be.innerHTML=ko,Nt=r(),T(Ge.$$.fragment),Bn=r(),T(oe.$$.fragment),Dn=r(),T(ve.$$.fragment),ft=r(),E=i("div"),T(Je.$$.fragment),te=r(),Ve=i("p"),Ve.textContent=on,Gt=r(),xe=i("p"),xe.innerHTML=sn,rn=r(),jt=i("p"),jt.innerHTML=Fo,an=r(),zt=i("p"),zt.innerHTML=$o,Vt=r(),pe=i("div"),T(Jt.$$.fragment),R=r(),Ke=i("p"),Ke.innerHTML=Re,et=r(),T(Rt.$$.fragment),ln=r(),T(tt.$$.fragment),On=r(),T(Ue.$$.fragment),Xe=r(),ne=i("div"),T(Ut.$$.fragment),nt=r(),We=i("div"),T(X.$$.fragment),ot=r(),bn=i("p"),bn.innerHTML=yn,Xt=r(),T(qe.$$.fragment),dn=r(),T(st.$$.fragment),Kn=r(),T(rt.$$.fragment),Ie=r(),A=i("div"),T(at.$$.fragment),Mn=r(),wn=i("p"),wn.innerHTML=Pt,Wt=r(),me=i("p"),me.innerHTML=ht,fo=r(),gt=i("p"),gt.innerHTML=Ln,Et=r(),Ze=i("p"),Ze.innerHTML=cn,_t=r(),G=i("div"),T(fe.$$.fragment),Hn=r(),V=i("p"),V.innerHTML=kn,eo=r(),T(ye.$$.fragment),vo=r(),T(qt.$$.fragment),Me=r(),T(lt.$$.fragment),Nn=r(),P=i("div"),T(Fn.$$.fragment),to=r(),Be=i("p"),Be.textContent=Io,no=r(),D=i("p"),D.innerHTML=un,we=r(),Ce=i("p"),Ce.innerHTML=xo,pn=r(),it=i("p"),it.innerHTML=ho,Pe=r(),je=i("div"),T(ze.$$.fragment),Qt=r(),Le=i("p"),Le.innerHTML=Tt,Ee=r(),T(bt.$$.fragment),Q=r(),T(Qe.$$.fragment),Gn=r(),T(se.$$.fragment),St=r(),T(At.$$.fragment),dt=r(),he=i("div"),T(It.$$.fragment),Se=r(),mn=i("p"),mn.textContent=fn,Yt=r(),Dt=i("p"),Dt.innerHTML=oo,h=r(),J=i("p"),J.innerHTML=O,Y=r(),He=i("p"),He.innerHTML=hn,Ot=r(),Ae=i("div"),T(K.$$.fragment),gn=r(),ae=i("p"),ae.innerHTML=so,yt=r(),T($n.$$.fragment),ro=r(),T(vn.$$.fragment),le=r(),T(Kt.$$.fragment),Zo=r(),ie=i("div"),T(go.$$.fragment),Go=r(),xn=i("p"),xn.textContent=es,Vo=r(),Cn=i("p"),Cn.innerHTML=ts,Ro=r(),jn=i("p"),jn.innerHTML=ns,Xo=r(),en=i("p"),en.innerHTML=Eo,Zt=r(),Ne=i("div"),T(ao.$$.fragment),_o=r(),Co=i("p"),Co.innerHTML=Qo,Vn=r(),T(Rn.$$.fragment),Xn=r(),T(zn.$$.fragment),Pn=r(),T(En.$$.fragment),de=r(),re=i("div"),T(lo.$$.fragment),To=r(),jo=i("p"),jo.innerHTML=So,bo=r(),zo=i("p"),zo.innerHTML=Ao,yo=r(),Jo=i("p"),Jo.innerHTML=Yo,Mo=r(),Uo=i("p"),Uo.innerHTML=Do,Qn=r(),Bt=i("div"),T(ke.$$.fragment),io=r(),wo=i("p"),wo.innerHTML=Wo,Oo=r(),T(Sn.$$.fragment),An=r(),T(Yn.$$.fragment),this.h()},l(m){b(e.$$.fragment,m),g=a(m),n=d(m,"DIV",{class:!0});var C=Z(n);b(o.$$.fragment,C),F=a(C),t=d(C,"P",{"data-svelte-h":!0}),f(t)!=="svelte-1678uor"&&(t.textContent=_),N=a(C),W=d(C,"P",{"data-svelte-h":!0}),f(W)!=="svelte-1mnttie"&&(W.innerHTML=j),L=a(C),U=d(C,"P",{"data-svelte-h":!0}),f(U)!=="svelte-q21rb2"&&(U.innerHTML=z),H=a(C),p=d(C,"P",{"data-svelte-h":!0}),f(p)!=="svelte-hswkmf"&&(p.innerHTML=x),Zn=a(C),S=d(C,"DIV",{class:!0});var Lt=Z(S);b(nn.$$.fragment,Lt),$e=a(Lt),be=d(Lt,"P",{"data-svelte-h":!0}),f(be)!=="svelte-ac2yr9"&&(be.innerHTML=ko),Nt=a(Lt),b(Ge.$$.fragment,Lt),Bn=a(Lt),b(oe.$$.fragment,Lt),Lt.forEach(l),C.forEach(l),Dn=a(m),b(ve.$$.fragment,m),ft=a(m),E=d(m,"DIV",{class:!0});var ge=Z(E);b(Je.$$.fragment,ge),te=a(ge),Ve=d(ge,"P",{"data-svelte-h":!0}),f(Ve)!=="svelte-1hxjxnk"&&(Ve.textContent=on),Gt=a(ge),xe=d(ge,"P",{"data-svelte-h":!0}),f(xe)!=="svelte-1mnttie"&&(xe.innerHTML=sn),rn=a(ge),jt=d(ge,"P",{"data-svelte-h":!0}),f(jt)!=="svelte-q21rb2"&&(jt.innerHTML=Fo),an=a(ge),zt=d(ge,"P",{"data-svelte-h":!0}),f(zt)!=="svelte-hswkmf"&&(zt.innerHTML=$o),Vt=a(ge),pe=d(ge,"DIV",{class:!0});var Ht=Z(pe);b(Jt.$$.fragment,Ht),R=a(Ht),Ke=d(Ht,"P",{"data-svelte-h":!0}),f(Ke)!=="svelte-1mn34xt"&&(Ke.innerHTML=Re),et=a(Ht),b(Rt.$$.fragment,Ht),ln=a(Ht),b(tt.$$.fragment,Ht),Ht.forEach(l),ge.forEach(l),On=a(m),b(Ue.$$.fragment,m),Xe=a(m),ne=d(m,"DIV",{class:!0});var ee=Z(ne);b(Ut.$$.fragment,ee),nt=a(ee),We=d(ee,"DIV",{class:!0});var Ye=Z(We);b(X.$$.fragment,Ye),ot=a(Ye),bn=d(Ye,"P",{"data-svelte-h":!0}),f(bn)!=="svelte-1i01d0t"&&(bn.innerHTML=yn),Xt=a(Ye),b(qe.$$.fragment,Ye),dn=a(Ye),b(st.$$.fragment,Ye),Ye.forEach(l),ee.forEach(l),Kn=a(m),b(rt.$$.fragment,m),Ie=a(m),A=d(m,"DIV",{class:!0});var De=Z(A);b(at.$$.fragment,De),Mn=a(De),wn=d(De,"P",{"data-svelte-h":!0}),f(wn)!=="svelte-4pr04v"&&(wn.innerHTML=Pt),Wt=a(De),me=d(De,"P",{"data-svelte-h":!0}),f(me)!=="svelte-1mnttie"&&(me.innerHTML=ht),fo=a(De),gt=d(De,"P",{"data-svelte-h":!0}),f(gt)!=="svelte-q21rb2"&&(gt.innerHTML=Ln),Et=a(De),Ze=d(De,"P",{"data-svelte-h":!0}),f(Ze)!=="svelte-hswkmf"&&(Ze.innerHTML=cn),_t=a(De),G=d(De,"DIV",{class:!0});var ct=Z(G);b(fe.$$.fragment,ct),Hn=a(ct),V=d(ct,"P",{"data-svelte-h":!0}),f(V)!=="svelte-pn5239"&&(V.innerHTML=kn),eo=a(ct),b(ye.$$.fragment,ct),vo=a(ct),b(qt.$$.fragment,ct),ct.forEach(l),De.forEach(l),Me=a(m),b(lt.$$.fragment,m),Nn=a(m),P=d(m,"DIV",{class:!0});var ut=Z(P);b(Fn.$$.fragment,ut),to=a(ut),Be=d(ut,"P",{"data-svelte-h":!0}),f(Be)!=="svelte-93vjyr"&&(Be.textContent=Io),no=a(ut),D=d(ut,"P",{"data-svelte-h":!0}),f(D)!=="svelte-1mnttie"&&(D.innerHTML=un),we=a(ut),Ce=d(ut,"P",{"data-svelte-h":!0}),f(Ce)!=="svelte-q21rb2"&&(Ce.innerHTML=xo),pn=a(ut),it=d(ut,"P",{"data-svelte-h":!0}),f(it)!=="svelte-hswkmf"&&(it.innerHTML=ho),Pe=a(ut),je=d(ut,"DIV",{class:!0});var Mt=Z(je);b(ze.$$.fragment,Mt),Qt=a(Mt),Le=d(Mt,"P",{"data-svelte-h":!0}),f(Le)!=="svelte-1k85xb9"&&(Le.innerHTML=Tt),Ee=a(Mt),b(bt.$$.fragment,Mt),Q=a(Mt),b(Qe.$$.fragment,Mt),Gn=a(Mt),b(se.$$.fragment,Mt),Mt.forEach(l),ut.forEach(l),St=a(m),b(At.$$.fragment,m),dt=a(m),he=d(m,"DIV",{class:!0});var Fe=Z(he);b(It.$$.fragment,Fe),Se=a(Fe),mn=d(Fe,"P",{"data-svelte-h":!0}),f(mn)!=="svelte-5my4hq"&&(mn.textContent=fn),Yt=a(Fe),Dt=d(Fe,"P",{"data-svelte-h":!0}),f(Dt)!=="svelte-1mnttie"&&(Dt.innerHTML=oo),h=a(Fe),J=d(Fe,"P",{"data-svelte-h":!0}),f(J)!=="svelte-q21rb2"&&(J.innerHTML=O),Y=a(Fe),He=d(Fe,"P",{"data-svelte-h":!0}),f(He)!=="svelte-hswkmf"&&(He.innerHTML=hn),Ot=a(Fe),Ae=d(Fe,"DIV",{class:!0});var _n=Z(Ae);b(K.$$.fragment,_n),gn=a(_n),ae=d(_n,"P",{"data-svelte-h":!0}),f(ae)!=="svelte-jzq70h"&&(ae.innerHTML=so),yt=a(_n),b($n.$$.fragment,_n),ro=a(_n),b(vn.$$.fragment,_n),_n.forEach(l),Fe.forEach(l),le=a(m),b(Kt.$$.fragment,m),Zo=a(m),ie=d(m,"DIV",{class:!0});var Oe=Z(ie);b(go.$$.fragment,Oe),Go=a(Oe),xn=d(Oe,"P",{"data-svelte-h":!0}),f(xn)!=="svelte-l6qclo"&&(xn.textContent=es),Vo=a(Oe),Cn=d(Oe,"P",{"data-svelte-h":!0}),f(Cn)!=="svelte-1mnttie"&&(Cn.innerHTML=ts),Ro=a(Oe),jn=d(Oe,"P",{"data-svelte-h":!0}),f(jn)!=="svelte-q21rb2"&&(jn.innerHTML=ns),Xo=a(Oe),en=d(Oe,"P",{"data-svelte-h":!0}),f(en)!=="svelte-hswkmf"&&(en.innerHTML=Eo),Zt=a(Oe),Ne=d(Oe,"DIV",{class:!0});var pt=Z(Ne);b(ao.$$.fragment,pt),_o=a(pt),Co=d(pt,"P",{"data-svelte-h":!0}),f(Co)!=="svelte-175sksl"&&(Co.innerHTML=Qo),Vn=a(pt),b(Rn.$$.fragment,pt),Xn=a(pt),b(zn.$$.fragment,pt),pt.forEach(l),Oe.forEach(l),Pn=a(m),b(En.$$.fragment,m),de=a(m),re=d(m,"DIV",{class:!0});var mt=Z(re);b(lo.$$.fragment,mt),To=a(mt),jo=d(mt,"P",{"data-svelte-h":!0}),f(jo)!=="svelte-17rlk91"&&(jo.innerHTML=So),bo=a(mt),zo=d(mt,"P",{"data-svelte-h":!0}),f(zo)!=="svelte-1mnttie"&&(zo.innerHTML=Ao),yo=a(mt),Jo=d(mt,"P",{"data-svelte-h":!0}),f(Jo)!=="svelte-q21rb2"&&(Jo.innerHTML=Yo),Mo=a(mt),Uo=d(mt,"P",{"data-svelte-h":!0}),f(Uo)!=="svelte-hswkmf"&&(Uo.innerHTML=Do),Qn=a(mt),Bt=d(mt,"DIV",{class:!0});var tn=Z(Bt);b(ke.$$.fragment,tn),io=a(tn),wo=d(tn,"P",{"data-svelte-h":!0}),f(wo)!=="svelte-crpbyv"&&(wo.innerHTML=Wo),Oo=a(tn),b(Sn.$$.fragment,tn),An=a(tn),b(Yn.$$.fragment,tn),tn.forEach(l),mt.forEach(l),this.h()},h(){I(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(n,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(m,C){y(e,m,C),c(m,g,C),c(m,n,C),y(o,n,null),s(n,F),s(n,t),s(n,N),s(n,W),s(n,L),s(n,U),s(n,H),s(n,p),s(n,Zn),s(n,S),y(nn,S,null),s(S,$e),s(S,be),s(S,Nt),y(Ge,S,null),s(S,Bn),y(oe,S,null),c(m,Dn,C),y(ve,m,C),c(m,ft,C),c(m,E,C),y(Je,E,null),s(E,te),s(E,Ve),s(E,Gt),s(E,xe),s(E,rn),s(E,jt),s(E,an),s(E,zt),s(E,Vt),s(E,pe),y(Jt,pe,null),s(pe,R),s(pe,Ke),s(pe,et),y(Rt,pe,null),s(pe,ln),y(tt,pe,null),c(m,On,C),y(Ue,m,C),c(m,Xe,C),c(m,ne,C),y(Ut,ne,null),s(ne,nt),s(ne,We),y(X,We,null),s(We,ot),s(We,bn),s(We,Xt),y(qe,We,null),s(We,dn),y(st,We,null),c(m,Kn,C),y(rt,m,C),c(m,Ie,C),c(m,A,C),y(at,A,null),s(A,Mn),s(A,wn),s(A,Wt),s(A,me),s(A,fo),s(A,gt),s(A,Et),s(A,Ze),s(A,_t),s(A,G),y(fe,G,null),s(G,Hn),s(G,V),s(G,eo),y(ye,G,null),s(G,vo),y(qt,G,null),c(m,Me,C),y(lt,m,C),c(m,Nn,C),c(m,P,C),y(Fn,P,null),s(P,to),s(P,Be),s(P,no),s(P,D),s(P,we),s(P,Ce),s(P,pn),s(P,it),s(P,Pe),s(P,je),y(ze,je,null),s(je,Qt),s(je,Le),s(je,Ee),y(bt,je,null),s(je,Q),y(Qe,je,null),s(je,Gn),y(se,je,null),c(m,St,C),y(At,m,C),c(m,dt,C),c(m,he,C),y(It,he,null),s(he,Se),s(he,mn),s(he,Yt),s(he,Dt),s(he,h),s(he,J),s(he,Y),s(he,He),s(he,Ot),s(he,Ae),y(K,Ae,null),s(Ae,gn),s(Ae,ae),s(Ae,yt),y($n,Ae,null),s(Ae,ro),y(vn,Ae,null),c(m,le,C),y(Kt,m,C),c(m,Zo,C),c(m,ie,C),y(go,ie,null),s(ie,Go),s(ie,xn),s(ie,Vo),s(ie,Cn),s(ie,Ro),s(ie,jn),s(ie,Xo),s(ie,en),s(ie,Zt),s(ie,Ne),y(ao,Ne,null),s(Ne,_o),s(Ne,Co),s(Ne,Vn),y(Rn,Ne,null),s(Ne,Xn),y(zn,Ne,null),c(m,Pn,C),y(En,m,C),c(m,de,C),c(m,re,C),y(lo,re,null),s(re,To),s(re,jo),s(re,bo),s(re,zo),s(re,yo),s(re,Jo),s(re,Mo),s(re,Uo),s(re,Qn),s(re,Bt),y(ke,Bt,null),s(Bt,io),s(Bt,wo),s(Bt,Oo),y(Sn,Bt,null),s(Bt,An),y(Yn,Bt,null),Jn=!0},p(m,C){const Lt={};C&2&&(Lt.$$scope={dirty:C,ctx:m}),Ge.$set(Lt);const ge={};C&2&&(ge.$$scope={dirty:C,ctx:m}),oe.$set(ge);const Ht={};C&2&&(Ht.$$scope={dirty:C,ctx:m}),Rt.$set(Ht);const ee={};C&2&&(ee.$$scope={dirty:C,ctx:m}),tt.$set(ee);const Ye={};C&2&&(Ye.$$scope={dirty:C,ctx:m}),qe.$set(Ye);const De={};C&2&&(De.$$scope={dirty:C,ctx:m}),st.$set(De);const ct={};C&2&&(ct.$$scope={dirty:C,ctx:m}),ye.$set(ct);const ut={};C&2&&(ut.$$scope={dirty:C,ctx:m}),qt.$set(ut);const Mt={};C&2&&(Mt.$$scope={dirty:C,ctx:m}),bt.$set(Mt);const Fe={};C&2&&(Fe.$$scope={dirty:C,ctx:m}),Qe.$set(Fe);const _n={};C&2&&(_n.$$scope={dirty:C,ctx:m}),se.$set(_n);const Oe={};C&2&&(Oe.$$scope={dirty:C,ctx:m}),$n.$set(Oe);const pt={};C&2&&(pt.$$scope={dirty:C,ctx:m}),vn.$set(pt);const mt={};C&2&&(mt.$$scope={dirty:C,ctx:m}),Rn.$set(mt);const tn={};C&2&&(tn.$$scope={dirty:C,ctx:m}),zn.$set(tn);const qo={};C&2&&(qo.$$scope={dirty:C,ctx:m}),Sn.$set(qo);const os={};C&2&&(os.$$scope={dirty:C,ctx:m}),Yn.$set(os)},i(m){Jn||(M(e.$$.fragment,m),M(o.$$.fragment,m),M(nn.$$.fragment,m),M(Ge.$$.fragment,m),M(oe.$$.fragment,m),M(ve.$$.fragment,m),M(Je.$$.fragment,m),M(Jt.$$.fragment,m),M(Rt.$$.fragment,m),M(tt.$$.fragment,m),M(Ue.$$.fragment,m),M(Ut.$$.fragment,m),M(X.$$.fragment,m),M(qe.$$.fragment,m),M(st.$$.fragment,m),M(rt.$$.fragment,m),M(at.$$.fragment,m),M(fe.$$.fragment,m),M(ye.$$.fragment,m),M(qt.$$.fragment,m),M(lt.$$.fragment,m),M(Fn.$$.fragment,m),M(ze.$$.fragment,m),M(bt.$$.fragment,m),M(Qe.$$.fragment,m),M(se.$$.fragment,m),M(At.$$.fragment,m),M(It.$$.fragment,m),M(K.$$.fragment,m),M($n.$$.fragment,m),M(vn.$$.fragment,m),M(Kt.$$.fragment,m),M(go.$$.fragment,m),M(ao.$$.fragment,m),M(Rn.$$.fragment,m),M(zn.$$.fragment,m),M(En.$$.fragment,m),M(lo.$$.fragment,m),M(ke.$$.fragment,m),M(Sn.$$.fragment,m),M(Yn.$$.fragment,m),Jn=!0)},o(m){w(e.$$.fragment,m),w(o.$$.fragment,m),w(nn.$$.fragment,m),w(Ge.$$.fragment,m),w(oe.$$.fragment,m),w(ve.$$.fragment,m),w(Je.$$.fragment,m),w(Jt.$$.fragment,m),w(Rt.$$.fragment,m),w(tt.$$.fragment,m),w(Ue.$$.fragment,m),w(Ut.$$.fragment,m),w(X.$$.fragment,m),w(qe.$$.fragment,m),w(st.$$.fragment,m),w(rt.$$.fragment,m),w(at.$$.fragment,m),w(fe.$$.fragment,m),w(ye.$$.fragment,m),w(qt.$$.fragment,m),w(lt.$$.fragment,m),w(Fn.$$.fragment,m),w(ze.$$.fragment,m),w(bt.$$.fragment,m),w(Qe.$$.fragment,m),w(se.$$.fragment,m),w(At.$$.fragment,m),w(It.$$.fragment,m),w(K.$$.fragment,m),w($n.$$.fragment,m),w(vn.$$.fragment,m),w(Kt.$$.fragment,m),w(go.$$.fragment,m),w(ao.$$.fragment,m),w(Rn.$$.fragment,m),w(zn.$$.fragment,m),w(En.$$.fragment,m),w(lo.$$.fragment,m),w(ke.$$.fragment,m),w(Sn.$$.fragment,m),w(Yn.$$.fragment,m),Jn=!1},d(m){m&&(l(g),l(n),l(Dn),l(ft),l(E),l(On),l(Xe),l(ne),l(Kn),l(Ie),l(A),l(Me),l(Nn),l(P),l(St),l(dt),l(he),l(le),l(Zo),l(ie),l(Pn),l(de),l(re)),k(e,m),k(o),k(nn),k(Ge),k(oe),k(ve,m),k(Je),k(Jt),k(Rt),k(tt),k(Ue,m),k(Ut),k(X),k(qe),k(st),k(rt,m),k(at),k(fe),k(ye),k(qt),k(lt,m),k(Fn),k(ze),k(bt),k(Qe),k(se),k(At,m),k(It),k(K),k($n),k(vn),k(Kt,m),k(go),k(ao),k(Rn),k(zn),k(En,m),k(lo),k(ke),k(Sn),k(Yn)}}}function Ks($){let e,g;return e=new $s({props:{$$slots:{default:[Os]},$$scope:{ctx:$}}}),{c(){T(e.$$.fragment)},l(n){b(e.$$.fragment,n)},m(n,o){y(e,n,o),g=!0},p(n,o){const F={};o&2&&(F.$$scope={dirty:o,ctx:n}),e.$set(F)},i(n){g||(M(e.$$.fragment,n),g=!0)},o(n){w(e.$$.fragment,n),g=!1},d(n){k(e,n)}}}function er($){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",n,o,F="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",t,_,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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,W,j,L=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,U,z,H=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){e=i("p"),e.innerHTML=g,n=r(),o=i("ul"),o.innerHTML=F,t=r(),_=i("p"),_.innerHTML=N,W=r(),j=i("ul"),j.innerHTML=L,U=r(),z=i("p"),z.innerHTML=H},l(p){e=d(p,"P",{"data-svelte-h":!0}),f(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),n=a(p),o=d(p,"UL",{"data-svelte-h":!0}),f(o)!=="svelte-qm1t26"&&(o.innerHTML=F),t=a(p),_=d(p,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1v9qsc5"&&(_.innerHTML=N),W=a(p),j=d(p,"UL",{"data-svelte-h":!0}),f(j)!=="svelte-15scerc"&&(j.innerHTML=L),U=a(p),z=d(p,"P",{"data-svelte-h":!0}),f(z)!=="svelte-1an3odd"&&(z.innerHTML=H)},m(p,x){c(p,e,x),c(p,n,x),c(p,o,x),c(p,t,x),c(p,_,x),c(p,W,x),c(p,j,x),c(p,U,x),c(p,z,x)},p:q,d(p){p&&(l(e),l(n),l(o),l(t),l(_),l(W),l(j),l(U),l(z))}}}function tr($){let e,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=i("p"),e.innerHTML=g},l(n){e=d(n,"P",{"data-svelte-h":!0}),f(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(n,o){c(n,e,o)},p:q,d(n){n&&l(e)}}}function nr($){let e,g="Example:",n,o,F;return o=new Te({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`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function or($){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",n,o,F="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",t,_,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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,W,j,L=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,U,z,H=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){e=i("p"),e.innerHTML=g,n=r(),o=i("ul"),o.innerHTML=F,t=r(),_=i("p"),_.innerHTML=N,W=r(),j=i("ul"),j.innerHTML=L,U=r(),z=i("p"),z.innerHTML=H},l(p){e=d(p,"P",{"data-svelte-h":!0}),f(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),n=a(p),o=d(p,"UL",{"data-svelte-h":!0}),f(o)!=="svelte-qm1t26"&&(o.innerHTML=F),t=a(p),_=d(p,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1v9qsc5"&&(_.innerHTML=N),W=a(p),j=d(p,"UL",{"data-svelte-h":!0}),f(j)!=="svelte-15scerc"&&(j.innerHTML=L),U=a(p),z=d(p,"P",{"data-svelte-h":!0}),f(z)!=="svelte-1an3odd"&&(z.innerHTML=H)},m(p,x){c(p,e,x),c(p,n,x),c(p,o,x),c(p,t,x),c(p,_,x),c(p,W,x),c(p,j,x),c(p,U,x),c(p,z,x)},p:q,d(p){p&&(l(e),l(n),l(o),l(t),l(_),l(W),l(j),l(U),l(z))}}}function sr($){let e,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=i("p"),e.innerHTML=g},l(n){e=d(n,"P",{"data-svelte-h":!0}),f(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(n,o){c(n,e,o)},p:q,d(n){n&&l(e)}}}function rr($){let e,g="Example:",n,o,F;return o=new Te({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`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function ar($){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",n,o,F="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",t,_,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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,W,j,L=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,U,z,H=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){e=i("p"),e.innerHTML=g,n=r(),o=i("ul"),o.innerHTML=F,t=r(),_=i("p"),_.innerHTML=N,W=r(),j=i("ul"),j.innerHTML=L,U=r(),z=i("p"),z.innerHTML=H},l(p){e=d(p,"P",{"data-svelte-h":!0}),f(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),n=a(p),o=d(p,"UL",{"data-svelte-h":!0}),f(o)!=="svelte-qm1t26"&&(o.innerHTML=F),t=a(p),_=d(p,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1v9qsc5"&&(_.innerHTML=N),W=a(p),j=d(p,"UL",{"data-svelte-h":!0}),f(j)!=="svelte-15scerc"&&(j.innerHTML=L),U=a(p),z=d(p,"P",{"data-svelte-h":!0}),f(z)!=="svelte-1an3odd"&&(z.innerHTML=H)},m(p,x){c(p,e,x),c(p,n,x),c(p,o,x),c(p,t,x),c(p,_,x),c(p,W,x),c(p,j,x),c(p,U,x),c(p,z,x)},p:q,d(p){p&&(l(e),l(n),l(o),l(t),l(_),l(W),l(j),l(U),l(z))}}}function lr($){let e,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=i("p"),e.innerHTML=g},l(n){e=d(n,"P",{"data-svelte-h":!0}),f(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(n,o){c(n,e,o)},p:q,d(n){n&&l(e)}}}function ir($){let e,g="Examples:",n,o,F;return o=new Te({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`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-kvfsh7"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function dr($){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",n,o,F="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",t,_,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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,W,j,L=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,U,z,H=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){e=i("p"),e.innerHTML=g,n=r(),o=i("ul"),o.innerHTML=F,t=r(),_=i("p"),_.innerHTML=N,W=r(),j=i("ul"),j.innerHTML=L,U=r(),z=i("p"),z.innerHTML=H},l(p){e=d(p,"P",{"data-svelte-h":!0}),f(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),n=a(p),o=d(p,"UL",{"data-svelte-h":!0}),f(o)!=="svelte-qm1t26"&&(o.innerHTML=F),t=a(p),_=d(p,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1v9qsc5"&&(_.innerHTML=N),W=a(p),j=d(p,"UL",{"data-svelte-h":!0}),f(j)!=="svelte-15scerc"&&(j.innerHTML=L),U=a(p),z=d(p,"P",{"data-svelte-h":!0}),f(z)!=="svelte-1an3odd"&&(z.innerHTML=H)},m(p,x){c(p,e,x),c(p,n,x),c(p,o,x),c(p,t,x),c(p,_,x),c(p,W,x),c(p,j,x),c(p,U,x),c(p,z,x)},p:q,d(p){p&&(l(e),l(n),l(o),l(t),l(_),l(W),l(j),l(U),l(z))}}}function cr($){let e,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=i("p"),e.innerHTML=g},l(n){e=d(n,"P",{"data-svelte-h":!0}),f(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(n,o){c(n,e,o)},p:q,d(n){n&&l(e)}}}function ur($){let e,g="Example:",n,o,F;return o=new Te({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>)`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function pr($){let e,g;return e=new Te({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)`,wrap:!1}}),{c(){T(e.$$.fragment)},l(n){b(e.$$.fragment,n)},m(n,o){y(e,n,o),g=!0},p:q,i(n){g||(M(e.$$.fragment,n),g=!0)},o(n){w(e.$$.fragment,n),g=!1},d(n){k(e,n)}}}function mr($){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",n,o,F="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",t,_,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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,W,j,L=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,U,z,H=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){e=i("p"),e.innerHTML=g,n=r(),o=i("ul"),o.innerHTML=F,t=r(),_=i("p"),_.innerHTML=N,W=r(),j=i("ul"),j.innerHTML=L,U=r(),z=i("p"),z.innerHTML=H},l(p){e=d(p,"P",{"data-svelte-h":!0}),f(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),n=a(p),o=d(p,"UL",{"data-svelte-h":!0}),f(o)!=="svelte-qm1t26"&&(o.innerHTML=F),t=a(p),_=d(p,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1v9qsc5"&&(_.innerHTML=N),W=a(p),j=d(p,"UL",{"data-svelte-h":!0}),f(j)!=="svelte-15scerc"&&(j.innerHTML=L),U=a(p),z=d(p,"P",{"data-svelte-h":!0}),f(z)!=="svelte-1an3odd"&&(z.innerHTML=H)},m(p,x){c(p,e,x),c(p,n,x),c(p,o,x),c(p,t,x),c(p,_,x),c(p,W,x),c(p,j,x),c(p,U,x),c(p,z,x)},p:q,d(p){p&&(l(e),l(n),l(o),l(t),l(_),l(W),l(j),l(U),l(z))}}}function fr($){let e,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=i("p"),e.innerHTML=g},l(n){e=d(n,"P",{"data-svelte-h":!0}),f(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(n,o){c(n,e,o)},p:q,d(n){n&&l(e)}}}function hr($){let e,g="Example:",n,o,F;return o=new Te({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>])`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function gr($){let e,g;return e=new Te({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',wrap:!1}}),{c(){T(e.$$.fragment)},l(n){b(e.$$.fragment,n)},m(n,o){y(e,n,o),g=!0},p:q,i(n){g||(M(e.$$.fragment,n),g=!0)},o(n){w(e.$$.fragment,n),g=!1},d(n){k(e,n)}}}function _r($){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",n,o,F="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",t,_,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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,W,j,L=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,U,z,H=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){e=i("p"),e.innerHTML=g,n=r(),o=i("ul"),o.innerHTML=F,t=r(),_=i("p"),_.innerHTML=N,W=r(),j=i("ul"),j.innerHTML=L,U=r(),z=i("p"),z.innerHTML=H},l(p){e=d(p,"P",{"data-svelte-h":!0}),f(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),n=a(p),o=d(p,"UL",{"data-svelte-h":!0}),f(o)!=="svelte-qm1t26"&&(o.innerHTML=F),t=a(p),_=d(p,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1v9qsc5"&&(_.innerHTML=N),W=a(p),j=d(p,"UL",{"data-svelte-h":!0}),f(j)!=="svelte-15scerc"&&(j.innerHTML=L),U=a(p),z=d(p,"P",{"data-svelte-h":!0}),f(z)!=="svelte-1an3odd"&&(z.innerHTML=H)},m(p,x){c(p,e,x),c(p,n,x),c(p,o,x),c(p,t,x),c(p,_,x),c(p,W,x),c(p,j,x),c(p,U,x),c(p,z,x)},p:q,d(p){p&&(l(e),l(n),l(o),l(t),l(_),l(W),l(j),l(U),l(z))}}}function Tr($){let e,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=i("p"),e.innerHTML=g},l(n){e=d(n,"P",{"data-svelte-h":!0}),f(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(n,o){c(n,e,o)},p:q,d(n){n&&l(e)}}}function br($){let e,g="Example:",n,o,F;return o=new Te({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`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function yr($){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",n,o,F="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",t,_,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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,W,j,L=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,U,z,H=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){e=i("p"),e.innerHTML=g,n=r(),o=i("ul"),o.innerHTML=F,t=r(),_=i("p"),_.innerHTML=N,W=r(),j=i("ul"),j.innerHTML=L,U=r(),z=i("p"),z.innerHTML=H},l(p){e=d(p,"P",{"data-svelte-h":!0}),f(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),n=a(p),o=d(p,"UL",{"data-svelte-h":!0}),f(o)!=="svelte-qm1t26"&&(o.innerHTML=F),t=a(p),_=d(p,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1v9qsc5"&&(_.innerHTML=N),W=a(p),j=d(p,"UL",{"data-svelte-h":!0}),f(j)!=="svelte-15scerc"&&(j.innerHTML=L),U=a(p),z=d(p,"P",{"data-svelte-h":!0}),f(z)!=="svelte-1an3odd"&&(z.innerHTML=H)},m(p,x){c(p,e,x),c(p,n,x),c(p,o,x),c(p,t,x),c(p,_,x),c(p,W,x),c(p,j,x),c(p,U,x),c(p,z,x)},p:q,d(p){p&&(l(e),l(n),l(o),l(t),l(_),l(W),l(j),l(U),l(z))}}}function Mr($){let e,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=i("p"),e.innerHTML=g},l(n){e=d(n,"P",{"data-svelte-h":!0}),f(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(n,o){c(n,e,o)},p:q,d(n){n&&l(e)}}}function wr($){let e,g="Example:",n,o,F;return o=new Te({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()]`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function kr($){let e,g;return e=new Te({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)`,wrap:!1}}),{c(){T(e.$$.fragment)},l(n){b(e.$$.fragment,n)},m(n,o){y(e,n,o),g=!0},p:q,i(n){g||(M(e.$$.fragment,n),g=!0)},o(n){w(e.$$.fragment,n),g=!1},d(n){k(e,n)}}}function Fr($){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",n,o,F="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",t,_,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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,W,j,L=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,U,z,H=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){e=i("p"),e.innerHTML=g,n=r(),o=i("ul"),o.innerHTML=F,t=r(),_=i("p"),_.innerHTML=N,W=r(),j=i("ul"),j.innerHTML=L,U=r(),z=i("p"),z.innerHTML=H},l(p){e=d(p,"P",{"data-svelte-h":!0}),f(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),n=a(p),o=d(p,"UL",{"data-svelte-h":!0}),f(o)!=="svelte-qm1t26"&&(o.innerHTML=F),t=a(p),_=d(p,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1v9qsc5"&&(_.innerHTML=N),W=a(p),j=d(p,"UL",{"data-svelte-h":!0}),f(j)!=="svelte-15scerc"&&(j.innerHTML=L),U=a(p),z=d(p,"P",{"data-svelte-h":!0}),f(z)!=="svelte-1an3odd"&&(z.innerHTML=H)},m(p,x){c(p,e,x),c(p,n,x),c(p,o,x),c(p,t,x),c(p,_,x),c(p,W,x),c(p,j,x),c(p,U,x),c(p,z,x)},p:q,d(p){p&&(l(e),l(n),l(o),l(t),l(_),l(W),l(j),l(U),l(z))}}}function $r($){let e,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=i("p"),e.innerHTML=g},l(n){e=d(n,"P",{"data-svelte-h":!0}),f(e)!=="svelte-fincs2"&&(e.innerHTML=g)},m(n,o){c(n,e,o)},p:q,d(n){n&&l(e)}}}function vr($){let e,g="Example:",n,o,F;return o=new Te({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>]`,wrap:!1}}),{c(){e=i("p"),e.textContent=g,n=r(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=a(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),F=!0},p:q,i(t){F||(M(o.$$.fragment,t),F=!0)},o(t){w(o.$$.fragment,t),F=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function xr($){let e,g;return e=new Te({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)`,wrap:!1}}),{c(){T(e.$$.fragment)},l(n){b(e.$$.fragment,n)},m(n,o){y(e,n,o),g=!0},p:q,i(n){g||(M(e.$$.fragment,n),g=!0)},o(n){w(e.$$.fragment,n),g=!1},d(n){k(e,n)}}}function Cr($){let e,g,n,o,F,t,_=`The base Funnel Transformer Model transformer outputting raw hidden-states without upsampling head (also called
decoder) or any task-specific head on top.`,N,W,j=`The Funnel Transformer model was proposed in <a href="https://arxiv.org/abs/2006.03236" rel="nofollow">Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing</a> by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.`,L,U,z=`This model inherits from <a href="/docs/transformers/pr_31051/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. 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,p,x=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> 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.`,Zn,S,nn,$e,be,ko,Nt,Ge='The <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.TFFunnelBaseModel">TFFunnelBaseModel</a> forward method, overrides the <code>__call__</code> special method.',Bn,oe,Dn,ve,ft,E,Je,te,Ve,on,Gt,xe="The bare Funnel Transformer Model transformer outputting raw hidden-states without any specific head on top.",sn,rn,jt=`The Funnel Transformer model was proposed in <a href="https://arxiv.org/abs/2006.03236" rel="nofollow">Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing</a> by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.`,Fo,an,zt=`This model inherits from <a href="/docs/transformers/pr_31051/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. 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.)`,$o,Vt,pe=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> 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.`,Jt,R,Ke,Re,et,Rt,ln,tt='The <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.TFFunnelModel">TFFunnelModel</a> forward method, overrides the <code>__call__</code> special method.',On,Ue,Xe,ne,Ut,nt,We,X,ot,bn,yn,Xt="Funnel model with a binary classification head on top as used during pretraining for identifying generated tokens.",qe,dn,st=`The Funnel Transformer model was proposed in <a href="https://arxiv.org/abs/2006.03236" rel="nofollow">Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing</a> by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.`,Kn,rt,Ie=`This model inherits from <a href="/docs/transformers/pr_31051/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. 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.)`,A,at,Mn=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> 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.`,wn,Pt,Wt,me,ht,fo,gt,Ln='The <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.TFFunnelForPreTraining">TFFunnelForPreTraining</a> forward method, overrides the <code>__call__</code> special method.',Et,Ze,cn,_t,G,fe,Hn,V,kn,eo,ye,vo="Funnel Model with a <code>language modeling</code> head on top.",qt,Me,lt=`The Funnel Transformer model was proposed in <a href="https://arxiv.org/abs/2006.03236" rel="nofollow">Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing</a> by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.`,Nn,P,Fn=`This model inherits from <a href="/docs/transformers/pr_31051/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. 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.)`,to,Be,Io=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> 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.`,no,D,un,we,Ce,xo,pn,it='The <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.TFFunnelForMaskedLM">TFFunnelForMaskedLM</a> forward method, overrides the <code>__call__</code> special method.',ho,Pe,je,ze,Qt,Le,Tt,Ee,bt,Q,Qe,Gn,se,St=`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.`,At,dt,he=`The Funnel Transformer model was proposed in <a href="https://arxiv.org/abs/2006.03236" rel="nofollow">Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing</a> by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.`,It,Se,mn=`This model inherits from <a href="/docs/transformers/pr_31051/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. 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.)`,fn,Yt,Dt=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> 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.`,oo,h,J,O,Y,He,hn,Ot='The <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.TFFunnelForSequenceClassification">TFFunnelForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',Ae,K,gn,ae,so,yt,$n,ro,vn,le,Kt,Zo,ie,go=`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.`,Go,xn,es=`The Funnel Transformer model was proposed in <a href="https://arxiv.org/abs/2006.03236" rel="nofollow">Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing</a> by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.`,Vo,Cn,ts=`This model inherits from <a href="/docs/transformers/pr_31051/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. 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.)`,Ro,jn,ns=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> 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.`,Xo,en,Eo,Zt,Ne,ao,_o,Co='The <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.TFFunnelForMultipleChoice">TFFunnelForMultipleChoice</a> forward method, overrides the <code>__call__</code> special method.',Qo,Vn,Rn,Xn,zn,Pn,En,de,re,lo,To,jo=`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.`,So,bo,zo=`The Funnel Transformer model was proposed in <a href="https://arxiv.org/abs/2006.03236" rel="nofollow">Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing</a> by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.`,Ao,yo,Jo=`This model inherits from <a href="/docs/transformers/pr_31051/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. 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.)`,Yo,Mo,Uo=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> 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.`,Do,Qn,Bt,ke,io,wo,Wo,Oo='The <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.TFFunnelForTokenClassification">TFFunnelForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',Sn,An,Yn,Jn,m,C,Lt,ge,Ht,ee,Ye,De,ct,ut=`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 <code>span start logits</code> and <code>span end logits</code>).`,Mt,Fe,_n=`The Funnel Transformer model was proposed in <a href="https://arxiv.org/abs/2006.03236" rel="nofollow">Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing</a> by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le.`,Oe,pt,mt=`This model inherits from <a href="/docs/transformers/pr_31051/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. 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.)`,tn,qo,os=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> 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.`,rs,Bo,as,Tn,Po,ls,Ko,us='The <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.TFFunnelForQuestionAnswering">TFFunnelForQuestionAnswering</a> forward method, overrides the <code>__call__</code> special method.',is,Lo,ds,Ho,cs,No,ss;return e=new ue({props:{title:"TFFunnelBaseModel",local:"transformers.TFFunnelBaseModel",headingTag:"h2"}}),o=new B({props:{name:"class transformers.TFFunnelBaseModel",anchor:"transformers.TFFunnelBaseModel",parameters:[{name:"config",val:": FunnelConfig"},{name:"*inputs",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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_tf_funnel.py#L1202"}}),S=new ce({props:{$$slots:{default:[er]},$$scope:{ctx:$}}}),be=new B({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/pr_31051/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31051/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_tf_funnel.py#L1214",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31051/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/pr_31051/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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31051/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),oe=new ce({props:{$$slots:{default:[tr]},$$scope:{ctx:$}}}),ve=new _e({props:{anchor:"transformers.TFFunnelBaseModel.call.example",$$slots:{default:[nr]},$$scope:{ctx:$}}}),E=new ue({props:{title:"TFFunnelModel",local:"transformers.TFFunnelModel",headingTag:"h2"}}),Ve=new B({props:{name:"class transformers.TFFunnelModel",anchor:"transformers.TFFunnelModel",parameters:[{name:"config",val:": FunnelConfig"},{name:"*inputs",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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_tf_funnel.py#L1261"}}),R=new ce({props:{$$slots:{default:[or]},$$scope:{ctx:$}}}),et=new B({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/pr_31051/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31051/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_tf_funnel.py#L1270",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31051/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/pr_31051/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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31051/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ue=new ce({props:{$$slots:{default:[sr]},$$scope:{ctx:$}}}),ne=new _e({props:{anchor:"transformers.TFFunnelModel.call.example",$$slots:{default:[rr]},$$scope:{ctx:$}}}),nt=new ue({props:{title:"TFFunnelModelForPreTraining",local:"transformers.TFFunnelForPreTraining",headingTag:"h2"}}),ot=new B({props:{name:"class transformers.TFFunnelForPreTraining",anchor:"transformers.TFFunnelForPreTraining",parameters:[{name:"config",val:": FunnelConfig"},{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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_tf_funnel.py#L1317"}}),Pt=new ce({props:{$$slots:{default:[ar]},$$scope:{ctx:$}}}),ht=new B({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/pr_31051/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31051/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_tf_funnel.py#L1330",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31051/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/pr_31051/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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31051/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>
`}}),Ze=new ce({props:{$$slots:{default:[lr]},$$scope:{ctx:$}}}),_t=new _e({props:{anchor:"transformers.TFFunnelForPreTraining.call.example",$$slots:{default:[ir]},$$scope:{ctx:$}}}),fe=new ue({props:{title:"TFFunnelForMaskedLM",local:"transformers.TFFunnelForMaskedLM",headingTag:"h2"}}),kn=new B({props:{name:"class transformers.TFFunnelForMaskedLM",anchor:"transformers.TFFunnelForMaskedLM",parameters:[{name:"config",val:": FunnelConfig"},{name:"*inputs",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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_tf_funnel.py#L1401"}}),D=new ce({props:{$$slots:{default:[dr]},$$scope:{ctx:$}}}),Ce=new B({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/pr_31051/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31051/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_tf_funnel.py#L1416",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31051/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/pr_31051/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) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31051/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Pe=new ce({props:{$$slots:{default:[cr]},$$scope:{ctx:$}}}),ze=new _e({props:{anchor:"transformers.TFFunnelForMaskedLM.call.example",$$slots:{default:[ur]},$$scope:{ctx:$}}}),Le=new _e({props:{anchor:"transformers.TFFunnelForMaskedLM.call.example-2",$$slots:{default:[pr]},$$scope:{ctx:$}}}),Ee=new ue({props:{title:"TFFunnelForSequenceClassification",local:"transformers.TFFunnelForSequenceClassification",headingTag:"h2"}}),Qe=new B({props:{name:"class transformers.TFFunnelForSequenceClassification",anchor:"transformers.TFFunnelForSequenceClassification",parameters:[{name:"config",val:": FunnelConfig"},{name:"*inputs",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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_tf_funnel.py#L1484"}}),h=new ce({props:{$$slots:{default:[mr]},$$scope:{ctx:$}}}),Y=new B({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/pr_31051/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31051/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_tf_funnel.py#L1499",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31051/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/pr_31051/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) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31051/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),K=new ce({props:{$$slots:{default:[fr]},$$scope:{ctx:$}}}),ae=new _e({props:{anchor:"transformers.TFFunnelForSequenceClassification.call.example",$$slots:{default:[hr]},$$scope:{ctx:$}}}),yt=new _e({props:{anchor:"transformers.TFFunnelForSequenceClassification.call.example-2",$$slots:{default:[gr]},$$scope:{ctx:$}}}),ro=new ue({props:{title:"TFFunnelForMultipleChoice",local:"transformers.TFFunnelForMultipleChoice",headingTag:"h2"}}),Kt=new B({props:{name:"class transformers.TFFunnelForMultipleChoice",anchor:"transformers.TFFunnelForMultipleChoice",parameters:[{name:"config",val:": FunnelConfig"},{name:"*inputs",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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_tf_funnel.py#L1570"}}),en=new ce({props:{$$slots:{default:[_r]},$$scope:{ctx:$}}}),Ne=new B({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/pr_31051/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31051/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_tf_funnel.py#L1588",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31051/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/pr_31051/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) — Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) — <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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31051/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Vn=new ce({props:{$$slots:{default:[Tr]},$$scope:{ctx:$}}}),Xn=new _e({props:{anchor:"transformers.TFFunnelForMultipleChoice.call.example",$$slots:{default:[br]},$$scope:{ctx:$}}}),Pn=new ue({props:{title:"TFFunnelForTokenClassification",local:"transformers.TFFunnelForTokenClassification",headingTag:"h2"}}),re=new B({props:{name:"class transformers.TFFunnelForTokenClassification",anchor:"transformers.TFFunnelForTokenClassification",parameters:[{name:"config",val:": FunnelConfig"},{name:"*inputs",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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_tf_funnel.py#L1676"}}),Qn=new ce({props:{$$slots:{default:[yr]},$$scope:{ctx:$}}}),io=new B({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/pr_31051/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31051/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_tf_funnel.py#L1695",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31051/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/pr_31051/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)  — Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31051/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),An=new ce({props:{$$slots:{default:[Mr]},$$scope:{ctx:$}}}),Jn=new _e({props:{anchor:"transformers.TFFunnelForTokenClassification.call.example",$$slots:{default:[wr]},$$scope:{ctx:$}}}),C=new _e({props:{anchor:"transformers.TFFunnelForTokenClassification.call.example-2",$$slots:{default:[kr]},$$scope:{ctx:$}}}),ge=new ue({props:{title:"TFFunnelForQuestionAnswering",local:"transformers.TFFunnelForQuestionAnswering",headingTag:"h2"}}),Ye=new B({props:{name:"class transformers.TFFunnelForQuestionAnswering",anchor:"transformers.TFFunnelForQuestionAnswering",parameters:[{name:"config",val:": FunnelConfig"},{name:"*inputs",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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_tf_funnel.py#L1765"}}),Bo=new ce({props:{$$slots:{default:[Fr]},$$scope:{ctx:$}}}),Po=new B({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/pr_31051/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31051/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_31051/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/pr_31051/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/vr_31051/src/transformers/models/funnel/modeling_tf_funnel.py#L1783",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31051/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/pr_31051/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) — 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>) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31051/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Lo=new ce({props:{$$slots:{default:[$r]},$$scope:{ctx:$}}}),Ho=new _e({props:{anchor:"transformers.TFFunnelForQuestionAnswering.call.example",$$slots:{default:[vr]},$$scope:{ctx:$}}}),No=new _e({props:{anchor:"transformers.TFFunnelForQuestionAnswering.call.example-2",$$slots:{default:[xr]},$$scope:{ctx:$}}}),{c(){T(e.$$.fragment),g=r(),n=i("div"),T(o.$$.fragment),F=r(),t=i("p"),t.textContent=_,N=r(),W=i("p"),W.innerHTML=j,L=r(),U=i("p"),U.innerHTML=z,H=r(),p=i("p"),p.innerHTML=x,Zn=r(),T(S.$$.fragment),nn=r(),$e=i("div"),T(be.$$.fragment),ko=r(),Nt=i("p"),Nt.innerHTML=Ge,Bn=r(),T(oe.$$.fragment),Dn=r(),T(ve.$$.fragment),ft=r(),T(E.$$.fragment),Je=r(),te=i("div"),T(Ve.$$.fragment),on=r(),Gt=i("p"),Gt.textContent=xe,sn=r(),rn=i("p"),rn.innerHTML=jt,Fo=r(),an=i("p"),an.innerHTML=zt,$o=r(),Vt=i("p"),Vt.innerHTML=pe,Jt=r(),T(R.$$.fragment),Ke=r(),Re=i("div"),T(et.$$.fragment),Rt=r(),ln=i("p"),ln.innerHTML=tt,On=r(),T(Ue.$$.fragment),Xe=r(),T(ne.$$.fragment),Ut=r(),T(nt.$$.fragment),We=r(),X=i("div"),T(ot.$$.fragment),bn=r(),yn=i("p"),yn.textContent=Xt,qe=r(),dn=i("p"),dn.innerHTML=st,Kn=r(),rt=i("p"),rt.innerHTML=Ie,A=r(),at=i("p"),at.innerHTML=Mn,wn=r(),T(Pt.$$.fragment),Wt=r(),me=i("div"),T(ht.$$.fragment),fo=r(),gt=i("p"),gt.innerHTML=Ln,Et=r(),T(Ze.$$.fragment),cn=r(),T(_t.$$.fragment),G=r(),T(fe.$$.fragment),Hn=r(),V=i("div"),T(kn.$$.fragment),eo=r(),ye=i("p"),ye.innerHTML=vo,qt=r(),Me=i("p"),Me.innerHTML=lt,Nn=r(),P=i("p"),P.innerHTML=Fn,to=r(),Be=i("p"),Be.innerHTML=Io,no=r(),T(D.$$.fragment),un=r(),we=i("div"),T(Ce.$$.fragment),xo=r(),pn=i("p"),pn.innerHTML=it,ho=r(),T(Pe.$$.fragment),je=r(),T(ze.$$.fragment),Qt=r(),T(Le.$$.fragment),Tt=r(),T(Ee.$$.fragment),bt=r(),Q=i("div"),T(Qe.$$.fragment),Gn=r(),se=i("p"),se.textContent=St,At=r(),dt=i("p"),dt.innerHTML=he,It=r(),Se=i("p"),Se.innerHTML=mn,fn=r(),Yt=i("p"),Yt.innerHTML=Dt,oo=r(),T(h.$$.fragment),J=r(),O=i("div"),T(Y.$$.fragment),He=r(),hn=i("p"),hn.innerHTML=Ot,Ae=r(),T(K.$$.fragment),gn=r(),T(ae.$$.fragment),so=r(),T(yt.$$.fragment),$n=r(),T(ro.$$.fragment),vn=r(),le=i("div"),T(Kt.$$.fragment),Zo=r(),ie=i("p"),ie.textContent=go,Go=r(),xn=i("p"),xn.innerHTML=es,Vo=r(),Cn=i("p"),Cn.innerHTML=ts,Ro=r(),jn=i("p"),jn.innerHTML=ns,Xo=r(),T(en.$$.fragment),Eo=r(),Zt=i("div"),T(Ne.$$.fragment),ao=r(),_o=i("p"),_o.innerHTML=Co,Qo=r(),T(Vn.$$.fragment),Rn=r(),T(Xn.$$.fragment),zn=r(),T(Pn.$$.fragment),En=r(),de=i("div"),T(re.$$.fragment),lo=r(),To=i("p"),To.textContent=jo,So=r(),bo=i("p"),bo.innerHTML=zo,Ao=r(),yo=i("p"),yo.innerHTML=Jo,Yo=r(),Mo=i("p"),Mo.innerHTML=Uo,Do=r(),T(Qn.$$.fragment),Bt=r(),ke=i("div"),T(io.$$.fragment),wo=r(),Wo=i("p"),Wo.innerHTML=Oo,Sn=r(),T(An.$$.fragment),Yn=r(),T(Jn.$$.fragment),m=r(),T(C.$$.fragment),Lt=r(),T(ge.$$.fragment),Ht=r(),ee=i("div"),T(Ye.$$.fragment),De=r(),ct=i("p"),ct.innerHTML=ut,Mt=r(),Fe=i("p"),Fe.innerHTML=_n,Oe=r(),pt=i("p"),pt.innerHTML=mt,tn=r(),qo=i("p"),qo.innerHTML=os,rs=r(),T(Bo.$$.fragment),as=r(),Tn=i("div"),T(Po.$$.fragment),ls=r(),Ko=i("p"),Ko.innerHTML=us,is=r(),T(Lo.$$.fragment),ds=r(),T(Ho.$$.fragment),cs=r(),T(No.$$.fragment),this.h()},l(u){b(e.$$.fragment,u),g=a(u),n=d(u,"DIV",{class:!0});var v=Z(n);b(o.$$.fragment,v),F=a(v),t=d(v,"P",{"data-svelte-h":!0}),f(t)!=="svelte-1678uor"&&(t.textContent=_),N=a(v),W=d(v,"P",{"data-svelte-h":!0}),f(W)!=="svelte-1mnttie"&&(W.innerHTML=j),L=a(v),U=d(v,"P",{"data-svelte-h":!0}),f(U)!=="svelte-dcp5jy"&&(U.innerHTML=z),H=a(v),p=d(v,"P",{"data-svelte-h":!0}),f(p)!=="svelte-1be7e3c"&&(p.innerHTML=x),Zn=a(v),b(S.$$.fragment,v),nn=a(v),$e=d(v,"DIV",{class:!0});var co=Z($e);b(be.$$.fragment,co),ko=a(co),Nt=d(co,"P",{"data-svelte-h":!0}),f(Nt)!=="svelte-1kq3bax"&&(Nt.innerHTML=Ge),Bn=a(co),b(oe.$$.fragment,co),Dn=a(co),b(ve.$$.fragment,co),co.forEach(l),v.forEach(l),ft=a(u),b(E.$$.fragment,u),Je=a(u),te=d(u,"DIV",{class:!0});var wt=Z(te);b(Ve.$$.fragment,wt),on=a(wt),Gt=d(wt,"P",{"data-svelte-h":!0}),f(Gt)!=="svelte-1hxjxnk"&&(Gt.textContent=xe),sn=a(wt),rn=d(wt,"P",{"data-svelte-h":!0}),f(rn)!=="svelte-1mnttie"&&(rn.innerHTML=jt),Fo=a(wt),an=d(wt,"P",{"data-svelte-h":!0}),f(an)!=="svelte-dcp5jy"&&(an.innerHTML=zt),$o=a(wt),Vt=d(wt,"P",{"data-svelte-h":!0}),f(Vt)!=="svelte-1be7e3c"&&(Vt.innerHTML=pe),Jt=a(wt),b(R.$$.fragment,wt),Ke=a(wt),Re=d(wt,"DIV",{class:!0});var uo=Z(Re);b(et.$$.fragment,uo),Rt=a(uo),ln=d(uo,"P",{"data-svelte-h":!0}),f(ln)!=="svelte-cczx1d"&&(ln.innerHTML=tt),On=a(uo),b(Ue.$$.fragment,uo),Xe=a(uo),b(ne.$$.fragment,uo),uo.forEach(l),wt.forEach(l),Ut=a(u),b(nt.$$.fragment,u),We=a(u),X=d(u,"DIV",{class:!0});var kt=Z(X);b(ot.$$.fragment,kt),bn=a(kt),yn=d(kt,"P",{"data-svelte-h":!0}),f(yn)!=="svelte-uzpqda"&&(yn.textContent=Xt),qe=a(kt),dn=d(kt,"P",{"data-svelte-h":!0}),f(dn)!=="svelte-1mnttie"&&(dn.innerHTML=st),Kn=a(kt),rt=d(kt,"P",{"data-svelte-h":!0}),f(rt)!=="svelte-dcp5jy"&&(rt.innerHTML=Ie),A=a(kt),at=d(kt,"P",{"data-svelte-h":!0}),f(at)!=="svelte-1be7e3c"&&(at.innerHTML=Mn),wn=a(kt),b(Pt.$$.fragment,kt),Wt=a(kt),me=d(kt,"DIV",{class:!0});var po=Z(me);b(ht.$$.fragment,po),fo=a(po),gt=d(po,"P",{"data-svelte-h":!0}),f(gt)!=="svelte-1o2mkhx"&&(gt.innerHTML=Ln),Et=a(po),b(Ze.$$.fragment,po),cn=a(po),b(_t.$$.fragment,po),po.forEach(l),kt.forEach(l),G=a(u),b(fe.$$.fragment,u),Hn=a(u),V=d(u,"DIV",{class:!0});var Ft=Z(V);b(kn.$$.fragment,Ft),eo=a(Ft),ye=d(Ft,"P",{"data-svelte-h":!0}),f(ye)!=="svelte-m6qhia"&&(ye.innerHTML=vo),qt=a(Ft),Me=d(Ft,"P",{"data-svelte-h":!0}),f(Me)!=="svelte-1mnttie"&&(Me.innerHTML=lt),Nn=a(Ft),P=d(Ft,"P",{"data-svelte-h":!0}),f(P)!=="svelte-dcp5jy"&&(P.innerHTML=Fn),to=a(Ft),Be=d(Ft,"P",{"data-svelte-h":!0}),f(Be)!=="svelte-1be7e3c"&&(Be.innerHTML=Io),no=a(Ft),b(D.$$.fragment,Ft),un=a(Ft),we=d(Ft,"DIV",{class:!0});var Un=Z(we);b(Ce.$$.fragment,Un),xo=a(Un),pn=d(Un,"P",{"data-svelte-h":!0}),f(pn)!=="svelte-13cxc5p"&&(pn.innerHTML=it),ho=a(Un),b(Pe.$$.fragment,Un),je=a(Un),b(ze.$$.fragment,Un),Qt=a(Un),b(Le.$$.fragment,Un),Un.forEach(l),Ft.forEach(l),Tt=a(u),b(Ee.$$.fragment,u),bt=a(u),Q=d(u,"DIV",{class:!0});var $t=Z(Q);b(Qe.$$.fragment,$t),Gn=a($t),se=d($t,"P",{"data-svelte-h":!0}),f(se)!=="svelte-12dmmky"&&(se.textContent=St),At=a($t),dt=d($t,"P",{"data-svelte-h":!0}),f(dt)!=="svelte-1mnttie"&&(dt.innerHTML=he),It=a($t),Se=d($t,"P",{"data-svelte-h":!0}),f(Se)!=="svelte-dcp5jy"&&(Se.innerHTML=mn),fn=a($t),Yt=d($t,"P",{"data-svelte-h":!0}),f(Yt)!=="svelte-1be7e3c"&&(Yt.innerHTML=Dt),oo=a($t),b(h.$$.fragment,$t),J=a($t),O=d($t,"DIV",{class:!0});var Wn=Z(O);b(Y.$$.fragment,Wn),He=a(Wn),hn=d(Wn,"P",{"data-svelte-h":!0}),f(hn)!=="svelte-1c32c41"&&(hn.innerHTML=Ot),Ae=a(Wn),b(K.$$.fragment,Wn),gn=a(Wn),b(ae.$$.fragment,Wn),so=a(Wn),b(yt.$$.fragment,Wn),Wn.forEach(l),$t.forEach(l),$n=a(u),b(ro.$$.fragment,u),vn=a(u),le=d(u,"DIV",{class:!0});var vt=Z(le);b(Kt.$$.fragment,vt),Zo=a(vt),ie=d(vt,"P",{"data-svelte-h":!0}),f(ie)!=="svelte-1slwjue"&&(ie.textContent=go),Go=a(vt),xn=d(vt,"P",{"data-svelte-h":!0}),f(xn)!=="svelte-1mnttie"&&(xn.innerHTML=es),Vo=a(vt),Cn=d(vt,"P",{"data-svelte-h":!0}),f(Cn)!=="svelte-dcp5jy"&&(Cn.innerHTML=ts),Ro=a(vt),jn=d(vt,"P",{"data-svelte-h":!0}),f(jn)!=="svelte-1be7e3c"&&(jn.innerHTML=ns),Xo=a(vt),b(en.$$.fragment,vt),Eo=a(vt),Zt=d(vt,"DIV",{class:!0});var mo=Z(Zt);b(Ne.$$.fragment,mo),ao=a(mo),_o=d(mo,"P",{"data-svelte-h":!0}),f(_o)!=="svelte-coecut"&&(_o.innerHTML=Co),Qo=a(mo),b(Vn.$$.fragment,mo),Rn=a(mo),b(Xn.$$.fragment,mo),mo.forEach(l),vt.forEach(l),zn=a(u),b(Pn.$$.fragment,u),En=a(u),de=d(u,"DIV",{class:!0});var xt=Z(de);b(re.$$.fragment,xt),lo=a(xt),To=d(xt,"P",{"data-svelte-h":!0}),f(To)!=="svelte-rrgi8p"&&(To.textContent=jo),So=a(xt),bo=d(xt,"P",{"data-svelte-h":!0}),f(bo)!=="svelte-1mnttie"&&(bo.innerHTML=zo),Ao=a(xt),yo=d(xt,"P",{"data-svelte-h":!0}),f(yo)!=="svelte-dcp5jy"&&(yo.innerHTML=Jo),Yo=a(xt),Mo=d(xt,"P",{"data-svelte-h":!0}),f(Mo)!=="svelte-1be7e3c"&&(Mo.innerHTML=Uo),Do=a(xt),b(Qn.$$.fragment,xt),Bt=a(xt),ke=d(xt,"DIV",{class:!0});var qn=Z(ke);b(io.$$.fragment,qn),wo=a(qn),Wo=d(qn,"P",{"data-svelte-h":!0}),f(Wo)!=="svelte-1xlvptp"&&(Wo.innerHTML=Oo),Sn=a(qn),b(An.$$.fragment,qn),Yn=a(qn),b(Jn.$$.fragment,qn),m=a(qn),b(C.$$.fragment,qn),qn.forEach(l),xt.forEach(l),Lt=a(u),b(ge.$$.fragment,u),Ht=a(u),ee=d(u,"DIV",{class:!0});var Ct=Z(ee);b(Ye.$$.fragment,Ct),De=a(Ct),ct=d(Ct,"P",{"data-svelte-h":!0}),f(ct)!=="svelte-1n3a7pz"&&(ct.innerHTML=ut),Mt=a(Ct),Fe=d(Ct,"P",{"data-svelte-h":!0}),f(Fe)!=="svelte-1mnttie"&&(Fe.innerHTML=_n),Oe=a(Ct),pt=d(Ct,"P",{"data-svelte-h":!0}),f(pt)!=="svelte-dcp5jy"&&(pt.innerHTML=mt),tn=a(Ct),qo=d(Ct,"P",{"data-svelte-h":!0}),f(qo)!=="svelte-1be7e3c"&&(qo.innerHTML=os),rs=a(Ct),b(Bo.$$.fragment,Ct),as=a(Ct),Tn=d(Ct,"DIV",{class:!0});var In=Z(Tn);b(Po.$$.fragment,In),ls=a(In),Ko=d(In,"P",{"data-svelte-h":!0}),f(Ko)!=="svelte-1hmbchz"&&(Ko.innerHTML=us),is=a(In),b(Lo.$$.fragment,In),ds=a(In),b(Ho.$$.fragment,In),cs=a(In),b(No.$$.fragment,In),In.forEach(l),Ct.forEach(l),this.h()},h(){I($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(n,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Tn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(u,v){y(e,u,v),c(u,g,v),c(u,n,v),y(o,n,null),s(n,F),s(n,t),s(n,N),s(n,W),s(n,L),s(n,U),s(n,H),s(n,p),s(n,Zn),y(S,n,null),s(n,nn),s(n,$e),y(be,$e,null),s($e,ko),s($e,Nt),s($e,Bn),y(oe,$e,null),s($e,Dn),y(ve,$e,null),c(u,ft,v),y(E,u,v),c(u,Je,v),c(u,te,v),y(Ve,te,null),s(te,on),s(te,Gt),s(te,sn),s(te,rn),s(te,Fo),s(te,an),s(te,$o),s(te,Vt),s(te,Jt),y(R,te,null),s(te,Ke),s(te,Re),y(et,Re,null),s(Re,Rt),s(Re,ln),s(Re,On),y(Ue,Re,null),s(Re,Xe),y(ne,Re,null),c(u,Ut,v),y(nt,u,v),c(u,We,v),c(u,X,v),y(ot,X,null),s(X,bn),s(X,yn),s(X,qe),s(X,dn),s(X,Kn),s(X,rt),s(X,A),s(X,at),s(X,wn),y(Pt,X,null),s(X,Wt),s(X,me),y(ht,me,null),s(me,fo),s(me,gt),s(me,Et),y(Ze,me,null),s(me,cn),y(_t,me,null),c(u,G,v),y(fe,u,v),c(u,Hn,v),c(u,V,v),y(kn,V,null),s(V,eo),s(V,ye),s(V,qt),s(V,Me),s(V,Nn),s(V,P),s(V,to),s(V,Be),s(V,no),y(D,V,null),s(V,un),s(V,we),y(Ce,we,null),s(we,xo),s(we,pn),s(we,ho),y(Pe,we,null),s(we,je),y(ze,we,null),s(we,Qt),y(Le,we,null),c(u,Tt,v),y(Ee,u,v),c(u,bt,v),c(u,Q,v),y(Qe,Q,null),s(Q,Gn),s(Q,se),s(Q,At),s(Q,dt),s(Q,It),s(Q,Se),s(Q,fn),s(Q,Yt),s(Q,oo),y(h,Q,null),s(Q,J),s(Q,O),y(Y,O,null),s(O,He),s(O,hn),s(O,Ae),y(K,O,null),s(O,gn),y(ae,O,null),s(O,so),y(yt,O,null),c(u,$n,v),y(ro,u,v),c(u,vn,v),c(u,le,v),y(Kt,le,null),s(le,Zo),s(le,ie),s(le,Go),s(le,xn),s(le,Vo),s(le,Cn),s(le,Ro),s(le,jn),s(le,Xo),y(en,le,null),s(le,Eo),s(le,Zt),y(Ne,Zt,null),s(Zt,ao),s(Zt,_o),s(Zt,Qo),y(Vn,Zt,null),s(Zt,Rn),y(Xn,Zt,null),c(u,zn,v),y(Pn,u,v),c(u,En,v),c(u,de,v),y(re,de,null),s(de,lo),s(de,To),s(de,So),s(de,bo),s(de,Ao),s(de,yo),s(de,Yo),s(de,Mo),s(de,Do),y(Qn,de,null),s(de,Bt),s(de,ke),y(io,ke,null),s(ke,wo),s(ke,Wo),s(ke,Sn),y(An,ke,null),s(ke,Yn),y(Jn,ke,null),s(ke,m),y(C,ke,null),c(u,Lt,v),y(ge,u,v),c(u,Ht,v),c(u,ee,v),y(Ye,ee,null),s(ee,De),s(ee,ct),s(ee,Mt),s(ee,Fe),s(ee,Oe),s(ee,pt),s(ee,tn),s(ee,qo),s(ee,rs),y(Bo,ee,null),s(ee,as),s(ee,Tn),y(Po,Tn,null),s(Tn,ls),s(Tn,Ko),s(Tn,is),y(Lo,Tn,null),s(Tn,ds),y(Ho,Tn,null),s(Tn,cs),y(No,Tn,null),ss=!0},p(u,v){const co={};v&2&&(co.$$scope={dirty:v,ctx:u}),S.$set(co);const wt={};v&2&&(wt.$$scope={dirty:v,ctx:u}),oe.$set(wt);const uo={};v&2&&(uo.$$scope={dirty:v,ctx:u}),ve.$set(uo);const kt={};v&2&&(kt.$$scope={dirty:v,ctx:u}),R.$set(kt);const po={};v&2&&(po.$$scope={dirty:v,ctx:u}),Ue.$set(po);const Ft={};v&2&&(Ft.$$scope={dirty:v,ctx:u}),ne.$set(Ft);const Un={};v&2&&(Un.$$scope={dirty:v,ctx:u}),Pt.$set(Un);const $t={};v&2&&($t.$$scope={dirty:v,ctx:u}),Ze.$set($t);const Wn={};v&2&&(Wn.$$scope={dirty:v,ctx:u}),_t.$set(Wn);const vt={};v&2&&(vt.$$scope={dirty:v,ctx:u}),D.$set(vt);const mo={};v&2&&(mo.$$scope={dirty:v,ctx:u}),Pe.$set(mo);const xt={};v&2&&(xt.$$scope={dirty:v,ctx:u}),ze.$set(xt);const qn={};v&2&&(qn.$$scope={dirty:v,ctx:u}),Le.$set(qn);const Ct={};v&2&&(Ct.$$scope={dirty:v,ctx:u}),h.$set(Ct);const In={};v&2&&(In.$$scope={dirty:v,ctx:u}),K.$set(In);const ps={};v&2&&(ps.$$scope={dirty:v,ctx:u}),ae.$set(ps);const ms={};v&2&&(ms.$$scope={dirty:v,ctx:u}),yt.$set(ms);const fs={};v&2&&(fs.$$scope={dirty:v,ctx:u}),en.$set(fs);const hs={};v&2&&(hs.$$scope={dirty:v,ctx:u}),Vn.$set(hs);const gs={};v&2&&(gs.$$scope={dirty:v,ctx:u}),Xn.$set(gs);const _s={};v&2&&(_s.$$scope={dirty:v,ctx:u}),Qn.$set(_s);const Ts={};v&2&&(Ts.$$scope={dirty:v,ctx:u}),An.$set(Ts);const bs={};v&2&&(bs.$$scope={dirty:v,ctx:u}),Jn.$set(bs);const ys={};v&2&&(ys.$$scope={dirty:v,ctx:u}),C.$set(ys);const Ms={};v&2&&(Ms.$$scope={dirty:v,ctx:u}),Bo.$set(Ms);const ws={};v&2&&(ws.$$scope={dirty:v,ctx:u}),Lo.$set(ws);const ks={};v&2&&(ks.$$scope={dirty:v,ctx:u}),Ho.$set(ks);const Fs={};v&2&&(Fs.$$scope={dirty:v,ctx:u}),No.$set(Fs)},i(u){ss||(M(e.$$.fragment,u),M(o.$$.fragment,u),M(S.$$.fragment,u),M(be.$$.fragment,u),M(oe.$$.fragment,u),M(ve.$$.fragment,u),M(E.$$.fragment,u),M(Ve.$$.fragment,u),M(R.$$.fragment,u),M(et.$$.fragment,u),M(Ue.$$.fragment,u),M(ne.$$.fragment,u),M(nt.$$.fragment,u),M(ot.$$.fragment,u),M(Pt.$$.fragment,u),M(ht.$$.fragment,u),M(Ze.$$.fragment,u),M(_t.$$.fragment,u),M(fe.$$.fragment,u),M(kn.$$.fragment,u),M(D.$$.fragment,u),M(Ce.$$.fragment,u),M(Pe.$$.fragment,u),M(ze.$$.fragment,u),M(Le.$$.fragment,u),M(Ee.$$.fragment,u),M(Qe.$$.fragment,u),M(h.$$.fragment,u),M(Y.$$.fragment,u),M(K.$$.fragment,u),M(ae.$$.fragment,u),M(yt.$$.fragment,u),M(ro.$$.fragment,u),M(Kt.$$.fragment,u),M(en.$$.fragment,u),M(Ne.$$.fragment,u),M(Vn.$$.fragment,u),M(Xn.$$.fragment,u),M(Pn.$$.fragment,u),M(re.$$.fragment,u),M(Qn.$$.fragment,u),M(io.$$.fragment,u),M(An.$$.fragment,u),M(Jn.$$.fragment,u),M(C.$$.fragment,u),M(ge.$$.fragment,u),M(Ye.$$.fragment,u),M(Bo.$$.fragment,u),M(Po.$$.fragment,u),M(Lo.$$.fragment,u),M(Ho.$$.fragment,u),M(No.$$.fragment,u),ss=!0)},o(u){w(e.$$.fragment,u),w(o.$$.fragment,u),w(S.$$.fragment,u),w(be.$$.fragment,u),w(oe.$$.fragment,u),w(ve.$$.fragment,u),w(E.$$.fragment,u),w(Ve.$$.fragment,u),w(R.$$.fragment,u),w(et.$$.fragment,u),w(Ue.$$.fragment,u),w(ne.$$.fragment,u),w(nt.$$.fragment,u),w(ot.$$.fragment,u),w(Pt.$$.fragment,u),w(ht.$$.fragment,u),w(Ze.$$.fragment,u),w(_t.$$.fragment,u),w(fe.$$.fragment,u),w(kn.$$.fragment,u),w(D.$$.fragment,u),w(Ce.$$.fragment,u),w(Pe.$$.fragment,u),w(ze.$$.fragment,u),w(Le.$$.fragment,u),w(Ee.$$.fragment,u),w(Qe.$$.fragment,u),w(h.$$.fragment,u),w(Y.$$.fragment,u),w(K.$$.fragment,u),w(ae.$$.fragment,u),w(yt.$$.fragment,u),w(ro.$$.fragment,u),w(Kt.$$.fragment,u),w(en.$$.fragment,u),w(Ne.$$.fragment,u),w(Vn.$$.fragment,u),w(Xn.$$.fragment,u),w(Pn.$$.fragment,u),w(re.$$.fragment,u),w(Qn.$$.fragment,u),w(io.$$.fragment,u),w(An.$$.fragment,u),w(Jn.$$.fragment,u),w(C.$$.fragment,u),w(ge.$$.fragment,u),w(Ye.$$.fragment,u),w(Bo.$$.fragment,u),w(Po.$$.fragment,u),w(Lo.$$.fragment,u),w(Ho.$$.fragment,u),w(No.$$.fragment,u),ss=!1},d(u){u&&(l(g),l(n),l(ft),l(Je),l(te),l(Ut),l(We),l(X),l(G),l(Hn),l(V),l(Tt),l(bt),l(Q),l($n),l(vn),l(le),l(zn),l(En),l(de),l(Lt),l(Ht),l(ee)),k(e,u),k(o),k(S),k(be),k(oe),k(ve),k(E,u),k(Ve),k(R),k(et),k(Ue),k(ne),k(nt,u),k(ot),k(Pt),k(ht),k(Ze),k(_t),k(fe,u),k(kn),k(D),k(Ce),k(Pe),k(ze),k(Le),k(Ee,u),k(Qe),k(h),k(Y),k(K),k(ae),k(yt),k(ro,u),k(Kt),k(en),k(Ne),k(Vn),k(Xn),k(Pn,u),k(re),k(Qn),k(io),k(An),k(Jn),k(C),k(ge,u),k(Ye),k(Bo),k(Po),k(Lo),k(Ho),k(No)}}}function jr($){let e,g;return e=new $s({props:{$$slots:{default:[Cr]},$$scope:{ctx:$}}}),{c(){T(e.$$.fragment)},l(n){b(e.$$.fragment,n)},m(n,o){y(e,n,o),g=!0},p(n,o){const F={};o&2&&(F.$$scope={dirty:o,ctx:n}),e.$set(F)},i(n){g||(M(e.$$.fragment,n),g=!0)},o(n){w(e.$$.fragment,n),g=!1},d(n){k(e,n)}}}function zr($){let e,g,n,o,F,t,_,N='<a href="https://huggingface.co/models?filter=funnel"><img alt="Models" src="https://img.shields.io/badge/All_model_pages-funnel-blueviolet"/></a> <a href="https://huggingface.co/spaces/docs-demos/funnel-transformer-small"><img alt="Spaces" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue"/></a>',W,j,L,U,z=`The Funnel Transformer model was proposed in the paper <a href="https://arxiv.org/abs/2006.03236" rel="nofollow">Funnel-Transformer: Filtering out Sequential Redundancy for
Efficient Language Processing</a>. 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.`,H,p,x="The abstract from the paper is the following:",Zn,S,nn=`<em>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.</em>`,$e,be,ko='This model was contributed by <a href="https://huggingface.co/sgugger" rel="nofollow">sgugger</a>. The original code can be found <a href="https://github.com/laiguokun/Funnel-Transformer" rel="nofollow">here</a>.',Nt,Ge,Bn,oe,Dn=`<li>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.</li> <li>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’s why there are two versions of each checkpoint. The version suffixed with “-base” contains only the three blocks, while the version without that suffix contains the three blocks and the upsampling head with its additional layers.</li> <li>The Funnel Transformer checkpoints are all available with a full version and a base version. The first ones should be
used for <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelModel">FunnelModel</a>, <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelForPreTraining">FunnelForPreTraining</a>,
<a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelForMaskedLM">FunnelForMaskedLM</a>, <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelForTokenClassification">FunnelForTokenClassification</a> and
<a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelForQuestionAnswering">FunnelForQuestionAnswering</a>. The second ones should be used for
<a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelBaseModel">FunnelBaseModel</a>, <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelForSequenceClassification">FunnelForSequenceClassification</a> and
<a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelForMultipleChoice">FunnelForMultipleChoice</a>.</li>`,ve,ft,E,Je,te='<li><a href="../tasks/sequence_classification">Text classification task guide</a></li> <li><a href="../tasks/token_classification">Token classification task guide</a></li> <li><a href="../tasks/question_answering">Question answering task guide</a></li> <li><a href="../tasks/masked_language_modeling">Masked language modeling task guide</a></li> <li><a href="../tasks/multiple_choice">Multiple choice task guide</a></li>',Ve,on,Gt,xe,sn,rn,jt,Fo=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelModel">FunnelModel</a> or a <a href="/docs/transformers/pr_31051/en/model_doc/bert#transformers.TFBertModel">TFBertModel</a>. 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 <a href="https://huggingface.co/funnel-transformer/small" rel="nofollow">funnel-transformer/small</a> architecture.`,an,zt,$o=`Configuration objects inherit from <a href="/docs/transformers/pr_31051/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_31051/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Vt,pe,Jt,R,Ke,Re,et,Rt="Construct a Funnel Transformer tokenizer. Based on WordPiece.",ln,tt,On=`This tokenizer inherits from <a href="/docs/transformers/pr_31051/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a> which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`,Ue,Xe,ne,Ut,nt,We=`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:`,X,ot,bn="<li>single sequence: <code>[CLS] X [SEP]</code></li> <li>pair of sequences: <code>[CLS] A [SEP] B [SEP]</code></li>",yn,Xt,qe,dn,st,Kn=`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer <code>prepare_for_model</code> method.`,rt,Ie,A,at,Mn,wn="Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Funnel",Pt,Wt,me,ht,fo="If <code>token_ids_1</code> is <code>None</code>, this method only returns the first portion of the mask (0s).",gt,Ln,Et,Ze,cn,_t,G,fe,Hn,V,kn="Construct a “fast” Funnel Transformer tokenizer (backed by HuggingFace’s <em>tokenizers</em> library). Based on WordPiece.",eo,ye,vo=`This tokenizer inherits from <a href="/docs/transformers/pr_31051/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast">PreTrainedTokenizerFast</a> which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`,qt,Me,lt,Nn,P,Fn=`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:`,to,Be,Io="<li>single sequence: <code>[CLS] X [SEP]</code></li> <li>pair of sequences: <code>[CLS] A [SEP] B [SEP]</code></li>",no,D,un,we,Ce,xo="Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Funnel",pn,it,ho,Pe,je="If <code>token_ids_1</code> is <code>None</code>, this method only returns the first portion of the mask (0s).",ze,Qt,Le,Tt,Ee,bt,Q,Qe='Output type of <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelForPreTraining">FunnelForPreTraining</a>.',Gn,se,St,At,dt,he='Output type of <a href="/docs/transformers/pr_31051/en/model_doc/funnel#transformers.FunnelForPreTraining">FunnelForPreTraining</a>.',It,Se,mn,fn,Yt,Dt,oo;return F=new ue({props:{title:"Funnel Transformer",local:"funnel-transformer",headingTag:"h1"}}),j=new ue({props:{title:"Overview",local:"overview",headingTag:"h2"}}),Ge=new ue({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),ft=new ue({props:{title:"Resources",local:"resources",headingTag:"h2"}}),on=new ue({props:{title:"FunnelConfig",local:"transformers.FunnelConfig",headingTag:"h2"}}),sn=new B({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/pr_31051/en/model_doc/funnel#transformers.FunnelModel">FunnelModel</a> or <a href="/docs/transformers/pr_31051/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-09) &#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>True</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>True</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/vr_31051/src/transformers/models/funnel/configuration_funnel.py#L24"}}),pe=new ue({props:{title:"FunnelTokenizer",local:"transformers.FunnelTokenizer",headingTag:"h2"}}),Ke=new B({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>, <em>optional</em>, 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>, <em>optional</em>, 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/vr_31051/src/transformers/models/funnel/tokenization_funnel.py#L66"}}),ne=new B({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.FunnelTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": Optional = 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/vr_31051/src/transformers/models/funnel/tokenization_funnel.py#L212",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),qe=new B({props:{name:"get_special_tokens_mask",anchor:"transformers.FunnelTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": Optional = 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/vr_31051/src/transformers/models/funnel/tokenization_funnel.py#L238",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),A=new B({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.FunnelTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": Optional = 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/vr_31051/src/transformers/models/funnel/tokenization_funnel.py#L266",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),Wt=new _e({props:{anchor:"transformers.FunnelTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[Ws]},$$scope:{ctx:$}}}),Et=new B({props:{name:"save_vocabulary",anchor:"transformers.FunnelTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": Optional = None"}],source:"https://github.com/huggingface/transformers/blob/vr_31051/src/transformers/models/funnel/tokenization_funnel.py#L296"}}),cn=new ue({props:{title:"FunnelTokenizerFast",local:"transformers.FunnelTokenizerFast",headingTag:"h2"}}),fe=new B({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/vr_31051/src/transformers/models/funnel/tokenization_funnel_fast.py#L45"}}),lt=new B({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/vr_31051/src/transformers/models/funnel/tokenization_funnel_fast.py#L144",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),un=new B({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.FunnelTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": List"},{name:"token_ids_1",val:": Optional = 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/vr_31051/src/transformers/models/funnel/tokenization_funnel_fast.py#L168",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><code>List[int]</code></p>
`}}),it=new _e({props:{anchor:"transformers.FunnelTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[qs]},$$scope:{ctx:$}}}),Qt=new ue({props:{title:"Funnel specific outputs",local:"transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput",headingTag:"h2"}}),Ee=new B({props:{name:"class transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput",anchor:"transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput",parameters:[{name:"loss",val:": Optional = None"},{name:"logits",val:": FloatTensor = None"},{name:"hidden_states",val:": Optional = None"},{name:"attentions",val:": Optional = 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/vr_31051/src/transformers/models/funnel/modeling_funnel.py#L820"}}),St=new B({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/vr_31051/src/transformers/models/funnel/modeling_tf_funnel.py#L1086"}}),Se=new Js({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[jr],pytorch:[Ks]},$$scope:{ctx:$}}}),fn=new Us({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/funnel.md"}}),{c(){e=i("meta"),g=r(),n=i("p"),o=r(),T(F.$$.fragment),t=r(),_=i("div"),_.innerHTML=N,W=r(),T(j.$$.fragment),L=r(),U=i("p"),U.innerHTML=z,H=r(),p=i("p"),p.textContent=x,Zn=r(),S=i("p"),S.innerHTML=nn,$e=r(),be=i("p"),be.innerHTML=ko,Nt=r(),T(Ge.$$.fragment),Bn=r(),oe=i("ul"),oe.innerHTML=Dn,ve=r(),T(ft.$$.fragment),E=r(),Je=i("ul"),Je.innerHTML=te,Ve=r(),T(on.$$.fragment),Gt=r(),xe=i("div"),T(sn.$$.fragment),rn=r(),jt=i("p"),jt.innerHTML=Fo,an=r(),zt=i("p"),zt.innerHTML=$o,Vt=r(),T(pe.$$.fragment),Jt=r(),R=i("div"),T(Ke.$$.fragment),Re=r(),et=i("p"),et.textContent=Rt,ln=r(),tt=i("p"),tt.innerHTML=On,Ue=r(),Xe=i("div"),T(ne.$$.fragment),Ut=r(),nt=i("p"),nt.textContent=We,X=r(),ot=i("ul"),ot.innerHTML=bn,yn=r(),Xt=i("div"),T(qe.$$.fragment),dn=r(),st=i("p"),st.innerHTML=Kn,rt=r(),Ie=i("div"),T(A.$$.fragment),at=r(),Mn=i("p"),Mn.textContent=wn,Pt=r(),T(Wt.$$.fragment),me=r(),ht=i("p"),ht.innerHTML=fo,gt=r(),Ln=i("div"),T(Et.$$.fragment),Ze=r(),T(cn.$$.fragment),_t=r(),G=i("div"),T(fe.$$.fragment),Hn=r(),V=i("p"),V.innerHTML=kn,eo=r(),ye=i("p"),ye.innerHTML=vo,qt=r(),Me=i("div"),T(lt.$$.fragment),Nn=r(),P=i("p"),P.textContent=Fn,to=r(),Be=i("ul"),Be.innerHTML=Io,no=r(),D=i("div"),T(un.$$.fragment),we=r(),Ce=i("p"),Ce.textContent=xo,pn=r(),T(it.$$.fragment),ho=r(),Pe=i("p"),Pe.innerHTML=je,ze=r(),T(Qt.$$.fragment),Le=r(),Tt=i("div"),T(Ee.$$.fragment),bt=r(),Q=i("p"),Q.innerHTML=Qe,Gn=r(),se=i("div"),T(St.$$.fragment),At=r(),dt=i("p"),dt.innerHTML=he,It=r(),T(Se.$$.fragment),mn=r(),T(fn.$$.fragment),Yt=r(),Dt=i("p"),this.h()},l(h){const J=zs("svelte-u9bgzb",document.head);e=d(J,"META",{name:!0,content:!0}),J.forEach(l),g=a(h),n=d(h,"P",{}),Z(n).forEach(l),o=a(h),b(F.$$.fragment,h),t=a(h),_=d(h,"DIV",{class:!0,"data-svelte-h":!0}),f(_)!=="svelte-lskqhd"&&(_.innerHTML=N),W=a(h),b(j.$$.fragment,h),L=a(h),U=d(h,"P",{"data-svelte-h":!0}),f(U)!=="svelte-1okwogu"&&(U.innerHTML=z),H=a(h),p=d(h,"P",{"data-svelte-h":!0}),f(p)!=="svelte-vfdo9a"&&(p.textContent=x),Zn=a(h),S=d(h,"P",{"data-svelte-h":!0}),f(S)!=="svelte-1t8lw0x"&&(S.innerHTML=nn),$e=a(h),be=d(h,"P",{"data-svelte-h":!0}),f(be)!=="svelte-pea6cs"&&(be.innerHTML=ko),Nt=a(h),b(Ge.$$.fragment,h),Bn=a(h),oe=d(h,"UL",{"data-svelte-h":!0}),f(oe)!=="svelte-8j4vc2"&&(oe.innerHTML=Dn),ve=a(h),b(ft.$$.fragment,h),E=a(h),Je=d(h,"UL",{"data-svelte-h":!0}),f(Je)!=="svelte-mgusi3"&&(Je.innerHTML=te),Ve=a(h),b(on.$$.fragment,h),Gt=a(h),xe=d(h,"DIV",{class:!0});var O=Z(xe);b(sn.$$.fragment,O),rn=a(O),jt=d(O,"P",{"data-svelte-h":!0}),f(jt)!=="svelte-1d64045"&&(jt.innerHTML=Fo),an=a(O),zt=d(O,"P",{"data-svelte-h":!0}),f(zt)!=="svelte-11f31cj"&&(zt.innerHTML=$o),O.forEach(l),Vt=a(h),b(pe.$$.fragment,h),Jt=a(h),R=d(h,"DIV",{class:!0});var Y=Z(R);b(Ke.$$.fragment,Y),Re=a(Y),et=d(Y,"P",{"data-svelte-h":!0}),f(et)!=="svelte-iru9iq"&&(et.textContent=Rt),ln=a(Y),tt=d(Y,"P",{"data-svelte-h":!0}),f(tt)!=="svelte-u7975k"&&(tt.innerHTML=On),Ue=a(Y),Xe=d(Y,"DIV",{class:!0});var He=Z(Xe);b(ne.$$.fragment,He),Ut=a(He),nt=d(He,"P",{"data-svelte-h":!0}),f(nt)!=="svelte-t7qurq"&&(nt.textContent=We),X=a(He),ot=d(He,"UL",{"data-svelte-h":!0}),f(ot)!=="svelte-xi6653"&&(ot.innerHTML=bn),He.forEach(l),yn=a(Y),Xt=d(Y,"DIV",{class:!0});var hn=Z(Xt);b(qe.$$.fragment,hn),dn=a(hn),st=d(hn,"P",{"data-svelte-h":!0}),f(st)!=="svelte-1f4f5kp"&&(st.innerHTML=Kn),hn.forEach(l),rt=a(Y),Ie=d(Y,"DIV",{class:!0});var Ot=Z(Ie);b(A.$$.fragment,Ot),at=a(Ot),Mn=d(Ot,"P",{"data-svelte-h":!0}),f(Mn)!=="svelte-1q5gllr"&&(Mn.textContent=wn),Pt=a(Ot),b(Wt.$$.fragment,Ot),me=a(Ot),ht=d(Ot,"P",{"data-svelte-h":!0}),f(ht)!=="svelte-owoxgn"&&(ht.innerHTML=fo),Ot.forEach(l),gt=a(Y),Ln=d(Y,"DIV",{class:!0});var Ae=Z(Ln);b(Et.$$.fragment,Ae),Ae.forEach(l),Y.forEach(l),Ze=a(h),b(cn.$$.fragment,h),_t=a(h),G=d(h,"DIV",{class:!0});var K=Z(G);b(fe.$$.fragment,K),Hn=a(K),V=d(K,"P",{"data-svelte-h":!0}),f(V)!=="svelte-qil6sj"&&(V.innerHTML=kn),eo=a(K),ye=d(K,"P",{"data-svelte-h":!0}),f(ye)!=="svelte-19gbtno"&&(ye.innerHTML=vo),qt=a(K),Me=d(K,"DIV",{class:!0});var gn=Z(Me);b(lt.$$.fragment,gn),Nn=a(gn),P=d(gn,"P",{"data-svelte-h":!0}),f(P)!=="svelte-1x1qio1"&&(P.textContent=Fn),to=a(gn),Be=d(gn,"UL",{"data-svelte-h":!0}),f(Be)!=="svelte-xi6653"&&(Be.innerHTML=Io),gn.forEach(l),no=a(K),D=d(K,"DIV",{class:!0});var ae=Z(D);b(un.$$.fragment,ae),we=a(ae),Ce=d(ae,"P",{"data-svelte-h":!0}),f(Ce)!=="svelte-1q5gllr"&&(Ce.textContent=xo),pn=a(ae),b(it.$$.fragment,ae),ho=a(ae),Pe=d(ae,"P",{"data-svelte-h":!0}),f(Pe)!=="svelte-owoxgn"&&(Pe.innerHTML=je),ae.forEach(l),K.forEach(l),ze=a(h),b(Qt.$$.fragment,h),Le=a(h),Tt=d(h,"DIV",{class:!0});var so=Z(Tt);b(Ee.$$.fragment,so),bt=a(so),Q=d(so,"P",{"data-svelte-h":!0}),f(Q)!=="svelte-c19bd1"&&(Q.innerHTML=Qe),so.forEach(l),Gn=a(h),se=d(h,"DIV",{class:!0});var yt=Z(se);b(St.$$.fragment,yt),At=a(yt),dt=d(yt,"P",{"data-svelte-h":!0}),f(dt)!=="svelte-c19bd1"&&(dt.innerHTML=he),yt.forEach(l),It=a(h),b(Se.$$.fragment,h),mn=a(h),b(fn.$$.fragment,h),Yt=a(h),Dt=d(h,"P",{}),Z(Dt).forEach(l),this.h()},h(){I(e,"name","hf:doc:metadata"),I(e,"content",Jr),I(_,"class","flex flex-wrap space-x-1"),I(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Ln,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),I(se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(h,J){s(document.head,e),c(h,g,J),c(h,n,J),c(h,o,J),y(F,h,J),c(h,t,J),c(h,_,J),c(h,W,J),y(j,h,J),c(h,L,J),c(h,U,J),c(h,H,J),c(h,p,J),c(h,Zn,J),c(h,S,J),c(h,$e,J),c(h,be,J),c(h,Nt,J),y(Ge,h,J),c(h,Bn,J),c(h,oe,J),c(h,ve,J),y(ft,h,J),c(h,E,J),c(h,Je,J),c(h,Ve,J),y(on,h,J),c(h,Gt,J),c(h,xe,J),y(sn,xe,null),s(xe,rn),s(xe,jt),s(xe,an),s(xe,zt),c(h,Vt,J),y(pe,h,J),c(h,Jt,J),c(h,R,J),y(Ke,R,null),s(R,Re),s(R,et),s(R,ln),s(R,tt),s(R,Ue),s(R,Xe),y(ne,Xe,null),s(Xe,Ut),s(Xe,nt),s(Xe,X),s(Xe,ot),s(R,yn),s(R,Xt),y(qe,Xt,null),s(Xt,dn),s(Xt,st),s(R,rt),s(R,Ie),y(A,Ie,null),s(Ie,at),s(Ie,Mn),s(Ie,Pt),y(Wt,Ie,null),s(Ie,me),s(Ie,ht),s(R,gt),s(R,Ln),y(Et,Ln,null),c(h,Ze,J),y(cn,h,J),c(h,_t,J),c(h,G,J),y(fe,G,null),s(G,Hn),s(G,V),s(G,eo),s(G,ye),s(G,qt),s(G,Me),y(lt,Me,null),s(Me,Nn),s(Me,P),s(Me,to),s(Me,Be),s(G,no),s(G,D),y(un,D,null),s(D,we),s(D,Ce),s(D,pn),y(it,D,null),s(D,ho),s(D,Pe),c(h,ze,J),y(Qt,h,J),c(h,Le,J),c(h,Tt,J),y(Ee,Tt,null),s(Tt,bt),s(Tt,Q),c(h,Gn,J),c(h,se,J),y(St,se,null),s(se,At),s(se,dt),c(h,It,J),y(Se,h,J),c(h,mn,J),y(fn,h,J),c(h,Yt,J),c(h,Dt,J),oo=!0},p(h,[J]){const O={};J&2&&(O.$$scope={dirty:J,ctx:h}),Wt.$set(O);const Y={};J&2&&(Y.$$scope={dirty:J,ctx:h}),it.$set(Y);const He={};J&2&&(He.$$scope={dirty:J,ctx:h}),Se.$set(He)},i(h){oo||(M(F.$$.fragment,h),M(j.$$.fragment,h),M(Ge.$$.fragment,h),M(ft.$$.fragment,h),M(on.$$.fragment,h),M(sn.$$.fragment,h),M(pe.$$.fragment,h),M(Ke.$$.fragment,h),M(ne.$$.fragment,h),M(qe.$$.fragment,h),M(A.$$.fragment,h),M(Wt.$$.fragment,h),M(Et.$$.fragment,h),M(cn.$$.fragment,h),M(fe.$$.fragment,h),M(lt.$$.fragment,h),M(un.$$.fragment,h),M(it.$$.fragment,h),M(Qt.$$.fragment,h),M(Ee.$$.fragment,h),M(St.$$.fragment,h),M(Se.$$.fragment,h),M(fn.$$.fragment,h),oo=!0)},o(h){w(F.$$.fragment,h),w(j.$$.fragment,h),w(Ge.$$.fragment,h),w(ft.$$.fragment,h),w(on.$$.fragment,h),w(sn.$$.fragment,h),w(pe.$$.fragment,h),w(Ke.$$.fragment,h),w(ne.$$.fragment,h),w(qe.$$.fragment,h),w(A.$$.fragment,h),w(Wt.$$.fragment,h),w(Et.$$.fragment,h),w(cn.$$.fragment,h),w(fe.$$.fragment,h),w(lt.$$.fragment,h),w(un.$$.fragment,h),w(it.$$.fragment,h),w(Qt.$$.fragment,h),w(Ee.$$.fragment,h),w(St.$$.fragment,h),w(Se.$$.fragment,h),w(fn.$$.fragment,h),oo=!1},d(h){h&&(l(g),l(n),l(o),l(t),l(_),l(W),l(L),l(U),l(H),l(p),l(Zn),l(S),l($e),l(be),l(Nt),l(Bn),l(oe),l(ve),l(E),l(Je),l(Ve),l(Gt),l(xe),l(Vt),l(Jt),l(R),l(Ze),l(_t),l(G),l(ze),l(Le),l(Tt),l(Gn),l(se),l(It),l(mn),l(Yt),l(Dt)),l(e),k(F,h),k(j,h),k(Ge,h),k(ft,h),k(on,h),k(sn),k(pe,h),k(Ke),k(ne),k(qe),k(A),k(Wt),k(Et),k(cn,h),k(fe),k(lt),k(un),k(it),k(Qt,h),k(Ee),k(St),k(Se,h),k(fn,h)}}}const Jr='{"title":"Funnel Transformer","local":"funnel-transformer","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"FunnelConfig","local":"transformers.FunnelConfig","sections":[],"depth":2},{"title":"FunnelTokenizer","local":"transformers.FunnelTokenizer","sections":[],"depth":2},{"title":"FunnelTokenizerFast","local":"transformers.FunnelTokenizerFast","sections":[],"depth":2},{"title":"Funnel specific outputs","local":"transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput","sections":[],"depth":2},{"title":"FunnelBaseModel","local":"transformers.FunnelBaseModel","sections":[],"depth":2},{"title":"FunnelModel","local":"transformers.FunnelModel","sections":[],"depth":2},{"title":"FunnelModelForPreTraining","local":"transformers.FunnelForPreTraining","sections":[],"depth":2},{"title":"FunnelForMaskedLM","local":"transformers.FunnelForMaskedLM","sections":[],"depth":2},{"title":"FunnelForSequenceClassification","local":"transformers.FunnelForSequenceClassification","sections":[],"depth":2},{"title":"FunnelForMultipleChoice","local":"transformers.FunnelForMultipleChoice","sections":[],"depth":2},{"title":"FunnelForTokenClassification","local":"transformers.FunnelForTokenClassification","sections":[],"depth":2},{"title":"FunnelForQuestionAnswering","local":"transformers.FunnelForQuestionAnswering","sections":[],"depth":2},{"title":"TFFunnelBaseModel","local":"transformers.TFFunnelBaseModel","sections":[],"depth":2},{"title":"TFFunnelModel","local":"transformers.TFFunnelModel","sections":[],"depth":2},{"title":"TFFunnelModelForPreTraining","local":"transformers.TFFunnelForPreTraining","sections":[],"depth":2},{"title":"TFFunnelForMaskedLM","local":"transformers.TFFunnelForMaskedLM","sections":[],"depth":2},{"title":"TFFunnelForSequenceClassification","local":"transformers.TFFunnelForSequenceClassification","sections":[],"depth":2},{"title":"TFFunnelForMultipleChoice","local":"transformers.TFFunnelForMultipleChoice","sections":[],"depth":2},{"title":"TFFunnelForTokenClassification","local":"transformers.TFFunnelForTokenClassification","sections":[],"depth":2},{"title":"TFFunnelForQuestionAnswering","local":"transformers.TFFunnelForQuestionAnswering","sections":[],"depth":2}],"depth":1}';function Ur($){return xs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Gr extends Cs{constructor(e){super(),js(this,e,Ur,zr,vs,{})}}export{Gr as component};
