import{S as S_,i as Q_,s as P_,e as a,k as h,w as T,t as n,M as Y_,c as r,d as t,m,a as l,x as w,h as s,b as f,N as X_,G as e,g as _,y as k,q as M,o as C,B as $,v as D_,L as De}from"../../chunks/vendor-hf-doc-builder.js";import{T as Oe}from"../../chunks/Tip-hf-doc-builder.js";import{D as re}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Le}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ke}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ye}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function L_(j){let d,v,p,u,y;return u=new Le({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMENvbnZCZXJ0Q29uZmlnJTJDJTIwQ29udkJlcnRNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBDb252QkVSVCUyMGNvbnZiZXJ0LWJhc2UtdW5jYXNlZCUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBDb252QmVydENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBjb252YmVydC1iYXNlLXVuY2FzZWQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMENvbnZCZXJ0TW9kZWwoY29uZmlndXJhdGlvbiklMEElMEElMjMlMjBBY2Nlc3NpbmclMjB0aGUlMjBtb2RlbCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwbW9kZWwuY29uZmln",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=a("p"),v=n("Example:"),p=h(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);v=s(c,"Example:"),c.forEach(t),p=m(i),w(u.$$.fragment,i)},m(i,c){_(i,d,c),e(d,v),_(i,p,c),k(u,i,c),y=!0},p:De,i(i){y||(M(u.$$.fragment,i),y=!0)},o(i){C(u.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(p),$(u,i)}}}function H_(j){let d,v,p,u,y;return u=new Le({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",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=a("p"),v=n("sequence pair mask has the following format:"),p=h(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);v=s(c,"sequence pair mask has the following format:"),c.forEach(t),p=m(i),w(u.$$.fragment,i)},m(i,c){_(i,d,c),e(d,v),_(i,p,c),k(u,i,c),y=!0},p:De,i(i){y||(M(u.$$.fragment,i),y=!0)},o(i){C(u.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(p),$(u,i)}}}function O_(j){let d,v,p,u,y;return u=new Le({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",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=a("p"),v=n("sequence pair mask has the following format:"),p=h(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);v=s(c,"sequence pair mask has the following format:"),c.forEach(t),p=m(i),w(u.$$.fragment,i)},m(i,c){_(i,d,c),e(d,v),_(i,p,c),k(u,i,c),y=!0},p:De,i(i){y||(M(u.$$.fragment,i),y=!0)},o(i){C(u.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(p),$(u,i)}}}function K_(j){let d,v,p,u,y;return{c(){d=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),u=n("Module"),y=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(i){d=r(i,"P",{});var c=l(d);v=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var J=l(p);u=s(J,"Module"),J.forEach(t),y=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(i,c){_(i,d,c),e(d,v),e(d,p),e(p,u),e(d,y)},d(i){i&&t(d)}}}function ev(j){let d,v,p,u,y;return u=new Le({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDb252QmVydE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJZaXR1VGVjaCUyRmNvbnYtYmVydC1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwQ29udkJlcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyWWl0dVRlY2glMkZjb252LWJlcnQtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",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=a("p"),v=n("Example:"),p=h(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);v=s(c,"Example:"),c.forEach(t),p=m(i),w(u.$$.fragment,i)},m(i,c){_(i,d,c),e(d,v),_(i,p,c),k(u,i,c),y=!0},p:De,i(i){y||(M(u.$$.fragment,i),y=!0)},o(i){C(u.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(p),$(u,i)}}}function tv(j){let d,v,p,u,y;return{c(){d=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),u=n("Module"),y=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(i){d=r(i,"P",{});var c=l(d);v=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var J=l(p);u=s(J,"Module"),J.forEach(t),y=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(i,c){_(i,d,c),e(d,v),e(d,p),e(p,u),e(d,y)},d(i){i&&t(d)}}}function ov(j){let d,v,p,u,y;return u=new Le({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDb252QmVydEZvck1hc2tlZExNJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJZaXR1VGVjaCUyRmNvbnYtYmVydC1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwQ29udkJlcnRGb3JNYXNrZWRMTS5mcm9tX3ByZXRyYWluZWQoJTIyWWl0dVRlY2glMkZjb252LWJlcnQtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjAlNUJNQVNLJTVELiUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjByZXRyaWV2ZSUyMGluZGV4JTIwb2YlMjAlNUJNQVNLJTVEJTBBbWFza190b2tlbl9pbmRleCUyMCUzRCUyMChpbnB1dHMuaW5wdXRfaWRzJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQpJTVCMCU1RC5ub256ZXJvKGFzX3R1cGxlJTNEVHJ1ZSklNUIwJTVEJTBBJTBBcHJlZGljdGVkX3Rva2VuX2lkJTIwJTNEJTIwbG9naXRzJTVCMCUyQyUyMG1hc2tfdG9rZW5faW5kZXglNUQuYXJnbWF4KGF4aXMlM0QtMSklMEElMEFsYWJlbHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjBQYXJpcy4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSU1QiUyMmlucHV0X2lkcyUyMiU1RCUwQSUyMyUyMG1hc2slMjBsYWJlbHMlMjBvZiUyMG5vbi0lNUJNQVNLJTVEJTIwdG9rZW5zJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2gud2hlcmUoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkJTJDJTIwbGFiZWxzJTJDJTIwLTEwMCklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMp",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=a("p"),v=n("Example:"),p=h(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);v=s(c,"Example:"),c.forEach(t),p=m(i),w(u.$$.fragment,i)},m(i,c){_(i,d,c),e(d,v),_(i,p,c),k(u,i,c),y=!0},p:De,i(i){y||(M(u.$$.fragment,i),y=!0)},o(i){C(u.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(p),$(u,i)}}}function nv(j){let d,v,p,u,y;return{c(){d=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),u=n("Module"),y=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(i){d=r(i,"P",{});var c=l(d);v=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var J=l(p);u=s(J,"Module"),J.forEach(t),y=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(i,c){_(i,d,c),e(d,v),e(d,p),e(p,u),e(d,y)},d(i){i&&t(d)}}}function sv(j){let d,v,p,u,y;return u=new Le({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMENvbnZCZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMllpdHVUZWNoJTJGY29udi1iZXJ0LWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBDb252QmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMllpdHVUZWNoJTJGY29udi1iZXJ0LWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwbG9naXRzLmFyZ21heCgpLml0ZW0oKSUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMENvbnZCZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyWWl0dVRlY2glMkZjb252LWJlcnQtYmFzZSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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=a("p"),v=n("Example of single-label classification:"),p=h(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);v=s(c,"Example of single-label classification:"),c.forEach(t),p=m(i),w(u.$$.fragment,i)},m(i,c){_(i,d,c),e(d,v),_(i,p,c),k(u,i,c),y=!0},p:De,i(i){y||(M(u.$$.fragment,i),y=!0)},o(i){C(u.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(p),$(u,i)}}}function av(j){let d,v,p,u,y;return u=new Le({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMENvbnZCZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMllpdHVUZWNoJTJGY29udi1iZXJ0LWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBDb252QmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMllpdHVUZWNoJTJGY29udi1iZXJ0LWJhc2UlMjIlMkMlMjBwcm9ibGVtX3R5cGUlM0QlMjJtdWx0aV9sYWJlbF9jbGFzc2lmaWNhdGlvbiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWRzJTIwJTNEJTIwdG9yY2guYXJhbmdlKDAlMkMlMjBsb2dpdHMuc2hhcGUlNUItMSU1RCklNUJ0b3JjaC5zaWdtb2lkKGxvZ2l0cykuc3F1ZWV6ZShkaW0lM0QwKSUyMCUzRSUyMDAuNSU1RCUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMENvbnZCZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyWWl0dVRlY2glMkZjb252LWJlcnQtYmFzZSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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=a("p"),v=n("Example of multi-label classification:"),p=h(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);v=s(c,"Example of multi-label classification:"),c.forEach(t),p=m(i),w(u.$$.fragment,i)},m(i,c){_(i,d,c),e(d,v),_(i,p,c),k(u,i,c),y=!0},p:De,i(i){y||(M(u.$$.fragment,i),y=!0)},o(i){C(u.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(p),$(u,i)}}}function rv(j){let d,v,p,u,y;return{c(){d=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),u=n("Module"),y=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(i){d=r(i,"P",{});var c=l(d);v=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var J=l(p);u=s(J,"Module"),J.forEach(t),y=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(i,c){_(i,d,c),e(d,v),e(d,p),e(p,u),e(d,y)},d(i){i&&t(d)}}}function lv(j){let d,v,p,u,y;return u=new Le({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDb252QmVydEZvck11bHRpcGxlQ2hvaWNlJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJZaXR1VGVjaCUyRmNvbnYtYmVydC1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwQ29udkJlcnRGb3JNdWx0aXBsZUNob2ljZS5mcm9tX3ByZXRyYWluZWQoJTIyWWl0dVRlY2glMkZjb252LWJlcnQtYmFzZSUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJJbiUyMEl0YWx5JTJDJTIwcGl6emElMjBzZXJ2ZWQlMjBpbiUyMGZvcm1hbCUyMHNldHRpbmdzJTJDJTIwc3VjaCUyMGFzJTIwYXQlMjBhJTIwcmVzdGF1cmFudCUyQyUyMGlzJTIwcHJlc2VudGVkJTIwdW5zbGljZWQuJTIyJTBBY2hvaWNlMCUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdpdGglMjBhJTIwZm9yayUyMGFuZCUyMGElMjBrbmlmZS4lMjIlMEFjaG9pY2UxJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2hpbGUlMjBoZWxkJTIwaW4lMjB0aGUlMjBoYW5kLiUyMiUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvcigwKS51bnNxdWVlemUoMCklMjAlMjAlMjMlMjBjaG9pY2UwJTIwaXMlMjBjb3JyZWN0JTIwKGFjY29yZGluZyUyMHRvJTIwV2lraXBlZGlhJTIwJTNCKSklMkMlMjBiYXRjaCUyMHNpemUlMjAxJTBBJTBBZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIoJTVCcHJvbXB0JTJDJTIwcHJvbXB0JTVEJTJDJTIwJTVCY2hvaWNlMCUyQyUyMGNob2ljZTElNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTJDJTIwcGFkZGluZyUzRFRydWUpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqJTdCayUzQSUyMHYudW5zcXVlZXplKDApJTIwZm9yJTIwayUyQyUyMHYlMjBpbiUyMGVuY29kaW5nLml0ZW1zKCklN0QlMkMlMjBsYWJlbHMlM0RsYWJlbHMpJTIwJTIwJTIzJTIwYmF0Y2glMjBzaXplJTIwaXMlMjAxJTBBJTBBJTIzJTIwdGhlJTIwbGluZWFyJTIwY2xhc3NpZmllciUyMHN0aWxsJTIwbmVlZHMlMjB0byUyMGJlJTIwdHJhaW5lZCUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3MlMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",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=a("p"),v=n("Example:"),p=h(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);v=s(c,"Example:"),c.forEach(t),p=m(i),w(u.$$.fragment,i)},m(i,c){_(i,d,c),e(d,v),_(i,p,c),k(u,i,c),y=!0},p:De,i(i){y||(M(u.$$.fragment,i),y=!0)},o(i){C(u.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(p),$(u,i)}}}function iv(j){let d,v,p,u,y;return{c(){d=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),u=n("Module"),y=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(i){d=r(i,"P",{});var c=l(d);v=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var J=l(p);u=s(J,"Module"),J.forEach(t),y=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(i,c){_(i,d,c),e(d,v),e(d,p),e(p,u),e(d,y)},d(i){i&&t(d)}}}function dv(j){let d,v,p,u,y;return u=new Le({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDb252QmVydEZvclRva2VuQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMllpdHVUZWNoJTJGY29udi1iZXJ0LWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBDb252QmVydEZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMllpdHVUZWNoJTJGY29udi1iZXJ0LWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUwQSUyMCUyMCUyMCUyMCUyMkh1Z2dpbmdGYWNlJTIwaXMlMjBhJTIwY29tcGFueSUyMGJhc2VkJTIwaW4lMjBQYXJpcyUyMGFuZCUyME5ldyUyMFlvcmslMjIlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RGYWxzZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMEEpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSklMEElMEElMjMlMjBOb3RlJTIwdGhhdCUyMHRva2VucyUyMGFyZSUyMGNsYXNzaWZpZWQlMjByYXRoZXIlMjB0aGVuJTIwaW5wdXQlMjB3b3JkcyUyMHdoaWNoJTIwbWVhbnMlMjB0aGF0JTBBJTIzJTIwdGhlcmUlMjBtaWdodCUyMGJlJTIwbW9yZSUyMHByZWRpY3RlZCUyMHRva2VuJTIwY2xhc3NlcyUyMHRoYW4lMjB3b3Jkcy4lMEElMjMlMjBNdWx0aXBsZSUyMHRva2VuJTIwY2xhc3NlcyUyMG1pZ2h0JTIwYWNjb3VudCUyMGZvciUyMHRoZSUyMHNhbWUlMjB3b3JkJTBBcHJlZGljdGVkX3Rva2Vuc19jbGFzc2VzJTIwJTNEJTIwJTVCbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCdC5pdGVtKCklNUQlMjBmb3IlMjB0JTIwaW4lMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTVCMCU1RCU1RCUwQSUwQWxhYmVscyUyMCUzRCUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlMEFsb3NzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpLmxvc3M=",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=a("p"),v=n("Example:"),p=h(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);v=s(c,"Example:"),c.forEach(t),p=m(i),w(u.$$.fragment,i)},m(i,c){_(i,d,c),e(d,v),_(i,p,c),k(u,i,c),y=!0},p:De,i(i){y||(M(u.$$.fragment,i),y=!0)},o(i){C(u.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(p),$(u,i)}}}function cv(j){let d,v,p,u,y;return{c(){d=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),u=n("Module"),y=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(i){d=r(i,"P",{});var c=l(d);v=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var J=l(p);u=s(J,"Module"),J.forEach(t),y=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(i,c){_(i,d,c),e(d,v),e(d,p),e(p,u),e(d,y)},d(i){i&&t(d)}}}function pv(j){let d,v,p,u,y;return u=new Le({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBDb252QmVydEZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJZaXR1VGVjaCUyRmNvbnYtYmVydC1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwQ29udkJlcnRGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyWWl0dVRlY2glMkZjb252LWJlcnQtYmFzZSUyMiklMEElMEFxdWVzdGlvbiUyQyUyMHRleHQlMjAlM0QlMjAlMjJXaG8lMjB3YXMlMjBKaW0lMjBIZW5zb24lM0YlMjIlMkMlMjAlMjJKaW0lMjBIZW5zb24lMjB3YXMlMjBhJTIwbmljZSUyMHB1cHBldCUyMiUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihxdWVzdGlvbiUyQyUyMHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNEJTIwb3V0cHV0cy5zdGFydF9sb2dpdHMuYXJnbWF4KCklMEFhbnN3ZXJfZW5kX2luZGV4JTIwJTNEJTIwb3V0cHV0cy5lbmRfbG9naXRzLmFyZ21heCgpJTBBJTBBcHJlZGljdF9hbnN3ZXJfdG9rZW5zJTIwJTNEJTIwaW5wdXRzLmlucHV0X2lkcyU1QjAlMkMlMjBhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0ElMjBhbnN3ZXJfZW5kX2luZGV4JTIwJTJCJTIwMSU1RCUwQSUwQSUyMyUyMHRhcmdldCUyMGlzJTIwJTIybmljZSUyMHB1cHBldCUyMiUwQXRhcmdldF9zdGFydF9pbmRleCUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxNCU1RCklMEF0YXJnZXRfZW5kX2luZGV4JTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QjE1JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3M=",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=a("p"),v=n("Example:"),p=h(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);v=s(c,"Example:"),c.forEach(t),p=m(i),w(u.$$.fragment,i)},m(i,c){_(i,d,c),e(d,v),_(i,p,c),k(u,i,c),y=!0},p:De,i(i){y||(M(u.$$.fragment,i),y=!0)},o(i){C(u.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(p),$(u,i)}}}function hv(j){let d,v,p,u,y,i,c,J,Te,_e,R,pe,K,B,we,G,he,Ie,Q,oe,le,A,ie,ke,X,Me,ve,q,Ce,de,ne,U,N,me,D,be,ue,S,$e,ye,z,Be,P,se,Ee,V,Fe,je,Z,Je,Y,ae,O,I,ce,W,ge,Ue;return{c(){d=a("p"),v=n("TensorFlow models and layers in "),p=a("code"),u=n("transformers"),y=n(" accept two formats as input:"),i=h(),c=a("ul"),J=a("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),_e=h(),R=a("li"),pe=n("having all inputs as a list, tuple or dict in the first positional argument."),K=h(),B=a("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 `),G=a("code"),he=n("model.fit()"),Ie=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Q=a("code"),oe=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),A=a("code"),ie=n("fit()"),ke=n(" and "),X=a("code"),Me=n("predict()"),ve=n(`, such as when creating your own layers or models with
the Keras `),q=a("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(),U=a("ul"),N=a("li"),me=n("a single Tensor with "),D=a("code"),be=n("input_ids"),ue=n(" only and nothing else: "),S=a("code"),$e=n("model(input_ids)"),ye=h(),z=a("li"),Be=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a("code"),se=n("model([input_ids, attention_mask])"),Ee=n(" or "),V=a("code"),Fe=n("model([input_ids, attention_mask, token_type_ids])"),je=h(),Z=a("li"),Je=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a("code"),ae=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),O=h(),I=a("p"),ce=n(`Note that when creating models and layers with
`),W=a("a"),ge=n("subclassing"),Ue=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var E=l(d);v=s(E,"TensorFlow models and layers in "),p=r(E,"CODE",{});var Re=l(p);u=s(Re,"transformers"),Re.forEach(t),y=s(E," accept two formats as input:"),E.forEach(t),i=m(g),c=r(g,"UL",{});var ee=l(c);J=r(ee,"LI",{});var Ge=l(J);Te=s(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),_e=m(ee),R=r(ee,"LI",{});var Ae=l(R);pe=s(Ae,"having all inputs as a list, tuple or dict in the first positional argument."),Ae.forEach(t),ee.forEach(t),K=m(g),B=r(g,"P",{});var F=l(B);we=s(F,`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 `),G=r(F,"CODE",{});var Ne=l(G);he=s(Ne,"model.fit()"),Ne.forEach(t),Ie=s(F,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Q=r(F,"CODE",{});var Xe=l(Q);oe=s(Xe,"model.fit()"),Xe.forEach(t),le=s(F,` supports! If, however, you want to use the second
format outside of Keras methods like `),A=r(F,"CODE",{});var Se=l(A);ie=s(Se,"fit()"),Se.forEach(t),ke=s(F," and "),X=r(F,"CODE",{});var xe=l(X);Me=s(xe,"predict()"),xe.forEach(t),ve=s(F,`, such as when creating your own layers or models with
the Keras `),q=r(F,"CODE",{});var We=l(q);Ce=s(We,"Functional"),We.forEach(t),de=s(F,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),F.forEach(t),ne=m(g),U=r(g,"UL",{});var x=l(U);N=r(x,"LI",{});var L=l(N);me=s(L,"a single Tensor with "),D=r(L,"CODE",{});var qe=l(D);be=s(qe,"input_ids"),qe.forEach(t),ue=s(L," only and nothing else: "),S=r(L,"CODE",{});var Ze=l(S);$e=s(Ze,"model(input_ids)"),Ze.forEach(t),L.forEach(t),ye=m(x),z=r(x,"LI",{});var H=l(z);Be=s(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=r(H,"CODE",{});var Qe=l(P);se=s(Qe,"model([input_ids, attention_mask])"),Qe.forEach(t),Ee=s(H," or "),V=r(H,"CODE",{});var Ve=l(V);Fe=s(Ve,"model([input_ids, attention_mask, token_type_ids])"),Ve.forEach(t),H.forEach(t),je=m(x),Z=r(x,"LI",{});var fe=l(Z);Je=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=r(fe,"CODE",{});var Pe=l(Y);ae=s(Pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Pe.forEach(t),fe.forEach(t),x.forEach(t),O=m(g),I=r(g,"P",{});var te=l(I);ce=s(te,`Note that when creating models and layers with
`),W=r(te,"A",{href:!0,rel:!0});var ze=l(W);ge=s(ze,"subclassing"),ze.forEach(t),Ue=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(W,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(W,"rel","nofollow")},m(g,E){_(g,d,E),e(d,v),e(d,p),e(p,u),e(d,y),_(g,i,E),_(g,c,E),e(c,J),e(J,Te),e(c,_e),e(c,R),e(R,pe),_(g,K,E),_(g,B,E),e(B,we),e(B,G),e(G,he),e(B,Ie),e(B,Q),e(Q,oe),e(B,le),e(B,A),e(A,ie),e(B,ke),e(B,X),e(X,Me),e(B,ve),e(B,q),e(q,Ce),e(B,de),_(g,ne,E),_(g,U,E),e(U,N),e(N,me),e(N,D),e(D,be),e(N,ue),e(N,S),e(S,$e),e(U,ye),e(U,z),e(z,Be),e(z,P),e(P,se),e(z,Ee),e(z,V),e(V,Fe),e(U,je),e(U,Z),e(Z,Je),e(Z,Y),e(Y,ae),_(g,O,E),_(g,I,E),e(I,ce),e(I,W),e(W,ge),e(I,Ue)},d(g){g&&t(d),g&&t(i),g&&t(c),g&&t(K),g&&t(B),g&&t(ne),g&&t(U),g&&t(O),g&&t(I)}}}function mv(j){let d,v,p,u,y;return{c(){d=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),u=n("Module"),y=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(i){d=r(i,"P",{});var c=l(d);v=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var J=l(p);u=s(J,"Module"),J.forEach(t),y=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(i,c){_(i,d,c),e(d,v),e(d,p),e(p,u),e(d,y)},d(i){i&&t(d)}}}function uv(j){let d,v,p,u,y;return u=new Le({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkNvbnZCZXJ0TW9kZWwlMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMllpdHVUZWNoJTJGY29udi1iZXJ0LWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkNvbnZCZXJ0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMllpdHVUZWNoJTJGY29udi1iZXJ0LWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbChpbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",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=a("p"),v=n("Example:"),p=h(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);v=s(c,"Example:"),c.forEach(t),p=m(i),w(u.$$.fragment,i)},m(i,c){_(i,d,c),e(d,v),_(i,p,c),k(u,i,c),y=!0},p:De,i(i){y||(M(u.$$.fragment,i),y=!0)},o(i){C(u.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(p),$(u,i)}}}function fv(j){let d,v,p,u,y,i,c,J,Te,_e,R,pe,K,B,we,G,he,Ie,Q,oe,le,A,ie,ke,X,Me,ve,q,Ce,de,ne,U,N,me,D,be,ue,S,$e,ye,z,Be,P,se,Ee,V,Fe,je,Z,Je,Y,ae,O,I,ce,W,ge,Ue;return{c(){d=a("p"),v=n("TensorFlow models and layers in "),p=a("code"),u=n("transformers"),y=n(" accept two formats as input:"),i=h(),c=a("ul"),J=a("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),_e=h(),R=a("li"),pe=n("having all inputs as a list, tuple or dict in the first positional argument."),K=h(),B=a("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 `),G=a("code"),he=n("model.fit()"),Ie=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Q=a("code"),oe=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),A=a("code"),ie=n("fit()"),ke=n(" and "),X=a("code"),Me=n("predict()"),ve=n(`, such as when creating your own layers or models with
the Keras `),q=a("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(),U=a("ul"),N=a("li"),me=n("a single Tensor with "),D=a("code"),be=n("input_ids"),ue=n(" only and nothing else: "),S=a("code"),$e=n("model(input_ids)"),ye=h(),z=a("li"),Be=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a("code"),se=n("model([input_ids, attention_mask])"),Ee=n(" or "),V=a("code"),Fe=n("model([input_ids, attention_mask, token_type_ids])"),je=h(),Z=a("li"),Je=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a("code"),ae=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),O=h(),I=a("p"),ce=n(`Note that when creating models and layers with
`),W=a("a"),ge=n("subclassing"),Ue=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var E=l(d);v=s(E,"TensorFlow models and layers in "),p=r(E,"CODE",{});var Re=l(p);u=s(Re,"transformers"),Re.forEach(t),y=s(E," accept two formats as input:"),E.forEach(t),i=m(g),c=r(g,"UL",{});var ee=l(c);J=r(ee,"LI",{});var Ge=l(J);Te=s(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),_e=m(ee),R=r(ee,"LI",{});var Ae=l(R);pe=s(Ae,"having all inputs as a list, tuple or dict in the first positional argument."),Ae.forEach(t),ee.forEach(t),K=m(g),B=r(g,"P",{});var F=l(B);we=s(F,`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 `),G=r(F,"CODE",{});var Ne=l(G);he=s(Ne,"model.fit()"),Ne.forEach(t),Ie=s(F,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Q=r(F,"CODE",{});var Xe=l(Q);oe=s(Xe,"model.fit()"),Xe.forEach(t),le=s(F,` supports! If, however, you want to use the second
format outside of Keras methods like `),A=r(F,"CODE",{});var Se=l(A);ie=s(Se,"fit()"),Se.forEach(t),ke=s(F," and "),X=r(F,"CODE",{});var xe=l(X);Me=s(xe,"predict()"),xe.forEach(t),ve=s(F,`, such as when creating your own layers or models with
the Keras `),q=r(F,"CODE",{});var We=l(q);Ce=s(We,"Functional"),We.forEach(t),de=s(F,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),F.forEach(t),ne=m(g),U=r(g,"UL",{});var x=l(U);N=r(x,"LI",{});var L=l(N);me=s(L,"a single Tensor with "),D=r(L,"CODE",{});var qe=l(D);be=s(qe,"input_ids"),qe.forEach(t),ue=s(L," only and nothing else: "),S=r(L,"CODE",{});var Ze=l(S);$e=s(Ze,"model(input_ids)"),Ze.forEach(t),L.forEach(t),ye=m(x),z=r(x,"LI",{});var H=l(z);Be=s(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=r(H,"CODE",{});var Qe=l(P);se=s(Qe,"model([input_ids, attention_mask])"),Qe.forEach(t),Ee=s(H," or "),V=r(H,"CODE",{});var Ve=l(V);Fe=s(Ve,"model([input_ids, attention_mask, token_type_ids])"),Ve.forEach(t),H.forEach(t),je=m(x),Z=r(x,"LI",{});var fe=l(Z);Je=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=r(fe,"CODE",{});var Pe=l(Y);ae=s(Pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Pe.forEach(t),fe.forEach(t),x.forEach(t),O=m(g),I=r(g,"P",{});var te=l(I);ce=s(te,`Note that when creating models and layers with
`),W=r(te,"A",{href:!0,rel:!0});var ze=l(W);ge=s(ze,"subclassing"),ze.forEach(t),Ue=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(W,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(W,"rel","nofollow")},m(g,E){_(g,d,E),e(d,v),e(d,p),e(p,u),e(d,y),_(g,i,E),_(g,c,E),e(c,J),e(J,Te),e(c,_e),e(c,R),e(R,pe),_(g,K,E),_(g,B,E),e(B,we),e(B,G),e(G,he),e(B,Ie),e(B,Q),e(Q,oe),e(B,le),e(B,A),e(A,ie),e(B,ke),e(B,X),e(X,Me),e(B,ve),e(B,q),e(q,Ce),e(B,de),_(g,ne,E),_(g,U,E),e(U,N),e(N,me),e(N,D),e(D,be),e(N,ue),e(N,S),e(S,$e),e(U,ye),e(U,z),e(z,Be),e(z,P),e(P,se),e(z,Ee),e(z,V),e(V,Fe),e(U,je),e(U,Z),e(Z,Je),e(Z,Y),e(Y,ae),_(g,O,E),_(g,I,E),e(I,ce),e(I,W),e(W,ge),e(I,Ue)},d(g){g&&t(d),g&&t(i),g&&t(c),g&&t(K),g&&t(B),g&&t(ne),g&&t(U),g&&t(O),g&&t(I)}}}function gv(j){let d,v,p,u,y;return{c(){d=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),u=n("Module"),y=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(i){d=r(i,"P",{});var c=l(d);v=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var J=l(p);u=s(J,"Module"),J.forEach(t),y=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(i,c){_(i,d,c),e(d,v),e(d,p),e(p,u),e(d,y)},d(i){i&&t(d)}}}function _v(j){let d,v,p,u,y;return u=new Le({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkNvbnZCZXJ0Rm9yTWFza2VkTE0lMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMllpdHVUZWNoJTJGY29udi1iZXJ0LWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkNvbnZCZXJ0Rm9yTWFza2VkTE0uZnJvbV9wcmV0cmFpbmVkKCUyMllpdHVUZWNoJTJGY29udi1iZXJ0LWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwJTVCTUFTSyU1RC4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjByZXRyaWV2ZSUyMGluZGV4JTIwb2YlMjAlNUJNQVNLJTVEJTBBbWFza190b2tlbl9pbmRleCUyMCUzRCUyMHRmLndoZXJlKChpbnB1dHMuaW5wdXRfaWRzJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQpJTVCMCU1RCklMEFzZWxlY3RlZF9sb2dpdHMlMjAlM0QlMjB0Zi5nYXRoZXJfbmQobG9naXRzJTVCMCU1RCUyQyUyMGluZGljZXMlM0RtYXNrX3Rva2VuX2luZGV4KSUwQSUwQXByZWRpY3RlZF90b2tlbl9pZCUyMCUzRCUyMHRmLm1hdGguYXJnbWF4KHNlbGVjdGVkX2xvZ2l0cyUyQyUyMGF4aXMlM0QtMSk=",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=a("p"),v=n("Example:"),p=h(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);v=s(c,"Example:"),c.forEach(t),p=m(i),w(u.$$.fragment,i)},m(i,c){_(i,d,c),e(d,v),_(i,p,c),k(u,i,c),y=!0},p:De,i(i){y||(M(u.$$.fragment,i),y=!0)},o(i){C(u.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(p),$(u,i)}}}function vv(j){let d,v;return d=new Le({props:{code:"bGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwUGFyaXMuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMjMlMjBtYXNrJTIwbGFiZWxzJTIwb2YlMjBub24tJTVCTUFTSyU1RCUyMHRva2VucyUwQWxhYmVscyUyMCUzRCUyMHRmLndoZXJlKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCUyQyUyMGxhYmVscyUyQyUyMC0xMDApJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(<span class="hljs-string">&quot;The capital of France is Paris.&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># mask labels of non-[MASK] tokens</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.where(inputs.input_ids == tokenizer.mask_token_id, labels, -<span class="hljs-number">100</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)`}}),{c(){T(d.$$.fragment)},l(p){w(d.$$.fragment,p)},m(p,u){k(d,p,u),v=!0},p:De,i(p){v||(M(d.$$.fragment,p),v=!0)},o(p){C(d.$$.fragment,p),v=!1},d(p){$(d,p)}}}function bv(j){let d,v,p,u,y,i,c,J,Te,_e,R,pe,K,B,we,G,he,Ie,Q,oe,le,A,ie,ke,X,Me,ve,q,Ce,de,ne,U,N,me,D,be,ue,S,$e,ye,z,Be,P,se,Ee,V,Fe,je,Z,Je,Y,ae,O,I,ce,W,ge,Ue;return{c(){d=a("p"),v=n("TensorFlow models and layers in "),p=a("code"),u=n("transformers"),y=n(" accept two formats as input:"),i=h(),c=a("ul"),J=a("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),_e=h(),R=a("li"),pe=n("having all inputs as a list, tuple or dict in the first positional argument."),K=h(),B=a("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 `),G=a("code"),he=n("model.fit()"),Ie=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Q=a("code"),oe=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),A=a("code"),ie=n("fit()"),ke=n(" and "),X=a("code"),Me=n("predict()"),ve=n(`, such as when creating your own layers or models with
the Keras `),q=a("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(),U=a("ul"),N=a("li"),me=n("a single Tensor with "),D=a("code"),be=n("input_ids"),ue=n(" only and nothing else: "),S=a("code"),$e=n("model(input_ids)"),ye=h(),z=a("li"),Be=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a("code"),se=n("model([input_ids, attention_mask])"),Ee=n(" or "),V=a("code"),Fe=n("model([input_ids, attention_mask, token_type_ids])"),je=h(),Z=a("li"),Je=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a("code"),ae=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),O=h(),I=a("p"),ce=n(`Note that when creating models and layers with
`),W=a("a"),ge=n("subclassing"),Ue=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var E=l(d);v=s(E,"TensorFlow models and layers in "),p=r(E,"CODE",{});var Re=l(p);u=s(Re,"transformers"),Re.forEach(t),y=s(E," accept two formats as input:"),E.forEach(t),i=m(g),c=r(g,"UL",{});var ee=l(c);J=r(ee,"LI",{});var Ge=l(J);Te=s(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),_e=m(ee),R=r(ee,"LI",{});var Ae=l(R);pe=s(Ae,"having all inputs as a list, tuple or dict in the first positional argument."),Ae.forEach(t),ee.forEach(t),K=m(g),B=r(g,"P",{});var F=l(B);we=s(F,`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 `),G=r(F,"CODE",{});var Ne=l(G);he=s(Ne,"model.fit()"),Ne.forEach(t),Ie=s(F,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Q=r(F,"CODE",{});var Xe=l(Q);oe=s(Xe,"model.fit()"),Xe.forEach(t),le=s(F,` supports! If, however, you want to use the second
format outside of Keras methods like `),A=r(F,"CODE",{});var Se=l(A);ie=s(Se,"fit()"),Se.forEach(t),ke=s(F," and "),X=r(F,"CODE",{});var xe=l(X);Me=s(xe,"predict()"),xe.forEach(t),ve=s(F,`, such as when creating your own layers or models with
the Keras `),q=r(F,"CODE",{});var We=l(q);Ce=s(We,"Functional"),We.forEach(t),de=s(F,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),F.forEach(t),ne=m(g),U=r(g,"UL",{});var x=l(U);N=r(x,"LI",{});var L=l(N);me=s(L,"a single Tensor with "),D=r(L,"CODE",{});var qe=l(D);be=s(qe,"input_ids"),qe.forEach(t),ue=s(L," only and nothing else: "),S=r(L,"CODE",{});var Ze=l(S);$e=s(Ze,"model(input_ids)"),Ze.forEach(t),L.forEach(t),ye=m(x),z=r(x,"LI",{});var H=l(z);Be=s(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=r(H,"CODE",{});var Qe=l(P);se=s(Qe,"model([input_ids, attention_mask])"),Qe.forEach(t),Ee=s(H," or "),V=r(H,"CODE",{});var Ve=l(V);Fe=s(Ve,"model([input_ids, attention_mask, token_type_ids])"),Ve.forEach(t),H.forEach(t),je=m(x),Z=r(x,"LI",{});var fe=l(Z);Je=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=r(fe,"CODE",{});var Pe=l(Y);ae=s(Pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Pe.forEach(t),fe.forEach(t),x.forEach(t),O=m(g),I=r(g,"P",{});var te=l(I);ce=s(te,`Note that when creating models and layers with
`),W=r(te,"A",{href:!0,rel:!0});var ze=l(W);ge=s(ze,"subclassing"),ze.forEach(t),Ue=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(W,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(W,"rel","nofollow")},m(g,E){_(g,d,E),e(d,v),e(d,p),e(p,u),e(d,y),_(g,i,E),_(g,c,E),e(c,J),e(J,Te),e(c,_e),e(c,R),e(R,pe),_(g,K,E),_(g,B,E),e(B,we),e(B,G),e(G,he),e(B,Ie),e(B,Q),e(Q,oe),e(B,le),e(B,A),e(A,ie),e(B,ke),e(B,X),e(X,Me),e(B,ve),e(B,q),e(q,Ce),e(B,de),_(g,ne,E),_(g,U,E),e(U,N),e(N,me),e(N,D),e(D,be),e(N,ue),e(N,S),e(S,$e),e(U,ye),e(U,z),e(z,Be),e(z,P),e(P,se),e(z,Ee),e(z,V),e(V,Fe),e(U,je),e(U,Z),e(Z,Je),e(Z,Y),e(Y,ae),_(g,O,E),_(g,I,E),e(I,ce),e(I,W),e(W,ge),e(I,Ue)},d(g){g&&t(d),g&&t(i),g&&t(c),g&&t(K),g&&t(B),g&&t(ne),g&&t(U),g&&t(O),g&&t(I)}}}function yv(j){let d,v,p,u,y;return{c(){d=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),u=n("Module"),y=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(i){d=r(i,"P",{});var c=l(d);v=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var J=l(p);u=s(J,"Module"),J.forEach(t),y=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(i,c){_(i,d,c),e(d,v),e(d,p),e(p,u),e(d,y)},d(i){i&&t(d)}}}function Tv(j){let d,v,p,u,y;return u=new Le({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkNvbnZCZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyWWl0dVRlY2glMkZjb252LWJlcnQtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGQ29udkJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJZaXR1VGVjaCUyRmNvbnYtYmVydC1iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEElMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwaW50KHRmLm1hdGguYXJnbWF4KGxvZ2l0cyUyQyUyMGF4aXMlM0QtMSklNUIwJTVEKQ==",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=a("p"),v=n("Example:"),p=h(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);v=s(c,"Example:"),c.forEach(t),p=m(i),w(u.$$.fragment,i)},m(i,c){_(i,d,c),e(d,v),_(i,p,c),k(u,i,c),y=!0},p:De,i(i){y||(M(u.$$.fragment,i),y=!0)},o(i){C(u.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(p),$(u,i)}}}function wv(j){let d,v;return d=new Le({props:{code:"JTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwVEZDb252QmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMllpdHVUZWNoJTJGY29udi1iZXJ0LWJhc2UlMjIlMkMlMjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyklMEElMEFsYWJlbHMlMjAlM0QlMjB0Zi5jb25zdGFudCgxKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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,u){k(d,p,u),v=!0},p:De,i(p){v||(M(d.$$.fragment,p),v=!0)},o(p){C(d.$$.fragment,p),v=!1},d(p){$(d,p)}}}function kv(j){let d,v,p,u,y,i,c,J,Te,_e,R,pe,K,B,we,G,he,Ie,Q,oe,le,A,ie,ke,X,Me,ve,q,Ce,de,ne,U,N,me,D,be,ue,S,$e,ye,z,Be,P,se,Ee,V,Fe,je,Z,Je,Y,ae,O,I,ce,W,ge,Ue;return{c(){d=a("p"),v=n("TensorFlow models and layers in "),p=a("code"),u=n("transformers"),y=n(" accept two formats as input:"),i=h(),c=a("ul"),J=a("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),_e=h(),R=a("li"),pe=n("having all inputs as a list, tuple or dict in the first positional argument."),K=h(),B=a("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 `),G=a("code"),he=n("model.fit()"),Ie=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Q=a("code"),oe=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),A=a("code"),ie=n("fit()"),ke=n(" and "),X=a("code"),Me=n("predict()"),ve=n(`, such as when creating your own layers or models with
the Keras `),q=a("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(),U=a("ul"),N=a("li"),me=n("a single Tensor with "),D=a("code"),be=n("input_ids"),ue=n(" only and nothing else: "),S=a("code"),$e=n("model(input_ids)"),ye=h(),z=a("li"),Be=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a("code"),se=n("model([input_ids, attention_mask])"),Ee=n(" or "),V=a("code"),Fe=n("model([input_ids, attention_mask, token_type_ids])"),je=h(),Z=a("li"),Je=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a("code"),ae=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),O=h(),I=a("p"),ce=n(`Note that when creating models and layers with
`),W=a("a"),ge=n("subclassing"),Ue=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var E=l(d);v=s(E,"TensorFlow models and layers in "),p=r(E,"CODE",{});var Re=l(p);u=s(Re,"transformers"),Re.forEach(t),y=s(E," accept two formats as input:"),E.forEach(t),i=m(g),c=r(g,"UL",{});var ee=l(c);J=r(ee,"LI",{});var Ge=l(J);Te=s(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),_e=m(ee),R=r(ee,"LI",{});var Ae=l(R);pe=s(Ae,"having all inputs as a list, tuple or dict in the first positional argument."),Ae.forEach(t),ee.forEach(t),K=m(g),B=r(g,"P",{});var F=l(B);we=s(F,`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 `),G=r(F,"CODE",{});var Ne=l(G);he=s(Ne,"model.fit()"),Ne.forEach(t),Ie=s(F,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Q=r(F,"CODE",{});var Xe=l(Q);oe=s(Xe,"model.fit()"),Xe.forEach(t),le=s(F,` supports! If, however, you want to use the second
format outside of Keras methods like `),A=r(F,"CODE",{});var Se=l(A);ie=s(Se,"fit()"),Se.forEach(t),ke=s(F," and "),X=r(F,"CODE",{});var xe=l(X);Me=s(xe,"predict()"),xe.forEach(t),ve=s(F,`, such as when creating your own layers or models with
the Keras `),q=r(F,"CODE",{});var We=l(q);Ce=s(We,"Functional"),We.forEach(t),de=s(F,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),F.forEach(t),ne=m(g),U=r(g,"UL",{});var x=l(U);N=r(x,"LI",{});var L=l(N);me=s(L,"a single Tensor with "),D=r(L,"CODE",{});var qe=l(D);be=s(qe,"input_ids"),qe.forEach(t),ue=s(L," only and nothing else: "),S=r(L,"CODE",{});var Ze=l(S);$e=s(Ze,"model(input_ids)"),Ze.forEach(t),L.forEach(t),ye=m(x),z=r(x,"LI",{});var H=l(z);Be=s(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=r(H,"CODE",{});var Qe=l(P);se=s(Qe,"model([input_ids, attention_mask])"),Qe.forEach(t),Ee=s(H," or "),V=r(H,"CODE",{});var Ve=l(V);Fe=s(Ve,"model([input_ids, attention_mask, token_type_ids])"),Ve.forEach(t),H.forEach(t),je=m(x),Z=r(x,"LI",{});var fe=l(Z);Je=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=r(fe,"CODE",{});var Pe=l(Y);ae=s(Pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Pe.forEach(t),fe.forEach(t),x.forEach(t),O=m(g),I=r(g,"P",{});var te=l(I);ce=s(te,`Note that when creating models and layers with
`),W=r(te,"A",{href:!0,rel:!0});var ze=l(W);ge=s(ze,"subclassing"),ze.forEach(t),Ue=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(W,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(W,"rel","nofollow")},m(g,E){_(g,d,E),e(d,v),e(d,p),e(p,u),e(d,y),_(g,i,E),_(g,c,E),e(c,J),e(J,Te),e(c,_e),e(c,R),e(R,pe),_(g,K,E),_(g,B,E),e(B,we),e(B,G),e(G,he),e(B,Ie),e(B,Q),e(Q,oe),e(B,le),e(B,A),e(A,ie),e(B,ke),e(B,X),e(X,Me),e(B,ve),e(B,q),e(q,Ce),e(B,de),_(g,ne,E),_(g,U,E),e(U,N),e(N,me),e(N,D),e(D,be),e(N,ue),e(N,S),e(S,$e),e(U,ye),e(U,z),e(z,Be),e(z,P),e(P,se),e(z,Ee),e(z,V),e(V,Fe),e(U,je),e(U,Z),e(Z,Je),e(Z,Y),e(Y,ae),_(g,O,E),_(g,I,E),e(I,ce),e(I,W),e(W,ge),e(I,Ue)},d(g){g&&t(d),g&&t(i),g&&t(c),g&&t(K),g&&t(B),g&&t(ne),g&&t(U),g&&t(O),g&&t(I)}}}function Mv(j){let d,v,p,u,y;return{c(){d=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),u=n("Module"),y=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(i){d=r(i,"P",{});var c=l(d);v=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var J=l(p);u=s(J,"Module"),J.forEach(t),y=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(i,c){_(i,d,c),e(d,v),e(d,p),e(p,u),e(d,y)},d(i){i&&t(d)}}}function Cv(j){let d,v,p,u,y;return u=new Le({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkNvbnZCZXJ0Rm9yTXVsdGlwbGVDaG9pY2UlMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMllpdHVUZWNoJTJGY29udi1iZXJ0LWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkNvbnZCZXJ0Rm9yTXVsdGlwbGVDaG9pY2UuZnJvbV9wcmV0cmFpbmVkKCUyMllpdHVUZWNoJTJGY29udi1iZXJ0LWJhc2UlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIySW4lMjBJdGFseSUyQyUyMHBpenphJTIwc2VydmVkJTIwaW4lMjBmb3JtYWwlMjBzZXR0aW5ncyUyQyUyMHN1Y2glMjBhcyUyMGF0JTIwYSUyMHJlc3RhdXJhbnQlMkMlMjBpcyUyMHByZXNlbnRlZCUyMHVuc2xpY2VkLiUyMiUwQWNob2ljZTAlMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aXRoJTIwYSUyMGZvcmslMjBhbmQlMjBhJTIwa25pZmUuJTIyJTBBY2hvaWNlMSUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdoaWxlJTIwaGVsZCUyMGluJTIwdGhlJTIwaGFuZC4lMjIlMEElMEFlbmNvZGluZyUyMCUzRCUyMHRva2VuaXplciglNUJwcm9tcHQlMkMlMjBwcm9tcHQlNUQlMkMlMjAlNUJjaG9pY2UwJTJDJTIwY2hvaWNlMSU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIlMkMlMjBwYWRkaW5nJTNEVHJ1ZSklMEFpbnB1dHMlMjAlM0QlMjAlN0JrJTNBJTIwdGYuZXhwYW5kX2RpbXModiUyQyUyMDApJTIwZm9yJTIwayUyQyUyMHYlMjBpbiUyMGVuY29kaW5nLml0ZW1zKCklN0QlMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUyMCUyMCUyMyUyMGJhdGNoJTIwc2l6ZSUyMGlzJTIwMSUwQSUwQSUyMyUyMHRoZSUyMGxpbmVhciUyMGNsYXNzaWZpZXIlMjBzdGlsbCUyMG5lZWRzJTIwdG8lMjBiZSUyMHRyYWluZWQlMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",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=a("p"),v=n("Example:"),p=h(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);v=s(c,"Example:"),c.forEach(t),p=m(i),w(u.$$.fragment,i)},m(i,c){_(i,d,c),e(d,v),_(i,p,c),k(u,i,c),y=!0},p:De,i(i){y||(M(u.$$.fragment,i),y=!0)},o(i){C(u.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(p),$(u,i)}}}function $v(j){let d,v,p,u,y,i,c,J,Te,_e,R,pe,K,B,we,G,he,Ie,Q,oe,le,A,ie,ke,X,Me,ve,q,Ce,de,ne,U,N,me,D,be,ue,S,$e,ye,z,Be,P,se,Ee,V,Fe,je,Z,Je,Y,ae,O,I,ce,W,ge,Ue;return{c(){d=a("p"),v=n("TensorFlow models and layers in "),p=a("code"),u=n("transformers"),y=n(" accept two formats as input:"),i=h(),c=a("ul"),J=a("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),_e=h(),R=a("li"),pe=n("having all inputs as a list, tuple or dict in the first positional argument."),K=h(),B=a("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 `),G=a("code"),he=n("model.fit()"),Ie=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Q=a("code"),oe=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),A=a("code"),ie=n("fit()"),ke=n(" and "),X=a("code"),Me=n("predict()"),ve=n(`, such as when creating your own layers or models with
the Keras `),q=a("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(),U=a("ul"),N=a("li"),me=n("a single Tensor with "),D=a("code"),be=n("input_ids"),ue=n(" only and nothing else: "),S=a("code"),$e=n("model(input_ids)"),ye=h(),z=a("li"),Be=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a("code"),se=n("model([input_ids, attention_mask])"),Ee=n(" or "),V=a("code"),Fe=n("model([input_ids, attention_mask, token_type_ids])"),je=h(),Z=a("li"),Je=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a("code"),ae=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),O=h(),I=a("p"),ce=n(`Note that when creating models and layers with
`),W=a("a"),ge=n("subclassing"),Ue=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var E=l(d);v=s(E,"TensorFlow models and layers in "),p=r(E,"CODE",{});var Re=l(p);u=s(Re,"transformers"),Re.forEach(t),y=s(E," accept two formats as input:"),E.forEach(t),i=m(g),c=r(g,"UL",{});var ee=l(c);J=r(ee,"LI",{});var Ge=l(J);Te=s(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),_e=m(ee),R=r(ee,"LI",{});var Ae=l(R);pe=s(Ae,"having all inputs as a list, tuple or dict in the first positional argument."),Ae.forEach(t),ee.forEach(t),K=m(g),B=r(g,"P",{});var F=l(B);we=s(F,`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 `),G=r(F,"CODE",{});var Ne=l(G);he=s(Ne,"model.fit()"),Ne.forEach(t),Ie=s(F,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Q=r(F,"CODE",{});var Xe=l(Q);oe=s(Xe,"model.fit()"),Xe.forEach(t),le=s(F,` supports! If, however, you want to use the second
format outside of Keras methods like `),A=r(F,"CODE",{});var Se=l(A);ie=s(Se,"fit()"),Se.forEach(t),ke=s(F," and "),X=r(F,"CODE",{});var xe=l(X);Me=s(xe,"predict()"),xe.forEach(t),ve=s(F,`, such as when creating your own layers or models with
the Keras `),q=r(F,"CODE",{});var We=l(q);Ce=s(We,"Functional"),We.forEach(t),de=s(F,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),F.forEach(t),ne=m(g),U=r(g,"UL",{});var x=l(U);N=r(x,"LI",{});var L=l(N);me=s(L,"a single Tensor with "),D=r(L,"CODE",{});var qe=l(D);be=s(qe,"input_ids"),qe.forEach(t),ue=s(L," only and nothing else: "),S=r(L,"CODE",{});var Ze=l(S);$e=s(Ze,"model(input_ids)"),Ze.forEach(t),L.forEach(t),ye=m(x),z=r(x,"LI",{});var H=l(z);Be=s(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=r(H,"CODE",{});var Qe=l(P);se=s(Qe,"model([input_ids, attention_mask])"),Qe.forEach(t),Ee=s(H," or "),V=r(H,"CODE",{});var Ve=l(V);Fe=s(Ve,"model([input_ids, attention_mask, token_type_ids])"),Ve.forEach(t),H.forEach(t),je=m(x),Z=r(x,"LI",{});var fe=l(Z);Je=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=r(fe,"CODE",{});var Pe=l(Y);ae=s(Pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Pe.forEach(t),fe.forEach(t),x.forEach(t),O=m(g),I=r(g,"P",{});var te=l(I);ce=s(te,`Note that when creating models and layers with
`),W=r(te,"A",{href:!0,rel:!0});var ze=l(W);ge=s(ze,"subclassing"),ze.forEach(t),Ue=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(W,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(W,"rel","nofollow")},m(g,E){_(g,d,E),e(d,v),e(d,p),e(p,u),e(d,y),_(g,i,E),_(g,c,E),e(c,J),e(J,Te),e(c,_e),e(c,R),e(R,pe),_(g,K,E),_(g,B,E),e(B,we),e(B,G),e(G,he),e(B,Ie),e(B,Q),e(Q,oe),e(B,le),e(B,A),e(A,ie),e(B,ke),e(B,X),e(X,Me),e(B,ve),e(B,q),e(q,Ce),e(B,de),_(g,ne,E),_(g,U,E),e(U,N),e(N,me),e(N,D),e(D,be),e(N,ue),e(N,S),e(S,$e),e(U,ye),e(U,z),e(z,Be),e(z,P),e(P,se),e(z,Ee),e(z,V),e(V,Fe),e(U,je),e(U,Z),e(Z,Je),e(Z,Y),e(Y,ae),_(g,O,E),_(g,I,E),e(I,ce),e(I,W),e(W,ge),e(I,Ue)},d(g){g&&t(d),g&&t(i),g&&t(c),g&&t(K),g&&t(B),g&&t(ne),g&&t(U),g&&t(O),g&&t(I)}}}function Bv(j){let d,v,p,u,y;return{c(){d=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),u=n("Module"),y=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(i){d=r(i,"P",{});var c=l(d);v=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var J=l(p);u=s(J,"Module"),J.forEach(t),y=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(i,c){_(i,d,c),e(d,v),e(d,p),e(p,u),e(d,y)},d(i){i&&t(d)}}}function Ev(j){let d,v,p,u,y;return u=new Le({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkNvbnZCZXJ0Rm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyWWl0dVRlY2glMkZjb252LWJlcnQtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGQ29udkJlcnRGb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJZaXR1VGVjaCUyRmNvbnYtYmVydC1iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjAlMjJIdWdnaW5nRmFjZSUyMGlzJTIwYSUyMGNvbXBhbnklMjBiYXNlZCUyMGluJTIwUGFyaXMlMjBhbmQlMjBOZXclMjBZb3JrJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyJTBBKSUwQSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEFwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTIwJTNEJTIwdGYubWF0aC5hcmdtYXgobG9naXRzJTJDJTIwYXhpcyUzRC0xKSUwQSUwQSUyMyUyME5vdGUlMjB0aGF0JTIwdG9rZW5zJTIwYXJlJTIwY2xhc3NpZmllZCUyMHJhdGhlciUyMHRoZW4lMjBpbnB1dCUyMHdvcmRzJTIwd2hpY2glMjBtZWFucyUyMHRoYXQlMEElMjMlMjB0aGVyZSUyMG1pZ2h0JTIwYmUlMjBtb3JlJTIwcHJlZGljdGVkJTIwdG9rZW4lMjBjbGFzc2VzJTIwdGhhbiUyMHdvcmRzLiUwQSUyMyUyME11bHRpcGxlJTIwdG9rZW4lMjBjbGFzc2VzJTIwbWlnaHQlMjBhY2NvdW50JTIwZm9yJTIwdGhlJTIwc2FtZSUyMHdvcmQlMEFwcmVkaWN0ZWRfdG9rZW5zX2NsYXNzZXMlMjAlM0QlMjAlNUJtb2RlbC5jb25maWcuaWQybGFiZWwlNUJ0JTVEJTIwZm9yJTIwdCUyMGluJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyU1QjAlNUQubnVtcHkoKS50b2xpc3QoKSU1RA==",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=a("p"),v=n("Example:"),p=h(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);v=s(c,"Example:"),c.forEach(t),p=m(i),w(u.$$.fragment,i)},m(i,c){_(i,d,c),e(d,v),_(i,p,c),k(u,i,c),y=!0},p:De,i(i){y||(M(u.$$.fragment,i),y=!0)},o(i){C(u.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(p),$(u,i)}}}function Fv(j){let d,v;return d=new Le({props:{code:"bGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3NzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(model(**inputs, labels=labels).loss)`}}),{c(){T(d.$$.fragment)},l(p){w(d.$$.fragment,p)},m(p,u){k(d,p,u),v=!0},p:De,i(p){v||(M(d.$$.fragment,p),v=!0)},o(p){C(d.$$.fragment,p),v=!1},d(p){$(d,p)}}}function jv(j){let d,v,p,u,y,i,c,J,Te,_e,R,pe,K,B,we,G,he,Ie,Q,oe,le,A,ie,ke,X,Me,ve,q,Ce,de,ne,U,N,me,D,be,ue,S,$e,ye,z,Be,P,se,Ee,V,Fe,je,Z,Je,Y,ae,O,I,ce,W,ge,Ue;return{c(){d=a("p"),v=n("TensorFlow models and layers in "),p=a("code"),u=n("transformers"),y=n(" accept two formats as input:"),i=h(),c=a("ul"),J=a("li"),Te=n("having all inputs as keyword arguments (like PyTorch models), or"),_e=h(),R=a("li"),pe=n("having all inputs as a list, tuple or dict in the first positional argument."),K=h(),B=a("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 `),G=a("code"),he=n("model.fit()"),Ie=n(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Q=a("code"),oe=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),A=a("code"),ie=n("fit()"),ke=n(" and "),X=a("code"),Me=n("predict()"),ve=n(`, such as when creating your own layers or models with
the Keras `),q=a("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(),U=a("ul"),N=a("li"),me=n("a single Tensor with "),D=a("code"),be=n("input_ids"),ue=n(" only and nothing else: "),S=a("code"),$e=n("model(input_ids)"),ye=h(),z=a("li"),Be=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a("code"),se=n("model([input_ids, attention_mask])"),Ee=n(" or "),V=a("code"),Fe=n("model([input_ids, attention_mask, token_type_ids])"),je=h(),Z=a("li"),Je=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a("code"),ae=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),O=h(),I=a("p"),ce=n(`Note that when creating models and layers with
`),W=a("a"),ge=n("subclassing"),Ue=n(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var E=l(d);v=s(E,"TensorFlow models and layers in "),p=r(E,"CODE",{});var Re=l(p);u=s(Re,"transformers"),Re.forEach(t),y=s(E," accept two formats as input:"),E.forEach(t),i=m(g),c=r(g,"UL",{});var ee=l(c);J=r(ee,"LI",{});var Ge=l(J);Te=s(Ge,"having all inputs as keyword arguments (like PyTorch models), or"),Ge.forEach(t),_e=m(ee),R=r(ee,"LI",{});var Ae=l(R);pe=s(Ae,"having all inputs as a list, tuple or dict in the first positional argument."),Ae.forEach(t),ee.forEach(t),K=m(g),B=r(g,"P",{});var F=l(B);we=s(F,`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 `),G=r(F,"CODE",{});var Ne=l(G);he=s(Ne,"model.fit()"),Ne.forEach(t),Ie=s(F,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),Q=r(F,"CODE",{});var Xe=l(Q);oe=s(Xe,"model.fit()"),Xe.forEach(t),le=s(F,` supports! If, however, you want to use the second
format outside of Keras methods like `),A=r(F,"CODE",{});var Se=l(A);ie=s(Se,"fit()"),Se.forEach(t),ke=s(F," and "),X=r(F,"CODE",{});var xe=l(X);Me=s(xe,"predict()"),xe.forEach(t),ve=s(F,`, such as when creating your own layers or models with
the Keras `),q=r(F,"CODE",{});var We=l(q);Ce=s(We,"Functional"),We.forEach(t),de=s(F,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),F.forEach(t),ne=m(g),U=r(g,"UL",{});var x=l(U);N=r(x,"LI",{});var L=l(N);me=s(L,"a single Tensor with "),D=r(L,"CODE",{});var qe=l(D);be=s(qe,"input_ids"),qe.forEach(t),ue=s(L," only and nothing else: "),S=r(L,"CODE",{});var Ze=l(S);$e=s(Ze,"model(input_ids)"),Ze.forEach(t),L.forEach(t),ye=m(x),z=r(x,"LI",{});var H=l(z);Be=s(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=r(H,"CODE",{});var Qe=l(P);se=s(Qe,"model([input_ids, attention_mask])"),Qe.forEach(t),Ee=s(H," or "),V=r(H,"CODE",{});var Ve=l(V);Fe=s(Ve,"model([input_ids, attention_mask, token_type_ids])"),Ve.forEach(t),H.forEach(t),je=m(x),Z=r(x,"LI",{});var fe=l(Z);Je=s(fe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=r(fe,"CODE",{});var Pe=l(Y);ae=s(Pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Pe.forEach(t),fe.forEach(t),x.forEach(t),O=m(g),I=r(g,"P",{});var te=l(I);ce=s(te,`Note that when creating models and layers with
`),W=r(te,"A",{href:!0,rel:!0});var ze=l(W);ge=s(ze,"subclassing"),ze.forEach(t),Ue=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(W,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(W,"rel","nofollow")},m(g,E){_(g,d,E),e(d,v),e(d,p),e(p,u),e(d,y),_(g,i,E),_(g,c,E),e(c,J),e(J,Te),e(c,_e),e(c,R),e(R,pe),_(g,K,E),_(g,B,E),e(B,we),e(B,G),e(G,he),e(B,Ie),e(B,Q),e(Q,oe),e(B,le),e(B,A),e(A,ie),e(B,ke),e(B,X),e(X,Me),e(B,ve),e(B,q),e(q,Ce),e(B,de),_(g,ne,E),_(g,U,E),e(U,N),e(N,me),e(N,D),e(D,be),e(N,ue),e(N,S),e(S,$e),e(U,ye),e(U,z),e(z,Be),e(z,P),e(P,se),e(z,Ee),e(z,V),e(V,Fe),e(U,je),e(U,Z),e(Z,Je),e(Z,Y),e(Y,ae),_(g,O,E),_(g,I,E),e(I,ce),e(I,W),e(W,ge),e(I,Ue)},d(g){g&&t(d),g&&t(i),g&&t(c),g&&t(K),g&&t(B),g&&t(ne),g&&t(U),g&&t(O),g&&t(I)}}}function Jv(j){let d,v,p,u,y;return{c(){d=a("p"),v=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),p=a("code"),u=n("Module"),y=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(i){d=r(i,"P",{});var c=l(d);v=s(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),p=r(c,"CODE",{});var J=l(p);u=s(J,"Module"),J.forEach(t),y=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(i,c){_(i,d,c),e(d,v),e(d,p),e(p,u),e(d,y)},d(i){i&&t(d)}}}function Uv(j){let d,v,p,u,y;return u=new Le({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkNvbnZCZXJ0Rm9yUXVlc3Rpb25BbnN3ZXJpbmclMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMllpdHVUZWNoJTJGY29udi1iZXJ0LWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkNvbnZCZXJ0Rm9yUXVlc3Rpb25BbnN3ZXJpbmcuZnJvbV9wcmV0cmFpbmVkKCUyMllpdHVUZWNoJTJGY29udi1iZXJ0LWJhc2UlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNEJTIwaW50KHRmLm1hdGguYXJnbWF4KG91dHB1dHMuc3RhcnRfbG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChvdXRwdXRzLmVuZF9sb2dpdHMlMkMlMjBheGlzJTNELTEpJTVCMCU1RCklMEElMEFwcmVkaWN0X2Fuc3dlcl90b2tlbnMlMjAlM0QlMjBpbnB1dHMuaW5wdXRfaWRzJTVCMCUyQyUyMGFuc3dlcl9zdGFydF9pbmRleCUyMCUzQSUyMGFuc3dlcl9lbmRfaW5kZXglMjAlMkIlMjAxJTVE",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=a("p"),v=n("Example:"),p=h(),T(u.$$.fragment)},l(i){d=r(i,"P",{});var c=l(d);v=s(c,"Example:"),c.forEach(t),p=m(i),w(u.$$.fragment,i)},m(i,c){_(i,d,c),e(d,v),_(i,p,c),k(u,i,c),y=!0},p:De,i(i){y||(M(u.$$.fragment,i),y=!0)},o(i){C(u.$$.fragment,i),y=!1},d(i){i&&t(d),i&&t(p),$(u,i)}}}function zv(j){let d,v;return d=new Le({props:{code:"JTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdGYuY29uc3RhbnQoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRmLmNvbnN0YW50KCU1QjE1JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG91dHB1dHMubG9zcyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = tf.constant([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = tf.constant([<span class="hljs-number">15</span>])

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