import{s as $s,o as xs,n as I}from"../chunks/scheduler.25b97de1.js";import{S as Cs,i as js,g as i,s as a,r as T,A as zs,h as d,f as l,c as r,j as q,u as b,x as f,k as Z,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.ffac8efa.js";import{C as Te}from"../chunks/CodeBlock.e6cd0d95.js";import{F as Js,M as Fs}from"../chunks/Markdown.7217f838.js";import{E as _e}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as ue,E as Us}from"../chunks/EditOnGithub.91d95064.js";function Ws(F){let e,g="Transformer sequence pair mask has the following format:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-12v5j2d"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Is(F){let e,g="Transformer sequence pair mask has the following format:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-12v5j2d"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Zs(F){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:I,d(n){n&&l(e)}}}function qs(F){let e,g="Example:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Bs(F){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:I,d(n){n&&l(e)}}}function Ls(F){let e,g="Example:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Hs(F){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:I,d(n){n&&l(e)}}}function Ns(F){let e,g="Examples:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-kvfsh7"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Gs(F){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:I,d(n){n&&l(e)}}}function Vs(F){let e,g="Example:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Rs(F){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:I,d(n){n&&l(e)}}}function Xs(F){let e,g="Example of single-label classification:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-ykxpe4"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Ps(F){let e,g="Example of multi-label classification:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-1l8e32d"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Es(F){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:I,d(n){n&&l(e)}}}function Qs(F){let e,g="Example:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Ss(F){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:I,d(n){n&&l(e)}}}function As(F){let e,g="Example:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Ys(F){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:I,d(n){n&&l(e)}}}function Ds(F){let e,g="Example:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function Os(F){let e,g,n,o,v,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/v4.42.4/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.`,qn,S,nn,Fe,be,ko='The <a href="/docs/transformers/v4.42.4/en/model_doc/funnel#transformers.FunnelBaseModel">FunnelBaseModel</a> forward method, overrides the <code>__call__</code> special method.',Nt,Ge,Bn,oe,Dn,$e,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.`,an,jt,vo=`This model inherits from <a href="/docs/transformers/v4.42.4/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.)`,rn,zt,Fo=`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/v4.42.4/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/v4.42.4/en/model_doc/funnel#transformers.FunnelForPreTraining">FunnelForPreTraining</a> forward method, overrides the <code>__call__</code> special method.',Xt,Ie,dn,st,Kn,at,Ze,A,rt,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/v4.42.4/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,qe,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/v4.42.4/en/model_doc/funnel#transformers.FunnelForMaskedLM">FunnelForMaskedLM</a> forward method, overrides the <code>__call__</code> special method.',eo,ye,$o,It,Me,lt,Nn,P,vn,to,Be,Zo=`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/v4.42.4/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/v4.42.4/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,Zt,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/v4.42.4/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,re,so='The <a href="/docs/transformers/v4.42.4/en/model_doc/funnel#transformers.FunnelForMultipleChoice">FunnelForMultipleChoice</a> forward method, overrides the <code>__call__</code> special method.',yt,Fn,ao,$n,le,Kt,qo,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/v4.42.4/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.`,qt,Ne,ro,_o,Co,Qo='The <a href="/docs/transformers/v4.42.4/en/model_doc/funnel#transformers.FunnelForTokenClassification">FunnelForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',Vn,Rn,Xn,zn,Pn,En,de,ae,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/v4.42.4/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/v4.42.4/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/v4.42.4/en/model_doc/funnel#transformers.FunnelConfig">FunnelConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.42.4/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/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/v4.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FunnelBaseModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FunnelBaseModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FunnelBaseModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FunnelBaseModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FunnelBaseModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FunnelBaseModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_funnel.py#L930",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.42.4/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/v4.42.4/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:[Zs]},$$scope:{ctx:F}}}),oe=new _e({props:{anchor:"transformers.FunnelBaseModel.forward.example",$$slots:{default:[qs]},$$scope:{ctx:F}}}),$e=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/v4.42.4/en/model_doc/funnel#transformers.FunnelConfig">FunnelConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.42.4/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/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/v4.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FunnelModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FunnelModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FunnelModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FunnelModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FunnelModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FunnelModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_funnel.py#L1007",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.42.4/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/v4.42.4/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:F}}}),tt=new _e({props:{anchor:"transformers.FunnelModel.forward.example",$$slots:{default:[Ls]},$$scope:{ctx:F}}}),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/v4.42.4/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/v4.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FunnelForPreTraining.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FunnelForPreTraining.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FunnelForPreTraining.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FunnelForPreTraining.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FunnelForPreTraining.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FunnelForPreTraining.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FunnelForPreTraining.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the ELECTRA-style loss. Input should be a sequence of tokens (see <code>input_ids</code>
docstring) Indices should be in <code>[0, 1]</code>:</p>
<ul>
<li>0 indicates the token is an original token,</li>
<li>1 indicates the token was replaced.</li>
</ul>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_funnel.py#L1106",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/en/model_doc/funnel#transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput"
>transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.42.4/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/v4.42.4/en/model_doc/funnel#transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput"
>transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ie=new ce({props:{$$slots:{default:[Hs]},$$scope:{ctx:F}}}),st=new _e({props:{anchor:"transformers.FunnelForPreTraining.forward.example",$$slots:{default:[Ns]},$$scope:{ctx:F}}}),at=new ue({props:{title:"FunnelForMaskedLM",local:"transformers.FunnelForMaskedLM",headingTag:"h2"}}),rt=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/v4.42.4/en/model_doc/funnel#transformers.FunnelConfig">FunnelConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.42.4/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/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/v4.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FunnelForMaskedLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FunnelForMaskedLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FunnelForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FunnelForMaskedLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FunnelForMaskedLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FunnelForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FunnelForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_funnel.py#L1198",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.42.4/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/v4.42.4/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:F}}}),It=new _e({props:{anchor:"transformers.FunnelForMaskedLM.forward.example",$$slots:{default:[Vs]},$$scope:{ctx:F}}}),lt=new ue({props:{title:"FunnelForSequenceClassification",local:"transformers.FunnelForSequenceClassification",headingTag:"h2"}}),vn=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/v4.42.4/en/model_doc/funnel#transformers.FunnelConfig">FunnelConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.42.4/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/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/v4.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FunnelForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FunnelForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FunnelForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FunnelForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FunnelForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FunnelForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FunnelForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_funnel.py#L1272",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.42.4/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/v4.42.4/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:F}}}),Qe=new _e({props:{anchor:"transformers.FunnelForSequenceClassification.forward.example",$$slots:{default:[Xs]},$$scope:{ctx:F}}}),se=new _e({props:{anchor:"transformers.FunnelForSequenceClassification.forward.example-2",$$slots:{default:[Ps]},$$scope:{ctx:F}}}),At=new ue({props:{title:"FunnelForMultipleChoice",local:"transformers.FunnelForMultipleChoice",headingTag:"h2"}}),Zt=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/v4.42.4/en/model_doc/funnel#transformers.FunnelConfig">FunnelConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.42.4/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/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/v4.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FunnelForMultipleChoice.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FunnelForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FunnelForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FunnelForMultipleChoice.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FunnelForMultipleChoice.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FunnelForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FunnelForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_funnel.py#L1362",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.42.4/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/v4.42.4/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Fn=new ce({props:{$$slots:{default:[Es]},$$scope:{ctx:F}}}),$n=new _e({props:{anchor:"transformers.FunnelForMultipleChoice.forward.example",$$slots:{default:[Qs]},$$scope:{ctx:F}}}),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/v4.42.4/en/model_doc/funnel#transformers.FunnelConfig">FunnelConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.42.4/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_funnel.py#L1429"}}),ro=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/v4.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FunnelForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FunnelForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FunnelForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FunnelForTokenClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FunnelForTokenClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FunnelForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FunnelForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_funnel.py#L1448",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.42.4/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/v4.42.4/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:F}}}),zn=new _e({props:{anchor:"transformers.FunnelForTokenClassification.forward.example",$$slots:{default:[As]},$$scope:{ctx:F}}}),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/v4.42.4/en/model_doc/funnel#transformers.FunnelConfig">FunnelConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.42.4/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/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/v4.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FunnelForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FunnelForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FunnelForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FunnelForQuestionAnswering.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.FunnelForQuestionAnswering.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.FunnelForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FunnelForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.FunnelForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_funnel.py#L1520",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.42.4/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/v4.42.4/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:F}}}),Yn=new _e({props:{anchor:"transformers.FunnelForQuestionAnswering.forward.example",$$slots:{default:[Ds]},$$scope:{ctx:F}}}),{c(){T(e.$$.fragment),g=a(),n=i("div"),T(o.$$.fragment),v=a(),t=i("p"),t.textContent=_,N=a(),W=i("p"),W.innerHTML=j,L=a(),U=i("p"),U.innerHTML=z,H=a(),p=i("p"),p.innerHTML=x,qn=a(),S=i("div"),T(nn.$$.fragment),Fe=a(),be=i("p"),be.innerHTML=ko,Nt=a(),T(Ge.$$.fragment),Bn=a(),T(oe.$$.fragment),Dn=a(),T($e.$$.fragment),ft=a(),E=i("div"),T(Je.$$.fragment),te=a(),Ve=i("p"),Ve.textContent=on,Gt=a(),xe=i("p"),xe.innerHTML=sn,an=a(),jt=i("p"),jt.innerHTML=vo,rn=a(),zt=i("p"),zt.innerHTML=Fo,Vt=a(),pe=i("div"),T(Jt.$$.fragment),R=a(),Ke=i("p"),Ke.innerHTML=Re,et=a(),T(Rt.$$.fragment),ln=a(),T(tt.$$.fragment),On=a(),T(Ue.$$.fragment),Xe=a(),ne=i("div"),T(Ut.$$.fragment),nt=a(),We=i("div"),T(X.$$.fragment),ot=a(),bn=i("p"),bn.innerHTML=yn,Xt=a(),T(Ie.$$.fragment),dn=a(),T(st.$$.fragment),Kn=a(),T(at.$$.fragment),Ze=a(),A=i("div"),T(rt.$$.fragment),Mn=a(),wn=i("p"),wn.innerHTML=Pt,Wt=a(),me=i("p"),me.innerHTML=ht,fo=a(),gt=i("p"),gt.innerHTML=Ln,Et=a(),qe=i("p"),qe.innerHTML=cn,_t=a(),G=i("div"),T(fe.$$.fragment),Hn=a(),V=i("p"),V.innerHTML=kn,eo=a(),T(ye.$$.fragment),$o=a(),T(It.$$.fragment),Me=a(),T(lt.$$.fragment),Nn=a(),P=i("div"),T(vn.$$.fragment),to=a(),Be=i("p"),Be.textContent=Zo,no=a(),D=i("p"),D.innerHTML=un,we=a(),Ce=i("p"),Ce.innerHTML=xo,pn=a(),it=i("p"),it.innerHTML=ho,Pe=a(),je=i("div"),T(ze.$$.fragment),Qt=a(),Le=i("p"),Le.innerHTML=Tt,Ee=a(),T(bt.$$.fragment),Q=a(),T(Qe.$$.fragment),Gn=a(),T(se.$$.fragment),St=a(),T(At.$$.fragment),dt=a(),he=i("div"),T(Zt.$$.fragment),Se=a(),mn=i("p"),mn.textContent=fn,Yt=a(),Dt=i("p"),Dt.innerHTML=oo,h=a(),J=i("p"),J.innerHTML=O,Y=a(),He=i("p"),He.innerHTML=hn,Ot=a(),Ae=i("div"),T(K.$$.fragment),gn=a(),re=i("p"),re.innerHTML=so,yt=a(),T(Fn.$$.fragment),ao=a(),T($n.$$.fragment),le=a(),T(Kt.$$.fragment),qo=a(),ie=i("div"),T(go.$$.fragment),Go=a(),xn=i("p"),xn.textContent=es,Vo=a(),Cn=i("p"),Cn.innerHTML=ts,Ro=a(),jn=i("p"),jn.innerHTML=ns,Xo=a(),en=i("p"),en.innerHTML=Eo,qt=a(),Ne=i("div"),T(ro.$$.fragment),_o=a(),Co=i("p"),Co.innerHTML=Qo,Vn=a(),T(Rn.$$.fragment),Xn=a(),T(zn.$$.fragment),Pn=a(),T(En.$$.fragment),de=a(),ae=i("div"),T(lo.$$.fragment),To=a(),jo=i("p"),jo.innerHTML=So,bo=a(),zo=i("p"),zo.innerHTML=Ao,yo=a(),Jo=i("p"),Jo.innerHTML=Yo,Mo=a(),Uo=i("p"),Uo.innerHTML=Do,Qn=a(),Bt=i("div"),T(ke.$$.fragment),io=a(),wo=i("p"),wo.innerHTML=Wo,Oo=a(),T(Sn.$$.fragment),An=a(),T(Yn.$$.fragment),this.h()},l(m){b(e.$$.fragment,m),g=r(m),n=d(m,"DIV",{class:!0});var C=q(n);b(o.$$.fragment,C),v=r(C),t=d(C,"P",{"data-svelte-h":!0}),f(t)!=="svelte-1678uor"&&(t.textContent=_),N=r(C),W=d(C,"P",{"data-svelte-h":!0}),f(W)!=="svelte-1mnttie"&&(W.innerHTML=j),L=r(C),U=d(C,"P",{"data-svelte-h":!0}),f(U)!=="svelte-mhvelr"&&(U.innerHTML=z),H=r(C),p=d(C,"P",{"data-svelte-h":!0}),f(p)!=="svelte-hswkmf"&&(p.innerHTML=x),qn=r(C),S=d(C,"DIV",{class:!0});var Lt=q(S);b(nn.$$.fragment,Lt),Fe=r(Lt),be=d(Lt,"P",{"data-svelte-h":!0}),f(be)!=="svelte-13ni9c"&&(be.innerHTML=ko),Nt=r(Lt),b(Ge.$$.fragment,Lt),Bn=r(Lt),b(oe.$$.fragment,Lt),Lt.forEach(l),C.forEach(l),Dn=r(m),b($e.$$.fragment,m),ft=r(m),E=d(m,"DIV",{class:!0});var ge=q(E);b(Je.$$.fragment,ge),te=r(ge),Ve=d(ge,"P",{"data-svelte-h":!0}),f(Ve)!=="svelte-1hxjxnk"&&(Ve.textContent=on),Gt=r(ge),xe=d(ge,"P",{"data-svelte-h":!0}),f(xe)!=="svelte-1mnttie"&&(xe.innerHTML=sn),an=r(ge),jt=d(ge,"P",{"data-svelte-h":!0}),f(jt)!=="svelte-mhvelr"&&(jt.innerHTML=vo),rn=r(ge),zt=d(ge,"P",{"data-svelte-h":!0}),f(zt)!=="svelte-hswkmf"&&(zt.innerHTML=Fo),Vt=r(ge),pe=d(ge,"DIV",{class:!0});var Ht=q(pe);b(Jt.$$.fragment,Ht),R=r(Ht),Ke=d(Ht,"P",{"data-svelte-h":!0}),f(Ke)!=="svelte-qo7s44"&&(Ke.innerHTML=Re),et=r(Ht),b(Rt.$$.fragment,Ht),ln=r(Ht),b(tt.$$.fragment,Ht),Ht.forEach(l),ge.forEach(l),On=r(m),b(Ue.$$.fragment,m),Xe=r(m),ne=d(m,"DIV",{class:!0});var ee=q(ne);b(Ut.$$.fragment,ee),nt=r(ee),We=d(ee,"DIV",{class:!0});var Ye=q(We);b(X.$$.fragment,Ye),ot=r(Ye),bn=d(Ye,"P",{"data-svelte-h":!0}),f(bn)!=="svelte-1us3xrc"&&(bn.innerHTML=yn),Xt=r(Ye),b(Ie.$$.fragment,Ye),dn=r(Ye),b(st.$$.fragment,Ye),Ye.forEach(l),ee.forEach(l),Kn=r(m),b(at.$$.fragment,m),Ze=r(m),A=d(m,"DIV",{class:!0});var De=q(A);b(rt.$$.fragment,De),Mn=r(De),wn=d(De,"P",{"data-svelte-h":!0}),f(wn)!=="svelte-4pr04v"&&(wn.innerHTML=Pt),Wt=r(De),me=d(De,"P",{"data-svelte-h":!0}),f(me)!=="svelte-1mnttie"&&(me.innerHTML=ht),fo=r(De),gt=d(De,"P",{"data-svelte-h":!0}),f(gt)!=="svelte-mhvelr"&&(gt.innerHTML=Ln),Et=r(De),qe=d(De,"P",{"data-svelte-h":!0}),f(qe)!=="svelte-hswkmf"&&(qe.innerHTML=cn),_t=r(De),G=d(De,"DIV",{class:!0});var ct=q(G);b(fe.$$.fragment,ct),Hn=r(ct),V=d(ct,"P",{"data-svelte-h":!0}),f(V)!=="svelte-1txj1ao"&&(V.innerHTML=kn),eo=r(ct),b(ye.$$.fragment,ct),$o=r(ct),b(It.$$.fragment,ct),ct.forEach(l),De.forEach(l),Me=r(m),b(lt.$$.fragment,m),Nn=r(m),P=d(m,"DIV",{class:!0});var ut=q(P);b(vn.$$.fragment,ut),to=r(ut),Be=d(ut,"P",{"data-svelte-h":!0}),f(Be)!=="svelte-93vjyr"&&(Be.textContent=Zo),no=r(ut),D=d(ut,"P",{"data-svelte-h":!0}),f(D)!=="svelte-1mnttie"&&(D.innerHTML=un),we=r(ut),Ce=d(ut,"P",{"data-svelte-h":!0}),f(Ce)!=="svelte-mhvelr"&&(Ce.innerHTML=xo),pn=r(ut),it=d(ut,"P",{"data-svelte-h":!0}),f(it)!=="svelte-hswkmf"&&(it.innerHTML=ho),Pe=r(ut),je=d(ut,"DIV",{class:!0});var Mt=q(je);b(ze.$$.fragment,Mt),Qt=r(Mt),Le=d(Mt,"P",{"data-svelte-h":!0}),f(Le)!=="svelte-zyza1s"&&(Le.innerHTML=Tt),Ee=r(Mt),b(bt.$$.fragment,Mt),Q=r(Mt),b(Qe.$$.fragment,Mt),Gn=r(Mt),b(se.$$.fragment,Mt),Mt.forEach(l),ut.forEach(l),St=r(m),b(At.$$.fragment,m),dt=r(m),he=d(m,"DIV",{class:!0});var ve=q(he);b(Zt.$$.fragment,ve),Se=r(ve),mn=d(ve,"P",{"data-svelte-h":!0}),f(mn)!=="svelte-5my4hq"&&(mn.textContent=fn),Yt=r(ve),Dt=d(ve,"P",{"data-svelte-h":!0}),f(Dt)!=="svelte-1mnttie"&&(Dt.innerHTML=oo),h=r(ve),J=d(ve,"P",{"data-svelte-h":!0}),f(J)!=="svelte-mhvelr"&&(J.innerHTML=O),Y=r(ve),He=d(ve,"P",{"data-svelte-h":!0}),f(He)!=="svelte-hswkmf"&&(He.innerHTML=hn),Ot=r(ve),Ae=d(ve,"DIV",{class:!0});var _n=q(Ae);b(K.$$.fragment,_n),gn=r(_n),re=d(_n,"P",{"data-svelte-h":!0}),f(re)!=="svelte-1vh1yhg"&&(re.innerHTML=so),yt=r(_n),b(Fn.$$.fragment,_n),ao=r(_n),b($n.$$.fragment,_n),_n.forEach(l),ve.forEach(l),le=r(m),b(Kt.$$.fragment,m),qo=r(m),ie=d(m,"DIV",{class:!0});var Oe=q(ie);b(go.$$.fragment,Oe),Go=r(Oe),xn=d(Oe,"P",{"data-svelte-h":!0}),f(xn)!=="svelte-l6qclo"&&(xn.textContent=es),Vo=r(Oe),Cn=d(Oe,"P",{"data-svelte-h":!0}),f(Cn)!=="svelte-1mnttie"&&(Cn.innerHTML=ts),Ro=r(Oe),jn=d(Oe,"P",{"data-svelte-h":!0}),f(jn)!=="svelte-mhvelr"&&(jn.innerHTML=ns),Xo=r(Oe),en=d(Oe,"P",{"data-svelte-h":!0}),f(en)!=="svelte-hswkmf"&&(en.innerHTML=Eo),qt=r(Oe),Ne=d(Oe,"DIV",{class:!0});var pt=q(Ne);b(ro.$$.fragment,pt),_o=r(pt),Co=d(pt,"P",{"data-svelte-h":!0}),f(Co)!=="svelte-1a1xrnk"&&(Co.innerHTML=Qo),Vn=r(pt),b(Rn.$$.fragment,pt),Xn=r(pt),b(zn.$$.fragment,pt),pt.forEach(l),Oe.forEach(l),Pn=r(m),b(En.$$.fragment,m),de=r(m),ae=d(m,"DIV",{class:!0});var mt=q(ae);b(lo.$$.fragment,mt),To=r(mt),jo=d(mt,"P",{"data-svelte-h":!0}),f(jo)!=="svelte-17rlk91"&&(jo.innerHTML=So),bo=r(mt),zo=d(mt,"P",{"data-svelte-h":!0}),f(zo)!=="svelte-1mnttie"&&(zo.innerHTML=Ao),yo=r(mt),Jo=d(mt,"P",{"data-svelte-h":!0}),f(Jo)!=="svelte-mhvelr"&&(Jo.innerHTML=Yo),Mo=r(mt),Uo=d(mt,"P",{"data-svelte-h":!0}),f(Uo)!=="svelte-hswkmf"&&(Uo.innerHTML=Do),Qn=r(mt),Bt=d(mt,"DIV",{class:!0});var tn=q(Bt);b(ke.$$.fragment,tn),io=r(tn),wo=d(tn,"P",{"data-svelte-h":!0}),f(wo)!=="svelte-lrk07e"&&(wo.innerHTML=Wo),Oo=r(tn),b(Sn.$$.fragment,tn),An=r(tn),b(Yn.$$.fragment,tn),tn.forEach(l),mt.forEach(l),this.h()},h(){Z(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(n,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(Ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(ae,"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,v),s(n,t),s(n,N),s(n,W),s(n,L),s(n,U),s(n,H),s(n,p),s(n,qn),s(n,S),y(nn,S,null),s(S,Fe),s(S,be),s(S,Nt),y(Ge,S,null),s(S,Bn),y(oe,S,null),c(m,Dn,C),y($e,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,an),s(E,jt),s(E,rn),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(Ie,We,null),s(We,dn),y(st,We,null),c(m,Kn,C),y(at,m,C),c(m,Ze,C),c(m,A,C),y(rt,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,qe),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,$o),y(It,G,null),c(m,Me,C),y(lt,m,C),c(m,Nn,C),c(m,P,C),y(vn,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(Zt,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,re),s(Ae,yt),y(Fn,Ae,null),s(Ae,ao),y($n,Ae,null),c(m,le,C),y(Kt,m,C),c(m,qo,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,qt),s(ie,Ne),y(ro,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,ae,C),y(lo,ae,null),s(ae,To),s(ae,jo),s(ae,bo),s(ae,zo),s(ae,yo),s(ae,Jo),s(ae,Mo),s(ae,Uo),s(ae,Qn),s(ae,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}),Ie.$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}),It.$set(ut);const Mt={};C&2&&(Mt.$$scope={dirty:C,ctx:m}),bt.$set(Mt);const ve={};C&2&&(ve.$$scope={dirty:C,ctx:m}),Qe.$set(ve);const _n={};C&2&&(_n.$$scope={dirty:C,ctx:m}),se.$set(_n);const Oe={};C&2&&(Oe.$$scope={dirty:C,ctx:m}),Fn.$set(Oe);const pt={};C&2&&(pt.$$scope={dirty:C,ctx:m}),$n.$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 Io={};C&2&&(Io.$$scope={dirty:C,ctx:m}),Sn.$set(Io);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($e.$$.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(Ie.$$.fragment,m),M(st.$$.fragment,m),M(at.$$.fragment,m),M(rt.$$.fragment,m),M(fe.$$.fragment,m),M(ye.$$.fragment,m),M(It.$$.fragment,m),M(lt.$$.fragment,m),M(vn.$$.fragment,m),M(ze.$$.fragment,m),M(bt.$$.fragment,m),M(Qe.$$.fragment,m),M(se.$$.fragment,m),M(At.$$.fragment,m),M(Zt.$$.fragment,m),M(K.$$.fragment,m),M(Fn.$$.fragment,m),M($n.$$.fragment,m),M(Kt.$$.fragment,m),M(go.$$.fragment,m),M(ro.$$.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($e.$$.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(Ie.$$.fragment,m),w(st.$$.fragment,m),w(at.$$.fragment,m),w(rt.$$.fragment,m),w(fe.$$.fragment,m),w(ye.$$.fragment,m),w(It.$$.fragment,m),w(lt.$$.fragment,m),w(vn.$$.fragment,m),w(ze.$$.fragment,m),w(bt.$$.fragment,m),w(Qe.$$.fragment,m),w(se.$$.fragment,m),w(At.$$.fragment,m),w(Zt.$$.fragment,m),w(K.$$.fragment,m),w(Fn.$$.fragment,m),w($n.$$.fragment,m),w(Kt.$$.fragment,m),w(go.$$.fragment,m),w(ro.$$.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(Ze),l(A),l(Me),l(Nn),l(P),l(St),l(dt),l(he),l(le),l(qo),l(ie),l(Pn),l(de),l(ae)),k(e,m),k(o),k(nn),k(Ge),k(oe),k($e,m),k(Je),k(Jt),k(Rt),k(tt),k(Ue,m),k(Ut),k(X),k(Ie),k(st),k(at,m),k(rt),k(fe),k(ye),k(It),k(lt,m),k(vn),k(ze),k(bt),k(Qe),k(se),k(At,m),k(Zt),k(K),k(Fn),k($n),k(Kt,m),k(go),k(ro),k(Rn),k(zn),k(En,m),k(lo),k(ke),k(Sn),k(Yn)}}}function Ks(F){let e,g;return e=new Fs({props:{$$slots:{default:[Os]},$$scope:{ctx:F}}}),{c(){T(e.$$.fragment)},l(n){b(e.$$.fragment,n)},m(n,o){y(e,n,o),g=!0},p(n,o){const v={};o&2&&(v.$$scope={dirty:o,ctx:n}),e.$set(v)},i(n){g||(M(e.$$.fragment,n),g=!0)},o(n){w(e.$$.fragment,n),g=!1},d(n){k(e,n)}}}function ea(F){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",n,o,v="<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=a(),o=i("ul"),o.innerHTML=v,t=a(),_=i("p"),_.innerHTML=N,W=a(),j=i("ul"),j.innerHTML=L,U=a(),z=i("p"),z.innerHTML=H},l(p){e=d(p,"P",{"data-svelte-h":!0}),f(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),n=r(p),o=d(p,"UL",{"data-svelte-h":!0}),f(o)!=="svelte-qm1t26"&&(o.innerHTML=v),t=r(p),_=d(p,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1v9qsc5"&&(_.innerHTML=N),W=r(p),j=d(p,"UL",{"data-svelte-h":!0}),f(j)!=="svelte-15scerc"&&(j.innerHTML=L),U=r(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:I,d(p){p&&(l(e),l(n),l(o),l(t),l(_),l(W),l(j),l(U),l(z))}}}function ta(F){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:I,d(n){n&&l(e)}}}function na(F){let e,g="Example:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function oa(F){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",n,o,v="<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=a(),o=i("ul"),o.innerHTML=v,t=a(),_=i("p"),_.innerHTML=N,W=a(),j=i("ul"),j.innerHTML=L,U=a(),z=i("p"),z.innerHTML=H},l(p){e=d(p,"P",{"data-svelte-h":!0}),f(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),n=r(p),o=d(p,"UL",{"data-svelte-h":!0}),f(o)!=="svelte-qm1t26"&&(o.innerHTML=v),t=r(p),_=d(p,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1v9qsc5"&&(_.innerHTML=N),W=r(p),j=d(p,"UL",{"data-svelte-h":!0}),f(j)!=="svelte-15scerc"&&(j.innerHTML=L),U=r(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:I,d(p){p&&(l(e),l(n),l(o),l(t),l(_),l(W),l(j),l(U),l(z))}}}function sa(F){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:I,d(n){n&&l(e)}}}function aa(F){let e,g="Example:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function ra(F){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",n,o,v="<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=a(),o=i("ul"),o.innerHTML=v,t=a(),_=i("p"),_.innerHTML=N,W=a(),j=i("ul"),j.innerHTML=L,U=a(),z=i("p"),z.innerHTML=H},l(p){e=d(p,"P",{"data-svelte-h":!0}),f(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),n=r(p),o=d(p,"UL",{"data-svelte-h":!0}),f(o)!=="svelte-qm1t26"&&(o.innerHTML=v),t=r(p),_=d(p,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1v9qsc5"&&(_.innerHTML=N),W=r(p),j=d(p,"UL",{"data-svelte-h":!0}),f(j)!=="svelte-15scerc"&&(j.innerHTML=L),U=r(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:I,d(p){p&&(l(e),l(n),l(o),l(t),l(_),l(W),l(j),l(U),l(z))}}}function la(F){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:I,d(n){n&&l(e)}}}function ia(F){let e,g="Examples:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-kvfsh7"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function da(F){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",n,o,v="<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=a(),o=i("ul"),o.innerHTML=v,t=a(),_=i("p"),_.innerHTML=N,W=a(),j=i("ul"),j.innerHTML=L,U=a(),z=i("p"),z.innerHTML=H},l(p){e=d(p,"P",{"data-svelte-h":!0}),f(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),n=r(p),o=d(p,"UL",{"data-svelte-h":!0}),f(o)!=="svelte-qm1t26"&&(o.innerHTML=v),t=r(p),_=d(p,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1v9qsc5"&&(_.innerHTML=N),W=r(p),j=d(p,"UL",{"data-svelte-h":!0}),f(j)!=="svelte-15scerc"&&(j.innerHTML=L),U=r(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:I,d(p){p&&(l(e),l(n),l(o),l(t),l(_),l(W),l(j),l(U),l(z))}}}function ca(F){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:I,d(n){n&&l(e)}}}function ua(F){let e,g="Example:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function pa(F){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:I,i(n){g||(M(e.$$.fragment,n),g=!0)},o(n){w(e.$$.fragment,n),g=!1},d(n){k(e,n)}}}function ma(F){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",n,o,v="<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=a(),o=i("ul"),o.innerHTML=v,t=a(),_=i("p"),_.innerHTML=N,W=a(),j=i("ul"),j.innerHTML=L,U=a(),z=i("p"),z.innerHTML=H},l(p){e=d(p,"P",{"data-svelte-h":!0}),f(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),n=r(p),o=d(p,"UL",{"data-svelte-h":!0}),f(o)!=="svelte-qm1t26"&&(o.innerHTML=v),t=r(p),_=d(p,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1v9qsc5"&&(_.innerHTML=N),W=r(p),j=d(p,"UL",{"data-svelte-h":!0}),f(j)!=="svelte-15scerc"&&(j.innerHTML=L),U=r(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:I,d(p){p&&(l(e),l(n),l(o),l(t),l(_),l(W),l(j),l(U),l(z))}}}function fa(F){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:I,d(n){n&&l(e)}}}function ha(F){let e,g="Example:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function ga(F){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:I,i(n){g||(M(e.$$.fragment,n),g=!0)},o(n){w(e.$$.fragment,n),g=!1},d(n){k(e,n)}}}function _a(F){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",n,o,v="<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=a(),o=i("ul"),o.innerHTML=v,t=a(),_=i("p"),_.innerHTML=N,W=a(),j=i("ul"),j.innerHTML=L,U=a(),z=i("p"),z.innerHTML=H},l(p){e=d(p,"P",{"data-svelte-h":!0}),f(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),n=r(p),o=d(p,"UL",{"data-svelte-h":!0}),f(o)!=="svelte-qm1t26"&&(o.innerHTML=v),t=r(p),_=d(p,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1v9qsc5"&&(_.innerHTML=N),W=r(p),j=d(p,"UL",{"data-svelte-h":!0}),f(j)!=="svelte-15scerc"&&(j.innerHTML=L),U=r(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:I,d(p){p&&(l(e),l(n),l(o),l(t),l(_),l(W),l(j),l(U),l(z))}}}function Ta(F){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:I,d(n){n&&l(e)}}}function ba(F){let e,g="Example:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function ya(F){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",n,o,v="<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=a(),o=i("ul"),o.innerHTML=v,t=a(),_=i("p"),_.innerHTML=N,W=a(),j=i("ul"),j.innerHTML=L,U=a(),z=i("p"),z.innerHTML=H},l(p){e=d(p,"P",{"data-svelte-h":!0}),f(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),n=r(p),o=d(p,"UL",{"data-svelte-h":!0}),f(o)!=="svelte-qm1t26"&&(o.innerHTML=v),t=r(p),_=d(p,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1v9qsc5"&&(_.innerHTML=N),W=r(p),j=d(p,"UL",{"data-svelte-h":!0}),f(j)!=="svelte-15scerc"&&(j.innerHTML=L),U=r(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:I,d(p){p&&(l(e),l(n),l(o),l(t),l(_),l(W),l(j),l(U),l(z))}}}function Ma(F){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:I,d(n){n&&l(e)}}}function wa(F){let e,g="Example:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function ka(F){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:I,i(n){g||(M(e.$$.fragment,n),g=!0)},o(n){w(e.$$.fragment,n),g=!1},d(n){k(e,n)}}}function va(F){let e,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",n,o,v="<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=a(),o=i("ul"),o.innerHTML=v,t=a(),_=i("p"),_.innerHTML=N,W=a(),j=i("ul"),j.innerHTML=L,U=a(),z=i("p"),z.innerHTML=H},l(p){e=d(p,"P",{"data-svelte-h":!0}),f(e)!=="svelte-1ajbfxg"&&(e.innerHTML=g),n=r(p),o=d(p,"UL",{"data-svelte-h":!0}),f(o)!=="svelte-qm1t26"&&(o.innerHTML=v),t=r(p),_=d(p,"P",{"data-svelte-h":!0}),f(_)!=="svelte-1v9qsc5"&&(_.innerHTML=N),W=r(p),j=d(p,"UL",{"data-svelte-h":!0}),f(j)!=="svelte-15scerc"&&(j.innerHTML=L),U=r(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:I,d(p){p&&(l(e),l(n),l(o),l(t),l(_),l(W),l(j),l(U),l(z))}}}function Fa(F){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:I,d(n){n&&l(e)}}}function $a(F){let e,g="Example:",n,o,v;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=a(),T(o.$$.fragment)},l(t){e=d(t,"P",{"data-svelte-h":!0}),f(e)!=="svelte-11lpom8"&&(e.textContent=g),n=r(t),b(o.$$.fragment,t)},m(t,_){c(t,e,_),c(t,n,_),y(o,t,_),v=!0},p:I,i(t){v||(M(o.$$.fragment,t),v=!0)},o(t){w(o.$$.fragment,t),v=!1},d(t){t&&(l(e),l(n)),k(o,t)}}}function xa(F){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:I,i(n){g||(M(e.$$.fragment,n),g=!0)},o(n){w(e.$$.fragment,n),g=!1},d(n){k(e,n)}}}function Ca(F){let e,g,n,o,v,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/v4.42.4/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.`,qn,S,nn,Fe,be,ko,Nt,Ge='The <a href="/docs/transformers/v4.42.4/en/model_doc/funnel#transformers.TFFunnelBaseModel">TFFunnelBaseModel</a> forward method, overrides the <code>__call__</code> special method.',Bn,oe,Dn,$e,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,an,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.`,vo,rn,zt=`This model inherits from <a href="/docs/transformers/v4.42.4/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.)`,Fo,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/v4.42.4/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.",Ie,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,at,Ze=`This model inherits from <a href="/docs/transformers/v4.42.4/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,rt,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/v4.42.4/en/model_doc/funnel#transformers.TFFunnelForPreTraining">TFFunnelForPreTraining</a> forward method, overrides the <code>__call__</code> special method.',Et,qe,cn,_t,G,fe,Hn,V,kn,eo,ye,$o="Funnel Model with a <code>language modeling</code> head on top.",It,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,vn=`This model inherits from <a href="/docs/transformers/v4.42.4/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,Zo=`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/v4.42.4/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.`,Zt,Se,mn=`This model inherits from <a href="/docs/transformers/v4.42.4/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/v4.42.4/en/model_doc/funnel#transformers.TFFunnelForSequenceClassification">TFFunnelForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',Ae,K,gn,re,so,yt,Fn,ao,$n,le,Kt,qo,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/v4.42.4/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,qt,Ne,ro,_o,Co='The <a href="/docs/transformers/v4.42.4/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,ae,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/v4.42.4/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/v4.42.4/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,ve,_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/v4.42.4/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,Io,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.`,as,Bo,rs,Tn,Po,ls,Ko,us='The <a href="/docs/transformers/v4.42.4/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/v4.42.4/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_tf_funnel.py#L1202"}}),S=new ce({props:{$$slots:{default:[ea]},$$scope:{ctx:F}}}),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/v4.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFunnelBaseModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFunnelBaseModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFunnelBaseModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFunnelBaseModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFunnelBaseModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFunnelBaseModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFunnelBaseModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_tf_funnel.py#L1214",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.42.4/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/v4.42.4/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:[ta]},$$scope:{ctx:F}}}),$e=new _e({props:{anchor:"transformers.TFFunnelBaseModel.call.example",$$slots:{default:[na]},$$scope:{ctx:F}}}),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/v4.42.4/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_tf_funnel.py#L1261"}}),R=new ce({props:{$$slots:{default:[oa]},$$scope:{ctx:F}}}),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/v4.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFunnelModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFunnelModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFunnelModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFunnelModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFunnelModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFunnelModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFunnelModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_tf_funnel.py#L1270",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.42.4/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/v4.42.4/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:[sa]},$$scope:{ctx:F}}}),ne=new _e({props:{anchor:"transformers.TFFunnelModel.call.example",$$slots:{default:[aa]},$$scope:{ctx:F}}}),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/v4.42.4/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_tf_funnel.py#L1317"}}),Pt=new ce({props:{$$slots:{default:[ra]},$$scope:{ctx:F}}}),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/v4.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFunnelForPreTraining.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFunnelForPreTraining.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFunnelForPreTraining.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFunnelForPreTraining.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFunnelForPreTraining.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFunnelForPreTraining.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFunnelForPreTraining.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_tf_funnel.py#L1330",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/en/model_doc/funnel#transformers.models.funnel.modeling_tf_funnel.TFFunnelForPreTrainingOutput"
>transformers.models.funnel.modeling_tf_funnel.TFFunnelForPreTrainingOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.42.4/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/v4.42.4/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>
`}}),qe=new ce({props:{$$slots:{default:[la]},$$scope:{ctx:F}}}),_t=new _e({props:{anchor:"transformers.TFFunnelForPreTraining.call.example",$$slots:{default:[ia]},$$scope:{ctx:F}}}),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/v4.42.4/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_tf_funnel.py#L1401"}}),D=new ce({props:{$$slots:{default:[da]},$$scope:{ctx:F}}}),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/v4.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFunnelForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFunnelForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFunnelForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFunnelForMaskedLM.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFunnelForMaskedLM.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFunnelForMaskedLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFunnelForMaskedLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFFunnelForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_tf_funnel.py#L1416",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.42.4/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/v4.42.4/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:[ca]},$$scope:{ctx:F}}}),ze=new _e({props:{anchor:"transformers.TFFunnelForMaskedLM.call.example",$$slots:{default:[ua]},$$scope:{ctx:F}}}),Le=new _e({props:{anchor:"transformers.TFFunnelForMaskedLM.call.example-2",$$slots:{default:[pa]},$$scope:{ctx:F}}}),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/v4.42.4/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_tf_funnel.py#L1484"}}),h=new ce({props:{$$slots:{default:[ma]},$$scope:{ctx:F}}}),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/v4.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFunnelForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFunnelForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFunnelForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFunnelForSequenceClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFunnelForSequenceClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFunnelForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFunnelForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFFunnelForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_tf_funnel.py#L1499",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.42.4/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/v4.42.4/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:[fa]},$$scope:{ctx:F}}}),re=new _e({props:{anchor:"transformers.TFFunnelForSequenceClassification.call.example",$$slots:{default:[ha]},$$scope:{ctx:F}}}),yt=new _e({props:{anchor:"transformers.TFFunnelForSequenceClassification.call.example-2",$$slots:{default:[ga]},$$scope:{ctx:F}}}),ao=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/v4.42.4/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_tf_funnel.py#L1570"}}),en=new ce({props:{$$slots:{default:[_a]},$$scope:{ctx:F}}}),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/v4.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFunnelForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFunnelForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFunnelForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFunnelForMultipleChoice.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFunnelForMultipleChoice.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFunnelForMultipleChoice.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFunnelForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFFunnelForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_tf_funnel.py#L1588",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.42.4/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/v4.42.4/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:[Ta]},$$scope:{ctx:F}}}),Xn=new _e({props:{anchor:"transformers.TFFunnelForMultipleChoice.call.example",$$slots:{default:[ba]},$$scope:{ctx:F}}}),Pn=new ue({props:{title:"TFFunnelForTokenClassification",local:"transformers.TFFunnelForTokenClassification",headingTag:"h2"}}),ae=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/v4.42.4/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_tf_funnel.py#L1676"}}),Qn=new ce({props:{$$slots:{default:[ya]},$$scope:{ctx:F}}}),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/v4.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFunnelForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFunnelForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFunnelForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFunnelForTokenClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFunnelForTokenClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFunnelForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFunnelForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFFunnelForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_tf_funnel.py#L1695",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.42.4/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/v4.42.4/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:[Ma]},$$scope:{ctx:F}}}),Jn=new _e({props:{anchor:"transformers.TFFunnelForTokenClassification.call.example",$$slots:{default:[wa]},$$scope:{ctx:F}}}),C=new _e({props:{anchor:"transformers.TFFunnelForTokenClassification.call.example-2",$$slots:{default:[ka]},$$scope:{ctx:F}}}),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/v4.42.4/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_tf_funnel.py#L1765"}}),Bo=new ce({props:{$$slots:{default:[va]},$$scope:{ctx:F}}}),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/v4.42.4/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.42.4/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFFunnelForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFFunnelForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFFunnelForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFFunnelForQuestionAnswering.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFFunnelForQuestionAnswering.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFFunnelForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFFunnelForQuestionAnswering.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFFunnelForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.TFFunnelForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.42.4/src/transformers/models/funnel/modeling_tf_funnel.py#L1783",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.42.4/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.42.4/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/v4.42.4/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:[Fa]},$$scope:{ctx:F}}}),Ho=new _e({props:{anchor:"transformers.TFFunnelForQuestionAnswering.call.example",$$slots:{default:[$a]},$$scope:{ctx:F}}}),No=new _e({props:{anchor:"transformers.TFFunnelForQuestionAnswering.call.example-2",$$slots:{default:[xa]},$$scope:{ctx:F}}}),{c(){T(e.$$.fragment),g=a(),n=i("div"),T(o.$$.fragment),v=a(),t=i("p"),t.textContent=_,N=a(),W=i("p"),W.innerHTML=j,L=a(),U=i("p"),U.innerHTML=z,H=a(),p=i("p"),p.innerHTML=x,qn=a(),T(S.$$.fragment),nn=a(),Fe=i("div"),T(be.$$.fragment),ko=a(),Nt=i("p"),Nt.innerHTML=Ge,Bn=a(),T(oe.$$.fragment),Dn=a(),T($e.$$.fragment),ft=a(),T(E.$$.fragment),Je=a(),te=i("div"),T(Ve.$$.fragment),on=a(),Gt=i("p"),Gt.textContent=xe,sn=a(),an=i("p"),an.innerHTML=jt,vo=a(),rn=i("p"),rn.innerHTML=zt,Fo=a(),Vt=i("p"),Vt.innerHTML=pe,Jt=a(),T(R.$$.fragment),Ke=a(),Re=i("div"),T(et.$$.fragment),Rt=a(),ln=i("p"),ln.innerHTML=tt,On=a(),T(Ue.$$.fragment),Xe=a(),T(ne.$$.fragment),Ut=a(),T(nt.$$.fragment),We=a(),X=i("div"),T(ot.$$.fragment),bn=a(),yn=i("p"),yn.textContent=Xt,Ie=a(),dn=i("p"),dn.innerHTML=st,Kn=a(),at=i("p"),at.innerHTML=Ze,A=a(),rt=i("p"),rt.innerHTML=Mn,wn=a(),T(Pt.$$.fragment),Wt=a(),me=i("div"),T(ht.$$.fragment),fo=a(),gt=i("p"),gt.innerHTML=Ln,Et=a(),T(qe.$$.fragment),cn=a(),T(_t.$$.fragment),G=a(),T(fe.$$.fragment),Hn=a(),V=i("div"),T(kn.$$.fragment),eo=a(),ye=i("p"),ye.innerHTML=$o,It=a(),Me=i("p"),Me.innerHTML=lt,Nn=a(),P=i("p"),P.innerHTML=vn,to=a(),Be=i("p"),Be.innerHTML=Zo,no=a(),T(D.$$.fragment),un=a(),we=i("div"),T(Ce.$$.fragment),xo=a(),pn=i("p"),pn.innerHTML=it,ho=a(),T(Pe.$$.fragment),je=a(),T(ze.$$.fragment),Qt=a(),T(Le.$$.fragment),Tt=a(),T(Ee.$$.fragment),bt=a(),Q=i("div"),T(Qe.$$.fragment),Gn=a(),se=i("p"),se.textContent=St,At=a(),dt=i("p"),dt.innerHTML=he,Zt=a(),Se=i("p"),Se.innerHTML=mn,fn=a(),Yt=i("p"),Yt.innerHTML=Dt,oo=a(),T(h.$$.fragment),J=a(),O=i("div"),T(Y.$$.fragment),He=a(),hn=i("p"),hn.innerHTML=Ot,Ae=a(),T(K.$$.fragment),gn=a(),T(re.$$.fragment),so=a(),T(yt.$$.fragment),Fn=a(),T(ao.$$.fragment),$n=a(),le=i("div"),T(Kt.$$.fragment),qo=a(),ie=i("p"),ie.textContent=go,Go=a(),xn=i("p"),xn.innerHTML=es,Vo=a(),Cn=i("p"),Cn.innerHTML=ts,Ro=a(),jn=i("p"),jn.innerHTML=ns,Xo=a(),T(en.$$.fragment),Eo=a(),qt=i("div"),T(Ne.$$.fragment),ro=a(),_o=i("p"),_o.innerHTML=Co,Qo=a(),T(Vn.$$.fragment),Rn=a(),T(Xn.$$.fragment),zn=a(),T(Pn.$$.fragment),En=a(),de=i("div"),T(ae.$$.fragment),lo=a(),To=i("p"),To.textContent=jo,So=a(),bo=i("p"),bo.innerHTML=zo,Ao=a(),yo=i("p"),yo.innerHTML=Jo,Yo=a(),Mo=i("p"),Mo.innerHTML=Uo,Do=a(),T(Qn.$$.fragment),Bt=a(),ke=i("div"),T(io.$$.fragment),wo=a(),Wo=i("p"),Wo.innerHTML=Oo,Sn=a(),T(An.$$.fragment),Yn=a(),T(Jn.$$.fragment),m=a(),T(C.$$.fragment),Lt=a(),T(ge.$$.fragment),Ht=a(),ee=i("div"),T(Ye.$$.fragment),De=a(),ct=i("p"),ct.innerHTML=ut,Mt=a(),ve=i("p"),ve.innerHTML=_n,Oe=a(),pt=i("p"),pt.innerHTML=mt,tn=a(),Io=i("p"),Io.innerHTML=os,as=a(),T(Bo.$$.fragment),rs=a(),Tn=i("div"),T(Po.$$.fragment),ls=a(),Ko=i("p"),Ko.innerHTML=us,is=a(),T(Lo.$$.fragment),ds=a(),T(Ho.$$.fragment),cs=a(),T(No.$$.fragment),this.h()},l(u){b(e.$$.fragment,u),g=r(u),n=d(u,"DIV",{class:!0});var $=q(n);b(o.$$.fragment,$),v=r($),t=d($,"P",{"data-svelte-h":!0}),f(t)!=="svelte-1678uor"&&(t.textContent=_),N=r($),W=d($,"P",{"data-svelte-h":!0}),f(W)!=="svelte-1mnttie"&&(W.innerHTML=j),L=r($),U=d($,"P",{"data-svelte-h":!0}),f(U)!=="svelte-10rdxvz"&&(U.innerHTML=z),H=r($),p=d($,"P",{"data-svelte-h":!0}),f(p)!=="svelte-1be7e3c"&&(p.innerHTML=x),qn=r($),b(S.$$.fragment,$),nn=r($),Fe=d($,"DIV",{class:!0});var co=q(Fe);b(be.$$.fragment,co),ko=r(co),Nt=d(co,"P",{"data-svelte-h":!0}),f(Nt)!=="svelte-1jzrefg"&&(Nt.innerHTML=Ge),Bn=r(co),b(oe.$$.fragment,co),Dn=r(co),b($e.$$.fragment,co),co.forEach(l),$.forEach(l),ft=r(u),b(E.$$.fragment,u),Je=r(u),te=d(u,"DIV",{class:!0});var wt=q(te);b(Ve.$$.fragment,wt),on=r(wt),Gt=d(wt,"P",{"data-svelte-h":!0}),f(Gt)!=="svelte-1hxjxnk"&&(Gt.textContent=xe),sn=r(wt),an=d(wt,"P",{"data-svelte-h":!0}),f(an)!=="svelte-1mnttie"&&(an.innerHTML=jt),vo=r(wt),rn=d(wt,"P",{"data-svelte-h":!0}),f(rn)!=="svelte-10rdxvz"&&(rn.innerHTML=zt),Fo=r(wt),Vt=d(wt,"P",{"data-svelte-h":!0}),f(Vt)!=="svelte-1be7e3c"&&(Vt.innerHTML=pe),Jt=r(wt),b(R.$$.fragment,wt),Ke=r(wt),Re=d(wt,"DIV",{class:!0});var uo=q(Re);b(et.$$.fragment,uo),Rt=r(uo),ln=d(uo,"P",{"data-svelte-h":!0}),f(ln)!=="svelte-wuvnx0"&&(ln.innerHTML=tt),On=r(uo),b(Ue.$$.fragment,uo),Xe=r(uo),b(ne.$$.fragment,uo),uo.forEach(l),wt.forEach(l),Ut=r(u),b(nt.$$.fragment,u),We=r(u),X=d(u,"DIV",{class:!0});var kt=q(X);b(ot.$$.fragment,kt),bn=r(kt),yn=d(kt,"P",{"data-svelte-h":!0}),f(yn)!=="svelte-uzpqda"&&(yn.textContent=Xt),Ie=r(kt),dn=d(kt,"P",{"data-svelte-h":!0}),f(dn)!=="svelte-1mnttie"&&(dn.innerHTML=st),Kn=r(kt),at=d(kt,"P",{"data-svelte-h":!0}),f(at)!=="svelte-10rdxvz"&&(at.innerHTML=Ze),A=r(kt),rt=d(kt,"P",{"data-svelte-h":!0}),f(rt)!=="svelte-1be7e3c"&&(rt.innerHTML=Mn),wn=r(kt),b(Pt.$$.fragment,kt),Wt=r(kt),me=d(kt,"DIV",{class:!0});var po=q(me);b(ht.$$.fragment,po),fo=r(po),gt=d(po,"P",{"data-svelte-h":!0}),f(gt)!=="svelte-z551s0"&&(gt.innerHTML=Ln),Et=r(po),b(qe.$$.fragment,po),cn=r(po),b(_t.$$.fragment,po),po.forEach(l),kt.forEach(l),G=r(u),b(fe.$$.fragment,u),Hn=r(u),V=d(u,"DIV",{class:!0});var vt=q(V);b(kn.$$.fragment,vt),eo=r(vt),ye=d(vt,"P",{"data-svelte-h":!0}),f(ye)!=="svelte-m6qhia"&&(ye.innerHTML=$o),It=r(vt),Me=d(vt,"P",{"data-svelte-h":!0}),f(Me)!=="svelte-1mnttie"&&(Me.innerHTML=lt),Nn=r(vt),P=d(vt,"P",{"data-svelte-h":!0}),f(P)!=="svelte-10rdxvz"&&(P.innerHTML=vn),to=r(vt),Be=d(vt,"P",{"data-svelte-h":!0}),f(Be)!=="svelte-1be7e3c"&&(Be.innerHTML=Zo),no=r(vt),b(D.$$.fragment,vt),un=r(vt),we=d(vt,"DIV",{class:!0});var Un=q(we);b(Ce.$$.fragment,Un),xo=r(Un),pn=d(Un,"P",{"data-svelte-h":!0}),f(pn)!=="svelte-p252iw"&&(pn.innerHTML=it),ho=r(Un),b(Pe.$$.fragment,Un),je=r(Un),b(ze.$$.fragment,Un),Qt=r(Un),b(Le.$$.fragment,Un),Un.forEach(l),vt.forEach(l),Tt=r(u),b(Ee.$$.fragment,u),bt=r(u),Q=d(u,"DIV",{class:!0});var Ft=q(Q);b(Qe.$$.fragment,Ft),Gn=r(Ft),se=d(Ft,"P",{"data-svelte-h":!0}),f(se)!=="svelte-12dmmky"&&(se.textContent=St),At=r(Ft),dt=d(Ft,"P",{"data-svelte-h":!0}),f(dt)!=="svelte-1mnttie"&&(dt.innerHTML=he),Zt=r(Ft),Se=d(Ft,"P",{"data-svelte-h":!0}),f(Se)!=="svelte-10rdxvz"&&(Se.innerHTML=mn),fn=r(Ft),Yt=d(Ft,"P",{"data-svelte-h":!0}),f(Yt)!=="svelte-1be7e3c"&&(Yt.innerHTML=Dt),oo=r(Ft),b(h.$$.fragment,Ft),J=r(Ft),O=d(Ft,"DIV",{class:!0});var Wn=q(O);b(Y.$$.fragment,Wn),He=r(Wn),hn=d(Wn,"P",{"data-svelte-h":!0}),f(hn)!=="svelte-1i4aa04"&&(hn.innerHTML=Ot),Ae=r(Wn),b(K.$$.fragment,Wn),gn=r(Wn),b(re.$$.fragment,Wn),so=r(Wn),b(yt.$$.fragment,Wn),Wn.forEach(l),Ft.forEach(l),Fn=r(u),b(ao.$$.fragment,u),$n=r(u),le=d(u,"DIV",{class:!0});var $t=q(le);b(Kt.$$.fragment,$t),qo=r($t),ie=d($t,"P",{"data-svelte-h":!0}),f(ie)!=="svelte-1slwjue"&&(ie.textContent=go),Go=r($t),xn=d($t,"P",{"data-svelte-h":!0}),f(xn)!=="svelte-1mnttie"&&(xn.innerHTML=es),Vo=r($t),Cn=d($t,"P",{"data-svelte-h":!0}),f(Cn)!=="svelte-10rdxvz"&&(Cn.innerHTML=ts),Ro=r($t),jn=d($t,"P",{"data-svelte-h":!0}),f(jn)!=="svelte-1be7e3c"&&(jn.innerHTML=ns),Xo=r($t),b(en.$$.fragment,$t),Eo=r($t),qt=d($t,"DIV",{class:!0});var mo=q(qt);b(Ne.$$.fragment,mo),ro=r(mo),_o=d(mo,"P",{"data-svelte-h":!0}),f(_o)!=="svelte-1ugordc"&&(_o.innerHTML=Co),Qo=r(mo),b(Vn.$$.fragment,mo),Rn=r(mo),b(Xn.$$.fragment,mo),mo.forEach(l),$t.forEach(l),zn=r(u),b(Pn.$$.fragment,u),En=r(u),de=d(u,"DIV",{class:!0});var xt=q(de);b(ae.$$.fragment,xt),lo=r(xt),To=d(xt,"P",{"data-svelte-h":!0}),f(To)!=="svelte-rrgi8p"&&(To.textContent=jo),So=r(xt),bo=d(xt,"P",{"data-svelte-h":!0}),f(bo)!=="svelte-1mnttie"&&(bo.innerHTML=zo),Ao=r(xt),yo=d(xt,"P",{"data-svelte-h":!0}),f(yo)!=="svelte-10rdxvz"&&(yo.innerHTML=Jo),Yo=r(xt),Mo=d(xt,"P",{"data-svelte-h":!0}),f(Mo)!=="svelte-1be7e3c"&&(Mo.innerHTML=Uo),Do=r(xt),b(Qn.$$.fragment,xt),Bt=r(xt),ke=d(xt,"DIV",{class:!0});var In=q(ke);b(io.$$.fragment,In),wo=r(In),Wo=d(In,"P",{"data-svelte-h":!0}),f(Wo)!=="svelte-434c8o"&&(Wo.innerHTML=Oo),Sn=r(In),b(An.$$.fragment,In),Yn=r(In),b(Jn.$$.fragment,In),m=r(In),b(C.$$.fragment,In),In.forEach(l),xt.forEach(l),Lt=r(u),b(ge.$$.fragment,u),Ht=r(u),ee=d(u,"DIV",{class:!0});var Ct=q(ee);b(Ye.$$.fragment,Ct),De=r(Ct),ct=d(Ct,"P",{"data-svelte-h":!0}),f(ct)!=="svelte-1n3a7pz"&&(ct.innerHTML=ut),Mt=r(Ct),ve=d(Ct,"P",{"data-svelte-h":!0}),f(ve)!=="svelte-1mnttie"&&(ve.innerHTML=_n),Oe=r(Ct),pt=d(Ct,"P",{"data-svelte-h":!0}),f(pt)!=="svelte-10rdxvz"&&(pt.innerHTML=mt),tn=r(Ct),Io=d(Ct,"P",{"data-svelte-h":!0}),f(Io)!=="svelte-1be7e3c"&&(Io.innerHTML=os),as=r(Ct),b(Bo.$$.fragment,Ct),rs=r(Ct),Tn=d(Ct,"DIV",{class:!0});var Zn=q(Tn);b(Po.$$.fragment,Zn),ls=r(Zn),Ko=d(Zn,"P",{"data-svelte-h":!0}),f(Ko)!=="svelte-18n2e4a"&&(Ko.innerHTML=us),is=r(Zn),b(Lo.$$.fragment,Zn),ds=r(Zn),b(Ho.$$.fragment,Zn),cs=r(Zn),b(No.$$.fragment,Zn),Zn.forEach(l),Ct.forEach(l),this.h()},h(){Z(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(n,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(Re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(Tn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(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,$){y(e,u,$),c(u,g,$),c(u,n,$),y(o,n,null),s(n,v),s(n,t),s(n,N),s(n,W),s(n,L),s(n,U),s(n,H),s(n,p),s(n,qn),y(S,n,null),s(n,nn),s(n,Fe),y(be,Fe,null),s(Fe,ko),s(Fe,Nt),s(Fe,Bn),y(oe,Fe,null),s(Fe,Dn),y($e,Fe,null),c(u,ft,$),y(E,u,$),c(u,Je,$),c(u,te,$),y(Ve,te,null),s(te,on),s(te,Gt),s(te,sn),s(te,an),s(te,vo),s(te,rn),s(te,Fo),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,$),y(nt,u,$),c(u,We,$),c(u,X,$),y(ot,X,null),s(X,bn),s(X,yn),s(X,Ie),s(X,dn),s(X,Kn),s(X,at),s(X,A),s(X,rt),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(qe,me,null),s(me,cn),y(_t,me,null),c(u,G,$),y(fe,u,$),c(u,Hn,$),c(u,V,$),y(kn,V,null),s(V,eo),s(V,ye),s(V,It),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,$),y(Ee,u,$),c(u,bt,$),c(u,Q,$),y(Qe,Q,null),s(Q,Gn),s(Q,se),s(Q,At),s(Q,dt),s(Q,Zt),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(re,O,null),s(O,so),y(yt,O,null),c(u,Fn,$),y(ao,u,$),c(u,$n,$),c(u,le,$),y(Kt,le,null),s(le,qo),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,qt),y(Ne,qt,null),s(qt,ro),s(qt,_o),s(qt,Qo),y(Vn,qt,null),s(qt,Rn),y(Xn,qt,null),c(u,zn,$),y(Pn,u,$),c(u,En,$),c(u,de,$),y(ae,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,$),y(ge,u,$),c(u,Ht,$),c(u,ee,$),y(Ye,ee,null),s(ee,De),s(ee,ct),s(ee,Mt),s(ee,ve),s(ee,Oe),s(ee,pt),s(ee,tn),s(ee,Io),s(ee,as),y(Bo,ee,null),s(ee,rs),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,$){const co={};$&2&&(co.$$scope={dirty:$,ctx:u}),S.$set(co);const wt={};$&2&&(wt.$$scope={dirty:$,ctx:u}),oe.$set(wt);const uo={};$&2&&(uo.$$scope={dirty:$,ctx:u}),$e.$set(uo);const kt={};$&2&&(kt.$$scope={dirty:$,ctx:u}),R.$set(kt);const po={};$&2&&(po.$$scope={dirty:$,ctx:u}),Ue.$set(po);const vt={};$&2&&(vt.$$scope={dirty:$,ctx:u}),ne.$set(vt);const Un={};$&2&&(Un.$$scope={dirty:$,ctx:u}),Pt.$set(Un);const Ft={};$&2&&(Ft.$$scope={dirty:$,ctx:u}),qe.$set(Ft);const Wn={};$&2&&(Wn.$$scope={dirty:$,ctx:u}),_t.$set(Wn);const $t={};$&2&&($t.$$scope={dirty:$,ctx:u}),D.$set($t);const mo={};$&2&&(mo.$$scope={dirty:$,ctx:u}),Pe.$set(mo);const xt={};$&2&&(xt.$$scope={dirty:$,ctx:u}),ze.$set(xt);const In={};$&2&&(In.$$scope={dirty:$,ctx:u}),Le.$set(In);const Ct={};$&2&&(Ct.$$scope={dirty:$,ctx:u}),h.$set(Ct);const Zn={};$&2&&(Zn.$$scope={dirty:$,ctx:u}),K.$set(Zn);const ps={};$&2&&(ps.$$scope={dirty:$,ctx:u}),re.$set(ps);const ms={};$&2&&(ms.$$scope={dirty:$,ctx:u}),yt.$set(ms);const fs={};$&2&&(fs.$$scope={dirty:$,ctx:u}),en.$set(fs);const hs={};$&2&&(hs.$$scope={dirty:$,ctx:u}),Vn.$set(hs);const gs={};$&2&&(gs.$$scope={dirty:$,ctx:u}),Xn.$set(gs);const _s={};$&2&&(_s.$$scope={dirty:$,ctx:u}),Qn.$set(_s);const Ts={};$&2&&(Ts.$$scope={dirty:$,ctx:u}),An.$set(Ts);const bs={};$&2&&(bs.$$scope={dirty:$,ctx:u}),Jn.$set(bs);const ys={};$&2&&(ys.$$scope={dirty:$,ctx:u}),C.$set(ys);const Ms={};$&2&&(Ms.$$scope={dirty:$,ctx:u}),Bo.$set(Ms);const ws={};$&2&&(ws.$$scope={dirty:$,ctx:u}),Lo.$set(ws);const ks={};$&2&&(ks.$$scope={dirty:$,ctx:u}),Ho.$set(ks);const vs={};$&2&&(vs.$$scope={dirty:$,ctx:u}),No.$set(vs)},i(u){ss||(M(e.$$.fragment,u),M(o.$$.fragment,u),M(S.$$.fragment,u),M(be.$$.fragment,u),M(oe.$$.fragment,u),M($e.$$.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(qe.$$.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(re.$$.fragment,u),M(yt.$$.fragment,u),M(ao.$$.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(ae.$$.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($e.$$.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(qe.$$.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(re.$$.fragment,u),w(yt.$$.fragment,u),w(ao.$$.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(ae.$$.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(Fn),l($n),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($e),k(E,u),k(Ve),k(R),k(et),k(Ue),k(ne),k(nt,u),k(ot),k(Pt),k(ht),k(qe),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(re),k(yt),k(ao,u),k(Kt),k(en),k(Ne),k(Vn),k(Xn),k(Pn,u),k(ae),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 ja(F){let e,g;return e=new Fs({props:{$$slots:{default:[Ca]},$$scope:{ctx:F}}}),{c(){T(e.$$.fragment)},l(n){b(e.$$.fragment,n)},m(n,o){y(e,n,o),g=!0},p(n,o){const v={};o&2&&(v.$$scope={dirty:o,ctx:n}),e.$set(v)},i(n){g||(M(e.$$.fragment,n),g=!0)},o(n){w(e.$$.fragment,n),g=!1},d(n){k(e,n)}}}function za(F){let e,g,n,o,v,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:",qn,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>`,Fe,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/v4.42.4/en/model_doc/funnel#transformers.FunnelModel">FunnelModel</a>, <a href="/docs/transformers/v4.42.4/en/model_doc/funnel#transformers.FunnelForPreTraining">FunnelForPreTraining</a>,
<a href="/docs/transformers/v4.42.4/en/model_doc/funnel#transformers.FunnelForMaskedLM">FunnelForMaskedLM</a>, <a href="/docs/transformers/v4.42.4/en/model_doc/funnel#transformers.FunnelForTokenClassification">FunnelForTokenClassification</a> and
<a href="/docs/transformers/v4.42.4/en/model_doc/funnel#transformers.FunnelForQuestionAnswering">FunnelForQuestionAnswering</a>. The second ones should be used for
<a href="/docs/transformers/v4.42.4/en/model_doc/funnel#transformers.FunnelBaseModel">FunnelBaseModel</a>, <a href="/docs/transformers/v4.42.4/en/model_doc/funnel#transformers.FunnelForSequenceClassification">FunnelForSequenceClassification</a> and
<a href="/docs/transformers/v4.42.4/en/model_doc/funnel#transformers.FunnelForMultipleChoice">FunnelForMultipleChoice</a>.</li>`,$e,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,an,jt,vo=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.42.4/en/model_doc/funnel#transformers.FunnelModel">FunnelModel</a> or a <a href="/docs/transformers/v4.42.4/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.`,rn,zt,Fo=`Configuration objects inherit from <a href="/docs/transformers/v4.42.4/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/v4.42.4/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/v4.42.4/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,Ie,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.`,at,Ze,A,rt,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,qe,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,$o=`This tokenizer inherits from <a href="/docs/transformers/v4.42.4/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.`,It,Me,lt,Nn,P,vn=`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,Zo="<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/v4.42.4/en/model_doc/funnel#transformers.FunnelForPreTraining">FunnelForPreTraining</a>.',Gn,se,St,At,dt,he='Output type of <a href="/docs/transformers/v4.42.4/en/model_doc/funnel#transformers.FunnelForPreTraining">FunnelForPreTraining</a>.',Zt,Se,mn,fn,Yt,Dt,oo;return v=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/v4.42.4/en/model_doc/funnel#transformers.FunnelModel">FunnelModel</a> or <a href="/docs/transformers/v4.42.4/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/v4.42.4/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/v4.42.4/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/v4.42.4/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>
`}}),Ie=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/v4.42.4/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/v4.42.4/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:F}}}),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/v4.42.4/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/v4.42.4/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/v4.42.4/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/v4.42.4/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:[Is]},$$scope:{ctx:F}}}),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/v4.42.4/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/v4.42.4/src/transformers/models/funnel/modeling_tf_funnel.py#L1086"}}),Se=new Js({props:{pytorch:!0,tensorflow:!0,jax:!1,$$slots:{tensorflow:[ja],pytorch:[Ks]},$$scope:{ctx:F}}}),fn=new Us({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/funnel.md"}}),{c(){e=i("meta"),g=a(),n=i("p"),o=a(),T(v.$$.fragment),t=a(),_=i("div"),_.innerHTML=N,W=a(),T(j.$$.fragment),L=a(),U=i("p"),U.innerHTML=z,H=a(),p=i("p"),p.textContent=x,qn=a(),S=i("p"),S.innerHTML=nn,Fe=a(),be=i("p"),be.innerHTML=ko,Nt=a(),T(Ge.$$.fragment),Bn=a(),oe=i("ul"),oe.innerHTML=Dn,$e=a(),T(ft.$$.fragment),E=a(),Je=i("ul"),Je.innerHTML=te,Ve=a(),T(on.$$.fragment),Gt=a(),xe=i("div"),T(sn.$$.fragment),an=a(),jt=i("p"),jt.innerHTML=vo,rn=a(),zt=i("p"),zt.innerHTML=Fo,Vt=a(),T(pe.$$.fragment),Jt=a(),R=i("div"),T(Ke.$$.fragment),Re=a(),et=i("p"),et.textContent=Rt,ln=a(),tt=i("p"),tt.innerHTML=On,Ue=a(),Xe=i("div"),T(ne.$$.fragment),Ut=a(),nt=i("p"),nt.textContent=We,X=a(),ot=i("ul"),ot.innerHTML=bn,yn=a(),Xt=i("div"),T(Ie.$$.fragment),dn=a(),st=i("p"),st.innerHTML=Kn,at=a(),Ze=i("div"),T(A.$$.fragment),rt=a(),Mn=i("p"),Mn.textContent=wn,Pt=a(),T(Wt.$$.fragment),me=a(),ht=i("p"),ht.innerHTML=fo,gt=a(),Ln=i("div"),T(Et.$$.fragment),qe=a(),T(cn.$$.fragment),_t=a(),G=i("div"),T(fe.$$.fragment),Hn=a(),V=i("p"),V.innerHTML=kn,eo=a(),ye=i("p"),ye.innerHTML=$o,It=a(),Me=i("div"),T(lt.$$.fragment),Nn=a(),P=i("p"),P.textContent=vn,to=a(),Be=i("ul"),Be.innerHTML=Zo,no=a(),D=i("div"),T(un.$$.fragment),we=a(),Ce=i("p"),Ce.textContent=xo,pn=a(),T(it.$$.fragment),ho=a(),Pe=i("p"),Pe.innerHTML=je,ze=a(),T(Qt.$$.fragment),Le=a(),Tt=i("div"),T(Ee.$$.fragment),bt=a(),Q=i("p"),Q.innerHTML=Qe,Gn=a(),se=i("div"),T(St.$$.fragment),At=a(),dt=i("p"),dt.innerHTML=he,Zt=a(),T(Se.$$.fragment),mn=a(),T(fn.$$.fragment),Yt=a(),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=r(h),n=d(h,"P",{}),q(n).forEach(l),o=r(h),b(v.$$.fragment,h),t=r(h),_=d(h,"DIV",{class:!0,"data-svelte-h":!0}),f(_)!=="svelte-lskqhd"&&(_.innerHTML=N),W=r(h),b(j.$$.fragment,h),L=r(h),U=d(h,"P",{"data-svelte-h":!0}),f(U)!=="svelte-1okwogu"&&(U.innerHTML=z),H=r(h),p=d(h,"P",{"data-svelte-h":!0}),f(p)!=="svelte-vfdo9a"&&(p.textContent=x),qn=r(h),S=d(h,"P",{"data-svelte-h":!0}),f(S)!=="svelte-1t8lw0x"&&(S.innerHTML=nn),Fe=r(h),be=d(h,"P",{"data-svelte-h":!0}),f(be)!=="svelte-pea6cs"&&(be.innerHTML=ko),Nt=r(h),b(Ge.$$.fragment,h),Bn=r(h),oe=d(h,"UL",{"data-svelte-h":!0}),f(oe)!=="svelte-oijh8s"&&(oe.innerHTML=Dn),$e=r(h),b(ft.$$.fragment,h),E=r(h),Je=d(h,"UL",{"data-svelte-h":!0}),f(Je)!=="svelte-mgusi3"&&(Je.innerHTML=te),Ve=r(h),b(on.$$.fragment,h),Gt=r(h),xe=d(h,"DIV",{class:!0});var O=q(xe);b(sn.$$.fragment,O),an=r(O),jt=d(O,"P",{"data-svelte-h":!0}),f(jt)!=="svelte-94jhdn"&&(jt.innerHTML=vo),rn=r(O),zt=d(O,"P",{"data-svelte-h":!0}),f(zt)!=="svelte-q5f6v7"&&(zt.innerHTML=Fo),O.forEach(l),Vt=r(h),b(pe.$$.fragment,h),Jt=r(h),R=d(h,"DIV",{class:!0});var Y=q(R);b(Ke.$$.fragment,Y),Re=r(Y),et=d(Y,"P",{"data-svelte-h":!0}),f(et)!=="svelte-iru9iq"&&(et.textContent=Rt),ln=r(Y),tt=d(Y,"P",{"data-svelte-h":!0}),f(tt)!=="svelte-ikivhl"&&(tt.innerHTML=On),Ue=r(Y),Xe=d(Y,"DIV",{class:!0});var He=q(Xe);b(ne.$$.fragment,He),Ut=r(He),nt=d(He,"P",{"data-svelte-h":!0}),f(nt)!=="svelte-t7qurq"&&(nt.textContent=We),X=r(He),ot=d(He,"UL",{"data-svelte-h":!0}),f(ot)!=="svelte-xi6653"&&(ot.innerHTML=bn),He.forEach(l),yn=r(Y),Xt=d(Y,"DIV",{class:!0});var hn=q(Xt);b(Ie.$$.fragment,hn),dn=r(hn),st=d(hn,"P",{"data-svelte-h":!0}),f(st)!=="svelte-1f4f5kp"&&(st.innerHTML=Kn),hn.forEach(l),at=r(Y),Ze=d(Y,"DIV",{class:!0});var Ot=q(Ze);b(A.$$.fragment,Ot),rt=r(Ot),Mn=d(Ot,"P",{"data-svelte-h":!0}),f(Mn)!=="svelte-1q5gllr"&&(Mn.textContent=wn),Pt=r(Ot),b(Wt.$$.fragment,Ot),me=r(Ot),ht=d(Ot,"P",{"data-svelte-h":!0}),f(ht)!=="svelte-owoxgn"&&(ht.innerHTML=fo),Ot.forEach(l),gt=r(Y),Ln=d(Y,"DIV",{class:!0});var Ae=q(Ln);b(Et.$$.fragment,Ae),Ae.forEach(l),Y.forEach(l),qe=r(h),b(cn.$$.fragment,h),_t=r(h),G=d(h,"DIV",{class:!0});var K=q(G);b(fe.$$.fragment,K),Hn=r(K),V=d(K,"P",{"data-svelte-h":!0}),f(V)!=="svelte-qil6sj"&&(V.innerHTML=kn),eo=r(K),ye=d(K,"P",{"data-svelte-h":!0}),f(ye)!=="svelte-4iveal"&&(ye.innerHTML=$o),It=r(K),Me=d(K,"DIV",{class:!0});var gn=q(Me);b(lt.$$.fragment,gn),Nn=r(gn),P=d(gn,"P",{"data-svelte-h":!0}),f(P)!=="svelte-1x1qio1"&&(P.textContent=vn),to=r(gn),Be=d(gn,"UL",{"data-svelte-h":!0}),f(Be)!=="svelte-xi6653"&&(Be.innerHTML=Zo),gn.forEach(l),no=r(K),D=d(K,"DIV",{class:!0});var re=q(D);b(un.$$.fragment,re),we=r(re),Ce=d(re,"P",{"data-svelte-h":!0}),f(Ce)!=="svelte-1q5gllr"&&(Ce.textContent=xo),pn=r(re),b(it.$$.fragment,re),ho=r(re),Pe=d(re,"P",{"data-svelte-h":!0}),f(Pe)!=="svelte-owoxgn"&&(Pe.innerHTML=je),re.forEach(l),K.forEach(l),ze=r(h),b(Qt.$$.fragment,h),Le=r(h),Tt=d(h,"DIV",{class:!0});var so=q(Tt);b(Ee.$$.fragment,so),bt=r(so),Q=d(so,"P",{"data-svelte-h":!0}),f(Q)!=="svelte-1dab6fs"&&(Q.innerHTML=Qe),so.forEach(l),Gn=r(h),se=d(h,"DIV",{class:!0});var yt=q(se);b(St.$$.fragment,yt),At=r(yt),dt=d(yt,"P",{"data-svelte-h":!0}),f(dt)!=="svelte-1dab6fs"&&(dt.innerHTML=he),yt.forEach(l),Zt=r(h),b(Se.$$.fragment,h),mn=r(h),b(fn.$$.fragment,h),Yt=r(h),Dt=d(h,"P",{}),q(Dt).forEach(l),this.h()},h(){Z(e,"name","hf:doc:metadata"),Z(e,"content",Ja),Z(_,"class","flex flex-wrap space-x-1"),Z(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(Xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(Ln,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),Z(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(v,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,qn,J),c(h,S,J),c(h,Fe,J),c(h,be,J),c(h,Nt,J),y(Ge,h,J),c(h,Bn,J),c(h,oe,J),c(h,$e,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,an),s(xe,jt),s(xe,rn),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(Ie,Xt,null),s(Xt,dn),s(Xt,st),s(R,at),s(R,Ze),y(A,Ze,null),s(Ze,rt),s(Ze,Mn),s(Ze,Pt),y(Wt,Ze,null),s(Ze,me),s(Ze,ht),s(R,gt),s(R,Ln),y(Et,Ln,null),c(h,qe,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,It),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,Zt,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(v.$$.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(Ie.$$.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(v.$$.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(Ie.$$.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(qn),l(S),l(Fe),l(be),l(Nt),l(Bn),l(oe),l($e),l(E),l(Je),l(Ve),l(Gt),l(xe),l(Vt),l(Jt),l(R),l(qe),l(_t),l(G),l(ze),l(Le),l(Tt),l(Gn),l(se),l(Zt),l(mn),l(Yt),l(Dt)),l(e),k(v,h),k(j,h),k(Ge,h),k(ft,h),k(on,h),k(sn),k(pe,h),k(Ke),k(ne),k(Ie),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 Ja='{"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 Ua(F){return xs(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ga extends Cs{constructor(e){super(),js(this,e,Ua,za,$s,{})}}export{Ga as component};
