import{S as U_,i as Y_,s as H_,e as r,k as h,w as T,t as n,M as Q_,c as a,d as t,m as u,a as i,x as w,h as s,b as f,N as K_,G as e,g as _,y,q as $,o as C,B as F,v as V_,L as Ve}from"../../chunks/vendor-hf-doc-builder.js";import{T as Xe}from"../../chunks/Tip-hf-doc-builder.js";import{D as ae}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Je}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ze}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Qe}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function J_(M){let d,v,p,m,b;return m=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(),T(m.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example:"),c.forEach(t),p=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,p,c),y(m,l,c),b=!0},p:Ve,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){C(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),F(m,l)}}}function G_(M){let d,v,p,m,b;return m=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(),T(m.$$.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=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,p,c),y(m,l,c),b=!0},p:Ve,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){C(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),F(m,l)}}}function X_(M){let d,v,p,m,b;return m=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(),T(m.$$.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=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,p,c),y(m,l,c),b=!0},p:Ve,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){C(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),F(m,l)}}}function Z_(M){let d,v,p,m,b;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"),m=n("Module"),b=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);m=s(q,"Module"),q.forEach(t),b=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){_(l,d,c),e(d,v),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function ev(M){let d,v,p,m,b;return m=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(),T(m.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example:"),c.forEach(t),p=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,p,c),y(m,l,c),b=!0},p:Ve,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){C(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),F(m,l)}}}function tv(M){let d,v,p,m,b;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"),m=n("Module"),b=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);m=s(q,"Module"),q.forEach(t),b=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){_(l,d,c),e(d,v),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function ov(M){let d,v,p,m,b;return m=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(),T(m.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example:"),c.forEach(t),p=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,p,c),y(m,l,c),b=!0},p:Ve,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){C(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),F(m,l)}}}function nv(M){let d,v,p,m,b;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"),m=n("Module"),b=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);m=s(q,"Module"),q.forEach(t),b=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){_(l,d,c),e(d,v),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function sv(M){let d,v,p,m,b;return m=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(),T(m.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example of single-label classification:"),c.forEach(t),p=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,p,c),y(m,l,c),b=!0},p:Ve,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){C(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),F(m,l)}}}function rv(M){let d,v,p,m,b;return m=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(),T(m.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example of multi-label classification:"),c.forEach(t),p=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,p,c),y(m,l,c),b=!0},p:Ve,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){C(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),F(m,l)}}}function av(M){let d,v,p,m,b;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"),m=n("Module"),b=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);m=s(q,"Module"),q.forEach(t),b=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){_(l,d,c),e(d,v),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function iv(M){let d,v,p,m,b;return m=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(),T(m.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example:"),c.forEach(t),p=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,p,c),y(m,l,c),b=!0},p:Ve,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){C(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),F(m,l)}}}function lv(M){let d,v,p,m,b;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"),m=n("Module"),b=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);m=s(q,"Module"),q.forEach(t),b=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){_(l,d,c),e(d,v),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function dv(M){let d,v,p,m,b;return m=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(),T(m.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example:"),c.forEach(t),p=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,p,c),y(m,l,c),b=!0},p:Ve,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){C(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),F(m,l)}}}function cv(M){let d,v,p,m,b;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"),m=n("Module"),b=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);m=s(q,"Module"),q.forEach(t),b=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){_(l,d,c),e(d,v),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function pv(M){let d,v,p,m,b;return m=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(),T(m.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example:"),c.forEach(t),p=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,p,c),y(m,l,c),b=!0},p:Ve,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){C(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),F(m,l)}}}function hv(M){let d,v,p,m,b,l,c,q,Te,_e,D,pe,Z,E,we,R,he,Ae,Y,oe,ie,W,le,ye,K,$e,ve,I,Ce,de,ne,j,P,ue,V,ke,me,U,Fe,be,x,Ee,H,se,Be,S,ze,Me,N,qe,Q,re,X,A,ce,O,ge,je;return{c(){d=r("p"),v=n("TensorFlow models and layers in "),p=r("code"),m=n("transformers"),b=n(" accept two formats as input:"),l=h(),c=r("ul"),q=r("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),_e=h(),D=r("li"),pe=n("having all inputs as a list, tuple or dict in the first positional argument."),Z=h(),E=r("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),R=r("code"),he=n("model.fit()"),Ae=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=r("code"),oe=n("model.fit()"),ie=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),W=r("code"),le=n("fit()"),ye=n(" and "),K=r("code"),$e=n("predict()"),ve=n(`, such as when creating your own layers or models with
the Keras `),I=r("code"),Ce=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=h(),j=r("ul"),P=r("li"),ue=n("a single Tensor with "),V=r("code"),ke=n("input_ids"),me=n(" only and nothing else: "),U=r("code"),Fe=n("model(input_ids)"),be=h(),x=r("li"),Ee=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),H=r("code"),se=n("model([input_ids, attention_mask])"),Be=n(" or "),S=r("code"),ze=n("model([input_ids, attention_mask, token_type_ids])"),Me=h(),N=r("li"),qe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=r("code"),re=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),X=h(),A=r("p"),ce=n(`Note that when creating models and layers with
`),O=r("a"),ge=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(g){d=a(g,"P",{});var B=i(d);v=s(B,"TensorFlow models and layers in "),p=a(B,"CODE",{});var De=i(p);m=s(De,"transformers"),De.forEach(t),b=s(B," accept two formats as input:"),B.forEach(t),l=u(g),c=a(g,"UL",{});var ee=i(c);q=a(ee,"LI",{});var Re=i(q);Te=s(Re,"having all inputs as keyword arguments (like PyTorch models), or"),Re.forEach(t),_e=u(ee),D=a(ee,"LI",{});var We=i(D);pe=s(We,"having all inputs as a list, tuple or dict in the first positional argument."),We.forEach(t),ee.forEach(t),Z=u(g),E=a(g,"P",{});var z=i(E);we=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 `),R=a(z,"CODE",{});var Pe=i(R);he=s(Pe,"model.fit()"),Pe.forEach(t),Ae=s(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=a(z,"CODE",{});var Ke=i(Y);oe=s(Ke,"model.fit()"),Ke.forEach(t),ie=s(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),W=a(z,"CODE",{});var Ue=i(W);le=s(Ue,"fit()"),Ue.forEach(t),ye=s(z," and "),K=a(z,"CODE",{});var Le=i(K);$e=s(Le,"predict()"),Le.forEach(t),ve=s(z,`, such as when creating your own layers or models with
the Keras `),I=a(z,"CODE",{});var Oe=i(I);Ce=s(Oe,"Functional"),Oe.forEach(t),de=s(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=u(g),j=a(g,"UL",{});var L=i(j);P=a(L,"LI",{});var J=i(P);ue=s(J,"a single Tensor with "),V=a(J,"CODE",{});var Ie=i(V);ke=s(Ie,"input_ids"),Ie.forEach(t),me=s(J," only and nothing else: "),U=a(J,"CODE",{});var Ne=i(U);Fe=s(Ne,"model(input_ids)"),Ne.forEach(t),J.forEach(t),be=u(L),x=a(L,"LI",{});var G=i(x);Ee=s(G,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),H=a(G,"CODE",{});var Ye=i(H);se=s(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),Be=s(G," or "),S=a(G,"CODE",{});var Se=i(S);ze=s(Se,"model([input_ids, attention_mask, token_type_ids])"),Se.forEach(t),G.forEach(t),Me=u(L),N=a(L,"LI",{});var fe=i(N);qe=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=a(fe,"CODE",{});var He=i(Q);re=s(He,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),He.forEach(t),fe.forEach(t),L.forEach(t),X=u(g),A=a(g,"P",{});var te=i(A);ce=s(te,`Note that when creating models and layers with
`),O=a(te,"A",{href:!0,rel:!0});var xe=i(O);ge=s(xe,"subclassing"),xe.forEach(t),je=s(te,` 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!`),te.forEach(t),this.h()},h(){f(O,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(O,"rel","nofollow")},m(g,B){_(g,d,B),e(d,v),e(d,p),e(p,m),e(d,b),_(g,l,B),_(g,c,B),e(c,q),e(q,Te),e(c,_e),e(c,D),e(D,pe),_(g,Z,B),_(g,E,B),e(E,we),e(E,R),e(R,he),e(E,Ae),e(E,Y),e(Y,oe),e(E,ie),e(E,W),e(W,le),e(E,ye),e(E,K),e(K,$e),e(E,ve),e(E,I),e(I,Ce),e(E,de),_(g,ne,B),_(g,j,B),e(j,P),e(P,ue),e(P,V),e(V,ke),e(P,me),e(P,U),e(U,Fe),e(j,be),e(j,x),e(x,Ee),e(x,H),e(H,se),e(x,Be),e(x,S),e(S,ze),e(j,Me),e(j,N),e(N,qe),e(N,Q),e(Q,re),_(g,X,B),_(g,A,B),e(A,ce),e(A,O),e(O,ge),e(A,je)},d(g){g&&t(d),g&&t(l),g&&t(c),g&&t(Z),g&&t(E),g&&t(ne),g&&t(j),g&&t(X),g&&t(A)}}}function uv(M){let d,v,p,m,b;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"),m=n("Module"),b=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);m=s(q,"Module"),q.forEach(t),b=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){_(l,d,c),e(d,v),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function mv(M){let d,v,p,m,b;return m=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(),T(m.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example:"),c.forEach(t),p=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,p,c),y(m,l,c),b=!0},p:Ve,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){C(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),F(m,l)}}}function fv(M){let d,v,p,m,b,l,c,q,Te,_e,D,pe,Z,E,we,R,he,Ae,Y,oe,ie,W,le,ye,K,$e,ve,I,Ce,de,ne,j,P,ue,V,ke,me,U,Fe,be,x,Ee,H,se,Be,S,ze,Me,N,qe,Q,re,X,A,ce,O,ge,je;return{c(){d=r("p"),v=n("TensorFlow models and layers in "),p=r("code"),m=n("transformers"),b=n(" accept two formats as input:"),l=h(),c=r("ul"),q=r("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),_e=h(),D=r("li"),pe=n("having all inputs as a list, tuple or dict in the first positional argument."),Z=h(),E=r("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),R=r("code"),he=n("model.fit()"),Ae=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=r("code"),oe=n("model.fit()"),ie=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),W=r("code"),le=n("fit()"),ye=n(" and "),K=r("code"),$e=n("predict()"),ve=n(`, such as when creating your own layers or models with
the Keras `),I=r("code"),Ce=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=h(),j=r("ul"),P=r("li"),ue=n("a single Tensor with "),V=r("code"),ke=n("input_ids"),me=n(" only and nothing else: "),U=r("code"),Fe=n("model(input_ids)"),be=h(),x=r("li"),Ee=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),H=r("code"),se=n("model([input_ids, attention_mask])"),Be=n(" or "),S=r("code"),ze=n("model([input_ids, attention_mask, token_type_ids])"),Me=h(),N=r("li"),qe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=r("code"),re=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),X=h(),A=r("p"),ce=n(`Note that when creating models and layers with
`),O=r("a"),ge=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(g){d=a(g,"P",{});var B=i(d);v=s(B,"TensorFlow models and layers in "),p=a(B,"CODE",{});var De=i(p);m=s(De,"transformers"),De.forEach(t),b=s(B," accept two formats as input:"),B.forEach(t),l=u(g),c=a(g,"UL",{});var ee=i(c);q=a(ee,"LI",{});var Re=i(q);Te=s(Re,"having all inputs as keyword arguments (like PyTorch models), or"),Re.forEach(t),_e=u(ee),D=a(ee,"LI",{});var We=i(D);pe=s(We,"having all inputs as a list, tuple or dict in the first positional argument."),We.forEach(t),ee.forEach(t),Z=u(g),E=a(g,"P",{});var z=i(E);we=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 `),R=a(z,"CODE",{});var Pe=i(R);he=s(Pe,"model.fit()"),Pe.forEach(t),Ae=s(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=a(z,"CODE",{});var Ke=i(Y);oe=s(Ke,"model.fit()"),Ke.forEach(t),ie=s(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),W=a(z,"CODE",{});var Ue=i(W);le=s(Ue,"fit()"),Ue.forEach(t),ye=s(z," and "),K=a(z,"CODE",{});var Le=i(K);$e=s(Le,"predict()"),Le.forEach(t),ve=s(z,`, such as when creating your own layers or models with
the Keras `),I=a(z,"CODE",{});var Oe=i(I);Ce=s(Oe,"Functional"),Oe.forEach(t),de=s(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=u(g),j=a(g,"UL",{});var L=i(j);P=a(L,"LI",{});var J=i(P);ue=s(J,"a single Tensor with "),V=a(J,"CODE",{});var Ie=i(V);ke=s(Ie,"input_ids"),Ie.forEach(t),me=s(J," only and nothing else: "),U=a(J,"CODE",{});var Ne=i(U);Fe=s(Ne,"model(input_ids)"),Ne.forEach(t),J.forEach(t),be=u(L),x=a(L,"LI",{});var G=i(x);Ee=s(G,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),H=a(G,"CODE",{});var Ye=i(H);se=s(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),Be=s(G," or "),S=a(G,"CODE",{});var Se=i(S);ze=s(Se,"model([input_ids, attention_mask, token_type_ids])"),Se.forEach(t),G.forEach(t),Me=u(L),N=a(L,"LI",{});var fe=i(N);qe=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=a(fe,"CODE",{});var He=i(Q);re=s(He,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),He.forEach(t),fe.forEach(t),L.forEach(t),X=u(g),A=a(g,"P",{});var te=i(A);ce=s(te,`Note that when creating models and layers with
`),O=a(te,"A",{href:!0,rel:!0});var xe=i(O);ge=s(xe,"subclassing"),xe.forEach(t),je=s(te,` 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!`),te.forEach(t),this.h()},h(){f(O,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(O,"rel","nofollow")},m(g,B){_(g,d,B),e(d,v),e(d,p),e(p,m),e(d,b),_(g,l,B),_(g,c,B),e(c,q),e(q,Te),e(c,_e),e(c,D),e(D,pe),_(g,Z,B),_(g,E,B),e(E,we),e(E,R),e(R,he),e(E,Ae),e(E,Y),e(Y,oe),e(E,ie),e(E,W),e(W,le),e(E,ye),e(E,K),e(K,$e),e(E,ve),e(E,I),e(I,Ce),e(E,de),_(g,ne,B),_(g,j,B),e(j,P),e(P,ue),e(P,V),e(V,ke),e(P,me),e(P,U),e(U,Fe),e(j,be),e(j,x),e(x,Ee),e(x,H),e(H,se),e(x,Be),e(x,S),e(S,ze),e(j,Me),e(j,N),e(N,qe),e(N,Q),e(Q,re),_(g,X,B),_(g,A,B),e(A,ce),e(A,O),e(O,ge),e(A,je)},d(g){g&&t(d),g&&t(l),g&&t(c),g&&t(Z),g&&t(E),g&&t(ne),g&&t(j),g&&t(X),g&&t(A)}}}function gv(M){let d,v,p,m,b;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"),m=n("Module"),b=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);m=s(q,"Module"),q.forEach(t),b=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){_(l,d,c),e(d,v),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function _v(M){let d,v,p,m,b;return m=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(),T(m.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example:"),c.forEach(t),p=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,p,c),y(m,l,c),b=!0},p:Ve,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){C(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),F(m,l)}}}function vv(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(){T(d.$$.fragment)},l(p){w(d.$$.fragment,p)},m(p,m){y(d,p,m),v=!0},p:Ve,i(p){v||($(d.$$.fragment,p),v=!0)},o(p){C(d.$$.fragment,p),v=!1},d(p){F(d,p)}}}function kv(M){let d,v,p,m,b,l,c,q,Te,_e,D,pe,Z,E,we,R,he,Ae,Y,oe,ie,W,le,ye,K,$e,ve,I,Ce,de,ne,j,P,ue,V,ke,me,U,Fe,be,x,Ee,H,se,Be,S,ze,Me,N,qe,Q,re,X,A,ce,O,ge,je;return{c(){d=r("p"),v=n("TensorFlow models and layers in "),p=r("code"),m=n("transformers"),b=n(" accept two formats as input:"),l=h(),c=r("ul"),q=r("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),_e=h(),D=r("li"),pe=n("having all inputs as a list, tuple or dict in the first positional argument."),Z=h(),E=r("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),R=r("code"),he=n("model.fit()"),Ae=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=r("code"),oe=n("model.fit()"),ie=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),W=r("code"),le=n("fit()"),ye=n(" and "),K=r("code"),$e=n("predict()"),ve=n(`, such as when creating your own layers or models with
the Keras `),I=r("code"),Ce=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=h(),j=r("ul"),P=r("li"),ue=n("a single Tensor with "),V=r("code"),ke=n("input_ids"),me=n(" only and nothing else: "),U=r("code"),Fe=n("model(input_ids)"),be=h(),x=r("li"),Ee=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),H=r("code"),se=n("model([input_ids, attention_mask])"),Be=n(" or "),S=r("code"),ze=n("model([input_ids, attention_mask, token_type_ids])"),Me=h(),N=r("li"),qe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=r("code"),re=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),X=h(),A=r("p"),ce=n(`Note that when creating models and layers with
`),O=r("a"),ge=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(g){d=a(g,"P",{});var B=i(d);v=s(B,"TensorFlow models and layers in "),p=a(B,"CODE",{});var De=i(p);m=s(De,"transformers"),De.forEach(t),b=s(B," accept two formats as input:"),B.forEach(t),l=u(g),c=a(g,"UL",{});var ee=i(c);q=a(ee,"LI",{});var Re=i(q);Te=s(Re,"having all inputs as keyword arguments (like PyTorch models), or"),Re.forEach(t),_e=u(ee),D=a(ee,"LI",{});var We=i(D);pe=s(We,"having all inputs as a list, tuple or dict in the first positional argument."),We.forEach(t),ee.forEach(t),Z=u(g),E=a(g,"P",{});var z=i(E);we=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 `),R=a(z,"CODE",{});var Pe=i(R);he=s(Pe,"model.fit()"),Pe.forEach(t),Ae=s(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=a(z,"CODE",{});var Ke=i(Y);oe=s(Ke,"model.fit()"),Ke.forEach(t),ie=s(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),W=a(z,"CODE",{});var Ue=i(W);le=s(Ue,"fit()"),Ue.forEach(t),ye=s(z," and "),K=a(z,"CODE",{});var Le=i(K);$e=s(Le,"predict()"),Le.forEach(t),ve=s(z,`, such as when creating your own layers or models with
the Keras `),I=a(z,"CODE",{});var Oe=i(I);Ce=s(Oe,"Functional"),Oe.forEach(t),de=s(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=u(g),j=a(g,"UL",{});var L=i(j);P=a(L,"LI",{});var J=i(P);ue=s(J,"a single Tensor with "),V=a(J,"CODE",{});var Ie=i(V);ke=s(Ie,"input_ids"),Ie.forEach(t),me=s(J," only and nothing else: "),U=a(J,"CODE",{});var Ne=i(U);Fe=s(Ne,"model(input_ids)"),Ne.forEach(t),J.forEach(t),be=u(L),x=a(L,"LI",{});var G=i(x);Ee=s(G,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),H=a(G,"CODE",{});var Ye=i(H);se=s(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),Be=s(G," or "),S=a(G,"CODE",{});var Se=i(S);ze=s(Se,"model([input_ids, attention_mask, token_type_ids])"),Se.forEach(t),G.forEach(t),Me=u(L),N=a(L,"LI",{});var fe=i(N);qe=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=a(fe,"CODE",{});var He=i(Q);re=s(He,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),He.forEach(t),fe.forEach(t),L.forEach(t),X=u(g),A=a(g,"P",{});var te=i(A);ce=s(te,`Note that when creating models and layers with
`),O=a(te,"A",{href:!0,rel:!0});var xe=i(O);ge=s(xe,"subclassing"),xe.forEach(t),je=s(te,` 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!`),te.forEach(t),this.h()},h(){f(O,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(O,"rel","nofollow")},m(g,B){_(g,d,B),e(d,v),e(d,p),e(p,m),e(d,b),_(g,l,B),_(g,c,B),e(c,q),e(q,Te),e(c,_e),e(c,D),e(D,pe),_(g,Z,B),_(g,E,B),e(E,we),e(E,R),e(R,he),e(E,Ae),e(E,Y),e(Y,oe),e(E,ie),e(E,W),e(W,le),e(E,ye),e(E,K),e(K,$e),e(E,ve),e(E,I),e(I,Ce),e(E,de),_(g,ne,B),_(g,j,B),e(j,P),e(P,ue),e(P,V),e(V,ke),e(P,me),e(P,U),e(U,Fe),e(j,be),e(j,x),e(x,Ee),e(x,H),e(H,se),e(x,Be),e(x,S),e(S,ze),e(j,Me),e(j,N),e(N,qe),e(N,Q),e(Q,re),_(g,X,B),_(g,A,B),e(A,ce),e(A,O),e(O,ge),e(A,je)},d(g){g&&t(d),g&&t(l),g&&t(c),g&&t(Z),g&&t(E),g&&t(ne),g&&t(j),g&&t(X),g&&t(A)}}}function bv(M){let d,v,p,m,b;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"),m=n("Module"),b=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);m=s(q,"Module"),q.forEach(t),b=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){_(l,d,c),e(d,v),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function Tv(M){let d,v,p,m,b;return m=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(),T(m.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example:"),c.forEach(t),p=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,p,c),y(m,l,c),b=!0},p:Ve,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){C(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),F(m,l)}}}function wv(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(){T(d.$$.fragment)},l(p){w(d.$$.fragment,p)},m(p,m){y(d,p,m),v=!0},p:Ve,i(p){v||($(d.$$.fragment,p),v=!0)},o(p){C(d.$$.fragment,p),v=!1},d(p){F(d,p)}}}function yv(M){let d,v,p,m,b,l,c,q,Te,_e,D,pe,Z,E,we,R,he,Ae,Y,oe,ie,W,le,ye,K,$e,ve,I,Ce,de,ne,j,P,ue,V,ke,me,U,Fe,be,x,Ee,H,se,Be,S,ze,Me,N,qe,Q,re,X,A,ce,O,ge,je;return{c(){d=r("p"),v=n("TensorFlow models and layers in "),p=r("code"),m=n("transformers"),b=n(" accept two formats as input:"),l=h(),c=r("ul"),q=r("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),_e=h(),D=r("li"),pe=n("having all inputs as a list, tuple or dict in the first positional argument."),Z=h(),E=r("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),R=r("code"),he=n("model.fit()"),Ae=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=r("code"),oe=n("model.fit()"),ie=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),W=r("code"),le=n("fit()"),ye=n(" and "),K=r("code"),$e=n("predict()"),ve=n(`, such as when creating your own layers or models with
the Keras `),I=r("code"),Ce=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=h(),j=r("ul"),P=r("li"),ue=n("a single Tensor with "),V=r("code"),ke=n("input_ids"),me=n(" only and nothing else: "),U=r("code"),Fe=n("model(input_ids)"),be=h(),x=r("li"),Ee=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),H=r("code"),se=n("model([input_ids, attention_mask])"),Be=n(" or "),S=r("code"),ze=n("model([input_ids, attention_mask, token_type_ids])"),Me=h(),N=r("li"),qe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=r("code"),re=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),X=h(),A=r("p"),ce=n(`Note that when creating models and layers with
`),O=r("a"),ge=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(g){d=a(g,"P",{});var B=i(d);v=s(B,"TensorFlow models and layers in "),p=a(B,"CODE",{});var De=i(p);m=s(De,"transformers"),De.forEach(t),b=s(B," accept two formats as input:"),B.forEach(t),l=u(g),c=a(g,"UL",{});var ee=i(c);q=a(ee,"LI",{});var Re=i(q);Te=s(Re,"having all inputs as keyword arguments (like PyTorch models), or"),Re.forEach(t),_e=u(ee),D=a(ee,"LI",{});var We=i(D);pe=s(We,"having all inputs as a list, tuple or dict in the first positional argument."),We.forEach(t),ee.forEach(t),Z=u(g),E=a(g,"P",{});var z=i(E);we=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 `),R=a(z,"CODE",{});var Pe=i(R);he=s(Pe,"model.fit()"),Pe.forEach(t),Ae=s(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=a(z,"CODE",{});var Ke=i(Y);oe=s(Ke,"model.fit()"),Ke.forEach(t),ie=s(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),W=a(z,"CODE",{});var Ue=i(W);le=s(Ue,"fit()"),Ue.forEach(t),ye=s(z," and "),K=a(z,"CODE",{});var Le=i(K);$e=s(Le,"predict()"),Le.forEach(t),ve=s(z,`, such as when creating your own layers or models with
the Keras `),I=a(z,"CODE",{});var Oe=i(I);Ce=s(Oe,"Functional"),Oe.forEach(t),de=s(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=u(g),j=a(g,"UL",{});var L=i(j);P=a(L,"LI",{});var J=i(P);ue=s(J,"a single Tensor with "),V=a(J,"CODE",{});var Ie=i(V);ke=s(Ie,"input_ids"),Ie.forEach(t),me=s(J," only and nothing else: "),U=a(J,"CODE",{});var Ne=i(U);Fe=s(Ne,"model(input_ids)"),Ne.forEach(t),J.forEach(t),be=u(L),x=a(L,"LI",{});var G=i(x);Ee=s(G,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),H=a(G,"CODE",{});var Ye=i(H);se=s(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),Be=s(G," or "),S=a(G,"CODE",{});var Se=i(S);ze=s(Se,"model([input_ids, attention_mask, token_type_ids])"),Se.forEach(t),G.forEach(t),Me=u(L),N=a(L,"LI",{});var fe=i(N);qe=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=a(fe,"CODE",{});var He=i(Q);re=s(He,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),He.forEach(t),fe.forEach(t),L.forEach(t),X=u(g),A=a(g,"P",{});var te=i(A);ce=s(te,`Note that when creating models and layers with
`),O=a(te,"A",{href:!0,rel:!0});var xe=i(O);ge=s(xe,"subclassing"),xe.forEach(t),je=s(te,` 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!`),te.forEach(t),this.h()},h(){f(O,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(O,"rel","nofollow")},m(g,B){_(g,d,B),e(d,v),e(d,p),e(p,m),e(d,b),_(g,l,B),_(g,c,B),e(c,q),e(q,Te),e(c,_e),e(c,D),e(D,pe),_(g,Z,B),_(g,E,B),e(E,we),e(E,R),e(R,he),e(E,Ae),e(E,Y),e(Y,oe),e(E,ie),e(E,W),e(W,le),e(E,ye),e(E,K),e(K,$e),e(E,ve),e(E,I),e(I,Ce),e(E,de),_(g,ne,B),_(g,j,B),e(j,P),e(P,ue),e(P,V),e(V,ke),e(P,me),e(P,U),e(U,Fe),e(j,be),e(j,x),e(x,Ee),e(x,H),e(H,se),e(x,Be),e(x,S),e(S,ze),e(j,Me),e(j,N),e(N,qe),e(N,Q),e(Q,re),_(g,X,B),_(g,A,B),e(A,ce),e(A,O),e(O,ge),e(A,je)},d(g){g&&t(d),g&&t(l),g&&t(c),g&&t(Z),g&&t(E),g&&t(ne),g&&t(j),g&&t(X),g&&t(A)}}}function $v(M){let d,v,p,m,b;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"),m=n("Module"),b=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);m=s(q,"Module"),q.forEach(t),b=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){_(l,d,c),e(d,v),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function Cv(M){let d,v,p,m,b;return m=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(),T(m.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example:"),c.forEach(t),p=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,p,c),y(m,l,c),b=!0},p:Ve,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){C(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),F(m,l)}}}function Fv(M){let d,v,p,m,b,l,c,q,Te,_e,D,pe,Z,E,we,R,he,Ae,Y,oe,ie,W,le,ye,K,$e,ve,I,Ce,de,ne,j,P,ue,V,ke,me,U,Fe,be,x,Ee,H,se,Be,S,ze,Me,N,qe,Q,re,X,A,ce,O,ge,je;return{c(){d=r("p"),v=n("TensorFlow models and layers in "),p=r("code"),m=n("transformers"),b=n(" accept two formats as input:"),l=h(),c=r("ul"),q=r("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),_e=h(),D=r("li"),pe=n("having all inputs as a list, tuple or dict in the first positional argument."),Z=h(),E=r("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),R=r("code"),he=n("model.fit()"),Ae=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=r("code"),oe=n("model.fit()"),ie=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),W=r("code"),le=n("fit()"),ye=n(" and "),K=r("code"),$e=n("predict()"),ve=n(`, such as when creating your own layers or models with
the Keras `),I=r("code"),Ce=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=h(),j=r("ul"),P=r("li"),ue=n("a single Tensor with "),V=r("code"),ke=n("input_ids"),me=n(" only and nothing else: "),U=r("code"),Fe=n("model(input_ids)"),be=h(),x=r("li"),Ee=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),H=r("code"),se=n("model([input_ids, attention_mask])"),Be=n(" or "),S=r("code"),ze=n("model([input_ids, attention_mask, token_type_ids])"),Me=h(),N=r("li"),qe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=r("code"),re=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),X=h(),A=r("p"),ce=n(`Note that when creating models and layers with
`),O=r("a"),ge=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(g){d=a(g,"P",{});var B=i(d);v=s(B,"TensorFlow models and layers in "),p=a(B,"CODE",{});var De=i(p);m=s(De,"transformers"),De.forEach(t),b=s(B," accept two formats as input:"),B.forEach(t),l=u(g),c=a(g,"UL",{});var ee=i(c);q=a(ee,"LI",{});var Re=i(q);Te=s(Re,"having all inputs as keyword arguments (like PyTorch models), or"),Re.forEach(t),_e=u(ee),D=a(ee,"LI",{});var We=i(D);pe=s(We,"having all inputs as a list, tuple or dict in the first positional argument."),We.forEach(t),ee.forEach(t),Z=u(g),E=a(g,"P",{});var z=i(E);we=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 `),R=a(z,"CODE",{});var Pe=i(R);he=s(Pe,"model.fit()"),Pe.forEach(t),Ae=s(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=a(z,"CODE",{});var Ke=i(Y);oe=s(Ke,"model.fit()"),Ke.forEach(t),ie=s(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),W=a(z,"CODE",{});var Ue=i(W);le=s(Ue,"fit()"),Ue.forEach(t),ye=s(z," and "),K=a(z,"CODE",{});var Le=i(K);$e=s(Le,"predict()"),Le.forEach(t),ve=s(z,`, such as when creating your own layers or models with
the Keras `),I=a(z,"CODE",{});var Oe=i(I);Ce=s(Oe,"Functional"),Oe.forEach(t),de=s(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=u(g),j=a(g,"UL",{});var L=i(j);P=a(L,"LI",{});var J=i(P);ue=s(J,"a single Tensor with "),V=a(J,"CODE",{});var Ie=i(V);ke=s(Ie,"input_ids"),Ie.forEach(t),me=s(J," only and nothing else: "),U=a(J,"CODE",{});var Ne=i(U);Fe=s(Ne,"model(input_ids)"),Ne.forEach(t),J.forEach(t),be=u(L),x=a(L,"LI",{});var G=i(x);Ee=s(G,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),H=a(G,"CODE",{});var Ye=i(H);se=s(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),Be=s(G," or "),S=a(G,"CODE",{});var Se=i(S);ze=s(Se,"model([input_ids, attention_mask, token_type_ids])"),Se.forEach(t),G.forEach(t),Me=u(L),N=a(L,"LI",{});var fe=i(N);qe=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=a(fe,"CODE",{});var He=i(Q);re=s(He,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),He.forEach(t),fe.forEach(t),L.forEach(t),X=u(g),A=a(g,"P",{});var te=i(A);ce=s(te,`Note that when creating models and layers with
`),O=a(te,"A",{href:!0,rel:!0});var xe=i(O);ge=s(xe,"subclassing"),xe.forEach(t),je=s(te,` 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!`),te.forEach(t),this.h()},h(){f(O,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(O,"rel","nofollow")},m(g,B){_(g,d,B),e(d,v),e(d,p),e(p,m),e(d,b),_(g,l,B),_(g,c,B),e(c,q),e(q,Te),e(c,_e),e(c,D),e(D,pe),_(g,Z,B),_(g,E,B),e(E,we),e(E,R),e(R,he),e(E,Ae),e(E,Y),e(Y,oe),e(E,ie),e(E,W),e(W,le),e(E,ye),e(E,K),e(K,$e),e(E,ve),e(E,I),e(I,Ce),e(E,de),_(g,ne,B),_(g,j,B),e(j,P),e(P,ue),e(P,V),e(V,ke),e(P,me),e(P,U),e(U,Fe),e(j,be),e(j,x),e(x,Ee),e(x,H),e(H,se),e(x,Be),e(x,S),e(S,ze),e(j,Me),e(j,N),e(N,qe),e(N,Q),e(Q,re),_(g,X,B),_(g,A,B),e(A,ce),e(A,O),e(O,ge),e(A,je)},d(g){g&&t(d),g&&t(l),g&&t(c),g&&t(Z),g&&t(E),g&&t(ne),g&&t(j),g&&t(X),g&&t(A)}}}function Ev(M){let d,v,p,m,b;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"),m=n("Module"),b=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);m=s(q,"Module"),q.forEach(t),b=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){_(l,d,c),e(d,v),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function Bv(M){let d,v,p,m,b;return m=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(),T(m.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example:"),c.forEach(t),p=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,p,c),y(m,l,c),b=!0},p:Ve,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){C(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),F(m,l)}}}function zv(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(){T(d.$$.fragment)},l(p){w(d.$$.fragment,p)},m(p,m){y(d,p,m),v=!0},p:Ve,i(p){v||($(d.$$.fragment,p),v=!0)},o(p){C(d.$$.fragment,p),v=!1},d(p){F(d,p)}}}function Mv(M){let d,v,p,m,b,l,c,q,Te,_e,D,pe,Z,E,we,R,he,Ae,Y,oe,ie,W,le,ye,K,$e,ve,I,Ce,de,ne,j,P,ue,V,ke,me,U,Fe,be,x,Ee,H,se,Be,S,ze,Me,N,qe,Q,re,X,A,ce,O,ge,je;return{c(){d=r("p"),v=n("TensorFlow models and layers in "),p=r("code"),m=n("transformers"),b=n(" accept two formats as input:"),l=h(),c=r("ul"),q=r("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),_e=h(),D=r("li"),pe=n("having all inputs as a list, tuple or dict in the first positional argument."),Z=h(),E=r("p"),we=n(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),R=r("code"),he=n("model.fit()"),Ae=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=r("code"),oe=n("model.fit()"),ie=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),W=r("code"),le=n("fit()"),ye=n(" and "),K=r("code"),$e=n("predict()"),ve=n(`, such as when creating your own layers or models with
the Keras `),I=r("code"),Ce=n("Functional"),de=n(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ne=h(),j=r("ul"),P=r("li"),ue=n("a single Tensor with "),V=r("code"),ke=n("input_ids"),me=n(" only and nothing else: "),U=r("code"),Fe=n("model(input_ids)"),be=h(),x=r("li"),Ee=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),H=r("code"),se=n("model([input_ids, attention_mask])"),Be=n(" or "),S=r("code"),ze=n("model([input_ids, attention_mask, token_type_ids])"),Me=h(),N=r("li"),qe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=r("code"),re=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),X=h(),A=r("p"),ce=n(`Note that when creating models and layers with
`),O=r("a"),ge=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(g){d=a(g,"P",{});var B=i(d);v=s(B,"TensorFlow models and layers in "),p=a(B,"CODE",{});var De=i(p);m=s(De,"transformers"),De.forEach(t),b=s(B," accept two formats as input:"),B.forEach(t),l=u(g),c=a(g,"UL",{});var ee=i(c);q=a(ee,"LI",{});var Re=i(q);Te=s(Re,"having all inputs as keyword arguments (like PyTorch models), or"),Re.forEach(t),_e=u(ee),D=a(ee,"LI",{});var We=i(D);pe=s(We,"having all inputs as a list, tuple or dict in the first positional argument."),We.forEach(t),ee.forEach(t),Z=u(g),E=a(g,"P",{});var z=i(E);we=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 `),R=a(z,"CODE",{});var Pe=i(R);he=s(Pe,"model.fit()"),Pe.forEach(t),Ae=s(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Y=a(z,"CODE",{});var Ke=i(Y);oe=s(Ke,"model.fit()"),Ke.forEach(t),ie=s(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),W=a(z,"CODE",{});var Ue=i(W);le=s(Ue,"fit()"),Ue.forEach(t),ye=s(z," and "),K=a(z,"CODE",{});var Le=i(K);$e=s(Le,"predict()"),Le.forEach(t),ve=s(z,`, such as when creating your own layers or models with
the Keras `),I=a(z,"CODE",{});var Oe=i(I);Ce=s(Oe,"Functional"),Oe.forEach(t),de=s(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ne=u(g),j=a(g,"UL",{});var L=i(j);P=a(L,"LI",{});var J=i(P);ue=s(J,"a single Tensor with "),V=a(J,"CODE",{});var Ie=i(V);ke=s(Ie,"input_ids"),Ie.forEach(t),me=s(J," only and nothing else: "),U=a(J,"CODE",{});var Ne=i(U);Fe=s(Ne,"model(input_ids)"),Ne.forEach(t),J.forEach(t),be=u(L),x=a(L,"LI",{});var G=i(x);Ee=s(G,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),H=a(G,"CODE",{});var Ye=i(H);se=s(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),Be=s(G," or "),S=a(G,"CODE",{});var Se=i(S);ze=s(Se,"model([input_ids, attention_mask, token_type_ids])"),Se.forEach(t),G.forEach(t),Me=u(L),N=a(L,"LI",{});var fe=i(N);qe=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Q=a(fe,"CODE",{});var He=i(Q);re=s(He,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),He.forEach(t),fe.forEach(t),L.forEach(t),X=u(g),A=a(g,"P",{});var te=i(A);ce=s(te,`Note that when creating models and layers with
`),O=a(te,"A",{href:!0,rel:!0});var xe=i(O);ge=s(xe,"subclassing"),xe.forEach(t),je=s(te,` 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!`),te.forEach(t),this.h()},h(){f(O,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(O,"rel","nofollow")},m(g,B){_(g,d,B),e(d,v),e(d,p),e(p,m),e(d,b),_(g,l,B),_(g,c,B),e(c,q),e(q,Te),e(c,_e),e(c,D),e(D,pe),_(g,Z,B),_(g,E,B),e(E,we),e(E,R),e(R,he),e(E,Ae),e(E,Y),e(Y,oe),e(E,ie),e(E,W),e(W,le),e(E,ye),e(E,K),e(K,$e),e(E,ve),e(E,I),e(I,Ce),e(E,de),_(g,ne,B),_(g,j,B),e(j,P),e(P,ue),e(P,V),e(V,ke),e(P,me),e(P,U),e(U,Fe),e(j,be),e(j,x),e(x,Ee),e(x,H),e(H,se),e(x,Be),e(x,S),e(S,ze),e(j,Me),e(j,N),e(N,qe),e(N,Q),e(Q,re),_(g,X,B),_(g,A,B),e(A,ce),e(A,O),e(O,ge),e(A,je)},d(g){g&&t(d),g&&t(l),g&&t(c),g&&t(Z),g&&t(E),g&&t(ne),g&&t(j),g&&t(X),g&&t(A)}}}function qv(M){let d,v,p,m,b;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"),m=n("Module"),b=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);m=s(q,"Module"),q.forEach(t),b=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){_(l,d,c),e(d,v),e(d,p),e(p,m),e(d,b)},d(l){l&&t(d)}}}function jv(M){let d,v,p,m,b;return m=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(),T(m.$$.fragment)},l(l){d=a(l,"P",{});var c=i(d);v=s(c,"Example:"),c.forEach(t),p=u(l),w(m.$$.fragment,l)},m(l,c){_(l,d,c),e(d,v),_(l,p,c),y(m,l,c),b=!0},p:Ve,i(l){b||($(m.$$.fragment,l),b=!0)},o(l){C(m.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(p),F(m,l)}}}function xv(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(){T(d.$$.fragment)},l(p){w(d.$$.fragment,p)},m(p,m){y(d,p,m),v=!0},p:Ve,i(p){v||($(d.$$.fragment,p),v=!0)},o(p){C(d.$$.fragment,p),v=!1},d(p){F(d,p)}}}function Av(M){let d,v,p,m,b,l,c,q,Te,_e,D,pe,Z,E,we,R,he,Ae,Y,oe,ie,W,le,ye,K,$e,ve,I,Ce,de,ne,j,P,ue,V,ke,me,U,Fe,be,x,Ee,H,se,Be,S,ze,Me,N,qe,Q,re,X,A,ce,O,ge,je,g,B,De,ee,Re,We,z,Pe,Ke,Ue,Le,Oe,L,J,Ie,Ne,G,Ye,Se,fe,He,te,xe,$o,ba,In,Ed,Ta,Bd,hl,ut,Sn,zd,Kt,Md,yr,qd,jd,Rn,xd,Ad,Pd,Ut,Od,$r,Nd,Dd,Cr,Ld,Id,Sd,Co,ul,Yt,Fo,wa,Wn,Rd,ya,Wd,ml,Ge,Kn,Kd,$a,Ud,Yd,Un,Hd,Fr,Qd,Vd,Jd,Ot,Yn,Gd,Ca,Xd,Zd,Hn,Er,ec,Fa,tc,oc,Br,nc,Ea,sc,rc,Eo,Qn,ac,Vn,ic,Ba,lc,dc,cc,kt,Jn,pc,za,hc,uc,Bo,mc,Ht,fc,Ma,gc,_c,qa,vc,kc,bc,zr,Gn,fl,Qt,zo,ja,Xn,Tc,xa,wc,gl,at,Zn,yc,es,$c,Aa,Cc,Fc,Ec,ts,Bc,Mr,zc,Mc,qc,Nt,os,jc,Pa,xc,Ac,ns,qr,Pc,Oa,Oc,Nc,jr,Dc,Na,Lc,Ic,bt,ss,Sc,Da,Rc,Wc,Mo,Kc,Vt,Uc,La,Yc,Hc,Ia,Qc,Vc,_l,Jt,qo,Sa,rs,Jc,Ra,Gc,vl,At,as,Xc,is,Zc,ls,ep,tp,op,Tt,ds,np,Gt,sp,xr,rp,ap,Wa,ip,lp,dp,jo,cp,xo,kl,Xt,Ao,Ka,cs,pp,Ua,hp,bl,Pt,ps,up,Zt,mp,Ya,fp,gp,hs,_p,vp,kp,wt,us,bp,eo,Tp,Ar,wp,yp,Ha,$p,Cp,Fp,Po,Ep,Oo,Tl,to,No,Qa,ms,Bp,Va,zp,wl,mt,fs,Mp,Ja,qp,jp,gs,xp,_s,Ap,Pp,Op,it,vs,Np,oo,Dp,Pr,Lp,Ip,Ga,Sp,Rp,Wp,Do,Kp,Lo,Up,Io,yl,no,So,Xa,ks,Yp,Za,Hp,$l,ft,bs,Qp,ei,Vp,Jp,Ts,Gp,ws,Xp,Zp,eh,yt,ys,th,so,oh,Or,nh,sh,ti,rh,ah,ih,Ro,lh,Wo,Cl,ro,Ko,oi,$s,dh,ni,ch,Fl,gt,Cs,ph,si,hh,uh,Fs,mh,Es,fh,gh,_h,$t,Bs,vh,ao,kh,Nr,bh,Th,ri,wh,yh,$h,Uo,Ch,Yo,El,io,Ho,ai,zs,Fh,ii,Eh,Bl,_t,Ms,Bh,lo,zh,li,Mh,qh,di,jh,xh,Ah,qs,Ph,js,Oh,Nh,Dh,Ct,xs,Lh,co,Ih,Dr,Sh,Rh,ci,Wh,Kh,Uh,Qo,Yh,Vo,zl,po,Jo,pi,As,Hh,hi,Qh,Ml,et,Ps,Vh,ui,Jh,Gh,Os,Xh,Lr,Zh,eu,tu,Ns,ou,Ds,nu,su,ru,Go,au,Ft,Ls,iu,ho,lu,Ir,du,cu,mi,pu,hu,uu,Xo,mu,Zo,ql,uo,en,fi,Is,fu,gi,gu,jl,tt,Ss,_u,Rs,vu,_i,ku,bu,Tu,Ws,wu,Sr,yu,$u,Cu,Ks,Fu,Us,Eu,Bu,zu,tn,Mu,lt,Ys,qu,mo,ju,Rr,xu,Au,vi,Pu,Ou,Nu,on,Du,nn,Lu,sn,xl,fo,rn,ki,Hs,Iu,bi,Su,Al,ot,Qs,Ru,Ti,Wu,Ku,Vs,Uu,Wr,Yu,Hu,Qu,Js,Vu,Gs,Ju,Gu,Xu,an,Zu,dt,Xs,em,go,tm,Kr,om,nm,wi,sm,rm,am,ln,im,dn,lm,cn,Pl,_o,pn,yi,Zs,dm,$i,cm,Ol,nt,er,pm,Ci,hm,um,tr,mm,Ur,fm,gm,_m,or,vm,nr,km,bm,Tm,hn,wm,Et,sr,ym,vo,$m,Yr,Cm,Fm,Fi,Em,Bm,zm,un,Mm,mn,Nl,ko,fn,Ei,rr,qm,Bi,jm,Dl,st,ar,xm,zi,Am,Pm,ir,Om,Hr,Nm,Dm,Lm,lr,Im,dr,Sm,Rm,Wm,gn,Km,ct,cr,Um,bo,Ym,Qr,Hm,Qm,Mi,Vm,Jm,Gm,_n,Xm,vn,Zm,kn,Ll,To,bn,qi,pr,ef,ji,tf,Il,rt,hr,of,wo,nf,xi,sf,rf,Ai,af,lf,df,ur,cf,Vr,pf,hf,uf,mr,mf,fr,ff,gf,_f,Tn,vf,pt,gr,kf,yo,bf,Jr,Tf,wf,Pi,yf,$f,Cf,wn,Ff,yn,Ef,$n,Sl;return l=new Ze({}),le=new Ze({}),ce=new Ze({}),In=new Ze({}),Sn=new ae({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/v4.29.0/en/model_doc/convbert#transformers.ConvBertModel">ConvBertModel</a> or <a href="/docs/transformers/v4.29.0/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/v4.29.0/en/model_doc/convbert#transformers.ConvBertModel">ConvBertModel</a> or <a href="/docs/transformers/v4.29.0/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/v4.29.0/src/transformers/models/convbert/configuration_convbert.py#L37"}}),Co=new Qe({props:{anchor:"transformers.ConvBertConfig.example",$$slots:{default:[J_]},$$scope:{ctx:M}}}),Wn=new Ze({}),Kn=new ae({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/v4.29.0/src/transformers/models/convbert/tokenization_convbert.py#L76"}}),Yn=new ae({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/v4.29.0/src/transformers/models/convbert/tokenization_convbert.py#L206",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>
`}}),Qn=new ae({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/v4.29.0/src/transformers/models/convbert/tokenization_convbert.py#L231",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>
`}}),Jn=new ae({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/v4.29.0/src/transformers/models/convbert/tokenization_convbert.py#L259",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>
`}}),Bo=new Qe({props:{anchor:"transformers.ConvBertTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[G_]},$$scope:{ctx:M}}}),Gn=new ae({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/v4.29.0/src/transformers/models/convbert/tokenization_convbert.py#L288"}}),Xn=new Ze({}),Zn=new ae({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/v4.29.0/src/transformers/models/convbert/tokenization_convbert_fast.py#L55"}}),os=new ae({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/v4.29.0/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>
`}}),ss=new ae({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/v4.29.0/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>
`}}),Mo=new Qe({props:{anchor:"transformers.ConvBertTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[X_]},$$scope:{ctx:M}}}),rs=new Ze({}),as=new ae({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/v4.29.0/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/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/convbert/modeling_convbert.py#L767"}}),ds=new ae({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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/v4.29.0/src/transformers/models/convbert/modeling_convbert.py#L796",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/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/v4.29.0/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/v4.29.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),jo=new Xe({props:{$$slots:{default:[Z_]},$$scope:{ctx:M}}}),xo=new Qe({props:{anchor:"transformers.ConvBertModel.forward.example",$$slots:{default:[ev]},$$scope:{ctx:M}}}),cs=new Ze({}),ps=new ae({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/v4.29.0/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/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/convbert/modeling_convbert.py#L882"}}),us=new ae({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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/v4.29.0/src/transformers/models/convbert/modeling_convbert.py#L901",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/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/v4.29.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Po=new Xe({props:{$$slots:{default:[tv]},$$scope:{ctx:M}}}),Oo=new Qe({props:{anchor:"transformers.ConvBertForMaskedLM.forward.example",$$slots:{default:[ov]},$$scope:{ctx:M}}}),ms=new Ze({}),fs=new ae({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/v4.29.0/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/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/convbert/modeling_convbert.py#L993"}}),vs=new ae({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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/v4.29.0/src/transformers/models/convbert/modeling_convbert.py#L1006",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/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/v4.29.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Do=new Xe({props:{$$slots:{default:[nv]},$$scope:{ctx:M}}}),Lo=new Qe({props:{anchor:"transformers.ConvBertForSequenceClassification.forward.example",$$slots:{default:[sv]},$$scope:{ctx:M}}}),Io=new Qe({props:{anchor:"transformers.ConvBertForSequenceClassification.forward.example-2",$$slots:{default:[rv]},$$scope:{ctx:M}}}),ks=new Ze({}),bs=new ae({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/v4.29.0/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/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/convbert/modeling_convbert.py#L1090"}}),ys=new ae({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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/v4.29.0/src/transformers/models/convbert/modeling_convbert.py#L1103",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/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/v4.29.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ro=new Xe({props:{$$slots:{default:[av]},$$scope:{ctx:M}}}),Wo=new Qe({props:{anchor:"transformers.ConvBertForMultipleChoice.forward.example",$$slots:{default:[iv]},$$scope:{ctx:M}}}),$s=new Ze({}),Cs=new ae({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/v4.29.0/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/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/convbert/modeling_convbert.py#L1185"}}),Bs=new ae({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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/v4.29.0/src/transformers/models/convbert/modeling_convbert.py#L1202",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/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/v4.29.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Uo=new Xe({props:{$$slots:{default:[lv]},$$scope:{ctx:M}}}),Yo=new Qe({props:{anchor:"transformers.ConvBertForTokenClassification.forward.example",$$slots:{default:[dv]},$$scope:{ctx:M}}}),zs=new Ze({}),Ms=new ae({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/v4.29.0/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/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/convbert/modeling_convbert.py#L1268"}}),xs=new ae({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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/v4.29.0/src/transformers/models/convbert/modeling_convbert.py#L1281",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/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/v4.29.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Qo=new Xe({props:{$$slots:{default:[cv]},$$scope:{ctx:M}}}),Vo=new Qe({props:{anchor:"transformers.ConvBertForQuestionAnswering.forward.example",$$slots:{default:[pv]},$$scope:{ctx:M}}}),As=new Ze({}),Ps=new ae({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/v4.29.0/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/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/convbert/modeling_tf_convbert.py#L739"}}),Go=new Xe({props:{$$slots:{default:[hv]},$$scope:{ctx:M}}}),Ls=new ae({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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.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/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.29.0/src/transformers/models/convbert/modeling_tf_convbert.py#L745",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/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/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Xo=new Xe({props:{$$slots:{default:[uv]},$$scope:{ctx:M}}}),Zo=new Qe({props:{anchor:"transformers.TFConvBertModel.call.example",$$slots:{default:[mv]},$$scope:{ctx:M}}}),Is=new Ze({}),Ss=new ae({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/v4.29.0/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/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/convbert/modeling_tf_convbert.py#L840"}}),tn=new Xe({props:{$$slots:{default:[fv]},$$scope:{ctx:M}}}),Ys=new ae({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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.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/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.29.0/src/transformers/models/convbert/modeling_tf_convbert.py#L861",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/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/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),on=new Xe({props:{$$slots:{default:[gv]},$$scope:{ctx:M}}}),nn=new Qe({props:{anchor:"transformers.TFConvBertForMaskedLM.call.example",$$slots:{default:[_v]},$$scope:{ctx:M}}}),sn=new Qe({props:{anchor:"transformers.TFConvBertForMaskedLM.call.example-2",$$slots:{default:[vv]},$$scope:{ctx:M}}}),Hs=new Ze({}),Qs=new ae({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/v4.29.0/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/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/convbert/modeling_tf_convbert.py#L961"}}),an=new Xe({props:{$$slots:{default:[kv]},$$scope:{ctx:M}}}),Xs=new ae({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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.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/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.29.0/src/transformers/models/convbert/modeling_tf_convbert.py#L968",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/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/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ln=new Xe({props:{$$slots:{default:[bv]},$$scope:{ctx:M}}}),dn=new Qe({props:{anchor:"transformers.TFConvBertForSequenceClassification.call.example",$$slots:{default:[Tv]},$$scope:{ctx:M}}}),cn=new Qe({props:{anchor:"transformers.TFConvBertForSequenceClassification.call.example-2",$$slots:{default:[wv]},$$scope:{ctx:M}}}),Zs=new Ze({}),er=new ae({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/v4.29.0/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/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/convbert/modeling_tf_convbert.py#L1036"}}),hn=new Xe({props:{$$slots:{default:[yv]},$$scope:{ctx:M}}}),sr=new ae({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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.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/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.29.0/src/transformers/models/convbert/modeling_tf_convbert.py#L1058",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/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/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),un=new Xe({props:{$$slots:{default:[$v]},$$scope:{ctx:M}}}),mn=new Qe({props:{anchor:"transformers.TFConvBertForMultipleChoice.call.example",$$slots:{default:[Cv]},$$scope:{ctx:M}}}),rr=new Ze({}),ar=new ae({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/v4.29.0/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/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/convbert/modeling_tf_convbert.py#L1159"}}),gn=new Xe({props:{$$slots:{default:[Fv]},$$scope:{ctx:M}}}),cr=new ae({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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.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/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.29.0/src/transformers/models/convbert/modeling_tf_convbert.py#L1173",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/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/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),_n=new Xe({props:{$$slots:{default:[Ev]},$$scope:{ctx:M}}}),vn=new Qe({props:{anchor:"transformers.TFConvBertForTokenClassification.call.example",$$slots:{default:[Bv]},$$scope:{ctx:M}}}),kn=new Qe({props:{anchor:"transformers.TFConvBertForTokenClassification.call.example-2",$$slots:{default:[zv]},$$scope:{ctx:M}}}),pr=new Ze({}),hr=new ae({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/v4.29.0/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/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/convbert/modeling_tf_convbert.py#L1240"}}),Tn=new Xe({props:{$$slots:{default:[Mv]},$$scope:{ctx:M}}}),gr=new ae({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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.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/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.29.0/src/transformers/models/convbert/modeling_tf_convbert.py#L1250",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.29.0/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/v4.29.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),wn=new Xe({props:{$$slots:{default:[qv]},$$scope:{ctx:M}}}),yn=new Qe({props:{anchor:"transformers.TFConvBertForQuestionAnswering.call.example",$$slots:{default:[jv]},$$scope:{ctx:M}}}),$n=new Qe({props:{anchor:"transformers.TFConvBertForQuestionAnswering.call.example-2",$$slots:{default:[xv]},$$scope:{ctx:M}}}),{c(){d=r("meta"),v=h(),p=r("h1"),m=r("a"),b=r("span"),T(l.$$.fragment),c=h(),q=r("span"),Te=n("ConvBERT"),_e=h(),D=r("div"),pe=r("a"),Z=r("img"),we=h(),R=r("a"),he=r("img"),Y=h(),oe=r("h2"),ie=r("a"),W=r("span"),T(le.$$.fragment),ye=h(),K=r("span"),$e=n("Overview"),ve=h(),I=r("p"),Ce=n("The ConvBERT model was proposed in "),de=r("a"),ne=n("ConvBERT: Improving BERT with Span-based Dynamic Convolution"),j=n(` by Zihang Jiang, Weihao Yu, Daquan Zhou, Yunpeng Chen, Jiashi Feng, Shuicheng
Yan.`),P=h(),ue=r("p"),V=n("The abstract from the paper is the following:"),ke=h(),me=r("p"),U=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.`),be=h(),x=r("p"),Ee=n("ConvBERT training tips are similar to those of BERT."),H=h(),se=r("p"),Be=n("This model was contributed by "),S=r("a"),ze=n("abhishek"),Me=n(`. The original implementation can be found
here: `),N=r("a"),qe=n("https://github.com/yitu-opensource/ConvBert"),Q=h(),re=r("h2"),X=r("a"),A=r("span"),T(ce.$$.fragment),O=h(),ge=r("span"),je=n("Documentation resources"),g=h(),B=r("ul"),De=r("li"),ee=r("a"),Re=n("Text classification task guide"),We=h(),z=r("li"),Pe=r("a"),Ke=n("Token classification task guide"),Ue=h(),Le=r("li"),Oe=r("a"),L=n("Question answering task guide"),J=h(),Ie=r("li"),Ne=r("a"),G=n("Masked language modeling task guide"),Ye=h(),Se=r("li"),fe=r("a"),He=n("Multiple choice task guide"),te=h(),xe=r("h2"),$o=r("a"),ba=r("span"),T(In.$$.fragment),Ed=h(),Ta=r("span"),Bd=n("ConvBertConfig"),hl=h(),ut=r("div"),T(Sn.$$.fragment),zd=h(),Kt=r("p"),Md=n("This is the configuration class to store the configuration of a "),yr=r("a"),qd=n("ConvBertModel"),jd=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
`),Rn=r("a"),xd=n("YituTech/conv-bert-base"),Ad=n(" architecture."),Pd=h(),Ut=r("p"),Od=n("Configuration objects inherit from "),$r=r("a"),Nd=n("PretrainedConfig"),Dd=n(` and can be used to control the model outputs. Read the
documentation from `),Cr=r("a"),Ld=n("PretrainedConfig"),Id=n(" for more information."),Sd=h(),T(Co.$$.fragment),ul=h(),Yt=r("h2"),Fo=r("a"),wa=r("span"),T(Wn.$$.fragment),Rd=h(),ya=r("span"),Wd=n("ConvBertTokenizer"),ml=h(),Ge=r("div"),T(Kn.$$.fragment),Kd=h(),$a=r("p"),Ud=n("Construct a ConvBERT tokenizer. Based on WordPiece."),Yd=h(),Un=r("p"),Hd=n("This tokenizer inherits from "),Fr=r("a"),Qd=n("PreTrainedTokenizer"),Vd=n(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Jd=h(),Ot=r("div"),T(Yn.$$.fragment),Gd=h(),Ca=r("p"),Xd=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:`),Zd=h(),Hn=r("ul"),Er=r("li"),ec=n("single sequence: "),Fa=r("code"),tc=n("[CLS] X [SEP]"),oc=h(),Br=r("li"),nc=n("pair of sequences: "),Ea=r("code"),sc=n("[CLS] A [SEP] B [SEP]"),rc=h(),Eo=r("div"),T(Qn.$$.fragment),ac=h(),Vn=r("p"),ic=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 `),Ba=r("code"),lc=n("prepare_for_model"),dc=n(" method."),cc=h(),kt=r("div"),T(Jn.$$.fragment),pc=h(),za=r("p"),hc=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A ConvBERT"),uc=h(),T(Bo.$$.fragment),mc=h(),Ht=r("p"),fc=n("If "),Ma=r("code"),gc=n("token_ids_1"),_c=n(" is "),qa=r("code"),vc=n("None"),kc=n(", this method only returns the first portion of the mask (0s)."),bc=h(),zr=r("div"),T(Gn.$$.fragment),fl=h(),Qt=r("h2"),zo=r("a"),ja=r("span"),T(Xn.$$.fragment),Tc=h(),xa=r("span"),wc=n("ConvBertTokenizerFast"),gl=h(),at=r("div"),T(Zn.$$.fragment),yc=h(),es=r("p"),$c=n("Construct a \u201Cfast\u201D ConvBERT tokenizer (backed by HuggingFace\u2019s "),Aa=r("em"),Cc=n("tokenizers"),Fc=n(" library). Based on WordPiece."),Ec=h(),ts=r("p"),Bc=n("This tokenizer inherits from "),Mr=r("a"),zc=n("PreTrainedTokenizerFast"),Mc=n(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),qc=h(),Nt=r("div"),T(os.$$.fragment),jc=h(),Pa=r("p"),xc=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:`),Ac=h(),ns=r("ul"),qr=r("li"),Pc=n("single sequence: "),Oa=r("code"),Oc=n("[CLS] X [SEP]"),Nc=h(),jr=r("li"),Dc=n("pair of sequences: "),Na=r("code"),Lc=n("[CLS] A [SEP] B [SEP]"),Ic=h(),bt=r("div"),T(ss.$$.fragment),Sc=h(),Da=r("p"),Rc=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A ConvBERT"),Wc=h(),T(Mo.$$.fragment),Kc=h(),Vt=r("p"),Uc=n("If "),La=r("code"),Yc=n("token_ids_1"),Hc=n(" is "),Ia=r("code"),Qc=n("None"),Vc=n(", this method only returns the first portion of the mask (0s)."),_l=h(),Jt=r("h2"),qo=r("a"),Sa=r("span"),T(rs.$$.fragment),Jc=h(),Ra=r("span"),Gc=n("ConvBertModel"),vl=h(),At=r("div"),T(as.$$.fragment),Xc=h(),is=r("p"),Zc=n(`The bare ConvBERT Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),ls=r("a"),ep=n("torch.nn.Module"),tp=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.`),op=h(),Tt=r("div"),T(ds.$$.fragment),np=h(),Gt=r("p"),sp=n("The "),xr=r("a"),rp=n("ConvBertModel"),ap=n(" forward method, overrides the "),Wa=r("code"),ip=n("__call__"),lp=n(" special method."),dp=h(),T(jo.$$.fragment),cp=h(),T(xo.$$.fragment),kl=h(),Xt=r("h2"),Ao=r("a"),Ka=r("span"),T(cs.$$.fragment),pp=h(),Ua=r("span"),hp=n("ConvBertForMaskedLM"),bl=h(),Pt=r("div"),T(ps.$$.fragment),up=h(),Zt=r("p"),mp=n("ConvBERT Model with a "),Ya=r("code"),fp=n("language modeling"),gp=n(` head on top.
This model is a PyTorch `),hs=r("a"),_p=n("torch.nn.Module"),vp=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.`),kp=h(),wt=r("div"),T(us.$$.fragment),bp=h(),eo=r("p"),Tp=n("The "),Ar=r("a"),wp=n("ConvBertForMaskedLM"),yp=n(" forward method, overrides the "),Ha=r("code"),$p=n("__call__"),Cp=n(" special method."),Fp=h(),T(Po.$$.fragment),Ep=h(),T(Oo.$$.fragment),Tl=h(),to=r("h2"),No=r("a"),Qa=r("span"),T(ms.$$.fragment),Bp=h(),Va=r("span"),zp=n("ConvBertForSequenceClassification"),wl=h(),mt=r("div"),T(fs.$$.fragment),Mp=h(),Ja=r("p"),qp=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.`),jp=h(),gs=r("p"),xp=n("This model is a PyTorch "),_s=r("a"),Ap=n("torch.nn.Module"),Pp=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.`),Op=h(),it=r("div"),T(vs.$$.fragment),Np=h(),oo=r("p"),Dp=n("The "),Pr=r("a"),Lp=n("ConvBertForSequenceClassification"),Ip=n(" forward method, overrides the "),Ga=r("code"),Sp=n("__call__"),Rp=n(" special method."),Wp=h(),T(Do.$$.fragment),Kp=h(),T(Lo.$$.fragment),Up=h(),T(Io.$$.fragment),yl=h(),no=r("h2"),So=r("a"),Xa=r("span"),T(ks.$$.fragment),Yp=h(),Za=r("span"),Hp=n("ConvBertForMultipleChoice"),$l=h(),ft=r("div"),T(bs.$$.fragment),Qp=h(),ei=r("p"),Vp=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.`),Jp=h(),Ts=r("p"),Gp=n("This model is a PyTorch "),ws=r("a"),Xp=n("torch.nn.Module"),Zp=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.`),eh=h(),yt=r("div"),T(ys.$$.fragment),th=h(),so=r("p"),oh=n("The "),Or=r("a"),nh=n("ConvBertForMultipleChoice"),sh=n(" forward method, overrides the "),ti=r("code"),rh=n("__call__"),ah=n(" special method."),ih=h(),T(Ro.$$.fragment),lh=h(),T(Wo.$$.fragment),Cl=h(),ro=r("h2"),Ko=r("a"),oi=r("span"),T($s.$$.fragment),dh=h(),ni=r("span"),ch=n("ConvBertForTokenClassification"),Fl=h(),gt=r("div"),T(Cs.$$.fragment),ph=h(),si=r("p"),hh=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.`),uh=h(),Fs=r("p"),mh=n("This model is a PyTorch "),Es=r("a"),fh=n("torch.nn.Module"),gh=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.`),_h=h(),$t=r("div"),T(Bs.$$.fragment),vh=h(),ao=r("p"),kh=n("The "),Nr=r("a"),bh=n("ConvBertForTokenClassification"),Th=n(" forward method, overrides the "),ri=r("code"),wh=n("__call__"),yh=n(" special method."),$h=h(),T(Uo.$$.fragment),Ch=h(),T(Yo.$$.fragment),El=h(),io=r("h2"),Ho=r("a"),ai=r("span"),T(zs.$$.fragment),Fh=h(),ii=r("span"),Eh=n("ConvBertForQuestionAnswering"),Bl=h(),_t=r("div"),T(Ms.$$.fragment),Bh=h(),lo=r("p"),zh=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 `),li=r("code"),Mh=n("span start logits"),qh=n(" and "),di=r("code"),jh=n("span end logits"),xh=n(")."),Ah=h(),qs=r("p"),Ph=n("This model is a PyTorch "),js=r("a"),Oh=n("torch.nn.Module"),Nh=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.`),Dh=h(),Ct=r("div"),T(xs.$$.fragment),Lh=h(),co=r("p"),Ih=n("The "),Dr=r("a"),Sh=n("ConvBertForQuestionAnswering"),Rh=n(" forward method, overrides the "),ci=r("code"),Wh=n("__call__"),Kh=n(" special method."),Uh=h(),T(Qo.$$.fragment),Yh=h(),T(Vo.$$.fragment),zl=h(),po=r("h2"),Jo=r("a"),pi=r("span"),T(As.$$.fragment),Hh=h(),hi=r("span"),Qh=n("TFConvBertModel"),Ml=h(),et=r("div"),T(Ps.$$.fragment),Vh=h(),ui=r("p"),Jh=n("The bare ConvBERT Model transformer outputting raw hidden-states without any specific head on top."),Gh=h(),Os=r("p"),Xh=n("This model inherits from "),Lr=r("a"),Zh=n("TFPreTrainedModel"),eu=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(),Ns=r("p"),ou=n("This model is also a "),Ds=r("a"),nu=n("tf.keras.Model"),su=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.`),ru=h(),T(Go.$$.fragment),au=h(),Ft=r("div"),T(Ls.$$.fragment),iu=h(),ho=r("p"),lu=n("The "),Ir=r("a"),du=n("TFConvBertModel"),cu=n(" forward method, overrides the "),mi=r("code"),pu=n("__call__"),hu=n(" special method."),uu=h(),T(Xo.$$.fragment),mu=h(),T(Zo.$$.fragment),ql=h(),uo=r("h2"),en=r("a"),fi=r("span"),T(Is.$$.fragment),fu=h(),gi=r("span"),gu=n("TFConvBertForMaskedLM"),jl=h(),tt=r("div"),T(Ss.$$.fragment),_u=h(),Rs=r("p"),vu=n("ConvBERT Model with a "),_i=r("code"),ku=n("language modeling"),bu=n(" head on top."),Tu=h(),Ws=r("p"),wu=n("This model inherits from "),Sr=r("a"),yu=n("TFPreTrainedModel"),$u=n(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Cu=h(),Ks=r("p"),Fu=n("This model is also a "),Us=r("a"),Eu=n("tf.keras.Model"),Bu=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.`),zu=h(),T(tn.$$.fragment),Mu=h(),lt=r("div"),T(Ys.$$.fragment),qu=h(),mo=r("p"),ju=n("The "),Rr=r("a"),xu=n("TFConvBertForMaskedLM"),Au=n(" forward method, overrides the "),vi=r("code"),Pu=n("__call__"),Ou=n(" special method."),Nu=h(),T(on.$$.fragment),Du=h(),T(nn.$$.fragment),Lu=h(),T(sn.$$.fragment),xl=h(),fo=r("h2"),rn=r("a"),ki=r("span"),T(Hs.$$.fragment),Iu=h(),bi=r("span"),Su=n("TFConvBertForSequenceClassification"),Al=h(),ot=r("div"),T(Qs.$$.fragment),Ru=h(),Ti=r("p"),Wu=n("ConvBERT Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),Ku=h(),Vs=r("p"),Uu=n("This model inherits from "),Wr=r("a"),Yu=n("TFPreTrainedModel"),Hu=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.)`),Qu=h(),Js=r("p"),Vu=n("This model is also a "),Gs=r("a"),Ju=n("tf.keras.Model"),Gu=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.`),Xu=h(),T(an.$$.fragment),Zu=h(),dt=r("div"),T(Xs.$$.fragment),em=h(),go=r("p"),tm=n("The "),Kr=r("a"),om=n("TFConvBertForSequenceClassification"),nm=n(" forward method, overrides the "),wi=r("code"),sm=n("__call__"),rm=n(" special method."),am=h(),T(ln.$$.fragment),im=h(),T(dn.$$.fragment),lm=h(),T(cn.$$.fragment),Pl=h(),_o=r("h2"),pn=r("a"),yi=r("span"),T(Zs.$$.fragment),dm=h(),$i=r("span"),cm=n("TFConvBertForMultipleChoice"),Ol=h(),nt=r("div"),T(er.$$.fragment),pm=h(),Ci=r("p"),hm=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.`),um=h(),tr=r("p"),mm=n("This model inherits from "),Ur=r("a"),fm=n("TFPreTrainedModel"),gm=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.)`),_m=h(),or=r("p"),vm=n("This model is also a "),nr=r("a"),km=n("tf.keras.Model"),bm=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.`),Tm=h(),T(hn.$$.fragment),wm=h(),Et=r("div"),T(sr.$$.fragment),ym=h(),vo=r("p"),$m=n("The "),Yr=r("a"),Cm=n("TFConvBertForMultipleChoice"),Fm=n(" forward method, overrides the "),Fi=r("code"),Em=n("__call__"),Bm=n(" special method."),zm=h(),T(un.$$.fragment),Mm=h(),T(mn.$$.fragment),Nl=h(),ko=r("h2"),fn=r("a"),Ei=r("span"),T(rr.$$.fragment),qm=h(),Bi=r("span"),jm=n("TFConvBertForTokenClassification"),Dl=h(),st=r("div"),T(ar.$$.fragment),xm=h(),zi=r("p"),Am=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.`),Pm=h(),ir=r("p"),Om=n("This model inherits from "),Hr=r("a"),Nm=n("TFPreTrainedModel"),Dm=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.)`),Lm=h(),lr=r("p"),Im=n("This model is also a "),dr=r("a"),Sm=n("tf.keras.Model"),Rm=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.`),Wm=h(),T(gn.$$.fragment),Km=h(),ct=r("div"),T(cr.$$.fragment),Um=h(),bo=r("p"),Ym=n("The "),Qr=r("a"),Hm=n("TFConvBertForTokenClassification"),Qm=n(" forward method, overrides the "),Mi=r("code"),Vm=n("__call__"),Jm=n(" special method."),Gm=h(),T(_n.$$.fragment),Xm=h(),T(vn.$$.fragment),Zm=h(),T(kn.$$.fragment),Ll=h(),To=r("h2"),bn=r("a"),qi=r("span"),T(pr.$$.fragment),ef=h(),ji=r("span"),tf=n("TFConvBertForQuestionAnswering"),Il=h(),rt=r("div"),T(hr.$$.fragment),of=h(),wo=r("p"),nf=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 `),xi=r("code"),sf=n("span start logits"),rf=n(" and "),Ai=r("code"),af=n("span end logits"),lf=n(")."),df=h(),ur=r("p"),cf=n("This model inherits from "),Vr=r("a"),pf=n("TFPreTrainedModel"),hf=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.)`),uf=h(),mr=r("p"),mf=n("This model is also a "),fr=r("a"),ff=n("tf.keras.Model"),gf=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.`),_f=h(),T(Tn.$$.fragment),vf=h(),pt=r("div"),T(gr.$$.fragment),kf=h(),yo=r("p"),bf=n("The "),Jr=r("a"),Tf=n("TFConvBertForQuestionAnswering"),wf=n(" forward method, overrides the "),Pi=r("code"),yf=n("__call__"),$f=n(" special method."),Cf=h(),T(wn.$$.fragment),Ff=h(),T(yn.$$.fragment),Ef=h(),T($n.$$.fragment),this.h()},l(o){const k=Q_('[data-svelte="svelte-1phssyn"]',document.head);d=a(k,"META",{name:!0,content:!0}),k.forEach(t),v=u(o),p=a(o,"H1",{class:!0});var _r=i(p);m=a(_r,"A",{id:!0,class:!0,href:!0});var Oi=i(m);b=a(Oi,"SPAN",{});var Ni=i(b);w(l.$$.fragment,Ni),Ni.forEach(t),Oi.forEach(t),c=u(_r),q=a(_r,"SPAN",{});var Di=i(q);Te=s(Di,"ConvBERT"),Di.forEach(t),_r.forEach(t),_e=u(o),D=a(o,"DIV",{class:!0});var vr=i(D);pe=a(vr,"A",{href:!0});var Li=i(pe);Z=a(Li,"IMG",{alt:!0,src:!0}),Li.forEach(t),we=u(vr),R=a(vr,"A",{href:!0});var Ii=i(R);he=a(Ii,"IMG",{alt:!0,src:!0}),Ii.forEach(t),vr.forEach(t),Y=u(o),oe=a(o,"H2",{class:!0});var kr=i(oe);ie=a(kr,"A",{id:!0,class:!0,href:!0});var Si=i(ie);W=a(Si,"SPAN",{});var Ri=i(W);w(le.$$.fragment,Ri),Ri.forEach(t),Si.forEach(t),ye=u(kr),K=a(kr,"SPAN",{});var Wi=i(K);$e=s(Wi,"Overview"),Wi.forEach(t),kr.forEach(t),ve=u(o),I=a(o,"P",{});var br=i(I);Ce=s(br,"The ConvBERT model was proposed in "),de=a(br,"A",{href:!0,rel:!0});var Ki=i(de);ne=s(Ki,"ConvBERT: Improving BERT with Span-based Dynamic Convolution"),Ki.forEach(t),j=s(br,` by Zihang Jiang, Weihao Yu, Daquan Zhou, Yunpeng Chen, Jiashi Feng, Shuicheng
Yan.`),br.forEach(t),P=u(o),ue=a(o,"P",{});var Ui=i(ue);V=s(Ui,"The abstract from the paper is the following:"),Ui.forEach(t),ke=u(o),me=a(o,"P",{});var Yi=i(me);U=a(Yi,"EM",{});var Hi=i(U);Fe=s(Hi,`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.`),Hi.forEach(t),Yi.forEach(t),be=u(o),x=a(o,"P",{});var Qi=i(x);Ee=s(Qi,"ConvBERT training tips are similar to those of BERT."),Qi.forEach(t),H=u(o),se=a(o,"P",{});var Cn=i(se);Be=s(Cn,"This model was contributed by "),S=a(Cn,"A",{href:!0,rel:!0});var Vi=i(S);ze=s(Vi,"abhishek"),Vi.forEach(t),Me=s(Cn,`. The original implementation can be found
here: `),N=a(Cn,"A",{href:!0,rel:!0});var Ji=i(N);qe=s(Ji,"https://github.com/yitu-opensource/ConvBert"),Ji.forEach(t),Cn.forEach(t),Q=u(o),re=a(o,"H2",{class:!0});var Tr=i(re);X=a(Tr,"A",{id:!0,class:!0,href:!0});var Gi=i(X);A=a(Gi,"SPAN",{});var Xi=i(A);w(ce.$$.fragment,Xi),Xi.forEach(t),Gi.forEach(t),O=u(Tr),ge=a(Tr,"SPAN",{});var Zi=i(ge);je=s(Zi,"Documentation resources"),Zi.forEach(t),Tr.forEach(t),g=u(o),B=a(o,"UL",{});var vt=i(B);De=a(vt,"LI",{});var el=i(De);ee=a(el,"A",{href:!0});var tl=i(ee);Re=s(tl,"Text classification task guide"),tl.forEach(t),el.forEach(t),We=u(vt),z=a(vt,"LI",{});var ol=i(z);Pe=a(ol,"A",{href:!0});var nl=i(Pe);Ke=s(nl,"Token classification task guide"),nl.forEach(t),ol.forEach(t),Ue=u(vt),Le=a(vt,"LI",{});var sl=i(Le);Oe=a(sl,"A",{href:!0});var rl=i(Oe);L=s(rl,"Question answering task guide"),rl.forEach(t),sl.forEach(t),J=u(vt),Ie=a(vt,"LI",{});var al=i(Ie);Ne=a(al,"A",{href:!0});var il=i(Ne);G=s(il,"Masked language modeling task guide"),il.forEach(t),al.forEach(t),Ye=u(vt),Se=a(vt,"LI",{});var ll=i(Se);fe=a(ll,"A",{href:!0});var dl=i(fe);He=s(dl,"Multiple choice task guide"),dl.forEach(t),ll.forEach(t),vt.forEach(t),te=u(o),xe=a(o,"H2",{class:!0});var wr=i(xe);$o=a(wr,"A",{id:!0,class:!0,href:!0});var cl=i($o);ba=a(cl,"SPAN",{});var pl=i(ba);w(In.$$.fragment,pl),pl.forEach(t),cl.forEach(t),Ed=u(wr),Ta=a(wr,"SPAN",{});var jf=i(Ta);Bd=s(jf,"ConvBertConfig"),jf.forEach(t),wr.forEach(t),hl=u(o),ut=a(o,"DIV",{class:!0});var Fn=i(ut);w(Sn.$$.fragment,Fn),zd=u(Fn),Kt=a(Fn,"P",{});var Gr=i(Kt);Md=s(Gr,"This is the configuration class to store the configuration of a "),yr=a(Gr,"A",{href:!0});var xf=i(yr);qd=s(xf,"ConvBertModel"),xf.forEach(t),jd=s(Gr,`. 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
`),Rn=a(Gr,"A",{href:!0,rel:!0});var Af=i(Rn);xd=s(Af,"YituTech/conv-bert-base"),Af.forEach(t),Ad=s(Gr," architecture."),Gr.forEach(t),Pd=u(Fn),Ut=a(Fn,"P",{});var Xr=i(Ut);Od=s(Xr,"Configuration objects inherit from "),$r=a(Xr,"A",{href:!0});var Pf=i($r);Nd=s(Pf,"PretrainedConfig"),Pf.forEach(t),Dd=s(Xr,` and can be used to control the model outputs. Read the
documentation from `),Cr=a(Xr,"A",{href:!0});var Of=i(Cr);Ld=s(Of,"PretrainedConfig"),Of.forEach(t),Id=s(Xr," for more information."),Xr.forEach(t),Sd=u(Fn),w(Co.$$.fragment,Fn),Fn.forEach(t),ul=u(o),Yt=a(o,"H2",{class:!0});var Rl=i(Yt);Fo=a(Rl,"A",{id:!0,class:!0,href:!0});var Nf=i(Fo);wa=a(Nf,"SPAN",{});var Df=i(wa);w(Wn.$$.fragment,Df),Df.forEach(t),Nf.forEach(t),Rd=u(Rl),ya=a(Rl,"SPAN",{});var Lf=i(ya);Wd=s(Lf,"ConvBertTokenizer"),Lf.forEach(t),Rl.forEach(t),ml=u(o),Ge=a(o,"DIV",{class:!0});var ht=i(Ge);w(Kn.$$.fragment,ht),Kd=u(ht),$a=a(ht,"P",{});var If=i($a);Ud=s(If,"Construct a ConvBERT tokenizer. Based on WordPiece."),If.forEach(t),Yd=u(ht),Un=a(ht,"P",{});var Wl=i(Un);Hd=s(Wl,"This tokenizer inherits from "),Fr=a(Wl,"A",{href:!0});var Sf=i(Fr);Qd=s(Sf,"PreTrainedTokenizer"),Sf.forEach(t),Vd=s(Wl,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Wl.forEach(t),Jd=u(ht),Ot=a(ht,"DIV",{class:!0});var Zr=i(Ot);w(Yn.$$.fragment,Zr),Gd=u(Zr),Ca=a(Zr,"P",{});var Rf=i(Ca);Xd=s(Rf,`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:`),Rf.forEach(t),Zd=u(Zr),Hn=a(Zr,"UL",{});var Kl=i(Hn);Er=a(Kl,"LI",{});var Bf=i(Er);ec=s(Bf,"single sequence: "),Fa=a(Bf,"CODE",{});var Wf=i(Fa);tc=s(Wf,"[CLS] X [SEP]"),Wf.forEach(t),Bf.forEach(t),oc=u(Kl),Br=a(Kl,"LI",{});var zf=i(Br);nc=s(zf,"pair of sequences: "),Ea=a(zf,"CODE",{});var Kf=i(Ea);sc=s(Kf,"[CLS] A [SEP] B [SEP]"),Kf.forEach(t),zf.forEach(t),Kl.forEach(t),Zr.forEach(t),rc=u(ht),Eo=a(ht,"DIV",{class:!0});var Ul=i(Eo);w(Qn.$$.fragment,Ul),ac=u(Ul),Vn=a(Ul,"P",{});var Yl=i(Vn);ic=s(Yl,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Ba=a(Yl,"CODE",{});var Uf=i(Ba);lc=s(Uf,"prepare_for_model"),Uf.forEach(t),dc=s(Yl," method."),Yl.forEach(t),Ul.forEach(t),cc=u(ht),kt=a(ht,"DIV",{class:!0});var En=i(kt);w(Jn.$$.fragment,En),pc=u(En),za=a(En,"P",{});var Yf=i(za);hc=s(Yf,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A ConvBERT"),Yf.forEach(t),uc=u(En),w(Bo.$$.fragment,En),mc=u(En),Ht=a(En,"P",{});var ea=i(Ht);fc=s(ea,"If "),Ma=a(ea,"CODE",{});var Hf=i(Ma);gc=s(Hf,"token_ids_1"),Hf.forEach(t),_c=s(ea," is "),qa=a(ea,"CODE",{});var Qf=i(qa);vc=s(Qf,"None"),Qf.forEach(t),kc=s(ea,", this method only returns the first portion of the mask (0s)."),ea.forEach(t),En.forEach(t),bc=u(ht),zr=a(ht,"DIV",{class:!0});var Vf=i(zr);w(Gn.$$.fragment,Vf),Vf.forEach(t),ht.forEach(t),fl=u(o),Qt=a(o,"H2",{class:!0});var Hl=i(Qt);zo=a(Hl,"A",{id:!0,class:!0,href:!0});var Jf=i(zo);ja=a(Jf,"SPAN",{});var Gf=i(ja);w(Xn.$$.fragment,Gf),Gf.forEach(t),Jf.forEach(t),Tc=u(Hl),xa=a(Hl,"SPAN",{});var Xf=i(xa);wc=s(Xf,"ConvBertTokenizerFast"),Xf.forEach(t),Hl.forEach(t),gl=u(o),at=a(o,"DIV",{class:!0});var Dt=i(at);w(Zn.$$.fragment,Dt),yc=u(Dt),es=a(Dt,"P",{});var Ql=i(es);$c=s(Ql,"Construct a \u201Cfast\u201D ConvBERT tokenizer (backed by HuggingFace\u2019s "),Aa=a(Ql,"EM",{});var Zf=i(Aa);Cc=s(Zf,"tokenizers"),Zf.forEach(t),Fc=s(Ql," library). Based on WordPiece."),Ql.forEach(t),Ec=u(Dt),ts=a(Dt,"P",{});var Vl=i(ts);Bc=s(Vl,"This tokenizer inherits from "),Mr=a(Vl,"A",{href:!0});var eg=i(Mr);zc=s(eg,"PreTrainedTokenizerFast"),eg.forEach(t),Mc=s(Vl,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Vl.forEach(t),qc=u(Dt),Nt=a(Dt,"DIV",{class:!0});var ta=i(Nt);w(os.$$.fragment,ta),jc=u(ta),Pa=a(ta,"P",{});var tg=i(Pa);xc=s(tg,`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:`),tg.forEach(t),Ac=u(ta),ns=a(ta,"UL",{});var Jl=i(ns);qr=a(Jl,"LI",{});var Mf=i(qr);Pc=s(Mf,"single sequence: "),Oa=a(Mf,"CODE",{});var og=i(Oa);Oc=s(og,"[CLS] X [SEP]"),og.forEach(t),Mf.forEach(t),Nc=u(Jl),jr=a(Jl,"LI",{});var qf=i(jr);Dc=s(qf,"pair of sequences: "),Na=a(qf,"CODE",{});var ng=i(Na);Lc=s(ng,"[CLS] A [SEP] B [SEP]"),ng.forEach(t),qf.forEach(t),Jl.forEach(t),ta.forEach(t),Ic=u(Dt),bt=a(Dt,"DIV",{class:!0});var Bn=i(bt);w(ss.$$.fragment,Bn),Sc=u(Bn),Da=a(Bn,"P",{});var sg=i(Da);Rc=s(sg,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A ConvBERT"),sg.forEach(t),Wc=u(Bn),w(Mo.$$.fragment,Bn),Kc=u(Bn),Vt=a(Bn,"P",{});var oa=i(Vt);Uc=s(oa,"If "),La=a(oa,"CODE",{});var rg=i(La);Yc=s(rg,"token_ids_1"),rg.forEach(t),Hc=s(oa," is "),Ia=a(oa,"CODE",{});var ag=i(Ia);Qc=s(ag,"None"),ag.forEach(t),Vc=s(oa,", this method only returns the first portion of the mask (0s)."),oa.forEach(t),Bn.forEach(t),Dt.forEach(t),_l=u(o),Jt=a(o,"H2",{class:!0});var Gl=i(Jt);qo=a(Gl,"A",{id:!0,class:!0,href:!0});var ig=i(qo);Sa=a(ig,"SPAN",{});var lg=i(Sa);w(rs.$$.fragment,lg),lg.forEach(t),ig.forEach(t),Jc=u(Gl),Ra=a(Gl,"SPAN",{});var dg=i(Ra);Gc=s(dg,"ConvBertModel"),dg.forEach(t),Gl.forEach(t),vl=u(o),At=a(o,"DIV",{class:!0});var na=i(At);w(as.$$.fragment,na),Xc=u(na),is=a(na,"P",{});var Xl=i(is);Zc=s(Xl,`The bare ConvBERT Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),ls=a(Xl,"A",{href:!0,rel:!0});var cg=i(ls);ep=s(cg,"torch.nn.Module"),cg.forEach(t),tp=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),op=u(na),Tt=a(na,"DIV",{class:!0});var zn=i(Tt);w(ds.$$.fragment,zn),np=u(zn),Gt=a(zn,"P",{});var sa=i(Gt);sp=s(sa,"The "),xr=a(sa,"A",{href:!0});var pg=i(xr);rp=s(pg,"ConvBertModel"),pg.forEach(t),ap=s(sa," forward method, overrides the "),Wa=a(sa,"CODE",{});var hg=i(Wa);ip=s(hg,"__call__"),hg.forEach(t),lp=s(sa," special method."),sa.forEach(t),dp=u(zn),w(jo.$$.fragment,zn),cp=u(zn),w(xo.$$.fragment,zn),zn.forEach(t),na.forEach(t),kl=u(o),Xt=a(o,"H2",{class:!0});var Zl=i(Xt);Ao=a(Zl,"A",{id:!0,class:!0,href:!0});var ug=i(Ao);Ka=a(ug,"SPAN",{});var mg=i(Ka);w(cs.$$.fragment,mg),mg.forEach(t),ug.forEach(t),pp=u(Zl),Ua=a(Zl,"SPAN",{});var fg=i(Ua);hp=s(fg,"ConvBertForMaskedLM"),fg.forEach(t),Zl.forEach(t),bl=u(o),Pt=a(o,"DIV",{class:!0});var ra=i(Pt);w(ps.$$.fragment,ra),up=u(ra),Zt=a(ra,"P",{});var aa=i(Zt);mp=s(aa,"ConvBERT Model with a "),Ya=a(aa,"CODE",{});var gg=i(Ya);fp=s(gg,"language modeling"),gg.forEach(t),gp=s(aa,` head on top.
This model is a PyTorch `),hs=a(aa,"A",{href:!0,rel:!0});var _g=i(hs);_p=s(_g,"torch.nn.Module"),_g.forEach(t),vp=s(aa,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),aa.forEach(t),kp=u(ra),wt=a(ra,"DIV",{class:!0});var Mn=i(wt);w(us.$$.fragment,Mn),bp=u(Mn),eo=a(Mn,"P",{});var ia=i(eo);Tp=s(ia,"The "),Ar=a(ia,"A",{href:!0});var vg=i(Ar);wp=s(vg,"ConvBertForMaskedLM"),vg.forEach(t),yp=s(ia," forward method, overrides the "),Ha=a(ia,"CODE",{});var kg=i(Ha);$p=s(kg,"__call__"),kg.forEach(t),Cp=s(ia," special method."),ia.forEach(t),Fp=u(Mn),w(Po.$$.fragment,Mn),Ep=u(Mn),w(Oo.$$.fragment,Mn),Mn.forEach(t),ra.forEach(t),Tl=u(o),to=a(o,"H2",{class:!0});var ed=i(to);No=a(ed,"A",{id:!0,class:!0,href:!0});var bg=i(No);Qa=a(bg,"SPAN",{});var Tg=i(Qa);w(ms.$$.fragment,Tg),Tg.forEach(t),bg.forEach(t),Bp=u(ed),Va=a(ed,"SPAN",{});var wg=i(Va);zp=s(wg,"ConvBertForSequenceClassification"),wg.forEach(t),ed.forEach(t),wl=u(o),mt=a(o,"DIV",{class:!0});var qn=i(mt);w(fs.$$.fragment,qn),Mp=u(qn),Ja=a(qn,"P",{});var yg=i(Ja);qp=s(yg,`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.`),yg.forEach(t),jp=u(qn),gs=a(qn,"P",{});var td=i(gs);xp=s(td,"This model is a PyTorch "),_s=a(td,"A",{href:!0,rel:!0});var $g=i(_s);Ap=s($g,"torch.nn.Module"),$g.forEach(t),Pp=s(td,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),td.forEach(t),Op=u(qn),it=a(qn,"DIV",{class:!0});var Lt=i(it);w(vs.$$.fragment,Lt),Np=u(Lt),oo=a(Lt,"P",{});var la=i(oo);Dp=s(la,"The "),Pr=a(la,"A",{href:!0});var Cg=i(Pr);Lp=s(Cg,"ConvBertForSequenceClassification"),Cg.forEach(t),Ip=s(la," forward method, overrides the "),Ga=a(la,"CODE",{});var Fg=i(Ga);Sp=s(Fg,"__call__"),Fg.forEach(t),Rp=s(la," special method."),la.forEach(t),Wp=u(Lt),w(Do.$$.fragment,Lt),Kp=u(Lt),w(Lo.$$.fragment,Lt),Up=u(Lt),w(Io.$$.fragment,Lt),Lt.forEach(t),qn.forEach(t),yl=u(o),no=a(o,"H2",{class:!0});var od=i(no);So=a(od,"A",{id:!0,class:!0,href:!0});var Eg=i(So);Xa=a(Eg,"SPAN",{});var Bg=i(Xa);w(ks.$$.fragment,Bg),Bg.forEach(t),Eg.forEach(t),Yp=u(od),Za=a(od,"SPAN",{});var zg=i(Za);Hp=s(zg,"ConvBertForMultipleChoice"),zg.forEach(t),od.forEach(t),$l=u(o),ft=a(o,"DIV",{class:!0});var jn=i(ft);w(bs.$$.fragment,jn),Qp=u(jn),ei=a(jn,"P",{});var Mg=i(ei);Vp=s(Mg,`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.`),Mg.forEach(t),Jp=u(jn),Ts=a(jn,"P",{});var nd=i(Ts);Gp=s(nd,"This model is a PyTorch "),ws=a(nd,"A",{href:!0,rel:!0});var qg=i(ws);Xp=s(qg,"torch.nn.Module"),qg.forEach(t),Zp=s(nd,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),nd.forEach(t),eh=u(jn),yt=a(jn,"DIV",{class:!0});var xn=i(yt);w(ys.$$.fragment,xn),th=u(xn),so=a(xn,"P",{});var da=i(so);oh=s(da,"The "),Or=a(da,"A",{href:!0});var jg=i(Or);nh=s(jg,"ConvBertForMultipleChoice"),jg.forEach(t),sh=s(da," forward method, overrides the "),ti=a(da,"CODE",{});var xg=i(ti);rh=s(xg,"__call__"),xg.forEach(t),ah=s(da," special method."),da.forEach(t),ih=u(xn),w(Ro.$$.fragment,xn),lh=u(xn),w(Wo.$$.fragment,xn),xn.forEach(t),jn.forEach(t),Cl=u(o),ro=a(o,"H2",{class:!0});var sd=i(ro);Ko=a(sd,"A",{id:!0,class:!0,href:!0});var Ag=i(Ko);oi=a(Ag,"SPAN",{});var Pg=i(oi);w($s.$$.fragment,Pg),Pg.forEach(t),Ag.forEach(t),dh=u(sd),ni=a(sd,"SPAN",{});var Og=i(ni);ch=s(Og,"ConvBertForTokenClassification"),Og.forEach(t),sd.forEach(t),Fl=u(o),gt=a(o,"DIV",{class:!0});var An=i(gt);w(Cs.$$.fragment,An),ph=u(An),si=a(An,"P",{});var Ng=i(si);hh=s(Ng,`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.`),Ng.forEach(t),uh=u(An),Fs=a(An,"P",{});var rd=i(Fs);mh=s(rd,"This model is a PyTorch "),Es=a(rd,"A",{href:!0,rel:!0});var Dg=i(Es);fh=s(Dg,"torch.nn.Module"),Dg.forEach(t),gh=s(rd,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),rd.forEach(t),_h=u(An),$t=a(An,"DIV",{class:!0});var Pn=i($t);w(Bs.$$.fragment,Pn),vh=u(Pn),ao=a(Pn,"P",{});var ca=i(ao);kh=s(ca,"The "),Nr=a(ca,"A",{href:!0});var Lg=i(Nr);bh=s(Lg,"ConvBertForTokenClassification"),Lg.forEach(t),Th=s(ca," forward method, overrides the "),ri=a(ca,"CODE",{});var Ig=i(ri);wh=s(Ig,"__call__"),Ig.forEach(t),yh=s(ca," special method."),ca.forEach(t),$h=u(Pn),w(Uo.$$.fragment,Pn),Ch=u(Pn),w(Yo.$$.fragment,Pn),Pn.forEach(t),An.forEach(t),El=u(o),io=a(o,"H2",{class:!0});var ad=i(io);Ho=a(ad,"A",{id:!0,class:!0,href:!0});var Sg=i(Ho);ai=a(Sg,"SPAN",{});var Rg=i(ai);w(zs.$$.fragment,Rg),Rg.forEach(t),Sg.forEach(t),Fh=u(ad),ii=a(ad,"SPAN",{});var Wg=i(ii);Eh=s(Wg,"ConvBertForQuestionAnswering"),Wg.forEach(t),ad.forEach(t),Bl=u(o),_t=a(o,"DIV",{class:!0});var On=i(_t);w(Ms.$$.fragment,On),Bh=u(On),lo=a(On,"P",{});var pa=i(lo);zh=s(pa,`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 `),li=a(pa,"CODE",{});var Kg=i(li);Mh=s(Kg,"span start logits"),Kg.forEach(t),qh=s(pa," and "),di=a(pa,"CODE",{});var Ug=i(di);jh=s(Ug,"span end logits"),Ug.forEach(t),xh=s(pa,")."),pa.forEach(t),Ah=u(On),qs=a(On,"P",{});var id=i(qs);Ph=s(id,"This model is a PyTorch "),js=a(id,"A",{href:!0,rel:!0});var Yg=i(js);Oh=s(Yg,"torch.nn.Module"),Yg.forEach(t),Nh=s(id,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),id.forEach(t),Dh=u(On),Ct=a(On,"DIV",{class:!0});var Nn=i(Ct);w(xs.$$.fragment,Nn),Lh=u(Nn),co=a(Nn,"P",{});var ha=i(co);Ih=s(ha,"The "),Dr=a(ha,"A",{href:!0});var Hg=i(Dr);Sh=s(Hg,"ConvBertForQuestionAnswering"),Hg.forEach(t),Rh=s(ha," forward method, overrides the "),ci=a(ha,"CODE",{});var Qg=i(ci);Wh=s(Qg,"__call__"),Qg.forEach(t),Kh=s(ha," special method."),ha.forEach(t),Uh=u(Nn),w(Qo.$$.fragment,Nn),Yh=u(Nn),w(Vo.$$.fragment,Nn),Nn.forEach(t),On.forEach(t),zl=u(o),po=a(o,"H2",{class:!0});var ld=i(po);Jo=a(ld,"A",{id:!0,class:!0,href:!0});var Vg=i(Jo);pi=a(Vg,"SPAN",{});var Jg=i(pi);w(As.$$.fragment,Jg),Jg.forEach(t),Vg.forEach(t),Hh=u(ld),hi=a(ld,"SPAN",{});var Gg=i(hi);Qh=s(Gg,"TFConvBertModel"),Gg.forEach(t),ld.forEach(t),Ml=u(o),et=a(o,"DIV",{class:!0});var Bt=i(et);w(Ps.$$.fragment,Bt),Vh=u(Bt),ui=a(Bt,"P",{});var Xg=i(ui);Jh=s(Xg,"The bare ConvBERT Model transformer outputting raw hidden-states without any specific head on top."),Xg.forEach(t),Gh=u(Bt),Os=a(Bt,"P",{});var dd=i(Os);Xh=s(dd,"This model inherits from "),Lr=a(dd,"A",{href:!0});var Zg=i(Lr);Zh=s(Zg,"TFPreTrainedModel"),Zg.forEach(t),eu=s(dd,`. 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.)`),dd.forEach(t),tu=u(Bt),Ns=a(Bt,"P",{});var cd=i(Ns);ou=s(cd,"This model is also a "),Ds=a(cd,"A",{href:!0,rel:!0});var e_=i(Ds);nu=s(e_,"tf.keras.Model"),e_.forEach(t),su=s(cd,` 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.`),cd.forEach(t),ru=u(Bt),w(Go.$$.fragment,Bt),au=u(Bt),Ft=a(Bt,"DIV",{class:!0});var Dn=i(Ft);w(Ls.$$.fragment,Dn),iu=u(Dn),ho=a(Dn,"P",{});var ua=i(ho);lu=s(ua,"The "),Ir=a(ua,"A",{href:!0});var t_=i(Ir);du=s(t_,"TFConvBertModel"),t_.forEach(t),cu=s(ua," forward method, overrides the "),mi=a(ua,"CODE",{});var o_=i(mi);pu=s(o_,"__call__"),o_.forEach(t),hu=s(ua," special method."),ua.forEach(t),uu=u(Dn),w(Xo.$$.fragment,Dn),mu=u(Dn),w(Zo.$$.fragment,Dn),Dn.forEach(t),Bt.forEach(t),ql=u(o),uo=a(o,"H2",{class:!0});var pd=i(uo);en=a(pd,"A",{id:!0,class:!0,href:!0});var n_=i(en);fi=a(n_,"SPAN",{});var s_=i(fi);w(Is.$$.fragment,s_),s_.forEach(t),n_.forEach(t),fu=u(pd),gi=a(pd,"SPAN",{});var r_=i(gi);gu=s(r_,"TFConvBertForMaskedLM"),r_.forEach(t),pd.forEach(t),jl=u(o),tt=a(o,"DIV",{class:!0});var zt=i(tt);w(Ss.$$.fragment,zt),_u=u(zt),Rs=a(zt,"P",{});var hd=i(Rs);vu=s(hd,"ConvBERT Model with a "),_i=a(hd,"CODE",{});var a_=i(_i);ku=s(a_,"language modeling"),a_.forEach(t),bu=s(hd," head on top."),hd.forEach(t),Tu=u(zt),Ws=a(zt,"P",{});var ud=i(Ws);wu=s(ud,"This model inherits from "),Sr=a(ud,"A",{href:!0});var i_=i(Sr);yu=s(i_,"TFPreTrainedModel"),i_.forEach(t),$u=s(ud,`. 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.)`),ud.forEach(t),Cu=u(zt),Ks=a(zt,"P",{});var md=i(Ks);Fu=s(md,"This model is also a "),Us=a(md,"A",{href:!0,rel:!0});var l_=i(Us);Eu=s(l_,"tf.keras.Model"),l_.forEach(t),Bu=s(md,` 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.`),md.forEach(t),zu=u(zt),w(tn.$$.fragment,zt),Mu=u(zt),lt=a(zt,"DIV",{class:!0});var It=i(lt);w(Ys.$$.fragment,It),qu=u(It),mo=a(It,"P",{});var ma=i(mo);ju=s(ma,"The "),Rr=a(ma,"A",{href:!0});var d_=i(Rr);xu=s(d_,"TFConvBertForMaskedLM"),d_.forEach(t),Au=s(ma," forward method, overrides the "),vi=a(ma,"CODE",{});var c_=i(vi);Pu=s(c_,"__call__"),c_.forEach(t),Ou=s(ma," special method."),ma.forEach(t),Nu=u(It),w(on.$$.fragment,It),Du=u(It),w(nn.$$.fragment,It),Lu=u(It),w(sn.$$.fragment,It),It.forEach(t),zt.forEach(t),xl=u(o),fo=a(o,"H2",{class:!0});var fd=i(fo);rn=a(fd,"A",{id:!0,class:!0,href:!0});var p_=i(rn);ki=a(p_,"SPAN",{});var h_=i(ki);w(Hs.$$.fragment,h_),h_.forEach(t),p_.forEach(t),Iu=u(fd),bi=a(fd,"SPAN",{});var u_=i(bi);Su=s(u_,"TFConvBertForSequenceClassification"),u_.forEach(t),fd.forEach(t),Al=u(o),ot=a(o,"DIV",{class:!0});var Mt=i(ot);w(Qs.$$.fragment,Mt),Ru=u(Mt),Ti=a(Mt,"P",{});var m_=i(Ti);Wu=s(m_,"ConvBERT Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),m_.forEach(t),Ku=u(Mt),Vs=a(Mt,"P",{});var gd=i(Vs);Uu=s(gd,"This model inherits from "),Wr=a(gd,"A",{href:!0});var f_=i(Wr);Yu=s(f_,"TFPreTrainedModel"),f_.forEach(t),Hu=s(gd,`. 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.)`),gd.forEach(t),Qu=u(Mt),Js=a(Mt,"P",{});var _d=i(Js);Vu=s(_d,"This model is also a "),Gs=a(_d,"A",{href:!0,rel:!0});var g_=i(Gs);Ju=s(g_,"tf.keras.Model"),g_.forEach(t),Gu=s(_d,` 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.`),_d.forEach(t),Xu=u(Mt),w(an.$$.fragment,Mt),Zu=u(Mt),dt=a(Mt,"DIV",{class:!0});var St=i(dt);w(Xs.$$.fragment,St),em=u(St),go=a(St,"P",{});var fa=i(go);tm=s(fa,"The "),Kr=a(fa,"A",{href:!0});var __=i(Kr);om=s(__,"TFConvBertForSequenceClassification"),__.forEach(t),nm=s(fa," forward method, overrides the "),wi=a(fa,"CODE",{});var v_=i(wi);sm=s(v_,"__call__"),v_.forEach(t),rm=s(fa," special method."),fa.forEach(t),am=u(St),w(ln.$$.fragment,St),im=u(St),w(dn.$$.fragment,St),lm=u(St),w(cn.$$.fragment,St),St.forEach(t),Mt.forEach(t),Pl=u(o),_o=a(o,"H2",{class:!0});var vd=i(_o);pn=a(vd,"A",{id:!0,class:!0,href:!0});var k_=i(pn);yi=a(k_,"SPAN",{});var b_=i(yi);w(Zs.$$.fragment,b_),b_.forEach(t),k_.forEach(t),dm=u(vd),$i=a(vd,"SPAN",{});var T_=i($i);cm=s(T_,"TFConvBertForMultipleChoice"),T_.forEach(t),vd.forEach(t),Ol=u(o),nt=a(o,"DIV",{class:!0});var qt=i(nt);w(er.$$.fragment,qt),pm=u(qt),Ci=a(qt,"P",{});var w_=i(Ci);hm=s(w_,`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.`),w_.forEach(t),um=u(qt),tr=a(qt,"P",{});var kd=i(tr);mm=s(kd,"This model inherits from "),Ur=a(kd,"A",{href:!0});var y_=i(Ur);fm=s(y_,"TFPreTrainedModel"),y_.forEach(t),gm=s(kd,`. 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.)`),kd.forEach(t),_m=u(qt),or=a(qt,"P",{});var bd=i(or);vm=s(bd,"This model is also a "),nr=a(bd,"A",{href:!0,rel:!0});var $_=i(nr);km=s($_,"tf.keras.Model"),$_.forEach(t),bm=s(bd,` 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.`),bd.forEach(t),Tm=u(qt),w(hn.$$.fragment,qt),wm=u(qt),Et=a(qt,"DIV",{class:!0});var Ln=i(Et);w(sr.$$.fragment,Ln),ym=u(Ln),vo=a(Ln,"P",{});var ga=i(vo);$m=s(ga,"The "),Yr=a(ga,"A",{href:!0});var C_=i(Yr);Cm=s(C_,"TFConvBertForMultipleChoice"),C_.forEach(t),Fm=s(ga," forward method, overrides the "),Fi=a(ga,"CODE",{});var F_=i(Fi);Em=s(F_,"__call__"),F_.forEach(t),Bm=s(ga," special method."),ga.forEach(t),zm=u(Ln),w(un.$$.fragment,Ln),Mm=u(Ln),w(mn.$$.fragment,Ln),Ln.forEach(t),qt.forEach(t),Nl=u(o),ko=a(o,"H2",{class:!0});var Td=i(ko);fn=a(Td,"A",{id:!0,class:!0,href:!0});var E_=i(fn);Ei=a(E_,"SPAN",{});var B_=i(Ei);w(rr.$$.fragment,B_),B_.forEach(t),E_.forEach(t),qm=u(Td),Bi=a(Td,"SPAN",{});var z_=i(Bi);jm=s(z_,"TFConvBertForTokenClassification"),z_.forEach(t),Td.forEach(t),Dl=u(o),st=a(o,"DIV",{class:!0});var jt=i(st);w(ar.$$.fragment,jt),xm=u(jt),zi=a(jt,"P",{});var M_=i(zi);Am=s(M_,`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.`),M_.forEach(t),Pm=u(jt),ir=a(jt,"P",{});var wd=i(ir);Om=s(wd,"This model inherits from "),Hr=a(wd,"A",{href:!0});var q_=i(Hr);Nm=s(q_,"TFPreTrainedModel"),q_.forEach(t),Dm=s(wd,`. 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.)`),wd.forEach(t),Lm=u(jt),lr=a(jt,"P",{});var yd=i(lr);Im=s(yd,"This model is also a "),dr=a(yd,"A",{href:!0,rel:!0});var j_=i(dr);Sm=s(j_,"tf.keras.Model"),j_.forEach(t),Rm=s(yd,` 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.`),yd.forEach(t),Wm=u(jt),w(gn.$$.fragment,jt),Km=u(jt),ct=a(jt,"DIV",{class:!0});var Rt=i(ct);w(cr.$$.fragment,Rt),Um=u(Rt),bo=a(Rt,"P",{});var _a=i(bo);Ym=s(_a,"The "),Qr=a(_a,"A",{href:!0});var x_=i(Qr);Hm=s(x_,"TFConvBertForTokenClassification"),x_.forEach(t),Qm=s(_a," forward method, overrides the "),Mi=a(_a,"CODE",{});var A_=i(Mi);Vm=s(A_,"__call__"),A_.forEach(t),Jm=s(_a," special method."),_a.forEach(t),Gm=u(Rt),w(_n.$$.fragment,Rt),Xm=u(Rt),w(vn.$$.fragment,Rt),Zm=u(Rt),w(kn.$$.fragment,Rt),Rt.forEach(t),jt.forEach(t),Ll=u(o),To=a(o,"H2",{class:!0});var $d=i(To);bn=a($d,"A",{id:!0,class:!0,href:!0});var P_=i(bn);qi=a(P_,"SPAN",{});var O_=i(qi);w(pr.$$.fragment,O_),O_.forEach(t),P_.forEach(t),ef=u($d),ji=a($d,"SPAN",{});var N_=i(ji);tf=s(N_,"TFConvBertForQuestionAnswering"),N_.forEach(t),$d.forEach(t),Il=u(o),rt=a(o,"DIV",{class:!0});var xt=i(rt);w(hr.$$.fragment,xt),of=u(xt),wo=a(xt,"P",{});var va=i(wo);nf=s(va,`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 `),xi=a(va,"CODE",{});var D_=i(xi);sf=s(D_,"span start logits"),D_.forEach(t),rf=s(va," and "),Ai=a(va,"CODE",{});var L_=i(Ai);af=s(L_,"span end logits"),L_.forEach(t),lf=s(va,")."),va.forEach(t),df=u(xt),ur=a(xt,"P",{});var Cd=i(ur);cf=s(Cd,"This model inherits from "),Vr=a(Cd,"A",{href:!0});var I_=i(Vr);pf=s(I_,"TFPreTrainedModel"),I_.forEach(t),hf=s(Cd,`. 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.)`),Cd.forEach(t),uf=u(xt),mr=a(xt,"P",{});var Fd=i(mr);mf=s(Fd,"This model is also a "),fr=a(Fd,"A",{href:!0,rel:!0});var S_=i(fr);ff=s(S_,"tf.keras.Model"),S_.forEach(t),gf=s(Fd,` 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.`),Fd.forEach(t),_f=u(xt),w(Tn.$$.fragment,xt),vf=u(xt),pt=a(xt,"DIV",{class:!0});var Wt=i(pt);w(gr.$$.fragment,Wt),kf=u(Wt),yo=a(Wt,"P",{});var ka=i(yo);bf=s(ka,"The "),Jr=a(ka,"A",{href:!0});var R_=i(Jr);Tf=s(R_,"TFConvBertForQuestionAnswering"),R_.forEach(t),wf=s(ka," forward method, overrides the "),Pi=a(ka,"CODE",{});var W_=i(Pi);yf=s(W_,"__call__"),W_.forEach(t),$f=s(ka," special method."),ka.forEach(t),Cf=u(Wt),w(wn.$$.fragment,Wt),Ff=u(Wt),w(yn.$$.fragment,Wt),Ef=u(Wt),w($n.$$.fragment,Wt),Wt.forEach(t),xt.forEach(t),this.h()},h(){f(d,"name","hf:doc:metadata"),f(d,"content",JSON.stringify(Pv)),f(m,"id","convbert"),f(m,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(m,"href","#convbert"),f(p,"class","relative group"),f(Z,"alt","Models"),K_(Z.src,E="https://img.shields.io/badge/All_model_pages-convbert-blueviolet")||f(Z,"src",E),f(pe,"href","https://huggingface.co/models?filter=convbert"),f(he,"alt","Spaces"),K_(he.src,Ae="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||f(he,"src",Ae),f(R,"href","https://huggingface.co/spaces/docs-demos/conv-bert-base"),f(D,"class","flex flex-wrap space-x-1"),f(ie,"id","overview"),f(ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(ie,"href","#overview"),f(oe,"class","relative group"),f(de,"href","https://arxiv.org/abs/2008.02496"),f(de,"rel","nofollow"),f(S,"href","https://huggingface.co/abhishek"),f(S,"rel","nofollow"),f(N,"href","https://github.com/yitu-opensource/ConvBert"),f(N,"rel","nofollow"),f(X,"id","documentation-resources"),f(X,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(X,"href","#documentation-resources"),f(re,"class","relative group"),f(ee,"href","../tasks/sequence_classification"),f(Pe,"href","../tasks/token_classification"),f(Oe,"href","../tasks/question_answering"),f(Ne,"href","../tasks/masked_language_modeling"),f(fe,"href","../tasks/multiple_choice"),f($o,"id","transformers.ConvBertConfig"),f($o,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f($o,"href","#transformers.ConvBertConfig"),f(xe,"class","relative group"),f(yr,"href","/docs/transformers/v4.29.0/en/model_doc/convbert#transformers.ConvBertModel"),f(Rn,"href","https://huggingface.co/YituTech/conv-bert-base"),f(Rn,"rel","nofollow"),f($r,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),f(Cr,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),f(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Fo,"id","transformers.ConvBertTokenizer"),f(Fo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Fo,"href","#transformers.ConvBertTokenizer"),f(Yt,"class","relative group"),f(Fr,"href","/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),f(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Eo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(zr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(zo,"id","transformers.ConvBertTokenizerFast"),f(zo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(zo,"href","#transformers.ConvBertTokenizerFast"),f(Qt,"class","relative group"),f(Mr,"href","/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),f(Nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(qo,"id","transformers.ConvBertModel"),f(qo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(qo,"href","#transformers.ConvBertModel"),f(Jt,"class","relative group"),f(ls,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(ls,"rel","nofollow"),f(xr,"href","/docs/transformers/v4.29.0/en/model_doc/convbert#transformers.ConvBertModel"),f(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(At,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ao,"id","transformers.ConvBertForMaskedLM"),f(Ao,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Ao,"href","#transformers.ConvBertForMaskedLM"),f(Xt,"class","relative group"),f(hs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(hs,"rel","nofollow"),f(Ar,"href","/docs/transformers/v4.29.0/en/model_doc/convbert#transformers.ConvBertForMaskedLM"),f(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(No,"id","transformers.ConvBertForSequenceClassification"),f(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"),f(No,"href","#transformers.ConvBertForSequenceClassification"),f(to,"class","relative group"),f(_s,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(_s,"rel","nofollow"),f(Pr,"href","/docs/transformers/v4.29.0/en/model_doc/convbert#transformers.ConvBertForSequenceClassification"),f(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(So,"id","transformers.ConvBertForMultipleChoice"),f(So,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(So,"href","#transformers.ConvBertForMultipleChoice"),f(no,"class","relative group"),f(ws,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(ws,"rel","nofollow"),f(Or,"href","/docs/transformers/v4.29.0/en/model_doc/convbert#transformers.ConvBertForMultipleChoice"),f(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ko,"id","transformers.ConvBertForTokenClassification"),f(Ko,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Ko,"href","#transformers.ConvBertForTokenClassification"),f(ro,"class","relative group"),f(Es,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Es,"rel","nofollow"),f(Nr,"href","/docs/transformers/v4.29.0/en/model_doc/convbert#transformers.ConvBertForTokenClassification"),f($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ho,"id","transformers.ConvBertForQuestionAnswering"),f(Ho,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Ho,"href","#transformers.ConvBertForQuestionAnswering"),f(io,"class","relative group"),f(js,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(js,"rel","nofollow"),f(Dr,"href","/docs/transformers/v4.29.0/en/model_doc/convbert#transformers.ConvBertForQuestionAnswering"),f(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Jo,"id","transformers.TFConvBertModel"),f(Jo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(Jo,"href","#transformers.TFConvBertModel"),f(po,"class","relative group"),f(Lr,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(Ds,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Ds,"rel","nofollow"),f(Ir,"href","/docs/transformers/v4.29.0/en/model_doc/convbert#transformers.TFConvBertModel"),f(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(en,"id","transformers.TFConvBertForMaskedLM"),f(en,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(en,"href","#transformers.TFConvBertForMaskedLM"),f(uo,"class","relative group"),f(Sr,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(Us,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Us,"rel","nofollow"),f(Rr,"href","/docs/transformers/v4.29.0/en/model_doc/convbert#transformers.TFConvBertForMaskedLM"),f(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(rn,"id","transformers.TFConvBertForSequenceClassification"),f(rn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(rn,"href","#transformers.TFConvBertForSequenceClassification"),f(fo,"class","relative group"),f(Wr,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(Gs,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(Gs,"rel","nofollow"),f(Kr,"href","/docs/transformers/v4.29.0/en/model_doc/convbert#transformers.TFConvBertForSequenceClassification"),f(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(pn,"id","transformers.TFConvBertForMultipleChoice"),f(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"),f(pn,"href","#transformers.TFConvBertForMultipleChoice"),f(_o,"class","relative group"),f(Ur,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(nr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(nr,"rel","nofollow"),f(Yr,"href","/docs/transformers/v4.29.0/en/model_doc/convbert#transformers.TFConvBertForMultipleChoice"),f(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(fn,"id","transformers.TFConvBertForTokenClassification"),f(fn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(fn,"href","#transformers.TFConvBertForTokenClassification"),f(ko,"class","relative group"),f(Hr,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(dr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(dr,"rel","nofollow"),f(Qr,"href","/docs/transformers/v4.29.0/en/model_doc/convbert#transformers.TFConvBertForTokenClassification"),f(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(bn,"id","transformers.TFConvBertForQuestionAnswering"),f(bn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(bn,"href","#transformers.TFConvBertForQuestionAnswering"),f(To,"class","relative group"),f(Vr,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),f(fr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(fr,"rel","nofollow"),f(Jr,"href","/docs/transformers/v4.29.0/en/model_doc/convbert#transformers.TFConvBertForQuestionAnswering"),f(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(rt,"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,k){e(document.head,d),_(o,v,k),_(o,p,k),e(p,m),e(m,b),y(l,b,null),e(p,c),e(p,q),e(q,Te),_(o,_e,k),_(o,D,k),e(D,pe),e(pe,Z),e(D,we),e(D,R),e(R,he),_(o,Y,k),_(o,oe,k),e(oe,ie),e(ie,W),y(le,W,null),e(oe,ye),e(oe,K),e(K,$e),_(o,ve,k),_(o,I,k),e(I,Ce),e(I,de),e(de,ne),e(I,j),_(o,P,k),_(o,ue,k),e(ue,V),_(o,ke,k),_(o,me,k),e(me,U),e(U,Fe),_(o,be,k),_(o,x,k),e(x,Ee),_(o,H,k),_(o,se,k),e(se,Be),e(se,S),e(S,ze),e(se,Me),e(se,N),e(N,qe),_(o,Q,k),_(o,re,k),e(re,X),e(X,A),y(ce,A,null),e(re,O),e(re,ge),e(ge,je),_(o,g,k),_(o,B,k),e(B,De),e(De,ee),e(ee,Re),e(B,We),e(B,z),e(z,Pe),e(Pe,Ke),e(B,Ue),e(B,Le),e(Le,Oe),e(Oe,L),e(B,J),e(B,Ie),e(Ie,Ne),e(Ne,G),e(B,Ye),e(B,Se),e(Se,fe),e(fe,He),_(o,te,k),_(o,xe,k),e(xe,$o),e($o,ba),y(In,ba,null),e(xe,Ed),e(xe,Ta),e(Ta,Bd),_(o,hl,k),_(o,ut,k),y(Sn,ut,null),e(ut,zd),e(ut,Kt),e(Kt,Md),e(Kt,yr),e(yr,qd),e(Kt,jd),e(Kt,Rn),e(Rn,xd),e(Kt,Ad),e(ut,Pd),e(ut,Ut),e(Ut,Od),e(Ut,$r),e($r,Nd),e(Ut,Dd),e(Ut,Cr),e(Cr,Ld),e(Ut,Id),e(ut,Sd),y(Co,ut,null),_(o,ul,k),_(o,Yt,k),e(Yt,Fo),e(Fo,wa),y(Wn,wa,null),e(Yt,Rd),e(Yt,ya),e(ya,Wd),_(o,ml,k),_(o,Ge,k),y(Kn,Ge,null),e(Ge,Kd),e(Ge,$a),e($a,Ud),e(Ge,Yd),e(Ge,Un),e(Un,Hd),e(Un,Fr),e(Fr,Qd),e(Un,Vd),e(Ge,Jd),e(Ge,Ot),y(Yn,Ot,null),e(Ot,Gd),e(Ot,Ca),e(Ca,Xd),e(Ot,Zd),e(Ot,Hn),e(Hn,Er),e(Er,ec),e(Er,Fa),e(Fa,tc),e(Hn,oc),e(Hn,Br),e(Br,nc),e(Br,Ea),e(Ea,sc),e(Ge,rc),e(Ge,Eo),y(Qn,Eo,null),e(Eo,ac),e(Eo,Vn),e(Vn,ic),e(Vn,Ba),e(Ba,lc),e(Vn,dc),e(Ge,cc),e(Ge,kt),y(Jn,kt,null),e(kt,pc),e(kt,za),e(za,hc),e(kt,uc),y(Bo,kt,null),e(kt,mc),e(kt,Ht),e(Ht,fc),e(Ht,Ma),e(Ma,gc),e(Ht,_c),e(Ht,qa),e(qa,vc),e(Ht,kc),e(Ge,bc),e(Ge,zr),y(Gn,zr,null),_(o,fl,k),_(o,Qt,k),e(Qt,zo),e(zo,ja),y(Xn,ja,null),e(Qt,Tc),e(Qt,xa),e(xa,wc),_(o,gl,k),_(o,at,k),y(Zn,at,null),e(at,yc),e(at,es),e(es,$c),e(es,Aa),e(Aa,Cc),e(es,Fc),e(at,Ec),e(at,ts),e(ts,Bc),e(ts,Mr),e(Mr,zc),e(ts,Mc),e(at,qc),e(at,Nt),y(os,Nt,null),e(Nt,jc),e(Nt,Pa),e(Pa,xc),e(Nt,Ac),e(Nt,ns),e(ns,qr),e(qr,Pc),e(qr,Oa),e(Oa,Oc),e(ns,Nc),e(ns,jr),e(jr,Dc),e(jr,Na),e(Na,Lc),e(at,Ic),e(at,bt),y(ss,bt,null),e(bt,Sc),e(bt,Da),e(Da,Rc),e(bt,Wc),y(Mo,bt,null),e(bt,Kc),e(bt,Vt),e(Vt,Uc),e(Vt,La),e(La,Yc),e(Vt,Hc),e(Vt,Ia),e(Ia,Qc),e(Vt,Vc),_(o,_l,k),_(o,Jt,k),e(Jt,qo),e(qo,Sa),y(rs,Sa,null),e(Jt,Jc),e(Jt,Ra),e(Ra,Gc),_(o,vl,k),_(o,At,k),y(as,At,null),e(At,Xc),e(At,is),e(is,Zc),e(is,ls),e(ls,ep),e(is,tp),e(At,op),e(At,Tt),y(ds,Tt,null),e(Tt,np),e(Tt,Gt),e(Gt,sp),e(Gt,xr),e(xr,rp),e(Gt,ap),e(Gt,Wa),e(Wa,ip),e(Gt,lp),e(Tt,dp),y(jo,Tt,null),e(Tt,cp),y(xo,Tt,null),_(o,kl,k),_(o,Xt,k),e(Xt,Ao),e(Ao,Ka),y(cs,Ka,null),e(Xt,pp),e(Xt,Ua),e(Ua,hp),_(o,bl,k),_(o,Pt,k),y(ps,Pt,null),e(Pt,up),e(Pt,Zt),e(Zt,mp),e(Zt,Ya),e(Ya,fp),e(Zt,gp),e(Zt,hs),e(hs,_p),e(Zt,vp),e(Pt,kp),e(Pt,wt),y(us,wt,null),e(wt,bp),e(wt,eo),e(eo,Tp),e(eo,Ar),e(Ar,wp),e(eo,yp),e(eo,Ha),e(Ha,$p),e(eo,Cp),e(wt,Fp),y(Po,wt,null),e(wt,Ep),y(Oo,wt,null),_(o,Tl,k),_(o,to,k),e(to,No),e(No,Qa),y(ms,Qa,null),e(to,Bp),e(to,Va),e(Va,zp),_(o,wl,k),_(o,mt,k),y(fs,mt,null),e(mt,Mp),e(mt,Ja),e(Ja,qp),e(mt,jp),e(mt,gs),e(gs,xp),e(gs,_s),e(_s,Ap),e(gs,Pp),e(mt,Op),e(mt,it),y(vs,it,null),e(it,Np),e(it,oo),e(oo,Dp),e(oo,Pr),e(Pr,Lp),e(oo,Ip),e(oo,Ga),e(Ga,Sp),e(oo,Rp),e(it,Wp),y(Do,it,null),e(it,Kp),y(Lo,it,null),e(it,Up),y(Io,it,null),_(o,yl,k),_(o,no,k),e(no,So),e(So,Xa),y(ks,Xa,null),e(no,Yp),e(no,Za),e(Za,Hp),_(o,$l,k),_(o,ft,k),y(bs,ft,null),e(ft,Qp),e(ft,ei),e(ei,Vp),e(ft,Jp),e(ft,Ts),e(Ts,Gp),e(Ts,ws),e(ws,Xp),e(Ts,Zp),e(ft,eh),e(ft,yt),y(ys,yt,null),e(yt,th),e(yt,so),e(so,oh),e(so,Or),e(Or,nh),e(so,sh),e(so,ti),e(ti,rh),e(so,ah),e(yt,ih),y(Ro,yt,null),e(yt,lh),y(Wo,yt,null),_(o,Cl,k),_(o,ro,k),e(ro,Ko),e(Ko,oi),y($s,oi,null),e(ro,dh),e(ro,ni),e(ni,ch),_(o,Fl,k),_(o,gt,k),y(Cs,gt,null),e(gt,ph),e(gt,si),e(si,hh),e(gt,uh),e(gt,Fs),e(Fs,mh),e(Fs,Es),e(Es,fh),e(Fs,gh),e(gt,_h),e(gt,$t),y(Bs,$t,null),e($t,vh),e($t,ao),e(ao,kh),e(ao,Nr),e(Nr,bh),e(ao,Th),e(ao,ri),e(ri,wh),e(ao,yh),e($t,$h),y(Uo,$t,null),e($t,Ch),y(Yo,$t,null),_(o,El,k),_(o,io,k),e(io,Ho),e(Ho,ai),y(zs,ai,null),e(io,Fh),e(io,ii),e(ii,Eh),_(o,Bl,k),_(o,_t,k),y(Ms,_t,null),e(_t,Bh),e(_t,lo),e(lo,zh),e(lo,li),e(li,Mh),e(lo,qh),e(lo,di),e(di,jh),e(lo,xh),e(_t,Ah),e(_t,qs),e(qs,Ph),e(qs,js),e(js,Oh),e(qs,Nh),e(_t,Dh),e(_t,Ct),y(xs,Ct,null),e(Ct,Lh),e(Ct,co),e(co,Ih),e(co,Dr),e(Dr,Sh),e(co,Rh),e(co,ci),e(ci,Wh),e(co,Kh),e(Ct,Uh),y(Qo,Ct,null),e(Ct,Yh),y(Vo,Ct,null),_(o,zl,k),_(o,po,k),e(po,Jo),e(Jo,pi),y(As,pi,null),e(po,Hh),e(po,hi),e(hi,Qh),_(o,Ml,k),_(o,et,k),y(Ps,et,null),e(et,Vh),e(et,ui),e(ui,Jh),e(et,Gh),e(et,Os),e(Os,Xh),e(Os,Lr),e(Lr,Zh),e(Os,eu),e(et,tu),e(et,Ns),e(Ns,ou),e(Ns,Ds),e(Ds,nu),e(Ns,su),e(et,ru),y(Go,et,null),e(et,au),e(et,Ft),y(Ls,Ft,null),e(Ft,iu),e(Ft,ho),e(ho,lu),e(ho,Ir),e(Ir,du),e(ho,cu),e(ho,mi),e(mi,pu),e(ho,hu),e(Ft,uu),y(Xo,Ft,null),e(Ft,mu),y(Zo,Ft,null),_(o,ql,k),_(o,uo,k),e(uo,en),e(en,fi),y(Is,fi,null),e(uo,fu),e(uo,gi),e(gi,gu),_(o,jl,k),_(o,tt,k),y(Ss,tt,null),e(tt,_u),e(tt,Rs),e(Rs,vu),e(Rs,_i),e(_i,ku),e(Rs,bu),e(tt,Tu),e(tt,Ws),e(Ws,wu),e(Ws,Sr),e(Sr,yu),e(Ws,$u),e(tt,Cu),e(tt,Ks),e(Ks,Fu),e(Ks,Us),e(Us,Eu),e(Ks,Bu),e(tt,zu),y(tn,tt,null),e(tt,Mu),e(tt,lt),y(Ys,lt,null),e(lt,qu),e(lt,mo),e(mo,ju),e(mo,Rr),e(Rr,xu),e(mo,Au),e(mo,vi),e(vi,Pu),e(mo,Ou),e(lt,Nu),y(on,lt,null),e(lt,Du),y(nn,lt,null),e(lt,Lu),y(sn,lt,null),_(o,xl,k),_(o,fo,k),e(fo,rn),e(rn,ki),y(Hs,ki,null),e(fo,Iu),e(fo,bi),e(bi,Su),_(o,Al,k),_(o,ot,k),y(Qs,ot,null),e(ot,Ru),e(ot,Ti),e(Ti,Wu),e(ot,Ku),e(ot,Vs),e(Vs,Uu),e(Vs,Wr),e(Wr,Yu),e(Vs,Hu),e(ot,Qu),e(ot,Js),e(Js,Vu),e(Js,Gs),e(Gs,Ju),e(Js,Gu),e(ot,Xu),y(an,ot,null),e(ot,Zu),e(ot,dt),y(Xs,dt,null),e(dt,em),e(dt,go),e(go,tm),e(go,Kr),e(Kr,om),e(go,nm),e(go,wi),e(wi,sm),e(go,rm),e(dt,am),y(ln,dt,null),e(dt,im),y(dn,dt,null),e(dt,lm),y(cn,dt,null),_(o,Pl,k),_(o,_o,k),e(_o,pn),e(pn,yi),y(Zs,yi,null),e(_o,dm),e(_o,$i),e($i,cm),_(o,Ol,k),_(o,nt,k),y(er,nt,null),e(nt,pm),e(nt,Ci),e(Ci,hm),e(nt,um),e(nt,tr),e(tr,mm),e(tr,Ur),e(Ur,fm),e(tr,gm),e(nt,_m),e(nt,or),e(or,vm),e(or,nr),e(nr,km),e(or,bm),e(nt,Tm),y(hn,nt,null),e(nt,wm),e(nt,Et),y(sr,Et,null),e(Et,ym),e(Et,vo),e(vo,$m),e(vo,Yr),e(Yr,Cm),e(vo,Fm),e(vo,Fi),e(Fi,Em),e(vo,Bm),e(Et,zm),y(un,Et,null),e(Et,Mm),y(mn,Et,null),_(o,Nl,k),_(o,ko,k),e(ko,fn),e(fn,Ei),y(rr,Ei,null),e(ko,qm),e(ko,Bi),e(Bi,jm),_(o,Dl,k),_(o,st,k),y(ar,st,null),e(st,xm),e(st,zi),e(zi,Am),e(st,Pm),e(st,ir),e(ir,Om),e(ir,Hr),e(Hr,Nm),e(ir,Dm),e(st,Lm),e(st,lr),e(lr,Im),e(lr,dr),e(dr,Sm),e(lr,Rm),e(st,Wm),y(gn,st,null),e(st,Km),e(st,ct),y(cr,ct,null),e(ct,Um),e(ct,bo),e(bo,Ym),e(bo,Qr),e(Qr,Hm),e(bo,Qm),e(bo,Mi),e(Mi,Vm),e(bo,Jm),e(ct,Gm),y(_n,ct,null),e(ct,Xm),y(vn,ct,null),e(ct,Zm),y(kn,ct,null),_(o,Ll,k),_(o,To,k),e(To,bn),e(bn,qi),y(pr,qi,null),e(To,ef),e(To,ji),e(ji,tf),_(o,Il,k),_(o,rt,k),y(hr,rt,null),e(rt,of),e(rt,wo),e(wo,nf),e(wo,xi),e(xi,sf),e(wo,rf),e(wo,Ai),e(Ai,af),e(wo,lf),e(rt,df),e(rt,ur),e(ur,cf),e(ur,Vr),e(Vr,pf),e(ur,hf),e(rt,uf),e(rt,mr),e(mr,mf),e(mr,fr),e(fr,ff),e(mr,gf),e(rt,_f),y(Tn,rt,null),e(rt,vf),e(rt,pt),y(gr,pt,null),e(pt,kf),e(pt,yo),e(yo,bf),e(yo,Jr),e(Jr,Tf),e(yo,wf),e(yo,Pi),e(Pi,yf),e(yo,$f),e(pt,Cf),y(wn,pt,null),e(pt,Ff),y(yn,pt,null),e(pt,Ef),y($n,pt,null),Sl=!0},p(o,[k]){const _r={};k&2&&(_r.$$scope={dirty:k,ctx:o}),Co.$set(_r);const Oi={};k&2&&(Oi.$$scope={dirty:k,ctx:o}),Bo.$set(Oi);const Ni={};k&2&&(Ni.$$scope={dirty:k,ctx:o}),Mo.$set(Ni);const Di={};k&2&&(Di.$$scope={dirty:k,ctx:o}),jo.$set(Di);const vr={};k&2&&(vr.$$scope={dirty:k,ctx:o}),xo.$set(vr);const Li={};k&2&&(Li.$$scope={dirty:k,ctx:o}),Po.$set(Li);const Ii={};k&2&&(Ii.$$scope={dirty:k,ctx:o}),Oo.$set(Ii);const kr={};k&2&&(kr.$$scope={dirty:k,ctx:o}),Do.$set(kr);const Si={};k&2&&(Si.$$scope={dirty:k,ctx:o}),Lo.$set(Si);const Ri={};k&2&&(Ri.$$scope={dirty:k,ctx:o}),Io.$set(Ri);const Wi={};k&2&&(Wi.$$scope={dirty:k,ctx:o}),Ro.$set(Wi);const br={};k&2&&(br.$$scope={dirty:k,ctx:o}),Wo.$set(br);const Ki={};k&2&&(Ki.$$scope={dirty:k,ctx:o}),Uo.$set(Ki);const Ui={};k&2&&(Ui.$$scope={dirty:k,ctx:o}),Yo.$set(Ui);const Yi={};k&2&&(Yi.$$scope={dirty:k,ctx:o}),Qo.$set(Yi);const Hi={};k&2&&(Hi.$$scope={dirty:k,ctx:o}),Vo.$set(Hi);const Qi={};k&2&&(Qi.$$scope={dirty:k,ctx:o}),Go.$set(Qi);const Cn={};k&2&&(Cn.$$scope={dirty:k,ctx:o}),Xo.$set(Cn);const Vi={};k&2&&(Vi.$$scope={dirty:k,ctx:o}),Zo.$set(Vi);const Ji={};k&2&&(Ji.$$scope={dirty:k,ctx:o}),tn.$set(Ji);const Tr={};k&2&&(Tr.$$scope={dirty:k,ctx:o}),on.$set(Tr);const Gi={};k&2&&(Gi.$$scope={dirty:k,ctx:o}),nn.$set(Gi);const Xi={};k&2&&(Xi.$$scope={dirty:k,ctx:o}),sn.$set(Xi);const Zi={};k&2&&(Zi.$$scope={dirty:k,ctx:o}),an.$set(Zi);const vt={};k&2&&(vt.$$scope={dirty:k,ctx:o}),ln.$set(vt);const el={};k&2&&(el.$$scope={dirty:k,ctx:o}),dn.$set(el);const tl={};k&2&&(tl.$$scope={dirty:k,ctx:o}),cn.$set(tl);const ol={};k&2&&(ol.$$scope={dirty:k,ctx:o}),hn.$set(ol);const nl={};k&2&&(nl.$$scope={dirty:k,ctx:o}),un.$set(nl);const sl={};k&2&&(sl.$$scope={dirty:k,ctx:o}),mn.$set(sl);const rl={};k&2&&(rl.$$scope={dirty:k,ctx:o}),gn.$set(rl);const al={};k&2&&(al.$$scope={dirty:k,ctx:o}),_n.$set(al);const il={};k&2&&(il.$$scope={dirty:k,ctx:o}),vn.$set(il);const ll={};k&2&&(ll.$$scope={dirty:k,ctx:o}),kn.$set(ll);const dl={};k&2&&(dl.$$scope={dirty:k,ctx:o}),Tn.$set(dl);const wr={};k&2&&(wr.$$scope={dirty:k,ctx:o}),wn.$set(wr);const cl={};k&2&&(cl.$$scope={dirty:k,ctx:o}),yn.$set(cl);const pl={};k&2&&(pl.$$scope={dirty:k,ctx:o}),$n.$set(pl)},i(o){Sl||($(l.$$.fragment,o),$(le.$$.fragment,o),$(ce.$$.fragment,o),$(In.$$.fragment,o),$(Sn.$$.fragment,o),$(Co.$$.fragment,o),$(Wn.$$.fragment,o),$(Kn.$$.fragment,o),$(Yn.$$.fragment,o),$(Qn.$$.fragment,o),$(Jn.$$.fragment,o),$(Bo.$$.fragment,o),$(Gn.$$.fragment,o),$(Xn.$$.fragment,o),$(Zn.$$.fragment,o),$(os.$$.fragment,o),$(ss.$$.fragment,o),$(Mo.$$.fragment,o),$(rs.$$.fragment,o),$(as.$$.fragment,o),$(ds.$$.fragment,o),$(jo.$$.fragment,o),$(xo.$$.fragment,o),$(cs.$$.fragment,o),$(ps.$$.fragment,o),$(us.$$.fragment,o),$(Po.$$.fragment,o),$(Oo.$$.fragment,o),$(ms.$$.fragment,o),$(fs.$$.fragment,o),$(vs.$$.fragment,o),$(Do.$$.fragment,o),$(Lo.$$.fragment,o),$(Io.$$.fragment,o),$(ks.$$.fragment,o),$(bs.$$.fragment,o),$(ys.$$.fragment,o),$(Ro.$$.fragment,o),$(Wo.$$.fragment,o),$($s.$$.fragment,o),$(Cs.$$.fragment,o),$(Bs.$$.fragment,o),$(Uo.$$.fragment,o),$(Yo.$$.fragment,o),$(zs.$$.fragment,o),$(Ms.$$.fragment,o),$(xs.$$.fragment,o),$(Qo.$$.fragment,o),$(Vo.$$.fragment,o),$(As.$$.fragment,o),$(Ps.$$.fragment,o),$(Go.$$.fragment,o),$(Ls.$$.fragment,o),$(Xo.$$.fragment,o),$(Zo.$$.fragment,o),$(Is.$$.fragment,o),$(Ss.$$.fragment,o),$(tn.$$.fragment,o),$(Ys.$$.fragment,o),$(on.$$.fragment,o),$(nn.$$.fragment,o),$(sn.$$.fragment,o),$(Hs.$$.fragment,o),$(Qs.$$.fragment,o),$(an.$$.fragment,o),$(Xs.$$.fragment,o),$(ln.$$.fragment,o),$(dn.$$.fragment,o),$(cn.$$.fragment,o),$(Zs.$$.fragment,o),$(er.$$.fragment,o),$(hn.$$.fragment,o),$(sr.$$.fragment,o),$(un.$$.fragment,o),$(mn.$$.fragment,o),$(rr.$$.fragment,o),$(ar.$$.fragment,o),$(gn.$$.fragment,o),$(cr.$$.fragment,o),$(_n.$$.fragment,o),$(vn.$$.fragment,o),$(kn.$$.fragment,o),$(pr.$$.fragment,o),$(hr.$$.fragment,o),$(Tn.$$.fragment,o),$(gr.$$.fragment,o),$(wn.$$.fragment,o),$(yn.$$.fragment,o),$($n.$$.fragment,o),Sl=!0)},o(o){C(l.$$.fragment,o),C(le.$$.fragment,o),C(ce.$$.fragment,o),C(In.$$.fragment,o),C(Sn.$$.fragment,o),C(Co.$$.fragment,o),C(Wn.$$.fragment,o),C(Kn.$$.fragment,o),C(Yn.$$.fragment,o),C(Qn.$$.fragment,o),C(Jn.$$.fragment,o),C(Bo.$$.fragment,o),C(Gn.$$.fragment,o),C(Xn.$$.fragment,o),C(Zn.$$.fragment,o),C(os.$$.fragment,o),C(ss.$$.fragment,o),C(Mo.$$.fragment,o),C(rs.$$.fragment,o),C(as.$$.fragment,o),C(ds.$$.fragment,o),C(jo.$$.fragment,o),C(xo.$$.fragment,o),C(cs.$$.fragment,o),C(ps.$$.fragment,o),C(us.$$.fragment,o),C(Po.$$.fragment,o),C(Oo.$$.fragment,o),C(ms.$$.fragment,o),C(fs.$$.fragment,o),C(vs.$$.fragment,o),C(Do.$$.fragment,o),C(Lo.$$.fragment,o),C(Io.$$.fragment,o),C(ks.$$.fragment,o),C(bs.$$.fragment,o),C(ys.$$.fragment,o),C(Ro.$$.fragment,o),C(Wo.$$.fragment,o),C($s.$$.fragment,o),C(Cs.$$.fragment,o),C(Bs.$$.fragment,o),C(Uo.$$.fragment,o),C(Yo.$$.fragment,o),C(zs.$$.fragment,o),C(Ms.$$.fragment,o),C(xs.$$.fragment,o),C(Qo.$$.fragment,o),C(Vo.$$.fragment,o),C(As.$$.fragment,o),C(Ps.$$.fragment,o),C(Go.$$.fragment,o),C(Ls.$$.fragment,o),C(Xo.$$.fragment,o),C(Zo.$$.fragment,o),C(Is.$$.fragment,o),C(Ss.$$.fragment,o),C(tn.$$.fragment,o),C(Ys.$$.fragment,o),C(on.$$.fragment,o),C(nn.$$.fragment,o),C(sn.$$.fragment,o),C(Hs.$$.fragment,o),C(Qs.$$.fragment,o),C(an.$$.fragment,o),C(Xs.$$.fragment,o),C(ln.$$.fragment,o),C(dn.$$.fragment,o),C(cn.$$.fragment,o),C(Zs.$$.fragment,o),C(er.$$.fragment,o),C(hn.$$.fragment,o),C(sr.$$.fragment,o),C(un.$$.fragment,o),C(mn.$$.fragment,o),C(rr.$$.fragment,o),C(ar.$$.fragment,o),C(gn.$$.fragment,o),C(cr.$$.fragment,o),C(_n.$$.fragment,o),C(vn.$$.fragment,o),C(kn.$$.fragment,o),C(pr.$$.fragment,o),C(hr.$$.fragment,o),C(Tn.$$.fragment,o),C(gr.$$.fragment,o),C(wn.$$.fragment,o),C(yn.$$.fragment,o),C($n.$$.fragment,o),Sl=!1},d(o){t(d),o&&t(v),o&&t(p),F(l),o&&t(_e),o&&t(D),o&&t(Y),o&&t(oe),F(le),o&&t(ve),o&&t(I),o&&t(P),o&&t(ue),o&&t(ke),o&&t(me),o&&t(be),o&&t(x),o&&t(H),o&&t(se),o&&t(Q),o&&t(re),F(ce),o&&t(g),o&&t(B),o&&t(te),o&&t(xe),F(In),o&&t(hl),o&&t(ut),F(Sn),F(Co),o&&t(ul),o&&t(Yt),F(Wn),o&&t(ml),o&&t(Ge),F(Kn),F(Yn),F(Qn),F(Jn),F(Bo),F(Gn),o&&t(fl),o&&t(Qt),F(Xn),o&&t(gl),o&&t(at),F(Zn),F(os),F(ss),F(Mo),o&&t(_l),o&&t(Jt),F(rs),o&&t(vl),o&&t(At),F(as),F(ds),F(jo),F(xo),o&&t(kl),o&&t(Xt),F(cs),o&&t(bl),o&&t(Pt),F(ps),F(us),F(Po),F(Oo),o&&t(Tl),o&&t(to),F(ms),o&&t(wl),o&&t(mt),F(fs),F(vs),F(Do),F(Lo),F(Io),o&&t(yl),o&&t(no),F(ks),o&&t($l),o&&t(ft),F(bs),F(ys),F(Ro),F(Wo),o&&t(Cl),o&&t(ro),F($s),o&&t(Fl),o&&t(gt),F(Cs),F(Bs),F(Uo),F(Yo),o&&t(El),o&&t(io),F(zs),o&&t(Bl),o&&t(_t),F(Ms),F(xs),F(Qo),F(Vo),o&&t(zl),o&&t(po),F(As),o&&t(Ml),o&&t(et),F(Ps),F(Go),F(Ls),F(Xo),F(Zo),o&&t(ql),o&&t(uo),F(Is),o&&t(jl),o&&t(tt),F(Ss),F(tn),F(Ys),F(on),F(nn),F(sn),o&&t(xl),o&&t(fo),F(Hs),o&&t(Al),o&&t(ot),F(Qs),F(an),F(Xs),F(ln),F(dn),F(cn),o&&t(Pl),o&&t(_o),F(Zs),o&&t(Ol),o&&t(nt),F(er),F(hn),F(sr),F(un),F(mn),o&&t(Nl),o&&t(ko),F(rr),o&&t(Dl),o&&t(st),F(ar),F(gn),F(cr),F(_n),F(vn),F(kn),o&&t(Ll),o&&t(To),F(pr),o&&t(Il),o&&t(rt),F(hr),F(Tn),F(gr),F(wn),F(yn),F($n)}}}const Pv={local:"convbert",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{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 Ov(M){return V_(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Wv extends U_{constructor(d){super();Y_(this,d,Ov,Av,H_,{})}}export{Wv as default,Pv as metadata};
