import{S as Rg,i as Wg,s as Kg,e as r,k as h,w,t as n,M as Ug,c as a,d as t,m,a as i,x as y,h as s,b as _,G as e,g,y as $,q as C,o as F,B as E,v as Yg,L as Ve}from"../../chunks/vendor-hf-doc-builder.js";import{T as Xe}from"../../chunks/Tip-hf-doc-builder.js";import{D as ne}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Je}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as at}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Qe}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Hg(M){let d,v,p,u,k;return u=new Je({props:{code:`from transformers import ConvBertConfig, ConvBertModel

# Initializing a ConvBERT convbert-base-uncased style configuration
configuration = ConvBertConfig()

# Initializing a model (with random weights) from the convbert-base-uncased style configuration
model = ConvBertModel(configuration)

# Accessing the model configuration
configuration = model.config`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ConvBertConfig, ConvBertModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a ConvBERT convbert-base-uncased style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = ConvBertConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the convbert-base-uncased style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ConvBertModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=r("p"),v=n("Example:"),p=h(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example:"),c.forEach(t),p=m(l),y(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,v),g(l,p,c),$(u,l,c),k=!0},p:Ve,i(l){k||(C(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(p),E(u,l)}}}function Qg(M){let d,v,p,u,k;return u=new Je({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,highlighted:`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"> 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=r("p"),v=n("sequence pair mask has the following format:"),p=h(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"sequence pair mask has the following format:"),c.forEach(t),p=m(l),y(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,v),g(l,p,c),$(u,l,c),k=!0},p:Ve,i(l){k||(C(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(p),E(u,l)}}}function Vg(M){let d,v,p,u,k;return u=new Je({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,highlighted:`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"> 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=r("p"),v=n("sequence pair mask has the following format:"),p=h(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"sequence pair mask has the following format:"),c.forEach(t),p=m(l),y(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,v),g(l,p,c),$(u,l,c),k=!0},p:Ve,i(l){k||(C(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(p),E(u,l)}}}function Jg(M){let d,v,p,u,k;return{c(){d=r("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r("code"),u=n("Module"),k=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=a(l,"P",{});var c=i(d);v=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a(c,"CODE",{});var q=i(p);u=s(q,"Module"),q.forEach(t),k=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,v),e(d,p),e(p,u),e(d,k)},d(l){l&&t(d)}}}function Gg(M){let d,v,p,u,k;return u=new Je({props:{code:`from transformers import AutoTokenizer, ConvBertModel
import torch

tokenizer = AutoTokenizer.from_pretrained("YituTech/conv-bert-base")
model = ConvBertModel.from_pretrained("YituTech/conv-bert-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, ConvBertModel
<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;YituTech/conv-bert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ConvBertModel.from_pretrained(<span class="hljs-string">&quot;YituTech/conv-bert-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=r("p"),v=n("Example:"),p=h(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example:"),c.forEach(t),p=m(l),y(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,v),g(l,p,c),$(u,l,c),k=!0},p:Ve,i(l){k||(C(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(p),E(u,l)}}}function Xg(M){let d,v,p,u,k;return{c(){d=r("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r("code"),u=n("Module"),k=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=a(l,"P",{});var c=i(d);v=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a(c,"CODE",{});var q=i(p);u=s(q,"Module"),q.forEach(t),k=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,v),e(d,p),e(p,u),e(d,k)},d(l){l&&t(d)}}}function Zg(M){let d,v,p,u,k;return u=new Je({props:{code:`from transformers import AutoTokenizer, ConvBertForMaskedLM
import torch

tokenizer = AutoTokenizer.from_pretrained("YituTech/conv-bert-base")
model = ConvBertForMaskedLM.from_pretrained("YituTech/conv-bert-base")

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, ConvBertForMaskedLM
<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;YituTech/conv-bert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ConvBertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;YituTech/conv-bert-base&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;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 [MASK]</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-[MASK] 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=r("p"),v=n("Example:"),p=h(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example:"),c.forEach(t),p=m(l),y(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,v),g(l,p,c),$(u,l,c),k=!0},p:Ve,i(l){k||(C(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(p),E(u,l)}}}function e_(M){let d,v,p,u,k;return{c(){d=r("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r("code"),u=n("Module"),k=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=a(l,"P",{});var c=i(d);v=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a(c,"CODE",{});var q=i(p);u=s(q,"Module"),q.forEach(t),k=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,v),e(d,p),e(p,u),e(d,k)},d(l){l&&t(d)}}}function t_(M){let d,v,p,u,k;return u=new Je({props:{code:`import torch
from transformers import AutoTokenizer, ConvBertForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("YituTech/conv-bert-base")
model = ConvBertForSequenceClassification.from_pretrained("YituTech/conv-bert-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 = ConvBertForSequenceClassification.from_pretrained("YituTech/conv-bert-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, ConvBertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;YituTech/conv-bert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ConvBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;YituTech/conv-bert-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 = ConvBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;YituTech/conv-bert-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=r("p"),v=n("Example of single-label classification:"),p=h(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example of single-label classification:"),c.forEach(t),p=m(l),y(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,v),g(l,p,c),$(u,l,c),k=!0},p:Ve,i(l){k||(C(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(p),E(u,l)}}}function o_(M){let d,v,p,u,k;return u=new Je({props:{code:`import torch
from transformers import AutoTokenizer, ConvBertForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("YituTech/conv-bert-base")
model = ConvBertForSequenceClassification.from_pretrained("YituTech/conv-bert-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 = ConvBertForSequenceClassification.from_pretrained(
    "YituTech/conv-bert-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, ConvBertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;YituTech/conv-bert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ConvBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;YituTech/conv-bert-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 = ConvBertForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;YituTech/conv-bert-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=r("p"),v=n("Example of multi-label classification:"),p=h(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example of multi-label classification:"),c.forEach(t),p=m(l),y(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,v),g(l,p,c),$(u,l,c),k=!0},p:Ve,i(l){k||(C(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(p),E(u,l)}}}function n_(M){let d,v,p,u,k;return{c(){d=r("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r("code"),u=n("Module"),k=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=a(l,"P",{});var c=i(d);v=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a(c,"CODE",{});var q=i(p);u=s(q,"Module"),q.forEach(t),k=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,v),e(d,p),e(p,u),e(d,k)},d(l){l&&t(d)}}}function s_(M){let d,v,p,u,k;return u=new Je({props:{code:`from transformers import AutoTokenizer, ConvBertForMultipleChoice
import torch

tokenizer = AutoTokenizer.from_pretrained("YituTech/conv-bert-base")
model = ConvBertForMultipleChoice.from_pretrained("YituTech/conv-bert-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, ConvBertForMultipleChoice
<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;YituTech/conv-bert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ConvBertForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;YituTech/conv-bert-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=r("p"),v=n("Example:"),p=h(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example:"),c.forEach(t),p=m(l),y(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,v),g(l,p,c),$(u,l,c),k=!0},p:Ve,i(l){k||(C(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(p),E(u,l)}}}function r_(M){let d,v,p,u,k;return{c(){d=r("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r("code"),u=n("Module"),k=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=a(l,"P",{});var c=i(d);v=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a(c,"CODE",{});var q=i(p);u=s(q,"Module"),q.forEach(t),k=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,v),e(d,p),e(p,u),e(d,k)},d(l){l&&t(d)}}}function a_(M){let d,v,p,u,k;return u=new Je({props:{code:`from transformers import AutoTokenizer, ConvBertForTokenClassification
import torch

tokenizer = AutoTokenizer.from_pretrained("YituTech/conv-bert-base")
model = ConvBertForTokenClassification.from_pretrained("YituTech/conv-bert-base")

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, ConvBertForTokenClassification
<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;YituTech/conv-bert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ConvBertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;YituTech/conv-bert-base&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=r("p"),v=n("Example:"),p=h(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example:"),c.forEach(t),p=m(l),y(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,v),g(l,p,c),$(u,l,c),k=!0},p:Ve,i(l){k||(C(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(p),E(u,l)}}}function i_(M){let d,v,p,u,k;return{c(){d=r("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r("code"),u=n("Module"),k=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=a(l,"P",{});var c=i(d);v=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a(c,"CODE",{});var q=i(p);u=s(q,"Module"),q.forEach(t),k=s(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){g(l,d,c),e(d,v),e(d,p),e(p,u),e(d,k)},d(l){l&&t(d)}}}function l_(M){let d,v,p,u,k;return u=new Je({props:{code:`from transformers import AutoTokenizer, ConvBertForQuestionAnswering
import torch

tokenizer = AutoTokenizer.from_pretrained("YituTech/conv-bert-base")
model = ConvBertForQuestionAnswering.from_pretrained("YituTech/conv-bert-base")

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

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

tokenizer = AutoTokenizer.from_pretrained("YituTech/conv-bert-base")
model = TFConvBertForMaskedLM.from_pretrained("YituTech/conv-bert-base")

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

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

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

tokenizer = AutoTokenizer.from_pretrained("YituTech/conv-bert-base")
model = TFConvBertForTokenClassification.from_pretrained("YituTech/conv-bert-base")

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

tokenizer = AutoTokenizer.from_pretrained("YituTech/conv-bert-base")
model = TFConvBertForQuestionAnswering.from_pretrained("YituTech/conv-bert-base")

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, TFConvBertForQuestionAnswering
<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;YituTech/conv-bert-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFConvBertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;YituTech/conv-bert-base&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=r("p"),v=n("Example:"),p=h(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example:"),c.forEach(t),p=m(l),y(u.$$.fragment,l)},m(l,c){g(l,d,c),e(d,v),g(l,p,c),$(u,l,c),k=!0},p:Ve,i(l){k||(C(u.$$.fragment,l),k=!0)},o(l){F(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(p),E(u,l)}}}function M_(M){let d,v;return d=new Je({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(){w(d.$$.fragment)},l(p){y(d.$$.fragment,p)},m(p,u){$(d,p,u),v=!0},p:Ve,i(p){v||(C(d.$$.fragment,p),v=!0)},o(p){F(d.$$.fragment,p),v=!1},d(p){E(d,p)}}}function q_(M){let d,v,p,u,k,l,c,q,be,me,D,se,X,T,Te,V,we,ue,W,ye,ae,J,$e,fe,H,Ce,ge,Q,ce,Fe,Z,j,A,_e,L,Ee,ie,G,Be,le,P,ve,I,re,pe,Y,ze,he,S,ke,N,de,ee,x,Me,O,qe,je,f,B,Re,te,xe,We,z,Ke,Ue,Ne,Ye,He,R,K,Ie,Ae,U,De,Oe,Pe,Le,oe,Se,Ge,Pn,Zl,ra,ed,td,On,od,ur,nd,sd,rd,Pt,Nn,ad,aa,id,ld,Dn,fr,dd,ia,cd,pd,gr,hd,la,md,ud,yo,Ln,fd,In,gd,da,_d,vd,kd,_t,Sn,bd,ca,Td,wd,$o,yd,Wt,$d,pa,Cd,Fd,ha,Ed,Bd,zd,_r,Rn,Wi,Kt,Co,ma,Wn,Md,ua,qd,Ki,it,Kn,jd,Un,xd,fa,Ad,Pd,Od,Yn,Nd,vr,Dd,Ld,Id,Ot,Hn,Sd,ga,Rd,Wd,Qn,kr,Kd,_a,Ud,Yd,br,Hd,va,Qd,Vd,vt,Vn,Jd,ka,Gd,Xd,Fo,Zd,Ut,ec,ba,tc,oc,Ta,nc,sc,Ui,Yt,Eo,wa,Jn,rc,ya,ac,Yi,jt,Gn,ic,Xn,lc,Zn,dc,cc,pc,kt,es,hc,Ht,mc,Tr,uc,fc,$a,gc,_c,vc,Bo,kc,zo,Hi,Qt,Mo,Ca,ts,bc,Fa,Tc,Qi,xt,os,wc,Vt,yc,Ea,$c,Cc,ns,Fc,Ec,Bc,bt,ss,zc,Jt,Mc,wr,qc,jc,Ba,xc,Ac,Pc,qo,Oc,jo,Vi,Gt,xo,za,rs,Nc,Ma,Dc,Ji,mt,as,Lc,qa,Ic,Sc,is,Rc,ls,Wc,Kc,Uc,lt,ds,Yc,Xt,Hc,yr,Qc,Vc,ja,Jc,Gc,Xc,Ao,Zc,Po,ep,Oo,Gi,Zt,No,xa,cs,tp,Aa,op,Xi,ut,ps,np,Pa,sp,rp,hs,ap,ms,ip,lp,dp,Tt,us,cp,eo,pp,$r,hp,mp,Oa,up,fp,gp,Do,_p,Lo,Zi,to,Io,Na,fs,vp,Da,kp,el,ft,gs,bp,La,Tp,wp,_s,yp,vs,$p,Cp,Fp,wt,ks,Ep,oo,Bp,Cr,zp,Mp,Ia,qp,jp,xp,So,Ap,Ro,tl,no,Wo,Sa,bs,Pp,Ra,Op,ol,gt,Ts,Np,so,Dp,Wa,Lp,Ip,Ka,Sp,Rp,Wp,ws,Kp,ys,Up,Yp,Hp,yt,$s,Qp,ro,Vp,Fr,Jp,Gp,Ua,Xp,Zp,eh,Ko,th,Uo,nl,ao,Yo,Ya,Cs,oh,Ha,nh,sl,Ze,Fs,sh,Qa,rh,ah,Es,ih,Er,lh,dh,ch,Bs,ph,zs,hh,mh,uh,Ho,fh,$t,Ms,gh,io,_h,Br,vh,kh,Va,bh,Th,wh,Qo,yh,Vo,rl,lo,Jo,Ja,qs,$h,Ga,Ch,al,et,js,Fh,xs,Eh,Xa,Bh,zh,Mh,As,qh,zr,jh,xh,Ah,Ps,Ph,Os,Oh,Nh,Dh,Go,Lh,dt,Ns,Ih,co,Sh,Mr,Rh,Wh,Za,Kh,Uh,Yh,Xo,Hh,Zo,Qh,en,il,po,tn,ei,Ds,Vh,ti,Jh,ll,tt,Ls,Gh,oi,Xh,Zh,Is,em,qr,tm,om,nm,Ss,sm,Rs,rm,am,im,on,lm,ct,Ws,dm,ho,cm,jr,pm,hm,ni,mm,um,fm,nn,gm,sn,_m,rn,dl,mo,an,si,Ks,vm,ri,km,cl,ot,Us,bm,ai,Tm,wm,Ys,ym,xr,$m,Cm,Fm,Hs,Em,Qs,Bm,zm,Mm,ln,qm,Ct,Vs,jm,uo,xm,Ar,Am,Pm,ii,Om,Nm,Dm,dn,Lm,cn,pl,fo,pn,li,Js,Im,di,Sm,hl,nt,Gs,Rm,ci,Wm,Km,Xs,Um,Pr,Ym,Hm,Qm,Zs,Vm,er,Jm,Gm,Xm,hn,Zm,pt,tr,eu,go,tu,Or,ou,nu,pi,su,ru,au,mn,iu,un,lu,fn,ml,_o,gn,hi,or,du,mi,cu,ul,st,nr,pu,vo,hu,ui,mu,uu,fi,fu,gu,_u,sr,vu,Nr,ku,bu,Tu,rr,wu,ar,yu,$u,Cu,_n,Fu,ht,ir,Eu,ko,Bu,Dr,zu,Mu,gi,qu,ju,xu,vn,Au,kn,Pu,bn,fl;return l=new at({}),T=new at({}),Y=new at({}),de=new ne({props:{name:"class transformers.ConvBertConfig",anchor:"transformers.ConvBertConfig",parameters:[{name:"vocab_size",val:" = 30522"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"embedding_size",val:" = 768"},{name:"head_ratio",val:" = 2"},{name:"conv_kernel_size",val:" = 9"},{name:"num_groups",val:" = 1"},{name:"classifier_dropout",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConvBertConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the ConvBERT model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertModel">ConvBertModel</a> or <a href="/docs/transformers/main/en/model_doc/convbert#transformers.TFConvBertModel">TFConvBertModel</a>.`,name:"vocab_size"},{anchor:"transformers.ConvBertConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.ConvBertConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.ConvBertConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.ConvBertConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.ConvBertConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&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;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.ConvBertConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.ConvBertConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.ConvBertConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.ConvBertConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertModel">ConvBertModel</a> or <a href="/docs/transformers/main/en/model_doc/convbert#transformers.TFConvBertModel">TFConvBertModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.ConvBertConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.ConvBertConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.ConvBertConfig.head_ratio",description:`<strong>head_ratio</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
Ratio gamma to reduce the number of attention heads.`,name:"head_ratio"},{anchor:"transformers.ConvBertConfig.num_groups",description:`<strong>num_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of groups for grouped linear layers for ConvBert model`,name:"num_groups"},{anchor:"transformers.ConvBertConfig.conv_kernel_size",description:`<strong>conv_kernel_size</strong> (<code>int</code>, <em>optional</em>, defaults to 9) &#x2014;
The size of the convolutional kernel.`,name:"conv_kernel_size"},{anchor:"transformers.ConvBertConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/convbert/configuration_convbert.py#L37"}}),K=new Qe({props:{anchor:"transformers.ConvBertConfig.example",$$slots:{default:[Hg]},$$scope:{ctx:M}}}),Oe=new at({}),Pn=new ne({props:{name:"class transformers.ConvBertTokenizer",anchor:"transformers.ConvBertTokenizer",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:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConvBertTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.ConvBertTokenizer.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.ConvBertTokenizer.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.ConvBertTokenizer.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.ConvBertTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&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.ConvBertTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&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.ConvBertTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[PAD]&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.ConvBertTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&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.ConvBertTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&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.ConvBertTokenizer.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.ConvBertTokenizer.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 ConvBERT).`,name:"strip_accents"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/convbert/tokenization_convbert.py#L76"}}),Nn=new ne({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.ConvBertTokenizer.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.ConvBertTokenizer.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.ConvBertTokenizer.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/main/src/transformers/models/convbert/tokenization_convbert.py#L207",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>
`}}),Ln=new ne({props:{name:"get_special_tokens_mask",anchor:"transformers.ConvBertTokenizer.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.ConvBertTokenizer.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.ConvBertTokenizer.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.ConvBertTokenizer.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/main/src/transformers/models/convbert/tokenization_convbert.py#L232",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>
`}}),Sn=new ne({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.ConvBertTokenizer.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.ConvBertTokenizer.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.ConvBertTokenizer.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/main/src/transformers/models/convbert/tokenization_convbert.py#L260",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>
`}}),$o=new Qe({props:{anchor:"transformers.ConvBertTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[Qg]},$$scope:{ctx:M}}}),Rn=new ne({props:{name:"save_vocabulary",anchor:"transformers.ConvBertTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/convbert/tokenization_convbert.py#L289"}}),Wn=new at({}),Kn=new ne({props:{name:"class transformers.ConvBertTokenizerFast",anchor:"transformers.ConvBertTokenizerFast",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:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ConvBertTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.ConvBertTokenizerFast.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.ConvBertTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&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.ConvBertTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&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.ConvBertTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[PAD]&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.ConvBertTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&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.ConvBertTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&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.ConvBertTokenizerFast.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.ConvBertTokenizerFast.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.ConvBertTokenizerFast.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 ConvBERT).`,name:"strip_accents"},{anchor:"transformers.ConvBertTokenizerFast.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/main/src/transformers/models/convbert/tokenization_convbert_fast.py#L55"}}),Hn=new ne({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.ConvBertTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.ConvBertTokenizerFast.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.ConvBertTokenizerFast.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/main/src/transformers/models/convbert/tokenization_convbert_fast.py#L143",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>
`}}),Vn=new ne({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.ConvBertTokenizerFast.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.ConvBertTokenizerFast.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.ConvBertTokenizerFast.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/main/src/transformers/models/convbert/tokenization_convbert_fast.py#L167",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>
`}}),Fo=new Qe({props:{anchor:"transformers.ConvBertTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[Vg]},$$scope:{ctx:M}}}),Jn=new at({}),Gn=new ne({props:{name:"class transformers.ConvBertModel",anchor:"transformers.ConvBertModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ConvBertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertConfig">ConvBertConfig</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/main/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/main/src/transformers/models/convbert/modeling_convbert.py#L764"}}),es=new ne({props:{name:"forward",anchor:"transformers.ConvBertModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = 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.ConvBertModel.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.ConvBertModel.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>:`,name:"attention_mask"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/convbert/modeling_convbert.py#L793",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithCrossAttentions</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/main/en/model_doc/convbert#transformers.ConvBertConfig"
>ConvBertConfig</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>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=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 of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Bo=new Xe({props:{$$slots:{default:[Jg]},$$scope:{ctx:M}}}),zo=new Qe({props:{anchor:"transformers.ConvBertModel.forward.example",$$slots:{default:[Gg]},$$scope:{ctx:M}}}),ts=new at({}),os=new ne({props:{name:"class transformers.ConvBertForMaskedLM",anchor:"transformers.ConvBertForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ConvBertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertConfig">ConvBertConfig</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/main/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/main/src/transformers/models/convbert/modeling_convbert.py#L879"}}),ss=new ne({props:{name:"forward",anchor:"transformers.ConvBertForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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.ConvBertForMaskedLM.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.ConvBertForMaskedLM.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>:`,name:"attention_mask"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/convbert/modeling_convbert.py#L898",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/convbert#transformers.ConvBertConfig"
>ConvBertConfig</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/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qo=new Xe({props:{$$slots:{default:[Xg]},$$scope:{ctx:M}}}),jo=new Qe({props:{anchor:"transformers.ConvBertForMaskedLM.forward.example",$$slots:{default:[Zg]},$$scope:{ctx:M}}}),rs=new at({}),as=new ne({props:{name:"class transformers.ConvBertForSequenceClassification",anchor:"transformers.ConvBertForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ConvBertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertConfig">ConvBertConfig</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/main/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/main/src/transformers/models/convbert/modeling_convbert.py#L990"}}),ds=new ne({props:{name:"forward",anchor:"transformers.ConvBertForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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.ConvBertForSequenceClassification.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.ConvBertForSequenceClassification.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>:`,name:"attention_mask"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/convbert/modeling_convbert.py#L1003",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/convbert#transformers.ConvBertConfig"
>ConvBertConfig</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/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ao=new Xe({props:{$$slots:{default:[e_]},$$scope:{ctx:M}}}),Po=new Qe({props:{anchor:"transformers.ConvBertForSequenceClassification.forward.example",$$slots:{default:[t_]},$$scope:{ctx:M}}}),Oo=new Qe({props:{anchor:"transformers.ConvBertForSequenceClassification.forward.example-2",$$slots:{default:[o_]},$$scope:{ctx:M}}}),cs=new at({}),ps=new ne({props:{name:"class transformers.ConvBertForMultipleChoice",anchor:"transformers.ConvBertForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ConvBertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertConfig">ConvBertConfig</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/main/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/main/src/transformers/models/convbert/modeling_convbert.py#L1087"}}),us=new ne({props:{name:"forward",anchor:"transformers.ConvBertForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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.ConvBertForMultipleChoice.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.ConvBertForMultipleChoice.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>:`,name:"attention_mask"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/convbert/modeling_convbert.py#L1100",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/convbert#transformers.ConvBertConfig"
>ConvBertConfig</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/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Do=new Xe({props:{$$slots:{default:[n_]},$$scope:{ctx:M}}}),Lo=new Qe({props:{anchor:"transformers.ConvBertForMultipleChoice.forward.example",$$slots:{default:[s_]},$$scope:{ctx:M}}}),fs=new at({}),gs=new ne({props:{name:"class transformers.ConvBertForTokenClassification",anchor:"transformers.ConvBertForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ConvBertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertConfig">ConvBertConfig</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/main/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/main/src/transformers/models/convbert/modeling_convbert.py#L1182"}}),ks=new ne({props:{name:"forward",anchor:"transformers.ConvBertForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = 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.ConvBertForTokenClassification.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.ConvBertForTokenClassification.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>:`,name:"attention_mask"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/convbert/modeling_convbert.py#L1199",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/convbert#transformers.ConvBertConfig"
>ConvBertConfig</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/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),So=new Xe({props:{$$slots:{default:[r_]},$$scope:{ctx:M}}}),Ro=new Qe({props:{anchor:"transformers.ConvBertForTokenClassification.forward.example",$$slots:{default:[a_]},$$scope:{ctx:M}}}),bs=new at({}),Ts=new ne({props:{name:"class transformers.ConvBertForQuestionAnswering",anchor:"transformers.ConvBertForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ConvBertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertConfig">ConvBertConfig</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/main/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/main/src/transformers/models/convbert/modeling_convbert.py#L1265"}}),$s=new ne({props:{name:"forward",anchor:"transformers.ConvBertForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = 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.ConvBertForQuestionAnswering.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/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.ConvBertForQuestionAnswering.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>:`,name:"attention_mask"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/convbert/modeling_convbert.py#L1278",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/convbert#transformers.ConvBertConfig"
>ConvBertConfig</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/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ko=new Xe({props:{$$slots:{default:[i_]},$$scope:{ctx:M}}}),Uo=new Qe({props:{anchor:"transformers.ConvBertForQuestionAnswering.forward.example",$$slots:{default:[l_]},$$scope:{ctx:M}}}),Cs=new at({}),Fs=new ne({props:{name:"class transformers.TFConvBertModel",anchor:"transformers.TFConvBertModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFConvBertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertConfig">ConvBertConfig</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/main/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/main/src/transformers/models/convbert/modeling_tf_convbert.py#L739"}}),Ho=new Xe({props:{$$slots:{default:[d_]},$$scope:{ctx:M}}}),Ms=new ne({props:{name:"call",anchor:"transformers.TFConvBertModel.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[<built-in function array>, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[<built-in function array>, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[<built-in function array>, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[<built-in function array>, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.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"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFConvBertModel.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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.TFConvBertModel.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.TFConvBertModel.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.TFConvBertModel.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFConvBertModel.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFConvBertModel.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.TFConvBertModel.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.TFConvBertModel.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.TFConvBertModel.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/main/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.TFConvBertModel.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/main/src/transformers/models/convbert/modeling_tf_convbert.py#L745",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/convbert#transformers.ConvBertConfig"
>ConvBertConfig</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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Qo=new Xe({props:{$$slots:{default:[c_]},$$scope:{ctx:M}}}),Vo=new Qe({props:{anchor:"transformers.TFConvBertModel.call.example",$$slots:{default:[p_]},$$scope:{ctx:M}}}),qs=new at({}),js=new ne({props:{name:"class transformers.TFConvBertForMaskedLM",anchor:"transformers.TFConvBertForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFConvBertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertConfig">ConvBertConfig</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/main/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/main/src/transformers/models/convbert/modeling_tf_convbert.py#L840"}}),Go=new Xe({props:{$$slots:{default:[h_]},$$scope:{ctx:M}}}),Ns=new ne({props:{name:"call",anchor:"transformers.TFConvBertForMaskedLM.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:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.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"},{name:"labels",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFConvBertForMaskedLM.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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.TFConvBertForMaskedLM.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.TFConvBertForMaskedLM.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.TFConvBertForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFConvBertForMaskedLM.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFConvBertForMaskedLM.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.TFConvBertForMaskedLM.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.TFConvBertForMaskedLM.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.TFConvBertForMaskedLM.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/main/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.TFConvBertForMaskedLM.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.TFConvBertForMaskedLM.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/main/src/transformers/models/convbert/modeling_tf_convbert.py#L861",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/convbert#transformers.ConvBertConfig"
>ConvBertConfig</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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Xo=new Xe({props:{$$slots:{default:[m_]},$$scope:{ctx:M}}}),Zo=new Qe({props:{anchor:"transformers.TFConvBertForMaskedLM.call.example",$$slots:{default:[u_]},$$scope:{ctx:M}}}),en=new Qe({props:{anchor:"transformers.TFConvBertForMaskedLM.call.example-2",$$slots:{default:[f_]},$$scope:{ctx:M}}}),Ds=new at({}),Ls=new ne({props:{name:"class transformers.TFConvBertForSequenceClassification",anchor:"transformers.TFConvBertForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFConvBertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertConfig">ConvBertConfig</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/main/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/main/src/transformers/models/convbert/modeling_tf_convbert.py#L961"}}),on=new Xe({props:{$$slots:{default:[g_]},$$scope:{ctx:M}}}),Ws=new ne({props:{name:"call",anchor:"transformers.TFConvBertForSequenceClassification.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:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.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"},{name:"labels",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFConvBertForSequenceClassification.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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.TFConvBertForSequenceClassification.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.TFConvBertForSequenceClassification.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.TFConvBertForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFConvBertForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFConvBertForSequenceClassification.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.TFConvBertForSequenceClassification.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.TFConvBertForSequenceClassification.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.TFConvBertForSequenceClassification.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/main/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.TFConvBertForSequenceClassification.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.TFConvBertForSequenceClassification.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/main/src/transformers/models/convbert/modeling_tf_convbert.py#L968",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/convbert#transformers.ConvBertConfig"
>ConvBertConfig</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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),nn=new Xe({props:{$$slots:{default:[__]},$$scope:{ctx:M}}}),sn=new Qe({props:{anchor:"transformers.TFConvBertForSequenceClassification.call.example",$$slots:{default:[v_]},$$scope:{ctx:M}}}),rn=new Qe({props:{anchor:"transformers.TFConvBertForSequenceClassification.call.example-2",$$slots:{default:[k_]},$$scope:{ctx:M}}}),Ks=new at({}),Us=new ne({props:{name:"class transformers.TFConvBertForMultipleChoice",anchor:"transformers.TFConvBertForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFConvBertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertConfig">ConvBertConfig</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/main/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/main/src/transformers/models/convbert/modeling_tf_convbert.py#L1036"}}),ln=new Xe({props:{$$slots:{default:[b_]},$$scope:{ctx:M}}}),Vs=new ne({props:{name:"call",anchor:"transformers.TFConvBertForMultipleChoice.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:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.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"},{name:"labels",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFConvBertForMultipleChoice.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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.TFConvBertForMultipleChoice.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.TFConvBertForMultipleChoice.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.TFConvBertForMultipleChoice.call.position_ids",description:`<strong>position_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;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFConvBertForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFConvBertForMultipleChoice.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.TFConvBertForMultipleChoice.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.TFConvBertForMultipleChoice.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.TFConvBertForMultipleChoice.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/main/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.TFConvBertForMultipleChoice.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.TFConvBertForMultipleChoice.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/main/src/transformers/models/convbert/modeling_tf_convbert.py#L1058",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/convbert#transformers.ConvBertConfig"
>ConvBertConfig</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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),dn=new Xe({props:{$$slots:{default:[T_]},$$scope:{ctx:M}}}),cn=new Qe({props:{anchor:"transformers.TFConvBertForMultipleChoice.call.example",$$slots:{default:[w_]},$$scope:{ctx:M}}}),Js=new at({}),Gs=new ne({props:{name:"class transformers.TFConvBertForTokenClassification",anchor:"transformers.TFConvBertForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFConvBertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertConfig">ConvBertConfig</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/main/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/main/src/transformers/models/convbert/modeling_tf_convbert.py#L1159"}}),hn=new Xe({props:{$$slots:{default:[y_]},$$scope:{ctx:M}}}),tr=new ne({props:{name:"call",anchor:"transformers.TFConvBertForTokenClassification.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:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.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"},{name:"labels",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFConvBertForTokenClassification.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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.TFConvBertForTokenClassification.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.TFConvBertForTokenClassification.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.TFConvBertForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFConvBertForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFConvBertForTokenClassification.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.TFConvBertForTokenClassification.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.TFConvBertForTokenClassification.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.TFConvBertForTokenClassification.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/main/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.TFConvBertForTokenClassification.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.TFConvBertForTokenClassification.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/main/src/transformers/models/convbert/modeling_tf_convbert.py#L1173",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/convbert#transformers.ConvBertConfig"
>ConvBertConfig</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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),mn=new Xe({props:{$$slots:{default:[$_]},$$scope:{ctx:M}}}),un=new Qe({props:{anchor:"transformers.TFConvBertForTokenClassification.call.example",$$slots:{default:[C_]},$$scope:{ctx:M}}}),fn=new Qe({props:{anchor:"transformers.TFConvBertForTokenClassification.call.example-2",$$slots:{default:[F_]},$$scope:{ctx:M}}}),or=new at({}),nr=new ne({props:{name:"class transformers.TFConvBertForQuestionAnswering",anchor:"transformers.TFConvBertForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFConvBertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertConfig">ConvBertConfig</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/main/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/main/src/transformers/models/convbert/modeling_tf_convbert.py#L1240"}}),_n=new Xe({props:{$$slots:{default:[E_]},$$scope:{ctx:M}}}),ir=new ne({props:{name:"call",anchor:"transformers.TFConvBertForQuestionAnswering.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:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Optional[tensorflow.python.framework.ops.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"},{name:"start_positions",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"end_positions",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"training",val:": typing.Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFConvBertForQuestionAnswering.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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/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.TFConvBertForQuestionAnswering.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.TFConvBertForQuestionAnswering.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.TFConvBertForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFConvBertForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFConvBertForQuestionAnswering.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.TFConvBertForQuestionAnswering.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.TFConvBertForQuestionAnswering.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.TFConvBertForQuestionAnswering.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/main/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.TFConvBertForQuestionAnswering.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.TFConvBertForQuestionAnswering.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.TFConvBertForQuestionAnswering.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/main/src/transformers/models/convbert/modeling_tf_convbert.py#L1250",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/convbert#transformers.ConvBertConfig"
>ConvBertConfig</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/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),vn=new Xe({props:{$$slots:{default:[B_]},$$scope:{ctx:M}}}),kn=new Qe({props:{anchor:"transformers.TFConvBertForQuestionAnswering.call.example",$$slots:{default:[z_]},$$scope:{ctx:M}}}),bn=new Qe({props:{anchor:"transformers.TFConvBertForQuestionAnswering.call.example-2",$$slots:{default:[M_]},$$scope:{ctx:M}}}),{c(){d=r("meta"),v=h(),p=r("h1"),u=r("a"),k=r("span"),w(l.$$.fragment),c=h(),q=r("span"),be=n("ConvBERT"),me=h(),D=r("h2"),se=r("a"),X=r("span"),w(T.$$.fragment),Te=h(),V=r("span"),we=n("Overview"),ue=h(),W=r("p"),ye=n("The ConvBERT model was proposed in "),ae=r("a"),J=n("ConvBERT: Improving BERT with Span-based Dynamic Convolution"),$e=n(` by Zihang Jiang, Weihao Yu, Daquan Zhou, Yunpeng Chen, Jiashi Feng, Shuicheng
Yan.`),fe=h(),H=r("p"),Ce=n("The abstract from the paper is the following:"),ge=h(),Q=r("p"),ce=r("em"),Fe=n(`Pre-trained language models like BERT and its variants have recently achieved impressive performance in various
natural language understanding tasks. However, BERT heavily relies on the global self-attention block and thus suffers
large memory footprint and computation cost. Although all its attention heads query on the whole input sequence for
generating the attention map from a global perspective, we observe some heads only need to learn local dependencies,
which means the existence of computation redundancy. We therefore propose a novel span-based dynamic convolution to
replace these self-attention heads to directly model local dependencies. The novel convolution heads, together with the
rest self-attention heads, form a new mixed attention block that is more efficient at both global and local context
learning. We equip BERT with this mixed attention design and build a ConvBERT model. Experiments have shown that
ConvBERT significantly outperforms BERT and its variants in various downstream tasks, with lower training cost and
fewer model parameters. Remarkably, ConvBERTbase model achieves 86.4 GLUE score, 0.7 higher than ELECTRAbase, while
using less than 1/4 training cost. Code and pre-trained models will be released.`),Z=h(),j=r("p"),A=n("ConvBERT training tips are similar to those of BERT."),_e=h(),L=r("p"),Ee=n("This model was contributed by "),ie=r("a"),G=n("abhishek"),Be=n(`. The original implementation can be found
here: `),le=r("a"),P=n("https://github.com/yitu-opensource/ConvBert"),ve=h(),I=r("h2"),re=r("a"),pe=r("span"),w(Y.$$.fragment),ze=h(),he=r("span"),S=n("ConvBertConfig"),ke=h(),N=r("div"),w(de.$$.fragment),ee=h(),x=r("p"),Me=n("This is the configuration class to store the configuration of a "),O=r("a"),qe=n("ConvBertModel"),je=n(`. It is used to instantiate an
ConvBERT 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 ConvBERT
`),f=r("a"),B=n("YituTech/conv-bert-base"),Re=n(" architecture."),te=h(),xe=r("p"),We=n("Configuration objects inherit from "),z=r("a"),Ke=n("PretrainedConfig"),Ue=n(` and can be used to control the model outputs. Read the
documentation from `),Ne=r("a"),Ye=n("PretrainedConfig"),He=n(" for more information."),R=h(),w(K.$$.fragment),Ie=h(),Ae=r("h2"),U=r("a"),De=r("span"),w(Oe.$$.fragment),Pe=h(),Le=r("span"),oe=n("ConvBertTokenizer"),Se=h(),Ge=r("div"),w(Pn.$$.fragment),Zl=h(),ra=r("p"),ed=n("Construct a ConvBERT tokenizer. Based on WordPiece."),td=h(),On=r("p"),od=n("This tokenizer inherits from "),ur=r("a"),nd=n("PreTrainedTokenizer"),sd=n(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),rd=h(),Pt=r("div"),w(Nn.$$.fragment),ad=h(),aa=r("p"),id=n(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A ConvBERT sequence has the following format:`),ld=h(),Dn=r("ul"),fr=r("li"),dd=n("single sequence: "),ia=r("code"),cd=n("[CLS] X [SEP]"),pd=h(),gr=r("li"),hd=n("pair of sequences: "),la=r("code"),md=n("[CLS] A [SEP] B [SEP]"),ud=h(),yo=r("div"),w(Ln.$$.fragment),fd=h(),In=r("p"),gd=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 `),da=r("code"),_d=n("prepare_for_model"),vd=n(" method."),kd=h(),_t=r("div"),w(Sn.$$.fragment),bd=h(),ca=r("p"),Td=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A ConvBERT"),wd=h(),w($o.$$.fragment),yd=h(),Wt=r("p"),$d=n("If "),pa=r("code"),Cd=n("token_ids_1"),Fd=n(" is "),ha=r("code"),Ed=n("None"),Bd=n(", this method only returns the first portion of the mask (0s)."),zd=h(),_r=r("div"),w(Rn.$$.fragment),Wi=h(),Kt=r("h2"),Co=r("a"),ma=r("span"),w(Wn.$$.fragment),Md=h(),ua=r("span"),qd=n("ConvBertTokenizerFast"),Ki=h(),it=r("div"),w(Kn.$$.fragment),jd=h(),Un=r("p"),xd=n("Construct a \u201Cfast\u201D ConvBERT tokenizer (backed by HuggingFace\u2019s "),fa=r("em"),Ad=n("tokenizers"),Pd=n(" library). Based on WordPiece."),Od=h(),Yn=r("p"),Nd=n("This tokenizer inherits from "),vr=r("a"),Dd=n("PreTrainedTokenizerFast"),Ld=n(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Id=h(),Ot=r("div"),w(Hn.$$.fragment),Sd=h(),ga=r("p"),Rd=n(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A ConvBERT sequence has the following format:`),Wd=h(),Qn=r("ul"),kr=r("li"),Kd=n("single sequence: "),_a=r("code"),Ud=n("[CLS] X [SEP]"),Yd=h(),br=r("li"),Hd=n("pair of sequences: "),va=r("code"),Qd=n("[CLS] A [SEP] B [SEP]"),Vd=h(),vt=r("div"),w(Vn.$$.fragment),Jd=h(),ka=r("p"),Gd=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A ConvBERT"),Xd=h(),w(Fo.$$.fragment),Zd=h(),Ut=r("p"),ec=n("If "),ba=r("code"),tc=n("token_ids_1"),oc=n(" is "),Ta=r("code"),nc=n("None"),sc=n(", this method only returns the first portion of the mask (0s)."),Ui=h(),Yt=r("h2"),Eo=r("a"),wa=r("span"),w(Jn.$$.fragment),rc=h(),ya=r("span"),ac=n("ConvBertModel"),Yi=h(),jt=r("div"),w(Gn.$$.fragment),ic=h(),Xn=r("p"),lc=n(`The bare ConvBERT Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Zn=r("a"),dc=n("torch.nn.Module"),cc=n(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),pc=h(),kt=r("div"),w(es.$$.fragment),hc=h(),Ht=r("p"),mc=n("The "),Tr=r("a"),uc=n("ConvBertModel"),fc=n(" forward method, overrides the "),$a=r("code"),gc=n("__call__"),_c=n(" special method."),vc=h(),w(Bo.$$.fragment),kc=h(),w(zo.$$.fragment),Hi=h(),Qt=r("h2"),Mo=r("a"),Ca=r("span"),w(ts.$$.fragment),bc=h(),Fa=r("span"),Tc=n("ConvBertForMaskedLM"),Qi=h(),xt=r("div"),w(os.$$.fragment),wc=h(),Vt=r("p"),yc=n("ConvBERT Model with a "),Ea=r("code"),$c=n("language modeling"),Cc=n(` head on top.
This model is a PyTorch `),ns=r("a"),Fc=n("torch.nn.Module"),Ec=n(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Bc=h(),bt=r("div"),w(ss.$$.fragment),zc=h(),Jt=r("p"),Mc=n("The "),wr=r("a"),qc=n("ConvBertForMaskedLM"),jc=n(" forward method, overrides the "),Ba=r("code"),xc=n("__call__"),Ac=n(" special method."),Pc=h(),w(qo.$$.fragment),Oc=h(),w(jo.$$.fragment),Vi=h(),Gt=r("h2"),xo=r("a"),za=r("span"),w(rs.$$.fragment),Nc=h(),Ma=r("span"),Dc=n("ConvBertForSequenceClassification"),Ji=h(),mt=r("div"),w(as.$$.fragment),Lc=h(),qa=r("p"),Ic=n(`ConvBERT Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Sc=h(),is=r("p"),Rc=n("This model is a PyTorch "),ls=r("a"),Wc=n("torch.nn.Module"),Kc=n(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Uc=h(),lt=r("div"),w(ds.$$.fragment),Yc=h(),Xt=r("p"),Hc=n("The "),yr=r("a"),Qc=n("ConvBertForSequenceClassification"),Vc=n(" forward method, overrides the "),ja=r("code"),Jc=n("__call__"),Gc=n(" special method."),Xc=h(),w(Ao.$$.fragment),Zc=h(),w(Po.$$.fragment),ep=h(),w(Oo.$$.fragment),Gi=h(),Zt=r("h2"),No=r("a"),xa=r("span"),w(cs.$$.fragment),tp=h(),Aa=r("span"),op=n("ConvBertForMultipleChoice"),Xi=h(),ut=r("div"),w(ps.$$.fragment),np=h(),Pa=r("p"),sp=n(`ConvBERT 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.`),rp=h(),hs=r("p"),ap=n("This model is a PyTorch "),ms=r("a"),ip=n("torch.nn.Module"),lp=n(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),dp=h(),Tt=r("div"),w(us.$$.fragment),cp=h(),eo=r("p"),pp=n("The "),$r=r("a"),hp=n("ConvBertForMultipleChoice"),mp=n(" forward method, overrides the "),Oa=r("code"),up=n("__call__"),fp=n(" special method."),gp=h(),w(Do.$$.fragment),_p=h(),w(Lo.$$.fragment),Zi=h(),to=r("h2"),Io=r("a"),Na=r("span"),w(fs.$$.fragment),vp=h(),Da=r("span"),kp=n("ConvBertForTokenClassification"),el=h(),ft=r("div"),w(gs.$$.fragment),bp=h(),La=r("p"),Tp=n(`ConvBERT 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.`),wp=h(),_s=r("p"),yp=n("This model is a PyTorch "),vs=r("a"),$p=n("torch.nn.Module"),Cp=n(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Fp=h(),wt=r("div"),w(ks.$$.fragment),Ep=h(),oo=r("p"),Bp=n("The "),Cr=r("a"),zp=n("ConvBertForTokenClassification"),Mp=n(" forward method, overrides the "),Ia=r("code"),qp=n("__call__"),jp=n(" special method."),xp=h(),w(So.$$.fragment),Ap=h(),w(Ro.$$.fragment),tl=h(),no=r("h2"),Wo=r("a"),Sa=r("span"),w(bs.$$.fragment),Pp=h(),Ra=r("span"),Op=n("ConvBertForQuestionAnswering"),ol=h(),gt=r("div"),w(Ts.$$.fragment),Np=h(),so=r("p"),Dp=n(`ConvBERT 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 `),Wa=r("code"),Lp=n("span start logits"),Ip=n(" and "),Ka=r("code"),Sp=n("span end logits"),Rp=n(")."),Wp=h(),ws=r("p"),Kp=n("This model is a PyTorch "),ys=r("a"),Up=n("torch.nn.Module"),Yp=n(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Hp=h(),yt=r("div"),w($s.$$.fragment),Qp=h(),ro=r("p"),Vp=n("The "),Fr=r("a"),Jp=n("ConvBertForQuestionAnswering"),Gp=n(" forward method, overrides the "),Ua=r("code"),Xp=n("__call__"),Zp=n(" special method."),eh=h(),w(Ko.$$.fragment),th=h(),w(Uo.$$.fragment),nl=h(),ao=r("h2"),Yo=r("a"),Ya=r("span"),w(Cs.$$.fragment),oh=h(),Ha=r("span"),nh=n("TFConvBertModel"),sl=h(),Ze=r("div"),w(Fs.$$.fragment),sh=h(),Qa=r("p"),rh=n("The bare ConvBERT Model transformer outputting raw hidden-states without any specific head on top."),ah=h(),Es=r("p"),ih=n("This model inherits from "),Er=r("a"),lh=n("TFPreTrainedModel"),dh=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.)`),ch=h(),Bs=r("p"),ph=n("This model is also a "),zs=r("a"),hh=n("tf.keras.Model"),mh=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.`),uh=h(),w(Ho.$$.fragment),fh=h(),$t=r("div"),w(Ms.$$.fragment),gh=h(),io=r("p"),_h=n("The "),Br=r("a"),vh=n("TFConvBertModel"),kh=n(" forward method, overrides the "),Va=r("code"),bh=n("__call__"),Th=n(" special method."),wh=h(),w(Qo.$$.fragment),yh=h(),w(Vo.$$.fragment),rl=h(),lo=r("h2"),Jo=r("a"),Ja=r("span"),w(qs.$$.fragment),$h=h(),Ga=r("span"),Ch=n("TFConvBertForMaskedLM"),al=h(),et=r("div"),w(js.$$.fragment),Fh=h(),xs=r("p"),Eh=n("ConvBERT Model with a "),Xa=r("code"),Bh=n("language modeling"),zh=n(" head on top."),Mh=h(),As=r("p"),qh=n("This model inherits from "),zr=r("a"),jh=n("TFPreTrainedModel"),xh=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.)`),Ah=h(),Ps=r("p"),Ph=n("This model is also a "),Os=r("a"),Oh=n("tf.keras.Model"),Nh=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.`),Dh=h(),w(Go.$$.fragment),Lh=h(),dt=r("div"),w(Ns.$$.fragment),Ih=h(),co=r("p"),Sh=n("The "),Mr=r("a"),Rh=n("TFConvBertForMaskedLM"),Wh=n(" forward method, overrides the "),Za=r("code"),Kh=n("__call__"),Uh=n(" special method."),Yh=h(),w(Xo.$$.fragment),Hh=h(),w(Zo.$$.fragment),Qh=h(),w(en.$$.fragment),il=h(),po=r("h2"),tn=r("a"),ei=r("span"),w(Ds.$$.fragment),Vh=h(),ti=r("span"),Jh=n("TFConvBertForSequenceClassification"),ll=h(),tt=r("div"),w(Ls.$$.fragment),Gh=h(),oi=r("p"),Xh=n("ConvBERT Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),Zh=h(),Is=r("p"),em=n("This model inherits from "),qr=r("a"),tm=n("TFPreTrainedModel"),om=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.)`),nm=h(),Ss=r("p"),sm=n("This model is also a "),Rs=r("a"),rm=n("tf.keras.Model"),am=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.`),im=h(),w(on.$$.fragment),lm=h(),ct=r("div"),w(Ws.$$.fragment),dm=h(),ho=r("p"),cm=n("The "),jr=r("a"),pm=n("TFConvBertForSequenceClassification"),hm=n(" forward method, overrides the "),ni=r("code"),mm=n("__call__"),um=n(" special method."),fm=h(),w(nn.$$.fragment),gm=h(),w(sn.$$.fragment),_m=h(),w(rn.$$.fragment),dl=h(),mo=r("h2"),an=r("a"),si=r("span"),w(Ks.$$.fragment),vm=h(),ri=r("span"),km=n("TFConvBertForMultipleChoice"),cl=h(),ot=r("div"),w(Us.$$.fragment),bm=h(),ai=r("p"),Tm=n(`ConvBERT 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.`),wm=h(),Ys=r("p"),ym=n("This model inherits from "),xr=r("a"),$m=n("TFPreTrainedModel"),Cm=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.)`),Fm=h(),Hs=r("p"),Em=n("This model is also a "),Qs=r("a"),Bm=n("tf.keras.Model"),zm=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.`),Mm=h(),w(ln.$$.fragment),qm=h(),Ct=r("div"),w(Vs.$$.fragment),jm=h(),uo=r("p"),xm=n("The "),Ar=r("a"),Am=n("TFConvBertForMultipleChoice"),Pm=n(" forward method, overrides the "),ii=r("code"),Om=n("__call__"),Nm=n(" special method."),Dm=h(),w(dn.$$.fragment),Lm=h(),w(cn.$$.fragment),pl=h(),fo=r("h2"),pn=r("a"),li=r("span"),w(Js.$$.fragment),Im=h(),di=r("span"),Sm=n("TFConvBertForTokenClassification"),hl=h(),nt=r("div"),w(Gs.$$.fragment),Rm=h(),ci=r("p"),Wm=n(`ConvBERT 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.`),Km=h(),Xs=r("p"),Um=n("This model inherits from "),Pr=r("a"),Ym=n("TFPreTrainedModel"),Hm=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.)`),Qm=h(),Zs=r("p"),Vm=n("This model is also a "),er=r("a"),Jm=n("tf.keras.Model"),Gm=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.`),Xm=h(),w(hn.$$.fragment),Zm=h(),pt=r("div"),w(tr.$$.fragment),eu=h(),go=r("p"),tu=n("The "),Or=r("a"),ou=n("TFConvBertForTokenClassification"),nu=n(" forward method, overrides the "),pi=r("code"),su=n("__call__"),ru=n(" special method."),au=h(),w(mn.$$.fragment),iu=h(),w(un.$$.fragment),lu=h(),w(fn.$$.fragment),ml=h(),_o=r("h2"),gn=r("a"),hi=r("span"),w(or.$$.fragment),du=h(),mi=r("span"),cu=n("TFConvBertForQuestionAnswering"),ul=h(),st=r("div"),w(nr.$$.fragment),pu=h(),vo=r("p"),hu=n(`ConvBERT 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 `),ui=r("code"),mu=n("span start logits"),uu=n(" and "),fi=r("code"),fu=n("span end logits"),gu=n(")."),_u=h(),sr=r("p"),vu=n("This model inherits from "),Nr=r("a"),ku=n("TFPreTrainedModel"),bu=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.)`),Tu=h(),rr=r("p"),wu=n("This model is also a "),ar=r("a"),yu=n("tf.keras.Model"),$u=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.`),Cu=h(),w(_n.$$.fragment),Fu=h(),ht=r("div"),w(ir.$$.fragment),Eu=h(),ko=r("p"),Bu=n("The "),Dr=r("a"),zu=n("TFConvBertForQuestionAnswering"),Mu=n(" forward method, overrides the "),gi=r("code"),qu=n("__call__"),ju=n(" special method."),xu=h(),w(vn.$$.fragment),Au=h(),w(kn.$$.fragment),Pu=h(),w(bn.$$.fragment),this.h()},l(o){const b=Ug('[data-svelte="svelte-1phssyn"]',document.head);d=a(b,"META",{name:!0,content:!0}),b.forEach(t),v=m(o),p=a(o,"H1",{class:!0});var lr=i(p);u=a(lr,"A",{id:!0,class:!0,href:!0});var _i=i(u);k=a(_i,"SPAN",{});var vi=i(k);y(l.$$.fragment,vi),vi.forEach(t),_i.forEach(t),c=m(lr),q=a(lr,"SPAN",{});var ki=i(q);be=s(ki,"ConvBERT"),ki.forEach(t),lr.forEach(t),me=m(o),D=a(o,"H2",{class:!0});var dr=i(D);se=a(dr,"A",{id:!0,class:!0,href:!0});var bi=i(se);X=a(bi,"SPAN",{});var Ti=i(X);y(T.$$.fragment,Ti),Ti.forEach(t),bi.forEach(t),Te=m(dr),V=a(dr,"SPAN",{});var wi=i(V);we=s(wi,"Overview"),wi.forEach(t),dr.forEach(t),ue=m(o),W=a(o,"P",{});var cr=i(W);ye=s(cr,"The ConvBERT model was proposed in "),ae=a(cr,"A",{href:!0,rel:!0});var yi=i(ae);J=s(yi,"ConvBERT: Improving BERT with Span-based Dynamic Convolution"),yi.forEach(t),$e=s(cr,` by Zihang Jiang, Weihao Yu, Daquan Zhou, Yunpeng Chen, Jiashi Feng, Shuicheng
Yan.`),cr.forEach(t),fe=m(o),H=a(o,"P",{});var $i=i(H);Ce=s($i,"The abstract from the paper is the following:"),$i.forEach(t),ge=m(o),Q=a(o,"P",{});var Ci=i(Q);ce=a(Ci,"EM",{});var Fi=i(ce);Fe=s(Fi,`Pre-trained language models like BERT and its variants have recently achieved impressive performance in various
natural language understanding tasks. However, BERT heavily relies on the global self-attention block and thus suffers
large memory footprint and computation cost. Although all its attention heads query on the whole input sequence for
generating the attention map from a global perspective, we observe some heads only need to learn local dependencies,
which means the existence of computation redundancy. We therefore propose a novel span-based dynamic convolution to
replace these self-attention heads to directly model local dependencies. The novel convolution heads, together with the
rest self-attention heads, form a new mixed attention block that is more efficient at both global and local context
learning. We equip BERT with this mixed attention design and build a ConvBERT model. Experiments have shown that
ConvBERT significantly outperforms BERT and its variants in various downstream tasks, with lower training cost and
fewer model parameters. Remarkably, ConvBERTbase model achieves 86.4 GLUE score, 0.7 higher than ELECTRAbase, while
using less than 1/4 training cost. Code and pre-trained models will be released.`),Fi.forEach(t),Ci.forEach(t),Z=m(o),j=a(o,"P",{});var Ei=i(j);A=s(Ei,"ConvBERT training tips are similar to those of BERT."),Ei.forEach(t),_e=m(o),L=a(o,"P",{});var Tn=i(L);Ee=s(Tn,"This model was contributed by "),ie=a(Tn,"A",{href:!0,rel:!0});var Bi=i(ie);G=s(Bi,"abhishek"),Bi.forEach(t),Be=s(Tn,`. The original implementation can be found
here: `),le=a(Tn,"A",{href:!0,rel:!0});var zi=i(le);P=s(zi,"https://github.com/yitu-opensource/ConvBert"),zi.forEach(t),Tn.forEach(t),ve=m(o),I=a(o,"H2",{class:!0});var pr=i(I);re=a(pr,"A",{id:!0,class:!0,href:!0});var Mi=i(re);pe=a(Mi,"SPAN",{});var qi=i(pe);y(Y.$$.fragment,qi),qi.forEach(t),Mi.forEach(t),ze=m(pr),he=a(pr,"SPAN",{});var ji=i(he);S=s(ji,"ConvBertConfig"),ji.forEach(t),pr.forEach(t),ke=m(o),N=a(o,"DIV",{class:!0});var At=i(N);y(de.$$.fragment,At),ee=m(At),x=a(At,"P",{});var bo=i(x);Me=s(bo,"This is the configuration class to store the configuration of a "),O=a(bo,"A",{href:!0});var xi=i(O);qe=s(xi,"ConvBertModel"),xi.forEach(t),je=s(bo,`. It is used to instantiate an
ConvBERT 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 ConvBERT
`),f=a(bo,"A",{href:!0,rel:!0});var Ai=i(f);B=s(Ai,"YituTech/conv-bert-base"),Ai.forEach(t),Re=s(bo," architecture."),bo.forEach(t),te=m(At),xe=a(At,"P",{});var To=i(xe);We=s(To,"Configuration objects inherit from "),z=a(To,"A",{href:!0});var Pi=i(z);Ke=s(Pi,"PretrainedConfig"),Pi.forEach(t),Ue=s(To,` and can be used to control the model outputs. Read the
documentation from `),Ne=a(To,"A",{href:!0});var Oi=i(Ne);Ye=s(Oi,"PretrainedConfig"),Oi.forEach(t),He=s(To," for more information."),To.forEach(t),R=m(At),y(K.$$.fragment,At),At.forEach(t),Ie=m(o),Ae=a(o,"H2",{class:!0});var hr=i(Ae);U=a(hr,"A",{id:!0,class:!0,href:!0});var Ni=i(U);De=a(Ni,"SPAN",{});var Di=i(De);y(Oe.$$.fragment,Di),Di.forEach(t),Ni.forEach(t),Pe=m(hr),Le=a(hr,"SPAN",{});var Li=i(Le);oe=s(Li,"ConvBertTokenizer"),Li.forEach(t),hr.forEach(t),Se=m(o),Ge=a(o,"DIV",{class:!0});var rt=i(Ge);y(Pn.$$.fragment,rt),Zl=m(rt),ra=a(rt,"P",{});var Ii=i(ra);ed=s(Ii,"Construct a ConvBERT tokenizer. Based on WordPiece."),Ii.forEach(t),td=m(rt),On=a(rt,"P",{});var mr=i(On);od=s(mr,"This tokenizer inherits from "),ur=a(mr,"A",{href:!0});var Si=i(ur);nd=s(Si,"PreTrainedTokenizer"),Si.forEach(t),sd=s(mr,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),mr.forEach(t),rd=m(rt),Pt=a(rt,"DIV",{class:!0});var wo=i(Pt);y(Nn.$$.fragment,wo),ad=m(wo),aa=a(wo,"P",{});var Ri=i(aa);id=s(Ri,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A ConvBERT sequence has the following format:`),Ri.forEach(t),ld=m(wo),Dn=a(wo,"UL",{});var gl=i(Dn);fr=a(gl,"LI",{});var Ou=i(fr);dd=s(Ou,"single sequence: "),ia=a(Ou,"CODE",{});var Iu=i(ia);cd=s(Iu,"[CLS] X [SEP]"),Iu.forEach(t),Ou.forEach(t),pd=m(gl),gr=a(gl,"LI",{});var Nu=i(gr);hd=s(Nu,"pair of sequences: "),la=a(Nu,"CODE",{});var Su=i(la);md=s(Su,"[CLS] A [SEP] B [SEP]"),Su.forEach(t),Nu.forEach(t),gl.forEach(t),wo.forEach(t),ud=m(rt),yo=a(rt,"DIV",{class:!0});var _l=i(yo);y(Ln.$$.fragment,_l),fd=m(_l),In=a(_l,"P",{});var vl=i(In);gd=s(vl,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),da=a(vl,"CODE",{});var Ru=i(da);_d=s(Ru,"prepare_for_model"),Ru.forEach(t),vd=s(vl," method."),vl.forEach(t),_l.forEach(t),kd=m(rt),_t=a(rt,"DIV",{class:!0});var wn=i(_t);y(Sn.$$.fragment,wn),bd=m(wn),ca=a(wn,"P",{});var Wu=i(ca);Td=s(Wu,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A ConvBERT"),Wu.forEach(t),wd=m(wn),y($o.$$.fragment,wn),yd=m(wn),Wt=a(wn,"P",{});var Lr=i(Wt);$d=s(Lr,"If "),pa=a(Lr,"CODE",{});var Ku=i(pa);Cd=s(Ku,"token_ids_1"),Ku.forEach(t),Fd=s(Lr," is "),ha=a(Lr,"CODE",{});var Uu=i(ha);Ed=s(Uu,"None"),Uu.forEach(t),Bd=s(Lr,", this method only returns the first portion of the mask (0s)."),Lr.forEach(t),wn.forEach(t),zd=m(rt),_r=a(rt,"DIV",{class:!0});var Yu=i(_r);y(Rn.$$.fragment,Yu),Yu.forEach(t),rt.forEach(t),Wi=m(o),Kt=a(o,"H2",{class:!0});var kl=i(Kt);Co=a(kl,"A",{id:!0,class:!0,href:!0});var Hu=i(Co);ma=a(Hu,"SPAN",{});var Qu=i(ma);y(Wn.$$.fragment,Qu),Qu.forEach(t),Hu.forEach(t),Md=m(kl),ua=a(kl,"SPAN",{});var Vu=i(ua);qd=s(Vu,"ConvBertTokenizerFast"),Vu.forEach(t),kl.forEach(t),Ki=m(o),it=a(o,"DIV",{class:!0});var Nt=i(it);y(Kn.$$.fragment,Nt),jd=m(Nt),Un=a(Nt,"P",{});var bl=i(Un);xd=s(bl,"Construct a \u201Cfast\u201D ConvBERT tokenizer (backed by HuggingFace\u2019s "),fa=a(bl,"EM",{});var Ju=i(fa);Ad=s(Ju,"tokenizers"),Ju.forEach(t),Pd=s(bl," library). Based on WordPiece."),bl.forEach(t),Od=m(Nt),Yn=a(Nt,"P",{});var Tl=i(Yn);Nd=s(Tl,"This tokenizer inherits from "),vr=a(Tl,"A",{href:!0});var Gu=i(vr);Dd=s(Gu,"PreTrainedTokenizerFast"),Gu.forEach(t),Ld=s(Tl,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Tl.forEach(t),Id=m(Nt),Ot=a(Nt,"DIV",{class:!0});var Ir=i(Ot);y(Hn.$$.fragment,Ir),Sd=m(Ir),ga=a(Ir,"P",{});var Xu=i(ga);Rd=s(Xu,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A ConvBERT sequence has the following format:`),Xu.forEach(t),Wd=m(Ir),Qn=a(Ir,"UL",{});var wl=i(Qn);kr=a(wl,"LI",{});var Du=i(kr);Kd=s(Du,"single sequence: "),_a=a(Du,"CODE",{});var Zu=i(_a);Ud=s(Zu,"[CLS] X [SEP]"),Zu.forEach(t),Du.forEach(t),Yd=m(wl),br=a(wl,"LI",{});var Lu=i(br);Hd=s(Lu,"pair of sequences: "),va=a(Lu,"CODE",{});var ef=i(va);Qd=s(ef,"[CLS] A [SEP] B [SEP]"),ef.forEach(t),Lu.forEach(t),wl.forEach(t),Ir.forEach(t),Vd=m(Nt),vt=a(Nt,"DIV",{class:!0});var yn=i(vt);y(Vn.$$.fragment,yn),Jd=m(yn),ka=a(yn,"P",{});var tf=i(ka);Gd=s(tf,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A ConvBERT"),tf.forEach(t),Xd=m(yn),y(Fo.$$.fragment,yn),Zd=m(yn),Ut=a(yn,"P",{});var Sr=i(Ut);ec=s(Sr,"If "),ba=a(Sr,"CODE",{});var of=i(ba);tc=s(of,"token_ids_1"),of.forEach(t),oc=s(Sr," is "),Ta=a(Sr,"CODE",{});var nf=i(Ta);nc=s(nf,"None"),nf.forEach(t),sc=s(Sr,", this method only returns the first portion of the mask (0s)."),Sr.forEach(t),yn.forEach(t),Nt.forEach(t),Ui=m(o),Yt=a(o,"H2",{class:!0});var yl=i(Yt);Eo=a(yl,"A",{id:!0,class:!0,href:!0});var sf=i(Eo);wa=a(sf,"SPAN",{});var rf=i(wa);y(Jn.$$.fragment,rf),rf.forEach(t),sf.forEach(t),rc=m(yl),ya=a(yl,"SPAN",{});var af=i(ya);ac=s(af,"ConvBertModel"),af.forEach(t),yl.forEach(t),Yi=m(o),jt=a(o,"DIV",{class:!0});var Rr=i(jt);y(Gn.$$.fragment,Rr),ic=m(Rr),Xn=a(Rr,"P",{});var $l=i(Xn);lc=s($l,`The bare ConvBERT Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Zn=a($l,"A",{href:!0,rel:!0});var lf=i(Zn);dc=s(lf,"torch.nn.Module"),lf.forEach(t),cc=s($l,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),$l.forEach(t),pc=m(Rr),kt=a(Rr,"DIV",{class:!0});var $n=i(kt);y(es.$$.fragment,$n),hc=m($n),Ht=a($n,"P",{});var Wr=i(Ht);mc=s(Wr,"The "),Tr=a(Wr,"A",{href:!0});var df=i(Tr);uc=s(df,"ConvBertModel"),df.forEach(t),fc=s(Wr," forward method, overrides the "),$a=a(Wr,"CODE",{});var cf=i($a);gc=s(cf,"__call__"),cf.forEach(t),_c=s(Wr," special method."),Wr.forEach(t),vc=m($n),y(Bo.$$.fragment,$n),kc=m($n),y(zo.$$.fragment,$n),$n.forEach(t),Rr.forEach(t),Hi=m(o),Qt=a(o,"H2",{class:!0});var Cl=i(Qt);Mo=a(Cl,"A",{id:!0,class:!0,href:!0});var pf=i(Mo);Ca=a(pf,"SPAN",{});var hf=i(Ca);y(ts.$$.fragment,hf),hf.forEach(t),pf.forEach(t),bc=m(Cl),Fa=a(Cl,"SPAN",{});var mf=i(Fa);Tc=s(mf,"ConvBertForMaskedLM"),mf.forEach(t),Cl.forEach(t),Qi=m(o),xt=a(o,"DIV",{class:!0});var Kr=i(xt);y(os.$$.fragment,Kr),wc=m(Kr),Vt=a(Kr,"P",{});var Ur=i(Vt);yc=s(Ur,"ConvBERT Model with a "),Ea=a(Ur,"CODE",{});var uf=i(Ea);$c=s(uf,"language modeling"),uf.forEach(t),Cc=s(Ur,` head on top.
This model is a PyTorch `),ns=a(Ur,"A",{href:!0,rel:!0});var ff=i(ns);Fc=s(ff,"torch.nn.Module"),ff.forEach(t),Ec=s(Ur,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ur.forEach(t),Bc=m(Kr),bt=a(Kr,"DIV",{class:!0});var Cn=i(bt);y(ss.$$.fragment,Cn),zc=m(Cn),Jt=a(Cn,"P",{});var Yr=i(Jt);Mc=s(Yr,"The "),wr=a(Yr,"A",{href:!0});var gf=i(wr);qc=s(gf,"ConvBertForMaskedLM"),gf.forEach(t),jc=s(Yr," forward method, overrides the "),Ba=a(Yr,"CODE",{});var _f=i(Ba);xc=s(_f,"__call__"),_f.forEach(t),Ac=s(Yr," special method."),Yr.forEach(t),Pc=m(Cn),y(qo.$$.fragment,Cn),Oc=m(Cn),y(jo.$$.fragment,Cn),Cn.forEach(t),Kr.forEach(t),Vi=m(o),Gt=a(o,"H2",{class:!0});var Fl=i(Gt);xo=a(Fl,"A",{id:!0,class:!0,href:!0});var vf=i(xo);za=a(vf,"SPAN",{});var kf=i(za);y(rs.$$.fragment,kf),kf.forEach(t),vf.forEach(t),Nc=m(Fl),Ma=a(Fl,"SPAN",{});var bf=i(Ma);Dc=s(bf,"ConvBertForSequenceClassification"),bf.forEach(t),Fl.forEach(t),Ji=m(o),mt=a(o,"DIV",{class:!0});var Fn=i(mt);y(as.$$.fragment,Fn),Lc=m(Fn),qa=a(Fn,"P",{});var Tf=i(qa);Ic=s(Tf,`ConvBERT Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Tf.forEach(t),Sc=m(Fn),is=a(Fn,"P",{});var El=i(is);Rc=s(El,"This model is a PyTorch "),ls=a(El,"A",{href:!0,rel:!0});var wf=i(ls);Wc=s(wf,"torch.nn.Module"),wf.forEach(t),Kc=s(El,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),El.forEach(t),Uc=m(Fn),lt=a(Fn,"DIV",{class:!0});var Dt=i(lt);y(ds.$$.fragment,Dt),Yc=m(Dt),Xt=a(Dt,"P",{});var Hr=i(Xt);Hc=s(Hr,"The "),yr=a(Hr,"A",{href:!0});var yf=i(yr);Qc=s(yf,"ConvBertForSequenceClassification"),yf.forEach(t),Vc=s(Hr," forward method, overrides the "),ja=a(Hr,"CODE",{});var $f=i(ja);Jc=s($f,"__call__"),$f.forEach(t),Gc=s(Hr," special method."),Hr.forEach(t),Xc=m(Dt),y(Ao.$$.fragment,Dt),Zc=m(Dt),y(Po.$$.fragment,Dt),ep=m(Dt),y(Oo.$$.fragment,Dt),Dt.forEach(t),Fn.forEach(t),Gi=m(o),Zt=a(o,"H2",{class:!0});var Bl=i(Zt);No=a(Bl,"A",{id:!0,class:!0,href:!0});var Cf=i(No);xa=a(Cf,"SPAN",{});var Ff=i(xa);y(cs.$$.fragment,Ff),Ff.forEach(t),Cf.forEach(t),tp=m(Bl),Aa=a(Bl,"SPAN",{});var Ef=i(Aa);op=s(Ef,"ConvBertForMultipleChoice"),Ef.forEach(t),Bl.forEach(t),Xi=m(o),ut=a(o,"DIV",{class:!0});var En=i(ut);y(ps.$$.fragment,En),np=m(En),Pa=a(En,"P",{});var Bf=i(Pa);sp=s(Bf,`ConvBERT 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.`),Bf.forEach(t),rp=m(En),hs=a(En,"P",{});var zl=i(hs);ap=s(zl,"This model is a PyTorch "),ms=a(zl,"A",{href:!0,rel:!0});var zf=i(ms);ip=s(zf,"torch.nn.Module"),zf.forEach(t),lp=s(zl,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),zl.forEach(t),dp=m(En),Tt=a(En,"DIV",{class:!0});var Bn=i(Tt);y(us.$$.fragment,Bn),cp=m(Bn),eo=a(Bn,"P",{});var Qr=i(eo);pp=s(Qr,"The "),$r=a(Qr,"A",{href:!0});var Mf=i($r);hp=s(Mf,"ConvBertForMultipleChoice"),Mf.forEach(t),mp=s(Qr," forward method, overrides the "),Oa=a(Qr,"CODE",{});var qf=i(Oa);up=s(qf,"__call__"),qf.forEach(t),fp=s(Qr," special method."),Qr.forEach(t),gp=m(Bn),y(Do.$$.fragment,Bn),_p=m(Bn),y(Lo.$$.fragment,Bn),Bn.forEach(t),En.forEach(t),Zi=m(o),to=a(o,"H2",{class:!0});var Ml=i(to);Io=a(Ml,"A",{id:!0,class:!0,href:!0});var jf=i(Io);Na=a(jf,"SPAN",{});var xf=i(Na);y(fs.$$.fragment,xf),xf.forEach(t),jf.forEach(t),vp=m(Ml),Da=a(Ml,"SPAN",{});var Af=i(Da);kp=s(Af,"ConvBertForTokenClassification"),Af.forEach(t),Ml.forEach(t),el=m(o),ft=a(o,"DIV",{class:!0});var zn=i(ft);y(gs.$$.fragment,zn),bp=m(zn),La=a(zn,"P",{});var Pf=i(La);Tp=s(Pf,`ConvBERT 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.`),Pf.forEach(t),wp=m(zn),_s=a(zn,"P",{});var ql=i(_s);yp=s(ql,"This model is a PyTorch "),vs=a(ql,"A",{href:!0,rel:!0});var Of=i(vs);$p=s(Of,"torch.nn.Module"),Of.forEach(t),Cp=s(ql,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ql.forEach(t),Fp=m(zn),wt=a(zn,"DIV",{class:!0});var Mn=i(wt);y(ks.$$.fragment,Mn),Ep=m(Mn),oo=a(Mn,"P",{});var Vr=i(oo);Bp=s(Vr,"The "),Cr=a(Vr,"A",{href:!0});var Nf=i(Cr);zp=s(Nf,"ConvBertForTokenClassification"),Nf.forEach(t),Mp=s(Vr," forward method, overrides the "),Ia=a(Vr,"CODE",{});var Df=i(Ia);qp=s(Df,"__call__"),Df.forEach(t),jp=s(Vr," special method."),Vr.forEach(t),xp=m(Mn),y(So.$$.fragment,Mn),Ap=m(Mn),y(Ro.$$.fragment,Mn),Mn.forEach(t),zn.forEach(t),tl=m(o),no=a(o,"H2",{class:!0});var jl=i(no);Wo=a(jl,"A",{id:!0,class:!0,href:!0});var Lf=i(Wo);Sa=a(Lf,"SPAN",{});var If=i(Sa);y(bs.$$.fragment,If),If.forEach(t),Lf.forEach(t),Pp=m(jl),Ra=a(jl,"SPAN",{});var Sf=i(Ra);Op=s(Sf,"ConvBertForQuestionAnswering"),Sf.forEach(t),jl.forEach(t),ol=m(o),gt=a(o,"DIV",{class:!0});var qn=i(gt);y(Ts.$$.fragment,qn),Np=m(qn),so=a(qn,"P",{});var Jr=i(so);Dp=s(Jr,`ConvBERT 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 `),Wa=a(Jr,"CODE",{});var Rf=i(Wa);Lp=s(Rf,"span start logits"),Rf.forEach(t),Ip=s(Jr," and "),Ka=a(Jr,"CODE",{});var Wf=i(Ka);Sp=s(Wf,"span end logits"),Wf.forEach(t),Rp=s(Jr,")."),Jr.forEach(t),Wp=m(qn),ws=a(qn,"P",{});var xl=i(ws);Kp=s(xl,"This model is a PyTorch "),ys=a(xl,"A",{href:!0,rel:!0});var Kf=i(ys);Up=s(Kf,"torch.nn.Module"),Kf.forEach(t),Yp=s(xl,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),xl.forEach(t),Hp=m(qn),yt=a(qn,"DIV",{class:!0});var jn=i(yt);y($s.$$.fragment,jn),Qp=m(jn),ro=a(jn,"P",{});var Gr=i(ro);Vp=s(Gr,"The "),Fr=a(Gr,"A",{href:!0});var Uf=i(Fr);Jp=s(Uf,"ConvBertForQuestionAnswering"),Uf.forEach(t),Gp=s(Gr," forward method, overrides the "),Ua=a(Gr,"CODE",{});var Yf=i(Ua);Xp=s(Yf,"__call__"),Yf.forEach(t),Zp=s(Gr," special method."),Gr.forEach(t),eh=m(jn),y(Ko.$$.fragment,jn),th=m(jn),y(Uo.$$.fragment,jn),jn.forEach(t),qn.forEach(t),nl=m(o),ao=a(o,"H2",{class:!0});var Al=i(ao);Yo=a(Al,"A",{id:!0,class:!0,href:!0});var Hf=i(Yo);Ya=a(Hf,"SPAN",{});var Qf=i(Ya);y(Cs.$$.fragment,Qf),Qf.forEach(t),Hf.forEach(t),oh=m(Al),Ha=a(Al,"SPAN",{});var Vf=i(Ha);nh=s(Vf,"TFConvBertModel"),Vf.forEach(t),Al.forEach(t),sl=m(o),Ze=a(o,"DIV",{class:!0});var Ft=i(Ze);y(Fs.$$.fragment,Ft),sh=m(Ft),Qa=a(Ft,"P",{});var Jf=i(Qa);rh=s(Jf,"The bare ConvBERT Model transformer outputting raw hidden-states without any specific head on top."),Jf.forEach(t),ah=m(Ft),Es=a(Ft,"P",{});var Pl=i(Es);ih=s(Pl,"This model inherits from "),Er=a(Pl,"A",{href:!0});var Gf=i(Er);lh=s(Gf,"TFPreTrainedModel"),Gf.forEach(t),dh=s(Pl,`. 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.)`),Pl.forEach(t),ch=m(Ft),Bs=a(Ft,"P",{});var Ol=i(Bs);ph=s(Ol,"This model is also a "),zs=a(Ol,"A",{href:!0,rel:!0});var Xf=i(zs);hh=s(Xf,"tf.keras.Model"),Xf.forEach(t),mh=s(Ol,` 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.`),Ol.forEach(t),uh=m(Ft),y(Ho.$$.fragment,Ft),fh=m(Ft),$t=a(Ft,"DIV",{class:!0});var xn=i($t);y(Ms.$$.fragment,xn),gh=m(xn),io=a(xn,"P",{});var Xr=i(io);_h=s(Xr,"The "),Br=a(Xr,"A",{href:!0});var Zf=i(Br);vh=s(Zf,"TFConvBertModel"),Zf.forEach(t),kh=s(Xr," forward method, overrides the "),Va=a(Xr,"CODE",{});var eg=i(Va);bh=s(eg,"__call__"),eg.forEach(t),Th=s(Xr," special method."),Xr.forEach(t),wh=m(xn),y(Qo.$$.fragment,xn),yh=m(xn),y(Vo.$$.fragment,xn),xn.forEach(t),Ft.forEach(t),rl=m(o),lo=a(o,"H2",{class:!0});var Nl=i(lo);Jo=a(Nl,"A",{id:!0,class:!0,href:!0});var tg=i(Jo);Ja=a(tg,"SPAN",{});var og=i(Ja);y(qs.$$.fragment,og),og.forEach(t),tg.forEach(t),$h=m(Nl),Ga=a(Nl,"SPAN",{});var ng=i(Ga);Ch=s(ng,"TFConvBertForMaskedLM"),ng.forEach(t),Nl.forEach(t),al=m(o),et=a(o,"DIV",{class:!0});var Et=i(et);y(js.$$.fragment,Et),Fh=m(Et),xs=a(Et,"P",{});var Dl=i(xs);Eh=s(Dl,"ConvBERT Model with a "),Xa=a(Dl,"CODE",{});var sg=i(Xa);Bh=s(sg,"language modeling"),sg.forEach(t),zh=s(Dl," head on top."),Dl.forEach(t),Mh=m(Et),As=a(Et,"P",{});var Ll=i(As);qh=s(Ll,"This model inherits from "),zr=a(Ll,"A",{href:!0});var rg=i(zr);jh=s(rg,"TFPreTrainedModel"),rg.forEach(t),xh=s(Ll,`. 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.)`),Ll.forEach(t),Ah=m(Et),Ps=a(Et,"P",{});var Il=i(Ps);Ph=s(Il,"This model is also a "),Os=a(Il,"A",{href:!0,rel:!0});var ag=i(Os);Oh=s(ag,"tf.keras.Model"),ag.forEach(t),Nh=s(Il,` 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.`),Il.forEach(t),Dh=m(Et),y(Go.$$.fragment,Et),Lh=m(Et),dt=a(Et,"DIV",{class:!0});var Lt=i(dt);y(Ns.$$.fragment,Lt),Ih=m(Lt),co=a(Lt,"P",{});var Zr=i(co);Sh=s(Zr,"The "),Mr=a(Zr,"A",{href:!0});var ig=i(Mr);Rh=s(ig,"TFConvBertForMaskedLM"),ig.forEach(t),Wh=s(Zr," forward method, overrides the "),Za=a(Zr,"CODE",{});var lg=i(Za);Kh=s(lg,"__call__"),lg.forEach(t),Uh=s(Zr," special method."),Zr.forEach(t),Yh=m(Lt),y(Xo.$$.fragment,Lt),Hh=m(Lt),y(Zo.$$.fragment,Lt),Qh=m(Lt),y(en.$$.fragment,Lt),Lt.forEach(t),Et.forEach(t),il=m(o),po=a(o,"H2",{class:!0});var Sl=i(po);tn=a(Sl,"A",{id:!0,class:!0,href:!0});var dg=i(tn);ei=a(dg,"SPAN",{});var cg=i(ei);y(Ds.$$.fragment,cg),cg.forEach(t),dg.forEach(t),Vh=m(Sl),ti=a(Sl,"SPAN",{});var pg=i(ti);Jh=s(pg,"TFConvBertForSequenceClassification"),pg.forEach(t),Sl.forEach(t),ll=m(o),tt=a(o,"DIV",{class:!0});var Bt=i(tt);y(Ls.$$.fragment,Bt),Gh=m(Bt),oi=a(Bt,"P",{});var hg=i(oi);Xh=s(hg,"ConvBERT Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),hg.forEach(t),Zh=m(Bt),Is=a(Bt,"P",{});var Rl=i(Is);em=s(Rl,"This model inherits from "),qr=a(Rl,"A",{href:!0});var mg=i(qr);tm=s(mg,"TFPreTrainedModel"),mg.forEach(t),om=s(Rl,`. 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.)`),Rl.forEach(t),nm=m(Bt),Ss=a(Bt,"P",{});var Wl=i(Ss);sm=s(Wl,"This model is also a "),Rs=a(Wl,"A",{href:!0,rel:!0});var ug=i(Rs);rm=s(ug,"tf.keras.Model"),ug.forEach(t),am=s(Wl,` 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.`),Wl.forEach(t),im=m(Bt),y(on.$$.fragment,Bt),lm=m(Bt),ct=a(Bt,"DIV",{class:!0});var It=i(ct);y(Ws.$$.fragment,It),dm=m(It),ho=a(It,"P",{});var ea=i(ho);cm=s(ea,"The "),jr=a(ea,"A",{href:!0});var fg=i(jr);pm=s(fg,"TFConvBertForSequenceClassification"),fg.forEach(t),hm=s(ea," forward method, overrides the "),ni=a(ea,"CODE",{});var gg=i(ni);mm=s(gg,"__call__"),gg.forEach(t),um=s(ea," special method."),ea.forEach(t),fm=m(It),y(nn.$$.fragment,It),gm=m(It),y(sn.$$.fragment,It),_m=m(It),y(rn.$$.fragment,It),It.forEach(t),Bt.forEach(t),dl=m(o),mo=a(o,"H2",{class:!0});var Kl=i(mo);an=a(Kl,"A",{id:!0,class:!0,href:!0});var _g=i(an);si=a(_g,"SPAN",{});var vg=i(si);y(Ks.$$.fragment,vg),vg.forEach(t),_g.forEach(t),vm=m(Kl),ri=a(Kl,"SPAN",{});var kg=i(ri);km=s(kg,"TFConvBertForMultipleChoice"),kg.forEach(t),Kl.forEach(t),cl=m(o),ot=a(o,"DIV",{class:!0});var zt=i(ot);y(Us.$$.fragment,zt),bm=m(zt),ai=a(zt,"P",{});var bg=i(ai);Tm=s(bg,`ConvBERT 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.`),bg.forEach(t),wm=m(zt),Ys=a(zt,"P",{});var Ul=i(Ys);ym=s(Ul,"This model inherits from "),xr=a(Ul,"A",{href:!0});var Tg=i(xr);$m=s(Tg,"TFPreTrainedModel"),Tg.forEach(t),Cm=s(Ul,`. 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.)`),Ul.forEach(t),Fm=m(zt),Hs=a(zt,"P",{});var Yl=i(Hs);Em=s(Yl,"This model is also a "),Qs=a(Yl,"A",{href:!0,rel:!0});var wg=i(Qs);Bm=s(wg,"tf.keras.Model"),wg.forEach(t),zm=s(Yl,` 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.`),Yl.forEach(t),Mm=m(zt),y(ln.$$.fragment,zt),qm=m(zt),Ct=a(zt,"DIV",{class:!0});var An=i(Ct);y(Vs.$$.fragment,An),jm=m(An),uo=a(An,"P",{});var ta=i(uo);xm=s(ta,"The "),Ar=a(ta,"A",{href:!0});var yg=i(Ar);Am=s(yg,"TFConvBertForMultipleChoice"),yg.forEach(t),Pm=s(ta," forward method, overrides the "),ii=a(ta,"CODE",{});var $g=i(ii);Om=s($g,"__call__"),$g.forEach(t),Nm=s(ta," special method."),ta.forEach(t),Dm=m(An),y(dn.$$.fragment,An),Lm=m(An),y(cn.$$.fragment,An),An.forEach(t),zt.forEach(t),pl=m(o),fo=a(o,"H2",{class:!0});var Hl=i(fo);pn=a(Hl,"A",{id:!0,class:!0,href:!0});var Cg=i(pn);li=a(Cg,"SPAN",{});var Fg=i(li);y(Js.$$.fragment,Fg),Fg.forEach(t),Cg.forEach(t),Im=m(Hl),di=a(Hl,"SPAN",{});var Eg=i(di);Sm=s(Eg,"TFConvBertForTokenClassification"),Eg.forEach(t),Hl.forEach(t),hl=m(o),nt=a(o,"DIV",{class:!0});var Mt=i(nt);y(Gs.$$.fragment,Mt),Rm=m(Mt),ci=a(Mt,"P",{});var Bg=i(ci);Wm=s(Bg,`ConvBERT 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.`),Bg.forEach(t),Km=m(Mt),Xs=a(Mt,"P",{});var Ql=i(Xs);Um=s(Ql,"This model inherits from "),Pr=a(Ql,"A",{href:!0});var zg=i(Pr);Ym=s(zg,"TFPreTrainedModel"),zg.forEach(t),Hm=s(Ql,`. 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.)`),Ql.forEach(t),Qm=m(Mt),Zs=a(Mt,"P",{});var Vl=i(Zs);Vm=s(Vl,"This model is also a "),er=a(Vl,"A",{href:!0,rel:!0});var Mg=i(er);Jm=s(Mg,"tf.keras.Model"),Mg.forEach(t),Gm=s(Vl,` 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.`),Vl.forEach(t),Xm=m(Mt),y(hn.$$.fragment,Mt),Zm=m(Mt),pt=a(Mt,"DIV",{class:!0});var St=i(pt);y(tr.$$.fragment,St),eu=m(St),go=a(St,"P",{});var oa=i(go);tu=s(oa,"The "),Or=a(oa,"A",{href:!0});var qg=i(Or);ou=s(qg,"TFConvBertForTokenClassification"),qg.forEach(t),nu=s(oa," forward method, overrides the "),pi=a(oa,"CODE",{});var jg=i(pi);su=s(jg,"__call__"),jg.forEach(t),ru=s(oa," special method."),oa.forEach(t),au=m(St),y(mn.$$.fragment,St),iu=m(St),y(un.$$.fragment,St),lu=m(St),y(fn.$$.fragment,St),St.forEach(t),Mt.forEach(t),ml=m(o),_o=a(o,"H2",{class:!0});var Jl=i(_o);gn=a(Jl,"A",{id:!0,class:!0,href:!0});var xg=i(gn);hi=a(xg,"SPAN",{});var Ag=i(hi);y(or.$$.fragment,Ag),Ag.forEach(t),xg.forEach(t),du=m(Jl),mi=a(Jl,"SPAN",{});var Pg=i(mi);cu=s(Pg,"TFConvBertForQuestionAnswering"),Pg.forEach(t),Jl.forEach(t),ul=m(o),st=a(o,"DIV",{class:!0});var qt=i(st);y(nr.$$.fragment,qt),pu=m(qt),vo=a(qt,"P",{});var na=i(vo);hu=s(na,`ConvBERT 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 `),ui=a(na,"CODE",{});var Og=i(ui);mu=s(Og,"span start logits"),Og.forEach(t),uu=s(na," and "),fi=a(na,"CODE",{});var Ng=i(fi);fu=s(Ng,"span end logits"),Ng.forEach(t),gu=s(na,")."),na.forEach(t),_u=m(qt),sr=a(qt,"P",{});var Gl=i(sr);vu=s(Gl,"This model inherits from "),Nr=a(Gl,"A",{href:!0});var Dg=i(Nr);ku=s(Dg,"TFPreTrainedModel"),Dg.forEach(t),bu=s(Gl,`. 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.)`),Gl.forEach(t),Tu=m(qt),rr=a(qt,"P",{});var Xl=i(rr);wu=s(Xl,"This model is also a "),ar=a(Xl,"A",{href:!0,rel:!0});var Lg=i(ar);yu=s(Lg,"tf.keras.Model"),Lg.forEach(t),$u=s(Xl,` 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.`),Xl.forEach(t),Cu=m(qt),y(_n.$$.fragment,qt),Fu=m(qt),ht=a(qt,"DIV",{class:!0});var Rt=i(ht);y(ir.$$.fragment,Rt),Eu=m(Rt),ko=a(Rt,"P",{});var sa=i(ko);Bu=s(sa,"The "),Dr=a(sa,"A",{href:!0});var Ig=i(Dr);zu=s(Ig,"TFConvBertForQuestionAnswering"),Ig.forEach(t),Mu=s(sa," forward method, overrides the "),gi=a(sa,"CODE",{});var Sg=i(gi);qu=s(Sg,"__call__"),Sg.forEach(t),ju=s(sa," special method."),sa.forEach(t),xu=m(Rt),y(vn.$$.fragment,Rt),Au=m(Rt),y(kn.$$.fragment,Rt),Pu=m(Rt),y(bn.$$.fragment,Rt),Rt.forEach(t),qt.forEach(t),this.h()},h(){_(d,"name","hf:doc:metadata"),_(d,"content",JSON.stringify(j_)),_(u,"id","convbert"),_(u,"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"),_(u,"href","#convbert"),_(p,"class","relative group"),_(se,"id","overview"),_(se,"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"),_(se,"href","#overview"),_(D,"class","relative group"),_(ae,"href","https://arxiv.org/abs/2008.02496"),_(ae,"rel","nofollow"),_(ie,"href","https://huggingface.co/abhishek"),_(ie,"rel","nofollow"),_(le,"href","https://github.com/yitu-opensource/ConvBert"),_(le,"rel","nofollow"),_(re,"id","transformers.ConvBertConfig"),_(re,"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"),_(re,"href","#transformers.ConvBertConfig"),_(I,"class","relative group"),_(O,"href","/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertModel"),_(f,"href","https://huggingface.co/YituTech/conv-bert-base"),_(f,"rel","nofollow"),_(z,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),_(Ne,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),_(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(U,"id","transformers.ConvBertTokenizer"),_(U,"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"),_(U,"href","#transformers.ConvBertTokenizer"),_(Ae,"class","relative group"),_(ur,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),_(Pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(yo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(_r,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Co,"id","transformers.ConvBertTokenizerFast"),_(Co,"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"),_(Co,"href","#transformers.ConvBertTokenizerFast"),_(Kt,"class","relative group"),_(vr,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),_(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Eo,"id","transformers.ConvBertModel"),_(Eo,"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"),_(Eo,"href","#transformers.ConvBertModel"),_(Yt,"class","relative group"),_(Zn,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),_(Zn,"rel","nofollow"),_(Tr,"href","/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertModel"),_(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Mo,"id","transformers.ConvBertForMaskedLM"),_(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"),_(Mo,"href","#transformers.ConvBertForMaskedLM"),_(Qt,"class","relative group"),_(ns,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),_(ns,"rel","nofollow"),_(wr,"href","/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertForMaskedLM"),_(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(xo,"id","transformers.ConvBertForSequenceClassification"),_(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"),_(xo,"href","#transformers.ConvBertForSequenceClassification"),_(Gt,"class","relative group"),_(ls,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),_(ls,"rel","nofollow"),_(yr,"href","/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertForSequenceClassification"),_(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(No,"id","transformers.ConvBertForMultipleChoice"),_(No,"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"),_(No,"href","#transformers.ConvBertForMultipleChoice"),_(Zt,"class","relative group"),_(ms,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),_(ms,"rel","nofollow"),_($r,"href","/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertForMultipleChoice"),_(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Io,"id","transformers.ConvBertForTokenClassification"),_(Io,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),_(Io,"href","#transformers.ConvBertForTokenClassification"),_(to,"class","relative group"),_(vs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),_(vs,"rel","nofollow"),_(Cr,"href","/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertForTokenClassification"),_(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Wo,"id","transformers.ConvBertForQuestionAnswering"),_(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"),_(Wo,"href","#transformers.ConvBertForQuestionAnswering"),_(no,"class","relative group"),_(ys,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),_(ys,"rel","nofollow"),_(Fr,"href","/docs/transformers/main/en/model_doc/convbert#transformers.ConvBertForQuestionAnswering"),_(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Yo,"id","transformers.TFConvBertModel"),_(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"),_(Yo,"href","#transformers.TFConvBertModel"),_(ao,"class","relative group"),_(Er,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),_(zs,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),_(zs,"rel","nofollow"),_(Br,"href","/docs/transformers/main/en/model_doc/convbert#transformers.TFConvBertModel"),_($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(Jo,"id","transformers.TFConvBertForMaskedLM"),_(Jo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),_(Jo,"href","#transformers.TFConvBertForMaskedLM"),_(lo,"class","relative group"),_(zr,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),_(Os,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),_(Os,"rel","nofollow"),_(Mr,"href","/docs/transformers/main/en/model_doc/convbert#transformers.TFConvBertForMaskedLM"),_(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(tn,"id","transformers.TFConvBertForSequenceClassification"),_(tn,"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"),_(tn,"href","#transformers.TFConvBertForSequenceClassification"),_(po,"class","relative group"),_(qr,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),_(Rs,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),_(Rs,"rel","nofollow"),_(jr,"href","/docs/transformers/main/en/model_doc/convbert#transformers.TFConvBertForSequenceClassification"),_(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(an,"id","transformers.TFConvBertForMultipleChoice"),_(an,"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"),_(an,"href","#transformers.TFConvBertForMultipleChoice"),_(mo,"class","relative group"),_(xr,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),_(Qs,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),_(Qs,"rel","nofollow"),_(Ar,"href","/docs/transformers/main/en/model_doc/convbert#transformers.TFConvBertForMultipleChoice"),_(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(pn,"id","transformers.TFConvBertForTokenClassification"),_(pn,"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"),_(pn,"href","#transformers.TFConvBertForTokenClassification"),_(fo,"class","relative group"),_(Pr,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),_(er,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),_(er,"rel","nofollow"),_(Or,"href","/docs/transformers/main/en/model_doc/convbert#transformers.TFConvBertForTokenClassification"),_(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(gn,"id","transformers.TFConvBertForQuestionAnswering"),_(gn,"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"),_(gn,"href","#transformers.TFConvBertForQuestionAnswering"),_(_o,"class","relative group"),_(Nr,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),_(ar,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),_(ar,"rel","nofollow"),_(Dr,"href","/docs/transformers/main/en/model_doc/convbert#transformers.TFConvBertForQuestionAnswering"),_(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),_(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,b){e(document.head,d),g(o,v,b),g(o,p,b),e(p,u),e(u,k),$(l,k,null),e(p,c),e(p,q),e(q,be),g(o,me,b),g(o,D,b),e(D,se),e(se,X),$(T,X,null),e(D,Te),e(D,V),e(V,we),g(o,ue,b),g(o,W,b),e(W,ye),e(W,ae),e(ae,J),e(W,$e),g(o,fe,b),g(o,H,b),e(H,Ce),g(o,ge,b),g(o,Q,b),e(Q,ce),e(ce,Fe),g(o,Z,b),g(o,j,b),e(j,A),g(o,_e,b),g(o,L,b),e(L,Ee),e(L,ie),e(ie,G),e(L,Be),e(L,le),e(le,P),g(o,ve,b),g(o,I,b),e(I,re),e(re,pe),$(Y,pe,null),e(I,ze),e(I,he),e(he,S),g(o,ke,b),g(o,N,b),$(de,N,null),e(N,ee),e(N,x),e(x,Me),e(x,O),e(O,qe),e(x,je),e(x,f),e(f,B),e(x,Re),e(N,te),e(N,xe),e(xe,We),e(xe,z),e(z,Ke),e(xe,Ue),e(xe,Ne),e(Ne,Ye),e(xe,He),e(N,R),$(K,N,null),g(o,Ie,b),g(o,Ae,b),e(Ae,U),e(U,De),$(Oe,De,null),e(Ae,Pe),e(Ae,Le),e(Le,oe),g(o,Se,b),g(o,Ge,b),$(Pn,Ge,null),e(Ge,Zl),e(Ge,ra),e(ra,ed),e(Ge,td),e(Ge,On),e(On,od),e(On,ur),e(ur,nd),e(On,sd),e(Ge,rd),e(Ge,Pt),$(Nn,Pt,null),e(Pt,ad),e(Pt,aa),e(aa,id),e(Pt,ld),e(Pt,Dn),e(Dn,fr),e(fr,dd),e(fr,ia),e(ia,cd),e(Dn,pd),e(Dn,gr),e(gr,hd),e(gr,la),e(la,md),e(Ge,ud),e(Ge,yo),$(Ln,yo,null),e(yo,fd),e(yo,In),e(In,gd),e(In,da),e(da,_d),e(In,vd),e(Ge,kd),e(Ge,_t),$(Sn,_t,null),e(_t,bd),e(_t,ca),e(ca,Td),e(_t,wd),$($o,_t,null),e(_t,yd),e(_t,Wt),e(Wt,$d),e(Wt,pa),e(pa,Cd),e(Wt,Fd),e(Wt,ha),e(ha,Ed),e(Wt,Bd),e(Ge,zd),e(Ge,_r),$(Rn,_r,null),g(o,Wi,b),g(o,Kt,b),e(Kt,Co),e(Co,ma),$(Wn,ma,null),e(Kt,Md),e(Kt,ua),e(ua,qd),g(o,Ki,b),g(o,it,b),$(Kn,it,null),e(it,jd),e(it,Un),e(Un,xd),e(Un,fa),e(fa,Ad),e(Un,Pd),e(it,Od),e(it,Yn),e(Yn,Nd),e(Yn,vr),e(vr,Dd),e(Yn,Ld),e(it,Id),e(it,Ot),$(Hn,Ot,null),e(Ot,Sd),e(Ot,ga),e(ga,Rd),e(Ot,Wd),e(Ot,Qn),e(Qn,kr),e(kr,Kd),e(kr,_a),e(_a,Ud),e(Qn,Yd),e(Qn,br),e(br,Hd),e(br,va),e(va,Qd),e(it,Vd),e(it,vt),$(Vn,vt,null),e(vt,Jd),e(vt,ka),e(ka,Gd),e(vt,Xd),$(Fo,vt,null),e(vt,Zd),e(vt,Ut),e(Ut,ec),e(Ut,ba),e(ba,tc),e(Ut,oc),e(Ut,Ta),e(Ta,nc),e(Ut,sc),g(o,Ui,b),g(o,Yt,b),e(Yt,Eo),e(Eo,wa),$(Jn,wa,null),e(Yt,rc),e(Yt,ya),e(ya,ac),g(o,Yi,b),g(o,jt,b),$(Gn,jt,null),e(jt,ic),e(jt,Xn),e(Xn,lc),e(Xn,Zn),e(Zn,dc),e(Xn,cc),e(jt,pc),e(jt,kt),$(es,kt,null),e(kt,hc),e(kt,Ht),e(Ht,mc),e(Ht,Tr),e(Tr,uc),e(Ht,fc),e(Ht,$a),e($a,gc),e(Ht,_c),e(kt,vc),$(Bo,kt,null),e(kt,kc),$(zo,kt,null),g(o,Hi,b),g(o,Qt,b),e(Qt,Mo),e(Mo,Ca),$(ts,Ca,null),e(Qt,bc),e(Qt,Fa),e(Fa,Tc),g(o,Qi,b),g(o,xt,b),$(os,xt,null),e(xt,wc),e(xt,Vt),e(Vt,yc),e(Vt,Ea),e(Ea,$c),e(Vt,Cc),e(Vt,ns),e(ns,Fc),e(Vt,Ec),e(xt,Bc),e(xt,bt),$(ss,bt,null),e(bt,zc),e(bt,Jt),e(Jt,Mc),e(Jt,wr),e(wr,qc),e(Jt,jc),e(Jt,Ba),e(Ba,xc),e(Jt,Ac),e(bt,Pc),$(qo,bt,null),e(bt,Oc),$(jo,bt,null),g(o,Vi,b),g(o,Gt,b),e(Gt,xo),e(xo,za),$(rs,za,null),e(Gt,Nc),e(Gt,Ma),e(Ma,Dc),g(o,Ji,b),g(o,mt,b),$(as,mt,null),e(mt,Lc),e(mt,qa),e(qa,Ic),e(mt,Sc),e(mt,is),e(is,Rc),e(is,ls),e(ls,Wc),e(is,Kc),e(mt,Uc),e(mt,lt),$(ds,lt,null),e(lt,Yc),e(lt,Xt),e(Xt,Hc),e(Xt,yr),e(yr,Qc),e(Xt,Vc),e(Xt,ja),e(ja,Jc),e(Xt,Gc),e(lt,Xc),$(Ao,lt,null),e(lt,Zc),$(Po,lt,null),e(lt,ep),$(Oo,lt,null),g(o,Gi,b),g(o,Zt,b),e(Zt,No),e(No,xa),$(cs,xa,null),e(Zt,tp),e(Zt,Aa),e(Aa,op),g(o,Xi,b),g(o,ut,b),$(ps,ut,null),e(ut,np),e(ut,Pa),e(Pa,sp),e(ut,rp),e(ut,hs),e(hs,ap),e(hs,ms),e(ms,ip),e(hs,lp),e(ut,dp),e(ut,Tt),$(us,Tt,null),e(Tt,cp),e(Tt,eo),e(eo,pp),e(eo,$r),e($r,hp),e(eo,mp),e(eo,Oa),e(Oa,up),e(eo,fp),e(Tt,gp),$(Do,Tt,null),e(Tt,_p),$(Lo,Tt,null),g(o,Zi,b),g(o,to,b),e(to,Io),e(Io,Na),$(fs,Na,null),e(to,vp),e(to,Da),e(Da,kp),g(o,el,b),g(o,ft,b),$(gs,ft,null),e(ft,bp),e(ft,La),e(La,Tp),e(ft,wp),e(ft,_s),e(_s,yp),e(_s,vs),e(vs,$p),e(_s,Cp),e(ft,Fp),e(ft,wt),$(ks,wt,null),e(wt,Ep),e(wt,oo),e(oo,Bp),e(oo,Cr),e(Cr,zp),e(oo,Mp),e(oo,Ia),e(Ia,qp),e(oo,jp),e(wt,xp),$(So,wt,null),e(wt,Ap),$(Ro,wt,null),g(o,tl,b),g(o,no,b),e(no,Wo),e(Wo,Sa),$(bs,Sa,null),e(no,Pp),e(no,Ra),e(Ra,Op),g(o,ol,b),g(o,gt,b),$(Ts,gt,null),e(gt,Np),e(gt,so),e(so,Dp),e(so,Wa),e(Wa,Lp),e(so,Ip),e(so,Ka),e(Ka,Sp),e(so,Rp),e(gt,Wp),e(gt,ws),e(ws,Kp),e(ws,ys),e(ys,Up),e(ws,Yp),e(gt,Hp),e(gt,yt),$($s,yt,null),e(yt,Qp),e(yt,ro),e(ro,Vp),e(ro,Fr),e(Fr,Jp),e(ro,Gp),e(ro,Ua),e(Ua,Xp),e(ro,Zp),e(yt,eh),$(Ko,yt,null),e(yt,th),$(Uo,yt,null),g(o,nl,b),g(o,ao,b),e(ao,Yo),e(Yo,Ya),$(Cs,Ya,null),e(ao,oh),e(ao,Ha),e(Ha,nh),g(o,sl,b),g(o,Ze,b),$(Fs,Ze,null),e(Ze,sh),e(Ze,Qa),e(Qa,rh),e(Ze,ah),e(Ze,Es),e(Es,ih),e(Es,Er),e(Er,lh),e(Es,dh),e(Ze,ch),e(Ze,Bs),e(Bs,ph),e(Bs,zs),e(zs,hh),e(Bs,mh),e(Ze,uh),$(Ho,Ze,null),e(Ze,fh),e(Ze,$t),$(Ms,$t,null),e($t,gh),e($t,io),e(io,_h),e(io,Br),e(Br,vh),e(io,kh),e(io,Va),e(Va,bh),e(io,Th),e($t,wh),$(Qo,$t,null),e($t,yh),$(Vo,$t,null),g(o,rl,b),g(o,lo,b),e(lo,Jo),e(Jo,Ja),$(qs,Ja,null),e(lo,$h),e(lo,Ga),e(Ga,Ch),g(o,al,b),g(o,et,b),$(js,et,null),e(et,Fh),e(et,xs),e(xs,Eh),e(xs,Xa),e(Xa,Bh),e(xs,zh),e(et,Mh),e(et,As),e(As,qh),e(As,zr),e(zr,jh),e(As,xh),e(et,Ah),e(et,Ps),e(Ps,Ph),e(Ps,Os),e(Os,Oh),e(Ps,Nh),e(et,Dh),$(Go,et,null),e(et,Lh),e(et,dt),$(Ns,dt,null),e(dt,Ih),e(dt,co),e(co,Sh),e(co,Mr),e(Mr,Rh),e(co,Wh),e(co,Za),e(Za,Kh),e(co,Uh),e(dt,Yh),$(Xo,dt,null),e(dt,Hh),$(Zo,dt,null),e(dt,Qh),$(en,dt,null),g(o,il,b),g(o,po,b),e(po,tn),e(tn,ei),$(Ds,ei,null),e(po,Vh),e(po,ti),e(ti,Jh),g(o,ll,b),g(o,tt,b),$(Ls,tt,null),e(tt,Gh),e(tt,oi),e(oi,Xh),e(tt,Zh),e(tt,Is),e(Is,em),e(Is,qr),e(qr,tm),e(Is,om),e(tt,nm),e(tt,Ss),e(Ss,sm),e(Ss,Rs),e(Rs,rm),e(Ss,am),e(tt,im),$(on,tt,null),e(tt,lm),e(tt,ct),$(Ws,ct,null),e(ct,dm),e(ct,ho),e(ho,cm),e(ho,jr),e(jr,pm),e(ho,hm),e(ho,ni),e(ni,mm),e(ho,um),e(ct,fm),$(nn,ct,null),e(ct,gm),$(sn,ct,null),e(ct,_m),$(rn,ct,null),g(o,dl,b),g(o,mo,b),e(mo,an),e(an,si),$(Ks,si,null),e(mo,vm),e(mo,ri),e(ri,km),g(o,cl,b),g(o,ot,b),$(Us,ot,null),e(ot,bm),e(ot,ai),e(ai,Tm),e(ot,wm),e(ot,Ys),e(Ys,ym),e(Ys,xr),e(xr,$m),e(Ys,Cm),e(ot,Fm),e(ot,Hs),e(Hs,Em),e(Hs,Qs),e(Qs,Bm),e(Hs,zm),e(ot,Mm),$(ln,ot,null),e(ot,qm),e(ot,Ct),$(Vs,Ct,null),e(Ct,jm),e(Ct,uo),e(uo,xm),e(uo,Ar),e(Ar,Am),e(uo,Pm),e(uo,ii),e(ii,Om),e(uo,Nm),e(Ct,Dm),$(dn,Ct,null),e(Ct,Lm),$(cn,Ct,null),g(o,pl,b),g(o,fo,b),e(fo,pn),e(pn,li),$(Js,li,null),e(fo,Im),e(fo,di),e(di,Sm),g(o,hl,b),g(o,nt,b),$(Gs,nt,null),e(nt,Rm),e(nt,ci),e(ci,Wm),e(nt,Km),e(nt,Xs),e(Xs,Um),e(Xs,Pr),e(Pr,Ym),e(Xs,Hm),e(nt,Qm),e(nt,Zs),e(Zs,Vm),e(Zs,er),e(er,Jm),e(Zs,Gm),e(nt,Xm),$(hn,nt,null),e(nt,Zm),e(nt,pt),$(tr,pt,null),e(pt,eu),e(pt,go),e(go,tu),e(go,Or),e(Or,ou),e(go,nu),e(go,pi),e(pi,su),e(go,ru),e(pt,au),$(mn,pt,null),e(pt,iu),$(un,pt,null),e(pt,lu),$(fn,pt,null),g(o,ml,b),g(o,_o,b),e(_o,gn),e(gn,hi),$(or,hi,null),e(_o,du),e(_o,mi),e(mi,cu),g(o,ul,b),g(o,st,b),$(nr,st,null),e(st,pu),e(st,vo),e(vo,hu),e(vo,ui),e(ui,mu),e(vo,uu),e(vo,fi),e(fi,fu),e(vo,gu),e(st,_u),e(st,sr),e(sr,vu),e(sr,Nr),e(Nr,ku),e(sr,bu),e(st,Tu),e(st,rr),e(rr,wu),e(rr,ar),e(ar,yu),e(rr,$u),e(st,Cu),$(_n,st,null),e(st,Fu),e(st,ht),$(ir,ht,null),e(ht,Eu),e(ht,ko),e(ko,Bu),e(ko,Dr),e(Dr,zu),e(ko,Mu),e(ko,gi),e(gi,qu),e(ko,ju),e(ht,xu),$(vn,ht,null),e(ht,Au),$(kn,ht,null),e(ht,Pu),$(bn,ht,null),fl=!0},p(o,[b]){const lr={};b&2&&(lr.$$scope={dirty:b,ctx:o}),K.$set(lr);const _i={};b&2&&(_i.$$scope={dirty:b,ctx:o}),$o.$set(_i);const vi={};b&2&&(vi.$$scope={dirty:b,ctx:o}),Fo.$set(vi);const ki={};b&2&&(ki.$$scope={dirty:b,ctx:o}),Bo.$set(ki);const dr={};b&2&&(dr.$$scope={dirty:b,ctx:o}),zo.$set(dr);const bi={};b&2&&(bi.$$scope={dirty:b,ctx:o}),qo.$set(bi);const Ti={};b&2&&(Ti.$$scope={dirty:b,ctx:o}),jo.$set(Ti);const wi={};b&2&&(wi.$$scope={dirty:b,ctx:o}),Ao.$set(wi);const cr={};b&2&&(cr.$$scope={dirty:b,ctx:o}),Po.$set(cr);const yi={};b&2&&(yi.$$scope={dirty:b,ctx:o}),Oo.$set(yi);const $i={};b&2&&($i.$$scope={dirty:b,ctx:o}),Do.$set($i);const Ci={};b&2&&(Ci.$$scope={dirty:b,ctx:o}),Lo.$set(Ci);const Fi={};b&2&&(Fi.$$scope={dirty:b,ctx:o}),So.$set(Fi);const Ei={};b&2&&(Ei.$$scope={dirty:b,ctx:o}),Ro.$set(Ei);const Tn={};b&2&&(Tn.$$scope={dirty:b,ctx:o}),Ko.$set(Tn);const Bi={};b&2&&(Bi.$$scope={dirty:b,ctx:o}),Uo.$set(Bi);const zi={};b&2&&(zi.$$scope={dirty:b,ctx:o}),Ho.$set(zi);const pr={};b&2&&(pr.$$scope={dirty:b,ctx:o}),Qo.$set(pr);const Mi={};b&2&&(Mi.$$scope={dirty:b,ctx:o}),Vo.$set(Mi);const qi={};b&2&&(qi.$$scope={dirty:b,ctx:o}),Go.$set(qi);const ji={};b&2&&(ji.$$scope={dirty:b,ctx:o}),Xo.$set(ji);const At={};b&2&&(At.$$scope={dirty:b,ctx:o}),Zo.$set(At);const bo={};b&2&&(bo.$$scope={dirty:b,ctx:o}),en.$set(bo);const xi={};b&2&&(xi.$$scope={dirty:b,ctx:o}),on.$set(xi);const Ai={};b&2&&(Ai.$$scope={dirty:b,ctx:o}),nn.$set(Ai);const To={};b&2&&(To.$$scope={dirty:b,ctx:o}),sn.$set(To);const Pi={};b&2&&(Pi.$$scope={dirty:b,ctx:o}),rn.$set(Pi);const Oi={};b&2&&(Oi.$$scope={dirty:b,ctx:o}),ln.$set(Oi);const hr={};b&2&&(hr.$$scope={dirty:b,ctx:o}),dn.$set(hr);const Ni={};b&2&&(Ni.$$scope={dirty:b,ctx:o}),cn.$set(Ni);const Di={};b&2&&(Di.$$scope={dirty:b,ctx:o}),hn.$set(Di);const Li={};b&2&&(Li.$$scope={dirty:b,ctx:o}),mn.$set(Li);const rt={};b&2&&(rt.$$scope={dirty:b,ctx:o}),un.$set(rt);const Ii={};b&2&&(Ii.$$scope={dirty:b,ctx:o}),fn.$set(Ii);const mr={};b&2&&(mr.$$scope={dirty:b,ctx:o}),_n.$set(mr);const Si={};b&2&&(Si.$$scope={dirty:b,ctx:o}),vn.$set(Si);const wo={};b&2&&(wo.$$scope={dirty:b,ctx:o}),kn.$set(wo);const Ri={};b&2&&(Ri.$$scope={dirty:b,ctx:o}),bn.$set(Ri)},i(o){fl||(C(l.$$.fragment,o),C(T.$$.fragment,o),C(Y.$$.fragment,o),C(de.$$.fragment,o),C(K.$$.fragment,o),C(Oe.$$.fragment,o),C(Pn.$$.fragment,o),C(Nn.$$.fragment,o),C(Ln.$$.fragment,o),C(Sn.$$.fragment,o),C($o.$$.fragment,o),C(Rn.$$.fragment,o),C(Wn.$$.fragment,o),C(Kn.$$.fragment,o),C(Hn.$$.fragment,o),C(Vn.$$.fragment,o),C(Fo.$$.fragment,o),C(Jn.$$.fragment,o),C(Gn.$$.fragment,o),C(es.$$.fragment,o),C(Bo.$$.fragment,o),C(zo.$$.fragment,o),C(ts.$$.fragment,o),C(os.$$.fragment,o),C(ss.$$.fragment,o),C(qo.$$.fragment,o),C(jo.$$.fragment,o),C(rs.$$.fragment,o),C(as.$$.fragment,o),C(ds.$$.fragment,o),C(Ao.$$.fragment,o),C(Po.$$.fragment,o),C(Oo.$$.fragment,o),C(cs.$$.fragment,o),C(ps.$$.fragment,o),C(us.$$.fragment,o),C(Do.$$.fragment,o),C(Lo.$$.fragment,o),C(fs.$$.fragment,o),C(gs.$$.fragment,o),C(ks.$$.fragment,o),C(So.$$.fragment,o),C(Ro.$$.fragment,o),C(bs.$$.fragment,o),C(Ts.$$.fragment,o),C($s.$$.fragment,o),C(Ko.$$.fragment,o),C(Uo.$$.fragment,o),C(Cs.$$.fragment,o),C(Fs.$$.fragment,o),C(Ho.$$.fragment,o),C(Ms.$$.fragment,o),C(Qo.$$.fragment,o),C(Vo.$$.fragment,o),C(qs.$$.fragment,o),C(js.$$.fragment,o),C(Go.$$.fragment,o),C(Ns.$$.fragment,o),C(Xo.$$.fragment,o),C(Zo.$$.fragment,o),C(en.$$.fragment,o),C(Ds.$$.fragment,o),C(Ls.$$.fragment,o),C(on.$$.fragment,o),C(Ws.$$.fragment,o),C(nn.$$.fragment,o),C(sn.$$.fragment,o),C(rn.$$.fragment,o),C(Ks.$$.fragment,o),C(Us.$$.fragment,o),C(ln.$$.fragment,o),C(Vs.$$.fragment,o),C(dn.$$.fragment,o),C(cn.$$.fragment,o),C(Js.$$.fragment,o),C(Gs.$$.fragment,o),C(hn.$$.fragment,o),C(tr.$$.fragment,o),C(mn.$$.fragment,o),C(un.$$.fragment,o),C(fn.$$.fragment,o),C(or.$$.fragment,o),C(nr.$$.fragment,o),C(_n.$$.fragment,o),C(ir.$$.fragment,o),C(vn.$$.fragment,o),C(kn.$$.fragment,o),C(bn.$$.fragment,o),fl=!0)},o(o){F(l.$$.fragment,o),F(T.$$.fragment,o),F(Y.$$.fragment,o),F(de.$$.fragment,o),F(K.$$.fragment,o),F(Oe.$$.fragment,o),F(Pn.$$.fragment,o),F(Nn.$$.fragment,o),F(Ln.$$.fragment,o),F(Sn.$$.fragment,o),F($o.$$.fragment,o),F(Rn.$$.fragment,o),F(Wn.$$.fragment,o),F(Kn.$$.fragment,o),F(Hn.$$.fragment,o),F(Vn.$$.fragment,o),F(Fo.$$.fragment,o),F(Jn.$$.fragment,o),F(Gn.$$.fragment,o),F(es.$$.fragment,o),F(Bo.$$.fragment,o),F(zo.$$.fragment,o),F(ts.$$.fragment,o),F(os.$$.fragment,o),F(ss.$$.fragment,o),F(qo.$$.fragment,o),F(jo.$$.fragment,o),F(rs.$$.fragment,o),F(as.$$.fragment,o),F(ds.$$.fragment,o),F(Ao.$$.fragment,o),F(Po.$$.fragment,o),F(Oo.$$.fragment,o),F(cs.$$.fragment,o),F(ps.$$.fragment,o),F(us.$$.fragment,o),F(Do.$$.fragment,o),F(Lo.$$.fragment,o),F(fs.$$.fragment,o),F(gs.$$.fragment,o),F(ks.$$.fragment,o),F(So.$$.fragment,o),F(Ro.$$.fragment,o),F(bs.$$.fragment,o),F(Ts.$$.fragment,o),F($s.$$.fragment,o),F(Ko.$$.fragment,o),F(Uo.$$.fragment,o),F(Cs.$$.fragment,o),F(Fs.$$.fragment,o),F(Ho.$$.fragment,o),F(Ms.$$.fragment,o),F(Qo.$$.fragment,o),F(Vo.$$.fragment,o),F(qs.$$.fragment,o),F(js.$$.fragment,o),F(Go.$$.fragment,o),F(Ns.$$.fragment,o),F(Xo.$$.fragment,o),F(Zo.$$.fragment,o),F(en.$$.fragment,o),F(Ds.$$.fragment,o),F(Ls.$$.fragment,o),F(on.$$.fragment,o),F(Ws.$$.fragment,o),F(nn.$$.fragment,o),F(sn.$$.fragment,o),F(rn.$$.fragment,o),F(Ks.$$.fragment,o),F(Us.$$.fragment,o),F(ln.$$.fragment,o),F(Vs.$$.fragment,o),F(dn.$$.fragment,o),F(cn.$$.fragment,o),F(Js.$$.fragment,o),F(Gs.$$.fragment,o),F(hn.$$.fragment,o),F(tr.$$.fragment,o),F(mn.$$.fragment,o),F(un.$$.fragment,o),F(fn.$$.fragment,o),F(or.$$.fragment,o),F(nr.$$.fragment,o),F(_n.$$.fragment,o),F(ir.$$.fragment,o),F(vn.$$.fragment,o),F(kn.$$.fragment,o),F(bn.$$.fragment,o),fl=!1},d(o){t(d),o&&t(v),o&&t(p),E(l),o&&t(me),o&&t(D),E(T),o&&t(ue),o&&t(W),o&&t(fe),o&&t(H),o&&t(ge),o&&t(Q),o&&t(Z),o&&t(j),o&&t(_e),o&&t(L),o&&t(ve),o&&t(I),E(Y),o&&t(ke),o&&t(N),E(de),E(K),o&&t(Ie),o&&t(Ae),E(Oe),o&&t(Se),o&&t(Ge),E(Pn),E(Nn),E(Ln),E(Sn),E($o),E(Rn),o&&t(Wi),o&&t(Kt),E(Wn),o&&t(Ki),o&&t(it),E(Kn),E(Hn),E(Vn),E(Fo),o&&t(Ui),o&&t(Yt),E(Jn),o&&t(Yi),o&&t(jt),E(Gn),E(es),E(Bo),E(zo),o&&t(Hi),o&&t(Qt),E(ts),o&&t(Qi),o&&t(xt),E(os),E(ss),E(qo),E(jo),o&&t(Vi),o&&t(Gt),E(rs),o&&t(Ji),o&&t(mt),E(as),E(ds),E(Ao),E(Po),E(Oo),o&&t(Gi),o&&t(Zt),E(cs),o&&t(Xi),o&&t(ut),E(ps),E(us),E(Do),E(Lo),o&&t(Zi),o&&t(to),E(fs),o&&t(el),o&&t(ft),E(gs),E(ks),E(So),E(Ro),o&&t(tl),o&&t(no),E(bs),o&&t(ol),o&&t(gt),E(Ts),E($s),E(Ko),E(Uo),o&&t(nl),o&&t(ao),E(Cs),o&&t(sl),o&&t(Ze),E(Fs),E(Ho),E(Ms),E(Qo),E(Vo),o&&t(rl),o&&t(lo),E(qs),o&&t(al),o&&t(et),E(js),E(Go),E(Ns),E(Xo),E(Zo),E(en),o&&t(il),o&&t(po),E(Ds),o&&t(ll),o&&t(tt),E(Ls),E(on),E(Ws),E(nn),E(sn),E(rn),o&&t(dl),o&&t(mo),E(Ks),o&&t(cl),o&&t(ot),E(Us),E(ln),E(Vs),E(dn),E(cn),o&&t(pl),o&&t(fo),E(Js),o&&t(hl),o&&t(nt),E(Gs),E(hn),E(tr),E(mn),E(un),E(fn),o&&t(ml),o&&t(_o),E(or),o&&t(ul),o&&t(st),E(nr),E(_n),E(ir),E(vn),E(kn),E(bn)}}}const j_={local:"convbert",sections:[{local:"overview",title:"Overview"},{local:"transformers.ConvBertConfig",title:"ConvBertConfig"},{local:"transformers.ConvBertTokenizer",title:"ConvBertTokenizer"},{local:"transformers.ConvBertTokenizerFast",title:"ConvBertTokenizerFast"},{local:"transformers.ConvBertModel",title:"ConvBertModel"},{local:"transformers.ConvBertForMaskedLM",title:"ConvBertForMaskedLM"},{local:"transformers.ConvBertForSequenceClassification",title:"ConvBertForSequenceClassification"},{local:"transformers.ConvBertForMultipleChoice",title:"ConvBertForMultipleChoice"},{local:"transformers.ConvBertForTokenClassification",title:"ConvBertForTokenClassification"},{local:"transformers.ConvBertForQuestionAnswering",title:"ConvBertForQuestionAnswering"},{local:"transformers.TFConvBertModel",title:"TFConvBertModel"},{local:"transformers.TFConvBertForMaskedLM",title:"TFConvBertForMaskedLM"},{local:"transformers.TFConvBertForSequenceClassification",title:"TFConvBertForSequenceClassification"},{local:"transformers.TFConvBertForMultipleChoice",title:"TFConvBertForMultipleChoice"},{local:"transformers.TFConvBertForTokenClassification",title:"TFConvBertForTokenClassification"},{local:"transformers.TFConvBertForQuestionAnswering",title:"TFConvBertForQuestionAnswering"}],title:"ConvBERT"};function x_(M){return Yg(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class I_ extends Rg{constructor(d){super();Wg(this,d,x_,q_,Kg,{})}}export{I_ as default,j_ as metadata};
