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

tokenizer = AutoTokenizer.from_pretrained("funnel-transformer/small-base")
model = FunnelBaseModel.from_pretrained("funnel-transformer/small-base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FunnelBaseModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

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

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

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

tokenizer = AutoTokenizer.from_pretrained("funnel-transformer/small")
model = FunnelModel.from_pretrained("funnel-transformer/small")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FunnelModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

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

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

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

tokenizer = AutoTokenizer.from_pretrained("funnel-transformer/small")
model = FunnelForPreTraining.from_pretrained("funnel-transformer/small")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
logits = model(**inputs).logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FunnelForPreTraining
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

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

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

tokenizer = AutoTokenizer.from_pretrained("funnel-transformer/small")
model = FunnelForMaskedLM.from_pretrained("funnel-transformer/small")

inputs = tokenizer("The capital of France is <mask>.", return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

# retrieve index of <mask>
mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[0].nonzero(as_tuple=True)[0]

predicted_token_id = logits[0, mask_token_index].argmax(axis=-1)

labels = tokenizer("The capital of France is Paris.", return_tensors="pt")["input_ids"]
# mask labels of non-<mask> tokens
labels = torch.where(inputs.input_ids == tokenizer.mask_token_id, labels, -100)

outputs = model(**inputs, labels=labels)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FunnelForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

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

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

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

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

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

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

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

tokenizer = AutoTokenizer.from_pretrained("funnel-transformer/small-base")
model = FunnelForSequenceClassification.from_pretrained("funnel-transformer/small-base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_id = logits.argmax().item()

# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = FunnelForSequenceClassification.from_pretrained("funnel-transformer/small-base", num_labels=num_labels)

labels = torch.tensor([1])
loss = model(**inputs, labels=labels).loss`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FunnelForSequenceClassification

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

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

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

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

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

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

tokenizer = AutoTokenizer.from_pretrained("funnel-transformer/small-base")
model = FunnelForSequenceClassification.from_pretrained("funnel-transformer/small-base", problem_type="multi_label_classification")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_ids = torch.arange(0, logits.shape[-1])[torch.sigmoid(logits).squeeze(dim=0) > 0.5]

# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = FunnelForSequenceClassification.from_pretrained(
    "funnel-transformer/small-base", num_labels=num_labels, problem_type="multi_label_classification"
)

labels = torch.sum(
    torch.nn.functional.one_hot(predicted_class_ids[None, :].clone(), num_classes=num_labels), dim=1
).to(torch.float)
loss = model(**inputs, labels=labels).loss`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FunnelForSequenceClassification

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

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

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

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

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

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

tokenizer = AutoTokenizer.from_pretrained("funnel-transformer/small-base")
model = FunnelForMultipleChoice.from_pretrained("funnel-transformer/small-base")

prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
choice0 = "It is eaten with a fork and a knife."
choice1 = "It is eaten while held in the hand."
labels = torch.tensor(0).unsqueeze(0)  # choice0 is correct (according to Wikipedia ;)), batch size 1

encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors="pt", padding=True)
outputs = model(**{k: v.unsqueeze(0) for k, v in encoding.items()}, labels=labels)  # batch size is 1

# the linear classifier still needs to be trained
loss = outputs.loss
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FunnelForMultipleChoice
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

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

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

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

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

tokenizer = AutoTokenizer.from_pretrained("funnel-transformer/small")
model = FunnelForTokenClassification.from_pretrained("funnel-transformer/small")

inputs = tokenizer(
    "HuggingFace is a company based in Paris and New York", add_special_tokens=False, return_tensors="pt"
)

with torch.no_grad():
    logits = model(**inputs).logits

predicted_token_class_ids = logits.argmax(-1)

# Note that tokens are classified rather then input words which means that
# there might be more predicted token classes than words.
# Multiple token classes might account for the same word
predicted_tokens_classes = [model.config.id2label[t.item()] for t in predicted_token_class_ids[0]]

labels = predicted_token_class_ids
loss = model(**inputs, labels=labels).loss`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FunnelForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

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

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

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

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

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

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

tokenizer = AutoTokenizer.from_pretrained("funnel-transformer/small")
model = FunnelForQuestionAnswering.from_pretrained("funnel-transformer/small")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"

inputs = tokenizer(question, text, return_tensors="pt")
with torch.no_grad():
    outputs = model(**inputs)

answer_start_index = outputs.start_logits.argmax()
answer_end_index = outputs.end_logits.argmax()

predict_answer_tokens = inputs.input_ids[0, answer_start_index : answer_end_index + 1]

# target is "nice puppet"
target_start_index = torch.tensor([14])
target_end_index = torch.tensor([15])

outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
loss = outputs.loss`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FunnelForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

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

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

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

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

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

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

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

tokenizer = AutoTokenizer.from_pretrained("funnel-transformer/small-base")
model = TFFunnelBaseModel.from_pretrained("funnel-transformer/small-base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")
outputs = model(inputs)

last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFunnelBaseModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

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

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

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

tokenizer = AutoTokenizer.from_pretrained("funnel-transformer/small")
model = TFFunnelModel.from_pretrained("funnel-transformer/small")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")
outputs = model(inputs)

last_hidden_states = outputs.last_hidden_state`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFunnelModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

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

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

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

tokenizer = AutoTokenizer.from_pretrained("funnel-transformer/small")
model = TFFunnelForPreTraining.from_pretrained("funnel-transformer/small")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")
logits = model(inputs).logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFunnelForPreTraining
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

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

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

tokenizer = AutoTokenizer.from_pretrained("funnel-transformer/small")
model = TFFunnelForMaskedLM.from_pretrained("funnel-transformer/small")

inputs = tokenizer("The capital of France is [MASK].", return_tensors="tf")
logits = model(**inputs).logits

# retrieve index of [MASK]
mask_token_index = tf.where((inputs.input_ids == tokenizer.mask_token_id)[0])
selected_logits = tf.gather_nd(logits[0], indices=mask_token_index)

predicted_token_id = tf.math.argmax(selected_logits, axis=-1)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFunnelForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

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

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

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

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

outputs = model(**inputs, labels=labels)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(<span class="hljs-string">&quot;The capital of France is Paris.&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># mask labels of non-[MASK] tokens</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.where(inputs.input_ids == tokenizer.mask_token_id, labels, -<span class="hljs-number">100</span>)

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

tokenizer = AutoTokenizer.from_pretrained("funnel-transformer/small-base")
model = TFFunnelForSequenceClassification.from_pretrained("funnel-transformer/small-base")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")

logits = model(**inputs).logits

predicted_class_id = int(tf.math.argmax(logits, axis=-1)[0])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFunnelForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

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

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

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

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

tokenizer = AutoTokenizer.from_pretrained("funnel-transformer/small-base")
model = TFFunnelForMultipleChoice.from_pretrained("funnel-transformer/small-base")

prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
choice0 = "It is eaten with a fork and a knife."
choice1 = "It is eaten while held in the hand."

encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors="tf", padding=True)
inputs = {k: tf.expand_dims(v, 0) for k, v in encoding.items()}
outputs = model(inputs)  # batch size is 1

# the linear classifier still needs to be trained
logits = outputs.logits`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFunnelForMultipleChoice
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

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

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

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

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

tokenizer = AutoTokenizer.from_pretrained("funnel-transformer/small")
model = TFFunnelForTokenClassification.from_pretrained("funnel-transformer/small")

inputs = tokenizer(
    "HuggingFace is a company based in Paris and New York", add_special_tokens=False, return_tensors="tf"
)

logits = model(**inputs).logits
predicted_token_class_ids = tf.math.argmax(logits, axis=-1)

# Note that tokens are classified rather then input words which means that
# there might be more predicted token classes than words.
# Multiple token classes might account for the same word
predicted_tokens_classes = [model.config.id2label[t] for t in predicted_token_class_ids[0].numpy().tolist()]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFunnelForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

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

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

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

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

tokenizer = AutoTokenizer.from_pretrained("funnel-transformer/small")
model = TFFunnelForQuestionAnswering.from_pretrained("funnel-transformer/small")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"

inputs = tokenizer(question, text, return_tensors="tf")
outputs = model(**inputs)

answer_start_index = int(tf.math.argmax(outputs.start_logits, axis=-1)[0])
answer_end_index = int(tf.math.argmax(outputs.end_logits, axis=-1)[0])

predict_answer_tokens = inputs.input_ids[0, answer_start_index : answer_end_index + 1]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFFunnelForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

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

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

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

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

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

outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
loss = tf.math.reduce_mean(outputs.loss)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = tf.constant([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = tf.constant([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(outputs.loss)`}}),{c(){y(d.$$.fragment)},l(h){b(d.$$.fragment,h)},m(h,m){F(d,h,m),v=!0},p:Ze,i(h){v||($(d.$$.fragment,h),v=!0)},o(h){E(d.$$.fragment,h),v=!1},d(h){M(d,h)}}}function E$(x){let d,v,h,m,T,l,p,P,Te,ge,S,ce,J,w,we,W,ue,je,H,ae,ie,Q,le,ye,U,be,_e,B,Fe,de,ne,C,A,pe,V,ke,he,K,$e,ve,j,Ee,R,se,fe,Y,Me,me,I,qe,D,ze,ee,O,Pe,L,xe,Ce,g,q,De,te,Ne,Ie,z,Se,Be,Ae,We,Qe,N,G,Ue,Oe,Z,Ke,Le,re,He,X,Re,Ch,js,jh,Ah,_u,cn,oo,Hl,As,Oh,Rl,Lh,ku,_t,Vl,Mi,Dh,Nh,Yl,qi,Ih,Sh,Gl,zi,Bh,Wh,Zl,Pi,Qh,Uh,Xl,xi,Kh,vu,un,so,Jl,Os,Hh,ed,Rh,Tu,Jt,Ls,Vh,en,Yh,Ci,Gh,Zh,ji,Xh,Jh,Ds,ef,tf,nf,pn,of,Ai,sf,rf,Oi,af,lf,wu,hn,ro,td,Ns,df,nd,cf,yu,et,Is,uf,od,pf,hf,Ss,ff,Li,mf,gf,_f,tn,Bs,kf,sd,vf,Tf,Ws,Di,wf,rd,yf,bf,Ni,Ff,ad,$f,Ef,ao,Qs,Mf,Us,qf,id,zf,Pf,xf,jt,Ks,Cf,ld,jf,Af,io,Of,fn,Lf,dd,Df,Nf,cd,If,Sf,Bf,Ii,Hs,bu,mn,lo,ud,Rs,Wf,pd,Qf,Fu,gt,Vs,Uf,Ys,Kf,hd,Hf,Rf,Vf,Gs,Yf,Si,Gf,Zf,Xf,nn,Zs,Jf,fd,em,tm,Xs,Bi,nm,md,om,sm,Wi,rm,gd,am,im,At,Js,lm,_d,dm,cm,co,um,gn,pm,kd,hm,fm,vd,mm,gm,$u,_n,uo,Td,er,_m,wd,km,Eu,kn,tr,vm,nr,Tm,Qi,wm,ym,Mu,vn,or,bm,sr,Fm,Ui,$m,Em,qu,Tn,po,yd,rr,Mm,bd,qm,zu,dt,ar,zm,Fd,Pm,xm,ir,Cm,lr,jm,Am,Om,dr,Lm,Ki,Dm,Nm,Im,cr,Sm,ur,Bm,Wm,Qm,Ot,pr,Um,wn,Km,Hi,Hm,Rm,$d,Vm,Ym,Gm,ho,Zm,fo,Pu,yn,mo,Ed,hr,Xm,Md,Jm,xu,ct,fr,eg,qd,tg,ng,mr,og,gr,sg,rg,ag,_r,ig,Ri,lg,dg,cg,kr,ug,vr,pg,hg,fg,Lt,Tr,mg,bn,gg,Vi,_g,kg,zd,vg,Tg,wg,go,yg,_o,Cu,Fn,ko,Pd,wr,bg,xd,Fg,ju,$n,yr,$g,Dt,br,Eg,En,Mg,Yi,qg,zg,Cd,Pg,xg,Cg,vo,jg,To,Au,Mn,wo,jd,Fr,Ag,Ad,Og,Ou,ut,$r,Lg,Er,Dg,Od,Ng,Ig,Sg,Mr,Bg,qr,Wg,Qg,Ug,zr,Kg,Gi,Hg,Rg,Vg,Pr,Yg,xr,Gg,Zg,Xg,Nt,Cr,Jg,qn,e_,Zi,t_,n_,Ld,o_,s_,r_,yo,a_,bo,Lu,zn,Fo,Dd,jr,i_,Nd,l_,Du,pt,Ar,d_,Id,c_,u_,Or,p_,Lr,h_,f_,m_,Dr,g_,Xi,__,k_,v_,Nr,T_,Ir,w_,y_,b_,kt,Sr,F_,Pn,$_,Ji,E_,M_,Sd,q_,z_,P_,$o,x_,Eo,C_,Mo,Nu,xn,qo,Bd,Br,j_,Wd,A_,Iu,ht,Wr,O_,Qd,L_,D_,Qr,N_,Ur,I_,S_,B_,Kr,W_,el,Q_,U_,K_,Hr,H_,Rr,R_,V_,Y_,It,Vr,G_,Cn,Z_,tl,X_,J_,Ud,ek,tk,nk,zo,ok,Po,Su,jn,xo,Kd,Yr,sk,Hd,rk,Bu,ft,Gr,ak,Rd,ik,lk,Zr,dk,Xr,ck,uk,pk,Jr,hk,nl,fk,mk,gk,ea,_k,ta,kk,vk,Tk,St,na,wk,An,yk,ol,bk,Fk,Vd,$k,Ek,Mk,Co,qk,jo,Wu,On,Ao,Yd,oa,zk,Gd,Pk,Qu,mt,sa,xk,Ln,Ck,Zd,jk,Ak,Xd,Ok,Lk,Dk,ra,Nk,aa,Ik,Sk,Bk,ia,Wk,sl,Qk,Uk,Kk,la,Hk,da,Rk,Vk,Yk,Bt,ca,Gk,Dn,Zk,rl,Xk,Jk,Jd,ev,tv,nv,Oo,ov,Lo,Uu,Nn,Do,ec,ua,sv,tc,rv,Ku,tt,pa,av,nc,iv,lv,ha,dv,fa,cv,uv,pv,ma,hv,al,fv,mv,gv,ga,_v,_a,kv,vv,Tv,No,wv,Wt,ka,yv,In,bv,il,Fv,$v,oc,Ev,Mv,qv,Io,zv,So,Hu,Sn,Bo,sc,va,Pv,rc,xv,Ru,nt,Ta,Cv,ac,jv,Av,wa,Ov,ya,Lv,Dv,Nv,ba,Iv,ll,Sv,Bv,Wv,Fa,Qv,$a,Uv,Kv,Hv,Wo,Rv,Qt,Ea,Vv,Bn,Yv,dl,Gv,Zv,ic,Xv,Jv,eT,Qo,tT,Uo,Vu,Wn,Ko,lc,Ma,nT,dc,oT,Yu,ot,qa,sT,cc,rT,aT,za,iT,Pa,lT,dT,cT,xa,uT,cl,pT,hT,fT,Ca,mT,ja,gT,_T,kT,Ho,vT,Ut,Aa,TT,Qn,wT,ul,yT,bT,uc,FT,$T,ET,Ro,MT,Vo,Gu,Un,Yo,pc,Oa,qT,hc,zT,Zu,st,La,PT,Da,xT,fc,CT,jT,AT,Na,OT,Ia,LT,DT,NT,Sa,IT,pl,ST,BT,WT,Ba,QT,Wa,UT,KT,HT,Go,RT,vt,Qa,VT,Kn,YT,hl,GT,ZT,mc,XT,JT,ew,Zo,tw,Xo,nw,Jo,Xu,Hn,es,gc,Ua,ow,_c,sw,Ju,rt,Ka,rw,kc,aw,iw,Ha,lw,Ra,dw,cw,uw,Va,pw,fl,hw,fw,mw,Ya,gw,Ga,_w,kw,vw,ts,Tw,Tt,Za,ww,Rn,yw,ml,bw,Fw,vc,$w,Ew,Mw,ns,qw,os,zw,ss,ep,Vn,rs,Tc,Xa,Pw,wc,xw,tp,at,Ja,Cw,yc,jw,Aw,ei,Ow,ti,Lw,Dw,Nw,ni,Iw,gl,Sw,Bw,Ww,oi,Qw,si,Uw,Kw,Hw,as,Rw,Kt,ri,Vw,Yn,Yw,_l,Gw,Zw,bc,Xw,Jw,ey,is,ty,ls,np,Gn,ds,Fc,ai,ny,$c,oy,op,it,ii,sy,Ec,ry,ay,li,iy,di,ly,dy,cy,ci,uy,kl,py,hy,fy,ui,my,pi,gy,_y,ky,cs,vy,wt,hi,Ty,Zn,wy,vl,yy,by,Mc,Fy,$y,Ey,us,My,ps,qy,hs,sp,Xn,fs,qc,fi,zy,zc,Py,rp,lt,mi,xy,Jn,Cy,Pc,jy,Ay,xc,Oy,Ly,Dy,gi,Ny,_i,Iy,Sy,By,ki,Wy,Tl,Qy,Uy,Ky,vi,Hy,Ti,Ry,Vy,Yy,ms,Gy,yt,wi,Zy,eo,Xy,wl,Jy,eb,Cc,tb,nb,ob,gs,sb,_s,rb,ks,ap;return l=new Ye({}),le=new Ye({}),As=new Ye({}),Os=new Ye({}),Ls=new oe({props:{name:"class transformers.FunnelConfig",anchor:"transformers.FunnelConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"block_sizes",val:" = [4, 4, 4]"},{name:"block_repeats",val:" = None"},{name:"num_decoder_layers",val:" = 2"},{name:"d_model",val:" = 768"},{name:"n_head",val:" = 12"},{name:"d_head",val:" = 64"},{name:"d_inner",val:" = 3072"},{name:"hidden_act",val:" = 'gelu_new'"},{name:"hidden_dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.1"},{name:"activation_dropout",val:" = 0.0"},{name:"initializer_range",val:" = 0.1"},{name:"initializer_std",val:" = None"},{name:"layer_norm_eps",val:" = 1e-09"},{name:"pooling_type",val:" = 'mean'"},{name:"attention_type",val:" = 'relative_shift'"},{name:"separate_cls",val:" = True"},{name:"truncate_seq",val:" = True"},{name:"pool_q_only",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FunnelConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the Funnel transformer. Defines the number of different tokens that can be represented
by the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelModel">FunnelModel</a> or <a href="/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.TFFunnelModel">TFFunnelModel</a>.`,name:"vocab_size"},{anchor:"transformers.FunnelConfig.block_sizes",description:`<strong>block_sizes</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[4, 4, 4]</code>) &#x2014;
The sizes of the blocks used in the model.`,name:"block_sizes"},{anchor:"transformers.FunnelConfig.block_repeats",description:`<strong>block_repeats</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
If passed along, each layer of each block is repeated the number of times indicated.`,name:"block_repeats"},{anchor:"transformers.FunnelConfig.num_decoder_layers",description:`<strong>num_decoder_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The number of layers in the decoder (when not using the base model).`,name:"num_decoder_layers"},{anchor:"transformers.FunnelConfig.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the model&#x2019;s hidden states.`,name:"d_model"},{anchor:"transformers.FunnelConfig.n_head",description:`<strong>n_head</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"n_head"},{anchor:"transformers.FunnelConfig.d_head",description:`<strong>d_head</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Dimensionality of the model&#x2019;s heads.`,name:"d_head"},{anchor:"transformers.FunnelConfig.d_inner",description:`<strong>d_inner</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Inner dimension in the feed-forward blocks.`,name:"d_inner"},{anchor:"transformers.FunnelConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>callable</code>, <em>optional</em>, defaults to <code>&quot;gelu_new&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.FunnelConfig.hidden_dropout",description:`<strong>hidden_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout"},{anchor:"transformers.FunnelConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for the attention probabilities.`,name:"attention_dropout"},{anchor:"transformers.FunnelConfig.activation_dropout",description:`<strong>activation_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.0) &#x2014;
The dropout probability used between the two layers of the feed-forward blocks.`,name:"activation_dropout"},{anchor:"transformers.FunnelConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The upper bound of the <em>uniform initializer</em> for initializing all weight matrices in attention layers.`,name:"initializer_range"},{anchor:"transformers.FunnelConfig.initializer_std",description:`<strong>initializer_std</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The standard deviation of the <em>normal initializer</em> for initializing the embedding matrix and the weight of
linear layers. Will default to 1 for the embedding matrix and the value given by Xavier initialization for
linear layers.`,name:"initializer_std"},{anchor:"transformers.FunnelConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-9) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.FunnelConfig.pooling_type",description:`<strong>pooling_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;mean&quot;</code>) &#x2014;
Possible values are <code>&quot;mean&quot;</code> or <code>&quot;max&quot;</code>. The way pooling is performed at the beginning of each block.`,name:"pooling_type"},{anchor:"transformers.FunnelConfig.attention_type",description:`<strong>attention_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;relative_shift&quot;</code>) &#x2014;
Possible values are <code>&quot;relative_shift&quot;</code> or <code>&quot;factorized&quot;</code>. The former is faster on CPU/GPU while the latter
is faster on TPU.`,name:"attention_type"},{anchor:"transformers.FunnelConfig.separate_cls",description:`<strong>separate_cls</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to separate the cls token when applying pooling.`,name:"separate_cls"},{anchor:"transformers.FunnelConfig.truncate_seq",description:`<strong>truncate_seq</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
When using <code>separate_cls</code>, whether or not to truncate the last token when pooling, to avoid getting a
sequence length that is not a multiple of 2.`,name:"truncate_seq"},{anchor:"transformers.FunnelConfig.pool_q_only",description:`<strong>pool_q_only</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to apply the pooling only to the query or to query, key and values for the attention layers.`,name:"pool_q_only"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/funnel/configuration_funnel.py#L41"}}),Ns=new Ye({}),Is=new oe({props:{name:"class transformers.FunnelTokenizer",anchor:"transformers.FunnelTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = True"},{name:"do_basic_tokenize",val:" = True"},{name:"never_split",val:" = None"},{name:"unk_token",val:" = '<unk>'"},{name:"sep_token",val:" = '<sep>'"},{name:"pad_token",val:" = '<pad>'"},{name:"cls_token",val:" = '<cls>'"},{name:"mask_token",val:" = '<mask>'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FunnelTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.FunnelTokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.FunnelTokenizer.do_basic_tokenize",description:`<strong>do_basic_tokenize</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to do basic tokenization before WordPiece.`,name:"do_basic_tokenize"},{anchor:"transformers.FunnelTokenizer.never_split",description:`<strong>never_split</strong> (<code>Iterable</code>, <em>optional</em>) &#x2014;
Collection of tokens which will never be split during tokenization. Only has an effect when
<code>do_basic_tokenize=True</code>`,name:"never_split"},{anchor:"transformers.FunnelTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.FunnelTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;sep&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.FunnelTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.FunnelTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;cls&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.FunnelTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.FunnelTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <code>optional</code>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sentence token.`,name:"bos_token"},{anchor:"transformers.FunnelTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <code>optional</code>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sentence token.`,name:"eos_token"},{anchor:"transformers.FunnelTokenizer.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters.</p>
<p>This should likely be deactivated for Japanese (see this
<a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">issue</a>).`,name:"tokenize_chinese_chars"},{anchor:"transformers.FunnelTokenizer.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original BERT).`,name:"strip_accents"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/funnel/tokenization_funnel.py#L91"}}),Bs=new oe({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.FunnelTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.FunnelTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.FunnelTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/funnel/tokenization_funnel.py#L238",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Qs=new oe({props:{name:"get_special_tokens_mask",anchor:"transformers.FunnelTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.FunnelTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.FunnelTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.FunnelTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/funnel/tokenization_funnel.py#L264",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Ks=new oe({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.FunnelTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.FunnelTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.FunnelTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/funnel/tokenization_funnel.py#L292",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),io=new Ge({props:{anchor:"transformers.FunnelTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[j2]},$$scope:{ctx:x}}}),Hs=new oe({props:{name:"save_vocabulary",anchor:"transformers.FunnelTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/funnel/tokenization_funnel.py#L322"}}),Rs=new Ye({}),Vs=new oe({props:{name:"class transformers.FunnelTokenizerFast",anchor:"transformers.FunnelTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{name:"unk_token",val:" = '<unk>'"},{name:"sep_token",val:" = '<sep>'"},{name:"pad_token",val:" = '<pad>'"},{name:"cls_token",val:" = '<cls>'"},{name:"mask_token",val:" = '<mask>'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"clean_text",val:" = True"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"wordpieces_prefix",val:" = '##'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FunnelTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.FunnelTokenizerFast.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.FunnelTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.FunnelTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;sep&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.FunnelTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.FunnelTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;cls&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.FunnelTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.FunnelTokenizerFast.clean_text",description:`<strong>clean_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to clean the text before tokenization by removing any control characters and replacing all
whitespaces by the classic one.`,name:"clean_text"},{anchor:"transformers.FunnelTokenizerFast.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters. This should likely be deactivated for Japanese (see <a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">this
issue</a>).`,name:"tokenize_chinese_chars"},{anchor:"transformers.FunnelTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <code>optional</code>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sentence token.`,name:"bos_token"},{anchor:"transformers.FunnelTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <code>optional</code>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sentence token.`,name:"eos_token"},{anchor:"transformers.FunnelTokenizerFast.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original BERT).`,name:"strip_accents"},{anchor:"transformers.FunnelTokenizerFast.wordpieces_prefix",description:`<strong>wordpieces_prefix</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;##&quot;</code>) &#x2014;
The prefix for subwords.`,name:"wordpieces_prefix"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/funnel/tokenization_funnel_fast.py#L94"}}),Zs=new oe({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.FunnelTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.FunnelTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.FunnelTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/funnel/tokenization_funnel_fast.py#L196",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Js=new oe({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.FunnelTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.FunnelTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.FunnelTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/funnel/tokenization_funnel_fast.py#L220",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),co=new Ge({props:{anchor:"transformers.FunnelTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[A2]},$$scope:{ctx:x}}}),er=new Ye({}),tr=new oe({props:{name:"class transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput",anchor:"transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"logits",val:": FloatTensor = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],parametersDescription:[{anchor:"transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput.loss",description:`<strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) &#x2014;
Total loss of the ELECTRA-style objective.`,name:"loss"},{anchor:"transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput.logits",description:`<strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Prediction scores of the head (scores for each token before SoftMax).`,name:"logits"},{anchor:"transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput.hidden_states",description:`<strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.`,name:"hidden_states"},{anchor:"transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput.attentions",description:`<strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/funnel/modeling_funnel.py#L833"}}),or=new oe({props:{name:"class transformers.models.funnel.modeling_tf_funnel.TFFunnelForPreTrainingOutput",anchor:"transformers.models.funnel.modeling_tf_funnel.TFFunnelForPreTrainingOutput",parameters:[{name:"logits",val:": Tensor = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = 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.27.1/src/transformers/models/funnel/modeling_tf_funnel.py#L986"}}),rr=new Ye({}),ar=new oe({props:{name:"class transformers.FunnelBaseModel",anchor:"transformers.FunnelBaseModel",parameters:[{name:"config",val:": FunnelConfig"}],parametersDescription:[{anchor:"transformers.FunnelBaseModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_funnel.py#L926"}}),pr=new oe({props:{name:"forward",anchor:"transformers.FunnelBaseModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FunnelBaseModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_funnel.py#L942",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ho=new Ve({props:{$$slots:{default:[O2]},$$scope:{ctx:x}}}),fo=new Ge({props:{anchor:"transformers.FunnelBaseModel.forward.example",$$slots:{default:[L2]},$$scope:{ctx:x}}}),hr=new Ye({}),fr=new oe({props:{name:"class transformers.FunnelModel",anchor:"transformers.FunnelModel",parameters:[{name:"config",val:": FunnelConfig"}],parametersDescription:[{anchor:"transformers.FunnelModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_funnel.py#L1002"}}),Tr=new oe({props:{name:"forward",anchor:"transformers.FunnelModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FunnelModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_funnel.py#L1019",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),go=new Ve({props:{$$slots:{default:[D2]},$$scope:{ctx:x}}}),_o=new Ge({props:{anchor:"transformers.FunnelModel.forward.example",$$slots:{default:[N2]},$$scope:{ctx:x}}}),wr=new Ye({}),yr=new oe({props:{name:"class transformers.FunnelForPreTraining",anchor:"transformers.FunnelForPreTraining",parameters:[{name:"config",val:": FunnelConfig"}],source:"https://github.com/huggingface/transformers/blob/v4.27.1/src/transformers/models/funnel/modeling_funnel.py#L1109"}}),br=new oe({props:{name:"forward",anchor:"transformers.FunnelForPreTraining.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FunnelForPreTraining.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_funnel.py#L1118",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) \u2014 Total loss of the ELECTRA-style objective.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Prediction scores of the head (scores for each token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput"
>transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),vo=new Ve({props:{$$slots:{default:[I2]},$$scope:{ctx:x}}}),To=new Ge({props:{anchor:"transformers.FunnelForPreTraining.forward.example",$$slots:{default:[S2]},$$scope:{ctx:x}}}),Fr=new Ye({}),$r=new oe({props:{name:"class transformers.FunnelForMaskedLM",anchor:"transformers.FunnelForMaskedLM",parameters:[{name:"config",val:": FunnelConfig"}],parametersDescription:[{anchor:"transformers.FunnelForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_funnel.py#L1192"}}),Cr=new oe({props:{name:"forward",anchor:"transformers.FunnelForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FunnelForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_funnel.py#L1210",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),yo=new Ve({props:{$$slots:{default:[B2]},$$scope:{ctx:x}}}),bo=new Ge({props:{anchor:"transformers.FunnelForMaskedLM.forward.example",$$slots:{default:[W2]},$$scope:{ctx:x}}}),jr=new Ye({}),Ar=new oe({props:{name:"class transformers.FunnelForSequenceClassification",anchor:"transformers.FunnelForSequenceClassification",parameters:[{name:"config",val:": FunnelConfig"}],parametersDescription:[{anchor:"transformers.FunnelForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_funnel.py#L1273"}}),Sr=new oe({props:{name:"forward",anchor:"transformers.FunnelForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FunnelForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_funnel.py#L1284",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$o=new Ve({props:{$$slots:{default:[Q2]},$$scope:{ctx:x}}}),Eo=new Ge({props:{anchor:"transformers.FunnelForSequenceClassification.forward.example",$$slots:{default:[U2]},$$scope:{ctx:x}}}),Mo=new Ge({props:{anchor:"transformers.FunnelForSequenceClassification.forward.example-2",$$slots:{default:[K2]},$$scope:{ctx:x}}}),Br=new Ye({}),Wr=new oe({props:{name:"class transformers.FunnelForMultipleChoice",anchor:"transformers.FunnelForMultipleChoice",parameters:[{name:"config",val:": FunnelConfig"}],parametersDescription:[{anchor:"transformers.FunnelForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_funnel.py#L1365"}}),Vr=new oe({props:{name:"forward",anchor:"transformers.FunnelForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FunnelForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_funnel.py#L1374",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),zo=new Ve({props:{$$slots:{default:[H2]},$$scope:{ctx:x}}}),Po=new Ge({props:{anchor:"transformers.FunnelForMultipleChoice.forward.example",$$slots:{default:[R2]},$$scope:{ctx:x}}}),Yr=new Ye({}),Gr=new oe({props:{name:"class transformers.FunnelForTokenClassification",anchor:"transformers.FunnelForTokenClassification",parameters:[{name:"config",val:": FunnelConfig"}],parametersDescription:[{anchor:"transformers.FunnelForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_funnel.py#L1448"}}),na=new oe({props:{name:"forward",anchor:"transformers.FunnelForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FunnelForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_funnel.py#L1460",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Co=new Ve({props:{$$slots:{default:[V2]},$$scope:{ctx:x}}}),jo=new Ge({props:{anchor:"transformers.FunnelForTokenClassification.forward.example",$$slots:{default:[Y2]},$$scope:{ctx:x}}}),oa=new Ye({}),sa=new oe({props:{name:"class transformers.FunnelForQuestionAnswering",anchor:"transformers.FunnelForQuestionAnswering",parameters:[{name:"config",val:": FunnelConfig"}],parametersDescription:[{anchor:"transformers.FunnelForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_funnel.py#L1521"}}),ca=new oe({props:{name:"forward",anchor:"transformers.FunnelForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"start_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"end_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FunnelForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.27.1/en/model_doc/bert#transformers.BertTokenizer">BertTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_funnel.py#L1532",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Oo=new Ve({props:{$$slots:{default:[G2]},$$scope:{ctx:x}}}),Lo=new Ge({props:{anchor:"transformers.FunnelForQuestionAnswering.forward.example",$$slots:{default:[Z2]},$$scope:{ctx:x}}}),ua=new Ye({}),pa=new oe({props:{name:"class transformers.TFFunnelBaseModel",anchor:"transformers.TFFunnelBaseModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFunnelBaseModel.config",description:`<strong>config</strong> (<code>XxxConfig</code>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/funnel/modeling_tf_funnel.py#L1108"}}),No=new Ve({props:{$$slots:{default:[X2]},$$scope:{ctx:x}}}),ka=new oe({props:{name:"call",anchor:"transformers.TFFunnelBaseModel.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_tf_funnel.py#L1113",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Io=new Ve({props:{$$slots:{default:[J2]},$$scope:{ctx:x}}}),So=new Ge({props:{anchor:"transformers.TFFunnelBaseModel.call.example",$$slots:{default:[e$]},$$scope:{ctx:x}}}),va=new Ye({}),Ta=new oe({props:{name:"class transformers.TFFunnelModel",anchor:"transformers.TFFunnelModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFunnelModel.config",description:`<strong>config</strong> (<code>XxxConfig</code>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/funnel/modeling_tf_funnel.py#L1156"}}),Wo=new Ve({props:{$$slots:{default:[t$]},$$scope:{ctx:x}}}),Ea=new oe({props:{name:"call",anchor:"transformers.TFFunnelModel.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_tf_funnel.py#L1161",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Qo=new Ve({props:{$$slots:{default:[n$]},$$scope:{ctx:x}}}),Uo=new Ge({props:{anchor:"transformers.TFFunnelModel.call.example",$$slots:{default:[o$]},$$scope:{ctx:x}}}),Ma=new Ye({}),qa=new oe({props:{name:"class transformers.TFFunnelForPreTraining",anchor:"transformers.TFFunnelForPreTraining",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFunnelForPreTraining.config",description:`<strong>config</strong> (<code>XxxConfig</code>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/funnel/modeling_tf_funnel.py#L1206"}}),Ho=new Ve({props:{$$slots:{default:[s$]},$$scope:{ctx:x}}}),Aa=new oe({props:{name:"call",anchor:"transformers.TFFunnelForPreTraining.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_tf_funnel.py#L1213",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Prediction scores of the head (scores for each token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/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>
`}}),Ro=new Ve({props:{$$slots:{default:[r$]},$$scope:{ctx:x}}}),Vo=new Ge({props:{anchor:"transformers.TFFunnelForPreTraining.call.example",$$slots:{default:[a$]},$$scope:{ctx:x}}}),Oa=new Ye({}),La=new oe({props:{name:"class transformers.TFFunnelForMaskedLM",anchor:"transformers.TFFunnelForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFunnelForMaskedLM.config",description:`<strong>config</strong> (<code>XxxConfig</code>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/funnel/modeling_tf_funnel.py#L1274"}}),Go=new Ve({props:{$$slots:{default:[i$]},$$scope:{ctx:x}}}),Qa=new oe({props:{name:"call",anchor:"transformers.TFFunnelForMaskedLM.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_tf_funnel.py#L1288",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Zo=new Ve({props:{$$slots:{default:[l$]},$$scope:{ctx:x}}}),Xo=new Ge({props:{anchor:"transformers.TFFunnelForMaskedLM.call.example",$$slots:{default:[d$]},$$scope:{ctx:x}}}),Jo=new Ge({props:{anchor:"transformers.TFFunnelForMaskedLM.call.example-2",$$slots:{default:[c$]},$$scope:{ctx:x}}}),Ua=new Ye({}),Ka=new oe({props:{name:"class transformers.TFFunnelForSequenceClassification",anchor:"transformers.TFFunnelForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFunnelForSequenceClassification.config",description:`<strong>config</strong> (<code>XxxConfig</code>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/funnel/modeling_tf_funnel.py#L1352"}}),ts=new Ve({props:{$$slots:{default:[u$]},$$scope:{ctx:x}}}),Za=new oe({props:{name:"call",anchor:"transformers.TFFunnelForSequenceClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_tf_funnel.py#L1360",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ns=new Ve({props:{$$slots:{default:[p$]},$$scope:{ctx:x}}}),os=new Ge({props:{anchor:"transformers.TFFunnelForSequenceClassification.call.example",$$slots:{default:[h$]},$$scope:{ctx:x}}}),ss=new Ge({props:{anchor:"transformers.TFFunnelForSequenceClassification.call.example-2",$$slots:{default:[f$]},$$scope:{ctx:x}}}),Xa=new Ye({}),Ja=new oe({props:{name:"class transformers.TFFunnelForMultipleChoice",anchor:"transformers.TFFunnelForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFunnelForMultipleChoice.config",description:`<strong>config</strong> (<code>XxxConfig</code>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/funnel/modeling_tf_funnel.py#L1427"}}),as=new Ve({props:{$$slots:{default:[m$]},$$scope:{ctx:x}}}),ri=new oe({props:{name:"call",anchor:"transformers.TFFunnelForMultipleChoice.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_tf_funnel.py#L1444",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),is=new Ve({props:{$$slots:{default:[g$]},$$scope:{ctx:x}}}),ls=new Ge({props:{anchor:"transformers.TFFunnelForMultipleChoice.call.example",$$slots:{default:[_$]},$$scope:{ctx:x}}}),ai=new Ye({}),ii=new oe({props:{name:"class transformers.TFFunnelForTokenClassification",anchor:"transformers.TFFunnelForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFunnelForTokenClassification.config",description:`<strong>config</strong> (<code>XxxConfig</code>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/funnel/modeling_tf_funnel.py#L1542"}}),cs=new Ve({props:{$$slots:{default:[k$]},$$scope:{ctx:x}}}),hi=new oe({props:{name:"call",anchor:"transformers.TFFunnelForTokenClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_tf_funnel.py#L1553",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),us=new Ve({props:{$$slots:{default:[v$]},$$scope:{ctx:x}}}),ps=new Ge({props:{anchor:"transformers.TFFunnelForTokenClassification.call.example",$$slots:{default:[T$]},$$scope:{ctx:x}}}),hs=new Ge({props:{anchor:"transformers.TFFunnelForTokenClassification.call.example-2",$$slots:{default:[w$]},$$scope:{ctx:x}}}),fi=new Ye({}),mi=new oe({props:{name:"class transformers.TFFunnelForQuestionAnswering",anchor:"transformers.TFFunnelForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFFunnelForQuestionAnswering.config",description:`<strong>config</strong> (<code>XxxConfig</code>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/funnel/modeling_tf_funnel.py#L1619"}}),ms=new Ve({props:{$$slots:{default:[y$]},$$scope:{ctx:x}}}),wi=new oe({props:{name:"call",anchor:"transformers.TFFunnelForQuestionAnswering.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"start_positions",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"end_positions",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.27.1/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.27.1/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.27.1/src/transformers/models/funnel/modeling_tf_funnel.py#L1629",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/en/model_doc/funnel#transformers.FunnelConfig"
>FunnelConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.27.1/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),gs=new Ve({props:{$$slots:{default:[b$]},$$scope:{ctx:x}}}),_s=new Ge({props:{anchor:"transformers.TFFunnelForQuestionAnswering.call.example",$$slots:{default:[F$]},$$scope:{ctx:x}}}),ks=new Ge({props:{anchor:"transformers.TFFunnelForQuestionAnswering.call.example-2",$$slots:{default:[$$]},$$scope:{ctx:x}}}),{c(){d=s("meta"),v=c(),h=s("h1"),m=s("a"),T=s("span"),y(l.$$.fragment),p=c(),P=s("span"),Te=n("Funnel Transformer"),ge=c(),S=s("div"),ce=s("a"),J=s("img"),we=c(),W=s("a"),ue=s("img"),H=c(),ae=s("h2"),ie=s("a"),Q=s("span"),y(le.$$.fragment),ye=c(),U=s("span"),be=n("Overview"),_e=c(),B=s("p"),Fe=n("The Funnel Transformer model was proposed in the paper "),de=s("a"),ne=n(`Funnel-Transformer: Filtering out Sequential Redundancy for
Efficient Language Processing`),C=n(`. It is a bidirectional transformer model, like
BERT, but with a pooling operation after each block of layers, a bit like in traditional convolutional neural networks
(CNN) in computer vision.`),A=c(),pe=s("p"),V=n("The abstract from the paper is the following:"),ke=c(),he=s("p"),K=s("em"),$e=n(`With the success of language pretraining, it is highly desirable to develop more efficient architectures of good
scalability that can exploit the abundant unlabeled data at a lower cost. To improve the efficiency, we examine the
much-overlooked redundancy in maintaining a full-length token-level presentation, especially for tasks that only
require a single-vector presentation of the sequence. With this intuition, we propose Funnel-Transformer which
gradually compresses the sequence of hidden states to a shorter one and hence reduces the computation cost. More
importantly, by re-investing the saved FLOPs from length reduction in constructing a deeper or wider model, we further
improve the model capacity. In addition, to perform token-level predictions as required by common pretraining
objectives, Funnel-Transformer is able to recover a deep representation for each token from the reduced hidden sequence
via a decoder. Empirically, with comparable or fewer FLOPs, Funnel-Transformer outperforms the standard Transformer on
a wide variety of sequence-level prediction tasks, including text classification, language understanding, and reading
comprehension.`),ve=c(),j=s("p"),Ee=n("Tips:"),R=c(),se=s("ul"),fe=s("li"),Y=n(`Since Funnel Transformer uses pooling, the sequence length of the hidden states changes after each block of layers. This way, their length is divided by 2, which speeds up the computation of the next hidden states.
The base model therefore has a final sequence length that is a quarter of the original one. This model can be used
directly for tasks that just require a sentence summary (like sequence classification or multiple choice). For other
tasks, the full model is used; this full model has a decoder that upsamples the final hidden states to the same
sequence length as the input.`),Me=c(),me=s("li"),I=n("For tasks such as classification, this is not a problem, but for tasks like masked language modeling or token classification, we need a hidden state with the same sequence length as the original input. In those cases, the final hidden states are upsampled to the input sequence length and go through two additional layers. That\u2019s why there are two versions of each checkpoint. The version suffixed with \u201C-base\u201D contains only the three blocks, while the version without that suffix contains the three blocks and the upsampling head with its additional layers."),qe=c(),D=s("li"),ze=n(`The Funnel Transformer checkpoints are all available with a full version and a base version. The first ones should be
used for `),ee=s("a"),O=n("FunnelModel"),Pe=n(", "),L=s("a"),xe=n("FunnelForPreTraining"),Ce=n(`,
`),g=s("a"),q=n("FunnelForMaskedLM"),De=n(", "),te=s("a"),Ne=n("FunnelForTokenClassification"),Ie=n(` and
`),z=s("a"),Se=n("FunnelForQuestionAnswering"),Be=n(`. The second ones should be used for
`),Ae=s("a"),We=n("FunnelBaseModel"),Qe=n(", "),N=s("a"),G=n("FunnelForSequenceClassification"),Ue=n(` and
`),Oe=s("a"),Z=n("FunnelForMultipleChoice"),Ke=n("."),Le=c(),re=s("p"),He=n("This model was contributed by "),X=s("a"),Re=n("sgugger"),Ch=n(". The original code can be found "),js=s("a"),jh=n("here"),Ah=n("."),_u=c(),cn=s("h2"),oo=s("a"),Hl=s("span"),y(As.$$.fragment),Oh=c(),Rl=s("span"),Lh=n("Documentation resources"),ku=c(),_t=s("ul"),Vl=s("li"),Mi=s("a"),Dh=n("Text classification task guide"),Nh=c(),Yl=s("li"),qi=s("a"),Ih=n("Token classification task guide"),Sh=c(),Gl=s("li"),zi=s("a"),Bh=n("Question answering task guide"),Wh=c(),Zl=s("li"),Pi=s("a"),Qh=n("Masked language modeling task guide"),Uh=c(),Xl=s("li"),xi=s("a"),Kh=n("Multiple choice task guide"),vu=c(),un=s("h2"),so=s("a"),Jl=s("span"),y(Os.$$.fragment),Hh=c(),ed=s("span"),Rh=n("FunnelConfig"),Tu=c(),Jt=s("div"),y(Ls.$$.fragment),Vh=c(),en=s("p"),Yh=n("This is the configuration class to store the configuration of a "),Ci=s("a"),Gh=n("FunnelModel"),Zh=n(" or a "),ji=s("a"),Xh=n("TFBertModel"),Jh=n(`. It is used to
instantiate a Funnel Transformer model according to the specified arguments, defining the model architecture.
Instantiating a configuration with the defaults will yield a similar configuration to that of the Funnel
Transformer `),Ds=s("a"),ef=n("funnel-transformer/small"),tf=n(" architecture."),nf=c(),pn=s("p"),of=n("Configuration objects inherit from "),Ai=s("a"),sf=n("PretrainedConfig"),rf=n(` and can be used to control the model outputs. Read the
documentation from `),Oi=s("a"),af=n("PretrainedConfig"),lf=n(" for more information."),wu=c(),hn=s("h2"),ro=s("a"),td=s("span"),y(Ns.$$.fragment),df=c(),nd=s("span"),cf=n("FunnelTokenizer"),yu=c(),et=s("div"),y(Is.$$.fragment),uf=c(),od=s("p"),pf=n("Construct a Funnel Transformer tokenizer. Based on WordPiece."),hf=c(),Ss=s("p"),ff=n("This tokenizer inherits from "),Li=s("a"),mf=n("PreTrainedTokenizer"),gf=n(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),_f=c(),tn=s("div"),y(Bs.$$.fragment),kf=c(),sd=s("p"),vf=n(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A BERT sequence has the following format:`),Tf=c(),Ws=s("ul"),Di=s("li"),wf=n("single sequence: "),rd=s("code"),yf=n("[CLS] X [SEP]"),bf=c(),Ni=s("li"),Ff=n("pair of sequences: "),ad=s("code"),$f=n("[CLS] A [SEP] B [SEP]"),Ef=c(),ao=s("div"),y(Qs.$$.fragment),Mf=c(),Us=s("p"),qf=n(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),id=s("code"),zf=n("prepare_for_model"),Pf=n(" method."),xf=c(),jt=s("div"),y(Ks.$$.fragment),Cf=c(),ld=s("p"),jf=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Funnel"),Af=c(),y(io.$$.fragment),Of=c(),fn=s("p"),Lf=n("If "),dd=s("code"),Df=n("token_ids_1"),Nf=n(" is "),cd=s("code"),If=n("None"),Sf=n(", this method only returns the first portion of the mask (0s)."),Bf=c(),Ii=s("div"),y(Hs.$$.fragment),bu=c(),mn=s("h2"),lo=s("a"),ud=s("span"),y(Rs.$$.fragment),Wf=c(),pd=s("span"),Qf=n("FunnelTokenizerFast"),Fu=c(),gt=s("div"),y(Vs.$$.fragment),Uf=c(),Ys=s("p"),Kf=n("Construct a \u201Cfast\u201D Funnel Transformer tokenizer (backed by HuggingFace\u2019s "),hd=s("em"),Hf=n("tokenizers"),Rf=n(" library). Based on WordPiece."),Vf=c(),Gs=s("p"),Yf=n("This tokenizer inherits from "),Si=s("a"),Gf=n("PreTrainedTokenizerFast"),Zf=n(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Xf=c(),nn=s("div"),y(Zs.$$.fragment),Jf=c(),fd=s("p"),em=n(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Funnel sequence has the following format:`),tm=c(),Xs=s("ul"),Bi=s("li"),nm=n("single sequence: "),md=s("code"),om=n("[CLS] X [SEP]"),sm=c(),Wi=s("li"),rm=n("pair of sequences: "),gd=s("code"),am=n("[CLS] A [SEP] B [SEP]"),im=c(),At=s("div"),y(Js.$$.fragment),lm=c(),_d=s("p"),dm=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Funnel"),cm=c(),y(co.$$.fragment),um=c(),gn=s("p"),pm=n("If "),kd=s("code"),hm=n("token_ids_1"),fm=n(" is "),vd=s("code"),mm=n("None"),gm=n(", this method only returns the first portion of the mask (0s)."),$u=c(),_n=s("h2"),uo=s("a"),Td=s("span"),y(er.$$.fragment),_m=c(),wd=s("span"),km=n("Funnel specific outputs"),Eu=c(),kn=s("div"),y(tr.$$.fragment),vm=c(),nr=s("p"),Tm=n("Output type of "),Qi=s("a"),wm=n("FunnelForPreTraining"),ym=n("."),Mu=c(),vn=s("div"),y(or.$$.fragment),bm=c(),sr=s("p"),Fm=n("Output type of "),Ui=s("a"),$m=n("FunnelForPreTraining"),Em=n("."),qu=c(),Tn=s("h2"),po=s("a"),yd=s("span"),y(rr.$$.fragment),Mm=c(),bd=s("span"),qm=n("FunnelBaseModel"),zu=c(),dt=s("div"),y(ar.$$.fragment),zm=c(),Fd=s("p"),Pm=n(`The base Funnel Transformer Model transformer outputting raw hidden-states without upsampling head (also called
decoder) or any task-specific head on top.`),xm=c(),ir=s("p"),Cm=n("The Funnel Transformer model was proposed in "),lr=s("a"),jm=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),Am=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Om=c(),dr=s("p"),Lm=n("This model inherits from "),Ki=s("a"),Dm=n("PreTrainedModel"),Nm=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Im=c(),cr=s("p"),Sm=n("This model is also a PyTorch "),ur=s("a"),Bm=n("torch.nn.Module"),Wm=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Qm=c(),Ot=s("div"),y(pr.$$.fragment),Um=c(),wn=s("p"),Km=n("The "),Hi=s("a"),Hm=n("FunnelBaseModel"),Rm=n(" forward method, overrides the "),$d=s("code"),Vm=n("__call__"),Ym=n(" special method."),Gm=c(),y(ho.$$.fragment),Zm=c(),y(fo.$$.fragment),Pu=c(),yn=s("h2"),mo=s("a"),Ed=s("span"),y(hr.$$.fragment),Xm=c(),Md=s("span"),Jm=n("FunnelModel"),xu=c(),ct=s("div"),y(fr.$$.fragment),eg=c(),qd=s("p"),tg=n("The bare Funnel Transformer Model transformer outputting raw hidden-states without any specific head on top."),ng=c(),mr=s("p"),og=n("The Funnel Transformer model was proposed in "),gr=s("a"),sg=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),rg=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),ag=c(),_r=s("p"),ig=n("This model inherits from "),Ri=s("a"),lg=n("PreTrainedModel"),dg=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),cg=c(),kr=s("p"),ug=n("This model is also a PyTorch "),vr=s("a"),pg=n("torch.nn.Module"),hg=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),fg=c(),Lt=s("div"),y(Tr.$$.fragment),mg=c(),bn=s("p"),gg=n("The "),Vi=s("a"),_g=n("FunnelModel"),kg=n(" forward method, overrides the "),zd=s("code"),vg=n("__call__"),Tg=n(" special method."),wg=c(),y(go.$$.fragment),yg=c(),y(_o.$$.fragment),Cu=c(),Fn=s("h2"),ko=s("a"),Pd=s("span"),y(wr.$$.fragment),bg=c(),xd=s("span"),Fg=n("FunnelModelForPreTraining"),ju=c(),$n=s("div"),y(yr.$$.fragment),$g=c(),Dt=s("div"),y(br.$$.fragment),Eg=c(),En=s("p"),Mg=n("The "),Yi=s("a"),qg=n("FunnelForPreTraining"),zg=n(" forward method, overrides the "),Cd=s("code"),Pg=n("__call__"),xg=n(" special method."),Cg=c(),y(vo.$$.fragment),jg=c(),y(To.$$.fragment),Au=c(),Mn=s("h2"),wo=s("a"),jd=s("span"),y(Fr.$$.fragment),Ag=c(),Ad=s("span"),Og=n("FunnelForMaskedLM"),Ou=c(),ut=s("div"),y($r.$$.fragment),Lg=c(),Er=s("p"),Dg=n("Funnel Transformer Model with a "),Od=s("code"),Ng=n("language modeling"),Ig=n(" head on top."),Sg=c(),Mr=s("p"),Bg=n("The Funnel Transformer model was proposed in "),qr=s("a"),Wg=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),Qg=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Ug=c(),zr=s("p"),Kg=n("This model inherits from "),Gi=s("a"),Hg=n("PreTrainedModel"),Rg=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Vg=c(),Pr=s("p"),Yg=n("This model is also a PyTorch "),xr=s("a"),Gg=n("torch.nn.Module"),Zg=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Xg=c(),Nt=s("div"),y(Cr.$$.fragment),Jg=c(),qn=s("p"),e_=n("The "),Zi=s("a"),t_=n("FunnelForMaskedLM"),n_=n(" forward method, overrides the "),Ld=s("code"),o_=n("__call__"),s_=n(" special method."),r_=c(),y(yo.$$.fragment),a_=c(),y(bo.$$.fragment),Lu=c(),zn=s("h2"),Fo=s("a"),Dd=s("span"),y(jr.$$.fragment),i_=c(),Nd=s("span"),l_=n("FunnelForSequenceClassification"),Du=c(),pt=s("div"),y(Ar.$$.fragment),d_=c(),Id=s("p"),c_=n(`Funnel Transformer Model with a sequence classification/regression head on top (two linear layer on top of the
first timestep of the last hidden state) e.g. for GLUE tasks.`),u_=c(),Or=s("p"),p_=n("The Funnel Transformer model was proposed in "),Lr=s("a"),h_=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),f_=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),m_=c(),Dr=s("p"),g_=n("This model inherits from "),Xi=s("a"),__=n("PreTrainedModel"),k_=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),v_=c(),Nr=s("p"),T_=n("This model is also a PyTorch "),Ir=s("a"),w_=n("torch.nn.Module"),y_=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),b_=c(),kt=s("div"),y(Sr.$$.fragment),F_=c(),Pn=s("p"),$_=n("The "),Ji=s("a"),E_=n("FunnelForSequenceClassification"),M_=n(" forward method, overrides the "),Sd=s("code"),q_=n("__call__"),z_=n(" special method."),P_=c(),y($o.$$.fragment),x_=c(),y(Eo.$$.fragment),C_=c(),y(Mo.$$.fragment),Nu=c(),xn=s("h2"),qo=s("a"),Bd=s("span"),y(Br.$$.fragment),j_=c(),Wd=s("span"),A_=n("FunnelForMultipleChoice"),Iu=c(),ht=s("div"),y(Wr.$$.fragment),O_=c(),Qd=s("p"),L_=n(`Funnel Transformer Model with a multiple choice classification head on top (two linear layer on top of the first
timestep of the last hidden state, and a softmax) e.g. for RocStories/SWAG tasks.`),D_=c(),Qr=s("p"),N_=n("The Funnel Transformer model was proposed in "),Ur=s("a"),I_=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),S_=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),B_=c(),Kr=s("p"),W_=n("This model inherits from "),el=s("a"),Q_=n("PreTrainedModel"),U_=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),K_=c(),Hr=s("p"),H_=n("This model is also a PyTorch "),Rr=s("a"),R_=n("torch.nn.Module"),V_=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Y_=c(),It=s("div"),y(Vr.$$.fragment),G_=c(),Cn=s("p"),Z_=n("The "),tl=s("a"),X_=n("FunnelForMultipleChoice"),J_=n(" forward method, overrides the "),Ud=s("code"),ek=n("__call__"),tk=n(" special method."),nk=c(),y(zo.$$.fragment),ok=c(),y(Po.$$.fragment),Su=c(),jn=s("h2"),xo=s("a"),Kd=s("span"),y(Yr.$$.fragment),sk=c(),Hd=s("span"),rk=n("FunnelForTokenClassification"),Bu=c(),ft=s("div"),y(Gr.$$.fragment),ak=c(),Rd=s("p"),ik=n(`Funnel Transformer Model with a token classification head on top (a linear layer on top of the hidden-states
output) e.g. for Named-Entity-Recognition (NER) tasks.`),lk=c(),Zr=s("p"),dk=n("The Funnel Transformer model was proposed in "),Xr=s("a"),ck=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),uk=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),pk=c(),Jr=s("p"),hk=n("This model inherits from "),nl=s("a"),fk=n("PreTrainedModel"),mk=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),gk=c(),ea=s("p"),_k=n("This model is also a PyTorch "),ta=s("a"),kk=n("torch.nn.Module"),vk=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Tk=c(),St=s("div"),y(na.$$.fragment),wk=c(),An=s("p"),yk=n("The "),ol=s("a"),bk=n("FunnelForTokenClassification"),Fk=n(" forward method, overrides the "),Vd=s("code"),$k=n("__call__"),Ek=n(" special method."),Mk=c(),y(Co.$$.fragment),qk=c(),y(jo.$$.fragment),Wu=c(),On=s("h2"),Ao=s("a"),Yd=s("span"),y(oa.$$.fragment),zk=c(),Gd=s("span"),Pk=n("FunnelForQuestionAnswering"),Qu=c(),mt=s("div"),y(sa.$$.fragment),xk=c(),Ln=s("p"),Ck=n(`Funnel Transformer Model with a span classification head on top for extractive question-answering tasks like SQuAD
(a linear layer on top of the hidden-states output to compute `),Zd=s("code"),jk=n("span start logits"),Ak=n(" and "),Xd=s("code"),Ok=n("span end logits"),Lk=n(")."),Dk=c(),ra=s("p"),Nk=n("The Funnel Transformer model was proposed in "),aa=s("a"),Ik=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),Sk=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Bk=c(),ia=s("p"),Wk=n("This model inherits from "),sl=s("a"),Qk=n("PreTrainedModel"),Uk=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Kk=c(),la=s("p"),Hk=n("This model is also a PyTorch "),da=s("a"),Rk=n("torch.nn.Module"),Vk=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Yk=c(),Bt=s("div"),y(ca.$$.fragment),Gk=c(),Dn=s("p"),Zk=n("The "),rl=s("a"),Xk=n("FunnelForQuestionAnswering"),Jk=n(" forward method, overrides the "),Jd=s("code"),ev=n("__call__"),tv=n(" special method."),nv=c(),y(Oo.$$.fragment),ov=c(),y(Lo.$$.fragment),Uu=c(),Nn=s("h2"),Do=s("a"),ec=s("span"),y(ua.$$.fragment),sv=c(),tc=s("span"),rv=n("TFFunnelBaseModel"),Ku=c(),tt=s("div"),y(pa.$$.fragment),av=c(),nc=s("p"),iv=n(`The base Funnel Transformer Model transformer outputting raw hidden-states without upsampling head (also called
decoder) or any task-specific head on top.`),lv=c(),ha=s("p"),dv=n("The Funnel Transformer model was proposed in "),fa=s("a"),cv=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),uv=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),pv=c(),ma=s("p"),hv=n("This model inherits from "),al=s("a"),fv=n("TFPreTrainedModel"),mv=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),gv=c(),ga=s("p"),_v=n("This model is also a "),_a=s("a"),kv=n("tf.keras.Model"),vv=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Tv=c(),y(No.$$.fragment),wv=c(),Wt=s("div"),y(ka.$$.fragment),yv=c(),In=s("p"),bv=n("The "),il=s("a"),Fv=n("TFFunnelBaseModel"),$v=n(" forward method, overrides the "),oc=s("code"),Ev=n("__call__"),Mv=n(" special method."),qv=c(),y(Io.$$.fragment),zv=c(),y(So.$$.fragment),Hu=c(),Sn=s("h2"),Bo=s("a"),sc=s("span"),y(va.$$.fragment),Pv=c(),rc=s("span"),xv=n("TFFunnelModel"),Ru=c(),nt=s("div"),y(Ta.$$.fragment),Cv=c(),ac=s("p"),jv=n("The bare Funnel Transformer Model transformer outputting raw hidden-states without any specific head on top."),Av=c(),wa=s("p"),Ov=n("The Funnel Transformer model was proposed in "),ya=s("a"),Lv=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),Dv=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Nv=c(),ba=s("p"),Iv=n("This model inherits from "),ll=s("a"),Sv=n("TFPreTrainedModel"),Bv=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Wv=c(),Fa=s("p"),Qv=n("This model is also a "),$a=s("a"),Uv=n("tf.keras.Model"),Kv=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Hv=c(),y(Wo.$$.fragment),Rv=c(),Qt=s("div"),y(Ea.$$.fragment),Vv=c(),Bn=s("p"),Yv=n("The "),dl=s("a"),Gv=n("TFFunnelModel"),Zv=n(" forward method, overrides the "),ic=s("code"),Xv=n("__call__"),Jv=n(" special method."),eT=c(),y(Qo.$$.fragment),tT=c(),y(Uo.$$.fragment),Vu=c(),Wn=s("h2"),Ko=s("a"),lc=s("span"),y(Ma.$$.fragment),nT=c(),dc=s("span"),oT=n("TFFunnelModelForPreTraining"),Yu=c(),ot=s("div"),y(qa.$$.fragment),sT=c(),cc=s("p"),rT=n("Funnel model with a binary classification head on top as used during pretraining for identifying generated tokens."),aT=c(),za=s("p"),iT=n("The Funnel Transformer model was proposed in "),Pa=s("a"),lT=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),dT=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),cT=c(),xa=s("p"),uT=n("This model inherits from "),cl=s("a"),pT=n("TFPreTrainedModel"),hT=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),fT=c(),Ca=s("p"),mT=n("This model is also a "),ja=s("a"),gT=n("tf.keras.Model"),_T=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),kT=c(),y(Ho.$$.fragment),vT=c(),Ut=s("div"),y(Aa.$$.fragment),TT=c(),Qn=s("p"),wT=n("The "),ul=s("a"),yT=n("TFFunnelForPreTraining"),bT=n(" forward method, overrides the "),uc=s("code"),FT=n("__call__"),$T=n(" special method."),ET=c(),y(Ro.$$.fragment),MT=c(),y(Vo.$$.fragment),Gu=c(),Un=s("h2"),Yo=s("a"),pc=s("span"),y(Oa.$$.fragment),qT=c(),hc=s("span"),zT=n("TFFunnelForMaskedLM"),Zu=c(),st=s("div"),y(La.$$.fragment),PT=c(),Da=s("p"),xT=n("Funnel Model with a "),fc=s("code"),CT=n("language modeling"),jT=n(" head on top."),AT=c(),Na=s("p"),OT=n("The Funnel Transformer model was proposed in "),Ia=s("a"),LT=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),DT=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),NT=c(),Sa=s("p"),IT=n("This model inherits from "),pl=s("a"),ST=n("TFPreTrainedModel"),BT=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),WT=c(),Ba=s("p"),QT=n("This model is also a "),Wa=s("a"),UT=n("tf.keras.Model"),KT=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),HT=c(),y(Go.$$.fragment),RT=c(),vt=s("div"),y(Qa.$$.fragment),VT=c(),Kn=s("p"),YT=n("The "),hl=s("a"),GT=n("TFFunnelForMaskedLM"),ZT=n(" forward method, overrides the "),mc=s("code"),XT=n("__call__"),JT=n(" special method."),ew=c(),y(Zo.$$.fragment),tw=c(),y(Xo.$$.fragment),nw=c(),y(Jo.$$.fragment),Xu=c(),Hn=s("h2"),es=s("a"),gc=s("span"),y(Ua.$$.fragment),ow=c(),_c=s("span"),sw=n("TFFunnelForSequenceClassification"),Ju=c(),rt=s("div"),y(Ka.$$.fragment),rw=c(),kc=s("p"),aw=n(`Funnel Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),iw=c(),Ha=s("p"),lw=n("The Funnel Transformer model was proposed in "),Ra=s("a"),dw=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),cw=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),uw=c(),Va=s("p"),pw=n("This model inherits from "),fl=s("a"),hw=n("TFPreTrainedModel"),fw=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),mw=c(),Ya=s("p"),gw=n("This model is also a "),Ga=s("a"),_w=n("tf.keras.Model"),kw=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),vw=c(),y(ts.$$.fragment),Tw=c(),Tt=s("div"),y(Za.$$.fragment),ww=c(),Rn=s("p"),yw=n("The "),ml=s("a"),bw=n("TFFunnelForSequenceClassification"),Fw=n(" forward method, overrides the "),vc=s("code"),$w=n("__call__"),Ew=n(" special method."),Mw=c(),y(ns.$$.fragment),qw=c(),y(os.$$.fragment),zw=c(),y(ss.$$.fragment),ep=c(),Vn=s("h2"),rs=s("a"),Tc=s("span"),y(Xa.$$.fragment),Pw=c(),wc=s("span"),xw=n("TFFunnelForMultipleChoice"),tp=c(),at=s("div"),y(Ja.$$.fragment),Cw=c(),yc=s("p"),jw=n(`Funnel Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),Aw=c(),ei=s("p"),Ow=n("The Funnel Transformer model was proposed in "),ti=s("a"),Lw=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),Dw=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Nw=c(),ni=s("p"),Iw=n("This model inherits from "),gl=s("a"),Sw=n("TFPreTrainedModel"),Bw=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ww=c(),oi=s("p"),Qw=n("This model is also a "),si=s("a"),Uw=n("tf.keras.Model"),Kw=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Hw=c(),y(as.$$.fragment),Rw=c(),Kt=s("div"),y(ri.$$.fragment),Vw=c(),Yn=s("p"),Yw=n("The "),_l=s("a"),Gw=n("TFFunnelForMultipleChoice"),Zw=n(" forward method, overrides the "),bc=s("code"),Xw=n("__call__"),Jw=n(" special method."),ey=c(),y(is.$$.fragment),ty=c(),y(ls.$$.fragment),np=c(),Gn=s("h2"),ds=s("a"),Fc=s("span"),y(ai.$$.fragment),ny=c(),$c=s("span"),oy=n("TFFunnelForTokenClassification"),op=c(),it=s("div"),y(ii.$$.fragment),sy=c(),Ec=s("p"),ry=n(`Funnel Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),ay=c(),li=s("p"),iy=n("The Funnel Transformer model was proposed in "),di=s("a"),ly=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),dy=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),cy=c(),ci=s("p"),uy=n("This model inherits from "),kl=s("a"),py=n("TFPreTrainedModel"),hy=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),fy=c(),ui=s("p"),my=n("This model is also a "),pi=s("a"),gy=n("tf.keras.Model"),_y=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),ky=c(),y(cs.$$.fragment),vy=c(),wt=s("div"),y(hi.$$.fragment),Ty=c(),Zn=s("p"),wy=n("The "),vl=s("a"),yy=n("TFFunnelForTokenClassification"),by=n(" forward method, overrides the "),Mc=s("code"),Fy=n("__call__"),$y=n(" special method."),Ey=c(),y(us.$$.fragment),My=c(),y(ps.$$.fragment),qy=c(),y(hs.$$.fragment),sp=c(),Xn=s("h2"),fs=s("a"),qc=s("span"),y(fi.$$.fragment),zy=c(),zc=s("span"),Py=n("TFFunnelForQuestionAnswering"),rp=c(),lt=s("div"),y(mi.$$.fragment),xy=c(),Jn=s("p"),Cy=n(`Funnel Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Pc=s("code"),jy=n("span start logits"),Ay=n(" and "),xc=s("code"),Oy=n("span end logits"),Ly=n(")."),Dy=c(),gi=s("p"),Ny=n("The Funnel Transformer model was proposed in "),_i=s("a"),Iy=n(`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),Sy=n(" by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),By=c(),ki=s("p"),Wy=n("This model inherits from "),Tl=s("a"),Qy=n("TFPreTrainedModel"),Uy=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ky=c(),vi=s("p"),Hy=n("This model is also a "),Ti=s("a"),Ry=n("tf.keras.Model"),Vy=n(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Yy=c(),y(ms.$$.fragment),Gy=c(),yt=s("div"),y(wi.$$.fragment),Zy=c(),eo=s("p"),Xy=n("The "),wl=s("a"),Jy=n("TFFunnelForQuestionAnswering"),eb=n(" forward method, overrides the "),Cc=s("code"),tb=n("__call__"),nb=n(" special method."),ob=c(),y(gs.$$.fragment),sb=c(),y(_s.$$.fragment),rb=c(),y(ks.$$.fragment),this.h()},l(i){const k=x2('[data-svelte="svelte-1phssyn"]',document.head);d=r(k,"META",{name:!0,content:!0}),k.forEach(t),v=u(i),h=r(i,"H1",{class:!0});var yi=a(h);m=r(yi,"A",{id:!0,class:!0,href:!0});var jc=a(m);T=r(jc,"SPAN",{});var Ac=a(T);b(l.$$.fragment,Ac),Ac.forEach(t),jc.forEach(t),p=u(yi),P=r(yi,"SPAN",{});var Oc=a(P);Te=o(Oc,"Funnel Transformer"),Oc.forEach(t),yi.forEach(t),ge=u(i),S=r(i,"DIV",{class:!0});var bi=a(S);ce=r(bi,"A",{href:!0});var Lc=a(ce);J=r(Lc,"IMG",{alt:!0,src:!0}),Lc.forEach(t),we=u(bi),W=r(bi,"A",{href:!0});var Dc=a(W);ue=r(Dc,"IMG",{alt:!0,src:!0}),Dc.forEach(t),bi.forEach(t),H=u(i),ae=r(i,"H2",{class:!0});var Fi=a(ae);ie=r(Fi,"A",{id:!0,class:!0,href:!0});var Nc=a(ie);Q=r(Nc,"SPAN",{});var Ic=a(Q);b(le.$$.fragment,Ic),Ic.forEach(t),Nc.forEach(t),ye=u(Fi),U=r(Fi,"SPAN",{});var Sc=a(U);be=o(Sc,"Overview"),Sc.forEach(t),Fi.forEach(t),_e=u(i),B=r(i,"P",{});var $i=a(B);Fe=o($i,"The Funnel Transformer model was proposed in the paper "),de=r($i,"A",{href:!0,rel:!0});var Bc=a(de);ne=o(Bc,`Funnel-Transformer: Filtering out Sequential Redundancy for
Efficient Language Processing`),Bc.forEach(t),C=o($i,`. 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.`),$i.forEach(t),A=u(i),pe=r(i,"P",{});var Wc=a(pe);V=o(Wc,"The abstract from the paper is the following:"),Wc.forEach(t),ke=u(i),he=r(i,"P",{});var Qc=a(he);K=r(Qc,"EM",{});var Uc=a(K);$e=o(Uc,`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.`),Uc.forEach(t),Qc.forEach(t),ve=u(i),j=r(i,"P",{});var Kc=a(j);Ee=o(Kc,"Tips:"),Kc.forEach(t),R=u(i),se=r(i,"UL",{});var to=a(se);fe=r(to,"LI",{});var Hc=a(fe);Y=o(Hc,`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.`),Hc.forEach(t),Me=u(to),me=r(to,"LI",{});var Rc=a(me);I=o(Rc,"For tasks such as classification, this is not a problem, but for tasks like masked language modeling or token classification, we need a hidden state with the same sequence length as the original input. In those cases, the final hidden states are upsampled to the input sequence length and go through two additional layers. That\u2019s why there are two versions of each checkpoint. The version suffixed with \u201C-base\u201D contains only the three blocks, while the version without that suffix contains the three blocks and the upsampling head with its additional layers."),Rc.forEach(t),qe=u(to),D=r(to,"LI",{});var Je=a(D);ze=o(Je,`The Funnel Transformer checkpoints are all available with a full version and a base version. The first ones should be
used for `),ee=r(Je,"A",{href:!0});var Vc=a(ee);O=o(Vc,"FunnelModel"),Vc.forEach(t),Pe=o(Je,", "),L=r(Je,"A",{href:!0});var Yc=a(L);xe=o(Yc,"FunnelForPreTraining"),Yc.forEach(t),Ce=o(Je,`,
`),g=r(Je,"A",{href:!0});var Gc=a(g);q=o(Gc,"FunnelForMaskedLM"),Gc.forEach(t),De=o(Je,", "),te=r(Je,"A",{href:!0});var Zc=a(te);Ne=o(Zc,"FunnelForTokenClassification"),Zc.forEach(t),Ie=o(Je,` and
`),z=r(Je,"A",{href:!0});var Xc=a(z);Se=o(Xc,"FunnelForQuestionAnswering"),Xc.forEach(t),Be=o(Je,`. The second ones should be used for
`),Ae=r(Je,"A",{href:!0});var Jc=a(Ae);We=o(Jc,"FunnelBaseModel"),Jc.forEach(t),Qe=o(Je,", "),N=r(Je,"A",{href:!0});var eu=a(N);G=o(eu,"FunnelForSequenceClassification"),eu.forEach(t),Ue=o(Je,` and
`),Oe=r(Je,"A",{href:!0});var tu=a(Oe);Z=o(tu,"FunnelForMultipleChoice"),tu.forEach(t),Ke=o(Je,"."),Je.forEach(t),to.forEach(t),Le=u(i),re=r(i,"P",{});var no=a(re);He=o(no,"This model was contributed by "),X=r(no,"A",{href:!0,rel:!0});var nu=a(X);Re=o(nu,"sgugger"),nu.forEach(t),Ch=o(no,". The original code can be found "),js=r(no,"A",{href:!0,rel:!0});var ou=a(js);jh=o(ou,"here"),ou.forEach(t),Ah=o(no,"."),no.forEach(t),_u=u(i),cn=r(i,"H2",{class:!0});var Ei=a(cn);oo=r(Ei,"A",{id:!0,class:!0,href:!0});var su=a(oo);Hl=r(su,"SPAN",{});var ru=a(Hl);b(As.$$.fragment,ru),ru.forEach(t),su.forEach(t),Oh=u(Ei),Rl=r(Ei,"SPAN",{});var au=a(Rl);Lh=o(au,"Documentation resources"),au.forEach(t),Ei.forEach(t),ku=u(i),_t=r(i,"UL",{});var Ct=a(_t);Vl=r(Ct,"LI",{});var iu=a(Vl);Mi=r(iu,"A",{href:!0});var lu=a(Mi);Dh=o(lu,"Text classification task guide"),lu.forEach(t),iu.forEach(t),Nh=u(Ct),Yl=r(Ct,"LI",{});var du=a(Yl);qi=r(du,"A",{href:!0});var cu=a(qi);Ih=o(cu,"Token classification task guide"),cu.forEach(t),du.forEach(t),Sh=u(Ct),Gl=r(Ct,"LI",{});var uu=a(Gl);zi=r(uu,"A",{href:!0});var pu=a(zi);Bh=o(pu,"Question answering task guide"),pu.forEach(t),uu.forEach(t),Wh=u(Ct),Zl=r(Ct,"LI",{});var hu=a(Zl);Pi=r(hu,"A",{href:!0});var fu=a(Pi);Qh=o(fu,"Masked language modeling task guide"),fu.forEach(t),hu.forEach(t),Uh=u(Ct),Xl=r(Ct,"LI",{});var mu=a(Xl);xi=r(mu,"A",{href:!0});var gu=a(xi);Kh=o(gu,"Multiple choice task guide"),gu.forEach(t),mu.forEach(t),Ct.forEach(t),vu=u(i),un=r(i,"H2",{class:!0});var ip=a(un);so=r(ip,"A",{id:!0,class:!0,href:!0});var cb=a(so);Jl=r(cb,"SPAN",{});var ub=a(Jl);b(Os.$$.fragment,ub),ub.forEach(t),cb.forEach(t),Hh=u(ip),ed=r(ip,"SPAN",{});var pb=a(ed);Rh=o(pb,"FunnelConfig"),pb.forEach(t),ip.forEach(t),Tu=u(i),Jt=r(i,"DIV",{class:!0});var yl=a(Jt);b(Ls.$$.fragment,yl),Vh=u(yl),en=r(yl,"P",{});var vs=a(en);Yh=o(vs,"This is the configuration class to store the configuration of a "),Ci=r(vs,"A",{href:!0});var hb=a(Ci);Gh=o(hb,"FunnelModel"),hb.forEach(t),Zh=o(vs," or a "),ji=r(vs,"A",{href:!0});var fb=a(ji);Xh=o(fb,"TFBertModel"),fb.forEach(t),Jh=o(vs,`. 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 `),Ds=r(vs,"A",{href:!0,rel:!0});var mb=a(Ds);ef=o(mb,"funnel-transformer/small"),mb.forEach(t),tf=o(vs," architecture."),vs.forEach(t),nf=u(yl),pn=r(yl,"P",{});var bl=a(pn);of=o(bl,"Configuration objects inherit from "),Ai=r(bl,"A",{href:!0});var gb=a(Ai);sf=o(gb,"PretrainedConfig"),gb.forEach(t),rf=o(bl,` and can be used to control the model outputs. Read the
documentation from `),Oi=r(bl,"A",{href:!0});var _b=a(Oi);af=o(_b,"PretrainedConfig"),_b.forEach(t),lf=o(bl," for more information."),bl.forEach(t),yl.forEach(t),wu=u(i),hn=r(i,"H2",{class:!0});var lp=a(hn);ro=r(lp,"A",{id:!0,class:!0,href:!0});var kb=a(ro);td=r(kb,"SPAN",{});var vb=a(td);b(Ns.$$.fragment,vb),vb.forEach(t),kb.forEach(t),df=u(lp),nd=r(lp,"SPAN",{});var Tb=a(nd);cf=o(Tb,"FunnelTokenizer"),Tb.forEach(t),lp.forEach(t),yu=u(i),et=r(i,"DIV",{class:!0});var bt=a(et);b(Is.$$.fragment,bt),uf=u(bt),od=r(bt,"P",{});var wb=a(od);pf=o(wb,"Construct a Funnel Transformer tokenizer. Based on WordPiece."),wb.forEach(t),hf=u(bt),Ss=r(bt,"P",{});var dp=a(Ss);ff=o(dp,"This tokenizer inherits from "),Li=r(dp,"A",{href:!0});var yb=a(Li);mf=o(yb,"PreTrainedTokenizer"),yb.forEach(t),gf=o(dp,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),dp.forEach(t),_f=u(bt),tn=r(bt,"DIV",{class:!0});var Fl=a(tn);b(Bs.$$.fragment,Fl),kf=u(Fl),sd=r(Fl,"P",{});var bb=a(sd);vf=o(bb,`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:`),bb.forEach(t),Tf=u(Fl),Ws=r(Fl,"UL",{});var cp=a(Ws);Di=r(cp,"LI",{});var ab=a(Di);wf=o(ab,"single sequence: "),rd=r(ab,"CODE",{});var Fb=a(rd);yf=o(Fb,"[CLS] X [SEP]"),Fb.forEach(t),ab.forEach(t),bf=u(cp),Ni=r(cp,"LI",{});var ib=a(Ni);Ff=o(ib,"pair of sequences: "),ad=r(ib,"CODE",{});var $b=a(ad);$f=o($b,"[CLS] A [SEP] B [SEP]"),$b.forEach(t),ib.forEach(t),cp.forEach(t),Fl.forEach(t),Ef=u(bt),ao=r(bt,"DIV",{class:!0});var up=a(ao);b(Qs.$$.fragment,up),Mf=u(up),Us=r(up,"P",{});var pp=a(Us);qf=o(pp,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),id=r(pp,"CODE",{});var Eb=a(id);zf=o(Eb,"prepare_for_model"),Eb.forEach(t),Pf=o(pp," method."),pp.forEach(t),up.forEach(t),xf=u(bt),jt=r(bt,"DIV",{class:!0});var Ts=a(jt);b(Ks.$$.fragment,Ts),Cf=u(Ts),ld=r(Ts,"P",{});var Mb=a(ld);jf=o(Mb,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Funnel"),Mb.forEach(t),Af=u(Ts),b(io.$$.fragment,Ts),Of=u(Ts),fn=r(Ts,"P",{});var $l=a(fn);Lf=o($l,"If "),dd=r($l,"CODE",{});var qb=a(dd);Df=o(qb,"token_ids_1"),qb.forEach(t),Nf=o($l," is "),cd=r($l,"CODE",{});var zb=a(cd);If=o(zb,"None"),zb.forEach(t),Sf=o($l,", this method only returns the first portion of the mask (0s)."),$l.forEach(t),Ts.forEach(t),Bf=u(bt),Ii=r(bt,"DIV",{class:!0});var Pb=a(Ii);b(Hs.$$.fragment,Pb),Pb.forEach(t),bt.forEach(t),bu=u(i),mn=r(i,"H2",{class:!0});var hp=a(mn);lo=r(hp,"A",{id:!0,class:!0,href:!0});var xb=a(lo);ud=r(xb,"SPAN",{});var Cb=a(ud);b(Rs.$$.fragment,Cb),Cb.forEach(t),xb.forEach(t),Wf=u(hp),pd=r(hp,"SPAN",{});var jb=a(pd);Qf=o(jb,"FunnelTokenizerFast"),jb.forEach(t),hp.forEach(t),Fu=u(i),gt=r(i,"DIV",{class:!0});var on=a(gt);b(Vs.$$.fragment,on),Uf=u(on),Ys=r(on,"P",{});var fp=a(Ys);Kf=o(fp,"Construct a \u201Cfast\u201D Funnel Transformer tokenizer (backed by HuggingFace\u2019s "),hd=r(fp,"EM",{});var Ab=a(hd);Hf=o(Ab,"tokenizers"),Ab.forEach(t),Rf=o(fp," library). Based on WordPiece."),fp.forEach(t),Vf=u(on),Gs=r(on,"P",{});var mp=a(Gs);Yf=o(mp,"This tokenizer inherits from "),Si=r(mp,"A",{href:!0});var Ob=a(Si);Gf=o(Ob,"PreTrainedTokenizerFast"),Ob.forEach(t),Zf=o(mp,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),mp.forEach(t),Xf=u(on),nn=r(on,"DIV",{class:!0});var El=a(nn);b(Zs.$$.fragment,El),Jf=u(El),fd=r(El,"P",{});var Lb=a(fd);em=o(Lb,`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:`),Lb.forEach(t),tm=u(El),Xs=r(El,"UL",{});var gp=a(Xs);Bi=r(gp,"LI",{});var lb=a(Bi);nm=o(lb,"single sequence: "),md=r(lb,"CODE",{});var Db=a(md);om=o(Db,"[CLS] X [SEP]"),Db.forEach(t),lb.forEach(t),sm=u(gp),Wi=r(gp,"LI",{});var db=a(Wi);rm=o(db,"pair of sequences: "),gd=r(db,"CODE",{});var Nb=a(gd);am=o(Nb,"[CLS] A [SEP] B [SEP]"),Nb.forEach(t),db.forEach(t),gp.forEach(t),El.forEach(t),im=u(on),At=r(on,"DIV",{class:!0});var ws=a(At);b(Js.$$.fragment,ws),lm=u(ws),_d=r(ws,"P",{});var Ib=a(_d);dm=o(Ib,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A Funnel"),Ib.forEach(t),cm=u(ws),b(co.$$.fragment,ws),um=u(ws),gn=r(ws,"P",{});var Ml=a(gn);pm=o(Ml,"If "),kd=r(Ml,"CODE",{});var Sb=a(kd);hm=o(Sb,"token_ids_1"),Sb.forEach(t),fm=o(Ml," is "),vd=r(Ml,"CODE",{});var Bb=a(vd);mm=o(Bb,"None"),Bb.forEach(t),gm=o(Ml,", this method only returns the first portion of the mask (0s)."),Ml.forEach(t),ws.forEach(t),on.forEach(t),$u=u(i),_n=r(i,"H2",{class:!0});var _p=a(_n);uo=r(_p,"A",{id:!0,class:!0,href:!0});var Wb=a(uo);Td=r(Wb,"SPAN",{});var Qb=a(Td);b(er.$$.fragment,Qb),Qb.forEach(t),Wb.forEach(t),_m=u(_p),wd=r(_p,"SPAN",{});var Ub=a(wd);km=o(Ub,"Funnel specific outputs"),Ub.forEach(t),_p.forEach(t),Eu=u(i),kn=r(i,"DIV",{class:!0});var kp=a(kn);b(tr.$$.fragment,kp),vm=u(kp),nr=r(kp,"P",{});var vp=a(nr);Tm=o(vp,"Output type of "),Qi=r(vp,"A",{href:!0});var Kb=a(Qi);wm=o(Kb,"FunnelForPreTraining"),Kb.forEach(t),ym=o(vp,"."),vp.forEach(t),kp.forEach(t),Mu=u(i),vn=r(i,"DIV",{class:!0});var Tp=a(vn);b(or.$$.fragment,Tp),bm=u(Tp),sr=r(Tp,"P",{});var wp=a(sr);Fm=o(wp,"Output type of "),Ui=r(wp,"A",{href:!0});var Hb=a(Ui);$m=o(Hb,"FunnelForPreTraining"),Hb.forEach(t),Em=o(wp,"."),wp.forEach(t),Tp.forEach(t),qu=u(i),Tn=r(i,"H2",{class:!0});var yp=a(Tn);po=r(yp,"A",{id:!0,class:!0,href:!0});var Rb=a(po);yd=r(Rb,"SPAN",{});var Vb=a(yd);b(rr.$$.fragment,Vb),Vb.forEach(t),Rb.forEach(t),Mm=u(yp),bd=r(yp,"SPAN",{});var Yb=a(bd);qm=o(Yb,"FunnelBaseModel"),Yb.forEach(t),yp.forEach(t),zu=u(i),dt=r(i,"DIV",{class:!0});var Ht=a(dt);b(ar.$$.fragment,Ht),zm=u(Ht),Fd=r(Ht,"P",{});var Gb=a(Fd);Pm=o(Gb,`The base Funnel Transformer Model transformer outputting raw hidden-states without upsampling head (also called
decoder) or any task-specific head on top.`),Gb.forEach(t),xm=u(Ht),ir=r(Ht,"P",{});var bp=a(ir);Cm=o(bp,"The Funnel Transformer model was proposed in "),lr=r(bp,"A",{href:!0,rel:!0});var Zb=a(lr);jm=o(Zb,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),Zb.forEach(t),Am=o(bp," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),bp.forEach(t),Om=u(Ht),dr=r(Ht,"P",{});var Fp=a(dr);Lm=o(Fp,"This model inherits from "),Ki=r(Fp,"A",{href:!0});var Xb=a(Ki);Dm=o(Xb,"PreTrainedModel"),Xb.forEach(t),Nm=o(Fp,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Fp.forEach(t),Im=u(Ht),cr=r(Ht,"P",{});var $p=a(cr);Sm=o($p,"This model is also a PyTorch "),ur=r($p,"A",{href:!0,rel:!0});var Jb=a(ur);Bm=o(Jb,"torch.nn.Module"),Jb.forEach(t),Wm=o($p,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),$p.forEach(t),Qm=u(Ht),Ot=r(Ht,"DIV",{class:!0});var ys=a(Ot);b(pr.$$.fragment,ys),Um=u(ys),wn=r(ys,"P",{});var ql=a(wn);Km=o(ql,"The "),Hi=r(ql,"A",{href:!0});var eF=a(Hi);Hm=o(eF,"FunnelBaseModel"),eF.forEach(t),Rm=o(ql," forward method, overrides the "),$d=r(ql,"CODE",{});var tF=a($d);Vm=o(tF,"__call__"),tF.forEach(t),Ym=o(ql," special method."),ql.forEach(t),Gm=u(ys),b(ho.$$.fragment,ys),Zm=u(ys),b(fo.$$.fragment,ys),ys.forEach(t),Ht.forEach(t),Pu=u(i),yn=r(i,"H2",{class:!0});var Ep=a(yn);mo=r(Ep,"A",{id:!0,class:!0,href:!0});var nF=a(mo);Ed=r(nF,"SPAN",{});var oF=a(Ed);b(hr.$$.fragment,oF),oF.forEach(t),nF.forEach(t),Xm=u(Ep),Md=r(Ep,"SPAN",{});var sF=a(Md);Jm=o(sF,"FunnelModel"),sF.forEach(t),Ep.forEach(t),xu=u(i),ct=r(i,"DIV",{class:!0});var Rt=a(ct);b(fr.$$.fragment,Rt),eg=u(Rt),qd=r(Rt,"P",{});var rF=a(qd);tg=o(rF,"The bare Funnel Transformer Model transformer outputting raw hidden-states without any specific head on top."),rF.forEach(t),ng=u(Rt),mr=r(Rt,"P",{});var Mp=a(mr);og=o(Mp,"The Funnel Transformer model was proposed in "),gr=r(Mp,"A",{href:!0,rel:!0});var aF=a(gr);sg=o(aF,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),aF.forEach(t),rg=o(Mp," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Mp.forEach(t),ag=u(Rt),_r=r(Rt,"P",{});var qp=a(_r);ig=o(qp,"This model inherits from "),Ri=r(qp,"A",{href:!0});var iF=a(Ri);lg=o(iF,"PreTrainedModel"),iF.forEach(t),dg=o(qp,`. 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.)`),qp.forEach(t),cg=u(Rt),kr=r(Rt,"P",{});var zp=a(kr);ug=o(zp,"This model is also a PyTorch "),vr=r(zp,"A",{href:!0,rel:!0});var lF=a(vr);pg=o(lF,"torch.nn.Module"),lF.forEach(t),hg=o(zp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),zp.forEach(t),fg=u(Rt),Lt=r(Rt,"DIV",{class:!0});var bs=a(Lt);b(Tr.$$.fragment,bs),mg=u(bs),bn=r(bs,"P",{});var zl=a(bn);gg=o(zl,"The "),Vi=r(zl,"A",{href:!0});var dF=a(Vi);_g=o(dF,"FunnelModel"),dF.forEach(t),kg=o(zl," forward method, overrides the "),zd=r(zl,"CODE",{});var cF=a(zd);vg=o(cF,"__call__"),cF.forEach(t),Tg=o(zl," special method."),zl.forEach(t),wg=u(bs),b(go.$$.fragment,bs),yg=u(bs),b(_o.$$.fragment,bs),bs.forEach(t),Rt.forEach(t),Cu=u(i),Fn=r(i,"H2",{class:!0});var Pp=a(Fn);ko=r(Pp,"A",{id:!0,class:!0,href:!0});var uF=a(ko);Pd=r(uF,"SPAN",{});var pF=a(Pd);b(wr.$$.fragment,pF),pF.forEach(t),uF.forEach(t),bg=u(Pp),xd=r(Pp,"SPAN",{});var hF=a(xd);Fg=o(hF,"FunnelModelForPreTraining"),hF.forEach(t),Pp.forEach(t),ju=u(i),$n=r(i,"DIV",{class:!0});var xp=a($n);b(yr.$$.fragment,xp),$g=u(xp),Dt=r(xp,"DIV",{class:!0});var Fs=a(Dt);b(br.$$.fragment,Fs),Eg=u(Fs),En=r(Fs,"P",{});var Pl=a(En);Mg=o(Pl,"The "),Yi=r(Pl,"A",{href:!0});var fF=a(Yi);qg=o(fF,"FunnelForPreTraining"),fF.forEach(t),zg=o(Pl," forward method, overrides the "),Cd=r(Pl,"CODE",{});var mF=a(Cd);Pg=o(mF,"__call__"),mF.forEach(t),xg=o(Pl," special method."),Pl.forEach(t),Cg=u(Fs),b(vo.$$.fragment,Fs),jg=u(Fs),b(To.$$.fragment,Fs),Fs.forEach(t),xp.forEach(t),Au=u(i),Mn=r(i,"H2",{class:!0});var Cp=a(Mn);wo=r(Cp,"A",{id:!0,class:!0,href:!0});var gF=a(wo);jd=r(gF,"SPAN",{});var _F=a(jd);b(Fr.$$.fragment,_F),_F.forEach(t),gF.forEach(t),Ag=u(Cp),Ad=r(Cp,"SPAN",{});var kF=a(Ad);Og=o(kF,"FunnelForMaskedLM"),kF.forEach(t),Cp.forEach(t),Ou=u(i),ut=r(i,"DIV",{class:!0});var Vt=a(ut);b($r.$$.fragment,Vt),Lg=u(Vt),Er=r(Vt,"P",{});var jp=a(Er);Dg=o(jp,"Funnel Transformer Model with a "),Od=r(jp,"CODE",{});var vF=a(Od);Ng=o(vF,"language modeling"),vF.forEach(t),Ig=o(jp," head on top."),jp.forEach(t),Sg=u(Vt),Mr=r(Vt,"P",{});var Ap=a(Mr);Bg=o(Ap,"The Funnel Transformer model was proposed in "),qr=r(Ap,"A",{href:!0,rel:!0});var TF=a(qr);Wg=o(TF,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),TF.forEach(t),Qg=o(Ap," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Ap.forEach(t),Ug=u(Vt),zr=r(Vt,"P",{});var Op=a(zr);Kg=o(Op,"This model inherits from "),Gi=r(Op,"A",{href:!0});var wF=a(Gi);Hg=o(wF,"PreTrainedModel"),wF.forEach(t),Rg=o(Op,`. 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.)`),Op.forEach(t),Vg=u(Vt),Pr=r(Vt,"P",{});var Lp=a(Pr);Yg=o(Lp,"This model is also a PyTorch "),xr=r(Lp,"A",{href:!0,rel:!0});var yF=a(xr);Gg=o(yF,"torch.nn.Module"),yF.forEach(t),Zg=o(Lp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Lp.forEach(t),Xg=u(Vt),Nt=r(Vt,"DIV",{class:!0});var $s=a(Nt);b(Cr.$$.fragment,$s),Jg=u($s),qn=r($s,"P",{});var xl=a(qn);e_=o(xl,"The "),Zi=r(xl,"A",{href:!0});var bF=a(Zi);t_=o(bF,"FunnelForMaskedLM"),bF.forEach(t),n_=o(xl," forward method, overrides the "),Ld=r(xl,"CODE",{});var FF=a(Ld);o_=o(FF,"__call__"),FF.forEach(t),s_=o(xl," special method."),xl.forEach(t),r_=u($s),b(yo.$$.fragment,$s),a_=u($s),b(bo.$$.fragment,$s),$s.forEach(t),Vt.forEach(t),Lu=u(i),zn=r(i,"H2",{class:!0});var Dp=a(zn);Fo=r(Dp,"A",{id:!0,class:!0,href:!0});var $F=a(Fo);Dd=r($F,"SPAN",{});var EF=a(Dd);b(jr.$$.fragment,EF),EF.forEach(t),$F.forEach(t),i_=u(Dp),Nd=r(Dp,"SPAN",{});var MF=a(Nd);l_=o(MF,"FunnelForSequenceClassification"),MF.forEach(t),Dp.forEach(t),Du=u(i),pt=r(i,"DIV",{class:!0});var Yt=a(pt);b(Ar.$$.fragment,Yt),d_=u(Yt),Id=r(Yt,"P",{});var qF=a(Id);c_=o(qF,`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.`),qF.forEach(t),u_=u(Yt),Or=r(Yt,"P",{});var Np=a(Or);p_=o(Np,"The Funnel Transformer model was proposed in "),Lr=r(Np,"A",{href:!0,rel:!0});var zF=a(Lr);h_=o(zF,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),zF.forEach(t),f_=o(Np," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Np.forEach(t),m_=u(Yt),Dr=r(Yt,"P",{});var Ip=a(Dr);g_=o(Ip,"This model inherits from "),Xi=r(Ip,"A",{href:!0});var PF=a(Xi);__=o(PF,"PreTrainedModel"),PF.forEach(t),k_=o(Ip,`. 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.)`),Ip.forEach(t),v_=u(Yt),Nr=r(Yt,"P",{});var Sp=a(Nr);T_=o(Sp,"This model is also a PyTorch "),Ir=r(Sp,"A",{href:!0,rel:!0});var xF=a(Ir);w_=o(xF,"torch.nn.Module"),xF.forEach(t),y_=o(Sp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Sp.forEach(t),b_=u(Yt),kt=r(Yt,"DIV",{class:!0});var sn=a(kt);b(Sr.$$.fragment,sn),F_=u(sn),Pn=r(sn,"P",{});var Cl=a(Pn);$_=o(Cl,"The "),Ji=r(Cl,"A",{href:!0});var CF=a(Ji);E_=o(CF,"FunnelForSequenceClassification"),CF.forEach(t),M_=o(Cl," forward method, overrides the "),Sd=r(Cl,"CODE",{});var jF=a(Sd);q_=o(jF,"__call__"),jF.forEach(t),z_=o(Cl," special method."),Cl.forEach(t),P_=u(sn),b($o.$$.fragment,sn),x_=u(sn),b(Eo.$$.fragment,sn),C_=u(sn),b(Mo.$$.fragment,sn),sn.forEach(t),Yt.forEach(t),Nu=u(i),xn=r(i,"H2",{class:!0});var Bp=a(xn);qo=r(Bp,"A",{id:!0,class:!0,href:!0});var AF=a(qo);Bd=r(AF,"SPAN",{});var OF=a(Bd);b(Br.$$.fragment,OF),OF.forEach(t),AF.forEach(t),j_=u(Bp),Wd=r(Bp,"SPAN",{});var LF=a(Wd);A_=o(LF,"FunnelForMultipleChoice"),LF.forEach(t),Bp.forEach(t),Iu=u(i),ht=r(i,"DIV",{class:!0});var Gt=a(ht);b(Wr.$$.fragment,Gt),O_=u(Gt),Qd=r(Gt,"P",{});var DF=a(Qd);L_=o(DF,`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.`),DF.forEach(t),D_=u(Gt),Qr=r(Gt,"P",{});var Wp=a(Qr);N_=o(Wp,"The Funnel Transformer model was proposed in "),Ur=r(Wp,"A",{href:!0,rel:!0});var NF=a(Ur);I_=o(NF,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),NF.forEach(t),S_=o(Wp," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Wp.forEach(t),B_=u(Gt),Kr=r(Gt,"P",{});var Qp=a(Kr);W_=o(Qp,"This model inherits from "),el=r(Qp,"A",{href:!0});var IF=a(el);Q_=o(IF,"PreTrainedModel"),IF.forEach(t),U_=o(Qp,`. 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.)`),Qp.forEach(t),K_=u(Gt),Hr=r(Gt,"P",{});var Up=a(Hr);H_=o(Up,"This model is also a PyTorch "),Rr=r(Up,"A",{href:!0,rel:!0});var SF=a(Rr);R_=o(SF,"torch.nn.Module"),SF.forEach(t),V_=o(Up,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Up.forEach(t),Y_=u(Gt),It=r(Gt,"DIV",{class:!0});var Es=a(It);b(Vr.$$.fragment,Es),G_=u(Es),Cn=r(Es,"P",{});var jl=a(Cn);Z_=o(jl,"The "),tl=r(jl,"A",{href:!0});var BF=a(tl);X_=o(BF,"FunnelForMultipleChoice"),BF.forEach(t),J_=o(jl," forward method, overrides the "),Ud=r(jl,"CODE",{});var WF=a(Ud);ek=o(WF,"__call__"),WF.forEach(t),tk=o(jl," special method."),jl.forEach(t),nk=u(Es),b(zo.$$.fragment,Es),ok=u(Es),b(Po.$$.fragment,Es),Es.forEach(t),Gt.forEach(t),Su=u(i),jn=r(i,"H2",{class:!0});var Kp=a(jn);xo=r(Kp,"A",{id:!0,class:!0,href:!0});var QF=a(xo);Kd=r(QF,"SPAN",{});var UF=a(Kd);b(Yr.$$.fragment,UF),UF.forEach(t),QF.forEach(t),sk=u(Kp),Hd=r(Kp,"SPAN",{});var KF=a(Hd);rk=o(KF,"FunnelForTokenClassification"),KF.forEach(t),Kp.forEach(t),Bu=u(i),ft=r(i,"DIV",{class:!0});var Zt=a(ft);b(Gr.$$.fragment,Zt),ak=u(Zt),Rd=r(Zt,"P",{});var HF=a(Rd);ik=o(HF,`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.`),HF.forEach(t),lk=u(Zt),Zr=r(Zt,"P",{});var Hp=a(Zr);dk=o(Hp,"The Funnel Transformer model was proposed in "),Xr=r(Hp,"A",{href:!0,rel:!0});var RF=a(Xr);ck=o(RF,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),RF.forEach(t),uk=o(Hp," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Hp.forEach(t),pk=u(Zt),Jr=r(Zt,"P",{});var Rp=a(Jr);hk=o(Rp,"This model inherits from "),nl=r(Rp,"A",{href:!0});var VF=a(nl);fk=o(VF,"PreTrainedModel"),VF.forEach(t),mk=o(Rp,`. 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.)`),Rp.forEach(t),gk=u(Zt),ea=r(Zt,"P",{});var Vp=a(ea);_k=o(Vp,"This model is also a PyTorch "),ta=r(Vp,"A",{href:!0,rel:!0});var YF=a(ta);kk=o(YF,"torch.nn.Module"),YF.forEach(t),vk=o(Vp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Vp.forEach(t),Tk=u(Zt),St=r(Zt,"DIV",{class:!0});var Ms=a(St);b(na.$$.fragment,Ms),wk=u(Ms),An=r(Ms,"P",{});var Al=a(An);yk=o(Al,"The "),ol=r(Al,"A",{href:!0});var GF=a(ol);bk=o(GF,"FunnelForTokenClassification"),GF.forEach(t),Fk=o(Al," forward method, overrides the "),Vd=r(Al,"CODE",{});var ZF=a(Vd);$k=o(ZF,"__call__"),ZF.forEach(t),Ek=o(Al," special method."),Al.forEach(t),Mk=u(Ms),b(Co.$$.fragment,Ms),qk=u(Ms),b(jo.$$.fragment,Ms),Ms.forEach(t),Zt.forEach(t),Wu=u(i),On=r(i,"H2",{class:!0});var Yp=a(On);Ao=r(Yp,"A",{id:!0,class:!0,href:!0});var XF=a(Ao);Yd=r(XF,"SPAN",{});var JF=a(Yd);b(oa.$$.fragment,JF),JF.forEach(t),XF.forEach(t),zk=u(Yp),Gd=r(Yp,"SPAN",{});var e1=a(Gd);Pk=o(e1,"FunnelForQuestionAnswering"),e1.forEach(t),Yp.forEach(t),Qu=u(i),mt=r(i,"DIV",{class:!0});var Xt=a(mt);b(sa.$$.fragment,Xt),xk=u(Xt),Ln=r(Xt,"P",{});var Ol=a(Ln);Ck=o(Ol,`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 `),Zd=r(Ol,"CODE",{});var t1=a(Zd);jk=o(t1,"span start logits"),t1.forEach(t),Ak=o(Ol," and "),Xd=r(Ol,"CODE",{});var n1=a(Xd);Ok=o(n1,"span end logits"),n1.forEach(t),Lk=o(Ol,")."),Ol.forEach(t),Dk=u(Xt),ra=r(Xt,"P",{});var Gp=a(ra);Nk=o(Gp,"The Funnel Transformer model was proposed in "),aa=r(Gp,"A",{href:!0,rel:!0});var o1=a(aa);Ik=o(o1,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),o1.forEach(t),Sk=o(Gp," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),Gp.forEach(t),Bk=u(Xt),ia=r(Xt,"P",{});var Zp=a(ia);Wk=o(Zp,"This model inherits from "),sl=r(Zp,"A",{href:!0});var s1=a(sl);Qk=o(s1,"PreTrainedModel"),s1.forEach(t),Uk=o(Zp,`. 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.)`),Zp.forEach(t),Kk=u(Xt),la=r(Xt,"P",{});var Xp=a(la);Hk=o(Xp,"This model is also a PyTorch "),da=r(Xp,"A",{href:!0,rel:!0});var r1=a(da);Rk=o(r1,"torch.nn.Module"),r1.forEach(t),Vk=o(Xp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Xp.forEach(t),Yk=u(Xt),Bt=r(Xt,"DIV",{class:!0});var qs=a(Bt);b(ca.$$.fragment,qs),Gk=u(qs),Dn=r(qs,"P",{});var Ll=a(Dn);Zk=o(Ll,"The "),rl=r(Ll,"A",{href:!0});var a1=a(rl);Xk=o(a1,"FunnelForQuestionAnswering"),a1.forEach(t),Jk=o(Ll," forward method, overrides the "),Jd=r(Ll,"CODE",{});var i1=a(Jd);ev=o(i1,"__call__"),i1.forEach(t),tv=o(Ll," special method."),Ll.forEach(t),nv=u(qs),b(Oo.$$.fragment,qs),ov=u(qs),b(Lo.$$.fragment,qs),qs.forEach(t),Xt.forEach(t),Uu=u(i),Nn=r(i,"H2",{class:!0});var Jp=a(Nn);Do=r(Jp,"A",{id:!0,class:!0,href:!0});var l1=a(Do);ec=r(l1,"SPAN",{});var d1=a(ec);b(ua.$$.fragment,d1),d1.forEach(t),l1.forEach(t),sv=u(Jp),tc=r(Jp,"SPAN",{});var c1=a(tc);rv=o(c1,"TFFunnelBaseModel"),c1.forEach(t),Jp.forEach(t),Ku=u(i),tt=r(i,"DIV",{class:!0});var Ft=a(tt);b(pa.$$.fragment,Ft),av=u(Ft),nc=r(Ft,"P",{});var u1=a(nc);iv=o(u1,`The base Funnel Transformer Model transformer outputting raw hidden-states without upsampling head (also called
decoder) or any task-specific head on top.`),u1.forEach(t),lv=u(Ft),ha=r(Ft,"P",{});var eh=a(ha);dv=o(eh,"The Funnel Transformer model was proposed in "),fa=r(eh,"A",{href:!0,rel:!0});var p1=a(fa);cv=o(p1,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),p1.forEach(t),uv=o(eh," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),eh.forEach(t),pv=u(Ft),ma=r(Ft,"P",{});var th=a(ma);hv=o(th,"This model inherits from "),al=r(th,"A",{href:!0});var h1=a(al);fv=o(h1,"TFPreTrainedModel"),h1.forEach(t),mv=o(th,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),th.forEach(t),gv=u(Ft),ga=r(Ft,"P",{});var nh=a(ga);_v=o(nh,"This model is also a "),_a=r(nh,"A",{href:!0,rel:!0});var f1=a(_a);kv=o(f1,"tf.keras.Model"),f1.forEach(t),vv=o(nh,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),nh.forEach(t),Tv=u(Ft),b(No.$$.fragment,Ft),wv=u(Ft),Wt=r(Ft,"DIV",{class:!0});var zs=a(Wt);b(ka.$$.fragment,zs),yv=u(zs),In=r(zs,"P",{});var Dl=a(In);bv=o(Dl,"The "),il=r(Dl,"A",{href:!0});var m1=a(il);Fv=o(m1,"TFFunnelBaseModel"),m1.forEach(t),$v=o(Dl," forward method, overrides the "),oc=r(Dl,"CODE",{});var g1=a(oc);Ev=o(g1,"__call__"),g1.forEach(t),Mv=o(Dl," special method."),Dl.forEach(t),qv=u(zs),b(Io.$$.fragment,zs),zv=u(zs),b(So.$$.fragment,zs),zs.forEach(t),Ft.forEach(t),Hu=u(i),Sn=r(i,"H2",{class:!0});var oh=a(Sn);Bo=r(oh,"A",{id:!0,class:!0,href:!0});var _1=a(Bo);sc=r(_1,"SPAN",{});var k1=a(sc);b(va.$$.fragment,k1),k1.forEach(t),_1.forEach(t),Pv=u(oh),rc=r(oh,"SPAN",{});var v1=a(rc);xv=o(v1,"TFFunnelModel"),v1.forEach(t),oh.forEach(t),Ru=u(i),nt=r(i,"DIV",{class:!0});var $t=a(nt);b(Ta.$$.fragment,$t),Cv=u($t),ac=r($t,"P",{});var T1=a(ac);jv=o(T1,"The bare Funnel Transformer Model transformer outputting raw hidden-states without any specific head on top."),T1.forEach(t),Av=u($t),wa=r($t,"P",{});var sh=a(wa);Ov=o(sh,"The Funnel Transformer model was proposed in "),ya=r(sh,"A",{href:!0,rel:!0});var w1=a(ya);Lv=o(w1,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),w1.forEach(t),Dv=o(sh," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),sh.forEach(t),Nv=u($t),ba=r($t,"P",{});var rh=a(ba);Iv=o(rh,"This model inherits from "),ll=r(rh,"A",{href:!0});var y1=a(ll);Sv=o(y1,"TFPreTrainedModel"),y1.forEach(t),Bv=o(rh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),rh.forEach(t),Wv=u($t),Fa=r($t,"P",{});var ah=a(Fa);Qv=o(ah,"This model is also a "),$a=r(ah,"A",{href:!0,rel:!0});var b1=a($a);Uv=o(b1,"tf.keras.Model"),b1.forEach(t),Kv=o(ah,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),ah.forEach(t),Hv=u($t),b(Wo.$$.fragment,$t),Rv=u($t),Qt=r($t,"DIV",{class:!0});var Ps=a(Qt);b(Ea.$$.fragment,Ps),Vv=u(Ps),Bn=r(Ps,"P",{});var Nl=a(Bn);Yv=o(Nl,"The "),dl=r(Nl,"A",{href:!0});var F1=a(dl);Gv=o(F1,"TFFunnelModel"),F1.forEach(t),Zv=o(Nl," forward method, overrides the "),ic=r(Nl,"CODE",{});var $1=a(ic);Xv=o($1,"__call__"),$1.forEach(t),Jv=o(Nl," special method."),Nl.forEach(t),eT=u(Ps),b(Qo.$$.fragment,Ps),tT=u(Ps),b(Uo.$$.fragment,Ps),Ps.forEach(t),$t.forEach(t),Vu=u(i),Wn=r(i,"H2",{class:!0});var ih=a(Wn);Ko=r(ih,"A",{id:!0,class:!0,href:!0});var E1=a(Ko);lc=r(E1,"SPAN",{});var M1=a(lc);b(Ma.$$.fragment,M1),M1.forEach(t),E1.forEach(t),nT=u(ih),dc=r(ih,"SPAN",{});var q1=a(dc);oT=o(q1,"TFFunnelModelForPreTraining"),q1.forEach(t),ih.forEach(t),Yu=u(i),ot=r(i,"DIV",{class:!0});var Et=a(ot);b(qa.$$.fragment,Et),sT=u(Et),cc=r(Et,"P",{});var z1=a(cc);rT=o(z1,"Funnel model with a binary classification head on top as used during pretraining for identifying generated tokens."),z1.forEach(t),aT=u(Et),za=r(Et,"P",{});var lh=a(za);iT=o(lh,"The Funnel Transformer model was proposed in "),Pa=r(lh,"A",{href:!0,rel:!0});var P1=a(Pa);lT=o(P1,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),P1.forEach(t),dT=o(lh," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),lh.forEach(t),cT=u(Et),xa=r(Et,"P",{});var dh=a(xa);uT=o(dh,"This model inherits from "),cl=r(dh,"A",{href:!0});var x1=a(cl);pT=o(x1,"TFPreTrainedModel"),x1.forEach(t),hT=o(dh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),dh.forEach(t),fT=u(Et),Ca=r(Et,"P",{});var ch=a(Ca);mT=o(ch,"This model is also a "),ja=r(ch,"A",{href:!0,rel:!0});var C1=a(ja);gT=o(C1,"tf.keras.Model"),C1.forEach(t),_T=o(ch,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),ch.forEach(t),kT=u(Et),b(Ho.$$.fragment,Et),vT=u(Et),Ut=r(Et,"DIV",{class:!0});var xs=a(Ut);b(Aa.$$.fragment,xs),TT=u(xs),Qn=r(xs,"P",{});var Il=a(Qn);wT=o(Il,"The "),ul=r(Il,"A",{href:!0});var j1=a(ul);yT=o(j1,"TFFunnelForPreTraining"),j1.forEach(t),bT=o(Il," forward method, overrides the "),uc=r(Il,"CODE",{});var A1=a(uc);FT=o(A1,"__call__"),A1.forEach(t),$T=o(Il," special method."),Il.forEach(t),ET=u(xs),b(Ro.$$.fragment,xs),MT=u(xs),b(Vo.$$.fragment,xs),xs.forEach(t),Et.forEach(t),Gu=u(i),Un=r(i,"H2",{class:!0});var uh=a(Un);Yo=r(uh,"A",{id:!0,class:!0,href:!0});var O1=a(Yo);pc=r(O1,"SPAN",{});var L1=a(pc);b(Oa.$$.fragment,L1),L1.forEach(t),O1.forEach(t),qT=u(uh),hc=r(uh,"SPAN",{});var D1=a(hc);zT=o(D1,"TFFunnelForMaskedLM"),D1.forEach(t),uh.forEach(t),Zu=u(i),st=r(i,"DIV",{class:!0});var Mt=a(st);b(La.$$.fragment,Mt),PT=u(Mt),Da=r(Mt,"P",{});var ph=a(Da);xT=o(ph,"Funnel Model with a "),fc=r(ph,"CODE",{});var N1=a(fc);CT=o(N1,"language modeling"),N1.forEach(t),jT=o(ph," head on top."),ph.forEach(t),AT=u(Mt),Na=r(Mt,"P",{});var hh=a(Na);OT=o(hh,"The Funnel Transformer model was proposed in "),Ia=r(hh,"A",{href:!0,rel:!0});var I1=a(Ia);LT=o(I1,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),I1.forEach(t),DT=o(hh," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),hh.forEach(t),NT=u(Mt),Sa=r(Mt,"P",{});var fh=a(Sa);IT=o(fh,"This model inherits from "),pl=r(fh,"A",{href:!0});var S1=a(pl);ST=o(S1,"TFPreTrainedModel"),S1.forEach(t),BT=o(fh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),fh.forEach(t),WT=u(Mt),Ba=r(Mt,"P",{});var mh=a(Ba);QT=o(mh,"This model is also a "),Wa=r(mh,"A",{href:!0,rel:!0});var B1=a(Wa);UT=o(B1,"tf.keras.Model"),B1.forEach(t),KT=o(mh,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),mh.forEach(t),HT=u(Mt),b(Go.$$.fragment,Mt),RT=u(Mt),vt=r(Mt,"DIV",{class:!0});var rn=a(vt);b(Qa.$$.fragment,rn),VT=u(rn),Kn=r(rn,"P",{});var Sl=a(Kn);YT=o(Sl,"The "),hl=r(Sl,"A",{href:!0});var W1=a(hl);GT=o(W1,"TFFunnelForMaskedLM"),W1.forEach(t),ZT=o(Sl," forward method, overrides the "),mc=r(Sl,"CODE",{});var Q1=a(mc);XT=o(Q1,"__call__"),Q1.forEach(t),JT=o(Sl," special method."),Sl.forEach(t),ew=u(rn),b(Zo.$$.fragment,rn),tw=u(rn),b(Xo.$$.fragment,rn),nw=u(rn),b(Jo.$$.fragment,rn),rn.forEach(t),Mt.forEach(t),Xu=u(i),Hn=r(i,"H2",{class:!0});var gh=a(Hn);es=r(gh,"A",{id:!0,class:!0,href:!0});var U1=a(es);gc=r(U1,"SPAN",{});var K1=a(gc);b(Ua.$$.fragment,K1),K1.forEach(t),U1.forEach(t),ow=u(gh),_c=r(gh,"SPAN",{});var H1=a(_c);sw=o(H1,"TFFunnelForSequenceClassification"),H1.forEach(t),gh.forEach(t),Ju=u(i),rt=r(i,"DIV",{class:!0});var qt=a(rt);b(Ka.$$.fragment,qt),rw=u(qt),kc=r(qt,"P",{});var R1=a(kc);aw=o(R1,`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.`),R1.forEach(t),iw=u(qt),Ha=r(qt,"P",{});var _h=a(Ha);lw=o(_h,"The Funnel Transformer model was proposed in "),Ra=r(_h,"A",{href:!0,rel:!0});var V1=a(Ra);dw=o(V1,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),V1.forEach(t),cw=o(_h," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),_h.forEach(t),uw=u(qt),Va=r(qt,"P",{});var kh=a(Va);pw=o(kh,"This model inherits from "),fl=r(kh,"A",{href:!0});var Y1=a(fl);hw=o(Y1,"TFPreTrainedModel"),Y1.forEach(t),fw=o(kh,`. 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.)`),kh.forEach(t),mw=u(qt),Ya=r(qt,"P",{});var vh=a(Ya);gw=o(vh,"This model is also a "),Ga=r(vh,"A",{href:!0,rel:!0});var G1=a(Ga);_w=o(G1,"tf.keras.Model"),G1.forEach(t),kw=o(vh,` 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.`),vh.forEach(t),vw=u(qt),b(ts.$$.fragment,qt),Tw=u(qt),Tt=r(qt,"DIV",{class:!0});var an=a(Tt);b(Za.$$.fragment,an),ww=u(an),Rn=r(an,"P",{});var Bl=a(Rn);yw=o(Bl,"The "),ml=r(Bl,"A",{href:!0});var Z1=a(ml);bw=o(Z1,"TFFunnelForSequenceClassification"),Z1.forEach(t),Fw=o(Bl," forward method, overrides the "),vc=r(Bl,"CODE",{});var X1=a(vc);$w=o(X1,"__call__"),X1.forEach(t),Ew=o(Bl," special method."),Bl.forEach(t),Mw=u(an),b(ns.$$.fragment,an),qw=u(an),b(os.$$.fragment,an),zw=u(an),b(ss.$$.fragment,an),an.forEach(t),qt.forEach(t),ep=u(i),Vn=r(i,"H2",{class:!0});var Th=a(Vn);rs=r(Th,"A",{id:!0,class:!0,href:!0});var J1=a(rs);Tc=r(J1,"SPAN",{});var e2=a(Tc);b(Xa.$$.fragment,e2),e2.forEach(t),J1.forEach(t),Pw=u(Th),wc=r(Th,"SPAN",{});var t2=a(wc);xw=o(t2,"TFFunnelForMultipleChoice"),t2.forEach(t),Th.forEach(t),tp=u(i),at=r(i,"DIV",{class:!0});var zt=a(at);b(Ja.$$.fragment,zt),Cw=u(zt),yc=r(zt,"P",{});var n2=a(yc);jw=o(n2,`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.`),n2.forEach(t),Aw=u(zt),ei=r(zt,"P",{});var wh=a(ei);Ow=o(wh,"The Funnel Transformer model was proposed in "),ti=r(wh,"A",{href:!0,rel:!0});var o2=a(ti);Lw=o(o2,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),o2.forEach(t),Dw=o(wh," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),wh.forEach(t),Nw=u(zt),ni=r(zt,"P",{});var yh=a(ni);Iw=o(yh,"This model inherits from "),gl=r(yh,"A",{href:!0});var s2=a(gl);Sw=o(s2,"TFPreTrainedModel"),s2.forEach(t),Bw=o(yh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),yh.forEach(t),Ww=u(zt),oi=r(zt,"P",{});var bh=a(oi);Qw=o(bh,"This model is also a "),si=r(bh,"A",{href:!0,rel:!0});var r2=a(si);Uw=o(r2,"tf.keras.Model"),r2.forEach(t),Kw=o(bh,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),bh.forEach(t),Hw=u(zt),b(as.$$.fragment,zt),Rw=u(zt),Kt=r(zt,"DIV",{class:!0});var Cs=a(Kt);b(ri.$$.fragment,Cs),Vw=u(Cs),Yn=r(Cs,"P",{});var Wl=a(Yn);Yw=o(Wl,"The "),_l=r(Wl,"A",{href:!0});var a2=a(_l);Gw=o(a2,"TFFunnelForMultipleChoice"),a2.forEach(t),Zw=o(Wl," forward method, overrides the "),bc=r(Wl,"CODE",{});var i2=a(bc);Xw=o(i2,"__call__"),i2.forEach(t),Jw=o(Wl," special method."),Wl.forEach(t),ey=u(Cs),b(is.$$.fragment,Cs),ty=u(Cs),b(ls.$$.fragment,Cs),Cs.forEach(t),zt.forEach(t),np=u(i),Gn=r(i,"H2",{class:!0});var Fh=a(Gn);ds=r(Fh,"A",{id:!0,class:!0,href:!0});var l2=a(ds);Fc=r(l2,"SPAN",{});var d2=a(Fc);b(ai.$$.fragment,d2),d2.forEach(t),l2.forEach(t),ny=u(Fh),$c=r(Fh,"SPAN",{});var c2=a($c);oy=o(c2,"TFFunnelForTokenClassification"),c2.forEach(t),Fh.forEach(t),op=u(i),it=r(i,"DIV",{class:!0});var Pt=a(it);b(ii.$$.fragment,Pt),sy=u(Pt),Ec=r(Pt,"P",{});var u2=a(Ec);ry=o(u2,`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.`),u2.forEach(t),ay=u(Pt),li=r(Pt,"P",{});var $h=a(li);iy=o($h,"The Funnel Transformer model was proposed in "),di=r($h,"A",{href:!0,rel:!0});var p2=a(di);ly=o(p2,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),p2.forEach(t),dy=o($h," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),$h.forEach(t),cy=u(Pt),ci=r(Pt,"P",{});var Eh=a(ci);uy=o(Eh,"This model inherits from "),kl=r(Eh,"A",{href:!0});var h2=a(kl);py=o(h2,"TFPreTrainedModel"),h2.forEach(t),hy=o(Eh,`. 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.)`),Eh.forEach(t),fy=u(Pt),ui=r(Pt,"P",{});var Mh=a(ui);my=o(Mh,"This model is also a "),pi=r(Mh,"A",{href:!0,rel:!0});var f2=a(pi);gy=o(f2,"tf.keras.Model"),f2.forEach(t),_y=o(Mh,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Mh.forEach(t),ky=u(Pt),b(cs.$$.fragment,Pt),vy=u(Pt),wt=r(Pt,"DIV",{class:!0});var ln=a(wt);b(hi.$$.fragment,ln),Ty=u(ln),Zn=r(ln,"P",{});var Ql=a(Zn);wy=o(Ql,"The "),vl=r(Ql,"A",{href:!0});var m2=a(vl);yy=o(m2,"TFFunnelForTokenClassification"),m2.forEach(t),by=o(Ql," forward method, overrides the "),Mc=r(Ql,"CODE",{});var g2=a(Mc);Fy=o(g2,"__call__"),g2.forEach(t),$y=o(Ql," special method."),Ql.forEach(t),Ey=u(ln),b(us.$$.fragment,ln),My=u(ln),b(ps.$$.fragment,ln),qy=u(ln),b(hs.$$.fragment,ln),ln.forEach(t),Pt.forEach(t),sp=u(i),Xn=r(i,"H2",{class:!0});var qh=a(Xn);fs=r(qh,"A",{id:!0,class:!0,href:!0});var _2=a(fs);qc=r(_2,"SPAN",{});var k2=a(qc);b(fi.$$.fragment,k2),k2.forEach(t),_2.forEach(t),zy=u(qh),zc=r(qh,"SPAN",{});var v2=a(zc);Py=o(v2,"TFFunnelForQuestionAnswering"),v2.forEach(t),qh.forEach(t),rp=u(i),lt=r(i,"DIV",{class:!0});var xt=a(lt);b(mi.$$.fragment,xt),xy=u(xt),Jn=r(xt,"P",{});var Ul=a(Jn);Cy=o(Ul,`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 `),Pc=r(Ul,"CODE",{});var T2=a(Pc);jy=o(T2,"span start logits"),T2.forEach(t),Ay=o(Ul," and "),xc=r(Ul,"CODE",{});var w2=a(xc);Oy=o(w2,"span end logits"),w2.forEach(t),Ly=o(Ul,")."),Ul.forEach(t),Dy=u(xt),gi=r(xt,"P",{});var zh=a(gi);Ny=o(zh,"The Funnel Transformer model was proposed in "),_i=r(zh,"A",{href:!0,rel:!0});var y2=a(_i);Iy=o(y2,`Funnel-Transformer: Filtering out Sequential Redundancy for Efficient
Language Processing`),y2.forEach(t),Sy=o(zh," by Zihang Dai, Guokun Lai, Yiming Yang, Quoc V. Le."),zh.forEach(t),By=u(xt),ki=r(xt,"P",{});var Ph=a(ki);Wy=o(Ph,"This model inherits from "),Tl=r(Ph,"A",{href:!0});var b2=a(Tl);Qy=o(b2,"TFPreTrainedModel"),b2.forEach(t),Uy=o(Ph,`. 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.)`),Ph.forEach(t),Ky=u(xt),vi=r(xt,"P",{});var xh=a(vi);Hy=o(xh,"This model is also a "),Ti=r(xh,"A",{href:!0,rel:!0});var F2=a(Ti);Ry=o(F2,"tf.keras.Model"),F2.forEach(t),Vy=o(xh,` 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.`),xh.forEach(t),Yy=u(xt),b(ms.$$.fragment,xt),Gy=u(xt),yt=r(xt,"DIV",{class:!0});var dn=a(yt);b(wi.$$.fragment,dn),Zy=u(dn),eo=r(dn,"P",{});var Kl=a(eo);Xy=o(Kl,"The "),wl=r(Kl,"A",{href:!0});var $2=a(wl);Jy=o($2,"TFFunnelForQuestionAnswering"),$2.forEach(t),eb=o(Kl," forward method, overrides the "),Cc=r(Kl,"CODE",{});var E2=a(Cc);tb=o(E2,"__call__"),E2.forEach(t),nb=o(Kl," special method."),Kl.forEach(t),ob=u(dn),b(gs.$$.fragment,dn),sb=u(dn),b(_s.$$.fragment,dn),rb=u(dn),b(ks.$$.fragment,dn),dn.forEach(t),xt.forEach(t),this.h()},h(){f(d,"name","hf:doc:metadata"),f(d,"content",JSON.stringify(M$)),f(m,"id","funnel-transformer"),f(m,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(m,"href","#funnel-transformer"),f(h,"class","relative group"),f(J,"alt","Models"),M2(J.src,w="https://img.shields.io/badge/All_model_pages-funnel-blueviolet")||f(J,"src",w),f(ce,"href","https://huggingface.co/models?filter=funnel"),f(ue,"alt","Spaces"),M2(ue.src,je="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||f(ue,"src",je),f(W,"href","https://huggingface.co/spaces/docs-demos/funnel-transformer-small"),f(S,"class","flex flex-wrap space-x-1"),f(ie,"id","overview"),f(ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ie,"href","#overview"),f(ae,"class","relative group"),f(de,"href","https://arxiv.org/abs/2006.03236"),f(de,"rel","nofollow"),f(ee,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelModel"),f(L,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelForPreTraining"),f(g,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelForMaskedLM"),f(te,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelForTokenClassification"),f(z,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelForQuestionAnswering"),f(Ae,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelBaseModel"),f(N,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelForSequenceClassification"),f(Oe,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelForMultipleChoice"),f(X,"href","https://huggingface.co/sgugger"),f(X,"rel","nofollow"),f(js,"href","https://github.com/laiguokun/Funnel-Transformer"),f(js,"rel","nofollow"),f(oo,"id","documentation-resources"),f(oo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(oo,"href","#documentation-resources"),f(cn,"class","relative group"),f(Mi,"href","./tasks/sequence_classification"),f(qi,"href","./tasks/token_classification"),f(zi,"href","./tasks/question_answering"),f(Pi,"href","./tasks/masked_language_modeling"),f(xi,"href","./tasks/multiple_choice"),f(so,"id","transformers.FunnelConfig"),f(so,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(so,"href","#transformers.FunnelConfig"),f(un,"class","relative group"),f(Ci,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelModel"),f(ji,"href","/docs/transformers/v4.27.1/en/model_doc/bert#transformers.TFBertModel"),f(Ds,"href","https://huggingface.co/funnel-transformer/small"),f(Ds,"rel","nofollow"),f(Ai,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),f(Oi,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),f(Jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ro,"id","transformers.FunnelTokenizer"),f(ro,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ro,"href","#transformers.FunnelTokenizer"),f(hn,"class","relative group"),f(Li,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),f(tn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ao,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ii,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(lo,"id","transformers.FunnelTokenizerFast"),f(lo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(lo,"href","#transformers.FunnelTokenizerFast"),f(mn,"class","relative group"),f(Si,"href","/docs/transformers/v4.27.1/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),f(nn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(At,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(uo,"id","transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput"),f(uo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(uo,"href","#transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput"),f(_n,"class","relative group"),f(Qi,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelForPreTraining"),f(kn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ui,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelForPreTraining"),f(vn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(po,"id","transformers.FunnelBaseModel"),f(po,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(po,"href","#transformers.FunnelBaseModel"),f(Tn,"class","relative group"),f(lr,"href","https://arxiv.org/abs/2006.03236"),f(lr,"rel","nofollow"),f(Ki,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),f(ur,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(ur,"rel","nofollow"),f(Hi,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelBaseModel"),f(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(mo,"id","transformers.FunnelModel"),f(mo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(mo,"href","#transformers.FunnelModel"),f(yn,"class","relative group"),f(gr,"href","https://arxiv.org/abs/2006.03236"),f(gr,"rel","nofollow"),f(Ri,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),f(vr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(vr,"rel","nofollow"),f(Vi,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelModel"),f(Lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ko,"id","transformers.FunnelForPreTraining"),f(ko,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ko,"href","#transformers.FunnelForPreTraining"),f(Fn,"class","relative group"),f(Yi,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelForPreTraining"),f(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f($n,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(wo,"id","transformers.FunnelForMaskedLM"),f(wo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(wo,"href","#transformers.FunnelForMaskedLM"),f(Mn,"class","relative group"),f(qr,"href","https://arxiv.org/abs/2006.03236"),f(qr,"rel","nofollow"),f(Gi,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),f(xr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(xr,"rel","nofollow"),f(Zi,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelForMaskedLM"),f(Nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Fo,"id","transformers.FunnelForSequenceClassification"),f(Fo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Fo,"href","#transformers.FunnelForSequenceClassification"),f(zn,"class","relative group"),f(Lr,"href","https://arxiv.org/abs/2006.03236"),f(Lr,"rel","nofollow"),f(Xi,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),f(Ir,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Ir,"rel","nofollow"),f(Ji,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelForSequenceClassification"),f(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(qo,"id","transformers.FunnelForMultipleChoice"),f(qo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(qo,"href","#transformers.FunnelForMultipleChoice"),f(xn,"class","relative group"),f(Ur,"href","https://arxiv.org/abs/2006.03236"),f(Ur,"rel","nofollow"),f(el,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),f(Rr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Rr,"rel","nofollow"),f(tl,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelForMultipleChoice"),f(It,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(xo,"id","transformers.FunnelForTokenClassification"),f(xo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(xo,"href","#transformers.FunnelForTokenClassification"),f(jn,"class","relative group"),f(Xr,"href","https://arxiv.org/abs/2006.03236"),f(Xr,"rel","nofollow"),f(nl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),f(ta,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(ta,"rel","nofollow"),f(ol,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelForTokenClassification"),f(St,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ao,"id","transformers.FunnelForQuestionAnswering"),f(Ao,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Ao,"href","#transformers.FunnelForQuestionAnswering"),f(On,"class","relative group"),f(aa,"href","https://arxiv.org/abs/2006.03236"),f(aa,"rel","nofollow"),f(sl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),f(da,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(da,"rel","nofollow"),f(rl,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.FunnelForQuestionAnswering"),f(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Do,"id","transformers.TFFunnelBaseModel"),f(Do,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Do,"href","#transformers.TFFunnelBaseModel"),f(Nn,"class","relative group"),f(fa,"href","https://arxiv.org/abs/2006.03236"),f(fa,"rel","nofollow"),f(al,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(_a,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(_a,"rel","nofollow"),f(il,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.TFFunnelBaseModel"),f(Wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Bo,"id","transformers.TFFunnelModel"),f(Bo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Bo,"href","#transformers.TFFunnelModel"),f(Sn,"class","relative group"),f(ya,"href","https://arxiv.org/abs/2006.03236"),f(ya,"rel","nofollow"),f(ll,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f($a,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f($a,"rel","nofollow"),f(dl,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.TFFunnelModel"),f(Qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ko,"id","transformers.TFFunnelForPreTraining"),f(Ko,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Ko,"href","#transformers.TFFunnelForPreTraining"),f(Wn,"class","relative group"),f(Pa,"href","https://arxiv.org/abs/2006.03236"),f(Pa,"rel","nofollow"),f(cl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(ja,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(ja,"rel","nofollow"),f(ul,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.TFFunnelForPreTraining"),f(Ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Yo,"id","transformers.TFFunnelForMaskedLM"),f(Yo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Yo,"href","#transformers.TFFunnelForMaskedLM"),f(Un,"class","relative group"),f(Ia,"href","https://arxiv.org/abs/2006.03236"),f(Ia,"rel","nofollow"),f(pl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(Wa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Wa,"rel","nofollow"),f(hl,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.TFFunnelForMaskedLM"),f(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(es,"id","transformers.TFFunnelForSequenceClassification"),f(es,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(es,"href","#transformers.TFFunnelForSequenceClassification"),f(Hn,"class","relative group"),f(Ra,"href","https://arxiv.org/abs/2006.03236"),f(Ra,"rel","nofollow"),f(fl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(Ga,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Ga,"rel","nofollow"),f(ml,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.TFFunnelForSequenceClassification"),f(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(rs,"id","transformers.TFFunnelForMultipleChoice"),f(rs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(rs,"href","#transformers.TFFunnelForMultipleChoice"),f(Vn,"class","relative group"),f(ti,"href","https://arxiv.org/abs/2006.03236"),f(ti,"rel","nofollow"),f(gl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(si,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(si,"rel","nofollow"),f(_l,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.TFFunnelForMultipleChoice"),f(Kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ds,"id","transformers.TFFunnelForTokenClassification"),f(ds,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ds,"href","#transformers.TFFunnelForTokenClassification"),f(Gn,"class","relative group"),f(di,"href","https://arxiv.org/abs/2006.03236"),f(di,"rel","nofollow"),f(kl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(pi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(pi,"rel","nofollow"),f(vl,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.TFFunnelForTokenClassification"),f(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(fs,"id","transformers.TFFunnelForQuestionAnswering"),f(fs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(fs,"href","#transformers.TFFunnelForQuestionAnswering"),f(Xn,"class","relative group"),f(_i,"href","https://arxiv.org/abs/2006.03236"),f(_i,"rel","nofollow"),f(Tl,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.TFPreTrainedModel"),f(Ti,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Ti,"rel","nofollow"),f(wl,"href","/docs/transformers/v4.27.1/en/model_doc/funnel#transformers.TFFunnelForQuestionAnswering"),f(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(i,k){e(document.head,d),_(i,v,k),_(i,h,k),e(h,m),e(m,T),F(l,T,null),e(h,p),e(h,P),e(P,Te),_(i,ge,k),_(i,S,k),e(S,ce),e(ce,J),e(S,we),e(S,W),e(W,ue),_(i,H,k),_(i,ae,k),e(ae,ie),e(ie,Q),F(le,Q,null),e(ae,ye),e(ae,U),e(U,be),_(i,_e,k),_(i,B,k),e(B,Fe),e(B,de),e(de,ne),e(B,C),_(i,A,k),_(i,pe,k),e(pe,V),_(i,ke,k),_(i,he,k),e(he,K),e(K,$e),_(i,ve,k),_(i,j,k),e(j,Ee),_(i,R,k),_(i,se,k),e(se,fe),e(fe,Y),e(se,Me),e(se,me),e(me,I),e(se,qe),e(se,D),e(D,ze),e(D,ee),e(ee,O),e(D,Pe),e(D,L),e(L,xe),e(D,Ce),e(D,g),e(g,q),e(D,De),e(D,te),e(te,Ne),e(D,Ie),e(D,z),e(z,Se),e(D,Be),e(D,Ae),e(Ae,We),e(D,Qe),e(D,N),e(N,G),e(D,Ue),e(D,Oe),e(Oe,Z),e(D,Ke),_(i,Le,k),_(i,re,k),e(re,He),e(re,X),e(X,Re),e(re,Ch),e(re,js),e(js,jh),e(re,Ah),_(i,_u,k),_(i,cn,k),e(cn,oo),e(oo,Hl),F(As,Hl,null),e(cn,Oh),e(cn,Rl),e(Rl,Lh),_(i,ku,k),_(i,_t,k),e(_t,Vl),e(Vl,Mi),e(Mi,Dh),e(_t,Nh),e(_t,Yl),e(Yl,qi),e(qi,Ih),e(_t,Sh),e(_t,Gl),e(Gl,zi),e(zi,Bh),e(_t,Wh),e(_t,Zl),e(Zl,Pi),e(Pi,Qh),e(_t,Uh),e(_t,Xl),e(Xl,xi),e(xi,Kh),_(i,vu,k),_(i,un,k),e(un,so),e(so,Jl),F(Os,Jl,null),e(un,Hh),e(un,ed),e(ed,Rh),_(i,Tu,k),_(i,Jt,k),F(Ls,Jt,null),e(Jt,Vh),e(Jt,en),e(en,Yh),e(en,Ci),e(Ci,Gh),e(en,Zh),e(en,ji),e(ji,Xh),e(en,Jh),e(en,Ds),e(Ds,ef),e(en,tf),e(Jt,nf),e(Jt,pn),e(pn,of),e(pn,Ai),e(Ai,sf),e(pn,rf),e(pn,Oi),e(Oi,af),e(pn,lf),_(i,wu,k),_(i,hn,k),e(hn,ro),e(ro,td),F(Ns,td,null),e(hn,df),e(hn,nd),e(nd,cf),_(i,yu,k),_(i,et,k),F(Is,et,null),e(et,uf),e(et,od),e(od,pf),e(et,hf),e(et,Ss),e(Ss,ff),e(Ss,Li),e(Li,mf),e(Ss,gf),e(et,_f),e(et,tn),F(Bs,tn,null),e(tn,kf),e(tn,sd),e(sd,vf),e(tn,Tf),e(tn,Ws),e(Ws,Di),e(Di,wf),e(Di,rd),e(rd,yf),e(Ws,bf),e(Ws,Ni),e(Ni,Ff),e(Ni,ad),e(ad,$f),e(et,Ef),e(et,ao),F(Qs,ao,null),e(ao,Mf),e(ao,Us),e(Us,qf),e(Us,id),e(id,zf),e(Us,Pf),e(et,xf),e(et,jt),F(Ks,jt,null),e(jt,Cf),e(jt,ld),e(ld,jf),e(jt,Af),F(io,jt,null),e(jt,Of),e(jt,fn),e(fn,Lf),e(fn,dd),e(dd,Df),e(fn,Nf),e(fn,cd),e(cd,If),e(fn,Sf),e(et,Bf),e(et,Ii),F(Hs,Ii,null),_(i,bu,k),_(i,mn,k),e(mn,lo),e(lo,ud),F(Rs,ud,null),e(mn,Wf),e(mn,pd),e(pd,Qf),_(i,Fu,k),_(i,gt,k),F(Vs,gt,null),e(gt,Uf),e(gt,Ys),e(Ys,Kf),e(Ys,hd),e(hd,Hf),e(Ys,Rf),e(gt,Vf),e(gt,Gs),e(Gs,Yf),e(Gs,Si),e(Si,Gf),e(Gs,Zf),e(gt,Xf),e(gt,nn),F(Zs,nn,null),e(nn,Jf),e(nn,fd),e(fd,em),e(nn,tm),e(nn,Xs),e(Xs,Bi),e(Bi,nm),e(Bi,md),e(md,om),e(Xs,sm),e(Xs,Wi),e(Wi,rm),e(Wi,gd),e(gd,am),e(gt,im),e(gt,At),F(Js,At,null),e(At,lm),e(At,_d),e(_d,dm),e(At,cm),F(co,At,null),e(At,um),e(At,gn),e(gn,pm),e(gn,kd),e(kd,hm),e(gn,fm),e(gn,vd),e(vd,mm),e(gn,gm),_(i,$u,k),_(i,_n,k),e(_n,uo),e(uo,Td),F(er,Td,null),e(_n,_m),e(_n,wd),e(wd,km),_(i,Eu,k),_(i,kn,k),F(tr,kn,null),e(kn,vm),e(kn,nr),e(nr,Tm),e(nr,Qi),e(Qi,wm),e(nr,ym),_(i,Mu,k),_(i,vn,k),F(or,vn,null),e(vn,bm),e(vn,sr),e(sr,Fm),e(sr,Ui),e(Ui,$m),e(sr,Em),_(i,qu,k),_(i,Tn,k),e(Tn,po),e(po,yd),F(rr,yd,null),e(Tn,Mm),e(Tn,bd),e(bd,qm),_(i,zu,k),_(i,dt,k),F(ar,dt,null),e(dt,zm),e(dt,Fd),e(Fd,Pm),e(dt,xm),e(dt,ir),e(ir,Cm),e(ir,lr),e(lr,jm),e(ir,Am),e(dt,Om),e(dt,dr),e(dr,Lm),e(dr,Ki),e(Ki,Dm),e(dr,Nm),e(dt,Im),e(dt,cr),e(cr,Sm),e(cr,ur),e(ur,Bm),e(cr,Wm),e(dt,Qm),e(dt,Ot),F(pr,Ot,null),e(Ot,Um),e(Ot,wn),e(wn,Km),e(wn,Hi),e(Hi,Hm),e(wn,Rm),e(wn,$d),e($d,Vm),e(wn,Ym),e(Ot,Gm),F(ho,Ot,null),e(Ot,Zm),F(fo,Ot,null),_(i,Pu,k),_(i,yn,k),e(yn,mo),e(mo,Ed),F(hr,Ed,null),e(yn,Xm),e(yn,Md),e(Md,Jm),_(i,xu,k),_(i,ct,k),F(fr,ct,null),e(ct,eg),e(ct,qd),e(qd,tg),e(ct,ng),e(ct,mr),e(mr,og),e(mr,gr),e(gr,sg),e(mr,rg),e(ct,ag),e(ct,_r),e(_r,ig),e(_r,Ri),e(Ri,lg),e(_r,dg),e(ct,cg),e(ct,kr),e(kr,ug),e(kr,vr),e(vr,pg),e(kr,hg),e(ct,fg),e(ct,Lt),F(Tr,Lt,null),e(Lt,mg),e(Lt,bn),e(bn,gg),e(bn,Vi),e(Vi,_g),e(bn,kg),e(bn,zd),e(zd,vg),e(bn,Tg),e(Lt,wg),F(go,Lt,null),e(Lt,yg),F(_o,Lt,null),_(i,Cu,k),_(i,Fn,k),e(Fn,ko),e(ko,Pd),F(wr,Pd,null),e(Fn,bg),e(Fn,xd),e(xd,Fg),_(i,ju,k),_(i,$n,k),F(yr,$n,null),e($n,$g),e($n,Dt),F(br,Dt,null),e(Dt,Eg),e(Dt,En),e(En,Mg),e(En,Yi),e(Yi,qg),e(En,zg),e(En,Cd),e(Cd,Pg),e(En,xg),e(Dt,Cg),F(vo,Dt,null),e(Dt,jg),F(To,Dt,null),_(i,Au,k),_(i,Mn,k),e(Mn,wo),e(wo,jd),F(Fr,jd,null),e(Mn,Ag),e(Mn,Ad),e(Ad,Og),_(i,Ou,k),_(i,ut,k),F($r,ut,null),e(ut,Lg),e(ut,Er),e(Er,Dg),e(Er,Od),e(Od,Ng),e(Er,Ig),e(ut,Sg),e(ut,Mr),e(Mr,Bg),e(Mr,qr),e(qr,Wg),e(Mr,Qg),e(ut,Ug),e(ut,zr),e(zr,Kg),e(zr,Gi),e(Gi,Hg),e(zr,Rg),e(ut,Vg),e(ut,Pr),e(Pr,Yg),e(Pr,xr),e(xr,Gg),e(Pr,Zg),e(ut,Xg),e(ut,Nt),F(Cr,Nt,null),e(Nt,Jg),e(Nt,qn),e(qn,e_),e(qn,Zi),e(Zi,t_),e(qn,n_),e(qn,Ld),e(Ld,o_),e(qn,s_),e(Nt,r_),F(yo,Nt,null),e(Nt,a_),F(bo,Nt,null),_(i,Lu,k),_(i,zn,k),e(zn,Fo),e(Fo,Dd),F(jr,Dd,null),e(zn,i_),e(zn,Nd),e(Nd,l_),_(i,Du,k),_(i,pt,k),F(Ar,pt,null),e(pt,d_),e(pt,Id),e(Id,c_),e(pt,u_),e(pt,Or),e(Or,p_),e(Or,Lr),e(Lr,h_),e(Or,f_),e(pt,m_),e(pt,Dr),e(Dr,g_),e(Dr,Xi),e(Xi,__),e(Dr,k_),e(pt,v_),e(pt,Nr),e(Nr,T_),e(Nr,Ir),e(Ir,w_),e(Nr,y_),e(pt,b_),e(pt,kt),F(Sr,kt,null),e(kt,F_),e(kt,Pn),e(Pn,$_),e(Pn,Ji),e(Ji,E_),e(Pn,M_),e(Pn,Sd),e(Sd,q_),e(Pn,z_),e(kt,P_),F($o,kt,null),e(kt,x_),F(Eo,kt,null),e(kt,C_),F(Mo,kt,null),_(i,Nu,k),_(i,xn,k),e(xn,qo),e(qo,Bd),F(Br,Bd,null),e(xn,j_),e(xn,Wd),e(Wd,A_),_(i,Iu,k),_(i,ht,k),F(Wr,ht,null),e(ht,O_),e(ht,Qd),e(Qd,L_),e(ht,D_),e(ht,Qr),e(Qr,N_),e(Qr,Ur),e(Ur,I_),e(Qr,S_),e(ht,B_),e(ht,Kr),e(Kr,W_),e(Kr,el),e(el,Q_),e(Kr,U_),e(ht,K_),e(ht,Hr),e(Hr,H_),e(Hr,Rr),e(Rr,R_),e(Hr,V_),e(ht,Y_),e(ht,It),F(Vr,It,null),e(It,G_),e(It,Cn),e(Cn,Z_),e(Cn,tl),e(tl,X_),e(Cn,J_),e(Cn,Ud),e(Ud,ek),e(Cn,tk),e(It,nk),F(zo,It,null),e(It,ok),F(Po,It,null),_(i,Su,k),_(i,jn,k),e(jn,xo),e(xo,Kd),F(Yr,Kd,null),e(jn,sk),e(jn,Hd),e(Hd,rk),_(i,Bu,k),_(i,ft,k),F(Gr,ft,null),e(ft,ak),e(ft,Rd),e(Rd,ik),e(ft,lk),e(ft,Zr),e(Zr,dk),e(Zr,Xr),e(Xr,ck),e(Zr,uk),e(ft,pk),e(ft,Jr),e(Jr,hk),e(Jr,nl),e(nl,fk),e(Jr,mk),e(ft,gk),e(ft,ea),e(ea,_k),e(ea,ta),e(ta,kk),e(ea,vk),e(ft,Tk),e(ft,St),F(na,St,null),e(St,wk),e(St,An),e(An,yk),e(An,ol),e(ol,bk),e(An,Fk),e(An,Vd),e(Vd,$k),e(An,Ek),e(St,Mk),F(Co,St,null),e(St,qk),F(jo,St,null),_(i,Wu,k),_(i,On,k),e(On,Ao),e(Ao,Yd),F(oa,Yd,null),e(On,zk),e(On,Gd),e(Gd,Pk),_(i,Qu,k),_(i,mt,k),F(sa,mt,null),e(mt,xk),e(mt,Ln),e(Ln,Ck),e(Ln,Zd),e(Zd,jk),e(Ln,Ak),e(Ln,Xd),e(Xd,Ok),e(Ln,Lk),e(mt,Dk),e(mt,ra),e(ra,Nk),e(ra,aa),e(aa,Ik),e(ra,Sk),e(mt,Bk),e(mt,ia),e(ia,Wk),e(ia,sl),e(sl,Qk),e(ia,Uk),e(mt,Kk),e(mt,la),e(la,Hk),e(la,da),e(da,Rk),e(la,Vk),e(mt,Yk),e(mt,Bt),F(ca,Bt,null),e(Bt,Gk),e(Bt,Dn),e(Dn,Zk),e(Dn,rl),e(rl,Xk),e(Dn,Jk),e(Dn,Jd),e(Jd,ev),e(Dn,tv),e(Bt,nv),F(Oo,Bt,null),e(Bt,ov),F(Lo,Bt,null),_(i,Uu,k),_(i,Nn,k),e(Nn,Do),e(Do,ec),F(ua,ec,null),e(Nn,sv),e(Nn,tc),e(tc,rv),_(i,Ku,k),_(i,tt,k),F(pa,tt,null),e(tt,av),e(tt,nc),e(nc,iv),e(tt,lv),e(tt,ha),e(ha,dv),e(ha,fa),e(fa,cv),e(ha,uv),e(tt,pv),e(tt,ma),e(ma,hv),e(ma,al),e(al,fv),e(ma,mv),e(tt,gv),e(tt,ga),e(ga,_v),e(ga,_a),e(_a,kv),e(ga,vv),e(tt,Tv),F(No,tt,null),e(tt,wv),e(tt,Wt),F(ka,Wt,null),e(Wt,yv),e(Wt,In),e(In,bv),e(In,il),e(il,Fv),e(In,$v),e(In,oc),e(oc,Ev),e(In,Mv),e(Wt,qv),F(Io,Wt,null),e(Wt,zv),F(So,Wt,null),_(i,Hu,k),_(i,Sn,k),e(Sn,Bo),e(Bo,sc),F(va,sc,null),e(Sn,Pv),e(Sn,rc),e(rc,xv),_(i,Ru,k),_(i,nt,k),F(Ta,nt,null),e(nt,Cv),e(nt,ac),e(ac,jv),e(nt,Av),e(nt,wa),e(wa,Ov),e(wa,ya),e(ya,Lv),e(wa,Dv),e(nt,Nv),e(nt,ba),e(ba,Iv),e(ba,ll),e(ll,Sv),e(ba,Bv),e(nt,Wv),e(nt,Fa),e(Fa,Qv),e(Fa,$a),e($a,Uv),e(Fa,Kv),e(nt,Hv),F(Wo,nt,null),e(nt,Rv),e(nt,Qt),F(Ea,Qt,null),e(Qt,Vv),e(Qt,Bn),e(Bn,Yv),e(Bn,dl),e(dl,Gv),e(Bn,Zv),e(Bn,ic),e(ic,Xv),e(Bn,Jv),e(Qt,eT),F(Qo,Qt,null),e(Qt,tT),F(Uo,Qt,null),_(i,Vu,k),_(i,Wn,k),e(Wn,Ko),e(Ko,lc),F(Ma,lc,null),e(Wn,nT),e(Wn,dc),e(dc,oT),_(i,Yu,k),_(i,ot,k),F(qa,ot,null),e(ot,sT),e(ot,cc),e(cc,rT),e(ot,aT),e(ot,za),e(za,iT),e(za,Pa),e(Pa,lT),e(za,dT),e(ot,cT),e(ot,xa),e(xa,uT),e(xa,cl),e(cl,pT),e(xa,hT),e(ot,fT),e(ot,Ca),e(Ca,mT),e(Ca,ja),e(ja,gT),e(Ca,_T),e(ot,kT),F(Ho,ot,null),e(ot,vT),e(ot,Ut),F(Aa,Ut,null),e(Ut,TT),e(Ut,Qn),e(Qn,wT),e(Qn,ul),e(ul,yT),e(Qn,bT),e(Qn,uc),e(uc,FT),e(Qn,$T),e(Ut,ET),F(Ro,Ut,null),e(Ut,MT),F(Vo,Ut,null),_(i,Gu,k),_(i,Un,k),e(Un,Yo),e(Yo,pc),F(Oa,pc,null),e(Un,qT),e(Un,hc),e(hc,zT),_(i,Zu,k),_(i,st,k),F(La,st,null),e(st,PT),e(st,Da),e(Da,xT),e(Da,fc),e(fc,CT),e(Da,jT),e(st,AT),e(st,Na),e(Na,OT),e(Na,Ia),e(Ia,LT),e(Na,DT),e(st,NT),e(st,Sa),e(Sa,IT),e(Sa,pl),e(pl,ST),e(Sa,BT),e(st,WT),e(st,Ba),e(Ba,QT),e(Ba,Wa),e(Wa,UT),e(Ba,KT),e(st,HT),F(Go,st,null),e(st,RT),e(st,vt),F(Qa,vt,null),e(vt,VT),e(vt,Kn),e(Kn,YT),e(Kn,hl),e(hl,GT),e(Kn,ZT),e(Kn,mc),e(mc,XT),e(Kn,JT),e(vt,ew),F(Zo,vt,null),e(vt,tw),F(Xo,vt,null),e(vt,nw),F(Jo,vt,null),_(i,Xu,k),_(i,Hn,k),e(Hn,es),e(es,gc),F(Ua,gc,null),e(Hn,ow),e(Hn,_c),e(_c,sw),_(i,Ju,k),_(i,rt,k),F(Ka,rt,null),e(rt,rw),e(rt,kc),e(kc,aw),e(rt,iw),e(rt,Ha),e(Ha,lw),e(Ha,Ra),e(Ra,dw),e(Ha,cw),e(rt,uw),e(rt,Va),e(Va,pw),e(Va,fl),e(fl,hw),e(Va,fw),e(rt,mw),e(rt,Ya),e(Ya,gw),e(Ya,Ga),e(Ga,_w),e(Ya,kw),e(rt,vw),F(ts,rt,null),e(rt,Tw),e(rt,Tt),F(Za,Tt,null),e(Tt,ww),e(Tt,Rn),e(Rn,yw),e(Rn,ml),e(ml,bw),e(Rn,Fw),e(Rn,vc),e(vc,$w),e(Rn,Ew),e(Tt,Mw),F(ns,Tt,null),e(Tt,qw),F(os,Tt,null),e(Tt,zw),F(ss,Tt,null),_(i,ep,k),_(i,Vn,k),e(Vn,rs),e(rs,Tc),F(Xa,Tc,null),e(Vn,Pw),e(Vn,wc),e(wc,xw),_(i,tp,k),_(i,at,k),F(Ja,at,null),e(at,Cw),e(at,yc),e(yc,jw),e(at,Aw),e(at,ei),e(ei,Ow),e(ei,ti),e(ti,Lw),e(ei,Dw),e(at,Nw),e(at,ni),e(ni,Iw),e(ni,gl),e(gl,Sw),e(ni,Bw),e(at,Ww),e(at,oi),e(oi,Qw),e(oi,si),e(si,Uw),e(oi,Kw),e(at,Hw),F(as,at,null),e(at,Rw),e(at,Kt),F(ri,Kt,null),e(Kt,Vw),e(Kt,Yn),e(Yn,Yw),e(Yn,_l),e(_l,Gw),e(Yn,Zw),e(Yn,bc),e(bc,Xw),e(Yn,Jw),e(Kt,ey),F(is,Kt,null),e(Kt,ty),F(ls,Kt,null),_(i,np,k),_(i,Gn,k),e(Gn,ds),e(ds,Fc),F(ai,Fc,null),e(Gn,ny),e(Gn,$c),e($c,oy),_(i,op,k),_(i,it,k),F(ii,it,null),e(it,sy),e(it,Ec),e(Ec,ry),e(it,ay),e(it,li),e(li,iy),e(li,di),e(di,ly),e(li,dy),e(it,cy),e(it,ci),e(ci,uy),e(ci,kl),e(kl,py),e(ci,hy),e(it,fy),e(it,ui),e(ui,my),e(ui,pi),e(pi,gy),e(ui,_y),e(it,ky),F(cs,it,null),e(it,vy),e(it,wt),F(hi,wt,null),e(wt,Ty),e(wt,Zn),e(Zn,wy),e(Zn,vl),e(vl,yy),e(Zn,by),e(Zn,Mc),e(Mc,Fy),e(Zn,$y),e(wt,Ey),F(us,wt,null),e(wt,My),F(ps,wt,null),e(wt,qy),F(hs,wt,null),_(i,sp,k),_(i,Xn,k),e(Xn,fs),e(fs,qc),F(fi,qc,null),e(Xn,zy),e(Xn,zc),e(zc,Py),_(i,rp,k),_(i,lt,k),F(mi,lt,null),e(lt,xy),e(lt,Jn),e(Jn,Cy),e(Jn,Pc),e(Pc,jy),e(Jn,Ay),e(Jn,xc),e(xc,Oy),e(Jn,Ly),e(lt,Dy),e(lt,gi),e(gi,Ny),e(gi,_i),e(_i,Iy),e(gi,Sy),e(lt,By),e(lt,ki),e(ki,Wy),e(ki,Tl),e(Tl,Qy),e(ki,Uy),e(lt,Ky),e(lt,vi),e(vi,Hy),e(vi,Ti),e(Ti,Ry),e(vi,Vy),e(lt,Yy),F(ms,lt,null),e(lt,Gy),e(lt,yt),F(wi,yt,null),e(yt,Zy),e(yt,eo),e(eo,Xy),e(eo,wl),e(wl,Jy),e(eo,eb),e(eo,Cc),e(Cc,tb),e(eo,nb),e(yt,ob),F(gs,yt,null),e(yt,sb),F(_s,yt,null),e(yt,rb),F(ks,yt,null),ap=!0},p(i,[k]){const yi={};k&2&&(yi.$$scope={dirty:k,ctx:i}),io.$set(yi);const jc={};k&2&&(jc.$$scope={dirty:k,ctx:i}),co.$set(jc);const Ac={};k&2&&(Ac.$$scope={dirty:k,ctx:i}),ho.$set(Ac);const Oc={};k&2&&(Oc.$$scope={dirty:k,ctx:i}),fo.$set(Oc);const bi={};k&2&&(bi.$$scope={dirty:k,ctx:i}),go.$set(bi);const Lc={};k&2&&(Lc.$$scope={dirty:k,ctx:i}),_o.$set(Lc);const Dc={};k&2&&(Dc.$$scope={dirty:k,ctx:i}),vo.$set(Dc);const Fi={};k&2&&(Fi.$$scope={dirty:k,ctx:i}),To.$set(Fi);const Nc={};k&2&&(Nc.$$scope={dirty:k,ctx:i}),yo.$set(Nc);const Ic={};k&2&&(Ic.$$scope={dirty:k,ctx:i}),bo.$set(Ic);const Sc={};k&2&&(Sc.$$scope={dirty:k,ctx:i}),$o.$set(Sc);const $i={};k&2&&($i.$$scope={dirty:k,ctx:i}),Eo.$set($i);const Bc={};k&2&&(Bc.$$scope={dirty:k,ctx:i}),Mo.$set(Bc);const Wc={};k&2&&(Wc.$$scope={dirty:k,ctx:i}),zo.$set(Wc);const Qc={};k&2&&(Qc.$$scope={dirty:k,ctx:i}),Po.$set(Qc);const Uc={};k&2&&(Uc.$$scope={dirty:k,ctx:i}),Co.$set(Uc);const Kc={};k&2&&(Kc.$$scope={dirty:k,ctx:i}),jo.$set(Kc);const to={};k&2&&(to.$$scope={dirty:k,ctx:i}),Oo.$set(to);const Hc={};k&2&&(Hc.$$scope={dirty:k,ctx:i}),Lo.$set(Hc);const Rc={};k&2&&(Rc.$$scope={dirty:k,ctx:i}),No.$set(Rc);const Je={};k&2&&(Je.$$scope={dirty:k,ctx:i}),Io.$set(Je);const Vc={};k&2&&(Vc.$$scope={dirty:k,ctx:i}),So.$set(Vc);const Yc={};k&2&&(Yc.$$scope={dirty:k,ctx:i}),Wo.$set(Yc);const Gc={};k&2&&(Gc.$$scope={dirty:k,ctx:i}),Qo.$set(Gc);const Zc={};k&2&&(Zc.$$scope={dirty:k,ctx:i}),Uo.$set(Zc);const Xc={};k&2&&(Xc.$$scope={dirty:k,ctx:i}),Ho.$set(Xc);const Jc={};k&2&&(Jc.$$scope={dirty:k,ctx:i}),Ro.$set(Jc);const eu={};k&2&&(eu.$$scope={dirty:k,ctx:i}),Vo.$set(eu);const tu={};k&2&&(tu.$$scope={dirty:k,ctx:i}),Go.$set(tu);const no={};k&2&&(no.$$scope={dirty:k,ctx:i}),Zo.$set(no);const nu={};k&2&&(nu.$$scope={dirty:k,ctx:i}),Xo.$set(nu);const ou={};k&2&&(ou.$$scope={dirty:k,ctx:i}),Jo.$set(ou);const Ei={};k&2&&(Ei.$$scope={dirty:k,ctx:i}),ts.$set(Ei);const su={};k&2&&(su.$$scope={dirty:k,ctx:i}),ns.$set(su);const ru={};k&2&&(ru.$$scope={dirty:k,ctx:i}),os.$set(ru);const au={};k&2&&(au.$$scope={dirty:k,ctx:i}),ss.$set(au);const Ct={};k&2&&(Ct.$$scope={dirty:k,ctx:i}),as.$set(Ct);const iu={};k&2&&(iu.$$scope={dirty:k,ctx:i}),is.$set(iu);const lu={};k&2&&(lu.$$scope={dirty:k,ctx:i}),ls.$set(lu);const du={};k&2&&(du.$$scope={dirty:k,ctx:i}),cs.$set(du);const cu={};k&2&&(cu.$$scope={dirty:k,ctx:i}),us.$set(cu);const uu={};k&2&&(uu.$$scope={dirty:k,ctx:i}),ps.$set(uu);const pu={};k&2&&(pu.$$scope={dirty:k,ctx:i}),hs.$set(pu);const hu={};k&2&&(hu.$$scope={dirty:k,ctx:i}),ms.$set(hu);const fu={};k&2&&(fu.$$scope={dirty:k,ctx:i}),gs.$set(fu);const mu={};k&2&&(mu.$$scope={dirty:k,ctx:i}),_s.$set(mu);const gu={};k&2&&(gu.$$scope={dirty:k,ctx:i}),ks.$set(gu)},i(i){ap||($(l.$$.fragment,i),$(le.$$.fragment,i),$(As.$$.fragment,i),$(Os.$$.fragment,i),$(Ls.$$.fragment,i),$(Ns.$$.fragment,i),$(Is.$$.fragment,i),$(Bs.$$.fragment,i),$(Qs.$$.fragment,i),$(Ks.$$.fragment,i),$(io.$$.fragment,i),$(Hs.$$.fragment,i),$(Rs.$$.fragment,i),$(Vs.$$.fragment,i),$(Zs.$$.fragment,i),$(Js.$$.fragment,i),$(co.$$.fragment,i),$(er.$$.fragment,i),$(tr.$$.fragment,i),$(or.$$.fragment,i),$(rr.$$.fragment,i),$(ar.$$.fragment,i),$(pr.$$.fragment,i),$(ho.$$.fragment,i),$(fo.$$.fragment,i),$(hr.$$.fragment,i),$(fr.$$.fragment,i),$(Tr.$$.fragment,i),$(go.$$.fragment,i),$(_o.$$.fragment,i),$(wr.$$.fragment,i),$(yr.$$.fragment,i),$(br.$$.fragment,i),$(vo.$$.fragment,i),$(To.$$.fragment,i),$(Fr.$$.fragment,i),$($r.$$.fragment,i),$(Cr.$$.fragment,i),$(yo.$$.fragment,i),$(bo.$$.fragment,i),$(jr.$$.fragment,i),$(Ar.$$.fragment,i),$(Sr.$$.fragment,i),$($o.$$.fragment,i),$(Eo.$$.fragment,i),$(Mo.$$.fragment,i),$(Br.$$.fragment,i),$(Wr.$$.fragment,i),$(Vr.$$.fragment,i),$(zo.$$.fragment,i),$(Po.$$.fragment,i),$(Yr.$$.fragment,i),$(Gr.$$.fragment,i),$(na.$$.fragment,i),$(Co.$$.fragment,i),$(jo.$$.fragment,i),$(oa.$$.fragment,i),$(sa.$$.fragment,i),$(ca.$$.fragment,i),$(Oo.$$.fragment,i),$(Lo.$$.fragment,i),$(ua.$$.fragment,i),$(pa.$$.fragment,i),$(No.$$.fragment,i),$(ka.$$.fragment,i),$(Io.$$.fragment,i),$(So.$$.fragment,i),$(va.$$.fragment,i),$(Ta.$$.fragment,i),$(Wo.$$.fragment,i),$(Ea.$$.fragment,i),$(Qo.$$.fragment,i),$(Uo.$$.fragment,i),$(Ma.$$.fragment,i),$(qa.$$.fragment,i),$(Ho.$$.fragment,i),$(Aa.$$.fragment,i),$(Ro.$$.fragment,i),$(Vo.$$.fragment,i),$(Oa.$$.fragment,i),$(La.$$.fragment,i),$(Go.$$.fragment,i),$(Qa.$$.fragment,i),$(Zo.$$.fragment,i),$(Xo.$$.fragment,i),$(Jo.$$.fragment,i),$(Ua.$$.fragment,i),$(Ka.$$.fragment,i),$(ts.$$.fragment,i),$(Za.$$.fragment,i),$(ns.$$.fragment,i),$(os.$$.fragment,i),$(ss.$$.fragment,i),$(Xa.$$.fragment,i),$(Ja.$$.fragment,i),$(as.$$.fragment,i),$(ri.$$.fragment,i),$(is.$$.fragment,i),$(ls.$$.fragment,i),$(ai.$$.fragment,i),$(ii.$$.fragment,i),$(cs.$$.fragment,i),$(hi.$$.fragment,i),$(us.$$.fragment,i),$(ps.$$.fragment,i),$(hs.$$.fragment,i),$(fi.$$.fragment,i),$(mi.$$.fragment,i),$(ms.$$.fragment,i),$(wi.$$.fragment,i),$(gs.$$.fragment,i),$(_s.$$.fragment,i),$(ks.$$.fragment,i),ap=!0)},o(i){E(l.$$.fragment,i),E(le.$$.fragment,i),E(As.$$.fragment,i),E(Os.$$.fragment,i),E(Ls.$$.fragment,i),E(Ns.$$.fragment,i),E(Is.$$.fragment,i),E(Bs.$$.fragment,i),E(Qs.$$.fragment,i),E(Ks.$$.fragment,i),E(io.$$.fragment,i),E(Hs.$$.fragment,i),E(Rs.$$.fragment,i),E(Vs.$$.fragment,i),E(Zs.$$.fragment,i),E(Js.$$.fragment,i),E(co.$$.fragment,i),E(er.$$.fragment,i),E(tr.$$.fragment,i),E(or.$$.fragment,i),E(rr.$$.fragment,i),E(ar.$$.fragment,i),E(pr.$$.fragment,i),E(ho.$$.fragment,i),E(fo.$$.fragment,i),E(hr.$$.fragment,i),E(fr.$$.fragment,i),E(Tr.$$.fragment,i),E(go.$$.fragment,i),E(_o.$$.fragment,i),E(wr.$$.fragment,i),E(yr.$$.fragment,i),E(br.$$.fragment,i),E(vo.$$.fragment,i),E(To.$$.fragment,i),E(Fr.$$.fragment,i),E($r.$$.fragment,i),E(Cr.$$.fragment,i),E(yo.$$.fragment,i),E(bo.$$.fragment,i),E(jr.$$.fragment,i),E(Ar.$$.fragment,i),E(Sr.$$.fragment,i),E($o.$$.fragment,i),E(Eo.$$.fragment,i),E(Mo.$$.fragment,i),E(Br.$$.fragment,i),E(Wr.$$.fragment,i),E(Vr.$$.fragment,i),E(zo.$$.fragment,i),E(Po.$$.fragment,i),E(Yr.$$.fragment,i),E(Gr.$$.fragment,i),E(na.$$.fragment,i),E(Co.$$.fragment,i),E(jo.$$.fragment,i),E(oa.$$.fragment,i),E(sa.$$.fragment,i),E(ca.$$.fragment,i),E(Oo.$$.fragment,i),E(Lo.$$.fragment,i),E(ua.$$.fragment,i),E(pa.$$.fragment,i),E(No.$$.fragment,i),E(ka.$$.fragment,i),E(Io.$$.fragment,i),E(So.$$.fragment,i),E(va.$$.fragment,i),E(Ta.$$.fragment,i),E(Wo.$$.fragment,i),E(Ea.$$.fragment,i),E(Qo.$$.fragment,i),E(Uo.$$.fragment,i),E(Ma.$$.fragment,i),E(qa.$$.fragment,i),E(Ho.$$.fragment,i),E(Aa.$$.fragment,i),E(Ro.$$.fragment,i),E(Vo.$$.fragment,i),E(Oa.$$.fragment,i),E(La.$$.fragment,i),E(Go.$$.fragment,i),E(Qa.$$.fragment,i),E(Zo.$$.fragment,i),E(Xo.$$.fragment,i),E(Jo.$$.fragment,i),E(Ua.$$.fragment,i),E(Ka.$$.fragment,i),E(ts.$$.fragment,i),E(Za.$$.fragment,i),E(ns.$$.fragment,i),E(os.$$.fragment,i),E(ss.$$.fragment,i),E(Xa.$$.fragment,i),E(Ja.$$.fragment,i),E(as.$$.fragment,i),E(ri.$$.fragment,i),E(is.$$.fragment,i),E(ls.$$.fragment,i),E(ai.$$.fragment,i),E(ii.$$.fragment,i),E(cs.$$.fragment,i),E(hi.$$.fragment,i),E(us.$$.fragment,i),E(ps.$$.fragment,i),E(hs.$$.fragment,i),E(fi.$$.fragment,i),E(mi.$$.fragment,i),E(ms.$$.fragment,i),E(wi.$$.fragment,i),E(gs.$$.fragment,i),E(_s.$$.fragment,i),E(ks.$$.fragment,i),ap=!1},d(i){t(d),i&&t(v),i&&t(h),M(l),i&&t(ge),i&&t(S),i&&t(H),i&&t(ae),M(le),i&&t(_e),i&&t(B),i&&t(A),i&&t(pe),i&&t(ke),i&&t(he),i&&t(ve),i&&t(j),i&&t(R),i&&t(se),i&&t(Le),i&&t(re),i&&t(_u),i&&t(cn),M(As),i&&t(ku),i&&t(_t),i&&t(vu),i&&t(un),M(Os),i&&t(Tu),i&&t(Jt),M(Ls),i&&t(wu),i&&t(hn),M(Ns),i&&t(yu),i&&t(et),M(Is),M(Bs),M(Qs),M(Ks),M(io),M(Hs),i&&t(bu),i&&t(mn),M(Rs),i&&t(Fu),i&&t(gt),M(Vs),M(Zs),M(Js),M(co),i&&t($u),i&&t(_n),M(er),i&&t(Eu),i&&t(kn),M(tr),i&&t(Mu),i&&t(vn),M(or),i&&t(qu),i&&t(Tn),M(rr),i&&t(zu),i&&t(dt),M(ar),M(pr),M(ho),M(fo),i&&t(Pu),i&&t(yn),M(hr),i&&t(xu),i&&t(ct),M(fr),M(Tr),M(go),M(_o),i&&t(Cu),i&&t(Fn),M(wr),i&&t(ju),i&&t($n),M(yr),M(br),M(vo),M(To),i&&t(Au),i&&t(Mn),M(Fr),i&&t(Ou),i&&t(ut),M($r),M(Cr),M(yo),M(bo),i&&t(Lu),i&&t(zn),M(jr),i&&t(Du),i&&t(pt),M(Ar),M(Sr),M($o),M(Eo),M(Mo),i&&t(Nu),i&&t(xn),M(Br),i&&t(Iu),i&&t(ht),M(Wr),M(Vr),M(zo),M(Po),i&&t(Su),i&&t(jn),M(Yr),i&&t(Bu),i&&t(ft),M(Gr),M(na),M(Co),M(jo),i&&t(Wu),i&&t(On),M(oa),i&&t(Qu),i&&t(mt),M(sa),M(ca),M(Oo),M(Lo),i&&t(Uu),i&&t(Nn),M(ua),i&&t(Ku),i&&t(tt),M(pa),M(No),M(ka),M(Io),M(So),i&&t(Hu),i&&t(Sn),M(va),i&&t(Ru),i&&t(nt),M(Ta),M(Wo),M(Ea),M(Qo),M(Uo),i&&t(Vu),i&&t(Wn),M(Ma),i&&t(Yu),i&&t(ot),M(qa),M(Ho),M(Aa),M(Ro),M(Vo),i&&t(Gu),i&&t(Un),M(Oa),i&&t(Zu),i&&t(st),M(La),M(Go),M(Qa),M(Zo),M(Xo),M(Jo),i&&t(Xu),i&&t(Hn),M(Ua),i&&t(Ju),i&&t(rt),M(Ka),M(ts),M(Za),M(ns),M(os),M(ss),i&&t(ep),i&&t(Vn),M(Xa),i&&t(tp),i&&t(at),M(Ja),M(as),M(ri),M(is),M(ls),i&&t(np),i&&t(Gn),M(ai),i&&t(op),i&&t(it),M(ii),M(cs),M(hi),M(us),M(ps),M(hs),i&&t(sp),i&&t(Xn),M(fi),i&&t(rp),i&&t(lt),M(mi),M(ms),M(wi),M(gs),M(_s),M(ks)}}}const M$={local:"funnel-transformer",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.FunnelConfig",title:"FunnelConfig"},{local:"transformers.FunnelTokenizer",title:"FunnelTokenizer"},{local:"transformers.FunnelTokenizerFast",title:"FunnelTokenizerFast"},{local:"transformers.models.funnel.modeling_funnel.FunnelForPreTrainingOutput",title:"Funnel specific outputs"},{local:"transformers.FunnelBaseModel",title:"FunnelBaseModel"},{local:"transformers.FunnelModel",title:"FunnelModel"},{local:"transformers.FunnelForPreTraining",title:"FunnelModelForPreTraining"},{local:"transformers.FunnelForMaskedLM",title:"FunnelForMaskedLM"},{local:"transformers.FunnelForSequenceClassification",title:"FunnelForSequenceClassification"},{local:"transformers.FunnelForMultipleChoice",title:"FunnelForMultipleChoice"},{local:"transformers.FunnelForTokenClassification",title:"FunnelForTokenClassification"},{local:"transformers.FunnelForQuestionAnswering",title:"FunnelForQuestionAnswering"},{local:"transformers.TFFunnelBaseModel",title:"TFFunnelBaseModel"},{local:"transformers.TFFunnelModel",title:"TFFunnelModel"},{local:"transformers.TFFunnelForPreTraining",title:"TFFunnelModelForPreTraining"},{local:"transformers.TFFunnelForMaskedLM",title:"TFFunnelForMaskedLM"},{local:"transformers.TFFunnelForSequenceClassification",title:"TFFunnelForSequenceClassification"},{local:"transformers.TFFunnelForMultipleChoice",title:"TFFunnelForMultipleChoice"},{local:"transformers.TFFunnelForTokenClassification",title:"TFFunnelForTokenClassification"},{local:"transformers.TFFunnelForQuestionAnswering",title:"TFFunnelForQuestionAnswering"}],title:"Funnel Transformer"};function q$(x){return C2(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class O$ extends q2{constructor(d){super();z2(this,d,q$,E$,P2,{})}}export{O$ as default,M$ as metadata};
