import{S as US,i as NS,s as PS,e as s,k as c,w as v,t as o,M as WS,c as a,d as t,m as p,a as r,x as k,h as n,b as h,N as IS,G as e,g,y as w,q as M,o as F,B as $,v as qS,L as ve}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ae}from"../../chunks/Tip-hf-doc-builder.js";import{D as N}from"../../chunks/Docstring-hf-doc-builder.js";import{C as ke}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as We}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Te}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as kM}from"../../chunks/PipelineTag-hf-doc-builder.js";function AS(x){let d,y,f,u,b;return u=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJlcnRDb25maWclMkMlMjBCZXJ0TW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQkVSVCUyMGJlcnQtYmFzZS11bmNhc2VkJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMEJlcnRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwYmVydC1iYXNlLXVuY2FzZWQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMEJlcnRNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BertConfig, BertModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BERT bert-base-uncased style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BertConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the bert-base-uncased style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertModel(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=s("p"),y=o("Examples:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Examples:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function ZS(x){let d,y,f,u,b;return u=new ke({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=s("p"),y=o("pair mask has the following format:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"pair mask has the following format:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function RS(x){let d,y,f,u,b;return u=new ke({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=s("p"),y=o("pair mask has the following format:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"pair mask has the following format:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function GS(x){let d,y,f,u,b;return u=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQmVydFRva2VuaXplciUwQSUwQXRmX3Rva2VuaXplciUyMCUzRCUyMFRGQmVydFRva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFBertTokenizer

tf_tokenizer = TFBertTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)`}}),{c(){d=s("p"),y=o("Examples:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Examples:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function VS(x){let d,y,f,u,b;return u=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkJlcnRUb2tlbml6ZXIlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEF0Zl90b2tlbml6ZXIlMjAlM0QlMjBURkJlcnRUb2tlbml6ZXIuZnJvbV90b2tlbml6ZXIodG9rZW5pemVyKQ==",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBertTokenizer

tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
tf_tokenizer = TFBertTokenizer.from_tokenizer(tokenizer)`}}),{c(){d=s("p"),y=o("Examples:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Examples:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function SS(x){let d,y,f,u,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(m,"CODE",{});var E=r(f);u=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,f),e(f,u),e(d,b)},d(l){l&&t(d)}}}function XS(x){let d,y,f,u,b;return u=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCZXJ0TW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJlcnQtYmFzZS11bmNhc2VkJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmVydE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BertModel
<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;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertModel.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=s("p"),y=o("Example:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function LS(x){let d,y,f,u,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(m,"CODE",{});var E=r(f);u=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,f),e(f,u),e(d,b)},d(l){l&&t(d)}}}function OS(x){let d,y,f,u,b;return u=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCZXJ0Rm9yUHJlVHJhaW5pbmclMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJlcnQtYmFzZS11bmNhc2VkJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmVydEZvclByZVRyYWluaW5nLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQXByZWRpY3Rpb25fbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5wcmVkaWN0aW9uX2xvZ2l0cyUwQXNlcV9yZWxhdGlvbnNoaXBfbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5zZXFfcmVsYXRpb25zaGlwX2xvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BertForPreTraining
<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;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertForPreTraining.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&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>prediction_logits = outputs.prediction_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>seq_relationship_logits = outputs.seq_relationship_logits`}}),{c(){d=s("p"),y=o("Example:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function DS(x){let d,y,f,u,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(m,"CODE",{});var E=r(f);u=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,f),e(f,u),e(d,b)},d(l){l&&t(d)}}}function QS(x){let d,y,f,u,b;return u=new ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEJlcnRMTUhlYWRNb2RlbCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJlcnQtYmFzZS11bmNhc2VkJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmVydExNSGVhZE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEaW5wdXRzJTVCJTIyaW5wdXRfaWRzJTIyJTVEKSUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3MlMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",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, BertLMHeadModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertLMHeadModel.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&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, labels=inputs[<span class="hljs-string">&quot;input_ids&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),y=o("Example:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function HS(x){let d,y,f,u,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(m,"CODE",{});var E=r(f);u=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,f),e(f,u),e(d,b)},d(l){l&&t(d)}}}function YS(x){let d,y,f,u,b;return u=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCZXJ0Rm9yTWFza2VkTE0lMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJlcnQtYmFzZS11bmNhc2VkJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmVydEZvck1hc2tlZExNLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjAlNUJNQVNLJTVELiUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjByZXRyaWV2ZSUyMGluZGV4JTIwb2YlMjAlNUJNQVNLJTVEJTBBbWFza190b2tlbl9pbmRleCUyMCUzRCUyMChpbnB1dHMuaW5wdXRfaWRzJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQpJTVCMCU1RC5ub256ZXJvKGFzX3R1cGxlJTNEVHJ1ZSklNUIwJTVEJTBBJTBBcHJlZGljdGVkX3Rva2VuX2lkJTIwJTNEJTIwbG9naXRzJTVCMCUyQyUyMG1hc2tfdG9rZW5faW5kZXglNUQuYXJnbWF4KGF4aXMlM0QtMSklMEF0b2tlbml6ZXIuZGVjb2RlKHByZWRpY3RlZF90b2tlbl9pZCklMEElMEFsYWJlbHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjBQYXJpcy4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSU1QiUyMmlucHV0X2lkcyUyMiU1RCUwQSUyMyUyMG1hc2slMjBsYWJlbHMlMjBvZiUyMG5vbi0lNUJNQVNLJTVEJTIwdG9rZW5zJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2gud2hlcmUoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkJTJDJTIwbGFiZWxzJTJDJTIwLTEwMCklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpJTBBcm91bmQob3V0cHV0cy5sb3NzLml0ZW0oKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BertForMaskedLM
<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;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&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>tokenizer.decode(predicted_token_id)
<span class="hljs-string">&#x27;paris&#x27;</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)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(outputs.loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.88</span>`}}),{c(){d=s("p"),y=o("Example:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function KS(x){let d,y,f,u,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(m,"CODE",{});var E=r(f);u=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,f),e(f,u),e(d,b)},d(l){l&&t(d)}}}function eX(x){let d,y,f,u,b;return u=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCZXJ0Rm9yTmV4dFNlbnRlbmNlUHJlZGljdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBCZXJ0Rm9yTmV4dFNlbnRlbmNlUHJlZGljdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIySW4lMjBJdGFseSUyQyUyMHBpenphJTIwc2VydmVkJTIwaW4lMjBmb3JtYWwlMjBzZXR0aW5ncyUyQyUyMHN1Y2glMjBhcyUyMGF0JTIwYSUyMHJlc3RhdXJhbnQlMkMlMjBpcyUyMHByZXNlbnRlZCUyMHVuc2xpY2VkLiUyMiUwQW5leHRfc2VudGVuY2UlMjAlM0QlMjAlMjJUaGUlMjBza3klMjBpcyUyMGJsdWUlMjBkdWUlMjB0byUyMHRoZSUyMHNob3J0ZXIlMjB3YXZlbGVuZ3RoJTIwb2YlMjBibHVlJTIwbGlnaHQuJTIyJTBBZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIocHJvbXB0JTJDJTIwbmV4dF9zZW50ZW5jZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqZW5jb2RpbmclMkMlMjBsYWJlbHMlM0R0b3JjaC5Mb25nVGVuc29yKCU1QjElNUQpKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRzJTBBYXNzZXJ0JTIwbG9naXRzJTVCMCUyQyUyMDAlNUQlMjAlM0MlMjBsb2dpdHMlNUIwJTJDJTIwMSU1RCUyMCUyMCUyMyUyMG5leHQlMjBzZW50ZW5jZSUyMHdhcyUyMHJhbmRvbQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BertForNextSentencePrediction
<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;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertForNextSentencePrediction.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&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>next_sentence = <span class="hljs-string">&quot;The sky is blue due to the shorter wavelength of blue light.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer(prompt, next_sentence, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding, labels=torch.LongTensor([<span class="hljs-number">1</span>]))
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">assert</span> logits[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>] &lt; logits[<span class="hljs-number">0</span>, <span class="hljs-number">1</span>]  <span class="hljs-comment"># next sentence was random</span>`}}),{c(){d=s("p"),y=o("Example:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function tX(x){let d,y,f,u,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(m,"CODE",{});var E=r(f);u=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,f),e(f,u),e(d,b)},d(l){l&&t(d)}}}function oX(x){let d,y,f,u,b;return u=new ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIydGV4dGF0dGFjayUyRmJlcnQtYmFzZS11bmNhc2VkLXllbHAtcG9sYXJpdHklMjIpJTBBbW9kZWwlMjAlM0QlMjBCZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIydGV4dGF0dGFjayUyRmJlcnQtYmFzZS11bmNhc2VkLXllbHAtcG9sYXJpdHklMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwbG9naXRzLmFyZ21heCgpLml0ZW0oKSUwQW1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9jbGFzc19pZCU1RCUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMEJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJ0ZXh0YXR0YWNrJTJGYmVydC1iYXNlLXVuY2FzZWQteWVscC1wb2xhcml0eSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcyUwQXJvdW5kKGxvc3MuaXRlbSgpJTJDJTIwMik=",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, BertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;textattack/bert-base-uncased-yelp-polarity&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;textattack/bert-base-uncased-yelp-polarity&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>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;LABEL_1&#x27;</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 = BertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;textattack/bert-base-uncased-yelp-polarity&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
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.01</span>`}}),{c(){d=s("p"),y=o("Example of single-label classification:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example of single-label classification:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function nX(x){let d,y,f,u,b;return u=new ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIydGV4dGF0dGFjayUyRmJlcnQtYmFzZS11bmNhc2VkLXllbHAtcG9sYXJpdHklMjIpJTBBbW9kZWwlMjAlM0QlMjBCZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIydGV4dGF0dGFjayUyRmJlcnQtYmFzZS11bmNhc2VkLXllbHAtcG9sYXJpdHklMjIlMkMlMjBwcm9ibGVtX3R5cGUlM0QlMjJtdWx0aV9sYWJlbF9jbGFzc2lmaWNhdGlvbiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWRzJTIwJTNEJTIwdG9yY2guYXJhbmdlKDAlMkMlMjBsb2dpdHMuc2hhcGUlNUItMSU1RCklNUJ0b3JjaC5zaWdtb2lkKGxvZ2l0cykuc3F1ZWV6ZShkaW0lM0QwKSUyMCUzRSUyMDAuNSU1RCUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMEJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJ0ZXh0YXR0YWNrJTJGYmVydC1iYXNlLXVuY2FzZWQteWVscC1wb2xhcml0eSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, BertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;textattack/bert-base-uncased-yelp-polarity&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;textattack/bert-base-uncased-yelp-polarity&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 = BertForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;textattack/bert-base-uncased-yelp-polarity&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),y=o("Example:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function rX(x){let d,y,f,u,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(m,"CODE",{});var E=r(f);u=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,f),e(f,u),e(d,b)},d(l){l&&t(d)}}}function iX(x){let d,y,f,u,b;return u=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCZXJ0Rm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZGJtZHolMkZiZXJ0LWxhcmdlLWNhc2VkLWZpbmV0dW5lZC1jb25sbDAzLWVuZ2xpc2glMjIpJTBBbW9kZWwlMjAlM0QlMjBCZXJ0Rm9yVG9rZW5DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZGJtZHolMkZiZXJ0LWxhcmdlLWNhc2VkLWZpbmV0dW5lZC1jb25sbDAzLWVuZ2xpc2glMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUwQSUyMCUyMCUyMCUyMCUyMkh1Z2dpbmdGYWNlJTIwaXMlMjBhJTIwY29tcGFueSUyMGJhc2VkJTIwaW4lMjBQYXJpcyUyMGFuZCUyME5ldyUyMFlvcmslMjIlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RGYWxzZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMEEpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSklMEElMEElMjMlMjBOb3RlJTIwdGhhdCUyMHRva2VucyUyMGFyZSUyMGNsYXNzaWZpZWQlMjByYXRoZXIlMjB0aGVuJTIwaW5wdXQlMjB3b3JkcyUyMHdoaWNoJTIwbWVhbnMlMjB0aGF0JTBBJTIzJTIwdGhlcmUlMjBtaWdodCUyMGJlJTIwbW9yZSUyMHByZWRpY3RlZCUyMHRva2VuJTIwY2xhc3NlcyUyMHRoYW4lMjB3b3Jkcy4lMEElMjMlMjBNdWx0aXBsZSUyMHRva2VuJTIwY2xhc3NlcyUyMG1pZ2h0JTIwYWNjb3VudCUyMGZvciUyMHRoZSUyMHNhbWUlMjB3b3JkJTBBcHJlZGljdGVkX3Rva2Vuc19jbGFzc2VzJTIwJTNEJTIwJTVCbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCdC5pdGVtKCklNUQlMjBmb3IlMjB0JTIwaW4lMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTVCMCU1RCU1RCUwQXByZWRpY3RlZF90b2tlbnNfY2xhc3NlcyUwQSUwQWxhYmVscyUyMCUzRCUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlMEFsb3NzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpLmxvc3MlMEFyb3VuZChsb3NzLml0ZW0oKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BertForTokenClassification
<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;dbmdz/bert-large-cased-finetuned-conll03-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;dbmdz/bert-large-cased-finetuned-conll03-english&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>predicted_tokens_classes
[<span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;I-ORG&#x27;</span>, <span class="hljs-string">&#x27;I-ORG&#x27;</span>, <span class="hljs-string">&#x27;I-ORG&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;I-LOC&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;I-LOC&#x27;</span>, <span class="hljs-string">&#x27;I-LOC&#x27;</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
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.01</span>`}}),{c(){d=s("p"),y=o("Example:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function lX(x){let d,y,f,u,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(m,"CODE",{});var E=r(f);u=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,f),e(f,u),e(d,b)},d(l){l&&t(d)}}}function dX(x){let d,y,f,u,b;return u=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCZXJ0Rm9yUXVlc3Rpb25BbnN3ZXJpbmclMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmRlZXBzZXQlMkZiZXJ0LWJhc2UtY2FzZWQtc3F1YWQyJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmVydEZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJkZWVwc2V0JTJGYmVydC1iYXNlLWNhc2VkLXNxdWFkMiUyMiklMEElMEFxdWVzdGlvbiUyQyUyMHRleHQlMjAlM0QlMjAlMjJXaG8lMjB3YXMlMjBKaW0lMjBIZW5zb24lM0YlMjIlMkMlMjAlMjJKaW0lMjBIZW5zb24lMjB3YXMlMjBhJTIwbmljZSUyMHB1cHBldCUyMiUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihxdWVzdGlvbiUyQyUyMHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNEJTIwb3V0cHV0cy5zdGFydF9sb2dpdHMuYXJnbWF4KCklMEFhbnN3ZXJfZW5kX2luZGV4JTIwJTNEJTIwb3V0cHV0cy5lbmRfbG9naXRzLmFyZ21heCgpJTBBJTBBcHJlZGljdF9hbnN3ZXJfdG9rZW5zJTIwJTNEJTIwaW5wdXRzLmlucHV0X2lkcyU1QjAlMkMlMjBhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0ElMjBhbnN3ZXJfZW5kX2luZGV4JTIwJTJCJTIwMSU1RCUwQXRva2VuaXplci5kZWNvZGUocHJlZGljdF9hbnN3ZXJfdG9rZW5zJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTBBJTBBJTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QjE0JTVEKSUwQXRhcmdldF9lbmRfaW5kZXglMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCMTUlNUQpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwc3RhcnRfcG9zaXRpb25zJTNEdGFyZ2V0X3N0YXJ0X2luZGV4JTJDJTIwZW5kX3Bvc2l0aW9ucyUzRHRhcmdldF9lbmRfaW5kZXgpJTBBbG9zcyUyMCUzRCUyMG91dHB1dHMubG9zcyUwQXJvdW5kKGxvc3MuaXRlbSgpJTJDJTIwMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BertForQuestionAnswering
<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;deepset/bert-base-cased-squad2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;deepset/bert-base-cased-squad2&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>tokenizer.decode(predict_answer_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-string">&#x27;a nice puppet&#x27;</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
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">7.41</span>`}}),{c(){d=s("p"),y=o("Example:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function cX(x){let d,y,f,u,b,l,m,E,Ee,we,Z,he,ee,B,je,G,me,qe,O,ie,le,V,de,ze,S,Je,Me,R,Ce,ce,ae,J,U,fe,D,Fe,ue,X,Ie,$e,C,_e,Q,xe,ge,H,Be,se,W,be,Y,Ue,te,I,Ne,P,pe,ye;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),f=s("code"),u=o("transformers"),b=o(" accept two formats as input:"),l=c(),m=s("ul"),E=s("li"),Ee=o("having all inputs as keyword arguments (like PyTorch models), or"),we=c(),Z=s("li"),he=o("having all inputs as a list, tuple or dict in the first positional argument."),ee=c(),B=s("p"),je=o(`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=s("code"),me=o("model.fit()"),qe=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=s("code"),ie=o("model.fit()"),le=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=s("code"),de=o("fit()"),ze=o(" and "),S=s("code"),Je=o("predict()"),Me=o(`, such as when creating your own layers or models with
the Keras `),R=s("code"),Ce=o("Functional"),ce=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ae=c(),J=s("ul"),U=s("li"),fe=o("a single Tensor with "),D=s("code"),Fe=o("input_ids"),ue=o(" only and nothing else: "),X=s("code"),Ie=o("model(input_ids)"),$e=c(),C=s("li"),_e=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=s("code"),xe=o("model([input_ids, attention_mask])"),ge=o(" or "),H=s("code"),Be=o("model([input_ids, attention_mask, token_type_ids])"),se=c(),W=s("li"),be=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=s("code"),Ue=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),te=c(),I=s("p"),Ne=o(`Note that when creating models and layers with
`),P=s("a"),pe=o("subclassing"),ye=o(` 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(T){d=a(T,"P",{});var j=r(d);y=n(j,"TensorFlow models and layers in "),f=a(j,"CODE",{});var Ze=r(f);u=n(Ze,"transformers"),Ze.forEach(t),b=n(j," accept two formats as input:"),j.forEach(t),l=p(T),m=a(T,"UL",{});var oe=r(m);E=a(oe,"LI",{});var Se=r(E);Ee=n(Se,"having all inputs as keyword arguments (like PyTorch models), or"),Se.forEach(t),we=p(oe),Z=a(oe,"LI",{});var Xe=r(Z);he=n(Xe,"having all inputs as a list, tuple or dict in the first positional argument."),Xe.forEach(t),oe.forEach(t),ee=p(T),B=a(T,"P",{});var z=r(B);je=n(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=a(z,"CODE",{});var Le=r(G);me=n(Le,"model.fit()"),Le.forEach(t),qe=n(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=a(z,"CODE",{});var Oe=r(O);ie=n(Oe,"model.fit()"),Oe.forEach(t),le=n(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a(z,"CODE",{});var Ge=r(V);de=n(Ge,"fit()"),Ge.forEach(t),ze=n(z," and "),S=a(z,"CODE",{});var De=r(S);Je=n(De,"predict()"),De.forEach(t),Me=n(z,`, such as when creating your own layers or models with
the Keras `),R=a(z,"CODE",{});var Qe=r(R);Ce=n(Qe,"Functional"),Qe.forEach(t),ce=n(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ae=p(T),J=a(T,"UL",{});var q=r(J);U=a(q,"LI",{});var L=r(U);fe=n(L,"a single Tensor with "),D=a(L,"CODE",{});var He=r(D);Fe=n(He,"input_ids"),He.forEach(t),ue=n(L," only and nothing else: "),X=a(L,"CODE",{});var Ve=r(X);Ie=n(Ve,"model(input_ids)"),Ve.forEach(t),L.forEach(t),$e=p(q),C=a(q,"LI",{});var A=r(C);_e=n(A,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=a(A,"CODE",{});var Ye=r(Q);xe=n(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),ge=n(A," or "),H=a(A,"CODE",{});var Re=r(H);Be=n(Re,"model([input_ids, attention_mask, token_type_ids])"),Re.forEach(t),A.forEach(t),se=p(q),W=a(q,"LI",{});var Pe=r(W);be=n(Pe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a(Pe,"CODE",{});var Ke=r(Y);Ue=n(Ke,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ke.forEach(t),Pe.forEach(t),q.forEach(t),te=p(T),I=a(T,"P",{});var K=r(I);Ne=n(K,`Note that when creating models and layers with
`),P=a(K,"A",{href:!0,rel:!0});var et=r(P);pe=n(et,"subclassing"),et.forEach(t),ye=n(K,` 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!`),K.forEach(t),this.h()},h(){h(P,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),h(P,"rel","nofollow")},m(T,j){g(T,d,j),e(d,y),e(d,f),e(f,u),e(d,b),g(T,l,j),g(T,m,j),e(m,E),e(E,Ee),e(m,we),e(m,Z),e(Z,he),g(T,ee,j),g(T,B,j),e(B,je),e(B,G),e(G,me),e(B,qe),e(B,O),e(O,ie),e(B,le),e(B,V),e(V,de),e(B,ze),e(B,S),e(S,Je),e(B,Me),e(B,R),e(R,Ce),e(B,ce),g(T,ae,j),g(T,J,j),e(J,U),e(U,fe),e(U,D),e(D,Fe),e(U,ue),e(U,X),e(X,Ie),e(J,$e),e(J,C),e(C,_e),e(C,Q),e(Q,xe),e(C,ge),e(C,H),e(H,Be),e(J,se),e(J,W),e(W,be),e(W,Y),e(Y,Ue),g(T,te,j),g(T,I,j),e(I,Ne),e(I,P),e(P,pe),e(I,ye)},d(T){T&&t(d),T&&t(l),T&&t(m),T&&t(ee),T&&t(B),T&&t(ae),T&&t(J),T&&t(te),T&&t(I)}}}function pX(x){let d,y,f,u,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(m,"CODE",{});var E=r(f);u=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,f),e(f,u),e(d,b)},d(l){l&&t(d)}}}function hX(x){let d,y,f,u,b;return u=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkJlcnRNb2RlbCUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkJlcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbChpbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBertModel
<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;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBertModel.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBertForPreTraining.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, add_special_tokens=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Batch size 1</span>

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBertForNextSentencePrediction.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&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>next_sentence = <span class="hljs-string">&quot;The sky is blue due to the shorter wavelength of blue light.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer(prompt, next_sentence, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),y=o("Example:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function zX(x){let d,y,f,u,b,l,m,E,Ee,we,Z,he,ee,B,je,G,me,qe,O,ie,le,V,de,ze,S,Je,Me,R,Ce,ce,ae,J,U,fe,D,Fe,ue,X,Ie,$e,C,_e,Q,xe,ge,H,Be,se,W,be,Y,Ue,te,I,Ne,P,pe,ye;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),f=s("code"),u=o("transformers"),b=o(" accept two formats as input:"),l=c(),m=s("ul"),E=s("li"),Ee=o("having all inputs as keyword arguments (like PyTorch models), or"),we=c(),Z=s("li"),he=o("having all inputs as a list, tuple or dict in the first positional argument."),ee=c(),B=s("p"),je=o(`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=s("code"),me=o("model.fit()"),qe=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=s("code"),ie=o("model.fit()"),le=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=s("code"),de=o("fit()"),ze=o(" and "),S=s("code"),Je=o("predict()"),Me=o(`, such as when creating your own layers or models with
the Keras `),R=s("code"),Ce=o("Functional"),ce=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ae=c(),J=s("ul"),U=s("li"),fe=o("a single Tensor with "),D=s("code"),Fe=o("input_ids"),ue=o(" only and nothing else: "),X=s("code"),Ie=o("model(input_ids)"),$e=c(),C=s("li"),_e=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=s("code"),xe=o("model([input_ids, attention_mask])"),ge=o(" or "),H=s("code"),Be=o("model([input_ids, attention_mask, token_type_ids])"),se=c(),W=s("li"),be=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=s("code"),Ue=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),te=c(),I=s("p"),Ne=o(`Note that when creating models and layers with
`),P=s("a"),pe=o("subclassing"),ye=o(` 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(T){d=a(T,"P",{});var j=r(d);y=n(j,"TensorFlow models and layers in "),f=a(j,"CODE",{});var Ze=r(f);u=n(Ze,"transformers"),Ze.forEach(t),b=n(j," accept two formats as input:"),j.forEach(t),l=p(T),m=a(T,"UL",{});var oe=r(m);E=a(oe,"LI",{});var Se=r(E);Ee=n(Se,"having all inputs as keyword arguments (like PyTorch models), or"),Se.forEach(t),we=p(oe),Z=a(oe,"LI",{});var Xe=r(Z);he=n(Xe,"having all inputs as a list, tuple or dict in the first positional argument."),Xe.forEach(t),oe.forEach(t),ee=p(T),B=a(T,"P",{});var z=r(B);je=n(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=a(z,"CODE",{});var Le=r(G);me=n(Le,"model.fit()"),Le.forEach(t),qe=n(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=a(z,"CODE",{});var Oe=r(O);ie=n(Oe,"model.fit()"),Oe.forEach(t),le=n(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a(z,"CODE",{});var Ge=r(V);de=n(Ge,"fit()"),Ge.forEach(t),ze=n(z," and "),S=a(z,"CODE",{});var De=r(S);Je=n(De,"predict()"),De.forEach(t),Me=n(z,`, such as when creating your own layers or models with
the Keras `),R=a(z,"CODE",{});var Qe=r(R);Ce=n(Qe,"Functional"),Qe.forEach(t),ce=n(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ae=p(T),J=a(T,"UL",{});var q=r(J);U=a(q,"LI",{});var L=r(U);fe=n(L,"a single Tensor with "),D=a(L,"CODE",{});var He=r(D);Fe=n(He,"input_ids"),He.forEach(t),ue=n(L," only and nothing else: "),X=a(L,"CODE",{});var Ve=r(X);Ie=n(Ve,"model(input_ids)"),Ve.forEach(t),L.forEach(t),$e=p(q),C=a(q,"LI",{});var A=r(C);_e=n(A,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=a(A,"CODE",{});var Ye=r(Q);xe=n(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),ge=n(A," or "),H=a(A,"CODE",{});var Re=r(H);Be=n(Re,"model([input_ids, attention_mask, token_type_ids])"),Re.forEach(t),A.forEach(t),se=p(q),W=a(q,"LI",{});var Pe=r(W);be=n(Pe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a(Pe,"CODE",{});var Ke=r(Y);Ue=n(Ke,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ke.forEach(t),Pe.forEach(t),q.forEach(t),te=p(T),I=a(T,"P",{});var K=r(I);Ne=n(K,`Note that when creating models and layers with
`),P=a(K,"A",{href:!0,rel:!0});var et=r(P);pe=n(et,"subclassing"),et.forEach(t),ye=n(K,` 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!`),K.forEach(t),this.h()},h(){h(P,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),h(P,"rel","nofollow")},m(T,j){g(T,d,j),e(d,y),e(d,f),e(f,u),e(d,b),g(T,l,j),g(T,m,j),e(m,E),e(E,Ee),e(m,we),e(m,Z),e(Z,he),g(T,ee,j),g(T,B,j),e(B,je),e(B,G),e(G,me),e(B,qe),e(B,O),e(O,ie),e(B,le),e(B,V),e(V,de),e(B,ze),e(B,S),e(S,Je),e(B,Me),e(B,R),e(R,Ce),e(B,ce),g(T,ae,j),g(T,J,j),e(J,U),e(U,fe),e(U,D),e(D,Fe),e(U,ue),e(U,X),e(X,Ie),e(J,$e),e(J,C),e(C,_e),e(C,Q),e(Q,xe),e(C,ge),e(C,H),e(H,Be),e(J,se),e(J,W),e(W,be),e(W,Y),e(Y,Ue),g(T,te,j),g(T,I,j),e(I,Ne),e(I,P),e(P,pe),e(I,ye)},d(T){T&&t(d),T&&t(l),T&&t(m),T&&t(ee),T&&t(B),T&&t(ae),T&&t(J),T&&t(te),T&&t(I)}}}function JX(x){let d,y,f,u,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(m,"CODE",{});var E=r(f);u=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,f),e(f,u),e(d,b)},d(l){l&&t(d)}}}function CX(x){let d,y,f,u,b;return u=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkJlcnRGb3JUb2tlbkNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJkYm1keiUyRmJlcnQtbGFyZ2UtY2FzZWQtZmluZXR1bmVkLWNvbmxsMDMtZW5nbGlzaCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGQmVydEZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmRibWR6JTJGYmVydC1sYXJnZS1jYXNlZC1maW5ldHVuZWQtY29ubGwwMy1lbmdsaXNoJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjAlMjJIdWdnaW5nRmFjZSUyMGlzJTIwYSUyMGNvbXBhbnklMjBiYXNlZCUyMGluJTIwUGFyaXMlMjBhbmQlMjBOZXclMjBZb3JrJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyJTBBKSUwQSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEFwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTIwJTNEJTIwdGYubWF0aC5hcmdtYXgobG9naXRzJTJDJTIwYXhpcyUzRC0xKSUwQSUwQSUyMyUyME5vdGUlMjB0aGF0JTIwdG9rZW5zJTIwYXJlJTIwY2xhc3NpZmllZCUyMHJhdGhlciUyMHRoZW4lMjBpbnB1dCUyMHdvcmRzJTIwd2hpY2glMjBtZWFucyUyMHRoYXQlMEElMjMlMjB0aGVyZSUyMG1pZ2h0JTIwYmUlMjBtb3JlJTIwcHJlZGljdGVkJTIwdG9rZW4lMjBjbGFzc2VzJTIwdGhhbiUyMHdvcmRzLiUwQSUyMyUyME11bHRpcGxlJTIwdG9rZW4lMjBjbGFzc2VzJTIwbWlnaHQlMjBhY2NvdW50JTIwZm9yJTIwdGhlJTIwc2FtZSUyMHdvcmQlMEFwcmVkaWN0ZWRfdG9rZW5zX2NsYXNzZXMlMjAlM0QlMjAlNUJtb2RlbC5jb25maWcuaWQybGFiZWwlNUJ0JTVEJTIwZm9yJTIwdCUyMGluJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyU1QjAlNUQubnVtcHkoKS50b2xpc3QoKSU1RCUwQXByZWRpY3RlZF90b2tlbnNfY2xhc3Nlcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBertForTokenClassification
<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;dbmdz/bert-large-cased-finetuned-conll03-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;dbmdz/bert-large-cased-finetuned-conll03-english&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()]
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes
[<span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;I-ORG&#x27;</span>, <span class="hljs-string">&#x27;I-ORG&#x27;</span>, <span class="hljs-string">&#x27;I-ORG&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;I-LOC&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;I-LOC&#x27;</span>, <span class="hljs-string">&#x27;I-LOC&#x27;</span>] `}}),{c(){d=s("p"),y=o("Example:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function IX(x){let d,y;return d=new ke({props:{code:"bGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3NzKSUwQXJvdW5kKGZsb2F0KGxvc3MpJTJDJTIwMik=",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)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(loss), <span class="hljs-number">2</span>)
<span class="hljs-number">0.01</span>`}}),{c(){v(d.$$.fragment)},l(f){k(d.$$.fragment,f)},m(f,u){w(d,f,u),y=!0},p:ve,i(f){y||(M(d.$$.fragment,f),y=!0)},o(f){F(d.$$.fragment,f),y=!1},d(f){$(d,f)}}}function UX(x){let d,y,f,u,b,l,m,E,Ee,we,Z,he,ee,B,je,G,me,qe,O,ie,le,V,de,ze,S,Je,Me,R,Ce,ce,ae,J,U,fe,D,Fe,ue,X,Ie,$e,C,_e,Q,xe,ge,H,Be,se,W,be,Y,Ue,te,I,Ne,P,pe,ye;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),f=s("code"),u=o("transformers"),b=o(" accept two formats as input:"),l=c(),m=s("ul"),E=s("li"),Ee=o("having all inputs as keyword arguments (like PyTorch models), or"),we=c(),Z=s("li"),he=o("having all inputs as a list, tuple or dict in the first positional argument."),ee=c(),B=s("p"),je=o(`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=s("code"),me=o("model.fit()"),qe=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=s("code"),ie=o("model.fit()"),le=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=s("code"),de=o("fit()"),ze=o(" and "),S=s("code"),Je=o("predict()"),Me=o(`, such as when creating your own layers or models with
the Keras `),R=s("code"),Ce=o("Functional"),ce=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ae=c(),J=s("ul"),U=s("li"),fe=o("a single Tensor with "),D=s("code"),Fe=o("input_ids"),ue=o(" only and nothing else: "),X=s("code"),Ie=o("model(input_ids)"),$e=c(),C=s("li"),_e=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=s("code"),xe=o("model([input_ids, attention_mask])"),ge=o(" or "),H=s("code"),Be=o("model([input_ids, attention_mask, token_type_ids])"),se=c(),W=s("li"),be=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=s("code"),Ue=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),te=c(),I=s("p"),Ne=o(`Note that when creating models and layers with
`),P=s("a"),pe=o("subclassing"),ye=o(` 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(T){d=a(T,"P",{});var j=r(d);y=n(j,"TensorFlow models and layers in "),f=a(j,"CODE",{});var Ze=r(f);u=n(Ze,"transformers"),Ze.forEach(t),b=n(j," accept two formats as input:"),j.forEach(t),l=p(T),m=a(T,"UL",{});var oe=r(m);E=a(oe,"LI",{});var Se=r(E);Ee=n(Se,"having all inputs as keyword arguments (like PyTorch models), or"),Se.forEach(t),we=p(oe),Z=a(oe,"LI",{});var Xe=r(Z);he=n(Xe,"having all inputs as a list, tuple or dict in the first positional argument."),Xe.forEach(t),oe.forEach(t),ee=p(T),B=a(T,"P",{});var z=r(B);je=n(z,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),G=a(z,"CODE",{});var Le=r(G);me=n(Le,"model.fit()"),Le.forEach(t),qe=n(z,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=a(z,"CODE",{});var Oe=r(O);ie=n(Oe,"model.fit()"),Oe.forEach(t),le=n(z,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a(z,"CODE",{});var Ge=r(V);de=n(Ge,"fit()"),Ge.forEach(t),ze=n(z," and "),S=a(z,"CODE",{});var De=r(S);Je=n(De,"predict()"),De.forEach(t),Me=n(z,`, such as when creating your own layers or models with
the Keras `),R=a(z,"CODE",{});var Qe=r(R);Ce=n(Qe,"Functional"),Qe.forEach(t),ce=n(z,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),z.forEach(t),ae=p(T),J=a(T,"UL",{});var q=r(J);U=a(q,"LI",{});var L=r(U);fe=n(L,"a single Tensor with "),D=a(L,"CODE",{});var He=r(D);Fe=n(He,"input_ids"),He.forEach(t),ue=n(L," only and nothing else: "),X=a(L,"CODE",{});var Ve=r(X);Ie=n(Ve,"model(input_ids)"),Ve.forEach(t),L.forEach(t),$e=p(q),C=a(q,"LI",{});var A=r(C);_e=n(A,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=a(A,"CODE",{});var Ye=r(Q);xe=n(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),ge=n(A," or "),H=a(A,"CODE",{});var Re=r(H);Be=n(Re,"model([input_ids, attention_mask, token_type_ids])"),Re.forEach(t),A.forEach(t),se=p(q),W=a(q,"LI",{});var Pe=r(W);be=n(Pe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a(Pe,"CODE",{});var Ke=r(Y);Ue=n(Ke,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ke.forEach(t),Pe.forEach(t),q.forEach(t),te=p(T),I=a(T,"P",{});var K=r(I);Ne=n(K,`Note that when creating models and layers with
`),P=a(K,"A",{href:!0,rel:!0});var et=r(P);pe=n(et,"subclassing"),et.forEach(t),ye=n(K,` 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!`),K.forEach(t),this.h()},h(){h(P,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),h(P,"rel","nofollow")},m(T,j){g(T,d,j),e(d,y),e(d,f),e(f,u),e(d,b),g(T,l,j),g(T,m,j),e(m,E),e(E,Ee),e(m,we),e(m,Z),e(Z,he),g(T,ee,j),g(T,B,j),e(B,je),e(B,G),e(G,me),e(B,qe),e(B,O),e(O,ie),e(B,le),e(B,V),e(V,de),e(B,ze),e(B,S),e(S,Je),e(B,Me),e(B,R),e(R,Ce),e(B,ce),g(T,ae,j),g(T,J,j),e(J,U),e(U,fe),e(U,D),e(D,Fe),e(U,ue),e(U,X),e(X,Ie),e(J,$e),e(J,C),e(C,_e),e(C,Q),e(Q,xe),e(C,ge),e(C,H),e(H,Be),e(J,se),e(J,W),e(W,be),e(W,Y),e(Y,Ue),g(T,te,j),g(T,I,j),e(I,Ne),e(I,P),e(P,pe),e(I,ye)},d(T){T&&t(d),T&&t(l),T&&t(m),T&&t(ee),T&&t(B),T&&t(ae),T&&t(J),T&&t(te),T&&t(I)}}}function NX(x){let d,y,f,u,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(m,"CODE",{});var E=r(f);u=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,f),e(f,u),e(d,b)},d(l){l&&t(d)}}}function PX(x){let d,y,f,u,b;return u=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkJlcnRGb3JRdWVzdGlvbkFuc3dlcmluZyUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeWRzaGllaCUyRmJlcnQtYmFzZS1jYXNlZC1zcXVhZDIlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkJlcnRGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyeWRzaGllaCUyRmJlcnQtYmFzZS1jYXNlZC1zcXVhZDIlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNEJTIwaW50KHRmLm1hdGguYXJnbWF4KG91dHB1dHMuc3RhcnRfbG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChvdXRwdXRzLmVuZF9sb2dpdHMlMkMlMjBheGlzJTNELTEpJTVCMCU1RCklMEElMEFwcmVkaWN0X2Fuc3dlcl90b2tlbnMlMjAlM0QlMjBpbnB1dHMuaW5wdXRfaWRzJTVCMCUyQyUyMGFuc3dlcl9zdGFydF9pbmRleCUyMCUzQSUyMGFuc3dlcl9lbmRfaW5kZXglMjAlMkIlMjAxJTVEJTBBdG9rZW5pemVyLmRlY29kZShwcmVkaWN0X2Fuc3dlcl90b2tlbnMp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBertForQuestionAnswering
<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;ydshieh/bert-base-cased-squad2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;ydshieh/bert-base-cased-squad2&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>]
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predict_answer_tokens)
<span class="hljs-string">&#x27;a nice puppet&#x27;</span>`}}),{c(){d=s("p"),y=o("Example:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function WX(x){let d,y;return d=new ke({props:{code:"JTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdGYuY29uc3RhbnQoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRmLmNvbnN0YW50KCU1QjE1JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG91dHB1dHMubG9zcyklMEFyb3VuZChmbG9hdChsb3NzKSUyQyUyMDIp",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)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(loss), <span class="hljs-number">2</span>)
<span class="hljs-number">7.41</span>`}}),{c(){v(d.$$.fragment)},l(f){k(d.$$.fragment,f)},m(f,u){w(d,f,u),y=!0},p:ve,i(f){y||(M(d.$$.fragment,f),y=!0)},o(f){F(d.$$.fragment,f),y=!1},d(f){$(d,f)}}}function qX(x){let d,y,f,u,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(m,"CODE",{});var E=r(f);u=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,f),e(f,u),e(d,b)},d(l){l&&t(d)}}}function AX(x){let d,y,f,u,b;return u=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmVydE1vZGVsJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmVydE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBertModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertModel.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&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;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertForPreTraining.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&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;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>prediction_logits = outputs.prediction_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>seq_relationship_logits = outputs.seq_relationship_logits`}}),{c(){d=s("p"),y=o("Example:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function GX(x){let d,y,f,u,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(m,"CODE",{});var E=r(f);u=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,f),e(f,u),e(d,b)},d(l){l&&t(d)}}}function VX(x){let d,y,f,u,b;return u=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmVydEZvckNhdXNhbExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmVydEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQSUyMyUyMHJldHJpZXZlJTIwbG9ndHMlMjBmb3IlMjBuZXh0JTIwdG9rZW4lMEFuZXh0X3Rva2VuX2xvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRzJTVCJTNBJTJDJTIwLTElNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBertForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertForCausalLM.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&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;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve logts for next token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>next_token_logits = outputs.logits[:, -<span class="hljs-number">1</span>]`}}),{c(){d=s("p"),y=o("Example:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function SX(x){let d,y,f,u,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(m,"CODE",{});var E=r(f);u=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,f),e(f,u),e(d,b)},d(l){l&&t(d)}}}function XX(x){let d,y,f,u,b;return u=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmVydEZvck1hc2tlZExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmVydEZvck1hc2tlZExNLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjAlNUJNQVNLJTVELiUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBertForMaskedLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&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;jax&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertForNextSentencePrediction.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&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>next_sentence = <span class="hljs-string">&quot;The sky is blue due to the shorter wavelength of blue light.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer(prompt, next_sentence, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">assert</span> logits[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>] &lt; logits[<span class="hljs-number">0</span>, <span class="hljs-number">1</span>]  <span class="hljs-comment"># next sentence was random</span>`}}),{c(){d=s("p"),y=o("Example:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function DX(x){let d,y,f,u,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(m,"CODE",{});var E=r(f);u=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,f),e(f,u),e(d,b)},d(l){l&&t(d)}}}function QX(x){let d,y,f,u,b;return u=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhCZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&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;jax&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&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;jax&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**{k: v[<span class="hljs-literal">None</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>logits = outputs.logits`}}),{c(){d=s("p"),y=o("Example:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function KX(x){let d,y,f,u,b;return{c(){d=s("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),f=s("code"),u=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),f=a(m,"CODE",{});var E=r(f);u=n(E,"Module"),E.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,y),e(d,f),e(f,u),e(d,b)},d(l){l&&t(d)}}}function e8(x){let d,y,f,u,b;return u=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmVydEZvclRva2VuQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhCZXJ0Rm9yVG9rZW5DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBertForTokenClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&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;jax&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&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;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits`}}),{c(){d=s("p"),y=o("Example:"),f=c(),v(u.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),f=p(l),k(u.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,f,m),w(u,l,m),b=!0},p:ve,i(l){b||(M(u.$$.fragment,l),b=!0)},o(l){F(u.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(f),$(u,l)}}}function n8(x){let d,y,f,u,b,l,m,E,Ee,we,Z,he,ee,B,je,G,me,qe,O,ie,le,V,de,ze,S,Je,Me,R,Ce,ce,ae,J,U,fe,D,Fe,ue,X,Ie,$e,C,_e,Q,xe,ge,H,Be,se,W,be,Y,Ue,te,I,Ne,P,pe,ye,T,j,Ze,oe,Se,Xe,z,Le,Oe,Ge,De,Qe,q,L,He,Ve,A,Ye,Re,Pe,Ke,K,et,wM,Jv,Nn,aa,rg,Ai,MM,ig,FM,Cv,Rm,$M,Iv,Zi,Uv,tt,Ri,xM,Gi,BM,EM,jM,Vi,zM,Si,JM,CM,IM,Xi,UM,Li,NM,PM,WM,Oi,qM,Di,AM,ZM,RM,Qo,Gm,GM,VM,Qi,SM,XM,Hi,LM,OM,DM,Ho,Vm,QM,HM,Yi,YM,KM,Ki,e2,t2,o2,Yo,Sm,n2,s2,el,a2,r2,tl,i2,l2,d2,lg,Xm,c2,Nv,ol,Pv,ut,nl,p2,sl,h2,m2,f2,Pn,u2,al,g2,_2,rl,b2,y2,T2,Ko,Lm,v2,k2,il,w2,M2,ll,F2,$2,x2,en,Om,B2,E2,dl,j2,z2,cl,J2,C2,I2,ra,Dm,U2,N2,pl,P2,W2,q2,Qm,hl,A2,Z2,R2,dg,Hm,G2,Wv,ml,qv,Wt,tn,Ym,V2,S2,fl,X2,L2,ul,O2,D2,Q2,on,Km,H2,Y2,gl,K2,e0,_l,t0,o0,n0,nn,ef,s0,a0,bl,r0,i0,yl,l0,d0,c0,tf,Tl,p0,h0,m0,cg,of,f0,Av,vl,Zv,qt,sn,nf,u0,g0,kl,_0,b0,wl,y0,T0,v0,an,sf,k0,w0,Ml,M0,F0,Fl,$0,x0,B0,ia,af,E0,j0,$l,z0,J0,C0,rf,xl,I0,U0,N0,pg,lf,P0,Rv,df,hg,W0,Gv,rn,ln,cf,q0,A0,Bl,Z0,R0,El,G0,V0,S0,dn,pf,X0,L0,jl,O0,D0,zl,Q0,H0,Y0,mg,hf,K0,Vv,Jl,eF,fg,tF,Sv,la,Cl,oF,Il,nF,sF,aF,Ul,rF,Nl,iF,lF,Xv,Pl,dF,ug,cF,Lv,mf,Wl,pF,ql,hF,mF,Ov,Al,fF,gg,uF,Dv,$t,Zl,gF,Rl,_F,bF,yF,Gl,TF,Vl,vF,kF,wF,Sl,MF,Xl,FF,$F,xF,Ll,BF,Ol,EF,jF,zF,Dl,JF,Ql,CF,IF,UF,Hl,NF,Yl,PF,WF,Qv,Wn,da,_g,Kl,qF,bg,AF,Hv,so,ed,ZF,Wo,RF,ff,GF,VF,uf,SF,XF,td,LF,OF,DF,qn,QF,gf,HF,YF,_f,KF,e$,t$,ca,Yv,An,pa,yg,od,o$,Tg,n$,Kv,ot,nd,s$,vg,a$,r$,sd,i$,bf,l$,d$,c$,cn,ad,p$,kg,h$,m$,rd,yf,f$,wg,u$,g$,Tf,_$,Mg,b$,y$,ha,id,T$,ld,v$,Fg,k$,w$,M$,ao,dd,F$,$g,$$,x$,ma,B$,Zn,E$,xg,j$,z$,Bg,J$,C$,I$,vf,cd,ek,Rn,fa,Eg,pd,U$,jg,N$,tk,Bt,hd,P$,md,W$,zg,q$,A$,Z$,fd,R$,kf,G$,V$,S$,pn,ud,X$,Jg,L$,O$,gd,wf,D$,Cg,Q$,H$,Mf,Y$,Ig,K$,ex,ro,_d,tx,Ug,ox,nx,ua,sx,Gn,ax,Ng,rx,ix,Pg,lx,dx,ok,Vn,ga,Wg,bd,cx,qg,px,nk,Et,yd,hx,Sn,mx,Ag,fx,ux,Zg,gx,_x,bx,Td,yx,Rg,Tx,vx,kx,hn,vd,wx,kd,Mx,Gg,Fx,$x,xx,_a,Bx,mn,wd,Ex,Xn,jx,Vg,zx,Jx,Sg,Cx,Ix,Ux,ba,sk,Ln,ya,Xg,Md,Nx,Lg,Px,ak,On,Fd,Wx,$d,qx,Ff,Ax,Zx,rk,Dn,xd,Rx,Bd,Gx,$f,Vx,Sx,ik,qo,Ed,Xx,jd,Lx,xf,Ox,Dx,Qx,Ta,zd,Hx,Og,Yx,lk,Qn,va,Dg,Jd,Kx,Qg,eB,dk,nt,Cd,tB,Hg,oB,nB,Id,sB,Bf,aB,rB,iB,Ud,lB,Nd,dB,cB,pB,Pd,hB,Wd,mB,fB,uB,gt,gB,Yg,_B,bB,Kg,yB,TB,e_,vB,kB,t_,wB,MB,o_,FB,$B,n_,xB,BB,EB,io,qd,jB,Hn,zB,Ef,JB,CB,s_,IB,UB,NB,ka,PB,wa,ck,Yn,Ma,a_,Ad,WB,r_,qB,pk,jt,Zd,AB,Kn,ZB,i_,RB,GB,l_,VB,SB,XB,Rd,LB,jf,OB,DB,QB,Gd,HB,Vd,YB,KB,eE,lo,Sd,tE,es,oE,zf,nE,sE,d_,aE,rE,iE,Fa,lE,$a,hk,ts,xa,c_,Xd,dE,p_,cE,mk,zt,Ld,pE,Od,hE,h_,mE,fE,uE,Dd,gE,Jf,_E,bE,yE,Qd,TE,Hd,vE,kE,wE,co,Yd,ME,os,FE,Cf,$E,xE,m_,BE,EE,jE,Ba,zE,Ea,fk,ns,ja,f_,Kd,JE,u_,CE,uk,Jt,ec,IE,tc,UE,g_,NE,PE,WE,oc,qE,If,AE,ZE,RE,nc,GE,sc,VE,SE,XE,po,ac,LE,ss,OE,Uf,DE,QE,__,HE,YE,KE,za,ej,Ja,gk,as,Ca,b_,rc,tj,y_,oj,_k,Ct,ic,nj,lc,sj,T_,aj,rj,ij,dc,lj,Nf,dj,cj,pj,cc,hj,pc,mj,fj,uj,ho,hc,gj,rs,_j,Pf,bj,yj,v_,Tj,vj,kj,Ia,wj,Ua,bk,is,Na,k_,mc,Mj,w_,Fj,yk,It,fc,$j,M_,xj,Bj,uc,Ej,Wf,jj,zj,Jj,gc,Cj,_c,Ij,Uj,Nj,At,bc,Pj,ls,Wj,qf,qj,Aj,F_,Zj,Rj,Gj,Pa,Vj,Wa,Sj,qa,Tk,ds,Aa,$_,yc,Xj,x_,Lj,vk,Ut,Tc,Oj,B_,Dj,Qj,vc,Hj,Af,Yj,Kj,ez,kc,tz,wc,oz,nz,sz,mo,Mc,az,cs,rz,Zf,iz,lz,E_,dz,cz,pz,Za,hz,Ra,kk,ps,Ga,j_,Fc,mz,z_,fz,wk,Nt,$c,uz,J_,gz,_z,xc,bz,Rf,yz,Tz,vz,Bc,kz,Ec,wz,Mz,Fz,fo,jc,$z,hs,xz,Gf,Bz,Ez,C_,jz,zz,Jz,Va,Cz,Sa,Mk,ms,Xa,I_,zc,Iz,U_,Uz,Fk,Pt,Jc,Nz,fs,Pz,N_,Wz,qz,P_,Az,Zz,Rz,Cc,Gz,Vf,Vz,Sz,Xz,Ic,Lz,Uc,Oz,Dz,Qz,uo,Nc,Hz,us,Yz,Sf,Kz,eJ,W_,tJ,oJ,nJ,La,sJ,Oa,$k,gs,Da,q_,Pc,aJ,A_,rJ,xk,_t,Wc,iJ,Z_,lJ,dJ,qc,cJ,Xf,pJ,hJ,mJ,Ac,fJ,Zc,uJ,gJ,_J,Qa,bJ,go,Rc,yJ,_s,TJ,Lf,vJ,kJ,R_,wJ,MJ,FJ,Ha,$J,Ya,Bk,bs,Ka,G_,Gc,xJ,V_,BJ,Ek,bt,Vc,EJ,ys,jJ,S_,zJ,JJ,X_,CJ,IJ,UJ,Sc,NJ,Of,PJ,WJ,qJ,Xc,AJ,Lc,ZJ,RJ,GJ,er,VJ,_o,Oc,SJ,Ts,XJ,Df,LJ,OJ,L_,DJ,QJ,HJ,tr,YJ,or,jk,vs,nr,O_,Dc,KJ,D_,eC,zk,ks,Qc,tC,Zt,Hc,oC,st,nC,Q_,sC,aC,H_,rC,iC,Y_,lC,dC,K_,cC,pC,eb,hC,mC,tb,fC,uC,ob,gC,_C,bC,Yc,Kc,yC,nb,TC,vC,kC,ep,wC,sb,MC,FC,$C,ne,xC,ab,BC,EC,rb,jC,zC,ib,JC,CC,lb,IC,UC,db,NC,PC,cb,WC,qC,pb,AC,ZC,hb,RC,GC,mb,VC,SC,fb,XC,LC,ub,OC,DC,gb,QC,HC,_b,YC,KC,bb,eI,tI,yb,oI,nI,Tb,sI,aI,vb,rI,iI,kb,lI,dI,wb,cI,pI,Mb,hI,mI,fI,sr,Jk,ws,ar,Fb,tp,uI,$b,gI,Ck,yt,op,_I,np,bI,xb,yI,TI,vI,sp,kI,Qf,wI,MI,FI,ap,$I,rp,xI,BI,EI,rr,jI,Rt,ip,zI,Ms,JI,Hf,CI,II,Bb,UI,NI,PI,ir,WI,lr,qI,dr,Ik,Fs,cr,Eb,lp,AI,jb,ZI,Uk,Tt,dp,RI,cp,GI,zb,VI,SI,XI,pp,LI,Yf,OI,DI,QI,hp,HI,mp,YI,KI,e4,pr,t4,bo,fp,o4,$s,n4,Kf,s4,a4,Jb,r4,i4,l4,hr,d4,mr,Nk,xs,fr,Cb,up,c4,Ib,p4,Pk,vt,gp,h4,Ub,m4,f4,_p,u4,eu,g4,_4,b4,bp,y4,yp,T4,v4,k4,ur,w4,Gt,Tp,M4,Bs,F4,tu,$4,x4,Nb,B4,E4,j4,gr,z4,_r,J4,br,Wk,Es,yr,Pb,vp,C4,Wb,I4,qk,kt,kp,U4,qb,N4,P4,wp,W4,ou,q4,A4,Z4,Mp,R4,Fp,G4,V4,S4,Tr,X4,yo,$p,L4,js,O4,nu,D4,Q4,Ab,H4,Y4,K4,vr,e5,kr,Ak,zs,wr,Zb,xp,t5,Rb,o5,Zk,wt,Bp,n5,Gb,s5,a5,Ep,r5,su,i5,l5,d5,jp,c5,zp,p5,h5,m5,Mr,f5,Vt,Jp,u5,Js,g5,au,_5,b5,Vb,y5,T5,v5,Fr,k5,$r,w5,xr,Rk,Cs,Br,Sb,Cp,M5,Xb,F5,Gk,Mt,Ip,$5,Is,x5,Lb,B5,E5,Ob,j5,z5,J5,Up,C5,ru,I5,U5,N5,Np,P5,Pp,W5,q5,A5,Er,Z5,St,Wp,R5,Us,G5,iu,V5,S5,Db,X5,L5,O5,jr,D5,zr,Q5,Jr,Vk,Ns,Cr,Qb,qp,H5,Hb,Y5,Sk,at,Ap,K5,Yb,e3,t3,Zp,o3,lu,n3,s3,a3,Rp,r3,Gp,i3,l3,d3,Kb,c3,p3,Ao,ey,Vp,h3,m3,ty,Sp,f3,u3,oy,Xp,g3,_3,ny,Lp,b3,y3,To,Op,T3,Ps,v3,sy,k3,w3,ay,M3,F3,$3,Ir,x3,Ur,Xk,Ws,Nr,ry,Dp,B3,iy,E3,Lk,rt,Qp,j3,qs,z3,ly,J3,C3,dy,I3,U3,N3,Hp,P3,du,W3,q3,A3,Yp,Z3,Kp,R3,G3,V3,cy,S3,X3,Zo,py,eh,L3,O3,hy,th,D3,Q3,my,oh,H3,Y3,fy,nh,K3,eU,vo,sh,tU,As,oU,uy,nU,sU,gy,aU,rU,iU,Pr,lU,Wr,Ok,Zs,qr,_y,ah,dU,by,cU,Dk,it,rh,pU,yy,hU,mU,ih,fU,cu,uU,gU,_U,lh,bU,dh,yU,TU,vU,Ty,kU,wU,Ro,vy,ch,MU,FU,ky,ph,$U,xU,wy,hh,BU,EU,My,mh,jU,zU,ko,fh,JU,Rs,CU,Fy,IU,UU,$y,NU,PU,WU,Ar,qU,Zr,Qk,Gs,Rr,xy,uh,AU,By,ZU,Hk,lt,gh,RU,_h,GU,Ey,VU,SU,XU,bh,LU,pu,OU,DU,QU,yh,HU,Th,YU,KU,eN,jy,tN,oN,Go,zy,vh,nN,sN,Jy,kh,aN,rN,Cy,wh,iN,lN,Iy,Mh,dN,cN,wo,Fh,pN,Vs,hN,Uy,mN,fN,Ny,uN,gN,_N,Gr,bN,Vr,Yk,Ss,Sr,Py,$h,yN,Wy,TN,Kk,dt,xh,vN,Bh,kN,qy,wN,MN,FN,Eh,$N,hu,xN,BN,EN,jh,jN,zh,zN,JN,CN,Ay,IN,UN,Vo,Zy,Jh,NN,PN,Ry,Ch,WN,qN,Gy,Ih,AN,ZN,Vy,Uh,RN,GN,Mo,Nh,VN,Xs,SN,Sy,XN,LN,Xy,ON,DN,QN,Xr,HN,Lr,ew,Ls,Or,Ly,Ph,YN,Oy,KN,tw,ct,Wh,e9,Dy,t9,o9,qh,n9,mu,s9,a9,r9,Ah,i9,Zh,l9,d9,c9,Qy,p9,h9,So,Hy,Rh,m9,f9,Yy,Gh,u9,g9,Ky,Vh,_9,b9,eT,Sh,y9,T9,Fo,Xh,v9,Os,k9,tT,w9,M9,oT,F9,$9,x9,Dr,B9,Qr,ow,Ds,Hr,nT,Lh,E9,sT,j9,nw,pt,Oh,z9,aT,J9,C9,Dh,I9,fu,U9,N9,P9,Qh,W9,Hh,q9,A9,Z9,rT,R9,G9,Xo,iT,Yh,V9,S9,lT,Kh,X9,L9,dT,em,O9,D9,cT,tm,Q9,H9,$o,om,Y9,Qs,K9,pT,eP,tP,hT,oP,nP,sP,Yr,aP,Kr,sw,Hs,ei,mT,nm,rP,fT,iP,aw,ht,sm,lP,uT,dP,cP,am,pP,uu,hP,mP,fP,rm,uP,im,gP,_P,bP,gT,yP,TP,Lo,_T,lm,vP,kP,bT,dm,wP,MP,yT,cm,FP,$P,TT,pm,xP,BP,xo,hm,EP,Ys,jP,vT,zP,JP,kT,CP,IP,UP,ti,NP,oi,rw,Ks,ni,wT,mm,PP,MT,WP,iw,mt,fm,qP,ea,AP,FT,ZP,RP,$T,GP,VP,SP,um,XP,gu,LP,OP,DP,gm,QP,_m,HP,YP,KP,xT,eW,tW,Oo,BT,bm,oW,nW,ET,ym,sW,aW,jT,Tm,rW,iW,zT,vm,lW,dW,Bo,km,cW,ta,pW,JT,hW,mW,CT,fW,uW,gW,si,_W,ai,lw;return l=new We({}),de=new We({}),Ai=new We({}),Zi=new kM({props:{pipeline:"text-classification"}}),ol=new kM({props:{pipeline:"token-classification"}}),ml=new kM({props:{pipeline:"fill-mask"}}),vl=new kM({props:{pipeline:"question-answering"}}),Kl=new We({}),ed=new N({props:{name:"class transformers.BertConfig",anchor:"transformers.BertConfig",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:" = 0"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_cache",val:" = True"},{name:"classifier_dropout",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BertConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the BERT model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/bert#transformers.BertModel">BertModel</a> or <a href="/docs/transformers/main/en/model_doc/bert#transformers.TFBertModel">TFBertModel</a>.`,name:"vocab_size"},{anchor:"transformers.BertConfig.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.BertConfig.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.BertConfig.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.BertConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.BertConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</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;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.BertConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.BertConfig.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.BertConfig.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.BertConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/bert#transformers.BertModel">BertModel</a> or <a href="/docs/transformers/main/en/model_doc/bert#transformers.TFBertModel">TFBertModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.BertConfig.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.BertConfig.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.BertConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.BertConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model is used as a decoder or not. If <code>False</code>, the model is used as an encoder.`,name:"is_decoder"},{anchor:"transformers.BertConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.BertConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/configuration_bert.py#L72"}}),ca=new Te({props:{anchor:"transformers.BertConfig.example",$$slots:{default:[AS]},$$scope:{ctx:x}}}),od=new We({}),nd=new N({props:{name:"class transformers.BertTokenizer",anchor:"transformers.BertTokenizer",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.BertTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.BertTokenizer.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.BertTokenizer.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.BertTokenizer.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.BertTokenizer.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.BertTokenizer.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.BertTokenizer.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.BertTokenizer.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.BertTokenizer.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.BertTokenizer.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.BertTokenizer.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original BERT).`,name:"strip_accents"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/tokenization_bert.py#L137"}}),ad=new N({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.BertTokenizer.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.BertTokenizer.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.BertTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/tokenization_bert.py#L267",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>
`}}),id=new N({props:{name:"get_special_tokens_mask",anchor:"transformers.BertTokenizer.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.BertTokenizer.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.BertTokenizer.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.BertTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/tokenization_bert.py#L292",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>
`}}),dd=new N({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.BertTokenizer.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.BertTokenizer.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.BertTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/tokenization_bert.py#L320",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>
`}}),ma=new Te({props:{anchor:"transformers.BertTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[ZS]},$$scope:{ctx:x}}}),cd=new N({props:{name:"save_vocabulary",anchor:"transformers.BertTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/tokenization_bert.py#L349"}}),pd=new We({}),hd=new N({props:{name:"class transformers.BertTokenizerFast",anchor:"transformers.BertTokenizerFast",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.BertTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.BertTokenizerFast.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.BertTokenizerFast.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.BertTokenizerFast.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.BertTokenizerFast.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.BertTokenizerFast.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.BertTokenizerFast.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.BertTokenizerFast.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.BertTokenizerFast.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.BertTokenizerFast.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original BERT).`,name:"strip_accents"},{anchor:"transformers.BertTokenizerFast.wordpieces_prefix",description:`<strong>wordpieces_prefix</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;##&quot;</code>) &#x2014;
The prefix for subwords.`,name:"wordpieces_prefix"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/tokenization_bert_fast.py#L161"}}),ud=new N({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.BertTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:""},{name:"token_ids_1",val:" = None"}],parametersDescription:[{anchor:"transformers.BertTokenizerFast.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.BertTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/tokenization_bert_fast.py#L249",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>
`}}),_d=new N({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.BertTokenizerFast.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.BertTokenizerFast.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.BertTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/tokenization_bert_fast.py#L273",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>
`}}),ua=new Te({props:{anchor:"transformers.BertTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[RS]},$$scope:{ctx:x}}}),bd=new We({}),yd=new N({props:{name:"class transformers.TFBertTokenizer",anchor:"transformers.TFBertTokenizer",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBertTokenizer.vocab_list",description:`<strong>vocab_list</strong> (<code>list</code>) &#x2014;
List containing the vocabulary.`,name:"vocab_list"},{anchor:"transformers.TFBertTokenizer.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.TFBertTokenizer.cls_token_id",description:`<strong>cls_token_id</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_id"},{anchor:"transformers.TFBertTokenizer.sep_token_id",description:`<strong>sep_token_id</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_id"},{anchor:"transformers.TFBertTokenizer.pad_token_id",description:`<strong>pad_token_id</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_id"},{anchor:"transformers.TFBertTokenizer.padding",description:`<strong>padding</strong> (<code>str</code>, defaults to <code>&quot;longest&quot;</code>) &#x2014;
The type of padding to use. Can be either <code>&quot;longest&quot;</code>, to pad only up to the longest sample in the batch,
or \`&#x201C;max_length&#x201D;, to pad all inputs to the maximum length supported by the tokenizer.`,name:"padding"},{anchor:"transformers.TFBertTokenizer.truncation",description:`<strong>truncation</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to truncate the sequence to the maximum length.`,name:"truncation"},{anchor:"transformers.TFBertTokenizer.max_length",description:`<strong>max_length</strong> (<code>int</code>, <em>optional</em>, defaults to <code>512</code>) &#x2014;
The maximum length of the sequence, used for padding (if <code>padding</code> is &#x201C;max_length&#x201D;) and/or truncation (if
<code>truncation</code> is <code>True</code>).`,name:"max_length"},{anchor:"transformers.TFBertTokenizer.pad_to_multiple_of",description:`<strong>pad_to_multiple_of</strong> (<code>int</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
If set, the sequence will be padded to a multiple of this value.`,name:"pad_to_multiple_of"},{anchor:"transformers.TFBertTokenizer.return_token_type_ids",description:`<strong>return_token_type_ids</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to return token_type_ids.`,name:"return_token_type_ids"},{anchor:"transformers.TFBertTokenizer.return_attention_mask",description:`<strong>return_attention_mask</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to return the attention_mask.`,name:"return_attention_mask"},{anchor:"transformers.TFBertTokenizer.use_fast_bert_tokenizer",description:`<strong>use_fast_bert_tokenizer</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If True, will use the FastBertTokenizer class from Tensorflow Text. If False, will use the BertTokenizer
class instead. BertTokenizer supports some additional options, but is slower and cannot be exported to
TFLite.`,name:"use_fast_bert_tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/tokenization_bert_tf.py#L11"}}),vd=new N({props:{name:"from_pretrained",anchor:"transformers.TFBertTokenizer.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike]"},{name:"*init_inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBertTokenizer.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
The name or path to the pre-trained tokenizer.`,name:"pretrained_model_name_or_path"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/tokenization_bert_tf.py#L143"}}),_a=new Te({props:{anchor:"transformers.TFBertTokenizer.from_pretrained.example",$$slots:{default:[GS]},$$scope:{ctx:x}}}),wd=new N({props:{name:"from_tokenizer",anchor:"transformers.TFBertTokenizer.from_tokenizer",parameters:[{name:"tokenizer",val:": PreTrainedTokenizerBase"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBertTokenizer.from_tokenizer.tokenizer",description:`<strong>tokenizer</strong> (<code>PreTrainedTokenizerBase</code>) &#x2014;
The tokenizer to use to initialize the <code>TFBertTokenizer</code>.`,name:"tokenizer"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/tokenization_bert_tf.py#L104"}}),ba=new Te({props:{anchor:"transformers.TFBertTokenizer.from_tokenizer.example",$$slots:{default:[VS]},$$scope:{ctx:x}}}),Md=new We({}),Fd=new N({props:{name:"class transformers.models.bert.modeling_bert.BertForPreTrainingOutput",anchor:"transformers.models.bert.modeling_bert.BertForPreTrainingOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prediction_logits",val:": FloatTensor = None"},{name:"seq_relationship_logits",val:": FloatTensor = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],parametersDescription:[{anchor:"transformers.models.bert.modeling_bert.BertForPreTrainingOutput.loss",description:`<strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) &#x2014;
Total loss as the sum of the masked language modeling loss and the next sequence prediction
(classification) loss.`,name:"loss"},{anchor:"transformers.models.bert.modeling_bert.BertForPreTrainingOutput.prediction_logits",description:`<strong>prediction_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) &#x2014;
Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).`,name:"prediction_logits"},{anchor:"transformers.models.bert.modeling_bert.BertForPreTrainingOutput.seq_relationship_logits",description:`<strong>seq_relationship_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, 2)</code>) &#x2014;
Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
before SoftMax).`,name:"seq_relationship_logits"},{anchor:"transformers.models.bert.modeling_bert.BertForPreTrainingOutput.hidden_states",description:`<strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.`,name:"hidden_states"},{anchor:"transformers.models.bert.modeling_bert.BertForPreTrainingOutput.attentions",description:`<strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L771"}}),xd=new N({props:{name:"class transformers.models.bert.modeling_tf_bert.TFBertForPreTrainingOutput",anchor:"transformers.models.bert.modeling_tf_bert.TFBertForPreTrainingOutput",parameters:[{name:"loss",val:": tf.Tensor | None = None"},{name:"prediction_logits",val:": tf.Tensor = None"},{name:"seq_relationship_logits",val:": tf.Tensor = None"},{name:"hidden_states",val:": Optional[Union[Tuple[tf.Tensor], tf.Tensor]] = None"},{name:"attentions",val:": Optional[Union[Tuple[tf.Tensor], tf.Tensor]] = None"}],parametersDescription:[{anchor:"transformers.models.bert.modeling_tf_bert.TFBertForPreTrainingOutput.prediction_logits",description:`<strong>prediction_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) &#x2014;
Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).`,name:"prediction_logits"},{anchor:"transformers.models.bert.modeling_tf_bert.TFBertForPreTrainingOutput.seq_relationship_logits",description:`<strong>seq_relationship_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, 2)</code>) &#x2014;
Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
before SoftMax).`,name:"seq_relationship_logits"},{anchor:"transformers.models.bert.modeling_tf_bert.TFBertForPreTrainingOutput.hidden_states",description:`<strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.`,name:"hidden_states"},{anchor:"transformers.models.bert.modeling_tf_bert.TFBertForPreTrainingOutput.attentions",description:`<strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L906"}}),Ed=new N({props:{name:"class transformers.models.bert.modeling_flax_bert.FlaxBertForPreTrainingOutput",anchor:"transformers.models.bert.modeling_flax_bert.FlaxBertForPreTrainingOutput",parameters:[{name:"prediction_logits",val:": Array = None"},{name:"seq_relationship_logits",val:": Array = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[jax.Array]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[jax.Array]] = None"}],parametersDescription:[{anchor:"transformers.models.bert.modeling_flax_bert.FlaxBertForPreTrainingOutput.prediction_logits",description:`<strong>prediction_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) &#x2014;
Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).`,name:"prediction_logits"},{anchor:"transformers.models.bert.modeling_flax_bert.FlaxBertForPreTrainingOutput.seq_relationship_logits",description:`<strong>seq_relationship_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, 2)</code>) &#x2014;
Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
before SoftMax).`,name:"seq_relationship_logits"},{anchor:"transformers.models.bert.modeling_flax_bert.FlaxBertForPreTrainingOutput.hidden_states",description:`<strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.`,name:"hidden_states"},{anchor:"transformers.models.bert.modeling_flax_bert.FlaxBertForPreTrainingOutput.attentions",description:`<strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L62"}}),zd=new N({props:{name:"replace",anchor:"transformers.models.bert.modeling_flax_bert.FlaxBertForPreTrainingOutput.replace",parameters:[{name:"**updates",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/flax/struct.py#L111"}}),Jd=new We({}),Cd=new N({props:{name:"class transformers.BertModel",anchor:"transformers.BertModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.BertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L874"}}),qd=new N({props:{name:"forward",anchor:"transformers.BertModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = 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.BertModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.BertModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BertModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.BertModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</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.BertModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.BertModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.BertModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BertModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BertModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BertModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.BertModel.forward.encoder_attention_mask",description:`<strong>encoder_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 the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. 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>`,name:"encoder_attention_mask"},{anchor:"transformers.BertModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.BertModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L913",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</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>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</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>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ka=new Ae({props:{$$slots:{default:[SS]},$$scope:{ctx:x}}}),wa=new Te({props:{anchor:"transformers.BertModel.forward.example",$$slots:{default:[XS]},$$scope:{ctx:x}}}),Ad=new We({}),Zd=new N({props:{name:"class transformers.BertForPreTraining",anchor:"transformers.BertForPreTraining",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BertForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L1057"}}),Sd=new N({props:{name:"forward",anchor:"transformers.BertForPreTraining.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"next_sentence_label",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BertForPreTraining.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.BertForPreTraining.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BertForPreTraining.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.BertForPreTraining.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</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.BertForPreTraining.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.BertForPreTraining.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.BertForPreTraining.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BertForPreTraining.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BertForPreTraining.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.</p>
<p>labels (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>):
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>
next_sentence_label (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>):
Labels for computing the next sequence prediction (classification) loss. Input should be a sequence
pair (see <code>input_ids</code> docstring) Indices should be in <code>[0, 1]</code>:</p>
<ul>
<li>0 indicates sequence B is a continuation of sequence A,</li>
<li>1 indicates sequence B is a random sequence.
kwargs (<code>Dict[str, any]</code>, optional, defaults to <em>{}</em>):
Used to hide legacy arguments that have been deprecated.</li>
</ul>`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L1075",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/model_doc/bert#transformers.models.bert.modeling_bert.BertForPreTrainingOutput"
>transformers.models.bert.modeling_bert.BertForPreTrainingOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) \u2014 Total loss as the sum of the masked language modeling loss and the next sequence prediction
(classification) loss.</p>
</li>
<li>
<p><strong>prediction_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>seq_relationship_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, 2)</code>) \u2014 Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/model_doc/bert#transformers.models.bert.modeling_bert.BertForPreTrainingOutput"
>transformers.models.bert.modeling_bert.BertForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Fa=new Ae({props:{$$slots:{default:[LS]},$$scope:{ctx:x}}}),$a=new Te({props:{anchor:"transformers.BertForPreTraining.forward.example",$$slots:{default:[OS]},$$scope:{ctx:x}}}),Xd=new We({}),Ld=new N({props:{name:"class transformers.BertLMHeadModel",anchor:"transformers.BertLMHeadModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BertLMHeadModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L1163"}}),Yd=new N({props:{name:"forward",anchor:"transformers.BertLMHeadModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.Tensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = 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.BertLMHeadModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.BertLMHeadModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BertLMHeadModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.BertLMHeadModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</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.BertLMHeadModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.BertLMHeadModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.BertLMHeadModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BertLMHeadModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BertLMHeadModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BertLMHeadModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.BertLMHeadModel.forward.encoder_attention_mask",description:`<strong>encoder_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 the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. 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>`,name:"encoder_attention_mask"},{anchor:"transformers.BertLMHeadModel.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the left-to-right language modeling loss (next word prediction). 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 n <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.BertLMHeadModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.BertLMHeadModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L1184",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</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 Language modeling loss (for next-token prediction).</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>
<li>
<p><strong>cross_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>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ba=new Ae({props:{$$slots:{default:[DS]},$$scope:{ctx:x}}}),Ea=new Te({props:{anchor:"transformers.BertLMHeadModel.forward.example",$$slots:{default:[QS]},$$scope:{ctx:x}}}),Kd=new We({}),ec=new N({props:{name:"class transformers.BertForMaskedLM",anchor:"transformers.BertForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L1302"}}),ac=new N({props:{name:"forward",anchor:"transformers.BertForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BertForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.BertForMaskedLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BertForMaskedLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.BertForMaskedLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</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.BertForMaskedLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.BertForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.BertForMaskedLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BertForMaskedLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BertForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BertForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L1326",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),za=new Ae({props:{$$slots:{default:[HS]},$$scope:{ctx:x}}}),Ja=new Te({props:{anchor:"transformers.BertForMaskedLM.forward.example",$$slots:{default:[YS]},$$scope:{ctx:x}}}),rc=new We({}),ic=new N({props:{name:"class transformers.BertForNextSentencePrediction",anchor:"transformers.BertForNextSentencePrediction",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BertForNextSentencePrediction.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L1412"}}),hc=new N({props:{name:"forward",anchor:"transformers.BertForNextSentencePrediction.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BertForNextSentencePrediction.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.BertForNextSentencePrediction.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BertForNextSentencePrediction.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.BertForNextSentencePrediction.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</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.BertForNextSentencePrediction.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.BertForNextSentencePrediction.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.BertForNextSentencePrediction.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BertForNextSentencePrediction.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BertForNextSentencePrediction.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BertForNextSentencePrediction.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the next sequence prediction (classification) loss. Input should be a sequence pair
(see <code>input_ids</code> docstring). Indices should be in <code>[0, 1]</code>:</p>
<ul>
<li>0 indicates sequence B is a continuation of sequence A,</li>
<li>1 indicates sequence B is a random sequence.</li>
</ul>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L1422",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.NextSentencePredictorOutput"
>transformers.modeling_outputs.NextSentencePredictorOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</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>next_sentence_label</code> is provided) \u2014 Next sequence prediction (classification) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, 2)</code>) \u2014 Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.NextSentencePredictorOutput"
>transformers.modeling_outputs.NextSentencePredictorOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ia=new Ae({props:{$$slots:{default:[KS]},$$scope:{ctx:x}}}),Ua=new Te({props:{anchor:"transformers.BertForNextSentencePrediction.forward.example",$$slots:{default:[eX]},$$scope:{ctx:x}}}),mc=new We({}),fc=new N({props:{name:"class transformers.BertForSequenceClassification",anchor:"transformers.BertForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L1517"}}),bc=new N({props:{name:"forward",anchor:"transformers.BertForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BertForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.BertForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BertForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.BertForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</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.BertForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.BertForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.BertForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BertForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BertForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BertForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L1533",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Pa=new Ae({props:{$$slots:{default:[tX]},$$scope:{ctx:x}}}),Wa=new Te({props:{anchor:"transformers.BertForSequenceClassification.forward.example",$$slots:{default:[oX]},$$scope:{ctx:x}}}),qa=new Te({props:{anchor:"transformers.BertForSequenceClassification.forward.example-2",$$slots:{default:[nX]},$$scope:{ctx:x}}}),yc=new We({}),Tc=new N({props:{name:"class transformers.BertForMultipleChoice",anchor:"transformers.BertForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L1620"}}),Mc=new N({props:{name:"forward",anchor:"transformers.BertForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BertForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.BertForMultipleChoice.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BertForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.BertForMultipleChoice.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</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.BertForMultipleChoice.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.BertForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.BertForMultipleChoice.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BertForMultipleChoice.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BertForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BertForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L1634",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Za=new Ae({props:{$$slots:{default:[sX]},$$scope:{ctx:x}}}),Ra=new Te({props:{anchor:"transformers.BertForMultipleChoice.forward.example",$$slots:{default:[aX]},$$scope:{ctx:x}}}),Fc=new We({}),$c=new N({props:{name:"class transformers.BertForTokenClassification",anchor:"transformers.BertForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L1714"}}),jc=new N({props:{name:"forward",anchor:"transformers.BertForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BertForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.BertForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BertForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.BertForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</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.BertForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.BertForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.BertForTokenClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BertForTokenClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BertForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BertForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L1729",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Va=new Ae({props:{$$slots:{default:[rX]},$$scope:{ctx:x}}}),Sa=new Te({props:{anchor:"transformers.BertForTokenClassification.forward.example",$$slots:{default:[iX]},$$scope:{ctx:x}}}),zc=new We({}),Jc=new N({props:{name:"class transformers.BertForQuestionAnswering",anchor:"transformers.BertForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L1797"}}),Nc=new N({props:{name:"forward",anchor:"transformers.BertForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"start_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"end_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BertForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.BertForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BertForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.BertForQuestionAnswering.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</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.BertForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</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.BertForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.BertForQuestionAnswering.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BertForQuestionAnswering.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.BertForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BertForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.BertForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_bert.py#L1808",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),La=new Ae({props:{$$slots:{default:[lX]},$$scope:{ctx:x}}}),Oa=new Te({props:{anchor:"transformers.BertForQuestionAnswering.forward.example",$$slots:{default:[dX]},$$scope:{ctx:x}}}),Pc=new We({}),Wc=new N({props:{name:"class transformers.TFBertModel",anchor:"transformers.TFBertModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L1038"}}),Qa=new Ae({props:{$$slots:{default:[cX]},$$scope:{ctx:x}}}),Rc=new N({props:{name:"call",anchor:"transformers.TFBertModel.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:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_hidden_states",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"use_cache",val:": Optional[bool] = 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:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFBertModel.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFBertModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</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.TFBertModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</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.TFBertModel.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</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.TFBertModel.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFBertModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <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.TFBertModel.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.TFBertModel.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.TFBertModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFBertModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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.TFBertModel.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFBertModel.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. 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>`,name:"encoder_attention_mask"},{anchor:"transformers.TFBertModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFBertModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L1044",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</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>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you\u2019re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</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>
<li>
<p><strong>cross_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 of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ha=new Ae({props:{$$slots:{default:[pX]},$$scope:{ctx:x}}}),Ya=new Te({props:{anchor:"transformers.TFBertModel.call.example",$$slots:{default:[hX]},$$scope:{ctx:x}}}),Gc=new We({}),Vc=new N({props:{name:"class transformers.TFBertForPreTraining",anchor:"transformers.TFBertForPreTraining",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBertForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L1114"}}),er=new Ae({props:{$$slots:{default:[mX]},$$scope:{ctx:x}}}),Oc=new N({props:{name:"call",anchor:"transformers.TFBertForPreTraining.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:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"next_sentence_label",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFBertForPreTraining.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFBertForPreTraining.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</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.TFBertForPreTraining.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</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.TFBertForPreTraining.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</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.TFBertForPreTraining.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFBertForPreTraining.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <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.TFBertForPreTraining.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.TFBertForPreTraining.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.TFBertForPreTraining.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFBertForPreTraining.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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.TFBertForPreTraining.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"},{anchor:"transformers.TFBertForPreTraining.call.next_sentence_label",description:`<strong>next_sentence_label</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the next sequence prediction (classification) loss. Input should be a sequence pair
(see <code>input_ids</code> docstring) Indices should be in <code>[0, 1]</code>:</p>
<ul>
<li>0 indicates sequence B is a continuation of sequence A,</li>
<li>1 indicates sequence B is a random sequence.</li>
</ul>`,name:"next_sentence_label"},{anchor:"transformers.TFBertForPreTraining.call.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, any]</code>, optional, defaults to <em>{}</em>) &#x2014;
Used to hide legacy arguments that have been deprecated.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L1136",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/model_doc/bert#transformers.models.bert.modeling_tf_bert.TFBertForPreTrainingOutput"
>transformers.models.bert.modeling_tf_bert.TFBertForPreTrainingOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>prediction_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>seq_relationship_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, 2)</code>) \u2014 Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/model_doc/bert#transformers.models.bert.modeling_tf_bert.TFBertForPreTrainingOutput"
>transformers.models.bert.modeling_tf_bert.TFBertForPreTrainingOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),tr=new Ae({props:{$$slots:{default:[fX]},$$scope:{ctx:x}}}),or=new Te({props:{anchor:"transformers.TFBertForPreTraining.call.example",$$slots:{default:[uX]},$$scope:{ctx:x}}}),Dc=new We({}),Qc=new N({props:{name:"class transformers.TFBertLMHeadModel",anchor:"transformers.TFBertLMHeadModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L1305"}}),Hc=new N({props:{name:"call",anchor:"transformers.TFBertLMHeadModel.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:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_hidden_states",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L1342",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</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 Language modeling loss (for next-token prediction).</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>
<li>
<p><strong>cross_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 of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),sr=new Te({props:{anchor:"transformers.TFBertLMHeadModel.call.example",$$slots:{default:[gX]},$$scope:{ctx:x}}}),tp=new We({}),op=new N({props:{name:"class transformers.TFBertForMaskedLM",anchor:"transformers.TFBertForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L1220"}}),rr=new Ae({props:{$$slots:{default:[_X]},$$scope:{ctx:x}}}),ip=new N({props:{name:"call",anchor:"transformers.TFBertForMaskedLM.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:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFBertForMaskedLM.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFBertForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</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.TFBertForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</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.TFBertForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</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.TFBertForMaskedLM.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFBertForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <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.TFBertForMaskedLM.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.TFBertForMaskedLM.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.TFBertForMaskedLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFBertForMaskedLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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.TFBertForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L1248",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ir=new Ae({props:{$$slots:{default:[bX]},$$scope:{ctx:x}}}),lr=new Te({props:{anchor:"transformers.TFBertForMaskedLM.call.example",$$slots:{default:[yX]},$$scope:{ctx:x}}}),dr=new Te({props:{anchor:"transformers.TFBertForMaskedLM.call.example-2",$$slots:{default:[TX]},$$scope:{ctx:x}}}),lp=new We({}),dp=new N({props:{name:"class transformers.TFBertForNextSentencePrediction",anchor:"transformers.TFBertForNextSentencePrediction",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBertForNextSentencePrediction.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L1434"}}),pr=new Ae({props:{$$slots:{default:[vX]},$$scope:{ctx:x}}}),fp=new N({props:{name:"call",anchor:"transformers.TFBertForNextSentencePrediction.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:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"next_sentence_label",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFBertForNextSentencePrediction.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFBertForNextSentencePrediction.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</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.TFBertForNextSentencePrediction.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</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.TFBertForNextSentencePrediction.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</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.TFBertForNextSentencePrediction.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFBertForNextSentencePrediction.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <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.TFBertForNextSentencePrediction.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.TFBertForNextSentencePrediction.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.TFBertForNextSentencePrediction.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFBertForNextSentencePrediction.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L1444",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFNextSentencePredictorOutput"
>transformers.modeling_tf_outputs.TFNextSentencePredictorOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</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>next_sentence_label</code> is provided) \u2014 Next sentence prediction loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, 2)</code>) \u2014 Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFNextSentencePredictorOutput"
>transformers.modeling_tf_outputs.TFNextSentencePredictorOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),hr=new Ae({props:{$$slots:{default:[kX]},$$scope:{ctx:x}}}),mr=new Te({props:{anchor:"transformers.TFBertForNextSentencePrediction.call.example",$$slots:{default:[wX]},$$scope:{ctx:x}}}),up=new We({}),gp=new N({props:{name:"class transformers.TFBertForSequenceClassification",anchor:"transformers.TFBertForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L1519"}}),ur=new Ae({props:{$$slots:{default:[MX]},$$scope:{ctx:x}}}),Tp=new N({props:{name:"call",anchor:"transformers.TFBertForSequenceClassification.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:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFBertForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFBertForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</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.TFBertForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</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.TFBertForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</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.TFBertForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFBertForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <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.TFBertForSequenceClassification.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.TFBertForSequenceClassification.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.TFBertForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFBertForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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.TFBertForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L1540",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),gr=new Ae({props:{$$slots:{default:[FX]},$$scope:{ctx:x}}}),_r=new Te({props:{anchor:"transformers.TFBertForSequenceClassification.call.example",$$slots:{default:[$X]},$$scope:{ctx:x}}}),br=new Te({props:{anchor:"transformers.TFBertForSequenceClassification.call.example-2",$$slots:{default:[xX]},$$scope:{ctx:x}}}),vp=new We({}),kp=new N({props:{name:"class transformers.TFBertForMultipleChoice",anchor:"transformers.TFBertForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L1605"}}),Tr=new Ae({props:{$$slots:{default:[BX]},$$scope:{ctx:x}}}),$p=new N({props:{name:"call",anchor:"transformers.TFBertForMultipleChoice.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:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFBertForMultipleChoice.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFBertForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</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.TFBertForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</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.TFBertForMultipleChoice.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</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.TFBertForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFBertForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <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.TFBertForMultipleChoice.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.TFBertForMultipleChoice.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.TFBertForMultipleChoice.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFBertForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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.TFBertForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L1619",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),vr=new Ae({props:{$$slots:{default:[EX]},$$scope:{ctx:x}}}),kr=new Te({props:{anchor:"transformers.TFBertForMultipleChoice.call.example",$$slots:{default:[jX]},$$scope:{ctx:x}}}),xp=new We({}),Bp=new N({props:{name:"class transformers.TFBertForTokenClassification",anchor:"transformers.TFBertForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L1704"}}),Mr=new Ae({props:{$$slots:{default:[zX]},$$scope:{ctx:x}}}),Jp=new N({props:{name:"call",anchor:"transformers.TFBertForTokenClassification.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:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFBertForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFBertForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</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.TFBertForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</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.TFBertForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</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.TFBertForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFBertForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <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.TFBertForTokenClassification.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.TFBertForTokenClassification.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.TFBertForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFBertForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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.TFBertForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L1731",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Fr=new Ae({props:{$$slots:{default:[JX]},$$scope:{ctx:x}}}),$r=new Te({props:{anchor:"transformers.TFBertForTokenClassification.call.example",$$slots:{default:[CX]},$$scope:{ctx:x}}}),xr=new Te({props:{anchor:"transformers.TFBertForTokenClassification.call.example-2",$$slots:{default:[IX]},$$scope:{ctx:x}}}),Cp=new We({}),Ip=new N({props:{name:"class transformers.TFBertForQuestionAnswering",anchor:"transformers.TFBertForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L1794"}}),Er=new Ae({props:{$$slots:{default:[UX]},$$scope:{ctx:x}}}),Wp=new N({props:{name:"call",anchor:"transformers.TFBertForQuestionAnswering.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:": np.ndarray | tf.Tensor | None = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"start_positions",val:": np.ndarray | tf.Tensor | None = None"},{name:"end_positions",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFBertForQuestionAnswering.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFBertForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</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.TFBertForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</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.TFBertForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</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.TFBertForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</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.TFBertForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <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.TFBertForQuestionAnswering.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.TFBertForQuestionAnswering.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.TFBertForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFBertForQuestionAnswering.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#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.TFBertForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> or <code>np.ndarray</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.TFBertForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_tf_bert.py#L1816",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),jr=new Ae({props:{$$slots:{default:[NX]},$$scope:{ctx:x}}}),zr=new Te({props:{anchor:"transformers.TFBertForQuestionAnswering.call.example",$$slots:{default:[PX]},$$scope:{ctx:x}}}),Jr=new Te({props:{anchor:"transformers.TFBertForQuestionAnswering.call.example-2",$$slots:{default:[WX]},$$scope:{ctx:x}}}),qp=new We({}),Ap=new N({props:{name:"class transformers.FlaxBertModel",anchor:"transformers.FlaxBertModel",parameters:[{name:"config",val:": BertConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBertModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"},{anchor:"transformers.FlaxBertModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L1029"}}),Op=new N({props:{name:"__call__",anchor:"transformers.FlaxBertModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxBertModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FlaxBertModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxBertModel.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxBertModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxBertModel.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</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.FlaxBertModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L856",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</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>pooler_output</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ir=new Ae({props:{$$slots:{default:[qX]},$$scope:{ctx:x}}}),Ur=new Te({props:{anchor:"transformers.FlaxBertModel.__call__.example",$$slots:{default:[AX]},$$scope:{ctx:x}}}),Dp=new We({}),Qp=new N({props:{name:"class transformers.FlaxBertForPreTraining",anchor:"transformers.FlaxBertForPreTraining",parameters:[{name:"config",val:": BertConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBertForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBertForPreTraining.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"},{anchor:"transformers.FlaxBertForPreTraining.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L1104"}}),sh=new N({props:{name:"__call__",anchor:"transformers.FlaxBertForPreTraining.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxBertForPreTraining.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FlaxBertForPreTraining.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxBertForPreTraining.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxBertForPreTraining.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxBertForPreTraining.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</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.FlaxBertForPreTraining.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L856",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/model_doc/bert#transformers.models.bert.modeling_flax_bert.FlaxBertForPreTrainingOutput"
>transformers.models.bert.modeling_flax_bert.FlaxBertForPreTrainingOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>prediction_logits</strong> (<code>jnp.ndarray</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>seq_relationship_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, 2)</code>) \u2014 Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/model_doc/bert#transformers.models.bert.modeling_flax_bert.FlaxBertForPreTrainingOutput"
>transformers.models.bert.modeling_flax_bert.FlaxBertForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Pr=new Ae({props:{$$slots:{default:[ZX]},$$scope:{ctx:x}}}),Wr=new Te({props:{anchor:"transformers.FlaxBertForPreTraining.__call__.example",$$slots:{default:[RX]},$$scope:{ctx:x}}}),ah=new We({}),rh=new N({props:{name:"class transformers.FlaxBertForCausalLM",anchor:"transformers.FlaxBertForCausalLM",parameters:[{name:"config",val:": BertConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBertForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBertForCausalLM.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"},{anchor:"transformers.FlaxBertForCausalLM.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L1677"}}),fh=new N({props:{name:"__call__",anchor:"transformers.FlaxBertForCausalLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxBertForCausalLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FlaxBertForCausalLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxBertForCausalLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxBertForCausalLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxBertForCausalLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</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.FlaxBertForCausalLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L856",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key, value
states of the self-attention and the cross-attention layers if model is used in encoder-decoder setting.
Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ar=new Ae({props:{$$slots:{default:[GX]},$$scope:{ctx:x}}}),Zr=new Te({props:{anchor:"transformers.FlaxBertForCausalLM.__call__.example",$$slots:{default:[VX]},$$scope:{ctx:x}}}),uh=new We({}),gh=new N({props:{name:"class transformers.FlaxBertForMaskedLM",anchor:"transformers.FlaxBertForMaskedLM",parameters:[{name:"config",val:": BertConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBertForMaskedLM.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"},{anchor:"transformers.FlaxBertForMaskedLM.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L1195"}}),Fh=new N({props:{name:"__call__",anchor:"transformers.FlaxBertForMaskedLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxBertForMaskedLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FlaxBertForMaskedLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxBertForMaskedLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxBertForMaskedLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxBertForMaskedLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</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.FlaxBertForMaskedLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L856",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Gr=new Ae({props:{$$slots:{default:[SX]},$$scope:{ctx:x}}}),Vr=new Te({props:{anchor:"transformers.FlaxBertForMaskedLM.__call__.example",$$slots:{default:[XX]},$$scope:{ctx:x}}}),$h=new We({}),xh=new N({props:{name:"class transformers.FlaxBertForNextSentencePrediction",anchor:"transformers.FlaxBertForNextSentencePrediction",parameters:[{name:"config",val:": BertConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBertForNextSentencePrediction.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBertForNextSentencePrediction.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"},{anchor:"transformers.FlaxBertForNextSentencePrediction.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L1259"}}),Nh=new N({props:{name:"__call__",anchor:"transformers.FlaxBertForNextSentencePrediction.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxBertForNextSentencePrediction.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FlaxBertForNextSentencePrediction.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxBertForNextSentencePrediction.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxBertForNextSentencePrediction.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxBertForNextSentencePrediction.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</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.FlaxBertForNextSentencePrediction.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L856",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxNextSentencePredictorOutput"
>transformers.modeling_flax_outputs.FlaxNextSentencePredictorOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, 2)</code>) \u2014 Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxNextSentencePredictorOutput"
>transformers.modeling_flax_outputs.FlaxNextSentencePredictorOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Xr=new Ae({props:{$$slots:{default:[LX]},$$scope:{ctx:x}}}),Lr=new Te({props:{anchor:"transformers.FlaxBertForNextSentencePrediction.__call__.example",$$slots:{default:[OX]},$$scope:{ctx:x}}}),Ph=new We({}),Wh=new N({props:{name:"class transformers.FlaxBertForSequenceClassification",anchor:"transformers.FlaxBertForSequenceClassification",parameters:[{name:"config",val:": BertConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBertForSequenceClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"},{anchor:"transformers.FlaxBertForSequenceClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L1362"}}),Xh=new N({props:{name:"__call__",anchor:"transformers.FlaxBertForSequenceClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxBertForSequenceClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FlaxBertForSequenceClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxBertForSequenceClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxBertForSequenceClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxBertForSequenceClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</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.FlaxBertForSequenceClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L856",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Dr=new Ae({props:{$$slots:{default:[DX]},$$scope:{ctx:x}}}),Qr=new Te({props:{anchor:"transformers.FlaxBertForSequenceClassification.__call__.example",$$slots:{default:[QX]},$$scope:{ctx:x}}}),Lh=new We({}),Oh=new N({props:{name:"class transformers.FlaxBertForMultipleChoice",anchor:"transformers.FlaxBertForMultipleChoice",parameters:[{name:"config",val:": BertConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBertForMultipleChoice.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"},{anchor:"transformers.FlaxBertForMultipleChoice.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L1442"}}),om=new N({props:{name:"__call__",anchor:"transformers.FlaxBertForMultipleChoice.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxBertForMultipleChoice.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FlaxBertForMultipleChoice.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxBertForMultipleChoice.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxBertForMultipleChoice.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxBertForMultipleChoice.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</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.FlaxBertForMultipleChoice.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L856",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Yr=new Ae({props:{$$slots:{default:[HX]},$$scope:{ctx:x}}}),Kr=new Te({props:{anchor:"transformers.FlaxBertForMultipleChoice.__call__.example",$$slots:{default:[YX]},$$scope:{ctx:x}}}),nm=new We({}),sm=new N({props:{name:"class transformers.FlaxBertForTokenClassification",anchor:"transformers.FlaxBertForTokenClassification",parameters:[{name:"config",val:": BertConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBertForTokenClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"},{anchor:"transformers.FlaxBertForTokenClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L1520"}}),hm=new N({props:{name:"__call__",anchor:"transformers.FlaxBertForTokenClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxBertForTokenClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FlaxBertForTokenClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxBertForTokenClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxBertForTokenClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxBertForTokenClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</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.FlaxBertForTokenClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L856",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ti=new Ae({props:{$$slots:{default:[KX]},$$scope:{ctx:x}}}),oi=new Te({props:{anchor:"transformers.FlaxBertForTokenClassification.__call__.example",$$slots:{default:[e8]},$$scope:{ctx:x}}}),mm=new We({}),fm=new N({props:{name:"class transformers.FlaxBertForQuestionAnswering",anchor:"transformers.FlaxBertForQuestionAnswering",parameters:[{name:"config",val:": BertConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig">BertConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBertForQuestionAnswering.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"},{anchor:"transformers.FlaxBertForQuestionAnswering.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L1593"}}),km=new N({props:{name:"__call__",anchor:"transformers.FlaxBertForQuestionAnswering.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxBertForQuestionAnswering.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FlaxBertForQuestionAnswering.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</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.FlaxBertForQuestionAnswering.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxBertForQuestionAnswering.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxBertForQuestionAnswering.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</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.FlaxBertForQuestionAnswering.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/bert/modeling_flax_bert.py#L856",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/bert#transformers.BertConfig"
>BertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),si=new Ae({props:{$$slots:{default:[t8]},$$scope:{ctx:x}}}),ai=new Te({props:{anchor:"transformers.FlaxBertForQuestionAnswering.__call__.example",$$slots:{default:[o8]},$$scope:{ctx:x}}}),{c(){d=s("meta"),y=c(),f=s("h1"),u=s("a"),b=s("span"),v(l.$$.fragment),m=c(),E=s("span"),Ee=o("BERT"),we=c(),Z=s("div"),he=s("a"),ee=s("img"),je=c(),G=s("a"),me=s("img"),O=c(),ie=s("h2"),le=s("a"),V=s("span"),v(de.$$.fragment),ze=c(),S=s("span"),Je=o("Overview"),Me=c(),R=s("p"),Ce=o("The BERT model was proposed in "),ce=s("a"),ae=o("BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding"),J=o(` by Jacob Devlin, Ming-Wei Chang, Kenton Lee and Kristina Toutanova. It\u2019s a
bidirectional transformer pretrained using a combination of masked language modeling objective and next sentence
prediction on a large corpus comprising the Toronto Book Corpus and Wikipedia.`),U=c(),fe=s("p"),D=o("The abstract from the paper is the following:"),Fe=c(),ue=s("p"),X=s("em"),Ie=o(`We introduce a new language representation model called BERT, which stands for Bidirectional Encoder Representations
from Transformers. Unlike recent language representation models, BERT is designed to pre-train deep bidirectional
representations from unlabeled text by jointly conditioning on both left and right context in all layers. As a result,
the pre-trained BERT model can be fine-tuned with just one additional output layer to create state-of-the-art models
for a wide range of tasks, such as question answering and language inference, without substantial task-specific
architecture modifications.`),$e=c(),C=s("p"),_e=s("em"),Q=o(`BERT is conceptually simple and empirically powerful. It obtains new state-of-the-art results on eleven natural
language processing tasks, including pushing the GLUE score to 80.5% (7.7% point absolute improvement), MultiNLI
accuracy to 86.7% (4.6% absolute improvement), SQuAD v1.1 question answering Test F1 to 93.2 (1.5 point absolute
improvement) and SQuAD v2.0 Test F1 to 83.1 (5.1 point absolute improvement).`),xe=c(),ge=s("p"),H=o("Tips:"),Be=c(),se=s("ul"),W=s("li"),be=s("p"),Y=o(`BERT is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather than
the left.`),Ue=c(),te=s("li"),I=s("p"),Ne=o(`BERT was trained with the masked language modeling (MLM) and next sentence prediction (NSP) objectives. It is
efficient at predicting masked tokens and at NLU in general, but is not optimal for text generation.`),P=c(),pe=s("li"),ye=s("p"),T=o("Corrupts the inputs by using random masking, more precisely, during pretraining, a given percentage of tokens (usually 15%) is masked by:"),j=c(),Ze=s("ul"),oe=s("li"),Se=o("a special mask token with probability 0.8"),Xe=c(),z=s("li"),Le=o("a random token different from the one masked with probability 0.1"),Oe=c(),Ge=s("li"),De=o("the same token with probability 0.1"),Qe=c(),q=s("li"),L=s("p"),He=o("The model must predict the original sentence, but has a second objective: inputs are two sentences A and B (with a separation token in between). With probability 50%, the sentences are consecutive in the corpus, in the remaining 50% they are not related. The model has to predict if the sentences are consecutive or not."),Ve=c(),A=s("p"),Ye=o("This model was contributed by "),Re=s("a"),Pe=o("thomwolf"),Ke=o(". The original code can be found "),K=s("a"),et=o("here"),wM=o("."),Jv=c(),Nn=s("h2"),aa=s("a"),rg=s("span"),v(Ai.$$.fragment),MM=c(),ig=s("span"),FM=o("Resources"),Cv=c(),Rm=s("p"),$M=o("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with BERT. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),Iv=c(),v(Zi.$$.fragment),Uv=c(),tt=s("ul"),Ri=s("li"),xM=o("A blog post on "),Gi=s("a"),BM=o("BERT Text Classification in a different language"),EM=o("."),jM=c(),Vi=s("li"),zM=o("A notebook for "),Si=s("a"),JM=o("Finetuning BERT (and friends) for multi-label text classification"),CM=o("."),IM=c(),Xi=s("li"),UM=o("A notebook on how to "),Li=s("a"),NM=o("Finetune BERT for multi-label classification using PyTorch"),PM=o(". \u{1F30E}"),WM=c(),Oi=s("li"),qM=o("A notebook on how to "),Di=s("a"),AM=o("warm-start an EncoderDecoder model with BERT for summarization"),ZM=o("."),RM=c(),Qo=s("li"),Gm=s("a"),GM=o("BertForSequenceClassification"),VM=o(" is supported by this "),Qi=s("a"),SM=o("example script"),XM=o(" and "),Hi=s("a"),LM=o("notebook"),OM=o("."),DM=c(),Ho=s("li"),Vm=s("a"),QM=o("TFBertForSequenceClassification"),HM=o(" is supported by this "),Yi=s("a"),YM=o("example script"),KM=o(" and "),Ki=s("a"),e2=o("notebook"),t2=o("."),o2=c(),Yo=s("li"),Sm=s("a"),n2=o("FlaxBertForSequenceClassification"),s2=o(" is supported by this "),el=s("a"),a2=o("example script"),r2=o(" and "),tl=s("a"),i2=o("notebook"),l2=o("."),d2=c(),lg=s("li"),Xm=s("a"),c2=o("Text classification task guide"),Nv=c(),v(ol.$$.fragment),Pv=c(),ut=s("ul"),nl=s("li"),p2=o("A blog post on how to use "),sl=s("a"),h2=o("Hugging Face Transformers with Keras: Fine-tune a non-English BERT for Named Entity Recognition"),m2=o("."),f2=c(),Pn=s("li"),u2=o("A notebook for "),al=s("a"),g2=o("Finetuning BERT for named-entity recognition"),_2=o(" using only the first wordpiece of each word in the word label during tokenization. To propagate the label of the word to all wordpieces, see this "),rl=s("a"),b2=o("version"),y2=o(" of the notebook instead."),T2=c(),Ko=s("li"),Lm=s("a"),v2=o("BertForTokenClassification"),k2=o(" is supported by this "),il=s("a"),w2=o("example script"),M2=o(" and "),ll=s("a"),F2=o("notebook"),$2=o("."),x2=c(),en=s("li"),Om=s("a"),B2=o("TFBertForTokenClassification"),E2=o(" is supported by this "),dl=s("a"),j2=o("example script"),z2=o(" and "),cl=s("a"),J2=o("notebook"),C2=o("."),I2=c(),ra=s("li"),Dm=s("a"),U2=o("FlaxBertForTokenClassification"),N2=o(" is supported by this "),pl=s("a"),P2=o("example script"),W2=o("."),q2=c(),Qm=s("li"),hl=s("a"),A2=o("Token classification"),Z2=o(" chapter of the \u{1F917} Hugging Face Course."),R2=c(),dg=s("li"),Hm=s("a"),G2=o("Token classification task guide"),Wv=c(),v(ml.$$.fragment),qv=c(),Wt=s("ul"),tn=s("li"),Ym=s("a"),V2=o("BertForMaskedLM"),S2=o(" is supported by this "),fl=s("a"),X2=o("example script"),L2=o(" and "),ul=s("a"),O2=o("notebook"),D2=o("."),Q2=c(),on=s("li"),Km=s("a"),H2=o("TFBertForMaskedLM"),Y2=o(" is supported by this "),gl=s("a"),K2=o("example script"),e0=o(" and "),_l=s("a"),t0=o("notebook"),o0=o("."),n0=c(),nn=s("li"),ef=s("a"),s0=o("FlaxBertForMaskedLM"),a0=o(" is supported by this "),bl=s("a"),r0=o("example script"),i0=o(" and "),yl=s("a"),l0=o("notebook"),d0=o("."),c0=c(),tf=s("li"),Tl=s("a"),p0=o("Masked language modeling"),h0=o(" chapter of the \u{1F917} Hugging Face Course."),m0=c(),cg=s("li"),of=s("a"),f0=o("Masked language modeling task guide"),Av=c(),v(vl.$$.fragment),Zv=c(),qt=s("ul"),sn=s("li"),nf=s("a"),u0=o("BertForQuestionAnswering"),g0=o(" is supported by this "),kl=s("a"),_0=o("example script"),b0=o(" and "),wl=s("a"),y0=o("notebook"),T0=o("."),v0=c(),an=s("li"),sf=s("a"),k0=o("TFBertForQuestionAnswering"),w0=o(" is supported by this "),Ml=s("a"),M0=o("example script"),F0=o(" and "),Fl=s("a"),$0=o("notebook"),x0=o("."),B0=c(),ia=s("li"),af=s("a"),E0=o("FlaxBertForQuestionAnswering"),j0=o(" is supported by this "),$l=s("a"),z0=o("example script"),J0=o("."),C0=c(),rf=s("li"),xl=s("a"),I0=o("Question answering"),U0=o(" chapter of the \u{1F917} Hugging Face Course."),N0=c(),pg=s("li"),lf=s("a"),P0=o("Question answering task guide"),Rv=c(),df=s("p"),hg=s("strong"),W0=o("Multiple choice"),Gv=c(),rn=s("ul"),ln=s("li"),cf=s("a"),q0=o("BertForMultipleChoice"),A0=o(" is supported by this "),Bl=s("a"),Z0=o("example script"),R0=o(" and "),El=s("a"),G0=o("notebook"),V0=o("."),S0=c(),dn=s("li"),pf=s("a"),X0=o("TFBertForMultipleChoice"),L0=o(" is supported by this "),jl=s("a"),O0=o("example script"),D0=o(" and "),zl=s("a"),Q0=o("notebook"),H0=o("."),Y0=c(),mg=s("li"),hf=s("a"),K0=o("Multiple choice task guide"),Vv=c(),Jl=s("p"),eF=o("\u26A1\uFE0F "),fg=s("strong"),tF=o("Inference"),Sv=c(),la=s("ul"),Cl=s("li"),oF=o("A blog post on how to "),Il=s("a"),nF=o("Accelerate BERT inference with Hugging Face Transformers and AWS Inferentia"),sF=o("."),aF=c(),Ul=s("li"),rF=o("A blog post on how to "),Nl=s("a"),iF=o("Accelerate BERT inference with DeepSpeed-Inference on GPUs"),lF=o("."),Xv=c(),Pl=s("p"),dF=o("\u2699\uFE0F "),ug=s("strong"),cF=o("Pretraining"),Lv=c(),mf=s("ul"),Wl=s("li"),pF=o("A blog post on "),ql=s("a"),hF=o("Pre-Training BERT with Hugging Face Transformers and Habana Gaudi"),mF=o("."),Ov=c(),Al=s("p"),fF=o("\u{1F680} "),gg=s("strong"),uF=o("Deploy"),Dv=c(),$t=s("ul"),Zl=s("li"),gF=o("A blog post on how to "),Rl=s("a"),_F=o("Convert Transformers to ONNX with Hugging Face Optimum"),bF=o("."),yF=c(),Gl=s("li"),TF=o("A blog post on how to "),Vl=s("a"),vF=o("Setup Deep Learning environment for Hugging Face Transformers with Habana Gaudi on AWS"),kF=o("."),wF=c(),Sl=s("li"),MF=o("A blog post on "),Xl=s("a"),FF=o("Autoscaling BERT with Hugging Face Transformers, Amazon SageMaker and Terraform module"),$F=o("."),xF=c(),Ll=s("li"),BF=o("A blog post on "),Ol=s("a"),EF=o("Serverless BERT with HuggingFace, AWS Lambda, and Docker"),jF=o("."),zF=c(),Dl=s("li"),JF=o("A blog post on "),Ql=s("a"),CF=o("Hugging Face Transformers BERT fine-tuning using Amazon SageMaker and Training Compiler"),IF=o("."),UF=c(),Hl=s("li"),NF=o("A blog post on "),Yl=s("a"),PF=o("Task-specific knowledge distillation for BERT using Transformers & Amazon SageMaker"),WF=o("."),Qv=c(),Wn=s("h2"),da=s("a"),_g=s("span"),v(Kl.$$.fragment),qF=c(),bg=s("span"),AF=o("BertConfig"),Hv=c(),so=s("div"),v(ed.$$.fragment),ZF=c(),Wo=s("p"),RF=o("This is the configuration class to store the configuration of a "),ff=s("a"),GF=o("BertModel"),VF=o(" or a "),uf=s("a"),SF=o("TFBertModel"),XF=o(`. It is used to
instantiate a BERT 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 BERT
`),td=s("a"),LF=o("bert-base-uncased"),OF=o(" architecture."),DF=c(),qn=s("p"),QF=o("Configuration objects inherit from "),gf=s("a"),HF=o("PretrainedConfig"),YF=o(` and can be used to control the model outputs. Read the
documentation from `),_f=s("a"),KF=o("PretrainedConfig"),e$=o(" for more information."),t$=c(),v(ca.$$.fragment),Yv=c(),An=s("h2"),pa=s("a"),yg=s("span"),v(od.$$.fragment),o$=c(),Tg=s("span"),n$=o("BertTokenizer"),Kv=c(),ot=s("div"),v(nd.$$.fragment),s$=c(),vg=s("p"),a$=o("Construct a BERT tokenizer. Based on WordPiece."),r$=c(),sd=s("p"),i$=o("This tokenizer inherits from "),bf=s("a"),l$=o("PreTrainedTokenizer"),d$=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),c$=c(),cn=s("div"),v(ad.$$.fragment),p$=c(),kg=s("p"),h$=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A BERT sequence has the following format:`),m$=c(),rd=s("ul"),yf=s("li"),f$=o("single sequence: "),wg=s("code"),u$=o("[CLS] X [SEP]"),g$=c(),Tf=s("li"),_$=o("pair of sequences: "),Mg=s("code"),b$=o("[CLS] A [SEP] B [SEP]"),y$=c(),ha=s("div"),v(id.$$.fragment),T$=c(),ld=s("p"),v$=o(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Fg=s("code"),k$=o("prepare_for_model"),w$=o(" method."),M$=c(),ao=s("div"),v(dd.$$.fragment),F$=c(),$g=s("p"),$$=o("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A BERT sequence"),x$=c(),v(ma.$$.fragment),B$=c(),Zn=s("p"),E$=o("If "),xg=s("code"),j$=o("token_ids_1"),z$=o(" is "),Bg=s("code"),J$=o("None"),C$=o(", this method only returns the first portion of the mask (0s)."),I$=c(),vf=s("div"),v(cd.$$.fragment),ek=c(),Rn=s("h2"),fa=s("a"),Eg=s("span"),v(pd.$$.fragment),U$=c(),jg=s("span"),N$=o("BertTokenizerFast"),tk=c(),Bt=s("div"),v(hd.$$.fragment),P$=c(),md=s("p"),W$=o("Construct a \u201Cfast\u201D BERT tokenizer (backed by HuggingFace\u2019s "),zg=s("em"),q$=o("tokenizers"),A$=o(" library). Based on WordPiece."),Z$=c(),fd=s("p"),R$=o("This tokenizer inherits from "),kf=s("a"),G$=o("PreTrainedTokenizerFast"),V$=o(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),S$=c(),pn=s("div"),v(ud.$$.fragment),X$=c(),Jg=s("p"),L$=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A BERT sequence has the following format:`),O$=c(),gd=s("ul"),wf=s("li"),D$=o("single sequence: "),Cg=s("code"),Q$=o("[CLS] X [SEP]"),H$=c(),Mf=s("li"),Y$=o("pair of sequences: "),Ig=s("code"),K$=o("[CLS] A [SEP] B [SEP]"),ex=c(),ro=s("div"),v(_d.$$.fragment),tx=c(),Ug=s("p"),ox=o("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A BERT sequence"),nx=c(),v(ua.$$.fragment),sx=c(),Gn=s("p"),ax=o("If "),Ng=s("code"),rx=o("token_ids_1"),ix=o(" is "),Pg=s("code"),lx=o("None"),dx=o(", this method only returns the first portion of the mask (0s)."),ok=c(),Vn=s("h2"),ga=s("a"),Wg=s("span"),v(bd.$$.fragment),cx=c(),qg=s("span"),px=o("TFBertTokenizer"),nk=c(),Et=s("div"),v(yd.$$.fragment),hx=c(),Sn=s("p"),mx=o(`This is an in-graph tokenizer for BERT. It should be initialized similarly to other tokenizers, using the
`),Ag=s("code"),fx=o("from_pretrained()"),ux=o(" method. It can also be initialized with the "),Zg=s("code"),gx=o("from_tokenizer()"),_x=o(` method, which imports settings
from an existing standard tokenizer object.`),bx=c(),Td=s("p"),yx=o(`In-graph tokenizers, unlike other Hugging Face tokenizers, are actually Keras layers and are designed to be run
when the model is called, rather than during preprocessing. As a result, they have somewhat more limited options
than standard tokenizer classes. They are most useful when you want to create an end-to-end model that goes
straight from `),Rg=s("code"),Tx=o("tf.string"),vx=o(" inputs to outputs."),kx=c(),hn=s("div"),v(vd.$$.fragment),wx=c(),kd=s("p"),Mx=o("Instantiate a "),Gg=s("code"),Fx=o("TFBertTokenizer"),$x=o(" from a pre-trained tokenizer."),xx=c(),v(_a.$$.fragment),Bx=c(),mn=s("div"),v(wd.$$.fragment),Ex=c(),Xn=s("p"),jx=o("Initialize a "),Vg=s("code"),zx=o("TFBertTokenizer"),Jx=o(" from an existing "),Sg=s("code"),Cx=o("Tokenizer"),Ix=o("."),Ux=c(),v(ba.$$.fragment),sk=c(),Ln=s("h2"),ya=s("a"),Xg=s("span"),v(Md.$$.fragment),Nx=c(),Lg=s("span"),Px=o("Bert specific outputs"),ak=c(),On=s("div"),v(Fd.$$.fragment),Wx=c(),$d=s("p"),qx=o("Output type of "),Ff=s("a"),Ax=o("BertForPreTraining"),Zx=o("."),rk=c(),Dn=s("div"),v(xd.$$.fragment),Rx=c(),Bd=s("p"),Gx=o("Output type of "),$f=s("a"),Vx=o("TFBertForPreTraining"),Sx=o("."),ik=c(),qo=s("div"),v(Ed.$$.fragment),Xx=c(),jd=s("p"),Lx=o("Output type of "),xf=s("a"),Ox=o("BertForPreTraining"),Dx=o("."),Qx=c(),Ta=s("div"),v(zd.$$.fragment),Hx=c(),Og=s("p"),Yx=o("\u201CReturns a new object replacing the specified fields with new values."),lk=c(),Qn=s("h2"),va=s("a"),Dg=s("span"),v(Jd.$$.fragment),Kx=c(),Qg=s("span"),eB=o("BertModel"),dk=c(),nt=s("div"),v(Cd.$$.fragment),tB=c(),Hg=s("p"),oB=o("The bare Bert Model transformer outputting raw hidden-states without any specific head on top."),nB=c(),Id=s("p"),sB=o("This model inherits from "),Bf=s("a"),aB=o("PreTrainedModel"),rB=o(`. 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.)`),iB=c(),Ud=s("p"),lB=o("This model is also a PyTorch "),Nd=s("a"),dB=o("torch.nn.Module"),cB=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),pB=c(),Pd=s("p"),hB=o(`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),Wd=s("a"),mB=o(`Attention is
all you need`),fB=o(` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),uB=c(),gt=s("p"),gB=o("To behave as an decoder the model needs to be initialized with the "),Yg=s("code"),_B=o("is_decoder"),bB=o(` argument of the configuration set
to `),Kg=s("code"),yB=o("True"),TB=o(". To be used in a Seq2Seq model, the model needs to initialized with both "),e_=s("code"),vB=o("is_decoder"),kB=o(` argument and
`),t_=s("code"),wB=o("add_cross_attention"),MB=o(" set to "),o_=s("code"),FB=o("True"),$B=o("; an "),n_=s("code"),xB=o("encoder_hidden_states"),BB=o(" is then expected as an input to the forward pass."),EB=c(),io=s("div"),v(qd.$$.fragment),jB=c(),Hn=s("p"),zB=o("The "),Ef=s("a"),JB=o("BertModel"),CB=o(" forward method, overrides the "),s_=s("code"),IB=o("__call__"),UB=o(" special method."),NB=c(),v(ka.$$.fragment),PB=c(),v(wa.$$.fragment),ck=c(),Yn=s("h2"),Ma=s("a"),a_=s("span"),v(Ad.$$.fragment),WB=c(),r_=s("span"),qB=o("BertForPreTraining"),pk=c(),jt=s("div"),v(Zd.$$.fragment),AB=c(),Kn=s("p"),ZB=o("Bert Model with two heads on top as done during the pretraining: a "),i_=s("code"),RB=o("masked language modeling"),GB=o(" head and a "),l_=s("code"),VB=o("next sentence prediction (classification)"),SB=o(" head."),XB=c(),Rd=s("p"),LB=o("This model inherits from "),jf=s("a"),OB=o("PreTrainedModel"),DB=o(`. 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.)`),QB=c(),Gd=s("p"),HB=o("This model is also a PyTorch "),Vd=s("a"),YB=o("torch.nn.Module"),KB=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),eE=c(),lo=s("div"),v(Sd.$$.fragment),tE=c(),es=s("p"),oE=o("The "),zf=s("a"),nE=o("BertForPreTraining"),sE=o(" forward method, overrides the "),d_=s("code"),aE=o("__call__"),rE=o(" special method."),iE=c(),v(Fa.$$.fragment),lE=c(),v($a.$$.fragment),hk=c(),ts=s("h2"),xa=s("a"),c_=s("span"),v(Xd.$$.fragment),dE=c(),p_=s("span"),cE=o("BertLMHeadModel"),mk=c(),zt=s("div"),v(Ld.$$.fragment),pE=c(),Od=s("p"),hE=o("Bert Model with a "),h_=s("code"),mE=o("language modeling"),fE=o(" head on top for CLM fine-tuning."),uE=c(),Dd=s("p"),gE=o("This model inherits from "),Jf=s("a"),_E=o("PreTrainedModel"),bE=o(`. 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.)`),yE=c(),Qd=s("p"),TE=o("This model is also a PyTorch "),Hd=s("a"),vE=o("torch.nn.Module"),kE=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),wE=c(),co=s("div"),v(Yd.$$.fragment),ME=c(),os=s("p"),FE=o("The "),Cf=s("a"),$E=o("BertLMHeadModel"),xE=o(" forward method, overrides the "),m_=s("code"),BE=o("__call__"),EE=o(" special method."),jE=c(),v(Ba.$$.fragment),zE=c(),v(Ea.$$.fragment),fk=c(),ns=s("h2"),ja=s("a"),f_=s("span"),v(Kd.$$.fragment),JE=c(),u_=s("span"),CE=o("BertForMaskedLM"),uk=c(),Jt=s("div"),v(ec.$$.fragment),IE=c(),tc=s("p"),UE=o("Bert Model with a "),g_=s("code"),NE=o("language modeling"),PE=o(" head on top."),WE=c(),oc=s("p"),qE=o("This model inherits from "),If=s("a"),AE=o("PreTrainedModel"),ZE=o(`. 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.)`),RE=c(),nc=s("p"),GE=o("This model is also a PyTorch "),sc=s("a"),VE=o("torch.nn.Module"),SE=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),XE=c(),po=s("div"),v(ac.$$.fragment),LE=c(),ss=s("p"),OE=o("The "),Uf=s("a"),DE=o("BertForMaskedLM"),QE=o(" forward method, overrides the "),__=s("code"),HE=o("__call__"),YE=o(" special method."),KE=c(),v(za.$$.fragment),ej=c(),v(Ja.$$.fragment),gk=c(),as=s("h2"),Ca=s("a"),b_=s("span"),v(rc.$$.fragment),tj=c(),y_=s("span"),oj=o("BertForNextSentencePrediction"),_k=c(),Ct=s("div"),v(ic.$$.fragment),nj=c(),lc=s("p"),sj=o("Bert Model with a "),T_=s("code"),aj=o("next sentence prediction (classification)"),rj=o(" head on top."),ij=c(),dc=s("p"),lj=o("This model inherits from "),Nf=s("a"),dj=o("PreTrainedModel"),cj=o(`. 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.)`),pj=c(),cc=s("p"),hj=o("This model is also a PyTorch "),pc=s("a"),mj=o("torch.nn.Module"),fj=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),uj=c(),ho=s("div"),v(hc.$$.fragment),gj=c(),rs=s("p"),_j=o("The "),Pf=s("a"),bj=o("BertForNextSentencePrediction"),yj=o(" forward method, overrides the "),v_=s("code"),Tj=o("__call__"),vj=o(" special method."),kj=c(),v(Ia.$$.fragment),wj=c(),v(Ua.$$.fragment),bk=c(),is=s("h2"),Na=s("a"),k_=s("span"),v(mc.$$.fragment),Mj=c(),w_=s("span"),Fj=o("BertForSequenceClassification"),yk=c(),It=s("div"),v(fc.$$.fragment),$j=c(),M_=s("p"),xj=o(`Bert Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),Bj=c(),uc=s("p"),Ej=o("This model inherits from "),Wf=s("a"),jj=o("PreTrainedModel"),zj=o(`. 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.)`),Jj=c(),gc=s("p"),Cj=o("This model is also a PyTorch "),_c=s("a"),Ij=o("torch.nn.Module"),Uj=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Nj=c(),At=s("div"),v(bc.$$.fragment),Pj=c(),ls=s("p"),Wj=o("The "),qf=s("a"),qj=o("BertForSequenceClassification"),Aj=o(" forward method, overrides the "),F_=s("code"),Zj=o("__call__"),Rj=o(" special method."),Gj=c(),v(Pa.$$.fragment),Vj=c(),v(Wa.$$.fragment),Sj=c(),v(qa.$$.fragment),Tk=c(),ds=s("h2"),Aa=s("a"),$_=s("span"),v(yc.$$.fragment),Xj=c(),x_=s("span"),Lj=o("BertForMultipleChoice"),vk=c(),Ut=s("div"),v(Tc.$$.fragment),Oj=c(),B_=s("p"),Dj=o(`Bert 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.`),Qj=c(),vc=s("p"),Hj=o("This model inherits from "),Af=s("a"),Yj=o("PreTrainedModel"),Kj=o(`. 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.)`),ez=c(),kc=s("p"),tz=o("This model is also a PyTorch "),wc=s("a"),oz=o("torch.nn.Module"),nz=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),sz=c(),mo=s("div"),v(Mc.$$.fragment),az=c(),cs=s("p"),rz=o("The "),Zf=s("a"),iz=o("BertForMultipleChoice"),lz=o(" forward method, overrides the "),E_=s("code"),dz=o("__call__"),cz=o(" special method."),pz=c(),v(Za.$$.fragment),hz=c(),v(Ra.$$.fragment),kk=c(),ps=s("h2"),Ga=s("a"),j_=s("span"),v(Fc.$$.fragment),mz=c(),z_=s("span"),fz=o("BertForTokenClassification"),wk=c(),Nt=s("div"),v($c.$$.fragment),uz=c(),J_=s("p"),gz=o(`Bert 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.`),_z=c(),xc=s("p"),bz=o("This model inherits from "),Rf=s("a"),yz=o("PreTrainedModel"),Tz=o(`. 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.)`),vz=c(),Bc=s("p"),kz=o("This model is also a PyTorch "),Ec=s("a"),wz=o("torch.nn.Module"),Mz=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fz=c(),fo=s("div"),v(jc.$$.fragment),$z=c(),hs=s("p"),xz=o("The "),Gf=s("a"),Bz=o("BertForTokenClassification"),Ez=o(" forward method, overrides the "),C_=s("code"),jz=o("__call__"),zz=o(" special method."),Jz=c(),v(Va.$$.fragment),Cz=c(),v(Sa.$$.fragment),Mk=c(),ms=s("h2"),Xa=s("a"),I_=s("span"),v(zc.$$.fragment),Iz=c(),U_=s("span"),Uz=o("BertForQuestionAnswering"),Fk=c(),Pt=s("div"),v(Jc.$$.fragment),Nz=c(),fs=s("p"),Pz=o(`Bert 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 `),N_=s("code"),Wz=o("span start logits"),qz=o(" and "),P_=s("code"),Az=o("span end logits"),Zz=o(")."),Rz=c(),Cc=s("p"),Gz=o("This model inherits from "),Vf=s("a"),Vz=o("PreTrainedModel"),Sz=o(`. 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.)`),Xz=c(),Ic=s("p"),Lz=o("This model is also a PyTorch "),Uc=s("a"),Oz=o("torch.nn.Module"),Dz=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Qz=c(),uo=s("div"),v(Nc.$$.fragment),Hz=c(),us=s("p"),Yz=o("The "),Sf=s("a"),Kz=o("BertForQuestionAnswering"),eJ=o(" forward method, overrides the "),W_=s("code"),tJ=o("__call__"),oJ=o(" special method."),nJ=c(),v(La.$$.fragment),sJ=c(),v(Oa.$$.fragment),$k=c(),gs=s("h2"),Da=s("a"),q_=s("span"),v(Pc.$$.fragment),aJ=c(),A_=s("span"),rJ=o("TFBertModel"),xk=c(),_t=s("div"),v(Wc.$$.fragment),iJ=c(),Z_=s("p"),lJ=o("The bare Bert Model transformer outputting raw hidden-states without any specific head on top."),dJ=c(),qc=s("p"),cJ=o("This model inherits from "),Xf=s("a"),pJ=o("TFPreTrainedModel"),hJ=o(`. 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.)`),mJ=c(),Ac=s("p"),fJ=o("This model is also a "),Zc=s("a"),uJ=o("tf.keras.Model"),gJ=o(` 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.`),_J=c(),v(Qa.$$.fragment),bJ=c(),go=s("div"),v(Rc.$$.fragment),yJ=c(),_s=s("p"),TJ=o("The "),Lf=s("a"),vJ=o("TFBertModel"),kJ=o(" forward method, overrides the "),R_=s("code"),wJ=o("__call__"),MJ=o(" special method."),FJ=c(),v(Ha.$$.fragment),$J=c(),v(Ya.$$.fragment),Bk=c(),bs=s("h2"),Ka=s("a"),G_=s("span"),v(Gc.$$.fragment),xJ=c(),V_=s("span"),BJ=o("TFBertForPreTraining"),Ek=c(),bt=s("div"),v(Vc.$$.fragment),EJ=c(),ys=s("p"),jJ=o(`Bert Model with two heads on top as done during the pretraining:
a `),S_=s("code"),zJ=o("masked language modeling"),JJ=o(" head and a "),X_=s("code"),CJ=o("next sentence prediction (classification)"),IJ=o(" head."),UJ=c(),Sc=s("p"),NJ=o("This model inherits from "),Of=s("a"),PJ=o("TFPreTrainedModel"),WJ=o(`. 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.)`),qJ=c(),Xc=s("p"),AJ=o("This model is also a "),Lc=s("a"),ZJ=o("tf.keras.Model"),RJ=o(` 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.`),GJ=c(),v(er.$$.fragment),VJ=c(),_o=s("div"),v(Oc.$$.fragment),SJ=c(),Ts=s("p"),XJ=o("The "),Df=s("a"),LJ=o("TFBertForPreTraining"),OJ=o(" forward method, overrides the "),L_=s("code"),DJ=o("__call__"),QJ=o(" special method."),HJ=c(),v(tr.$$.fragment),YJ=c(),v(or.$$.fragment),jk=c(),vs=s("h2"),nr=s("a"),O_=s("span"),v(Dc.$$.fragment),KJ=c(),D_=s("span"),eC=o("TFBertModelLMHeadModel"),zk=c(),ks=s("div"),v(Qc.$$.fragment),tC=c(),Zt=s("div"),v(Hc.$$.fragment),oC=c(),st=s("p"),nC=o("encoder_hidden_states  ("),Q_=s("code"),sC=o("tf.Tensor"),aC=o(" of shape "),H_=s("code"),rC=o("(batch_size, sequence_length, hidden_size)"),iC=o(", "),Y_=s("em"),lC=o("optional"),dC=o(`):
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.
encoder_attention_mask (`),K_=s("code"),cC=o("tf.Tensor"),pC=o(" of shape "),eb=s("code"),hC=o("(batch_size, sequence_length)"),mC=o(", "),tb=s("em"),fC=o("optional"),uC=o(`):
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in `),ob=s("code"),gC=o("[0, 1]"),_C=o(":"),bC=c(),Yc=s("ul"),Kc=s("li"),yC=o("1 for tokens that are "),nb=s("strong"),TC=o("not masked"),vC=o(","),kC=c(),ep=s("li"),wC=o("0 for tokens that are "),sb=s("strong"),MC=o("masked"),FC=o("."),$C=c(),ne=s("p"),xC=o("past_key_values ("),ab=s("code"),BC=o("Tuple[Tuple[tf.Tensor]]"),EC=o(" of length "),rb=s("code"),jC=o("config.n_layers"),zC=o(`)
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If `),ib=s("code"),JC=o("past_key_values"),CC=o(" are used, the user can optionally input only the last "),lb=s("code"),IC=o("decoder_input_ids"),UC=o(` (those that
don\u2019t have their past key value states given to this model) of shape `),db=s("code"),NC=o("(batch_size, 1)"),PC=o(` instead of all
`),cb=s("code"),WC=o("decoder_input_ids"),qC=o(" of shape "),pb=s("code"),AC=o("(batch_size, sequence_length)"),ZC=o(`.
use_cache (`),hb=s("code"),RC=o("bool"),GC=o(", "),mb=s("em"),VC=o("optional"),SC=o(", defaults to "),fb=s("code"),XC=o("True"),LC=o(`):
If set to `),ub=s("code"),OC=o("True"),DC=o(", "),gb=s("code"),QC=o("past_key_values"),HC=o(` key value states are returned and can be used to speed up decoding (see
`),_b=s("code"),YC=o("past_key_values"),KC=o("). Set to "),bb=s("code"),eI=o("False"),tI=o(" during training, "),yb=s("code"),oI=o("True"),nI=o(` during generation
labels (`),Tb=s("code"),sI=o("tf.Tensor"),aI=o(" or "),vb=s("code"),rI=o("np.ndarray"),iI=o(" of shape "),kb=s("code"),lI=o("(batch_size, sequence_length)"),dI=o(", "),wb=s("em"),cI=o("optional"),pI=o(`):
Labels for computing the cross entropy classification loss. Indices should be in `),Mb=s("code"),hI=o("[0, ..., config.vocab_size - 1]"),mI=o("."),fI=c(),v(sr.$$.fragment),Jk=c(),ws=s("h2"),ar=s("a"),Fb=s("span"),v(tp.$$.fragment),uI=c(),$b=s("span"),gI=o("TFBertForMaskedLM"),Ck=c(),yt=s("div"),v(op.$$.fragment),_I=c(),np=s("p"),bI=o("Bert Model with a "),xb=s("code"),yI=o("language modeling"),TI=o(" head on top."),vI=c(),sp=s("p"),kI=o("This model inherits from "),Qf=s("a"),wI=o("TFPreTrainedModel"),MI=o(`. 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.)`),FI=c(),ap=s("p"),$I=o("This model is also a "),rp=s("a"),xI=o("tf.keras.Model"),BI=o(` 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.`),EI=c(),v(rr.$$.fragment),jI=c(),Rt=s("div"),v(ip.$$.fragment),zI=c(),Ms=s("p"),JI=o("The "),Hf=s("a"),CI=o("TFBertForMaskedLM"),II=o(" forward method, overrides the "),Bb=s("code"),UI=o("__call__"),NI=o(" special method."),PI=c(),v(ir.$$.fragment),WI=c(),v(lr.$$.fragment),qI=c(),v(dr.$$.fragment),Ik=c(),Fs=s("h2"),cr=s("a"),Eb=s("span"),v(lp.$$.fragment),AI=c(),jb=s("span"),ZI=o("TFBertForNextSentencePrediction"),Uk=c(),Tt=s("div"),v(dp.$$.fragment),RI=c(),cp=s("p"),GI=o("Bert Model with a "),zb=s("code"),VI=o("next sentence prediction (classification)"),SI=o(" head on top."),XI=c(),pp=s("p"),LI=o("This model inherits from "),Yf=s("a"),OI=o("TFPreTrainedModel"),DI=o(`. 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.)`),QI=c(),hp=s("p"),HI=o("This model is also a "),mp=s("a"),YI=o("tf.keras.Model"),KI=o(` 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.`),e4=c(),v(pr.$$.fragment),t4=c(),bo=s("div"),v(fp.$$.fragment),o4=c(),$s=s("p"),n4=o("The "),Kf=s("a"),s4=o("TFBertForNextSentencePrediction"),a4=o(" forward method, overrides the "),Jb=s("code"),r4=o("__call__"),i4=o(" special method."),l4=c(),v(hr.$$.fragment),d4=c(),v(mr.$$.fragment),Nk=c(),xs=s("h2"),fr=s("a"),Cb=s("span"),v(up.$$.fragment),c4=c(),Ib=s("span"),p4=o("TFBertForSequenceClassification"),Pk=c(),vt=s("div"),v(gp.$$.fragment),h4=c(),Ub=s("p"),m4=o(`Bert Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),f4=c(),_p=s("p"),u4=o("This model inherits from "),eu=s("a"),g4=o("TFPreTrainedModel"),_4=o(`. 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.)`),b4=c(),bp=s("p"),y4=o("This model is also a "),yp=s("a"),T4=o("tf.keras.Model"),v4=o(` 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.`),k4=c(),v(ur.$$.fragment),w4=c(),Gt=s("div"),v(Tp.$$.fragment),M4=c(),Bs=s("p"),F4=o("The "),tu=s("a"),$4=o("TFBertForSequenceClassification"),x4=o(" forward method, overrides the "),Nb=s("code"),B4=o("__call__"),E4=o(" special method."),j4=c(),v(gr.$$.fragment),z4=c(),v(_r.$$.fragment),J4=c(),v(br.$$.fragment),Wk=c(),Es=s("h2"),yr=s("a"),Pb=s("span"),v(vp.$$.fragment),C4=c(),Wb=s("span"),I4=o("TFBertForMultipleChoice"),qk=c(),kt=s("div"),v(kp.$$.fragment),U4=c(),qb=s("p"),N4=o(`Bert 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.`),P4=c(),wp=s("p"),W4=o("This model inherits from "),ou=s("a"),q4=o("TFPreTrainedModel"),A4=o(`. 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.)`),Z4=c(),Mp=s("p"),R4=o("This model is also a "),Fp=s("a"),G4=o("tf.keras.Model"),V4=o(` 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.`),S4=c(),v(Tr.$$.fragment),X4=c(),yo=s("div"),v($p.$$.fragment),L4=c(),js=s("p"),O4=o("The "),nu=s("a"),D4=o("TFBertForMultipleChoice"),Q4=o(" forward method, overrides the "),Ab=s("code"),H4=o("__call__"),Y4=o(" special method."),K4=c(),v(vr.$$.fragment),e5=c(),v(kr.$$.fragment),Ak=c(),zs=s("h2"),wr=s("a"),Zb=s("span"),v(xp.$$.fragment),t5=c(),Rb=s("span"),o5=o("TFBertForTokenClassification"),Zk=c(),wt=s("div"),v(Bp.$$.fragment),n5=c(),Gb=s("p"),s5=o(`Bert 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.`),a5=c(),Ep=s("p"),r5=o("This model inherits from "),su=s("a"),i5=o("TFPreTrainedModel"),l5=o(`. 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.)`),d5=c(),jp=s("p"),c5=o("This model is also a "),zp=s("a"),p5=o("tf.keras.Model"),h5=o(` 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.`),m5=c(),v(Mr.$$.fragment),f5=c(),Vt=s("div"),v(Jp.$$.fragment),u5=c(),Js=s("p"),g5=o("The "),au=s("a"),_5=o("TFBertForTokenClassification"),b5=o(" forward method, overrides the "),Vb=s("code"),y5=o("__call__"),T5=o(" special method."),v5=c(),v(Fr.$$.fragment),k5=c(),v($r.$$.fragment),w5=c(),v(xr.$$.fragment),Rk=c(),Cs=s("h2"),Br=s("a"),Sb=s("span"),v(Cp.$$.fragment),M5=c(),Xb=s("span"),F5=o("TFBertForQuestionAnswering"),Gk=c(),Mt=s("div"),v(Ip.$$.fragment),$5=c(),Is=s("p"),x5=o(`Bert 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 `),Lb=s("code"),B5=o("span start logits"),E5=o(" and "),Ob=s("code"),j5=o("span end logits"),z5=o(")."),J5=c(),Up=s("p"),C5=o("This model inherits from "),ru=s("a"),I5=o("TFPreTrainedModel"),U5=o(`. 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.)`),N5=c(),Np=s("p"),P5=o("This model is also a "),Pp=s("a"),W5=o("tf.keras.Model"),q5=o(` 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.`),A5=c(),v(Er.$$.fragment),Z5=c(),St=s("div"),v(Wp.$$.fragment),R5=c(),Us=s("p"),G5=o("The "),iu=s("a"),V5=o("TFBertForQuestionAnswering"),S5=o(" forward method, overrides the "),Db=s("code"),X5=o("__call__"),L5=o(" special method."),O5=c(),v(jr.$$.fragment),D5=c(),v(zr.$$.fragment),Q5=c(),v(Jr.$$.fragment),Vk=c(),Ns=s("h2"),Cr=s("a"),Qb=s("span"),v(qp.$$.fragment),H5=c(),Hb=s("span"),Y5=o("FlaxBertModel"),Sk=c(),at=s("div"),v(Ap.$$.fragment),K5=c(),Yb=s("p"),e3=o("The bare Bert Model transformer outputting raw hidden-states without any specific head on top."),t3=c(),Zp=s("p"),o3=o("This model inherits from "),lu=s("a"),n3=o("FlaxPreTrainedModel"),s3=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),a3=c(),Rp=s("p"),r3=o("This model is also a Flax Linen "),Gp=s("a"),i3=o("flax.linen.Module"),l3=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),d3=c(),Kb=s("p"),c3=o("Finally, this model supports inherent JAX features such as:"),p3=c(),Ao=s("ul"),ey=s("li"),Vp=s("a"),h3=o("Just-In-Time (JIT) compilation"),m3=c(),ty=s("li"),Sp=s("a"),f3=o("Automatic Differentiation"),u3=c(),oy=s("li"),Xp=s("a"),g3=o("Vectorization"),_3=c(),ny=s("li"),Lp=s("a"),b3=o("Parallelization"),y3=c(),To=s("div"),v(Op.$$.fragment),T3=c(),Ps=s("p"),v3=o("The "),sy=s("code"),k3=o("FlaxBertPreTrainedModel"),w3=o(" forward method, overrides the "),ay=s("code"),M3=o("__call__"),F3=o(" special method."),$3=c(),v(Ir.$$.fragment),x3=c(),v(Ur.$$.fragment),Xk=c(),Ws=s("h2"),Nr=s("a"),ry=s("span"),v(Dp.$$.fragment),B3=c(),iy=s("span"),E3=o("FlaxBertForPreTraining"),Lk=c(),rt=s("div"),v(Qp.$$.fragment),j3=c(),qs=s("p"),z3=o("Bert Model with two heads on top as done during the pretraining: a "),ly=s("code"),J3=o("masked language modeling"),C3=o(" head and a "),dy=s("code"),I3=o("next sentence prediction (classification)"),U3=o(" head."),N3=c(),Hp=s("p"),P3=o("This model inherits from "),du=s("a"),W3=o("FlaxPreTrainedModel"),q3=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),A3=c(),Yp=s("p"),Z3=o("This model is also a Flax Linen "),Kp=s("a"),R3=o("flax.linen.Module"),G3=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),V3=c(),cy=s("p"),S3=o("Finally, this model supports inherent JAX features such as:"),X3=c(),Zo=s("ul"),py=s("li"),eh=s("a"),L3=o("Just-In-Time (JIT) compilation"),O3=c(),hy=s("li"),th=s("a"),D3=o("Automatic Differentiation"),Q3=c(),my=s("li"),oh=s("a"),H3=o("Vectorization"),Y3=c(),fy=s("li"),nh=s("a"),K3=o("Parallelization"),eU=c(),vo=s("div"),v(sh.$$.fragment),tU=c(),As=s("p"),oU=o("The "),uy=s("code"),nU=o("FlaxBertPreTrainedModel"),sU=o(" forward method, overrides the "),gy=s("code"),aU=o("__call__"),rU=o(" special method."),iU=c(),v(Pr.$$.fragment),lU=c(),v(Wr.$$.fragment),Ok=c(),Zs=s("h2"),qr=s("a"),_y=s("span"),v(ah.$$.fragment),dU=c(),by=s("span"),cU=o("FlaxBertForCausalLM"),Dk=c(),it=s("div"),v(rh.$$.fragment),pU=c(),yy=s("p"),hU=o(`Bert Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),mU=c(),ih=s("p"),fU=o("This model inherits from "),cu=s("a"),uU=o("FlaxPreTrainedModel"),gU=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),_U=c(),lh=s("p"),bU=o("This model is also a Flax Linen "),dh=s("a"),yU=o("flax.linen.Module"),TU=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),vU=c(),Ty=s("p"),kU=o("Finally, this model supports inherent JAX features such as:"),wU=c(),Ro=s("ul"),vy=s("li"),ch=s("a"),MU=o("Just-In-Time (JIT) compilation"),FU=c(),ky=s("li"),ph=s("a"),$U=o("Automatic Differentiation"),xU=c(),wy=s("li"),hh=s("a"),BU=o("Vectorization"),EU=c(),My=s("li"),mh=s("a"),jU=o("Parallelization"),zU=c(),ko=s("div"),v(fh.$$.fragment),JU=c(),Rs=s("p"),CU=o("The "),Fy=s("code"),IU=o("FlaxBertPreTrainedModel"),UU=o(" forward method, overrides the "),$y=s("code"),NU=o("__call__"),PU=o(" special method."),WU=c(),v(Ar.$$.fragment),qU=c(),v(Zr.$$.fragment),Qk=c(),Gs=s("h2"),Rr=s("a"),xy=s("span"),v(uh.$$.fragment),AU=c(),By=s("span"),ZU=o("FlaxBertForMaskedLM"),Hk=c(),lt=s("div"),v(gh.$$.fragment),RU=c(),_h=s("p"),GU=o("Bert Model with a "),Ey=s("code"),VU=o("language modeling"),SU=o(" head on top."),XU=c(),bh=s("p"),LU=o("This model inherits from "),pu=s("a"),OU=o("FlaxPreTrainedModel"),DU=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),QU=c(),yh=s("p"),HU=o("This model is also a Flax Linen "),Th=s("a"),YU=o("flax.linen.Module"),KU=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),eN=c(),jy=s("p"),tN=o("Finally, this model supports inherent JAX features such as:"),oN=c(),Go=s("ul"),zy=s("li"),vh=s("a"),nN=o("Just-In-Time (JIT) compilation"),sN=c(),Jy=s("li"),kh=s("a"),aN=o("Automatic Differentiation"),rN=c(),Cy=s("li"),wh=s("a"),iN=o("Vectorization"),lN=c(),Iy=s("li"),Mh=s("a"),dN=o("Parallelization"),cN=c(),wo=s("div"),v(Fh.$$.fragment),pN=c(),Vs=s("p"),hN=o("The "),Uy=s("code"),mN=o("FlaxBertPreTrainedModel"),fN=o(" forward method, overrides the "),Ny=s("code"),uN=o("__call__"),gN=o(" special method."),_N=c(),v(Gr.$$.fragment),bN=c(),v(Vr.$$.fragment),Yk=c(),Ss=s("h2"),Sr=s("a"),Py=s("span"),v($h.$$.fragment),yN=c(),Wy=s("span"),TN=o("FlaxBertForNextSentencePrediction"),Kk=c(),dt=s("div"),v(xh.$$.fragment),vN=c(),Bh=s("p"),kN=o("Bert Model with a "),qy=s("code"),wN=o("next sentence prediction (classification)"),MN=o(" head on top."),FN=c(),Eh=s("p"),$N=o("This model inherits from "),hu=s("a"),xN=o("FlaxPreTrainedModel"),BN=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),EN=c(),jh=s("p"),jN=o("This model is also a Flax Linen "),zh=s("a"),zN=o("flax.linen.Module"),JN=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),CN=c(),Ay=s("p"),IN=o("Finally, this model supports inherent JAX features such as:"),UN=c(),Vo=s("ul"),Zy=s("li"),Jh=s("a"),NN=o("Just-In-Time (JIT) compilation"),PN=c(),Ry=s("li"),Ch=s("a"),WN=o("Automatic Differentiation"),qN=c(),Gy=s("li"),Ih=s("a"),AN=o("Vectorization"),ZN=c(),Vy=s("li"),Uh=s("a"),RN=o("Parallelization"),GN=c(),Mo=s("div"),v(Nh.$$.fragment),VN=c(),Xs=s("p"),SN=o("The "),Sy=s("code"),XN=o("FlaxBertPreTrainedModel"),LN=o(" forward method, overrides the "),Xy=s("code"),ON=o("__call__"),DN=o(" special method."),QN=c(),v(Xr.$$.fragment),HN=c(),v(Lr.$$.fragment),ew=c(),Ls=s("h2"),Or=s("a"),Ly=s("span"),v(Ph.$$.fragment),YN=c(),Oy=s("span"),KN=o("FlaxBertForSequenceClassification"),tw=c(),ct=s("div"),v(Wh.$$.fragment),e9=c(),Dy=s("p"),t9=o(`Bert Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),o9=c(),qh=s("p"),n9=o("This model inherits from "),mu=s("a"),s9=o("FlaxPreTrainedModel"),a9=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),r9=c(),Ah=s("p"),i9=o("This model is also a Flax Linen "),Zh=s("a"),l9=o("flax.linen.Module"),d9=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),c9=c(),Qy=s("p"),p9=o("Finally, this model supports inherent JAX features such as:"),h9=c(),So=s("ul"),Hy=s("li"),Rh=s("a"),m9=o("Just-In-Time (JIT) compilation"),f9=c(),Yy=s("li"),Gh=s("a"),u9=o("Automatic Differentiation"),g9=c(),Ky=s("li"),Vh=s("a"),_9=o("Vectorization"),b9=c(),eT=s("li"),Sh=s("a"),y9=o("Parallelization"),T9=c(),Fo=s("div"),v(Xh.$$.fragment),v9=c(),Os=s("p"),k9=o("The "),tT=s("code"),w9=o("FlaxBertPreTrainedModel"),M9=o(" forward method, overrides the "),oT=s("code"),F9=o("__call__"),$9=o(" special method."),x9=c(),v(Dr.$$.fragment),B9=c(),v(Qr.$$.fragment),ow=c(),Ds=s("h2"),Hr=s("a"),nT=s("span"),v(Lh.$$.fragment),E9=c(),sT=s("span"),j9=o("FlaxBertForMultipleChoice"),nw=c(),pt=s("div"),v(Oh.$$.fragment),z9=c(),aT=s("p"),J9=o(`Bert 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.`),C9=c(),Dh=s("p"),I9=o("This model inherits from "),fu=s("a"),U9=o("FlaxPreTrainedModel"),N9=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),P9=c(),Qh=s("p"),W9=o("This model is also a Flax Linen "),Hh=s("a"),q9=o("flax.linen.Module"),A9=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Z9=c(),rT=s("p"),R9=o("Finally, this model supports inherent JAX features such as:"),G9=c(),Xo=s("ul"),iT=s("li"),Yh=s("a"),V9=o("Just-In-Time (JIT) compilation"),S9=c(),lT=s("li"),Kh=s("a"),X9=o("Automatic Differentiation"),L9=c(),dT=s("li"),em=s("a"),O9=o("Vectorization"),D9=c(),cT=s("li"),tm=s("a"),Q9=o("Parallelization"),H9=c(),$o=s("div"),v(om.$$.fragment),Y9=c(),Qs=s("p"),K9=o("The "),pT=s("code"),eP=o("FlaxBertPreTrainedModel"),tP=o(" forward method, overrides the "),hT=s("code"),oP=o("__call__"),nP=o(" special method."),sP=c(),v(Yr.$$.fragment),aP=c(),v(Kr.$$.fragment),sw=c(),Hs=s("h2"),ei=s("a"),mT=s("span"),v(nm.$$.fragment),rP=c(),fT=s("span"),iP=o("FlaxBertForTokenClassification"),aw=c(),ht=s("div"),v(sm.$$.fragment),lP=c(),uT=s("p"),dP=o(`Bert 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.`),cP=c(),am=s("p"),pP=o("This model inherits from "),uu=s("a"),hP=o("FlaxPreTrainedModel"),mP=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),fP=c(),rm=s("p"),uP=o("This model is also a Flax Linen "),im=s("a"),gP=o("flax.linen.Module"),_P=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),bP=c(),gT=s("p"),yP=o("Finally, this model supports inherent JAX features such as:"),TP=c(),Lo=s("ul"),_T=s("li"),lm=s("a"),vP=o("Just-In-Time (JIT) compilation"),kP=c(),bT=s("li"),dm=s("a"),wP=o("Automatic Differentiation"),MP=c(),yT=s("li"),cm=s("a"),FP=o("Vectorization"),$P=c(),TT=s("li"),pm=s("a"),xP=o("Parallelization"),BP=c(),xo=s("div"),v(hm.$$.fragment),EP=c(),Ys=s("p"),jP=o("The "),vT=s("code"),zP=o("FlaxBertPreTrainedModel"),JP=o(" forward method, overrides the "),kT=s("code"),CP=o("__call__"),IP=o(" special method."),UP=c(),v(ti.$$.fragment),NP=c(),v(oi.$$.fragment),rw=c(),Ks=s("h2"),ni=s("a"),wT=s("span"),v(mm.$$.fragment),PP=c(),MT=s("span"),WP=o("FlaxBertForQuestionAnswering"),iw=c(),mt=s("div"),v(fm.$$.fragment),qP=c(),ea=s("p"),AP=o(`Bert 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 `),FT=s("code"),ZP=o("span start logits"),RP=o(" and "),$T=s("code"),GP=o("span end logits"),VP=o(")."),SP=c(),um=s("p"),XP=o("This model inherits from "),gu=s("a"),LP=o("FlaxPreTrainedModel"),OP=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),DP=c(),gm=s("p"),QP=o("This model is also a Flax Linen "),_m=s("a"),HP=o("flax.linen.Module"),YP=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),KP=c(),xT=s("p"),eW=o("Finally, this model supports inherent JAX features such as:"),tW=c(),Oo=s("ul"),BT=s("li"),bm=s("a"),oW=o("Just-In-Time (JIT) compilation"),nW=c(),ET=s("li"),ym=s("a"),sW=o("Automatic Differentiation"),aW=c(),jT=s("li"),Tm=s("a"),rW=o("Vectorization"),iW=c(),zT=s("li"),vm=s("a"),lW=o("Parallelization"),dW=c(),Bo=s("div"),v(km.$$.fragment),cW=c(),ta=s("p"),pW=o("The "),JT=s("code"),hW=o("FlaxBertPreTrainedModel"),mW=o(" forward method, overrides the "),CT=s("code"),fW=o("__call__"),uW=o(" special method."),gW=c(),v(si.$$.fragment),_W=c(),v(ai.$$.fragment),this.h()},l(i){const _=WS('[data-svelte="svelte-1phssyn"]',document.head);d=a(_,"META",{name:!0,content:!0}),_.forEach(t),y=p(i),f=a(i,"H1",{class:!0});var wm=r(f);u=a(wm,"A",{id:!0,class:!0,href:!0});var IT=r(u);b=a(IT,"SPAN",{});var UT=r(b);k(l.$$.fragment,UT),UT.forEach(t),IT.forEach(t),m=p(wm),E=a(wm,"SPAN",{});var NT=r(E);Ee=n(NT,"BERT"),NT.forEach(t),wm.forEach(t),we=p(i),Z=a(i,"DIV",{class:!0});var Mm=r(Z);he=a(Mm,"A",{href:!0});var PT=r(he);ee=a(PT,"IMG",{alt:!0,src:!0}),PT.forEach(t),je=p(Mm),G=a(Mm,"A",{href:!0});var WT=r(G);me=a(WT,"IMG",{alt:!0,src:!0}),WT.forEach(t),Mm.forEach(t),O=p(i),ie=a(i,"H2",{class:!0});var Fm=r(ie);le=a(Fm,"A",{id:!0,class:!0,href:!0});var qT=r(le);V=a(qT,"SPAN",{});var AT=r(V);k(de.$$.fragment,AT),AT.forEach(t),qT.forEach(t),ze=p(Fm),S=a(Fm,"SPAN",{});var ZT=r(S);Je=n(ZT,"Overview"),ZT.forEach(t),Fm.forEach(t),Me=p(i),R=a(i,"P",{});var $m=r(R);Ce=n($m,"The BERT model was proposed in "),ce=a($m,"A",{href:!0,rel:!0});var RT=r(ce);ae=n(RT,"BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding"),RT.forEach(t),J=n($m,` by Jacob Devlin, Ming-Wei Chang, Kenton Lee and Kristina Toutanova. It\u2019s a
bidirectional transformer pretrained using a combination of masked language modeling objective and next sentence
prediction on a large corpus comprising the Toronto Book Corpus and Wikipedia.`),$m.forEach(t),U=p(i),fe=a(i,"P",{});var GT=r(fe);D=n(GT,"The abstract from the paper is the following:"),GT.forEach(t),Fe=p(i),ue=a(i,"P",{});var VT=r(ue);X=a(VT,"EM",{});var ST=r(X);Ie=n(ST,`We introduce a new language representation model called BERT, which stands for Bidirectional Encoder Representations
from Transformers. Unlike recent language representation models, BERT is designed to pre-train deep bidirectional
representations from unlabeled text by jointly conditioning on both left and right context in all layers. As a result,
the pre-trained BERT model can be fine-tuned with just one additional output layer to create state-of-the-art models
for a wide range of tasks, such as question answering and language inference, without substantial task-specific
architecture modifications.`),ST.forEach(t),VT.forEach(t),$e=p(i),C=a(i,"P",{});var XT=r(C);_e=a(XT,"EM",{});var LT=r(_e);Q=n(LT,`BERT is conceptually simple and empirically powerful. It obtains new state-of-the-art results on eleven natural
language processing tasks, including pushing the GLUE score to 80.5% (7.7% point absolute improvement), MultiNLI
accuracy to 86.7% (4.6% absolute improvement), SQuAD v1.1 question answering Test F1 to 93.2 (1.5 point absolute
improvement) and SQuAD v2.0 Test F1 to 83.1 (5.1 point absolute improvement).`),LT.forEach(t),XT.forEach(t),xe=p(i),ge=a(i,"P",{});var OT=r(ge);H=n(OT,"Tips:"),OT.forEach(t),Be=p(i),se=a(i,"UL",{});var Do=r(se);W=a(Do,"LI",{});var DT=r(W);be=a(DT,"P",{});var QT=r(be);Y=n(QT,`BERT is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather than
the left.`),QT.forEach(t),DT.forEach(t),Ue=p(Do),te=a(Do,"LI",{});var HT=r(te);I=a(HT,"P",{});var YT=r(I);Ne=n(YT,`BERT was trained with the masked language modeling (MLM) and next sentence prediction (NSP) objectives. It is
efficient at predicting masked tokens and at NLU in general, but is not optimal for text generation.`),YT.forEach(t),HT.forEach(t),P=p(Do),pe=a(Do,"LI",{});var xm=r(pe);ye=a(xm,"P",{});var KT=r(ye);T=n(KT,"Corrupts the inputs by using random masking, more precisely, during pretraining, a given percentage of tokens (usually 15%) is masked by:"),KT.forEach(t),j=p(xm),Ze=a(xm,"UL",{});var oa=r(Ze);oe=a(oa,"LI",{});var ev=r(oe);Se=n(ev,"a special mask token with probability 0.8"),ev.forEach(t),Xe=p(oa),z=a(oa,"LI",{});var tv=r(z);Le=n(tv,"a random token different from the one masked with probability 0.1"),tv.forEach(t),Oe=p(oa),Ge=a(oa,"LI",{});var ov=r(Ge);De=n(ov,"the same token with probability 0.1"),ov.forEach(t),oa.forEach(t),xm.forEach(t),Qe=p(Do),q=a(Do,"LI",{});var nv=r(q);L=a(nv,"P",{});var sv=r(L);He=n(sv,"The model must predict the original sentence, but has a second objective: inputs are two sentences A and B (with a separation token in between). With probability 50%, the sentences are consecutive in the corpus, in the remaining 50% they are not related. The model has to predict if the sentences are consecutive or not."),sv.forEach(t),nv.forEach(t),Do.forEach(t),Ve=p(i),A=a(i,"P",{});var na=r(A);Ye=n(na,"This model was contributed by "),Re=a(na,"A",{href:!0,rel:!0});var av=r(Re);Pe=n(av,"thomwolf"),av.forEach(t),Ke=n(na,". The original code can be found "),K=a(na,"A",{href:!0,rel:!0});var rv=r(K);et=n(rv,"here"),rv.forEach(t),wM=n(na,"."),na.forEach(t),Jv=p(i),Nn=a(i,"H2",{class:!0});var Bm=r(Nn);aa=a(Bm,"A",{id:!0,class:!0,href:!0});var iv=r(aa);rg=a(iv,"SPAN",{});var lv=r(rg);k(Ai.$$.fragment,lv),lv.forEach(t),iv.forEach(t),MM=p(Bm),ig=a(Bm,"SPAN",{});var dv=r(ig);FM=n(dv,"Resources"),dv.forEach(t),Bm.forEach(t),Cv=p(i),Rm=a(i,"P",{});var cv=r(Rm);$M=n(cv,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with BERT. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),cv.forEach(t),Iv=p(i),k(Zi.$$.fragment,i),Uv=p(i),tt=a(i,"UL",{});var ft=r(tt);Ri=a(ft,"LI",{});var Em=r(Ri);xM=n(Em,"A blog post on "),Gi=a(Em,"A",{href:!0,rel:!0});var pv=r(Gi);BM=n(pv,"BERT Text Classification in a different language"),pv.forEach(t),EM=n(Em,"."),Em.forEach(t),jM=p(ft),Vi=a(ft,"LI",{});var jm=r(Vi);zM=n(jm,"A notebook for "),Si=a(jm,"A",{href:!0,rel:!0});var hv=r(Si);JM=n(hv,"Finetuning BERT (and friends) for multi-label text classification"),hv.forEach(t),CM=n(jm,"."),jm.forEach(t),IM=p(ft),Xi=a(ft,"LI",{});var zm=r(Xi);UM=n(zm,"A notebook on how to "),Li=a(zm,"A",{href:!0,rel:!0});var mv=r(Li);NM=n(mv,"Finetune BERT for multi-label classification using PyTorch"),mv.forEach(t),PM=n(zm,". \u{1F30E}"),zm.forEach(t),WM=p(ft),Oi=a(ft,"LI",{});var Jm=r(Oi);qM=n(Jm,"A notebook on how to "),Di=a(Jm,"A",{href:!0,rel:!0});var fv=r(Di);AM=n(fv,"warm-start an EncoderDecoder model with BERT for summarization"),fv.forEach(t),ZM=n(Jm,"."),Jm.forEach(t),RM=p(ft),Qo=a(ft,"LI",{});var fn=r(Qo);Gm=a(fn,"A",{href:!0});var uv=r(Gm);GM=n(uv,"BertForSequenceClassification"),uv.forEach(t),VM=n(fn," is supported by this "),Qi=a(fn,"A",{href:!0,rel:!0});var gv=r(Qi);SM=n(gv,"example script"),gv.forEach(t),XM=n(fn," and "),Hi=a(fn,"A",{href:!0,rel:!0});var _v=r(Hi);LM=n(_v,"notebook"),_v.forEach(t),OM=n(fn,"."),fn.forEach(t),DM=p(ft),Ho=a(ft,"LI",{});var un=r(Ho);Vm=a(un,"A",{href:!0});var bv=r(Vm);QM=n(bv,"TFBertForSequenceClassification"),bv.forEach(t),HM=n(un," is supported by this "),Yi=a(un,"A",{href:!0,rel:!0});var yv=r(Yi);YM=n(yv,"example script"),yv.forEach(t),KM=n(un," and "),Ki=a(un,"A",{href:!0,rel:!0});var Tv=r(Ki);e2=n(Tv,"notebook"),Tv.forEach(t),t2=n(un,"."),un.forEach(t),o2=p(ft),Yo=a(ft,"LI",{});var gn=r(Yo);Sm=a(gn,"A",{href:!0});var vv=r(Sm);n2=n(vv,"FlaxBertForSequenceClassification"),vv.forEach(t),s2=n(gn," is supported by this "),el=a(gn,"A",{href:!0,rel:!0});var kv=r(el);a2=n(kv,"example script"),kv.forEach(t),r2=n(gn," and "),tl=a(gn,"A",{href:!0,rel:!0});var wv=r(tl);i2=n(wv,"notebook"),wv.forEach(t),l2=n(gn,"."),gn.forEach(t),d2=p(ft),lg=a(ft,"LI",{});var Mv=r(lg);Xm=a(Mv,"A",{href:!0});var Fv=r(Xm);c2=n(Fv,"Text classification task guide"),Fv.forEach(t),Mv.forEach(t),ft.forEach(t),Nv=p(i),k(ol.$$.fragment,i),Pv=p(i),ut=a(i,"UL",{});var Ft=r(ut);nl=a(Ft,"LI",{});var Cm=r(nl);p2=n(Cm,"A blog post on how to use "),sl=a(Cm,"A",{href:!0,rel:!0});var $v=r(sl);h2=n($v,"Hugging Face Transformers with Keras: Fine-tune a non-English BERT for Named Entity Recognition"),$v.forEach(t),m2=n(Cm,"."),Cm.forEach(t),f2=p(Ft),Pn=a(Ft,"LI",{});var sa=r(Pn);u2=n(sa,"A notebook for "),al=a(sa,"A",{href:!0,rel:!0});var xv=r(al);g2=n(xv,"Finetuning BERT for named-entity recognition"),xv.forEach(t),_2=n(sa," using only the first wordpiece of each word in the word label during tokenization. To propagate the label of the word to all wordpieces, see this "),rl=a(sa,"A",{href:!0,rel:!0});var Bv=r(rl);b2=n(Bv,"version"),Bv.forEach(t),y2=n(sa," of the notebook instead."),sa.forEach(t),T2=p(Ft),Ko=a(Ft,"LI",{});var _n=r(Ko);Lm=a(_n,"A",{href:!0});var Ev=r(Lm);v2=n(Ev,"BertForTokenClassification"),Ev.forEach(t),k2=n(_n," is supported by this "),il=a(_n,"A",{href:!0,rel:!0});var BW=r(il);w2=n(BW,"example script"),BW.forEach(t),M2=n(_n," and "),ll=a(_n,"A",{href:!0,rel:!0});var EW=r(ll);F2=n(EW,"notebook"),EW.forEach(t),$2=n(_n,"."),_n.forEach(t),x2=p(Ft),en=a(Ft,"LI",{});var Im=r(en);Om=a(Im,"A",{href:!0});var jW=r(Om);B2=n(jW,"TFBertForTokenClassification"),jW.forEach(t),E2=n(Im," is supported by this "),dl=a(Im,"A",{href:!0,rel:!0});var zW=r(dl);j2=n(zW,"example script"),zW.forEach(t),z2=n(Im," and "),cl=a(Im,"A",{href:!0,rel:!0});var JW=r(cl);J2=n(JW,"notebook"),JW.forEach(t),C2=n(Im,"."),Im.forEach(t),I2=p(Ft),ra=a(Ft,"LI",{});var jv=r(ra);Dm=a(jv,"A",{href:!0});var CW=r(Dm);U2=n(CW,"FlaxBertForTokenClassification"),CW.forEach(t),N2=n(jv," is supported by this "),pl=a(jv,"A",{href:!0,rel:!0});var IW=r(pl);P2=n(IW,"example script"),IW.forEach(t),W2=n(jv,"."),jv.forEach(t),q2=p(Ft),Qm=a(Ft,"LI",{});var bW=r(Qm);hl=a(bW,"A",{href:!0,rel:!0});var UW=r(hl);A2=n(UW,"Token classification"),UW.forEach(t),Z2=n(bW," chapter of the \u{1F917} Hugging Face Course."),bW.forEach(t),R2=p(Ft),dg=a(Ft,"LI",{});var NW=r(dg);Hm=a(NW,"A",{href:!0});var PW=r(Hm);G2=n(PW,"Token classification task guide"),PW.forEach(t),NW.forEach(t),Ft.forEach(t),Wv=p(i),k(ml.$$.fragment,i),qv=p(i),Wt=a(i,"UL",{});var bn=r(Wt);tn=a(bn,"LI",{});var Um=r(tn);Ym=a(Um,"A",{href:!0});var WW=r(Ym);V2=n(WW,"BertForMaskedLM"),WW.forEach(t),S2=n(Um," is supported by this "),fl=a(Um,"A",{href:!0,rel:!0});var qW=r(fl);X2=n(qW,"example script"),qW.forEach(t),L2=n(Um," and "),ul=a(Um,"A",{href:!0,rel:!0});var AW=r(ul);O2=n(AW,"notebook"),AW.forEach(t),D2=n(Um,"."),Um.forEach(t),Q2=p(bn),on=a(bn,"LI",{});var Nm=r(on);Km=a(Nm,"A",{href:!0});var ZW=r(Km);H2=n(ZW,"TFBertForMaskedLM"),ZW.forEach(t),Y2=n(Nm," is supported by this "),gl=a(Nm,"A",{href:!0,rel:!0});var RW=r(gl);K2=n(RW,"example script"),RW.forEach(t),e0=n(Nm," and "),_l=a(Nm,"A",{href:!0,rel:!0});var GW=r(_l);t0=n(GW,"notebook"),GW.forEach(t),o0=n(Nm,"."),Nm.forEach(t),n0=p(bn),nn=a(bn,"LI",{});var Pm=r(nn);ef=a(Pm,"A",{href:!0});var VW=r(ef);s0=n(VW,"FlaxBertForMaskedLM"),VW.forEach(t),a0=n(Pm," is supported by this "),bl=a(Pm,"A",{href:!0,rel:!0});var SW=r(bl);r0=n(SW,"example script"),SW.forEach(t),i0=n(Pm," and "),yl=a(Pm,"A",{href:!0,rel:!0});var XW=r(yl);l0=n(XW,"notebook"),XW.forEach(t),d0=n(Pm,"."),Pm.forEach(t),c0=p(bn),tf=a(bn,"LI",{});var yW=r(tf);Tl=a(yW,"A",{href:!0,rel:!0});var LW=r(Tl);p0=n(LW,"Masked language modeling"),LW.forEach(t),h0=n(yW," chapter of the \u{1F917} Hugging Face Course."),yW.forEach(t),m0=p(bn),cg=a(bn,"LI",{});var OW=r(cg);of=a(OW,"A",{href:!0});var DW=r(of);f0=n(DW,"Masked language modeling task guide"),DW.forEach(t),OW.forEach(t),bn.forEach(t),Av=p(i),k(vl.$$.fragment,i),Zv=p(i),qt=a(i,"UL",{});var yn=r(qt);sn=a(yn,"LI",{});var Wm=r(sn);nf=a(Wm,"A",{href:!0});var QW=r(nf);u0=n(QW,"BertForQuestionAnswering"),QW.forEach(t),g0=n(Wm," is supported by this "),kl=a(Wm,"A",{href:!0,rel:!0});var HW=r(kl);_0=n(HW,"example script"),HW.forEach(t),b0=n(Wm," and "),wl=a(Wm,"A",{href:!0,rel:!0});var YW=r(wl);y0=n(YW,"notebook"),YW.forEach(t),T0=n(Wm,"."),Wm.forEach(t),v0=p(yn),an=a(yn,"LI",{});var qm=r(an);sf=a(qm,"A",{href:!0});var KW=r(sf);k0=n(KW,"TFBertForQuestionAnswering"),KW.forEach(t),w0=n(qm," is supported by this "),Ml=a(qm,"A",{href:!0,rel:!0});var eq=r(Ml);M0=n(eq,"example script"),eq.forEach(t),F0=n(qm," and "),Fl=a(qm,"A",{href:!0,rel:!0});var tq=r(Fl);$0=n(tq,"notebook"),tq.forEach(t),x0=n(qm,"."),qm.forEach(t),B0=p(yn),ia=a(yn,"LI",{});var zv=r(ia);af=a(zv,"A",{href:!0});var oq=r(af);E0=n(oq,"FlaxBertForQuestionAnswering"),oq.forEach(t),j0=n(zv," is supported by this "),$l=a(zv,"A",{href:!0,rel:!0});var nq=r($l);z0=n(nq,"example script"),nq.forEach(t),J0=n(zv,"."),zv.forEach(t),C0=p(yn),rf=a(yn,"LI",{});var TW=r(rf);xl=a(TW,"A",{href:!0,rel:!0});var sq=r(xl);I0=n(sq,"Question answering"),sq.forEach(t),U0=n(TW," chapter of the \u{1F917} Hugging Face Course."),TW.forEach(t),N0=p(yn),pg=a(yn,"LI",{});var aq=r(pg);lf=a(aq,"A",{href:!0});var rq=r(lf);P0=n(rq,"Question answering task guide"),rq.forEach(t),aq.forEach(t),yn.forEach(t),Rv=p(i),df=a(i,"P",{});var iq=r(df);hg=a(iq,"STRONG",{});var lq=r(hg);W0=n(lq,"Multiple choice"),lq.forEach(t),iq.forEach(t),Gv=p(i),rn=a(i,"UL",{});var _u=r(rn);ln=a(_u,"LI",{});var Am=r(ln);cf=a(Am,"A",{href:!0});var dq=r(cf);q0=n(dq,"BertForMultipleChoice"),dq.forEach(t),A0=n(Am," is supported by this "),Bl=a(Am,"A",{href:!0,rel:!0});var cq=r(Bl);Z0=n(cq,"example script"),cq.forEach(t),R0=n(Am," and "),El=a(Am,"A",{href:!0,rel:!0});var pq=r(El);G0=n(pq,"notebook"),pq.forEach(t),V0=n(Am,"."),Am.forEach(t),S0=p(_u),dn=a(_u,"LI",{});var Zm=r(dn);pf=a(Zm,"A",{href:!0});var hq=r(pf);X0=n(hq,"TFBertForMultipleChoice"),hq.forEach(t),L0=n(Zm," is supported by this "),jl=a(Zm,"A",{href:!0,rel:!0});var mq=r(jl);O0=n(mq,"example script"),mq.forEach(t),D0=n(Zm," and "),zl=a(Zm,"A",{href:!0,rel:!0});var fq=r(zl);Q0=n(fq,"notebook"),fq.forEach(t),H0=n(Zm,"."),Zm.forEach(t),Y0=p(_u),mg=a(_u,"LI",{});var uq=r(mg);hf=a(uq,"A",{href:!0});var gq=r(hf);K0=n(gq,"Multiple choice task guide"),gq.forEach(t),uq.forEach(t),_u.forEach(t),Vv=p(i),Jl=a(i,"P",{});var vW=r(Jl);eF=n(vW,"\u26A1\uFE0F "),fg=a(vW,"STRONG",{});var _q=r(fg);tF=n(_q,"Inference"),_q.forEach(t),vW.forEach(t),Sv=p(i),la=a(i,"UL",{});var dw=r(la);Cl=a(dw,"LI",{});var cw=r(Cl);oF=n(cw,"A blog post on how to "),Il=a(cw,"A",{href:!0,rel:!0});var bq=r(Il);nF=n(bq,"Accelerate BERT inference with Hugging Face Transformers and AWS Inferentia"),bq.forEach(t),sF=n(cw,"."),cw.forEach(t),aF=p(dw),Ul=a(dw,"LI",{});var pw=r(Ul);rF=n(pw,"A blog post on how to "),Nl=a(pw,"A",{href:!0,rel:!0});var yq=r(Nl);iF=n(yq,"Accelerate BERT inference with DeepSpeed-Inference on GPUs"),yq.forEach(t),lF=n(pw,"."),pw.forEach(t),dw.forEach(t),Xv=p(i),Pl=a(i,"P",{});var kW=r(Pl);dF=n(kW,"\u2699\uFE0F "),ug=a(kW,"STRONG",{});var Tq=r(ug);cF=n(Tq,"Pretraining"),Tq.forEach(t),kW.forEach(t),Lv=p(i),mf=a(i,"UL",{});var vq=r(mf);Wl=a(vq,"LI",{});var hw=r(Wl);pF=n(hw,"A blog post on "),ql=a(hw,"A",{href:!0,rel:!0});var kq=r(ql);hF=n(kq,"Pre-Training BERT with Hugging Face Transformers and Habana Gaudi"),kq.forEach(t),mF=n(hw,"."),hw.forEach(t),vq.forEach(t),Ov=p(i),Al=a(i,"P",{});var wW=r(Al);fF=n(wW,"\u{1F680} "),gg=a(wW,"STRONG",{});var wq=r(gg);uF=n(wq,"Deploy"),wq.forEach(t),wW.forEach(t),Dv=p(i),$t=a(i,"UL",{});var Eo=r($t);Zl=a(Eo,"LI",{});var mw=r(Zl);gF=n(mw,"A blog post on how to "),Rl=a(mw,"A",{href:!0,rel:!0});var Mq=r(Rl);_F=n(Mq,"Convert Transformers to ONNX with Hugging Face Optimum"),Mq.forEach(t),bF=n(mw,"."),mw.forEach(t),yF=p(Eo),Gl=a(Eo,"LI",{});var fw=r(Gl);TF=n(fw,"A blog post on how to "),Vl=a(fw,"A",{href:!0,rel:!0});var Fq=r(Vl);vF=n(Fq,"Setup Deep Learning environment for Hugging Face Transformers with Habana Gaudi on AWS"),Fq.forEach(t),kF=n(fw,"."),fw.forEach(t),wF=p(Eo),Sl=a(Eo,"LI",{});var uw=r(Sl);MF=n(uw,"A blog post on "),Xl=a(uw,"A",{href:!0,rel:!0});var $q=r(Xl);FF=n($q,"Autoscaling BERT with Hugging Face Transformers, Amazon SageMaker and Terraform module"),$q.forEach(t),$F=n(uw,"."),uw.forEach(t),xF=p(Eo),Ll=a(Eo,"LI",{});var gw=r(Ll);BF=n(gw,"A blog post on "),Ol=a(gw,"A",{href:!0,rel:!0});var xq=r(Ol);EF=n(xq,"Serverless BERT with HuggingFace, AWS Lambda, and Docker"),xq.forEach(t),jF=n(gw,"."),gw.forEach(t),zF=p(Eo),Dl=a(Eo,"LI",{});var _w=r(Dl);JF=n(_w,"A blog post on "),Ql=a(_w,"A",{href:!0,rel:!0});var Bq=r(Ql);CF=n(Bq,"Hugging Face Transformers BERT fine-tuning using Amazon SageMaker and Training Compiler"),Bq.forEach(t),IF=n(_w,"."),_w.forEach(t),UF=p(Eo),Hl=a(Eo,"LI",{});var bw=r(Hl);NF=n(bw,"A blog post on "),Yl=a(bw,"A",{href:!0,rel:!0});var Eq=r(Yl);PF=n(Eq,"Task-specific knowledge distillation for BERT using Transformers & Amazon SageMaker"),Eq.forEach(t),WF=n(bw,"."),bw.forEach(t),Eo.forEach(t),Qv=p(i),Wn=a(i,"H2",{class:!0});var yw=r(Wn);da=a(yw,"A",{id:!0,class:!0,href:!0});var jq=r(da);_g=a(jq,"SPAN",{});var zq=r(_g);k(Kl.$$.fragment,zq),zq.forEach(t),jq.forEach(t),qF=p(yw),bg=a(yw,"SPAN",{});var Jq=r(bg);AF=n(Jq,"BertConfig"),Jq.forEach(t),yw.forEach(t),Hv=p(i),so=a(i,"DIV",{class:!0});var ri=r(so);k(ed.$$.fragment,ri),ZF=p(ri),Wo=a(ri,"P",{});var ii=r(Wo);RF=n(ii,"This is the configuration class to store the configuration of a "),ff=a(ii,"A",{href:!0});var Cq=r(ff);GF=n(Cq,"BertModel"),Cq.forEach(t),VF=n(ii," or a "),uf=a(ii,"A",{href:!0});var Iq=r(uf);SF=n(Iq,"TFBertModel"),Iq.forEach(t),XF=n(ii,`. It is used to
instantiate a BERT 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 BERT
`),td=a(ii,"A",{href:!0,rel:!0});var Uq=r(td);LF=n(Uq,"bert-base-uncased"),Uq.forEach(t),OF=n(ii," architecture."),ii.forEach(t),DF=p(ri),qn=a(ri,"P",{});var bu=r(qn);QF=n(bu,"Configuration objects inherit from "),gf=a(bu,"A",{href:!0});var Nq=r(gf);HF=n(Nq,"PretrainedConfig"),Nq.forEach(t),YF=n(bu,` and can be used to control the model outputs. Read the
documentation from `),_f=a(bu,"A",{href:!0});var Pq=r(_f);KF=n(Pq,"PretrainedConfig"),Pq.forEach(t),e$=n(bu," for more information."),bu.forEach(t),t$=p(ri),k(ca.$$.fragment,ri),ri.forEach(t),Yv=p(i),An=a(i,"H2",{class:!0});var Tw=r(An);pa=a(Tw,"A",{id:!0,class:!0,href:!0});var Wq=r(pa);yg=a(Wq,"SPAN",{});var qq=r(yg);k(od.$$.fragment,qq),qq.forEach(t),Wq.forEach(t),o$=p(Tw),Tg=a(Tw,"SPAN",{});var Aq=r(Tg);n$=n(Aq,"BertTokenizer"),Aq.forEach(t),Tw.forEach(t),Kv=p(i),ot=a(i,"DIV",{class:!0});var Xt=r(ot);k(nd.$$.fragment,Xt),s$=p(Xt),vg=a(Xt,"P",{});var Zq=r(vg);a$=n(Zq,"Construct a BERT tokenizer. Based on WordPiece."),Zq.forEach(t),r$=p(Xt),sd=a(Xt,"P",{});var vw=r(sd);i$=n(vw,"This tokenizer inherits from "),bf=a(vw,"A",{href:!0});var Rq=r(bf);l$=n(Rq,"PreTrainedTokenizer"),Rq.forEach(t),d$=n(vw,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),vw.forEach(t),c$=p(Xt),cn=a(Xt,"DIV",{class:!0});var yu=r(cn);k(ad.$$.fragment,yu),p$=p(yu),kg=a(yu,"P",{});var Gq=r(kg);h$=n(Gq,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A BERT sequence has the following format:`),Gq.forEach(t),m$=p(yu),rd=a(yu,"UL",{});var kw=r(rd);yf=a(kw,"LI",{});var MW=r(yf);f$=n(MW,"single sequence: "),wg=a(MW,"CODE",{});var Vq=r(wg);u$=n(Vq,"[CLS] X [SEP]"),Vq.forEach(t),MW.forEach(t),g$=p(kw),Tf=a(kw,"LI",{});var FW=r(Tf);_$=n(FW,"pair of sequences: "),Mg=a(FW,"CODE",{});var Sq=r(Mg);b$=n(Sq,"[CLS] A [SEP] B [SEP]"),Sq.forEach(t),FW.forEach(t),kw.forEach(t),yu.forEach(t),y$=p(Xt),ha=a(Xt,"DIV",{class:!0});var ww=r(ha);k(id.$$.fragment,ww),T$=p(ww),ld=a(ww,"P",{});var Mw=r(ld);v$=n(Mw,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Fg=a(Mw,"CODE",{});var Xq=r(Fg);k$=n(Xq,"prepare_for_model"),Xq.forEach(t),w$=n(Mw," method."),Mw.forEach(t),ww.forEach(t),M$=p(Xt),ao=a(Xt,"DIV",{class:!0});var li=r(ao);k(dd.$$.fragment,li),F$=p(li),$g=a(li,"P",{});var Lq=r($g);$$=n(Lq,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A BERT sequence"),Lq.forEach(t),x$=p(li),k(ma.$$.fragment,li),B$=p(li),Zn=a(li,"P",{});var Tu=r(Zn);E$=n(Tu,"If "),xg=a(Tu,"CODE",{});var Oq=r(xg);j$=n(Oq,"token_ids_1"),Oq.forEach(t),z$=n(Tu," is "),Bg=a(Tu,"CODE",{});var Dq=r(Bg);J$=n(Dq,"None"),Dq.forEach(t),C$=n(Tu,", this method only returns the first portion of the mask (0s)."),Tu.forEach(t),li.forEach(t),I$=p(Xt),vf=a(Xt,"DIV",{class:!0});var Qq=r(vf);k(cd.$$.fragment,Qq),Qq.forEach(t),Xt.forEach(t),ek=p(i),Rn=a(i,"H2",{class:!0});var Fw=r(Rn);fa=a(Fw,"A",{id:!0,class:!0,href:!0});var Hq=r(fa);Eg=a(Hq,"SPAN",{});var Yq=r(Eg);k(pd.$$.fragment,Yq),Yq.forEach(t),Hq.forEach(t),U$=p(Fw),jg=a(Fw,"SPAN",{});var Kq=r(jg);N$=n(Kq,"BertTokenizerFast"),Kq.forEach(t),Fw.forEach(t),tk=p(i),Bt=a(i,"DIV",{class:!0});var Tn=r(Bt);k(hd.$$.fragment,Tn),P$=p(Tn),md=a(Tn,"P",{});var $w=r(md);W$=n($w,"Construct a \u201Cfast\u201D BERT tokenizer (backed by HuggingFace\u2019s "),zg=a($w,"EM",{});var eA=r(zg);q$=n(eA,"tokenizers"),eA.forEach(t),A$=n($w," library). Based on WordPiece."),$w.forEach(t),Z$=p(Tn),fd=a(Tn,"P",{});var xw=r(fd);R$=n(xw,"This tokenizer inherits from "),kf=a(xw,"A",{href:!0});var tA=r(kf);G$=n(tA,"PreTrainedTokenizerFast"),tA.forEach(t),V$=n(xw,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),xw.forEach(t),S$=p(Tn),pn=a(Tn,"DIV",{class:!0});var vu=r(pn);k(ud.$$.fragment,vu),X$=p(vu),Jg=a(vu,"P",{});var oA=r(Jg);L$=n(oA,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A BERT sequence has the following format:`),oA.forEach(t),O$=p(vu),gd=a(vu,"UL",{});var Bw=r(gd);wf=a(Bw,"LI",{});var $W=r(wf);D$=n($W,"single sequence: "),Cg=a($W,"CODE",{});var nA=r(Cg);Q$=n(nA,"[CLS] X [SEP]"),nA.forEach(t),$W.forEach(t),H$=p(Bw),Mf=a(Bw,"LI",{});var xW=r(Mf);Y$=n(xW,"pair of sequences: "),Ig=a(xW,"CODE",{});var sA=r(Ig);K$=n(sA,"[CLS] A [SEP] B [SEP]"),sA.forEach(t),xW.forEach(t),Bw.forEach(t),vu.forEach(t),ex=p(Tn),ro=a(Tn,"DIV",{class:!0});var di=r(ro);k(_d.$$.fragment,di),tx=p(di),Ug=a(di,"P",{});var aA=r(Ug);ox=n(aA,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A BERT sequence"),aA.forEach(t),nx=p(di),k(ua.$$.fragment,di),sx=p(di),Gn=a(di,"P",{});var ku=r(Gn);ax=n(ku,"If "),Ng=a(ku,"CODE",{});var rA=r(Ng);rx=n(rA,"token_ids_1"),rA.forEach(t),ix=n(ku," is "),Pg=a(ku,"CODE",{});var iA=r(Pg);lx=n(iA,"None"),iA.forEach(t),dx=n(ku,", this method only returns the first portion of the mask (0s)."),ku.forEach(t),di.forEach(t),Tn.forEach(t),ok=p(i),Vn=a(i,"H2",{class:!0});var Ew=r(Vn);ga=a(Ew,"A",{id:!0,class:!0,href:!0});var lA=r(ga);Wg=a(lA,"SPAN",{});var dA=r(Wg);k(bd.$$.fragment,dA),dA.forEach(t),lA.forEach(t),cx=p(Ew),qg=a(Ew,"SPAN",{});var cA=r(qg);px=n(cA,"TFBertTokenizer"),cA.forEach(t),Ew.forEach(t),nk=p(i),Et=a(i,"DIV",{class:!0});var vn=r(Et);k(yd.$$.fragment,vn),hx=p(vn),Sn=a(vn,"P",{});var wu=r(Sn);mx=n(wu,`This is an in-graph tokenizer for BERT. It should be initialized similarly to other tokenizers, using the
`),Ag=a(wu,"CODE",{});var pA=r(Ag);fx=n(pA,"from_pretrained()"),pA.forEach(t),ux=n(wu," method. It can also be initialized with the "),Zg=a(wu,"CODE",{});var hA=r(Zg);gx=n(hA,"from_tokenizer()"),hA.forEach(t),_x=n(wu,` method, which imports settings
from an existing standard tokenizer object.`),wu.forEach(t),bx=p(vn),Td=a(vn,"P",{});var jw=r(Td);yx=n(jw,`In-graph tokenizers, unlike other Hugging Face tokenizers, are actually Keras layers and are designed to be run
when the model is called, rather than during preprocessing. As a result, they have somewhat more limited options
than standard tokenizer classes. They are most useful when you want to create an end-to-end model that goes
straight from `),Rg=a(jw,"CODE",{});var mA=r(Rg);Tx=n(mA,"tf.string"),mA.forEach(t),vx=n(jw," inputs to outputs."),jw.forEach(t),kx=p(vn),hn=a(vn,"DIV",{class:!0});var Mu=r(hn);k(vd.$$.fragment,Mu),wx=p(Mu),kd=a(Mu,"P",{});var zw=r(kd);Mx=n(zw,"Instantiate a "),Gg=a(zw,"CODE",{});var fA=r(Gg);Fx=n(fA,"TFBertTokenizer"),fA.forEach(t),$x=n(zw," from a pre-trained tokenizer."),zw.forEach(t),xx=p(Mu),k(_a.$$.fragment,Mu),Mu.forEach(t),Bx=p(vn),mn=a(vn,"DIV",{class:!0});var Fu=r(mn);k(wd.$$.fragment,Fu),Ex=p(Fu),Xn=a(Fu,"P",{});var $u=r(Xn);jx=n($u,"Initialize a "),Vg=a($u,"CODE",{});var uA=r(Vg);zx=n(uA,"TFBertTokenizer"),uA.forEach(t),Jx=n($u," from an existing "),Sg=a($u,"CODE",{});var gA=r(Sg);Cx=n(gA,"Tokenizer"),gA.forEach(t),Ix=n($u,"."),$u.forEach(t),Ux=p(Fu),k(ba.$$.fragment,Fu),Fu.forEach(t),vn.forEach(t),sk=p(i),Ln=a(i,"H2",{class:!0});var Jw=r(Ln);ya=a(Jw,"A",{id:!0,class:!0,href:!0});var _A=r(ya);Xg=a(_A,"SPAN",{});var bA=r(Xg);k(Md.$$.fragment,bA),bA.forEach(t),_A.forEach(t),Nx=p(Jw),Lg=a(Jw,"SPAN",{});var yA=r(Lg);Px=n(yA,"Bert specific outputs"),yA.forEach(t),Jw.forEach(t),ak=p(i),On=a(i,"DIV",{class:!0});var Cw=r(On);k(Fd.$$.fragment,Cw),Wx=p(Cw),$d=a(Cw,"P",{});var Iw=r($d);qx=n(Iw,"Output type of "),Ff=a(Iw,"A",{href:!0});var TA=r(Ff);Ax=n(TA,"BertForPreTraining"),TA.forEach(t),Zx=n(Iw,"."),Iw.forEach(t),Cw.forEach(t),rk=p(i),Dn=a(i,"DIV",{class:!0});var Uw=r(Dn);k(xd.$$.fragment,Uw),Rx=p(Uw),Bd=a(Uw,"P",{});var Nw=r(Bd);Gx=n(Nw,"Output type of "),$f=a(Nw,"A",{href:!0});var vA=r($f);Vx=n(vA,"TFBertForPreTraining"),vA.forEach(t),Sx=n(Nw,"."),Nw.forEach(t),Uw.forEach(t),ik=p(i),qo=a(i,"DIV",{class:!0});var xu=r(qo);k(Ed.$$.fragment,xu),Xx=p(xu),jd=a(xu,"P",{});var Pw=r(jd);Lx=n(Pw,"Output type of "),xf=a(Pw,"A",{href:!0});var kA=r(xf);Ox=n(kA,"BertForPreTraining"),kA.forEach(t),Dx=n(Pw,"."),Pw.forEach(t),Qx=p(xu),Ta=a(xu,"DIV",{class:!0});var Ww=r(Ta);k(zd.$$.fragment,Ww),Hx=p(Ww),Og=a(Ww,"P",{});var wA=r(Og);Yx=n(wA,"\u201CReturns a new object replacing the specified fields with new values."),wA.forEach(t),Ww.forEach(t),xu.forEach(t),lk=p(i),Qn=a(i,"H2",{class:!0});var qw=r(Qn);va=a(qw,"A",{id:!0,class:!0,href:!0});var MA=r(va);Dg=a(MA,"SPAN",{});var FA=r(Dg);k(Jd.$$.fragment,FA),FA.forEach(t),MA.forEach(t),Kx=p(qw),Qg=a(qw,"SPAN",{});var $A=r(Qg);eB=n($A,"BertModel"),$A.forEach(t),qw.forEach(t),dk=p(i),nt=a(i,"DIV",{class:!0});var Lt=r(nt);k(Cd.$$.fragment,Lt),tB=p(Lt),Hg=a(Lt,"P",{});var xA=r(Hg);oB=n(xA,"The bare Bert Model transformer outputting raw hidden-states without any specific head on top."),xA.forEach(t),nB=p(Lt),Id=a(Lt,"P",{});var Aw=r(Id);sB=n(Aw,"This model inherits from "),Bf=a(Aw,"A",{href:!0});var BA=r(Bf);aB=n(BA,"PreTrainedModel"),BA.forEach(t),rB=n(Aw,`. 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.)`),Aw.forEach(t),iB=p(Lt),Ud=a(Lt,"P",{});var Zw=r(Ud);lB=n(Zw,"This model is also a PyTorch "),Nd=a(Zw,"A",{href:!0,rel:!0});var EA=r(Nd);dB=n(EA,"torch.nn.Module"),EA.forEach(t),cB=n(Zw,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Zw.forEach(t),pB=p(Lt),Pd=a(Lt,"P",{});var Rw=r(Pd);hB=n(Rw,`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),Wd=a(Rw,"A",{href:!0,rel:!0});var jA=r(Wd);mB=n(jA,`Attention is
all you need`),jA.forEach(t),fB=n(Rw,` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),Rw.forEach(t),uB=p(Lt),gt=a(Lt,"P",{});var Ot=r(gt);gB=n(Ot,"To behave as an decoder the model needs to be initialized with the "),Yg=a(Ot,"CODE",{});var zA=r(Yg);_B=n(zA,"is_decoder"),zA.forEach(t),bB=n(Ot,` argument of the configuration set
to `),Kg=a(Ot,"CODE",{});var JA=r(Kg);yB=n(JA,"True"),JA.forEach(t),TB=n(Ot,". To be used in a Seq2Seq model, the model needs to initialized with both "),e_=a(Ot,"CODE",{});var CA=r(e_);vB=n(CA,"is_decoder"),CA.forEach(t),kB=n(Ot,` argument and
`),t_=a(Ot,"CODE",{});var IA=r(t_);wB=n(IA,"add_cross_attention"),IA.forEach(t),MB=n(Ot," set to "),o_=a(Ot,"CODE",{});var UA=r(o_);FB=n(UA,"True"),UA.forEach(t),$B=n(Ot,"; an "),n_=a(Ot,"CODE",{});var NA=r(n_);xB=n(NA,"encoder_hidden_states"),NA.forEach(t),BB=n(Ot," is then expected as an input to the forward pass."),Ot.forEach(t),EB=p(Lt),io=a(Lt,"DIV",{class:!0});var ci=r(io);k(qd.$$.fragment,ci),jB=p(ci),Hn=a(ci,"P",{});var Bu=r(Hn);zB=n(Bu,"The "),Ef=a(Bu,"A",{href:!0});var PA=r(Ef);JB=n(PA,"BertModel"),PA.forEach(t),CB=n(Bu," forward method, overrides the "),s_=a(Bu,"CODE",{});var WA=r(s_);IB=n(WA,"__call__"),WA.forEach(t),UB=n(Bu," special method."),Bu.forEach(t),NB=p(ci),k(ka.$$.fragment,ci),PB=p(ci),k(wa.$$.fragment,ci),ci.forEach(t),Lt.forEach(t),ck=p(i),Yn=a(i,"H2",{class:!0});var Gw=r(Yn);Ma=a(Gw,"A",{id:!0,class:!0,href:!0});var qA=r(Ma);a_=a(qA,"SPAN",{});var AA=r(a_);k(Ad.$$.fragment,AA),AA.forEach(t),qA.forEach(t),WB=p(Gw),r_=a(Gw,"SPAN",{});var ZA=r(r_);qB=n(ZA,"BertForPreTraining"),ZA.forEach(t),Gw.forEach(t),pk=p(i),jt=a(i,"DIV",{class:!0});var kn=r(jt);k(Zd.$$.fragment,kn),AB=p(kn),Kn=a(kn,"P",{});var Eu=r(Kn);ZB=n(Eu,"Bert Model with two heads on top as done during the pretraining: a "),i_=a(Eu,"CODE",{});var RA=r(i_);RB=n(RA,"masked language modeling"),RA.forEach(t),GB=n(Eu," head and a "),l_=a(Eu,"CODE",{});var GA=r(l_);VB=n(GA,"next sentence prediction (classification)"),GA.forEach(t),SB=n(Eu," head."),Eu.forEach(t),XB=p(kn),Rd=a(kn,"P",{});var Vw=r(Rd);LB=n(Vw,"This model inherits from "),jf=a(Vw,"A",{href:!0});var VA=r(jf);OB=n(VA,"PreTrainedModel"),VA.forEach(t),DB=n(Vw,`. 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.)`),Vw.forEach(t),QB=p(kn),Gd=a(kn,"P",{});var Sw=r(Gd);HB=n(Sw,"This model is also a PyTorch "),Vd=a(Sw,"A",{href:!0,rel:!0});var SA=r(Vd);YB=n(SA,"torch.nn.Module"),SA.forEach(t),KB=n(Sw,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Sw.forEach(t),eE=p(kn),lo=a(kn,"DIV",{class:!0});var pi=r(lo);k(Sd.$$.fragment,pi),tE=p(pi),es=a(pi,"P",{});var ju=r(es);oE=n(ju,"The "),zf=a(ju,"A",{href:!0});var XA=r(zf);nE=n(XA,"BertForPreTraining"),XA.forEach(t),sE=n(ju," forward method, overrides the "),d_=a(ju,"CODE",{});var LA=r(d_);aE=n(LA,"__call__"),LA.forEach(t),rE=n(ju," special method."),ju.forEach(t),iE=p(pi),k(Fa.$$.fragment,pi),lE=p(pi),k($a.$$.fragment,pi),pi.forEach(t),kn.forEach(t),hk=p(i),ts=a(i,"H2",{class:!0});var Xw=r(ts);xa=a(Xw,"A",{id:!0,class:!0,href:!0});var OA=r(xa);c_=a(OA,"SPAN",{});var DA=r(c_);k(Xd.$$.fragment,DA),DA.forEach(t),OA.forEach(t),dE=p(Xw),p_=a(Xw,"SPAN",{});var QA=r(p_);cE=n(QA,"BertLMHeadModel"),QA.forEach(t),Xw.forEach(t),mk=p(i),zt=a(i,"DIV",{class:!0});var wn=r(zt);k(Ld.$$.fragment,wn),pE=p(wn),Od=a(wn,"P",{});var Lw=r(Od);hE=n(Lw,"Bert Model with a "),h_=a(Lw,"CODE",{});var HA=r(h_);mE=n(HA,"language modeling"),HA.forEach(t),fE=n(Lw," head on top for CLM fine-tuning."),Lw.forEach(t),uE=p(wn),Dd=a(wn,"P",{});var Ow=r(Dd);gE=n(Ow,"This model inherits from "),Jf=a(Ow,"A",{href:!0});var YA=r(Jf);_E=n(YA,"PreTrainedModel"),YA.forEach(t),bE=n(Ow,`. 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.)`),Ow.forEach(t),yE=p(wn),Qd=a(wn,"P",{});var Dw=r(Qd);TE=n(Dw,"This model is also a PyTorch "),Hd=a(Dw,"A",{href:!0,rel:!0});var KA=r(Hd);vE=n(KA,"torch.nn.Module"),KA.forEach(t),kE=n(Dw,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Dw.forEach(t),wE=p(wn),co=a(wn,"DIV",{class:!0});var hi=r(co);k(Yd.$$.fragment,hi),ME=p(hi),os=a(hi,"P",{});var zu=r(os);FE=n(zu,"The "),Cf=a(zu,"A",{href:!0});var eZ=r(Cf);$E=n(eZ,"BertLMHeadModel"),eZ.forEach(t),xE=n(zu," forward method, overrides the "),m_=a(zu,"CODE",{});var tZ=r(m_);BE=n(tZ,"__call__"),tZ.forEach(t),EE=n(zu," special method."),zu.forEach(t),jE=p(hi),k(Ba.$$.fragment,hi),zE=p(hi),k(Ea.$$.fragment,hi),hi.forEach(t),wn.forEach(t),fk=p(i),ns=a(i,"H2",{class:!0});var Qw=r(ns);ja=a(Qw,"A",{id:!0,class:!0,href:!0});var oZ=r(ja);f_=a(oZ,"SPAN",{});var nZ=r(f_);k(Kd.$$.fragment,nZ),nZ.forEach(t),oZ.forEach(t),JE=p(Qw),u_=a(Qw,"SPAN",{});var sZ=r(u_);CE=n(sZ,"BertForMaskedLM"),sZ.forEach(t),Qw.forEach(t),uk=p(i),Jt=a(i,"DIV",{class:!0});var Mn=r(Jt);k(ec.$$.fragment,Mn),IE=p(Mn),tc=a(Mn,"P",{});var Hw=r(tc);UE=n(Hw,"Bert Model with a "),g_=a(Hw,"CODE",{});var aZ=r(g_);NE=n(aZ,"language modeling"),aZ.forEach(t),PE=n(Hw," head on top."),Hw.forEach(t),WE=p(Mn),oc=a(Mn,"P",{});var Yw=r(oc);qE=n(Yw,"This model inherits from "),If=a(Yw,"A",{href:!0});var rZ=r(If);AE=n(rZ,"PreTrainedModel"),rZ.forEach(t),ZE=n(Yw,`. 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.)`),Yw.forEach(t),RE=p(Mn),nc=a(Mn,"P",{});var Kw=r(nc);GE=n(Kw,"This model is also a PyTorch "),sc=a(Kw,"A",{href:!0,rel:!0});var iZ=r(sc);VE=n(iZ,"torch.nn.Module"),iZ.forEach(t),SE=n(Kw,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Kw.forEach(t),XE=p(Mn),po=a(Mn,"DIV",{class:!0});var mi=r(po);k(ac.$$.fragment,mi),LE=p(mi),ss=a(mi,"P",{});var Ju=r(ss);OE=n(Ju,"The "),Uf=a(Ju,"A",{href:!0});var lZ=r(Uf);DE=n(lZ,"BertForMaskedLM"),lZ.forEach(t),QE=n(Ju," forward method, overrides the "),__=a(Ju,"CODE",{});var dZ=r(__);HE=n(dZ,"__call__"),dZ.forEach(t),YE=n(Ju," special method."),Ju.forEach(t),KE=p(mi),k(za.$$.fragment,mi),ej=p(mi),k(Ja.$$.fragment,mi),mi.forEach(t),Mn.forEach(t),gk=p(i),as=a(i,"H2",{class:!0});var e1=r(as);Ca=a(e1,"A",{id:!0,class:!0,href:!0});var cZ=r(Ca);b_=a(cZ,"SPAN",{});var pZ=r(b_);k(rc.$$.fragment,pZ),pZ.forEach(t),cZ.forEach(t),tj=p(e1),y_=a(e1,"SPAN",{});var hZ=r(y_);oj=n(hZ,"BertForNextSentencePrediction"),hZ.forEach(t),e1.forEach(t),_k=p(i),Ct=a(i,"DIV",{class:!0});var Fn=r(Ct);k(ic.$$.fragment,Fn),nj=p(Fn),lc=a(Fn,"P",{});var t1=r(lc);sj=n(t1,"Bert Model with a "),T_=a(t1,"CODE",{});var mZ=r(T_);aj=n(mZ,"next sentence prediction (classification)"),mZ.forEach(t),rj=n(t1," head on top."),t1.forEach(t),ij=p(Fn),dc=a(Fn,"P",{});var o1=r(dc);lj=n(o1,"This model inherits from "),Nf=a(o1,"A",{href:!0});var fZ=r(Nf);dj=n(fZ,"PreTrainedModel"),fZ.forEach(t),cj=n(o1,`. 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.)`),o1.forEach(t),pj=p(Fn),cc=a(Fn,"P",{});var n1=r(cc);hj=n(n1,"This model is also a PyTorch "),pc=a(n1,"A",{href:!0,rel:!0});var uZ=r(pc);mj=n(uZ,"torch.nn.Module"),uZ.forEach(t),fj=n(n1,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),n1.forEach(t),uj=p(Fn),ho=a(Fn,"DIV",{class:!0});var fi=r(ho);k(hc.$$.fragment,fi),gj=p(fi),rs=a(fi,"P",{});var Cu=r(rs);_j=n(Cu,"The "),Pf=a(Cu,"A",{href:!0});var gZ=r(Pf);bj=n(gZ,"BertForNextSentencePrediction"),gZ.forEach(t),yj=n(Cu," forward method, overrides the "),v_=a(Cu,"CODE",{});var _Z=r(v_);Tj=n(_Z,"__call__"),_Z.forEach(t),vj=n(Cu," special method."),Cu.forEach(t),kj=p(fi),k(Ia.$$.fragment,fi),wj=p(fi),k(Ua.$$.fragment,fi),fi.forEach(t),Fn.forEach(t),bk=p(i),is=a(i,"H2",{class:!0});var s1=r(is);Na=a(s1,"A",{id:!0,class:!0,href:!0});var bZ=r(Na);k_=a(bZ,"SPAN",{});var yZ=r(k_);k(mc.$$.fragment,yZ),yZ.forEach(t),bZ.forEach(t),Mj=p(s1),w_=a(s1,"SPAN",{});var TZ=r(w_);Fj=n(TZ,"BertForSequenceClassification"),TZ.forEach(t),s1.forEach(t),yk=p(i),It=a(i,"DIV",{class:!0});var $n=r(It);k(fc.$$.fragment,$n),$j=p($n),M_=a($n,"P",{});var vZ=r(M_);xj=n(vZ,`Bert Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),vZ.forEach(t),Bj=p($n),uc=a($n,"P",{});var a1=r(uc);Ej=n(a1,"This model inherits from "),Wf=a(a1,"A",{href:!0});var kZ=r(Wf);jj=n(kZ,"PreTrainedModel"),kZ.forEach(t),zj=n(a1,`. 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.)`),a1.forEach(t),Jj=p($n),gc=a($n,"P",{});var r1=r(gc);Cj=n(r1,"This model is also a PyTorch "),_c=a(r1,"A",{href:!0,rel:!0});var wZ=r(_c);Ij=n(wZ,"torch.nn.Module"),wZ.forEach(t),Uj=n(r1,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),r1.forEach(t),Nj=p($n),At=a($n,"DIV",{class:!0});var xn=r(At);k(bc.$$.fragment,xn),Pj=p(xn),ls=a(xn,"P",{});var Iu=r(ls);Wj=n(Iu,"The "),qf=a(Iu,"A",{href:!0});var MZ=r(qf);qj=n(MZ,"BertForSequenceClassification"),MZ.forEach(t),Aj=n(Iu," forward method, overrides the "),F_=a(Iu,"CODE",{});var FZ=r(F_);Zj=n(FZ,"__call__"),FZ.forEach(t),Rj=n(Iu," special method."),Iu.forEach(t),Gj=p(xn),k(Pa.$$.fragment,xn),Vj=p(xn),k(Wa.$$.fragment,xn),Sj=p(xn),k(qa.$$.fragment,xn),xn.forEach(t),$n.forEach(t),Tk=p(i),ds=a(i,"H2",{class:!0});var i1=r(ds);Aa=a(i1,"A",{id:!0,class:!0,href:!0});var $Z=r(Aa);$_=a($Z,"SPAN",{});var xZ=r($_);k(yc.$$.fragment,xZ),xZ.forEach(t),$Z.forEach(t),Xj=p(i1),x_=a(i1,"SPAN",{});var BZ=r(x_);Lj=n(BZ,"BertForMultipleChoice"),BZ.forEach(t),i1.forEach(t),vk=p(i),Ut=a(i,"DIV",{class:!0});var Bn=r(Ut);k(Tc.$$.fragment,Bn),Oj=p(Bn),B_=a(Bn,"P",{});var EZ=r(B_);Dj=n(EZ,`Bert 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.`),EZ.forEach(t),Qj=p(Bn),vc=a(Bn,"P",{});var l1=r(vc);Hj=n(l1,"This model inherits from "),Af=a(l1,"A",{href:!0});var jZ=r(Af);Yj=n(jZ,"PreTrainedModel"),jZ.forEach(t),Kj=n(l1,`. 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.)`),l1.forEach(t),ez=p(Bn),kc=a(Bn,"P",{});var d1=r(kc);tz=n(d1,"This model is also a PyTorch "),wc=a(d1,"A",{href:!0,rel:!0});var zZ=r(wc);oz=n(zZ,"torch.nn.Module"),zZ.forEach(t),nz=n(d1,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),d1.forEach(t),sz=p(Bn),mo=a(Bn,"DIV",{class:!0});var ui=r(mo);k(Mc.$$.fragment,ui),az=p(ui),cs=a(ui,"P",{});var Uu=r(cs);rz=n(Uu,"The "),Zf=a(Uu,"A",{href:!0});var JZ=r(Zf);iz=n(JZ,"BertForMultipleChoice"),JZ.forEach(t),lz=n(Uu," forward method, overrides the "),E_=a(Uu,"CODE",{});var CZ=r(E_);dz=n(CZ,"__call__"),CZ.forEach(t),cz=n(Uu," special method."),Uu.forEach(t),pz=p(ui),k(Za.$$.fragment,ui),hz=p(ui),k(Ra.$$.fragment,ui),ui.forEach(t),Bn.forEach(t),kk=p(i),ps=a(i,"H2",{class:!0});var c1=r(ps);Ga=a(c1,"A",{id:!0,class:!0,href:!0});var IZ=r(Ga);j_=a(IZ,"SPAN",{});var UZ=r(j_);k(Fc.$$.fragment,UZ),UZ.forEach(t),IZ.forEach(t),mz=p(c1),z_=a(c1,"SPAN",{});var NZ=r(z_);fz=n(NZ,"BertForTokenClassification"),NZ.forEach(t),c1.forEach(t),wk=p(i),Nt=a(i,"DIV",{class:!0});var En=r(Nt);k($c.$$.fragment,En),uz=p(En),J_=a(En,"P",{});var PZ=r(J_);gz=n(PZ,`Bert 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.`),PZ.forEach(t),_z=p(En),xc=a(En,"P",{});var p1=r(xc);bz=n(p1,"This model inherits from "),Rf=a(p1,"A",{href:!0});var WZ=r(Rf);yz=n(WZ,"PreTrainedModel"),WZ.forEach(t),Tz=n(p1,`. 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.)`),p1.forEach(t),vz=p(En),Bc=a(En,"P",{});var h1=r(Bc);kz=n(h1,"This model is also a PyTorch "),Ec=a(h1,"A",{href:!0,rel:!0});var qZ=r(Ec);wz=n(qZ,"torch.nn.Module"),qZ.forEach(t),Mz=n(h1,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),h1.forEach(t),Fz=p(En),fo=a(En,"DIV",{class:!0});var gi=r(fo);k(jc.$$.fragment,gi),$z=p(gi),hs=a(gi,"P",{});var Nu=r(hs);xz=n(Nu,"The "),Gf=a(Nu,"A",{href:!0});var AZ=r(Gf);Bz=n(AZ,"BertForTokenClassification"),AZ.forEach(t),Ez=n(Nu," forward method, overrides the "),C_=a(Nu,"CODE",{});var ZZ=r(C_);jz=n(ZZ,"__call__"),ZZ.forEach(t),zz=n(Nu," special method."),Nu.forEach(t),Jz=p(gi),k(Va.$$.fragment,gi),Cz=p(gi),k(Sa.$$.fragment,gi),gi.forEach(t),En.forEach(t),Mk=p(i),ms=a(i,"H2",{class:!0});var m1=r(ms);Xa=a(m1,"A",{id:!0,class:!0,href:!0});var RZ=r(Xa);I_=a(RZ,"SPAN",{});var GZ=r(I_);k(zc.$$.fragment,GZ),GZ.forEach(t),RZ.forEach(t),Iz=p(m1),U_=a(m1,"SPAN",{});var VZ=r(U_);Uz=n(VZ,"BertForQuestionAnswering"),VZ.forEach(t),m1.forEach(t),Fk=p(i),Pt=a(i,"DIV",{class:!0});var jn=r(Pt);k(Jc.$$.fragment,jn),Nz=p(jn),fs=a(jn,"P",{});var Pu=r(fs);Pz=n(Pu,`Bert 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 `),N_=a(Pu,"CODE",{});var SZ=r(N_);Wz=n(SZ,"span start logits"),SZ.forEach(t),qz=n(Pu," and "),P_=a(Pu,"CODE",{});var XZ=r(P_);Az=n(XZ,"span end logits"),XZ.forEach(t),Zz=n(Pu,")."),Pu.forEach(t),Rz=p(jn),Cc=a(jn,"P",{});var f1=r(Cc);Gz=n(f1,"This model inherits from "),Vf=a(f1,"A",{href:!0});var LZ=r(Vf);Vz=n(LZ,"PreTrainedModel"),LZ.forEach(t),Sz=n(f1,`. 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.)`),f1.forEach(t),Xz=p(jn),Ic=a(jn,"P",{});var u1=r(Ic);Lz=n(u1,"This model is also a PyTorch "),Uc=a(u1,"A",{href:!0,rel:!0});var OZ=r(Uc);Oz=n(OZ,"torch.nn.Module"),OZ.forEach(t),Dz=n(u1,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),u1.forEach(t),Qz=p(jn),uo=a(jn,"DIV",{class:!0});var _i=r(uo);k(Nc.$$.fragment,_i),Hz=p(_i),us=a(_i,"P",{});var Wu=r(us);Yz=n(Wu,"The "),Sf=a(Wu,"A",{href:!0});var DZ=r(Sf);Kz=n(DZ,"BertForQuestionAnswering"),DZ.forEach(t),eJ=n(Wu," forward method, overrides the "),W_=a(Wu,"CODE",{});var QZ=r(W_);tJ=n(QZ,"__call__"),QZ.forEach(t),oJ=n(Wu," special method."),Wu.forEach(t),nJ=p(_i),k(La.$$.fragment,_i),sJ=p(_i),k(Oa.$$.fragment,_i),_i.forEach(t),jn.forEach(t),$k=p(i),gs=a(i,"H2",{class:!0});var g1=r(gs);Da=a(g1,"A",{id:!0,class:!0,href:!0});var HZ=r(Da);q_=a(HZ,"SPAN",{});var YZ=r(q_);k(Pc.$$.fragment,YZ),YZ.forEach(t),HZ.forEach(t),aJ=p(g1),A_=a(g1,"SPAN",{});var KZ=r(A_);rJ=n(KZ,"TFBertModel"),KZ.forEach(t),g1.forEach(t),xk=p(i),_t=a(i,"DIV",{class:!0});var jo=r(_t);k(Wc.$$.fragment,jo),iJ=p(jo),Z_=a(jo,"P",{});var e6=r(Z_);lJ=n(e6,"The bare Bert Model transformer outputting raw hidden-states without any specific head on top."),e6.forEach(t),dJ=p(jo),qc=a(jo,"P",{});var _1=r(qc);cJ=n(_1,"This model inherits from "),Xf=a(_1,"A",{href:!0});var t6=r(Xf);pJ=n(t6,"TFPreTrainedModel"),t6.forEach(t),hJ=n(_1,`. 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.)`),_1.forEach(t),mJ=p(jo),Ac=a(jo,"P",{});var b1=r(Ac);fJ=n(b1,"This model is also a "),Zc=a(b1,"A",{href:!0,rel:!0});var o6=r(Zc);uJ=n(o6,"tf.keras.Model"),o6.forEach(t),gJ=n(b1,` 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.`),b1.forEach(t),_J=p(jo),k(Qa.$$.fragment,jo),bJ=p(jo),go=a(jo,"DIV",{class:!0});var bi=r(go);k(Rc.$$.fragment,bi),yJ=p(bi),_s=a(bi,"P",{});var qu=r(_s);TJ=n(qu,"The "),Lf=a(qu,"A",{href:!0});var n6=r(Lf);vJ=n(n6,"TFBertModel"),n6.forEach(t),kJ=n(qu," forward method, overrides the "),R_=a(qu,"CODE",{});var s6=r(R_);wJ=n(s6,"__call__"),s6.forEach(t),MJ=n(qu," special method."),qu.forEach(t),FJ=p(bi),k(Ha.$$.fragment,bi),$J=p(bi),k(Ya.$$.fragment,bi),bi.forEach(t),jo.forEach(t),Bk=p(i),bs=a(i,"H2",{class:!0});var y1=r(bs);Ka=a(y1,"A",{id:!0,class:!0,href:!0});var a6=r(Ka);G_=a(a6,"SPAN",{});var r6=r(G_);k(Gc.$$.fragment,r6),r6.forEach(t),a6.forEach(t),xJ=p(y1),V_=a(y1,"SPAN",{});var i6=r(V_);BJ=n(i6,"TFBertForPreTraining"),i6.forEach(t),y1.forEach(t),Ek=p(i),bt=a(i,"DIV",{class:!0});var zo=r(bt);k(Vc.$$.fragment,zo),EJ=p(zo),ys=a(zo,"P",{});var Au=r(ys);jJ=n(Au,`Bert Model with two heads on top as done during the pretraining:
a `),S_=a(Au,"CODE",{});var l6=r(S_);zJ=n(l6,"masked language modeling"),l6.forEach(t),JJ=n(Au," head and a "),X_=a(Au,"CODE",{});var d6=r(X_);CJ=n(d6,"next sentence prediction (classification)"),d6.forEach(t),IJ=n(Au," head."),Au.forEach(t),UJ=p(zo),Sc=a(zo,"P",{});var T1=r(Sc);NJ=n(T1,"This model inherits from "),Of=a(T1,"A",{href:!0});var c6=r(Of);PJ=n(c6,"TFPreTrainedModel"),c6.forEach(t),WJ=n(T1,`. 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.)`),T1.forEach(t),qJ=p(zo),Xc=a(zo,"P",{});var v1=r(Xc);AJ=n(v1,"This model is also a "),Lc=a(v1,"A",{href:!0,rel:!0});var p6=r(Lc);ZJ=n(p6,"tf.keras.Model"),p6.forEach(t),RJ=n(v1,` 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.`),v1.forEach(t),GJ=p(zo),k(er.$$.fragment,zo),VJ=p(zo),_o=a(zo,"DIV",{class:!0});var yi=r(_o);k(Oc.$$.fragment,yi),SJ=p(yi),Ts=a(yi,"P",{});var Zu=r(Ts);XJ=n(Zu,"The "),Df=a(Zu,"A",{href:!0});var h6=r(Df);LJ=n(h6,"TFBertForPreTraining"),h6.forEach(t),OJ=n(Zu," forward method, overrides the "),L_=a(Zu,"CODE",{});var m6=r(L_);DJ=n(m6,"__call__"),m6.forEach(t),QJ=n(Zu," special method."),Zu.forEach(t),HJ=p(yi),k(tr.$$.fragment,yi),YJ=p(yi),k(or.$$.fragment,yi),yi.forEach(t),zo.forEach(t),jk=p(i),vs=a(i,"H2",{class:!0});var k1=r(vs);nr=a(k1,"A",{id:!0,class:!0,href:!0});var f6=r(nr);O_=a(f6,"SPAN",{});var u6=r(O_);k(Dc.$$.fragment,u6),u6.forEach(t),f6.forEach(t),KJ=p(k1),D_=a(k1,"SPAN",{});var g6=r(D_);eC=n(g6,"TFBertModelLMHeadModel"),g6.forEach(t),k1.forEach(t),zk=p(i),ks=a(i,"DIV",{class:!0});var w1=r(ks);k(Qc.$$.fragment,w1),tC=p(w1),Zt=a(w1,"DIV",{class:!0});var zn=r(Zt);k(Hc.$$.fragment,zn),oC=p(zn),st=a(zn,"P",{});var xt=r(st);nC=n(xt,"encoder_hidden_states  ("),Q_=a(xt,"CODE",{});var _6=r(Q_);sC=n(_6,"tf.Tensor"),_6.forEach(t),aC=n(xt," of shape "),H_=a(xt,"CODE",{});var b6=r(H_);rC=n(b6,"(batch_size, sequence_length, hidden_size)"),b6.forEach(t),iC=n(xt,", "),Y_=a(xt,"EM",{});var y6=r(Y_);lC=n(y6,"optional"),y6.forEach(t),dC=n(xt,`):
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.
encoder_attention_mask (`),K_=a(xt,"CODE",{});var T6=r(K_);cC=n(T6,"tf.Tensor"),T6.forEach(t),pC=n(xt," of shape "),eb=a(xt,"CODE",{});var v6=r(eb);hC=n(v6,"(batch_size, sequence_length)"),v6.forEach(t),mC=n(xt,", "),tb=a(xt,"EM",{});var k6=r(tb);fC=n(k6,"optional"),k6.forEach(t),uC=n(xt,`):
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in `),ob=a(xt,"CODE",{});var w6=r(ob);gC=n(w6,"[0, 1]"),w6.forEach(t),_C=n(xt,":"),xt.forEach(t),bC=p(zn),Yc=a(zn,"UL",{});var M1=r(Yc);Kc=a(M1,"LI",{});var F1=r(Kc);yC=n(F1,"1 for tokens that are "),nb=a(F1,"STRONG",{});var M6=r(nb);TC=n(M6,"not masked"),M6.forEach(t),vC=n(F1,","),F1.forEach(t),kC=p(M1),ep=a(M1,"LI",{});var $1=r(ep);wC=n($1,"0 for tokens that are "),sb=a($1,"STRONG",{});var F6=r(sb);MC=n(F6,"masked"),F6.forEach(t),FC=n($1,"."),$1.forEach(t),M1.forEach(t),$C=p(zn),ne=a(zn,"P",{});var re=r(ne);xC=n(re,"past_key_values ("),ab=a(re,"CODE",{});var $6=r(ab);BC=n($6,"Tuple[Tuple[tf.Tensor]]"),$6.forEach(t),EC=n(re," of length "),rb=a(re,"CODE",{});var x6=r(rb);jC=n(x6,"config.n_layers"),x6.forEach(t),zC=n(re,`)
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If `),ib=a(re,"CODE",{});var B6=r(ib);JC=n(B6,"past_key_values"),B6.forEach(t),CC=n(re," are used, the user can optionally input only the last "),lb=a(re,"CODE",{});var E6=r(lb);IC=n(E6,"decoder_input_ids"),E6.forEach(t),UC=n(re,` (those that
don\u2019t have their past key value states given to this model) of shape `),db=a(re,"CODE",{});var j6=r(db);NC=n(j6,"(batch_size, 1)"),j6.forEach(t),PC=n(re,` instead of all
`),cb=a(re,"CODE",{});var z6=r(cb);WC=n(z6,"decoder_input_ids"),z6.forEach(t),qC=n(re," of shape "),pb=a(re,"CODE",{});var J6=r(pb);AC=n(J6,"(batch_size, sequence_length)"),J6.forEach(t),ZC=n(re,`.
use_cache (`),hb=a(re,"CODE",{});var C6=r(hb);RC=n(C6,"bool"),C6.forEach(t),GC=n(re,", "),mb=a(re,"EM",{});var I6=r(mb);VC=n(I6,"optional"),I6.forEach(t),SC=n(re,", defaults to "),fb=a(re,"CODE",{});var U6=r(fb);XC=n(U6,"True"),U6.forEach(t),LC=n(re,`):
If set to `),ub=a(re,"CODE",{});var N6=r(ub);OC=n(N6,"True"),N6.forEach(t),DC=n(re,", "),gb=a(re,"CODE",{});var P6=r(gb);QC=n(P6,"past_key_values"),P6.forEach(t),HC=n(re,` key value states are returned and can be used to speed up decoding (see
`),_b=a(re,"CODE",{});var W6=r(_b);YC=n(W6,"past_key_values"),W6.forEach(t),KC=n(re,"). Set to "),bb=a(re,"CODE",{});var q6=r(bb);eI=n(q6,"False"),q6.forEach(t),tI=n(re," during training, "),yb=a(re,"CODE",{});var A6=r(yb);oI=n(A6,"True"),A6.forEach(t),nI=n(re,` during generation
labels (`),Tb=a(re,"CODE",{});var Z6=r(Tb);sI=n(Z6,"tf.Tensor"),Z6.forEach(t),aI=n(re," or "),vb=a(re,"CODE",{});var R6=r(vb);rI=n(R6,"np.ndarray"),R6.forEach(t),iI=n(re," of shape "),kb=a(re,"CODE",{});var G6=r(kb);lI=n(G6,"(batch_size, sequence_length)"),G6.forEach(t),dI=n(re,", "),wb=a(re,"EM",{});var V6=r(wb);cI=n(V6,"optional"),V6.forEach(t),pI=n(re,`):
Labels for computing the cross entropy classification loss. Indices should be in `),Mb=a(re,"CODE",{});var S6=r(Mb);hI=n(S6,"[0, ..., config.vocab_size - 1]"),S6.forEach(t),mI=n(re,"."),re.forEach(t),fI=p(zn),k(sr.$$.fragment,zn),zn.forEach(t),w1.forEach(t),Jk=p(i),ws=a(i,"H2",{class:!0});var x1=r(ws);ar=a(x1,"A",{id:!0,class:!0,href:!0});var X6=r(ar);Fb=a(X6,"SPAN",{});var L6=r(Fb);k(tp.$$.fragment,L6),L6.forEach(t),X6.forEach(t),uI=p(x1),$b=a(x1,"SPAN",{});var O6=r($b);gI=n(O6,"TFBertForMaskedLM"),O6.forEach(t),x1.forEach(t),Ck=p(i),yt=a(i,"DIV",{class:!0});var Jo=r(yt);k(op.$$.fragment,Jo),_I=p(Jo),np=a(Jo,"P",{});var B1=r(np);bI=n(B1,"Bert Model with a "),xb=a(B1,"CODE",{});var D6=r(xb);yI=n(D6,"language modeling"),D6.forEach(t),TI=n(B1," head on top."),B1.forEach(t),vI=p(Jo),sp=a(Jo,"P",{});var E1=r(sp);kI=n(E1,"This model inherits from "),Qf=a(E1,"A",{href:!0});var Q6=r(Qf);wI=n(Q6,"TFPreTrainedModel"),Q6.forEach(t),MI=n(E1,`. 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.)`),E1.forEach(t),FI=p(Jo),ap=a(Jo,"P",{});var j1=r(ap);$I=n(j1,"This model is also a "),rp=a(j1,"A",{href:!0,rel:!0});var H6=r(rp);xI=n(H6,"tf.keras.Model"),H6.forEach(t),BI=n(j1,` 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.`),j1.forEach(t),EI=p(Jo),k(rr.$$.fragment,Jo),jI=p(Jo),Rt=a(Jo,"DIV",{class:!0});var Jn=r(Rt);k(ip.$$.fragment,Jn),zI=p(Jn),Ms=a(Jn,"P",{});var Ru=r(Ms);JI=n(Ru,"The "),Hf=a(Ru,"A",{href:!0});var Y6=r(Hf);CI=n(Y6,"TFBertForMaskedLM"),Y6.forEach(t),II=n(Ru," forward method, overrides the "),Bb=a(Ru,"CODE",{});var K6=r(Bb);UI=n(K6,"__call__"),K6.forEach(t),NI=n(Ru," special method."),Ru.forEach(t),PI=p(Jn),k(ir.$$.fragment,Jn),WI=p(Jn),k(lr.$$.fragment,Jn),qI=p(Jn),k(dr.$$.fragment,Jn),Jn.forEach(t),Jo.forEach(t),Ik=p(i),Fs=a(i,"H2",{class:!0});var z1=r(Fs);cr=a(z1,"A",{id:!0,class:!0,href:!0});var eR=r(cr);Eb=a(eR,"SPAN",{});var tR=r(Eb);k(lp.$$.fragment,tR),tR.forEach(t),eR.forEach(t),AI=p(z1),jb=a(z1,"SPAN",{});var oR=r(jb);ZI=n(oR,"TFBertForNextSentencePrediction"),oR.forEach(t),z1.forEach(t),Uk=p(i),Tt=a(i,"DIV",{class:!0});var Co=r(Tt);k(dp.$$.fragment,Co),RI=p(Co),cp=a(Co,"P",{});var J1=r(cp);GI=n(J1,"Bert Model with a "),zb=a(J1,"CODE",{});var nR=r(zb);VI=n(nR,"next sentence prediction (classification)"),nR.forEach(t),SI=n(J1," head on top."),J1.forEach(t),XI=p(Co),pp=a(Co,"P",{});var C1=r(pp);LI=n(C1,"This model inherits from "),Yf=a(C1,"A",{href:!0});var sR=r(Yf);OI=n(sR,"TFPreTrainedModel"),sR.forEach(t),DI=n(C1,`. 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.)`),C1.forEach(t),QI=p(Co),hp=a(Co,"P",{});var I1=r(hp);HI=n(I1,"This model is also a "),mp=a(I1,"A",{href:!0,rel:!0});var aR=r(mp);YI=n(aR,"tf.keras.Model"),aR.forEach(t),KI=n(I1,` 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.`),I1.forEach(t),e4=p(Co),k(pr.$$.fragment,Co),t4=p(Co),bo=a(Co,"DIV",{class:!0});var Ti=r(bo);k(fp.$$.fragment,Ti),o4=p(Ti),$s=a(Ti,"P",{});var Gu=r($s);n4=n(Gu,"The "),Kf=a(Gu,"A",{href:!0});var rR=r(Kf);s4=n(rR,"TFBertForNextSentencePrediction"),rR.forEach(t),a4=n(Gu," forward method, overrides the "),Jb=a(Gu,"CODE",{});var iR=r(Jb);r4=n(iR,"__call__"),iR.forEach(t),i4=n(Gu," special method."),Gu.forEach(t),l4=p(Ti),k(hr.$$.fragment,Ti),d4=p(Ti),k(mr.$$.fragment,Ti),Ti.forEach(t),Co.forEach(t),Nk=p(i),xs=a(i,"H2",{class:!0});var U1=r(xs);fr=a(U1,"A",{id:!0,class:!0,href:!0});var lR=r(fr);Cb=a(lR,"SPAN",{});var dR=r(Cb);k(up.$$.fragment,dR),dR.forEach(t),lR.forEach(t),c4=p(U1),Ib=a(U1,"SPAN",{});var cR=r(Ib);p4=n(cR,"TFBertForSequenceClassification"),cR.forEach(t),U1.forEach(t),Pk=p(i),vt=a(i,"DIV",{class:!0});var Io=r(vt);k(gp.$$.fragment,Io),h4=p(Io),Ub=a(Io,"P",{});var pR=r(Ub);m4=n(pR,`Bert Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),pR.forEach(t),f4=p(Io),_p=a(Io,"P",{});var N1=r(_p);u4=n(N1,"This model inherits from "),eu=a(N1,"A",{href:!0});var hR=r(eu);g4=n(hR,"TFPreTrainedModel"),hR.forEach(t),_4=n(N1,`. 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.)`),N1.forEach(t),b4=p(Io),bp=a(Io,"P",{});var P1=r(bp);y4=n(P1,"This model is also a "),yp=a(P1,"A",{href:!0,rel:!0});var mR=r(yp);T4=n(mR,"tf.keras.Model"),mR.forEach(t),v4=n(P1,` 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.`),P1.forEach(t),k4=p(Io),k(ur.$$.fragment,Io),w4=p(Io),Gt=a(Io,"DIV",{class:!0});var Cn=r(Gt);k(Tp.$$.fragment,Cn),M4=p(Cn),Bs=a(Cn,"P",{});var Vu=r(Bs);F4=n(Vu,"The "),tu=a(Vu,"A",{href:!0});var fR=r(tu);$4=n(fR,"TFBertForSequenceClassification"),fR.forEach(t),x4=n(Vu," forward method, overrides the "),Nb=a(Vu,"CODE",{});var uR=r(Nb);B4=n(uR,"__call__"),uR.forEach(t),E4=n(Vu," special method."),Vu.forEach(t),j4=p(Cn),k(gr.$$.fragment,Cn),z4=p(Cn),k(_r.$$.fragment,Cn),J4=p(Cn),k(br.$$.fragment,Cn),Cn.forEach(t),Io.forEach(t),Wk=p(i),Es=a(i,"H2",{class:!0});var W1=r(Es);yr=a(W1,"A",{id:!0,class:!0,href:!0});var gR=r(yr);Pb=a(gR,"SPAN",{});var _R=r(Pb);k(vp.$$.fragment,_R),_R.forEach(t),gR.forEach(t),C4=p(W1),Wb=a(W1,"SPAN",{});var bR=r(Wb);I4=n(bR,"TFBertForMultipleChoice"),bR.forEach(t),W1.forEach(t),qk=p(i),kt=a(i,"DIV",{class:!0});var Uo=r(kt);k(kp.$$.fragment,Uo),U4=p(Uo),qb=a(Uo,"P",{});var yR=r(qb);N4=n(yR,`Bert 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.`),yR.forEach(t),P4=p(Uo),wp=a(Uo,"P",{});var q1=r(wp);W4=n(q1,"This model inherits from "),ou=a(q1,"A",{href:!0});var TR=r(ou);q4=n(TR,"TFPreTrainedModel"),TR.forEach(t),A4=n(q1,`. 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.)`),q1.forEach(t),Z4=p(Uo),Mp=a(Uo,"P",{});var A1=r(Mp);R4=n(A1,"This model is also a "),Fp=a(A1,"A",{href:!0,rel:!0});var vR=r(Fp);G4=n(vR,"tf.keras.Model"),vR.forEach(t),V4=n(A1,` 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.`),A1.forEach(t),S4=p(Uo),k(Tr.$$.fragment,Uo),X4=p(Uo),yo=a(Uo,"DIV",{class:!0});var vi=r(yo);k($p.$$.fragment,vi),L4=p(vi),js=a(vi,"P",{});var Su=r(js);O4=n(Su,"The "),nu=a(Su,"A",{href:!0});var kR=r(nu);D4=n(kR,"TFBertForMultipleChoice"),kR.forEach(t),Q4=n(Su," forward method, overrides the "),Ab=a(Su,"CODE",{});var wR=r(Ab);H4=n(wR,"__call__"),wR.forEach(t),Y4=n(Su," special method."),Su.forEach(t),K4=p(vi),k(vr.$$.fragment,vi),e5=p(vi),k(kr.$$.fragment,vi),vi.forEach(t),Uo.forEach(t),Ak=p(i),zs=a(i,"H2",{class:!0});var Z1=r(zs);wr=a(Z1,"A",{id:!0,class:!0,href:!0});var MR=r(wr);Zb=a(MR,"SPAN",{});var FR=r(Zb);k(xp.$$.fragment,FR),FR.forEach(t),MR.forEach(t),t5=p(Z1),Rb=a(Z1,"SPAN",{});var $R=r(Rb);o5=n($R,"TFBertForTokenClassification"),$R.forEach(t),Z1.forEach(t),Zk=p(i),wt=a(i,"DIV",{class:!0});var No=r(wt);k(Bp.$$.fragment,No),n5=p(No),Gb=a(No,"P",{});var xR=r(Gb);s5=n(xR,`Bert 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.`),xR.forEach(t),a5=p(No),Ep=a(No,"P",{});var R1=r(Ep);r5=n(R1,"This model inherits from "),su=a(R1,"A",{href:!0});var BR=r(su);i5=n(BR,"TFPreTrainedModel"),BR.forEach(t),l5=n(R1,`. 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.)`),R1.forEach(t),d5=p(No),jp=a(No,"P",{});var G1=r(jp);c5=n(G1,"This model is also a "),zp=a(G1,"A",{href:!0,rel:!0});var ER=r(zp);p5=n(ER,"tf.keras.Model"),ER.forEach(t),h5=n(G1,` 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.`),G1.forEach(t),m5=p(No),k(Mr.$$.fragment,No),f5=p(No),Vt=a(No,"DIV",{class:!0});var In=r(Vt);k(Jp.$$.fragment,In),u5=p(In),Js=a(In,"P",{});var Xu=r(Js);g5=n(Xu,"The "),au=a(Xu,"A",{href:!0});var jR=r(au);_5=n(jR,"TFBertForTokenClassification"),jR.forEach(t),b5=n(Xu," forward method, overrides the "),Vb=a(Xu,"CODE",{});var zR=r(Vb);y5=n(zR,"__call__"),zR.forEach(t),T5=n(Xu," special method."),Xu.forEach(t),v5=p(In),k(Fr.$$.fragment,In),k5=p(In),k($r.$$.fragment,In),w5=p(In),k(xr.$$.fragment,In),In.forEach(t),No.forEach(t),Rk=p(i),Cs=a(i,"H2",{class:!0});var V1=r(Cs);Br=a(V1,"A",{id:!0,class:!0,href:!0});var JR=r(Br);Sb=a(JR,"SPAN",{});var CR=r(Sb);k(Cp.$$.fragment,CR),CR.forEach(t),JR.forEach(t),M5=p(V1),Xb=a(V1,"SPAN",{});var IR=r(Xb);F5=n(IR,"TFBertForQuestionAnswering"),IR.forEach(t),V1.forEach(t),Gk=p(i),Mt=a(i,"DIV",{class:!0});var Po=r(Mt);k(Ip.$$.fragment,Po),$5=p(Po),Is=a(Po,"P",{});var Lu=r(Is);x5=n(Lu,`Bert 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 `),Lb=a(Lu,"CODE",{});var UR=r(Lb);B5=n(UR,"span start logits"),UR.forEach(t),E5=n(Lu," and "),Ob=a(Lu,"CODE",{});var NR=r(Ob);j5=n(NR,"span end logits"),NR.forEach(t),z5=n(Lu,")."),Lu.forEach(t),J5=p(Po),Up=a(Po,"P",{});var S1=r(Up);C5=n(S1,"This model inherits from "),ru=a(S1,"A",{href:!0});var PR=r(ru);I5=n(PR,"TFPreTrainedModel"),PR.forEach(t),U5=n(S1,`. 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.)`),S1.forEach(t),N5=p(Po),Np=a(Po,"P",{});var X1=r(Np);P5=n(X1,"This model is also a "),Pp=a(X1,"A",{href:!0,rel:!0});var WR=r(Pp);W5=n(WR,"tf.keras.Model"),WR.forEach(t),q5=n(X1,` 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.`),X1.forEach(t),A5=p(Po),k(Er.$$.fragment,Po),Z5=p(Po),St=a(Po,"DIV",{class:!0});var Un=r(St);k(Wp.$$.fragment,Un),R5=p(Un),Us=a(Un,"P",{});var Ou=r(Us);G5=n(Ou,"The "),iu=a(Ou,"A",{href:!0});var qR=r(iu);V5=n(qR,"TFBertForQuestionAnswering"),qR.forEach(t),S5=n(Ou," forward method, overrides the "),Db=a(Ou,"CODE",{});var AR=r(Db);X5=n(AR,"__call__"),AR.forEach(t),L5=n(Ou," special method."),Ou.forEach(t),O5=p(Un),k(jr.$$.fragment,Un),D5=p(Un),k(zr.$$.fragment,Un),Q5=p(Un),k(Jr.$$.fragment,Un),Un.forEach(t),Po.forEach(t),Vk=p(i),Ns=a(i,"H2",{class:!0});var L1=r(Ns);Cr=a(L1,"A",{id:!0,class:!0,href:!0});var ZR=r(Cr);Qb=a(ZR,"SPAN",{});var RR=r(Qb);k(qp.$$.fragment,RR),RR.forEach(t),ZR.forEach(t),H5=p(L1),Hb=a(L1,"SPAN",{});var GR=r(Hb);Y5=n(GR,"FlaxBertModel"),GR.forEach(t),L1.forEach(t),Sk=p(i),at=a(i,"DIV",{class:!0});var Dt=r(at);k(Ap.$$.fragment,Dt),K5=p(Dt),Yb=a(Dt,"P",{});var VR=r(Yb);e3=n(VR,"The bare Bert Model transformer outputting raw hidden-states without any specific head on top."),VR.forEach(t),t3=p(Dt),Zp=a(Dt,"P",{});var O1=r(Zp);o3=n(O1,"This model inherits from "),lu=a(O1,"A",{href:!0});var SR=r(lu);n3=n(SR,"FlaxPreTrainedModel"),SR.forEach(t),s3=n(O1,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),O1.forEach(t),a3=p(Dt),Rp=a(Dt,"P",{});var D1=r(Rp);r3=n(D1,"This model is also a Flax Linen "),Gp=a(D1,"A",{href:!0,rel:!0});var XR=r(Gp);i3=n(XR,"flax.linen.Module"),XR.forEach(t),l3=n(D1,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),D1.forEach(t),d3=p(Dt),Kb=a(Dt,"P",{});var LR=r(Kb);c3=n(LR,"Finally, this model supports inherent JAX features such as:"),LR.forEach(t),p3=p(Dt),Ao=a(Dt,"UL",{});var ki=r(Ao);ey=a(ki,"LI",{});var OR=r(ey);Vp=a(OR,"A",{href:!0,rel:!0});var DR=r(Vp);h3=n(DR,"Just-In-Time (JIT) compilation"),DR.forEach(t),OR.forEach(t),m3=p(ki),ty=a(ki,"LI",{});var QR=r(ty);Sp=a(QR,"A",{href:!0,rel:!0});var HR=r(Sp);f3=n(HR,"Automatic Differentiation"),HR.forEach(t),QR.forEach(t),u3=p(ki),oy=a(ki,"LI",{});var YR=r(oy);Xp=a(YR,"A",{href:!0,rel:!0});var KR=r(Xp);g3=n(KR,"Vectorization"),KR.forEach(t),YR.forEach(t),_3=p(ki),ny=a(ki,"LI",{});var eG=r(ny);Lp=a(eG,"A",{href:!0,rel:!0});var tG=r(Lp);b3=n(tG,"Parallelization"),tG.forEach(t),eG.forEach(t),ki.forEach(t),y3=p(Dt),To=a(Dt,"DIV",{class:!0});var wi=r(To);k(Op.$$.fragment,wi),T3=p(wi),Ps=a(wi,"P",{});var Du=r(Ps);v3=n(Du,"The "),sy=a(Du,"CODE",{});var oG=r(sy);k3=n(oG,"FlaxBertPreTrainedModel"),oG.forEach(t),w3=n(Du," forward method, overrides the "),ay=a(Du,"CODE",{});var nG=r(ay);M3=n(nG,"__call__"),nG.forEach(t),F3=n(Du," special method."),Du.forEach(t),$3=p(wi),k(Ir.$$.fragment,wi),x3=p(wi),k(Ur.$$.fragment,wi),wi.forEach(t),Dt.forEach(t),Xk=p(i),Ws=a(i,"H2",{class:!0});var Q1=r(Ws);Nr=a(Q1,"A",{id:!0,class:!0,href:!0});var sG=r(Nr);ry=a(sG,"SPAN",{});var aG=r(ry);k(Dp.$$.fragment,aG),aG.forEach(t),sG.forEach(t),B3=p(Q1),iy=a(Q1,"SPAN",{});var rG=r(iy);E3=n(rG,"FlaxBertForPreTraining"),rG.forEach(t),Q1.forEach(t),Lk=p(i),rt=a(i,"DIV",{class:!0});var Qt=r(rt);k(Qp.$$.fragment,Qt),j3=p(Qt),qs=a(Qt,"P",{});var Qu=r(qs);z3=n(Qu,"Bert Model with two heads on top as done during the pretraining: a "),ly=a(Qu,"CODE",{});var iG=r(ly);J3=n(iG,"masked language modeling"),iG.forEach(t),C3=n(Qu," head and a "),dy=a(Qu,"CODE",{});var lG=r(dy);I3=n(lG,"next sentence prediction (classification)"),lG.forEach(t),U3=n(Qu," head."),Qu.forEach(t),N3=p(Qt),Hp=a(Qt,"P",{});var H1=r(Hp);P3=n(H1,"This model inherits from "),du=a(H1,"A",{href:!0});var dG=r(du);W3=n(dG,"FlaxPreTrainedModel"),dG.forEach(t),q3=n(H1,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),H1.forEach(t),A3=p(Qt),Yp=a(Qt,"P",{});var Y1=r(Yp);Z3=n(Y1,"This model is also a Flax Linen "),Kp=a(Y1,"A",{href:!0,rel:!0});var cG=r(Kp);R3=n(cG,"flax.linen.Module"),cG.forEach(t),G3=n(Y1,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Y1.forEach(t),V3=p(Qt),cy=a(Qt,"P",{});var pG=r(cy);S3=n(pG,"Finally, this model supports inherent JAX features such as:"),pG.forEach(t),X3=p(Qt),Zo=a(Qt,"UL",{});var Mi=r(Zo);py=a(Mi,"LI",{});var hG=r(py);eh=a(hG,"A",{href:!0,rel:!0});var mG=r(eh);L3=n(mG,"Just-In-Time (JIT) compilation"),mG.forEach(t),hG.forEach(t),O3=p(Mi),hy=a(Mi,"LI",{});var fG=r(hy);th=a(fG,"A",{href:!0,rel:!0});var uG=r(th);D3=n(uG,"Automatic Differentiation"),uG.forEach(t),fG.forEach(t),Q3=p(Mi),my=a(Mi,"LI",{});var gG=r(my);oh=a(gG,"A",{href:!0,rel:!0});var _G=r(oh);H3=n(_G,"Vectorization"),_G.forEach(t),gG.forEach(t),Y3=p(Mi),fy=a(Mi,"LI",{});var bG=r(fy);nh=a(bG,"A",{href:!0,rel:!0});var yG=r(nh);K3=n(yG,"Parallelization"),yG.forEach(t),bG.forEach(t),Mi.forEach(t),eU=p(Qt),vo=a(Qt,"DIV",{class:!0});var Fi=r(vo);k(sh.$$.fragment,Fi),tU=p(Fi),As=a(Fi,"P",{});var Hu=r(As);oU=n(Hu,"The "),uy=a(Hu,"CODE",{});var TG=r(uy);nU=n(TG,"FlaxBertPreTrainedModel"),TG.forEach(t),sU=n(Hu," forward method, overrides the "),gy=a(Hu,"CODE",{});var vG=r(gy);aU=n(vG,"__call__"),vG.forEach(t),rU=n(Hu," special method."),Hu.forEach(t),iU=p(Fi),k(Pr.$$.fragment,Fi),lU=p(Fi),k(Wr.$$.fragment,Fi),Fi.forEach(t),Qt.forEach(t),Ok=p(i),Zs=a(i,"H2",{class:!0});var K1=r(Zs);qr=a(K1,"A",{id:!0,class:!0,href:!0});var kG=r(qr);_y=a(kG,"SPAN",{});var wG=r(_y);k(ah.$$.fragment,wG),wG.forEach(t),kG.forEach(t),dU=p(K1),by=a(K1,"SPAN",{});var MG=r(by);cU=n(MG,"FlaxBertForCausalLM"),MG.forEach(t),K1.forEach(t),Dk=p(i),it=a(i,"DIV",{class:!0});var Ht=r(it);k(rh.$$.fragment,Ht),pU=p(Ht),yy=a(Ht,"P",{});var FG=r(yy);hU=n(FG,`Bert Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),FG.forEach(t),mU=p(Ht),ih=a(Ht,"P",{});var eM=r(ih);fU=n(eM,"This model inherits from "),cu=a(eM,"A",{href:!0});var $G=r(cu);uU=n($G,"FlaxPreTrainedModel"),$G.forEach(t),gU=n(eM,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),eM.forEach(t),_U=p(Ht),lh=a(Ht,"P",{});var tM=r(lh);bU=n(tM,"This model is also a Flax Linen "),dh=a(tM,"A",{href:!0,rel:!0});var xG=r(dh);yU=n(xG,"flax.linen.Module"),xG.forEach(t),TU=n(tM,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),tM.forEach(t),vU=p(Ht),Ty=a(Ht,"P",{});var BG=r(Ty);kU=n(BG,"Finally, this model supports inherent JAX features such as:"),BG.forEach(t),wU=p(Ht),Ro=a(Ht,"UL",{});var $i=r(Ro);vy=a($i,"LI",{});var EG=r(vy);ch=a(EG,"A",{href:!0,rel:!0});var jG=r(ch);MU=n(jG,"Just-In-Time (JIT) compilation"),jG.forEach(t),EG.forEach(t),FU=p($i),ky=a($i,"LI",{});var zG=r(ky);ph=a(zG,"A",{href:!0,rel:!0});var JG=r(ph);$U=n(JG,"Automatic Differentiation"),JG.forEach(t),zG.forEach(t),xU=p($i),wy=a($i,"LI",{});var CG=r(wy);hh=a(CG,"A",{href:!0,rel:!0});var IG=r(hh);BU=n(IG,"Vectorization"),IG.forEach(t),CG.forEach(t),EU=p($i),My=a($i,"LI",{});var UG=r(My);mh=a(UG,"A",{href:!0,rel:!0});var NG=r(mh);jU=n(NG,"Parallelization"),NG.forEach(t),UG.forEach(t),$i.forEach(t),zU=p(Ht),ko=a(Ht,"DIV",{class:!0});var xi=r(ko);k(fh.$$.fragment,xi),JU=p(xi),Rs=a(xi,"P",{});var Yu=r(Rs);CU=n(Yu,"The "),Fy=a(Yu,"CODE",{});var PG=r(Fy);IU=n(PG,"FlaxBertPreTrainedModel"),PG.forEach(t),UU=n(Yu," forward method, overrides the "),$y=a(Yu,"CODE",{});var WG=r($y);NU=n(WG,"__call__"),WG.forEach(t),PU=n(Yu," special method."),Yu.forEach(t),WU=p(xi),k(Ar.$$.fragment,xi),qU=p(xi),k(Zr.$$.fragment,xi),xi.forEach(t),Ht.forEach(t),Qk=p(i),Gs=a(i,"H2",{class:!0});var oM=r(Gs);Rr=a(oM,"A",{id:!0,class:!0,href:!0});var qG=r(Rr);xy=a(qG,"SPAN",{});var AG=r(xy);k(uh.$$.fragment,AG),AG.forEach(t),qG.forEach(t),AU=p(oM),By=a(oM,"SPAN",{});var ZG=r(By);ZU=n(ZG,"FlaxBertForMaskedLM"),ZG.forEach(t),oM.forEach(t),Hk=p(i),lt=a(i,"DIV",{class:!0});var Yt=r(lt);k(gh.$$.fragment,Yt),RU=p(Yt),_h=a(Yt,"P",{});var nM=r(_h);GU=n(nM,"Bert Model with a "),Ey=a(nM,"CODE",{});var RG=r(Ey);VU=n(RG,"language modeling"),RG.forEach(t),SU=n(nM," head on top."),nM.forEach(t),XU=p(Yt),bh=a(Yt,"P",{});var sM=r(bh);LU=n(sM,"This model inherits from "),pu=a(sM,"A",{href:!0});var GG=r(pu);OU=n(GG,"FlaxPreTrainedModel"),GG.forEach(t),DU=n(sM,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),sM.forEach(t),QU=p(Yt),yh=a(Yt,"P",{});var aM=r(yh);HU=n(aM,"This model is also a Flax Linen "),Th=a(aM,"A",{href:!0,rel:!0});var VG=r(Th);YU=n(VG,"flax.linen.Module"),VG.forEach(t),KU=n(aM,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),aM.forEach(t),eN=p(Yt),jy=a(Yt,"P",{});var SG=r(jy);tN=n(SG,"Finally, this model supports inherent JAX features such as:"),SG.forEach(t),oN=p(Yt),Go=a(Yt,"UL",{});var Bi=r(Go);zy=a(Bi,"LI",{});var XG=r(zy);vh=a(XG,"A",{href:!0,rel:!0});var LG=r(vh);nN=n(LG,"Just-In-Time (JIT) compilation"),LG.forEach(t),XG.forEach(t),sN=p(Bi),Jy=a(Bi,"LI",{});var OG=r(Jy);kh=a(OG,"A",{href:!0,rel:!0});var DG=r(kh);aN=n(DG,"Automatic Differentiation"),DG.forEach(t),OG.forEach(t),rN=p(Bi),Cy=a(Bi,"LI",{});var QG=r(Cy);wh=a(QG,"A",{href:!0,rel:!0});var HG=r(wh);iN=n(HG,"Vectorization"),HG.forEach(t),QG.forEach(t),lN=p(Bi),Iy=a(Bi,"LI",{});var YG=r(Iy);Mh=a(YG,"A",{href:!0,rel:!0});var KG=r(Mh);dN=n(KG,"Parallelization"),KG.forEach(t),YG.forEach(t),Bi.forEach(t),cN=p(Yt),wo=a(Yt,"DIV",{class:!0});var Ei=r(wo);k(Fh.$$.fragment,Ei),pN=p(Ei),Vs=a(Ei,"P",{});var Ku=r(Vs);hN=n(Ku,"The "),Uy=a(Ku,"CODE",{});var eV=r(Uy);mN=n(eV,"FlaxBertPreTrainedModel"),eV.forEach(t),fN=n(Ku," forward method, overrides the "),Ny=a(Ku,"CODE",{});var tV=r(Ny);uN=n(tV,"__call__"),tV.forEach(t),gN=n(Ku," special method."),Ku.forEach(t),_N=p(Ei),k(Gr.$$.fragment,Ei),bN=p(Ei),k(Vr.$$.fragment,Ei),Ei.forEach(t),Yt.forEach(t),Yk=p(i),Ss=a(i,"H2",{class:!0});var rM=r(Ss);Sr=a(rM,"A",{id:!0,class:!0,href:!0});var oV=r(Sr);Py=a(oV,"SPAN",{});var nV=r(Py);k($h.$$.fragment,nV),nV.forEach(t),oV.forEach(t),yN=p(rM),Wy=a(rM,"SPAN",{});var sV=r(Wy);TN=n(sV,"FlaxBertForNextSentencePrediction"),sV.forEach(t),rM.forEach(t),Kk=p(i),dt=a(i,"DIV",{class:!0});var Kt=r(dt);k(xh.$$.fragment,Kt),vN=p(Kt),Bh=a(Kt,"P",{});var iM=r(Bh);kN=n(iM,"Bert Model with a "),qy=a(iM,"CODE",{});var aV=r(qy);wN=n(aV,"next sentence prediction (classification)"),aV.forEach(t),MN=n(iM," head on top."),iM.forEach(t),FN=p(Kt),Eh=a(Kt,"P",{});var lM=r(Eh);$N=n(lM,"This model inherits from "),hu=a(lM,"A",{href:!0});var rV=r(hu);xN=n(rV,"FlaxPreTrainedModel"),rV.forEach(t),BN=n(lM,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),lM.forEach(t),EN=p(Kt),jh=a(Kt,"P",{});var dM=r(jh);jN=n(dM,"This model is also a Flax Linen "),zh=a(dM,"A",{href:!0,rel:!0});var iV=r(zh);zN=n(iV,"flax.linen.Module"),iV.forEach(t),JN=n(dM,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),dM.forEach(t),CN=p(Kt),Ay=a(Kt,"P",{});var lV=r(Ay);IN=n(lV,"Finally, this model supports inherent JAX features such as:"),lV.forEach(t),UN=p(Kt),Vo=a(Kt,"UL",{});var ji=r(Vo);Zy=a(ji,"LI",{});var dV=r(Zy);Jh=a(dV,"A",{href:!0,rel:!0});var cV=r(Jh);NN=n(cV,"Just-In-Time (JIT) compilation"),cV.forEach(t),dV.forEach(t),PN=p(ji),Ry=a(ji,"LI",{});var pV=r(Ry);Ch=a(pV,"A",{href:!0,rel:!0});var hV=r(Ch);WN=n(hV,"Automatic Differentiation"),hV.forEach(t),pV.forEach(t),qN=p(ji),Gy=a(ji,"LI",{});var mV=r(Gy);Ih=a(mV,"A",{href:!0,rel:!0});var fV=r(Ih);AN=n(fV,"Vectorization"),fV.forEach(t),mV.forEach(t),ZN=p(ji),Vy=a(ji,"LI",{});var uV=r(Vy);Uh=a(uV,"A",{href:!0,rel:!0});var gV=r(Uh);RN=n(gV,"Parallelization"),gV.forEach(t),uV.forEach(t),ji.forEach(t),GN=p(Kt),Mo=a(Kt,"DIV",{class:!0});var zi=r(Mo);k(Nh.$$.fragment,zi),VN=p(zi),Xs=a(zi,"P",{});var eg=r(Xs);SN=n(eg,"The "),Sy=a(eg,"CODE",{});var _V=r(Sy);XN=n(_V,"FlaxBertPreTrainedModel"),_V.forEach(t),LN=n(eg," forward method, overrides the "),Xy=a(eg,"CODE",{});var bV=r(Xy);ON=n(bV,"__call__"),bV.forEach(t),DN=n(eg," special method."),eg.forEach(t),QN=p(zi),k(Xr.$$.fragment,zi),HN=p(zi),k(Lr.$$.fragment,zi),zi.forEach(t),Kt.forEach(t),ew=p(i),Ls=a(i,"H2",{class:!0});var cM=r(Ls);Or=a(cM,"A",{id:!0,class:!0,href:!0});var yV=r(Or);Ly=a(yV,"SPAN",{});var TV=r(Ly);k(Ph.$$.fragment,TV),TV.forEach(t),yV.forEach(t),YN=p(cM),Oy=a(cM,"SPAN",{});var vV=r(Oy);KN=n(vV,"FlaxBertForSequenceClassification"),vV.forEach(t),cM.forEach(t),tw=p(i),ct=a(i,"DIV",{class:!0});var eo=r(ct);k(Wh.$$.fragment,eo),e9=p(eo),Dy=a(eo,"P",{});var kV=r(Dy);t9=n(kV,`Bert Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),kV.forEach(t),o9=p(eo),qh=a(eo,"P",{});var pM=r(qh);n9=n(pM,"This model inherits from "),mu=a(pM,"A",{href:!0});var wV=r(mu);s9=n(wV,"FlaxPreTrainedModel"),wV.forEach(t),a9=n(pM,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),pM.forEach(t),r9=p(eo),Ah=a(eo,"P",{});var hM=r(Ah);i9=n(hM,"This model is also a Flax Linen "),Zh=a(hM,"A",{href:!0,rel:!0});var MV=r(Zh);l9=n(MV,"flax.linen.Module"),MV.forEach(t),d9=n(hM,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),hM.forEach(t),c9=p(eo),Qy=a(eo,"P",{});var FV=r(Qy);p9=n(FV,"Finally, this model supports inherent JAX features such as:"),FV.forEach(t),h9=p(eo),So=a(eo,"UL",{});var Ji=r(So);Hy=a(Ji,"LI",{});var $V=r(Hy);Rh=a($V,"A",{href:!0,rel:!0});var xV=r(Rh);m9=n(xV,"Just-In-Time (JIT) compilation"),xV.forEach(t),$V.forEach(t),f9=p(Ji),Yy=a(Ji,"LI",{});var BV=r(Yy);Gh=a(BV,"A",{href:!0,rel:!0});var EV=r(Gh);u9=n(EV,"Automatic Differentiation"),EV.forEach(t),BV.forEach(t),g9=p(Ji),Ky=a(Ji,"LI",{});var jV=r(Ky);Vh=a(jV,"A",{href:!0,rel:!0});var zV=r(Vh);_9=n(zV,"Vectorization"),zV.forEach(t),jV.forEach(t),b9=p(Ji),eT=a(Ji,"LI",{});var JV=r(eT);Sh=a(JV,"A",{href:!0,rel:!0});var CV=r(Sh);y9=n(CV,"Parallelization"),CV.forEach(t),JV.forEach(t),Ji.forEach(t),T9=p(eo),Fo=a(eo,"DIV",{class:!0});var Ci=r(Fo);k(Xh.$$.fragment,Ci),v9=p(Ci),Os=a(Ci,"P",{});var tg=r(Os);k9=n(tg,"The "),tT=a(tg,"CODE",{});var IV=r(tT);w9=n(IV,"FlaxBertPreTrainedModel"),IV.forEach(t),M9=n(tg," forward method, overrides the "),oT=a(tg,"CODE",{});var UV=r(oT);F9=n(UV,"__call__"),UV.forEach(t),$9=n(tg," special method."),tg.forEach(t),x9=p(Ci),k(Dr.$$.fragment,Ci),B9=p(Ci),k(Qr.$$.fragment,Ci),Ci.forEach(t),eo.forEach(t),ow=p(i),Ds=a(i,"H2",{class:!0});var mM=r(Ds);Hr=a(mM,"A",{id:!0,class:!0,href:!0});var NV=r(Hr);nT=a(NV,"SPAN",{});var PV=r(nT);k(Lh.$$.fragment,PV),PV.forEach(t),NV.forEach(t),E9=p(mM),sT=a(mM,"SPAN",{});var WV=r(sT);j9=n(WV,"FlaxBertForMultipleChoice"),WV.forEach(t),mM.forEach(t),nw=p(i),pt=a(i,"DIV",{class:!0});var to=r(pt);k(Oh.$$.fragment,to),z9=p(to),aT=a(to,"P",{});var qV=r(aT);J9=n(qV,`Bert 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.`),qV.forEach(t),C9=p(to),Dh=a(to,"P",{});var fM=r(Dh);I9=n(fM,"This model inherits from "),fu=a(fM,"A",{href:!0});var AV=r(fu);U9=n(AV,"FlaxPreTrainedModel"),AV.forEach(t),N9=n(fM,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),fM.forEach(t),P9=p(to),Qh=a(to,"P",{});var uM=r(Qh);W9=n(uM,"This model is also a Flax Linen "),Hh=a(uM,"A",{href:!0,rel:!0});var ZV=r(Hh);q9=n(ZV,"flax.linen.Module"),ZV.forEach(t),A9=n(uM,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),uM.forEach(t),Z9=p(to),rT=a(to,"P",{});var RV=r(rT);R9=n(RV,"Finally, this model supports inherent JAX features such as:"),RV.forEach(t),G9=p(to),Xo=a(to,"UL",{});var Ii=r(Xo);iT=a(Ii,"LI",{});var GV=r(iT);Yh=a(GV,"A",{href:!0,rel:!0});var VV=r(Yh);V9=n(VV,"Just-In-Time (JIT) compilation"),VV.forEach(t),GV.forEach(t),S9=p(Ii),lT=a(Ii,"LI",{});var SV=r(lT);Kh=a(SV,"A",{href:!0,rel:!0});var XV=r(Kh);X9=n(XV,"Automatic Differentiation"),XV.forEach(t),SV.forEach(t),L9=p(Ii),dT=a(Ii,"LI",{});var LV=r(dT);em=a(LV,"A",{href:!0,rel:!0});var OV=r(em);O9=n(OV,"Vectorization"),OV.forEach(t),LV.forEach(t),D9=p(Ii),cT=a(Ii,"LI",{});var DV=r(cT);tm=a(DV,"A",{href:!0,rel:!0});var QV=r(tm);Q9=n(QV,"Parallelization"),QV.forEach(t),DV.forEach(t),Ii.forEach(t),H9=p(to),$o=a(to,"DIV",{class:!0});var Ui=r($o);k(om.$$.fragment,Ui),Y9=p(Ui),Qs=a(Ui,"P",{});var og=r(Qs);K9=n(og,"The "),pT=a(og,"CODE",{});var HV=r(pT);eP=n(HV,"FlaxBertPreTrainedModel"),HV.forEach(t),tP=n(og," forward method, overrides the "),hT=a(og,"CODE",{});var YV=r(hT);oP=n(YV,"__call__"),YV.forEach(t),nP=n(og," special method."),og.forEach(t),sP=p(Ui),k(Yr.$$.fragment,Ui),aP=p(Ui),k(Kr.$$.fragment,Ui),Ui.forEach(t),to.forEach(t),sw=p(i),Hs=a(i,"H2",{class:!0});var gM=r(Hs);ei=a(gM,"A",{id:!0,class:!0,href:!0});var KV=r(ei);mT=a(KV,"SPAN",{});var eS=r(mT);k(nm.$$.fragment,eS),eS.forEach(t),KV.forEach(t),rP=p(gM),fT=a(gM,"SPAN",{});var tS=r(fT);iP=n(tS,"FlaxBertForTokenClassification"),tS.forEach(t),gM.forEach(t),aw=p(i),ht=a(i,"DIV",{class:!0});var oo=r(ht);k(sm.$$.fragment,oo),lP=p(oo),uT=a(oo,"P",{});var oS=r(uT);dP=n(oS,`Bert 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.`),oS.forEach(t),cP=p(oo),am=a(oo,"P",{});var _M=r(am);pP=n(_M,"This model inherits from "),uu=a(_M,"A",{href:!0});var nS=r(uu);hP=n(nS,"FlaxPreTrainedModel"),nS.forEach(t),mP=n(_M,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),_M.forEach(t),fP=p(oo),rm=a(oo,"P",{});var bM=r(rm);uP=n(bM,"This model is also a Flax Linen "),im=a(bM,"A",{href:!0,rel:!0});var sS=r(im);gP=n(sS,"flax.linen.Module"),sS.forEach(t),_P=n(bM,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),bM.forEach(t),bP=p(oo),gT=a(oo,"P",{});var aS=r(gT);yP=n(aS,"Finally, this model supports inherent JAX features such as:"),aS.forEach(t),TP=p(oo),Lo=a(oo,"UL",{});var Ni=r(Lo);_T=a(Ni,"LI",{});var rS=r(_T);lm=a(rS,"A",{href:!0,rel:!0});var iS=r(lm);vP=n(iS,"Just-In-Time (JIT) compilation"),iS.forEach(t),rS.forEach(t),kP=p(Ni),bT=a(Ni,"LI",{});var lS=r(bT);dm=a(lS,"A",{href:!0,rel:!0});var dS=r(dm);wP=n(dS,"Automatic Differentiation"),dS.forEach(t),lS.forEach(t),MP=p(Ni),yT=a(Ni,"LI",{});var cS=r(yT);cm=a(cS,"A",{href:!0,rel:!0});var pS=r(cm);FP=n(pS,"Vectorization"),pS.forEach(t),cS.forEach(t),$P=p(Ni),TT=a(Ni,"LI",{});var hS=r(TT);pm=a(hS,"A",{href:!0,rel:!0});var mS=r(pm);xP=n(mS,"Parallelization"),mS.forEach(t),hS.forEach(t),Ni.forEach(t),BP=p(oo),xo=a(oo,"DIV",{class:!0});var Pi=r(xo);k(hm.$$.fragment,Pi),EP=p(Pi),Ys=a(Pi,"P",{});var ng=r(Ys);jP=n(ng,"The "),vT=a(ng,"CODE",{});var fS=r(vT);zP=n(fS,"FlaxBertPreTrainedModel"),fS.forEach(t),JP=n(ng," forward method, overrides the "),kT=a(ng,"CODE",{});var uS=r(kT);CP=n(uS,"__call__"),uS.forEach(t),IP=n(ng," special method."),ng.forEach(t),UP=p(Pi),k(ti.$$.fragment,Pi),NP=p(Pi),k(oi.$$.fragment,Pi),Pi.forEach(t),oo.forEach(t),rw=p(i),Ks=a(i,"H2",{class:!0});var yM=r(Ks);ni=a(yM,"A",{id:!0,class:!0,href:!0});var gS=r(ni);wT=a(gS,"SPAN",{});var _S=r(wT);k(mm.$$.fragment,_S),_S.forEach(t),gS.forEach(t),PP=p(yM),MT=a(yM,"SPAN",{});var bS=r(MT);WP=n(bS,"FlaxBertForQuestionAnswering"),bS.forEach(t),yM.forEach(t),iw=p(i),mt=a(i,"DIV",{class:!0});var no=r(mt);k(fm.$$.fragment,no),qP=p(no),ea=a(no,"P",{});var sg=r(ea);AP=n(sg,`Bert 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 `),FT=a(sg,"CODE",{});var yS=r(FT);ZP=n(yS,"span start logits"),yS.forEach(t),RP=n(sg," and "),$T=a(sg,"CODE",{});var TS=r($T);GP=n(TS,"span end logits"),TS.forEach(t),VP=n(sg,")."),sg.forEach(t),SP=p(no),um=a(no,"P",{});var TM=r(um);XP=n(TM,"This model inherits from "),gu=a(TM,"A",{href:!0});var vS=r(gu);LP=n(vS,"FlaxPreTrainedModel"),vS.forEach(t),OP=n(TM,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),TM.forEach(t),DP=p(no),gm=a(no,"P",{});var vM=r(gm);QP=n(vM,"This model is also a Flax Linen "),_m=a(vM,"A",{href:!0,rel:!0});var kS=r(_m);HP=n(kS,"flax.linen.Module"),kS.forEach(t),YP=n(vM,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),vM.forEach(t),KP=p(no),xT=a(no,"P",{});var wS=r(xT);eW=n(wS,"Finally, this model supports inherent JAX features such as:"),wS.forEach(t),tW=p(no),Oo=a(no,"UL",{});var Wi=r(Oo);BT=a(Wi,"LI",{});var MS=r(BT);bm=a(MS,"A",{href:!0,rel:!0});var FS=r(bm);oW=n(FS,"Just-In-Time (JIT) compilation"),FS.forEach(t),MS.forEach(t),nW=p(Wi),ET=a(Wi,"LI",{});var $S=r(ET);ym=a($S,"A",{href:!0,rel:!0});var xS=r(ym);sW=n(xS,"Automatic Differentiation"),xS.forEach(t),$S.forEach(t),aW=p(Wi),jT=a(Wi,"LI",{});var BS=r(jT);Tm=a(BS,"A",{href:!0,rel:!0});var ES=r(Tm);rW=n(ES,"Vectorization"),ES.forEach(t),BS.forEach(t),iW=p(Wi),zT=a(Wi,"LI",{});var jS=r(zT);vm=a(jS,"A",{href:!0,rel:!0});var zS=r(vm);lW=n(zS,"Parallelization"),zS.forEach(t),jS.forEach(t),Wi.forEach(t),dW=p(no),Bo=a(no,"DIV",{class:!0});var qi=r(Bo);k(km.$$.fragment,qi),cW=p(qi),ta=a(qi,"P",{});var ag=r(ta);pW=n(ag,"The "),JT=a(ag,"CODE",{});var JS=r(JT);hW=n(JS,"FlaxBertPreTrainedModel"),JS.forEach(t),mW=n(ag," forward method, overrides the "),CT=a(ag,"CODE",{});var CS=r(CT);fW=n(CS,"__call__"),CS.forEach(t),uW=n(ag," special method."),ag.forEach(t),gW=p(qi),k(si.$$.fragment,qi),_W=p(qi),k(ai.$$.fragment,qi),qi.forEach(t),no.forEach(t),this.h()},h(){h(d,"name","hf:doc:metadata"),h(d,"content",JSON.stringify(s8)),h(u,"id","bert"),h(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"),h(u,"href","#bert"),h(f,"class","relative group"),h(ee,"alt","Models"),IS(ee.src,B="https://img.shields.io/badge/All_model_pages-bert-blueviolet")||h(ee,"src",B),h(he,"href","https://huggingface.co/models?filter=bert"),h(me,"alt","Spaces"),IS(me.src,qe="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||h(me,"src",qe),h(G,"href","https://huggingface.co/spaces/docs-demos/bert-base-uncased"),h(Z,"class","flex flex-wrap space-x-1"),h(le,"id","overview"),h(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"),h(le,"href","#overview"),h(ie,"class","relative group"),h(ce,"href","https://arxiv.org/abs/1810.04805"),h(ce,"rel","nofollow"),h(Re,"href","https://huggingface.co/thomwolf"),h(Re,"rel","nofollow"),h(K,"href","https://github.com/google-research/bert"),h(K,"rel","nofollow"),h(aa,"id","resources"),h(aa,"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"),h(aa,"href","#resources"),h(Nn,"class","relative group"),h(Gi,"href","https://www.philschmid.de/bert-text-classification-in-a-different-language"),h(Gi,"rel","nofollow"),h(Si,"href","https://colab.research.google.com/github/NielsRogge/Transformers-Tutorials/blob/master/BERT/Fine_tuning_BERT_(and_friends)_for_multi_label_text_classification.ipynb"),h(Si,"rel","nofollow"),h(Li,"href","https://colab.research.google.com/github/abhimishra91/transformers-tutorials/blob/master/transformers_multi_label_classification.ipynb"),h(Li,"rel","nofollow"),h(Di,"href","https://colab.research.google.com/github/patrickvonplaten/notebooks/blob/master/BERT2BERT_for_CNN_Dailymail.ipynb"),h(Di,"rel","nofollow"),h(Gm,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertForSequenceClassification"),h(Qi,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification"),h(Qi,"rel","nofollow"),h(Hi,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification.ipynb"),h(Hi,"rel","nofollow"),h(Vm,"href","/docs/transformers/main/en/model_doc/bert#transformers.TFBertForSequenceClassification"),h(Yi,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/text-classification"),h(Yi,"rel","nofollow"),h(Ki,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification-tf.ipynb"),h(Ki,"rel","nofollow"),h(Sm,"href","/docs/transformers/main/en/model_doc/bert#transformers.FlaxBertForSequenceClassification"),h(el,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/text-classification"),h(el,"rel","nofollow"),h(tl,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification_flax.ipynb"),h(tl,"rel","nofollow"),h(Xm,"href","../tasks/sequence_classification"),h(sl,"href","https://www.philschmid.de/huggingface-transformers-keras-tf"),h(sl,"rel","nofollow"),h(al,"href","https://colab.research.google.com/github/NielsRogge/Transformers-Tutorials/blob/master/Custom_Named_Entity_Recognition_with_BERT_only_first_wordpiece.ipynb"),h(al,"rel","nofollow"),h(rl,"href","https://github.com/NielsRogge/Transformers-Tutorials/blob/master/BERT/Custom_Named_Entity_Recognition_with_BERT.ipynb"),h(rl,"rel","nofollow"),h(Lm,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertForTokenClassification"),h(il,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/token-classification"),h(il,"rel","nofollow"),h(ll,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification.ipynb"),h(ll,"rel","nofollow"),h(Om,"href","/docs/transformers/main/en/model_doc/bert#transformers.TFBertForTokenClassification"),h(dl,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/token-classification"),h(dl,"rel","nofollow"),h(cl,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification-tf.ipynb"),h(cl,"rel","nofollow"),h(Dm,"href","/docs/transformers/main/en/model_doc/bert#transformers.FlaxBertForTokenClassification"),h(pl,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/token-classification"),h(pl,"rel","nofollow"),h(hl,"href","https://huggingface.co/course/chapter7/2?fw=pt"),h(hl,"rel","nofollow"),h(Hm,"href","../tasks/token_classification"),h(Ym,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertForMaskedLM"),h(fl,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#robertabertdistilbert-and-masked-language-modeling"),h(fl,"rel","nofollow"),h(ul,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb"),h(ul,"rel","nofollow"),h(Km,"href","/docs/transformers/main/en/model_doc/bert#transformers.TFBertForMaskedLM"),h(gl,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/language-modeling#run_mlmpy"),h(gl,"rel","nofollow"),h(_l,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling-tf.ipynb"),h(_l,"rel","nofollow"),h(ef,"href","/docs/transformers/main/en/model_doc/bert#transformers.FlaxBertForMaskedLM"),h(bl,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/language-modeling#masked-language-modeling"),h(bl,"rel","nofollow"),h(yl,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/masked_language_modeling_flax.ipynb"),h(yl,"rel","nofollow"),h(Tl,"href","https://huggingface.co/course/chapter7/3?fw=pt"),h(Tl,"rel","nofollow"),h(of,"href","../tasks/masked_language_modeling"),h(nf,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertForQuestionAnswering"),h(kl,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/question-answering"),h(kl,"rel","nofollow"),h(wl,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering.ipynb"),h(wl,"rel","nofollow"),h(sf,"href","/docs/transformers/main/en/model_doc/bert#transformers.TFBertForQuestionAnswering"),h(Ml,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/question-answering"),h(Ml,"rel","nofollow"),h(Fl,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering-tf.ipynb"),h(Fl,"rel","nofollow"),h(af,"href","/docs/transformers/main/en/model_doc/bert#transformers.FlaxBertForQuestionAnswering"),h($l,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/question-answering"),h($l,"rel","nofollow"),h(xl,"href","https://huggingface.co/course/chapter7/7?fw=pt"),h(xl,"rel","nofollow"),h(lf,"href","../tasks/question_answering"),h(cf,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertForMultipleChoice"),h(Bl,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/multiple-choice"),h(Bl,"rel","nofollow"),h(El,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice.ipynb"),h(El,"rel","nofollow"),h(pf,"href","/docs/transformers/main/en/model_doc/bert#transformers.TFBertForMultipleChoice"),h(jl,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/multiple-choice"),h(jl,"rel","nofollow"),h(zl,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice-tf.ipynb"),h(zl,"rel","nofollow"),h(hf,"href","../tasks/multiple_choice"),h(Il,"href","https://huggingface.co/blog/bert-inferentia-sagemaker"),h(Il,"rel","nofollow"),h(Nl,"href","https://www.philschmid.de/bert-deepspeed-inference"),h(Nl,"rel","nofollow"),h(ql,"href","https://www.philschmid.de/pre-training-bert-habana"),h(ql,"rel","nofollow"),h(Rl,"href","https://www.philschmid.de/convert-transformers-to-onnx"),h(Rl,"rel","nofollow"),h(Vl,"href","https://www.philschmid.de/getting-started-habana-gaudi#conclusion"),h(Vl,"rel","nofollow"),h(Xl,"href","https://www.philschmid.de/terraform-huggingface-amazon-sagemaker-advanced"),h(Xl,"rel","nofollow"),h(Ol,"href","https://www.philschmid.de/serverless-bert-with-huggingface-aws-lambda-docker"),h(Ol,"rel","nofollow"),h(Ql,"href","https://www.philschmid.de/huggingface-amazon-sagemaker-training-compiler"),h(Ql,"rel","nofollow"),h(Yl,"href","https://www.philschmid.de/knowledge-distillation-bert-transformers"),h(Yl,"rel","nofollow"),h(da,"id","transformers.BertConfig"),h(da,"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"),h(da,"href","#transformers.BertConfig"),h(Wn,"class","relative group"),h(ff,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertModel"),h(uf,"href","/docs/transformers/main/en/model_doc/bert#transformers.TFBertModel"),h(td,"href","https://huggingface.co/bert-base-uncased"),h(td,"rel","nofollow"),h(gf,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),h(_f,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),h(so,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(pa,"id","transformers.BertTokenizer"),h(pa,"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"),h(pa,"href","#transformers.BertTokenizer"),h(An,"class","relative group"),h(bf,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),h(cn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ha,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ao,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(vf,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(fa,"id","transformers.BertTokenizerFast"),h(fa,"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"),h(fa,"href","#transformers.BertTokenizerFast"),h(Rn,"class","relative group"),h(kf,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),h(pn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ro,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ga,"id","transformers.TFBertTokenizer"),h(ga,"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"),h(ga,"href","#transformers.TFBertTokenizer"),h(Vn,"class","relative group"),h(hn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(mn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ya,"id","transformers.models.bert.modeling_bert.BertForPreTrainingOutput"),h(ya,"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"),h(ya,"href","#transformers.models.bert.modeling_bert.BertForPreTrainingOutput"),h(Ln,"class","relative group"),h(Ff,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertForPreTraining"),h(On,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h($f,"href","/docs/transformers/main/en/model_doc/bert#transformers.TFBertForPreTraining"),h(Dn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(xf,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertForPreTraining"),h(Ta,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(qo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(va,"id","transformers.BertModel"),h(va,"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"),h(va,"href","#transformers.BertModel"),h(Qn,"class","relative group"),h(Bf,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(Nd,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Nd,"rel","nofollow"),h(Wd,"href","https://arxiv.org/abs/1706.03762"),h(Wd,"rel","nofollow"),h(Ef,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertModel"),h(io,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ma,"id","transformers.BertForPreTraining"),h(Ma,"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"),h(Ma,"href","#transformers.BertForPreTraining"),h(Yn,"class","relative group"),h(jf,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(Vd,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Vd,"rel","nofollow"),h(zf,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertForPreTraining"),h(lo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(xa,"id","transformers.BertLMHeadModel"),h(xa,"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"),h(xa,"href","#transformers.BertLMHeadModel"),h(ts,"class","relative group"),h(Jf,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(Hd,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Hd,"rel","nofollow"),h(Cf,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertLMHeadModel"),h(co,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ja,"id","transformers.BertForMaskedLM"),h(ja,"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"),h(ja,"href","#transformers.BertForMaskedLM"),h(ns,"class","relative group"),h(If,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(sc,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(sc,"rel","nofollow"),h(Uf,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertForMaskedLM"),h(po,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ca,"id","transformers.BertForNextSentencePrediction"),h(Ca,"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"),h(Ca,"href","#transformers.BertForNextSentencePrediction"),h(as,"class","relative group"),h(Nf,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(pc,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(pc,"rel","nofollow"),h(Pf,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertForNextSentencePrediction"),h(ho,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Na,"id","transformers.BertForSequenceClassification"),h(Na,"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"),h(Na,"href","#transformers.BertForSequenceClassification"),h(is,"class","relative group"),h(Wf,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(_c,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(_c,"rel","nofollow"),h(qf,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertForSequenceClassification"),h(At,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(It,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Aa,"id","transformers.BertForMultipleChoice"),h(Aa,"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"),h(Aa,"href","#transformers.BertForMultipleChoice"),h(ds,"class","relative group"),h(Af,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(wc,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(wc,"rel","nofollow"),h(Zf,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertForMultipleChoice"),h(mo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ga,"id","transformers.BertForTokenClassification"),h(Ga,"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"),h(Ga,"href","#transformers.BertForTokenClassification"),h(ps,"class","relative group"),h(Rf,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(Ec,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Ec,"rel","nofollow"),h(Gf,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertForTokenClassification"),h(fo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Xa,"id","transformers.BertForQuestionAnswering"),h(Xa,"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"),h(Xa,"href","#transformers.BertForQuestionAnswering"),h(ms,"class","relative group"),h(Vf,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(Uc,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Uc,"rel","nofollow"),h(Sf,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertForQuestionAnswering"),h(uo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Da,"id","transformers.TFBertModel"),h(Da,"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"),h(Da,"href","#transformers.TFBertModel"),h(gs,"class","relative group"),h(Xf,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),h(Zc,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(Zc,"rel","nofollow"),h(Lf,"href","/docs/transformers/main/en/model_doc/bert#transformers.TFBertModel"),h(go,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ka,"id","transformers.TFBertForPreTraining"),h(Ka,"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"),h(Ka,"href","#transformers.TFBertForPreTraining"),h(bs,"class","relative group"),h(Of,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),h(Lc,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(Lc,"rel","nofollow"),h(Df,"href","/docs/transformers/main/en/model_doc/bert#transformers.TFBertForPreTraining"),h(_o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(nr,"id","transformers.TFBertLMHeadModel"),h(nr,"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"),h(nr,"href","#transformers.TFBertLMHeadModel"),h(vs,"class","relative group"),h(Zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ks,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ar,"id","transformers.TFBertForMaskedLM"),h(ar,"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"),h(ar,"href","#transformers.TFBertForMaskedLM"),h(ws,"class","relative group"),h(Qf,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),h(rp,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(rp,"rel","nofollow"),h(Hf,"href","/docs/transformers/main/en/model_doc/bert#transformers.TFBertForMaskedLM"),h(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(cr,"id","transformers.TFBertForNextSentencePrediction"),h(cr,"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"),h(cr,"href","#transformers.TFBertForNextSentencePrediction"),h(Fs,"class","relative group"),h(Yf,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),h(mp,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(mp,"rel","nofollow"),h(Kf,"href","/docs/transformers/main/en/model_doc/bert#transformers.TFBertForNextSentencePrediction"),h(bo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(fr,"id","transformers.TFBertForSequenceClassification"),h(fr,"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"),h(fr,"href","#transformers.TFBertForSequenceClassification"),h(xs,"class","relative group"),h(eu,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),h(yp,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(yp,"rel","nofollow"),h(tu,"href","/docs/transformers/main/en/model_doc/bert#transformers.TFBertForSequenceClassification"),h(Gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(yr,"id","transformers.TFBertForMultipleChoice"),h(yr,"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"),h(yr,"href","#transformers.TFBertForMultipleChoice"),h(Es,"class","relative group"),h(ou,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),h(Fp,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(Fp,"rel","nofollow"),h(nu,"href","/docs/transformers/main/en/model_doc/bert#transformers.TFBertForMultipleChoice"),h(yo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(wr,"id","transformers.TFBertForTokenClassification"),h(wr,"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"),h(wr,"href","#transformers.TFBertForTokenClassification"),h(zs,"class","relative group"),h(su,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),h(zp,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(zp,"rel","nofollow"),h(au,"href","/docs/transformers/main/en/model_doc/bert#transformers.TFBertForTokenClassification"),h(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Br,"id","transformers.TFBertForQuestionAnswering"),h(Br,"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"),h(Br,"href","#transformers.TFBertForQuestionAnswering"),h(Cs,"class","relative group"),h(ru,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),h(Pp,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h(Pp,"rel","nofollow"),h(iu,"href","/docs/transformers/main/en/model_doc/bert#transformers.TFBertForQuestionAnswering"),h(St,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Cr,"id","transformers.FlaxBertModel"),h(Cr,"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"),h(Cr,"href","#transformers.FlaxBertModel"),h(Ns,"class","relative group"),h(lu,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(Gp,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(Gp,"rel","nofollow"),h(Vp,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(Vp,"rel","nofollow"),h(Sp,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(Sp,"rel","nofollow"),h(Xp,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(Xp,"rel","nofollow"),h(Lp,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(Lp,"rel","nofollow"),h(To,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Nr,"id","transformers.FlaxBertForPreTraining"),h(Nr,"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"),h(Nr,"href","#transformers.FlaxBertForPreTraining"),h(Ws,"class","relative group"),h(du,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(Kp,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(Kp,"rel","nofollow"),h(eh,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(eh,"rel","nofollow"),h(th,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(th,"rel","nofollow"),h(oh,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(oh,"rel","nofollow"),h(nh,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(nh,"rel","nofollow"),h(vo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(qr,"id","transformers.FlaxBertForCausalLM"),h(qr,"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"),h(qr,"href","#transformers.FlaxBertForCausalLM"),h(Zs,"class","relative group"),h(cu,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(dh,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(dh,"rel","nofollow"),h(ch,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(ch,"rel","nofollow"),h(ph,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(ph,"rel","nofollow"),h(hh,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(hh,"rel","nofollow"),h(mh,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(mh,"rel","nofollow"),h(ko,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Rr,"id","transformers.FlaxBertForMaskedLM"),h(Rr,"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"),h(Rr,"href","#transformers.FlaxBertForMaskedLM"),h(Gs,"class","relative group"),h(pu,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(Th,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(Th,"rel","nofollow"),h(vh,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(vh,"rel","nofollow"),h(kh,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(kh,"rel","nofollow"),h(wh,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(wh,"rel","nofollow"),h(Mh,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(Mh,"rel","nofollow"),h(wo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Sr,"id","transformers.FlaxBertForNextSentencePrediction"),h(Sr,"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"),h(Sr,"href","#transformers.FlaxBertForNextSentencePrediction"),h(Ss,"class","relative group"),h(hu,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(zh,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(zh,"rel","nofollow"),h(Jh,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(Jh,"rel","nofollow"),h(Ch,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(Ch,"rel","nofollow"),h(Ih,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(Ih,"rel","nofollow"),h(Uh,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(Uh,"rel","nofollow"),h(Mo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Or,"id","transformers.FlaxBertForSequenceClassification"),h(Or,"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"),h(Or,"href","#transformers.FlaxBertForSequenceClassification"),h(Ls,"class","relative group"),h(mu,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(Zh,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(Zh,"rel","nofollow"),h(Rh,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(Rh,"rel","nofollow"),h(Gh,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(Gh,"rel","nofollow"),h(Vh,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(Vh,"rel","nofollow"),h(Sh,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(Sh,"rel","nofollow"),h(Fo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Hr,"id","transformers.FlaxBertForMultipleChoice"),h(Hr,"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"),h(Hr,"href","#transformers.FlaxBertForMultipleChoice"),h(Ds,"class","relative group"),h(fu,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(Hh,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(Hh,"rel","nofollow"),h(Yh,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(Yh,"rel","nofollow"),h(Kh,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(Kh,"rel","nofollow"),h(em,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(em,"rel","nofollow"),h(tm,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(tm,"rel","nofollow"),h($o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ei,"id","transformers.FlaxBertForTokenClassification"),h(ei,"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"),h(ei,"href","#transformers.FlaxBertForTokenClassification"),h(Hs,"class","relative group"),h(uu,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(im,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(im,"rel","nofollow"),h(lm,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(lm,"rel","nofollow"),h(dm,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(dm,"rel","nofollow"),h(cm,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(cm,"rel","nofollow"),h(pm,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(pm,"rel","nofollow"),h(xo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ni,"id","transformers.FlaxBertForQuestionAnswering"),h(ni,"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"),h(ni,"href","#transformers.FlaxBertForQuestionAnswering"),h(Ks,"class","relative group"),h(gu,"href","/docs/transformers/main/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(_m,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(_m,"rel","nofollow"),h(bm,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(bm,"rel","nofollow"),h(ym,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(ym,"rel","nofollow"),h(Tm,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(Tm,"rel","nofollow"),h(vm,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(vm,"rel","nofollow"),h(Bo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(i,_){e(document.head,d),g(i,y,_),g(i,f,_),e(f,u),e(u,b),w(l,b,null),e(f,m),e(f,E),e(E,Ee),g(i,we,_),g(i,Z,_),e(Z,he),e(he,ee),e(Z,je),e(Z,G),e(G,me),g(i,O,_),g(i,ie,_),e(ie,le),e(le,V),w(de,V,null),e(ie,ze),e(ie,S),e(S,Je),g(i,Me,_),g(i,R,_),e(R,Ce),e(R,ce),e(ce,ae),e(R,J),g(i,U,_),g(i,fe,_),e(fe,D),g(i,Fe,_),g(i,ue,_),e(ue,X),e(X,Ie),g(i,$e,_),g(i,C,_),e(C,_e),e(_e,Q),g(i,xe,_),g(i,ge,_),e(ge,H),g(i,Be,_),g(i,se,_),e(se,W),e(W,be),e(be,Y),e(se,Ue),e(se,te),e(te,I),e(I,Ne),e(se,P),e(se,pe),e(pe,ye),e(ye,T),e(pe,j),e(pe,Ze),e(Ze,oe),e(oe,Se),e(Ze,Xe),e(Ze,z),e(z,Le),e(Ze,Oe),e(Ze,Ge),e(Ge,De),e(se,Qe),e(se,q),e(q,L),e(L,He),g(i,Ve,_),g(i,A,_),e(A,Ye),e(A,Re),e(Re,Pe),e(A,Ke),e(A,K),e(K,et),e(A,wM),g(i,Jv,_),g(i,Nn,_),e(Nn,aa),e(aa,rg),w(Ai,rg,null),e(Nn,MM),e(Nn,ig),e(ig,FM),g(i,Cv,_),g(i,Rm,_),e(Rm,$M),g(i,Iv,_),w(Zi,i,_),g(i,Uv,_),g(i,tt,_),e(tt,Ri),e(Ri,xM),e(Ri,Gi),e(Gi,BM),e(Ri,EM),e(tt,jM),e(tt,Vi),e(Vi,zM),e(Vi,Si),e(Si,JM),e(Vi,CM),e(tt,IM),e(tt,Xi),e(Xi,UM),e(Xi,Li),e(Li,NM),e(Xi,PM),e(tt,WM),e(tt,Oi),e(Oi,qM),e(Oi,Di),e(Di,AM),e(Oi,ZM),e(tt,RM),e(tt,Qo),e(Qo,Gm),e(Gm,GM),e(Qo,VM),e(Qo,Qi),e(Qi,SM),e(Qo,XM),e(Qo,Hi),e(Hi,LM),e(Qo,OM),e(tt,DM),e(tt,Ho),e(Ho,Vm),e(Vm,QM),e(Ho,HM),e(Ho,Yi),e(Yi,YM),e(Ho,KM),e(Ho,Ki),e(Ki,e2),e(Ho,t2),e(tt,o2),e(tt,Yo),e(Yo,Sm),e(Sm,n2),e(Yo,s2),e(Yo,el),e(el,a2),e(Yo,r2),e(Yo,tl),e(tl,i2),e(Yo,l2),e(tt,d2),e(tt,lg),e(lg,Xm),e(Xm,c2),g(i,Nv,_),w(ol,i,_),g(i,Pv,_),g(i,ut,_),e(ut,nl),e(nl,p2),e(nl,sl),e(sl,h2),e(nl,m2),e(ut,f2),e(ut,Pn),e(Pn,u2),e(Pn,al),e(al,g2),e(Pn,_2),e(Pn,rl),e(rl,b2),e(Pn,y2),e(ut,T2),e(ut,Ko),e(Ko,Lm),e(Lm,v2),e(Ko,k2),e(Ko,il),e(il,w2),e(Ko,M2),e(Ko,ll),e(ll,F2),e(Ko,$2),e(ut,x2),e(ut,en),e(en,Om),e(Om,B2),e(en,E2),e(en,dl),e(dl,j2),e(en,z2),e(en,cl),e(cl,J2),e(en,C2),e(ut,I2),e(ut,ra),e(ra,Dm),e(Dm,U2),e(ra,N2),e(ra,pl),e(pl,P2),e(ra,W2),e(ut,q2),e(ut,Qm),e(Qm,hl),e(hl,A2),e(Qm,Z2),e(ut,R2),e(ut,dg),e(dg,Hm),e(Hm,G2),g(i,Wv,_),w(ml,i,_),g(i,qv,_),g(i,Wt,_),e(Wt,tn),e(tn,Ym),e(Ym,V2),e(tn,S2),e(tn,fl),e(fl,X2),e(tn,L2),e(tn,ul),e(ul,O2),e(tn,D2),e(Wt,Q2),e(Wt,on),e(on,Km),e(Km,H2),e(on,Y2),e(on,gl),e(gl,K2),e(on,e0),e(on,_l),e(_l,t0),e(on,o0),e(Wt,n0),e(Wt,nn),e(nn,ef),e(ef,s0),e(nn,a0),e(nn,bl),e(bl,r0),e(nn,i0),e(nn,yl),e(yl,l0),e(nn,d0),e(Wt,c0),e(Wt,tf),e(tf,Tl),e(Tl,p0),e(tf,h0),e(Wt,m0),e(Wt,cg),e(cg,of),e(of,f0),g(i,Av,_),w(vl,i,_),g(i,Zv,_),g(i,qt,_),e(qt,sn),e(sn,nf),e(nf,u0),e(sn,g0),e(sn,kl),e(kl,_0),e(sn,b0),e(sn,wl),e(wl,y0),e(sn,T0),e(qt,v0),e(qt,an),e(an,sf),e(sf,k0),e(an,w0),e(an,Ml),e(Ml,M0),e(an,F0),e(an,Fl),e(Fl,$0),e(an,x0),e(qt,B0),e(qt,ia),e(ia,af),e(af,E0),e(ia,j0),e(ia,$l),e($l,z0),e(ia,J0),e(qt,C0),e(qt,rf),e(rf,xl),e(xl,I0),e(rf,U0),e(qt,N0),e(qt,pg),e(pg,lf),e(lf,P0),g(i,Rv,_),g(i,df,_),e(df,hg),e(hg,W0),g(i,Gv,_),g(i,rn,_),e(rn,ln),e(ln,cf),e(cf,q0),e(ln,A0),e(ln,Bl),e(Bl,Z0),e(ln,R0),e(ln,El),e(El,G0),e(ln,V0),e(rn,S0),e(rn,dn),e(dn,pf),e(pf,X0),e(dn,L0),e(dn,jl),e(jl,O0),e(dn,D0),e(dn,zl),e(zl,Q0),e(dn,H0),e(rn,Y0),e(rn,mg),e(mg,hf),e(hf,K0),g(i,Vv,_),g(i,Jl,_),e(Jl,eF),e(Jl,fg),e(fg,tF),g(i,Sv,_),g(i,la,_),e(la,Cl),e(Cl,oF),e(Cl,Il),e(Il,nF),e(Cl,sF),e(la,aF),e(la,Ul),e(Ul,rF),e(Ul,Nl),e(Nl,iF),e(Ul,lF),g(i,Xv,_),g(i,Pl,_),e(Pl,dF),e(Pl,ug),e(ug,cF),g(i,Lv,_),g(i,mf,_),e(mf,Wl),e(Wl,pF),e(Wl,ql),e(ql,hF),e(Wl,mF),g(i,Ov,_),g(i,Al,_),e(Al,fF),e(Al,gg),e(gg,uF),g(i,Dv,_),g(i,$t,_),e($t,Zl),e(Zl,gF),e(Zl,Rl),e(Rl,_F),e(Zl,bF),e($t,yF),e($t,Gl),e(Gl,TF),e(Gl,Vl),e(Vl,vF),e(Gl,kF),e($t,wF),e($t,Sl),e(Sl,MF),e(Sl,Xl),e(Xl,FF),e(Sl,$F),e($t,xF),e($t,Ll),e(Ll,BF),e(Ll,Ol),e(Ol,EF),e(Ll,jF),e($t,zF),e($t,Dl),e(Dl,JF),e(Dl,Ql),e(Ql,CF),e(Dl,IF),e($t,UF),e($t,Hl),e(Hl,NF),e(Hl,Yl),e(Yl,PF),e(Hl,WF),g(i,Qv,_),g(i,Wn,_),e(Wn,da),e(da,_g),w(Kl,_g,null),e(Wn,qF),e(Wn,bg),e(bg,AF),g(i,Hv,_),g(i,so,_),w(ed,so,null),e(so,ZF),e(so,Wo),e(Wo,RF),e(Wo,ff),e(ff,GF),e(Wo,VF),e(Wo,uf),e(uf,SF),e(Wo,XF),e(Wo,td),e(td,LF),e(Wo,OF),e(so,DF),e(so,qn),e(qn,QF),e(qn,gf),e(gf,HF),e(qn,YF),e(qn,_f),e(_f,KF),e(qn,e$),e(so,t$),w(ca,so,null),g(i,Yv,_),g(i,An,_),e(An,pa),e(pa,yg),w(od,yg,null),e(An,o$),e(An,Tg),e(Tg,n$),g(i,Kv,_),g(i,ot,_),w(nd,ot,null),e(ot,s$),e(ot,vg),e(vg,a$),e(ot,r$),e(ot,sd),e(sd,i$),e(sd,bf),e(bf,l$),e(sd,d$),e(ot,c$),e(ot,cn),w(ad,cn,null),e(cn,p$),e(cn,kg),e(kg,h$),e(cn,m$),e(cn,rd),e(rd,yf),e(yf,f$),e(yf,wg),e(wg,u$),e(rd,g$),e(rd,Tf),e(Tf,_$),e(Tf,Mg),e(Mg,b$),e(ot,y$),e(ot,ha),w(id,ha,null),e(ha,T$),e(ha,ld),e(ld,v$),e(ld,Fg),e(Fg,k$),e(ld,w$),e(ot,M$),e(ot,ao),w(dd,ao,null),e(ao,F$),e(ao,$g),e($g,$$),e(ao,x$),w(ma,ao,null),e(ao,B$),e(ao,Zn),e(Zn,E$),e(Zn,xg),e(xg,j$),e(Zn,z$),e(Zn,Bg),e(Bg,J$),e(Zn,C$),e(ot,I$),e(ot,vf),w(cd,vf,null),g(i,ek,_),g(i,Rn,_),e(Rn,fa),e(fa,Eg),w(pd,Eg,null),e(Rn,U$),e(Rn,jg),e(jg,N$),g(i,tk,_),g(i,Bt,_),w(hd,Bt,null),e(Bt,P$),e(Bt,md),e(md,W$),e(md,zg),e(zg,q$),e(md,A$),e(Bt,Z$),e(Bt,fd),e(fd,R$),e(fd,kf),e(kf,G$),e(fd,V$),e(Bt,S$),e(Bt,pn),w(ud,pn,null),e(pn,X$),e(pn,Jg),e(Jg,L$),e(pn,O$),e(pn,gd),e(gd,wf),e(wf,D$),e(wf,Cg),e(Cg,Q$),e(gd,H$),e(gd,Mf),e(Mf,Y$),e(Mf,Ig),e(Ig,K$),e(Bt,ex),e(Bt,ro),w(_d,ro,null),e(ro,tx),e(ro,Ug),e(Ug,ox),e(ro,nx),w(ua,ro,null),e(ro,sx),e(ro,Gn),e(Gn,ax),e(Gn,Ng),e(Ng,rx),e(Gn,ix),e(Gn,Pg),e(Pg,lx),e(Gn,dx),g(i,ok,_),g(i,Vn,_),e(Vn,ga),e(ga,Wg),w(bd,Wg,null),e(Vn,cx),e(Vn,qg),e(qg,px),g(i,nk,_),g(i,Et,_),w(yd,Et,null),e(Et,hx),e(Et,Sn),e(Sn,mx),e(Sn,Ag),e(Ag,fx),e(Sn,ux),e(Sn,Zg),e(Zg,gx),e(Sn,_x),e(Et,bx),e(Et,Td),e(Td,yx),e(Td,Rg),e(Rg,Tx),e(Td,vx),e(Et,kx),e(Et,hn),w(vd,hn,null),e(hn,wx),e(hn,kd),e(kd,Mx),e(kd,Gg),e(Gg,Fx),e(kd,$x),e(hn,xx),w(_a,hn,null),e(Et,Bx),e(Et,mn),w(wd,mn,null),e(mn,Ex),e(mn,Xn),e(Xn,jx),e(Xn,Vg),e(Vg,zx),e(Xn,Jx),e(Xn,Sg),e(Sg,Cx),e(Xn,Ix),e(mn,Ux),w(ba,mn,null),g(i,sk,_),g(i,Ln,_),e(Ln,ya),e(ya,Xg),w(Md,Xg,null),e(Ln,Nx),e(Ln,Lg),e(Lg,Px),g(i,ak,_),g(i,On,_),w(Fd,On,null),e(On,Wx),e(On,$d),e($d,qx),e($d,Ff),e(Ff,Ax),e($d,Zx),g(i,rk,_),g(i,Dn,_),w(xd,Dn,null),e(Dn,Rx),e(Dn,Bd),e(Bd,Gx),e(Bd,$f),e($f,Vx),e(Bd,Sx),g(i,ik,_),g(i,qo,_),w(Ed,qo,null),e(qo,Xx),e(qo,jd),e(jd,Lx),e(jd,xf),e(xf,Ox),e(jd,Dx),e(qo,Qx),e(qo,Ta),w(zd,Ta,null),e(Ta,Hx),e(Ta,Og),e(Og,Yx),g(i,lk,_),g(i,Qn,_),e(Qn,va),e(va,Dg),w(Jd,Dg,null),e(Qn,Kx),e(Qn,Qg),e(Qg,eB),g(i,dk,_),g(i,nt,_),w(Cd,nt,null),e(nt,tB),e(nt,Hg),e(Hg,oB),e(nt,nB),e(nt,Id),e(Id,sB),e(Id,Bf),e(Bf,aB),e(Id,rB),e(nt,iB),e(nt,Ud),e(Ud,lB),e(Ud,Nd),e(Nd,dB),e(Ud,cB),e(nt,pB),e(nt,Pd),e(Pd,hB),e(Pd,Wd),e(Wd,mB),e(Pd,fB),e(nt,uB),e(nt,gt),e(gt,gB),e(gt,Yg),e(Yg,_B),e(gt,bB),e(gt,Kg),e(Kg,yB),e(gt,TB),e(gt,e_),e(e_,vB),e(gt,kB),e(gt,t_),e(t_,wB),e(gt,MB),e(gt,o_),e(o_,FB),e(gt,$B),e(gt,n_),e(n_,xB),e(gt,BB),e(nt,EB),e(nt,io),w(qd,io,null),e(io,jB),e(io,Hn),e(Hn,zB),e(Hn,Ef),e(Ef,JB),e(Hn,CB),e(Hn,s_),e(s_,IB),e(Hn,UB),e(io,NB),w(ka,io,null),e(io,PB),w(wa,io,null),g(i,ck,_),g(i,Yn,_),e(Yn,Ma),e(Ma,a_),w(Ad,a_,null),e(Yn,WB),e(Yn,r_),e(r_,qB),g(i,pk,_),g(i,jt,_),w(Zd,jt,null),e(jt,AB),e(jt,Kn),e(Kn,ZB),e(Kn,i_),e(i_,RB),e(Kn,GB),e(Kn,l_),e(l_,VB),e(Kn,SB),e(jt,XB),e(jt,Rd),e(Rd,LB),e(Rd,jf),e(jf,OB),e(Rd,DB),e(jt,QB),e(jt,Gd),e(Gd,HB),e(Gd,Vd),e(Vd,YB),e(Gd,KB),e(jt,eE),e(jt,lo),w(Sd,lo,null),e(lo,tE),e(lo,es),e(es,oE),e(es,zf),e(zf,nE),e(es,sE),e(es,d_),e(d_,aE),e(es,rE),e(lo,iE),w(Fa,lo,null),e(lo,lE),w($a,lo,null),g(i,hk,_),g(i,ts,_),e(ts,xa),e(xa,c_),w(Xd,c_,null),e(ts,dE),e(ts,p_),e(p_,cE),g(i,mk,_),g(i,zt,_),w(Ld,zt,null),e(zt,pE),e(zt,Od),e(Od,hE),e(Od,h_),e(h_,mE),e(Od,fE),e(zt,uE),e(zt,Dd),e(Dd,gE),e(Dd,Jf),e(Jf,_E),e(Dd,bE),e(zt,yE),e(zt,Qd),e(Qd,TE),e(Qd,Hd),e(Hd,vE),e(Qd,kE),e(zt,wE),e(zt,co),w(Yd,co,null),e(co,ME),e(co,os),e(os,FE),e(os,Cf),e(Cf,$E),e(os,xE),e(os,m_),e(m_,BE),e(os,EE),e(co,jE),w(Ba,co,null),e(co,zE),w(Ea,co,null),g(i,fk,_),g(i,ns,_),e(ns,ja),e(ja,f_),w(Kd,f_,null),e(ns,JE),e(ns,u_),e(u_,CE),g(i,uk,_),g(i,Jt,_),w(ec,Jt,null),e(Jt,IE),e(Jt,tc),e(tc,UE),e(tc,g_),e(g_,NE),e(tc,PE),e(Jt,WE),e(Jt,oc),e(oc,qE),e(oc,If),e(If,AE),e(oc,ZE),e(Jt,RE),e(Jt,nc),e(nc,GE),e(nc,sc),e(sc,VE),e(nc,SE),e(Jt,XE),e(Jt,po),w(ac,po,null),e(po,LE),e(po,ss),e(ss,OE),e(ss,Uf),e(Uf,DE),e(ss,QE),e(ss,__),e(__,HE),e(ss,YE),e(po,KE),w(za,po,null),e(po,ej),w(Ja,po,null),g(i,gk,_),g(i,as,_),e(as,Ca),e(Ca,b_),w(rc,b_,null),e(as,tj),e(as,y_),e(y_,oj),g(i,_k,_),g(i,Ct,_),w(ic,Ct,null),e(Ct,nj),e(Ct,lc),e(lc,sj),e(lc,T_),e(T_,aj),e(lc,rj),e(Ct,ij),e(Ct,dc),e(dc,lj),e(dc,Nf),e(Nf,dj),e(dc,cj),e(Ct,pj),e(Ct,cc),e(cc,hj),e(cc,pc),e(pc,mj),e(cc,fj),e(Ct,uj),e(Ct,ho),w(hc,ho,null),e(ho,gj),e(ho,rs),e(rs,_j),e(rs,Pf),e(Pf,bj),e(rs,yj),e(rs,v_),e(v_,Tj),e(rs,vj),e(ho,kj),w(Ia,ho,null),e(ho,wj),w(Ua,ho,null),g(i,bk,_),g(i,is,_),e(is,Na),e(Na,k_),w(mc,k_,null),e(is,Mj),e(is,w_),e(w_,Fj),g(i,yk,_),g(i,It,_),w(fc,It,null),e(It,$j),e(It,M_),e(M_,xj),e(It,Bj),e(It,uc),e(uc,Ej),e(uc,Wf),e(Wf,jj),e(uc,zj),e(It,Jj),e(It,gc),e(gc,Cj),e(gc,_c),e(_c,Ij),e(gc,Uj),e(It,Nj),e(It,At),w(bc,At,null),e(At,Pj),e(At,ls),e(ls,Wj),e(ls,qf),e(qf,qj),e(ls,Aj),e(ls,F_),e(F_,Zj),e(ls,Rj),e(At,Gj),w(Pa,At,null),e(At,Vj),w(Wa,At,null),e(At,Sj),w(qa,At,null),g(i,Tk,_),g(i,ds,_),e(ds,Aa),e(Aa,$_),w(yc,$_,null),e(ds,Xj),e(ds,x_),e(x_,Lj),g(i,vk,_),g(i,Ut,_),w(Tc,Ut,null),e(Ut,Oj),e(Ut,B_),e(B_,Dj),e(Ut,Qj),e(Ut,vc),e(vc,Hj),e(vc,Af),e(Af,Yj),e(vc,Kj),e(Ut,ez),e(Ut,kc),e(kc,tz),e(kc,wc),e(wc,oz),e(kc,nz),e(Ut,sz),e(Ut,mo),w(Mc,mo,null),e(mo,az),e(mo,cs),e(cs,rz),e(cs,Zf),e(Zf,iz),e(cs,lz),e(cs,E_),e(E_,dz),e(cs,cz),e(mo,pz),w(Za,mo,null),e(mo,hz),w(Ra,mo,null),g(i,kk,_),g(i,ps,_),e(ps,Ga),e(Ga,j_),w(Fc,j_,null),e(ps,mz),e(ps,z_),e(z_,fz),g(i,wk,_),g(i,Nt,_),w($c,Nt,null),e(Nt,uz),e(Nt,J_),e(J_,gz),e(Nt,_z),e(Nt,xc),e(xc,bz),e(xc,Rf),e(Rf,yz),e(xc,Tz),e(Nt,vz),e(Nt,Bc),e(Bc,kz),e(Bc,Ec),e(Ec,wz),e(Bc,Mz),e(Nt,Fz),e(Nt,fo),w(jc,fo,null),e(fo,$z),e(fo,hs),e(hs,xz),e(hs,Gf),e(Gf,Bz),e(hs,Ez),e(hs,C_),e(C_,jz),e(hs,zz),e(fo,Jz),w(Va,fo,null),e(fo,Cz),w(Sa,fo,null),g(i,Mk,_),g(i,ms,_),e(ms,Xa),e(Xa,I_),w(zc,I_,null),e(ms,Iz),e(ms,U_),e(U_,Uz),g(i,Fk,_),g(i,Pt,_),w(Jc,Pt,null),e(Pt,Nz),e(Pt,fs),e(fs,Pz),e(fs,N_),e(N_,Wz),e(fs,qz),e(fs,P_),e(P_,Az),e(fs,Zz),e(Pt,Rz),e(Pt,Cc),e(Cc,Gz),e(Cc,Vf),e(Vf,Vz),e(Cc,Sz),e(Pt,Xz),e(Pt,Ic),e(Ic,Lz),e(Ic,Uc),e(Uc,Oz),e(Ic,Dz),e(Pt,Qz),e(Pt,uo),w(Nc,uo,null),e(uo,Hz),e(uo,us),e(us,Yz),e(us,Sf),e(Sf,Kz),e(us,eJ),e(us,W_),e(W_,tJ),e(us,oJ),e(uo,nJ),w(La,uo,null),e(uo,sJ),w(Oa,uo,null),g(i,$k,_),g(i,gs,_),e(gs,Da),e(Da,q_),w(Pc,q_,null),e(gs,aJ),e(gs,A_),e(A_,rJ),g(i,xk,_),g(i,_t,_),w(Wc,_t,null),e(_t,iJ),e(_t,Z_),e(Z_,lJ),e(_t,dJ),e(_t,qc),e(qc,cJ),e(qc,Xf),e(Xf,pJ),e(qc,hJ),e(_t,mJ),e(_t,Ac),e(Ac,fJ),e(Ac,Zc),e(Zc,uJ),e(Ac,gJ),e(_t,_J),w(Qa,_t,null),e(_t,bJ),e(_t,go),w(Rc,go,null),e(go,yJ),e(go,_s),e(_s,TJ),e(_s,Lf),e(Lf,vJ),e(_s,kJ),e(_s,R_),e(R_,wJ),e(_s,MJ),e(go,FJ),w(Ha,go,null),e(go,$J),w(Ya,go,null),g(i,Bk,_),g(i,bs,_),e(bs,Ka),e(Ka,G_),w(Gc,G_,null),e(bs,xJ),e(bs,V_),e(V_,BJ),g(i,Ek,_),g(i,bt,_),w(Vc,bt,null),e(bt,EJ),e(bt,ys),e(ys,jJ),e(ys,S_),e(S_,zJ),e(ys,JJ),e(ys,X_),e(X_,CJ),e(ys,IJ),e(bt,UJ),e(bt,Sc),e(Sc,NJ),e(Sc,Of),e(Of,PJ),e(Sc,WJ),e(bt,qJ),e(bt,Xc),e(Xc,AJ),e(Xc,Lc),e(Lc,ZJ),e(Xc,RJ),e(bt,GJ),w(er,bt,null),e(bt,VJ),e(bt,_o),w(Oc,_o,null),e(_o,SJ),e(_o,Ts),e(Ts,XJ),e(Ts,Df),e(Df,LJ),e(Ts,OJ),e(Ts,L_),e(L_,DJ),e(Ts,QJ),e(_o,HJ),w(tr,_o,null),e(_o,YJ),w(or,_o,null),g(i,jk,_),g(i,vs,_),e(vs,nr),e(nr,O_),w(Dc,O_,null),e(vs,KJ),e(vs,D_),e(D_,eC),g(i,zk,_),g(i,ks,_),w(Qc,ks,null),e(ks,tC),e(ks,Zt),w(Hc,Zt,null),e(Zt,oC),e(Zt,st),e(st,nC),e(st,Q_),e(Q_,sC),e(st,aC),e(st,H_),e(H_,rC),e(st,iC),e(st,Y_),e(Y_,lC),e(st,dC),e(st,K_),e(K_,cC),e(st,pC),e(st,eb),e(eb,hC),e(st,mC),e(st,tb),e(tb,fC),e(st,uC),e(st,ob),e(ob,gC),e(st,_C),e(Zt,bC),e(Zt,Yc),e(Yc,Kc),e(Kc,yC),e(Kc,nb),e(nb,TC),e(Kc,vC),e(Yc,kC),e(Yc,ep),e(ep,wC),e(ep,sb),e(sb,MC),e(ep,FC),e(Zt,$C),e(Zt,ne),e(ne,xC),e(ne,ab),e(ab,BC),e(ne,EC),e(ne,rb),e(rb,jC),e(ne,zC),e(ne,ib),e(ib,JC),e(ne,CC),e(ne,lb),e(lb,IC),e(ne,UC),e(ne,db),e(db,NC),e(ne,PC),e(ne,cb),e(cb,WC),e(ne,qC),e(ne,pb),e(pb,AC),e(ne,ZC),e(ne,hb),e(hb,RC),e(ne,GC),e(ne,mb),e(mb,VC),e(ne,SC),e(ne,fb),e(fb,XC),e(ne,LC),e(ne,ub),e(ub,OC),e(ne,DC),e(ne,gb),e(gb,QC),e(ne,HC),e(ne,_b),e(_b,YC),e(ne,KC),e(ne,bb),e(bb,eI),e(ne,tI),e(ne,yb),e(yb,oI),e(ne,nI),e(ne,Tb),e(Tb,sI),e(ne,aI),e(ne,vb),e(vb,rI),e(ne,iI),e(ne,kb),e(kb,lI),e(ne,dI),e(ne,wb),e(wb,cI),e(ne,pI),e(ne,Mb),e(Mb,hI),e(ne,mI),e(Zt,fI),w(sr,Zt,null),g(i,Jk,_),g(i,ws,_),e(ws,ar),e(ar,Fb),w(tp,Fb,null),e(ws,uI),e(ws,$b),e($b,gI),g(i,Ck,_),g(i,yt,_),w(op,yt,null),e(yt,_I),e(yt,np),e(np,bI),e(np,xb),e(xb,yI),e(np,TI),e(yt,vI),e(yt,sp),e(sp,kI),e(sp,Qf),e(Qf,wI),e(sp,MI),e(yt,FI),e(yt,ap),e(ap,$I),e(ap,rp),e(rp,xI),e(ap,BI),e(yt,EI),w(rr,yt,null),e(yt,jI),e(yt,Rt),w(ip,Rt,null),e(Rt,zI),e(Rt,Ms),e(Ms,JI),e(Ms,Hf),e(Hf,CI),e(Ms,II),e(Ms,Bb),e(Bb,UI),e(Ms,NI),e(Rt,PI),w(ir,Rt,null),e(Rt,WI),w(lr,Rt,null),e(Rt,qI),w(dr,Rt,null),g(i,Ik,_),g(i,Fs,_),e(Fs,cr),e(cr,Eb),w(lp,Eb,null),e(Fs,AI),e(Fs,jb),e(jb,ZI),g(i,Uk,_),g(i,Tt,_),w(dp,Tt,null),e(Tt,RI),e(Tt,cp),e(cp,GI),e(cp,zb),e(zb,VI),e(cp,SI),e(Tt,XI),e(Tt,pp),e(pp,LI),e(pp,Yf),e(Yf,OI),e(pp,DI),e(Tt,QI),e(Tt,hp),e(hp,HI),e(hp,mp),e(mp,YI),e(hp,KI),e(Tt,e4),w(pr,Tt,null),e(Tt,t4),e(Tt,bo),w(fp,bo,null),e(bo,o4),e(bo,$s),e($s,n4),e($s,Kf),e(Kf,s4),e($s,a4),e($s,Jb),e(Jb,r4),e($s,i4),e(bo,l4),w(hr,bo,null),e(bo,d4),w(mr,bo,null),g(i,Nk,_),g(i,xs,_),e(xs,fr),e(fr,Cb),w(up,Cb,null),e(xs,c4),e(xs,Ib),e(Ib,p4),g(i,Pk,_),g(i,vt,_),w(gp,vt,null),e(vt,h4),e(vt,Ub),e(Ub,m4),e(vt,f4),e(vt,_p),e(_p,u4),e(_p,eu),e(eu,g4),e(_p,_4),e(vt,b4),e(vt,bp),e(bp,y4),e(bp,yp),e(yp,T4),e(bp,v4),e(vt,k4),w(ur,vt,null),e(vt,w4),e(vt,Gt),w(Tp,Gt,null),e(Gt,M4),e(Gt,Bs),e(Bs,F4),e(Bs,tu),e(tu,$4),e(Bs,x4),e(Bs,Nb),e(Nb,B4),e(Bs,E4),e(Gt,j4),w(gr,Gt,null),e(Gt,z4),w(_r,Gt,null),e(Gt,J4),w(br,Gt,null),g(i,Wk,_),g(i,Es,_),e(Es,yr),e(yr,Pb),w(vp,Pb,null),e(Es,C4),e(Es,Wb),e(Wb,I4),g(i,qk,_),g(i,kt,_),w(kp,kt,null),e(kt,U4),e(kt,qb),e(qb,N4),e(kt,P4),e(kt,wp),e(wp,W4),e(wp,ou),e(ou,q4),e(wp,A4),e(kt,Z4),e(kt,Mp),e(Mp,R4),e(Mp,Fp),e(Fp,G4),e(Mp,V4),e(kt,S4),w(Tr,kt,null),e(kt,X4),e(kt,yo),w($p,yo,null),e(yo,L4),e(yo,js),e(js,O4),e(js,nu),e(nu,D4),e(js,Q4),e(js,Ab),e(Ab,H4),e(js,Y4),e(yo,K4),w(vr,yo,null),e(yo,e5),w(kr,yo,null),g(i,Ak,_),g(i,zs,_),e(zs,wr),e(wr,Zb),w(xp,Zb,null),e(zs,t5),e(zs,Rb),e(Rb,o5),g(i,Zk,_),g(i,wt,_),w(Bp,wt,null),e(wt,n5),e(wt,Gb),e(Gb,s5),e(wt,a5),e(wt,Ep),e(Ep,r5),e(Ep,su),e(su,i5),e(Ep,l5),e(wt,d5),e(wt,jp),e(jp,c5),e(jp,zp),e(zp,p5),e(jp,h5),e(wt,m5),w(Mr,wt,null),e(wt,f5),e(wt,Vt),w(Jp,Vt,null),e(Vt,u5),e(Vt,Js),e(Js,g5),e(Js,au),e(au,_5),e(Js,b5),e(Js,Vb),e(Vb,y5),e(Js,T5),e(Vt,v5),w(Fr,Vt,null),e(Vt,k5),w($r,Vt,null),e(Vt,w5),w(xr,Vt,null),g(i,Rk,_),g(i,Cs,_),e(Cs,Br),e(Br,Sb),w(Cp,Sb,null),e(Cs,M5),e(Cs,Xb),e(Xb,F5),g(i,Gk,_),g(i,Mt,_),w(Ip,Mt,null),e(Mt,$5),e(Mt,Is),e(Is,x5),e(Is,Lb),e(Lb,B5),e(Is,E5),e(Is,Ob),e(Ob,j5),e(Is,z5),e(Mt,J5),e(Mt,Up),e(Up,C5),e(Up,ru),e(ru,I5),e(Up,U5),e(Mt,N5),e(Mt,Np),e(Np,P5),e(Np,Pp),e(Pp,W5),e(Np,q5),e(Mt,A5),w(Er,Mt,null),e(Mt,Z5),e(Mt,St),w(Wp,St,null),e(St,R5),e(St,Us),e(Us,G5),e(Us,iu),e(iu,V5),e(Us,S5),e(Us,Db),e(Db,X5),e(Us,L5),e(St,O5),w(jr,St,null),e(St,D5),w(zr,St,null),e(St,Q5),w(Jr,St,null),g(i,Vk,_),g(i,Ns,_),e(Ns,Cr),e(Cr,Qb),w(qp,Qb,null),e(Ns,H5),e(Ns,Hb),e(Hb,Y5),g(i,Sk,_),g(i,at,_),w(Ap,at,null),e(at,K5),e(at,Yb),e(Yb,e3),e(at,t3),e(at,Zp),e(Zp,o3),e(Zp,lu),e(lu,n3),e(Zp,s3),e(at,a3),e(at,Rp),e(Rp,r3),e(Rp,Gp),e(Gp,i3),e(Rp,l3),e(at,d3),e(at,Kb),e(Kb,c3),e(at,p3),e(at,Ao),e(Ao,ey),e(ey,Vp),e(Vp,h3),e(Ao,m3),e(Ao,ty),e(ty,Sp),e(Sp,f3),e(Ao,u3),e(Ao,oy),e(oy,Xp),e(Xp,g3),e(Ao,_3),e(Ao,ny),e(ny,Lp),e(Lp,b3),e(at,y3),e(at,To),w(Op,To,null),e(To,T3),e(To,Ps),e(Ps,v3),e(Ps,sy),e(sy,k3),e(Ps,w3),e(Ps,ay),e(ay,M3),e(Ps,F3),e(To,$3),w(Ir,To,null),e(To,x3),w(Ur,To,null),g(i,Xk,_),g(i,Ws,_),e(Ws,Nr),e(Nr,ry),w(Dp,ry,null),e(Ws,B3),e(Ws,iy),e(iy,E3),g(i,Lk,_),g(i,rt,_),w(Qp,rt,null),e(rt,j3),e(rt,qs),e(qs,z3),e(qs,ly),e(ly,J3),e(qs,C3),e(qs,dy),e(dy,I3),e(qs,U3),e(rt,N3),e(rt,Hp),e(Hp,P3),e(Hp,du),e(du,W3),e(Hp,q3),e(rt,A3),e(rt,Yp),e(Yp,Z3),e(Yp,Kp),e(Kp,R3),e(Yp,G3),e(rt,V3),e(rt,cy),e(cy,S3),e(rt,X3),e(rt,Zo),e(Zo,py),e(py,eh),e(eh,L3),e(Zo,O3),e(Zo,hy),e(hy,th),e(th,D3),e(Zo,Q3),e(Zo,my),e(my,oh),e(oh,H3),e(Zo,Y3),e(Zo,fy),e(fy,nh),e(nh,K3),e(rt,eU),e(rt,vo),w(sh,vo,null),e(vo,tU),e(vo,As),e(As,oU),e(As,uy),e(uy,nU),e(As,sU),e(As,gy),e(gy,aU),e(As,rU),e(vo,iU),w(Pr,vo,null),e(vo,lU),w(Wr,vo,null),g(i,Ok,_),g(i,Zs,_),e(Zs,qr),e(qr,_y),w(ah,_y,null),e(Zs,dU),e(Zs,by),e(by,cU),g(i,Dk,_),g(i,it,_),w(rh,it,null),e(it,pU),e(it,yy),e(yy,hU),e(it,mU),e(it,ih),e(ih,fU),e(ih,cu),e(cu,uU),e(ih,gU),e(it,_U),e(it,lh),e(lh,bU),e(lh,dh),e(dh,yU),e(lh,TU),e(it,vU),e(it,Ty),e(Ty,kU),e(it,wU),e(it,Ro),e(Ro,vy),e(vy,ch),e(ch,MU),e(Ro,FU),e(Ro,ky),e(ky,ph),e(ph,$U),e(Ro,xU),e(Ro,wy),e(wy,hh),e(hh,BU),e(Ro,EU),e(Ro,My),e(My,mh),e(mh,jU),e(it,zU),e(it,ko),w(fh,ko,null),e(ko,JU),e(ko,Rs),e(Rs,CU),e(Rs,Fy),e(Fy,IU),e(Rs,UU),e(Rs,$y),e($y,NU),e(Rs,PU),e(ko,WU),w(Ar,ko,null),e(ko,qU),w(Zr,ko,null),g(i,Qk,_),g(i,Gs,_),e(Gs,Rr),e(Rr,xy),w(uh,xy,null),e(Gs,AU),e(Gs,By),e(By,ZU),g(i,Hk,_),g(i,lt,_),w(gh,lt,null),e(lt,RU),e(lt,_h),e(_h,GU),e(_h,Ey),e(Ey,VU),e(_h,SU),e(lt,XU),e(lt,bh),e(bh,LU),e(bh,pu),e(pu,OU),e(bh,DU),e(lt,QU),e(lt,yh),e(yh,HU),e(yh,Th),e(Th,YU),e(yh,KU),e(lt,eN),e(lt,jy),e(jy,tN),e(lt,oN),e(lt,Go),e(Go,zy),e(zy,vh),e(vh,nN),e(Go,sN),e(Go,Jy),e(Jy,kh),e(kh,aN),e(Go,rN),e(Go,Cy),e(Cy,wh),e(wh,iN),e(Go,lN),e(Go,Iy),e(Iy,Mh),e(Mh,dN),e(lt,cN),e(lt,wo),w(Fh,wo,null),e(wo,pN),e(wo,Vs),e(Vs,hN),e(Vs,Uy),e(Uy,mN),e(Vs,fN),e(Vs,Ny),e(Ny,uN),e(Vs,gN),e(wo,_N),w(Gr,wo,null),e(wo,bN),w(Vr,wo,null),g(i,Yk,_),g(i,Ss,_),e(Ss,Sr),e(Sr,Py),w($h,Py,null),e(Ss,yN),e(Ss,Wy),e(Wy,TN),g(i,Kk,_),g(i,dt,_),w(xh,dt,null),e(dt,vN),e(dt,Bh),e(Bh,kN),e(Bh,qy),e(qy,wN),e(Bh,MN),e(dt,FN),e(dt,Eh),e(Eh,$N),e(Eh,hu),e(hu,xN),e(Eh,BN),e(dt,EN),e(dt,jh),e(jh,jN),e(jh,zh),e(zh,zN),e(jh,JN),e(dt,CN),e(dt,Ay),e(Ay,IN),e(dt,UN),e(dt,Vo),e(Vo,Zy),e(Zy,Jh),e(Jh,NN),e(Vo,PN),e(Vo,Ry),e(Ry,Ch),e(Ch,WN),e(Vo,qN),e(Vo,Gy),e(Gy,Ih),e(Ih,AN),e(Vo,ZN),e(Vo,Vy),e(Vy,Uh),e(Uh,RN),e(dt,GN),e(dt,Mo),w(Nh,Mo,null),e(Mo,VN),e(Mo,Xs),e(Xs,SN),e(Xs,Sy),e(Sy,XN),e(Xs,LN),e(Xs,Xy),e(Xy,ON),e(Xs,DN),e(Mo,QN),w(Xr,Mo,null),e(Mo,HN),w(Lr,Mo,null),g(i,ew,_),g(i,Ls,_),e(Ls,Or),e(Or,Ly),w(Ph,Ly,null),e(Ls,YN),e(Ls,Oy),e(Oy,KN),g(i,tw,_),g(i,ct,_),w(Wh,ct,null),e(ct,e9),e(ct,Dy),e(Dy,t9),e(ct,o9),e(ct,qh),e(qh,n9),e(qh,mu),e(mu,s9),e(qh,a9),e(ct,r9),e(ct,Ah),e(Ah,i9),e(Ah,Zh),e(Zh,l9),e(Ah,d9),e(ct,c9),e(ct,Qy),e(Qy,p9),e(ct,h9),e(ct,So),e(So,Hy),e(Hy,Rh),e(Rh,m9),e(So,f9),e(So,Yy),e(Yy,Gh),e(Gh,u9),e(So,g9),e(So,Ky),e(Ky,Vh),e(Vh,_9),e(So,b9),e(So,eT),e(eT,Sh),e(Sh,y9),e(ct,T9),e(ct,Fo),w(Xh,Fo,null),e(Fo,v9),e(Fo,Os),e(Os,k9),e(Os,tT),e(tT,w9),e(Os,M9),e(Os,oT),e(oT,F9),e(Os,$9),e(Fo,x9),w(Dr,Fo,null),e(Fo,B9),w(Qr,Fo,null),g(i,ow,_),g(i,Ds,_),e(Ds,Hr),e(Hr,nT),w(Lh,nT,null),e(Ds,E9),e(Ds,sT),e(sT,j9),g(i,nw,_),g(i,pt,_),w(Oh,pt,null),e(pt,z9),e(pt,aT),e(aT,J9),e(pt,C9),e(pt,Dh),e(Dh,I9),e(Dh,fu),e(fu,U9),e(Dh,N9),e(pt,P9),e(pt,Qh),e(Qh,W9),e(Qh,Hh),e(Hh,q9),e(Qh,A9),e(pt,Z9),e(pt,rT),e(rT,R9),e(pt,G9),e(pt,Xo),e(Xo,iT),e(iT,Yh),e(Yh,V9),e(Xo,S9),e(Xo,lT),e(lT,Kh),e(Kh,X9),e(Xo,L9),e(Xo,dT),e(dT,em),e(em,O9),e(Xo,D9),e(Xo,cT),e(cT,tm),e(tm,Q9),e(pt,H9),e(pt,$o),w(om,$o,null),e($o,Y9),e($o,Qs),e(Qs,K9),e(Qs,pT),e(pT,eP),e(Qs,tP),e(Qs,hT),e(hT,oP),e(Qs,nP),e($o,sP),w(Yr,$o,null),e($o,aP),w(Kr,$o,null),g(i,sw,_),g(i,Hs,_),e(Hs,ei),e(ei,mT),w(nm,mT,null),e(Hs,rP),e(Hs,fT),e(fT,iP),g(i,aw,_),g(i,ht,_),w(sm,ht,null),e(ht,lP),e(ht,uT),e(uT,dP),e(ht,cP),e(ht,am),e(am,pP),e(am,uu),e(uu,hP),e(am,mP),e(ht,fP),e(ht,rm),e(rm,uP),e(rm,im),e(im,gP),e(rm,_P),e(ht,bP),e(ht,gT),e(gT,yP),e(ht,TP),e(ht,Lo),e(Lo,_T),e(_T,lm),e(lm,vP),e(Lo,kP),e(Lo,bT),e(bT,dm),e(dm,wP),e(Lo,MP),e(Lo,yT),e(yT,cm),e(cm,FP),e(Lo,$P),e(Lo,TT),e(TT,pm),e(pm,xP),e(ht,BP),e(ht,xo),w(hm,xo,null),e(xo,EP),e(xo,Ys),e(Ys,jP),e(Ys,vT),e(vT,zP),e(Ys,JP),e(Ys,kT),e(kT,CP),e(Ys,IP),e(xo,UP),w(ti,xo,null),e(xo,NP),w(oi,xo,null),g(i,rw,_),g(i,Ks,_),e(Ks,ni),e(ni,wT),w(mm,wT,null),e(Ks,PP),e(Ks,MT),e(MT,WP),g(i,iw,_),g(i,mt,_),w(fm,mt,null),e(mt,qP),e(mt,ea),e(ea,AP),e(ea,FT),e(FT,ZP),e(ea,RP),e(ea,$T),e($T,GP),e(ea,VP),e(mt,SP),e(mt,um),e(um,XP),e(um,gu),e(gu,LP),e(um,OP),e(mt,DP),e(mt,gm),e(gm,QP),e(gm,_m),e(_m,HP),e(gm,YP),e(mt,KP),e(mt,xT),e(xT,eW),e(mt,tW),e(mt,Oo),e(Oo,BT),e(BT,bm),e(bm,oW),e(Oo,nW),e(Oo,ET),e(ET,ym),e(ym,sW),e(Oo,aW),e(Oo,jT),e(jT,Tm),e(Tm,rW),e(Oo,iW),e(Oo,zT),e(zT,vm),e(vm,lW),e(mt,dW),e(mt,Bo),w(km,Bo,null),e(Bo,cW),e(Bo,ta),e(ta,pW),e(ta,JT),e(JT,hW),e(ta,mW),e(ta,CT),e(CT,fW),e(ta,uW),e(Bo,gW),w(si,Bo,null),e(Bo,_W),w(ai,Bo,null),lw=!0},p(i,[_]){const wm={};_&2&&(wm.$$scope={dirty:_,ctx:i}),ca.$set(wm);const IT={};_&2&&(IT.$$scope={dirty:_,ctx:i}),ma.$set(IT);const UT={};_&2&&(UT.$$scope={dirty:_,ctx:i}),ua.$set(UT);const NT={};_&2&&(NT.$$scope={dirty:_,ctx:i}),_a.$set(NT);const Mm={};_&2&&(Mm.$$scope={dirty:_,ctx:i}),ba.$set(Mm);const PT={};_&2&&(PT.$$scope={dirty:_,ctx:i}),ka.$set(PT);const WT={};_&2&&(WT.$$scope={dirty:_,ctx:i}),wa.$set(WT);const Fm={};_&2&&(Fm.$$scope={dirty:_,ctx:i}),Fa.$set(Fm);const qT={};_&2&&(qT.$$scope={dirty:_,ctx:i}),$a.$set(qT);const AT={};_&2&&(AT.$$scope={dirty:_,ctx:i}),Ba.$set(AT);const ZT={};_&2&&(ZT.$$scope={dirty:_,ctx:i}),Ea.$set(ZT);const $m={};_&2&&($m.$$scope={dirty:_,ctx:i}),za.$set($m);const RT={};_&2&&(RT.$$scope={dirty:_,ctx:i}),Ja.$set(RT);const GT={};_&2&&(GT.$$scope={dirty:_,ctx:i}),Ia.$set(GT);const VT={};_&2&&(VT.$$scope={dirty:_,ctx:i}),Ua.$set(VT);const ST={};_&2&&(ST.$$scope={dirty:_,ctx:i}),Pa.$set(ST);const XT={};_&2&&(XT.$$scope={dirty:_,ctx:i}),Wa.$set(XT);const LT={};_&2&&(LT.$$scope={dirty:_,ctx:i}),qa.$set(LT);const OT={};_&2&&(OT.$$scope={dirty:_,ctx:i}),Za.$set(OT);const Do={};_&2&&(Do.$$scope={dirty:_,ctx:i}),Ra.$set(Do);const DT={};_&2&&(DT.$$scope={dirty:_,ctx:i}),Va.$set(DT);const QT={};_&2&&(QT.$$scope={dirty:_,ctx:i}),Sa.$set(QT);const HT={};_&2&&(HT.$$scope={dirty:_,ctx:i}),La.$set(HT);const YT={};_&2&&(YT.$$scope={dirty:_,ctx:i}),Oa.$set(YT);const xm={};_&2&&(xm.$$scope={dirty:_,ctx:i}),Qa.$set(xm);const KT={};_&2&&(KT.$$scope={dirty:_,ctx:i}),Ha.$set(KT);const oa={};_&2&&(oa.$$scope={dirty:_,ctx:i}),Ya.$set(oa);const ev={};_&2&&(ev.$$scope={dirty:_,ctx:i}),er.$set(ev);const tv={};_&2&&(tv.$$scope={dirty:_,ctx:i}),tr.$set(tv);const ov={};_&2&&(ov.$$scope={dirty:_,ctx:i}),or.$set(ov);const nv={};_&2&&(nv.$$scope={dirty:_,ctx:i}),sr.$set(nv);const sv={};_&2&&(sv.$$scope={dirty:_,ctx:i}),rr.$set(sv);const na={};_&2&&(na.$$scope={dirty:_,ctx:i}),ir.$set(na);const av={};_&2&&(av.$$scope={dirty:_,ctx:i}),lr.$set(av);const rv={};_&2&&(rv.$$scope={dirty:_,ctx:i}),dr.$set(rv);const Bm={};_&2&&(Bm.$$scope={dirty:_,ctx:i}),pr.$set(Bm);const iv={};_&2&&(iv.$$scope={dirty:_,ctx:i}),hr.$set(iv);const lv={};_&2&&(lv.$$scope={dirty:_,ctx:i}),mr.$set(lv);const dv={};_&2&&(dv.$$scope={dirty:_,ctx:i}),ur.$set(dv);const cv={};_&2&&(cv.$$scope={dirty:_,ctx:i}),gr.$set(cv);const ft={};_&2&&(ft.$$scope={dirty:_,ctx:i}),_r.$set(ft);const Em={};_&2&&(Em.$$scope={dirty:_,ctx:i}),br.$set(Em);const pv={};_&2&&(pv.$$scope={dirty:_,ctx:i}),Tr.$set(pv);const jm={};_&2&&(jm.$$scope={dirty:_,ctx:i}),vr.$set(jm);const hv={};_&2&&(hv.$$scope={dirty:_,ctx:i}),kr.$set(hv);const zm={};_&2&&(zm.$$scope={dirty:_,ctx:i}),Mr.$set(zm);const mv={};_&2&&(mv.$$scope={dirty:_,ctx:i}),Fr.$set(mv);const Jm={};_&2&&(Jm.$$scope={dirty:_,ctx:i}),$r.$set(Jm);const fv={};_&2&&(fv.$$scope={dirty:_,ctx:i}),xr.$set(fv);const fn={};_&2&&(fn.$$scope={dirty:_,ctx:i}),Er.$set(fn);const uv={};_&2&&(uv.$$scope={dirty:_,ctx:i}),jr.$set(uv);const gv={};_&2&&(gv.$$scope={dirty:_,ctx:i}),zr.$set(gv);const _v={};_&2&&(_v.$$scope={dirty:_,ctx:i}),Jr.$set(_v);const un={};_&2&&(un.$$scope={dirty:_,ctx:i}),Ir.$set(un);const bv={};_&2&&(bv.$$scope={dirty:_,ctx:i}),Ur.$set(bv);const yv={};_&2&&(yv.$$scope={dirty:_,ctx:i}),Pr.$set(yv);const Tv={};_&2&&(Tv.$$scope={dirty:_,ctx:i}),Wr.$set(Tv);const gn={};_&2&&(gn.$$scope={dirty:_,ctx:i}),Ar.$set(gn);const vv={};_&2&&(vv.$$scope={dirty:_,ctx:i}),Zr.$set(vv);const kv={};_&2&&(kv.$$scope={dirty:_,ctx:i}),Gr.$set(kv);const wv={};_&2&&(wv.$$scope={dirty:_,ctx:i}),Vr.$set(wv);const Mv={};_&2&&(Mv.$$scope={dirty:_,ctx:i}),Xr.$set(Mv);const Fv={};_&2&&(Fv.$$scope={dirty:_,ctx:i}),Lr.$set(Fv);const Ft={};_&2&&(Ft.$$scope={dirty:_,ctx:i}),Dr.$set(Ft);const Cm={};_&2&&(Cm.$$scope={dirty:_,ctx:i}),Qr.$set(Cm);const $v={};_&2&&($v.$$scope={dirty:_,ctx:i}),Yr.$set($v);const sa={};_&2&&(sa.$$scope={dirty:_,ctx:i}),Kr.$set(sa);const xv={};_&2&&(xv.$$scope={dirty:_,ctx:i}),ti.$set(xv);const Bv={};_&2&&(Bv.$$scope={dirty:_,ctx:i}),oi.$set(Bv);const _n={};_&2&&(_n.$$scope={dirty:_,ctx:i}),si.$set(_n);const Ev={};_&2&&(Ev.$$scope={dirty:_,ctx:i}),ai.$set(Ev)},i(i){lw||(M(l.$$.fragment,i),M(de.$$.fragment,i),M(Ai.$$.fragment,i),M(Zi.$$.fragment,i),M(ol.$$.fragment,i),M(ml.$$.fragment,i),M(vl.$$.fragment,i),M(Kl.$$.fragment,i),M(ed.$$.fragment,i),M(ca.$$.fragment,i),M(od.$$.fragment,i),M(nd.$$.fragment,i),M(ad.$$.fragment,i),M(id.$$.fragment,i),M(dd.$$.fragment,i),M(ma.$$.fragment,i),M(cd.$$.fragment,i),M(pd.$$.fragment,i),M(hd.$$.fragment,i),M(ud.$$.fragment,i),M(_d.$$.fragment,i),M(ua.$$.fragment,i),M(bd.$$.fragment,i),M(yd.$$.fragment,i),M(vd.$$.fragment,i),M(_a.$$.fragment,i),M(wd.$$.fragment,i),M(ba.$$.fragment,i),M(Md.$$.fragment,i),M(Fd.$$.fragment,i),M(xd.$$.fragment,i),M(Ed.$$.fragment,i),M(zd.$$.fragment,i),M(Jd.$$.fragment,i),M(Cd.$$.fragment,i),M(qd.$$.fragment,i),M(ka.$$.fragment,i),M(wa.$$.fragment,i),M(Ad.$$.fragment,i),M(Zd.$$.fragment,i),M(Sd.$$.fragment,i),M(Fa.$$.fragment,i),M($a.$$.fragment,i),M(Xd.$$.fragment,i),M(Ld.$$.fragment,i),M(Yd.$$.fragment,i),M(Ba.$$.fragment,i),M(Ea.$$.fragment,i),M(Kd.$$.fragment,i),M(ec.$$.fragment,i),M(ac.$$.fragment,i),M(za.$$.fragment,i),M(Ja.$$.fragment,i),M(rc.$$.fragment,i),M(ic.$$.fragment,i),M(hc.$$.fragment,i),M(Ia.$$.fragment,i),M(Ua.$$.fragment,i),M(mc.$$.fragment,i),M(fc.$$.fragment,i),M(bc.$$.fragment,i),M(Pa.$$.fragment,i),M(Wa.$$.fragment,i),M(qa.$$.fragment,i),M(yc.$$.fragment,i),M(Tc.$$.fragment,i),M(Mc.$$.fragment,i),M(Za.$$.fragment,i),M(Ra.$$.fragment,i),M(Fc.$$.fragment,i),M($c.$$.fragment,i),M(jc.$$.fragment,i),M(Va.$$.fragment,i),M(Sa.$$.fragment,i),M(zc.$$.fragment,i),M(Jc.$$.fragment,i),M(Nc.$$.fragment,i),M(La.$$.fragment,i),M(Oa.$$.fragment,i),M(Pc.$$.fragment,i),M(Wc.$$.fragment,i),M(Qa.$$.fragment,i),M(Rc.$$.fragment,i),M(Ha.$$.fragment,i),M(Ya.$$.fragment,i),M(Gc.$$.fragment,i),M(Vc.$$.fragment,i),M(er.$$.fragment,i),M(Oc.$$.fragment,i),M(tr.$$.fragment,i),M(or.$$.fragment,i),M(Dc.$$.fragment,i),M(Qc.$$.fragment,i),M(Hc.$$.fragment,i),M(sr.$$.fragment,i),M(tp.$$.fragment,i),M(op.$$.fragment,i),M(rr.$$.fragment,i),M(ip.$$.fragment,i),M(ir.$$.fragment,i),M(lr.$$.fragment,i),M(dr.$$.fragment,i),M(lp.$$.fragment,i),M(dp.$$.fragment,i),M(pr.$$.fragment,i),M(fp.$$.fragment,i),M(hr.$$.fragment,i),M(mr.$$.fragment,i),M(up.$$.fragment,i),M(gp.$$.fragment,i),M(ur.$$.fragment,i),M(Tp.$$.fragment,i),M(gr.$$.fragment,i),M(_r.$$.fragment,i),M(br.$$.fragment,i),M(vp.$$.fragment,i),M(kp.$$.fragment,i),M(Tr.$$.fragment,i),M($p.$$.fragment,i),M(vr.$$.fragment,i),M(kr.$$.fragment,i),M(xp.$$.fragment,i),M(Bp.$$.fragment,i),M(Mr.$$.fragment,i),M(Jp.$$.fragment,i),M(Fr.$$.fragment,i),M($r.$$.fragment,i),M(xr.$$.fragment,i),M(Cp.$$.fragment,i),M(Ip.$$.fragment,i),M(Er.$$.fragment,i),M(Wp.$$.fragment,i),M(jr.$$.fragment,i),M(zr.$$.fragment,i),M(Jr.$$.fragment,i),M(qp.$$.fragment,i),M(Ap.$$.fragment,i),M(Op.$$.fragment,i),M(Ir.$$.fragment,i),M(Ur.$$.fragment,i),M(Dp.$$.fragment,i),M(Qp.$$.fragment,i),M(sh.$$.fragment,i),M(Pr.$$.fragment,i),M(Wr.$$.fragment,i),M(ah.$$.fragment,i),M(rh.$$.fragment,i),M(fh.$$.fragment,i),M(Ar.$$.fragment,i),M(Zr.$$.fragment,i),M(uh.$$.fragment,i),M(gh.$$.fragment,i),M(Fh.$$.fragment,i),M(Gr.$$.fragment,i),M(Vr.$$.fragment,i),M($h.$$.fragment,i),M(xh.$$.fragment,i),M(Nh.$$.fragment,i),M(Xr.$$.fragment,i),M(Lr.$$.fragment,i),M(Ph.$$.fragment,i),M(Wh.$$.fragment,i),M(Xh.$$.fragment,i),M(Dr.$$.fragment,i),M(Qr.$$.fragment,i),M(Lh.$$.fragment,i),M(Oh.$$.fragment,i),M(om.$$.fragment,i),M(Yr.$$.fragment,i),M(Kr.$$.fragment,i),M(nm.$$.fragment,i),M(sm.$$.fragment,i),M(hm.$$.fragment,i),M(ti.$$.fragment,i),M(oi.$$.fragment,i),M(mm.$$.fragment,i),M(fm.$$.fragment,i),M(km.$$.fragment,i),M(si.$$.fragment,i),M(ai.$$.fragment,i),lw=!0)},o(i){F(l.$$.fragment,i),F(de.$$.fragment,i),F(Ai.$$.fragment,i),F(Zi.$$.fragment,i),F(ol.$$.fragment,i),F(ml.$$.fragment,i),F(vl.$$.fragment,i),F(Kl.$$.fragment,i),F(ed.$$.fragment,i),F(ca.$$.fragment,i),F(od.$$.fragment,i),F(nd.$$.fragment,i),F(ad.$$.fragment,i),F(id.$$.fragment,i),F(dd.$$.fragment,i),F(ma.$$.fragment,i),F(cd.$$.fragment,i),F(pd.$$.fragment,i),F(hd.$$.fragment,i),F(ud.$$.fragment,i),F(_d.$$.fragment,i),F(ua.$$.fragment,i),F(bd.$$.fragment,i),F(yd.$$.fragment,i),F(vd.$$.fragment,i),F(_a.$$.fragment,i),F(wd.$$.fragment,i),F(ba.$$.fragment,i),F(Md.$$.fragment,i),F(Fd.$$.fragment,i),F(xd.$$.fragment,i),F(Ed.$$.fragment,i),F(zd.$$.fragment,i),F(Jd.$$.fragment,i),F(Cd.$$.fragment,i),F(qd.$$.fragment,i),F(ka.$$.fragment,i),F(wa.$$.fragment,i),F(Ad.$$.fragment,i),F(Zd.$$.fragment,i),F(Sd.$$.fragment,i),F(Fa.$$.fragment,i),F($a.$$.fragment,i),F(Xd.$$.fragment,i),F(Ld.$$.fragment,i),F(Yd.$$.fragment,i),F(Ba.$$.fragment,i),F(Ea.$$.fragment,i),F(Kd.$$.fragment,i),F(ec.$$.fragment,i),F(ac.$$.fragment,i),F(za.$$.fragment,i),F(Ja.$$.fragment,i),F(rc.$$.fragment,i),F(ic.$$.fragment,i),F(hc.$$.fragment,i),F(Ia.$$.fragment,i),F(Ua.$$.fragment,i),F(mc.$$.fragment,i),F(fc.$$.fragment,i),F(bc.$$.fragment,i),F(Pa.$$.fragment,i),F(Wa.$$.fragment,i),F(qa.$$.fragment,i),F(yc.$$.fragment,i),F(Tc.$$.fragment,i),F(Mc.$$.fragment,i),F(Za.$$.fragment,i),F(Ra.$$.fragment,i),F(Fc.$$.fragment,i),F($c.$$.fragment,i),F(jc.$$.fragment,i),F(Va.$$.fragment,i),F(Sa.$$.fragment,i),F(zc.$$.fragment,i),F(Jc.$$.fragment,i),F(Nc.$$.fragment,i),F(La.$$.fragment,i),F(Oa.$$.fragment,i),F(Pc.$$.fragment,i),F(Wc.$$.fragment,i),F(Qa.$$.fragment,i),F(Rc.$$.fragment,i),F(Ha.$$.fragment,i),F(Ya.$$.fragment,i),F(Gc.$$.fragment,i),F(Vc.$$.fragment,i),F(er.$$.fragment,i),F(Oc.$$.fragment,i),F(tr.$$.fragment,i),F(or.$$.fragment,i),F(Dc.$$.fragment,i),F(Qc.$$.fragment,i),F(Hc.$$.fragment,i),F(sr.$$.fragment,i),F(tp.$$.fragment,i),F(op.$$.fragment,i),F(rr.$$.fragment,i),F(ip.$$.fragment,i),F(ir.$$.fragment,i),F(lr.$$.fragment,i),F(dr.$$.fragment,i),F(lp.$$.fragment,i),F(dp.$$.fragment,i),F(pr.$$.fragment,i),F(fp.$$.fragment,i),F(hr.$$.fragment,i),F(mr.$$.fragment,i),F(up.$$.fragment,i),F(gp.$$.fragment,i),F(ur.$$.fragment,i),F(Tp.$$.fragment,i),F(gr.$$.fragment,i),F(_r.$$.fragment,i),F(br.$$.fragment,i),F(vp.$$.fragment,i),F(kp.$$.fragment,i),F(Tr.$$.fragment,i),F($p.$$.fragment,i),F(vr.$$.fragment,i),F(kr.$$.fragment,i),F(xp.$$.fragment,i),F(Bp.$$.fragment,i),F(Mr.$$.fragment,i),F(Jp.$$.fragment,i),F(Fr.$$.fragment,i),F($r.$$.fragment,i),F(xr.$$.fragment,i),F(Cp.$$.fragment,i),F(Ip.$$.fragment,i),F(Er.$$.fragment,i),F(Wp.$$.fragment,i),F(jr.$$.fragment,i),F(zr.$$.fragment,i),F(Jr.$$.fragment,i),F(qp.$$.fragment,i),F(Ap.$$.fragment,i),F(Op.$$.fragment,i),F(Ir.$$.fragment,i),F(Ur.$$.fragment,i),F(Dp.$$.fragment,i),F(Qp.$$.fragment,i),F(sh.$$.fragment,i),F(Pr.$$.fragment,i),F(Wr.$$.fragment,i),F(ah.$$.fragment,i),F(rh.$$.fragment,i),F(fh.$$.fragment,i),F(Ar.$$.fragment,i),F(Zr.$$.fragment,i),F(uh.$$.fragment,i),F(gh.$$.fragment,i),F(Fh.$$.fragment,i),F(Gr.$$.fragment,i),F(Vr.$$.fragment,i),F($h.$$.fragment,i),F(xh.$$.fragment,i),F(Nh.$$.fragment,i),F(Xr.$$.fragment,i),F(Lr.$$.fragment,i),F(Ph.$$.fragment,i),F(Wh.$$.fragment,i),F(Xh.$$.fragment,i),F(Dr.$$.fragment,i),F(Qr.$$.fragment,i),F(Lh.$$.fragment,i),F(Oh.$$.fragment,i),F(om.$$.fragment,i),F(Yr.$$.fragment,i),F(Kr.$$.fragment,i),F(nm.$$.fragment,i),F(sm.$$.fragment,i),F(hm.$$.fragment,i),F(ti.$$.fragment,i),F(oi.$$.fragment,i),F(mm.$$.fragment,i),F(fm.$$.fragment,i),F(km.$$.fragment,i),F(si.$$.fragment,i),F(ai.$$.fragment,i),lw=!1},d(i){t(d),i&&t(y),i&&t(f),$(l),i&&t(we),i&&t(Z),i&&t(O),i&&t(ie),$(de),i&&t(Me),i&&t(R),i&&t(U),i&&t(fe),i&&t(Fe),i&&t(ue),i&&t($e),i&&t(C),i&&t(xe),i&&t(ge),i&&t(Be),i&&t(se),i&&t(Ve),i&&t(A),i&&t(Jv),i&&t(Nn),$(Ai),i&&t(Cv),i&&t(Rm),i&&t(Iv),$(Zi,i),i&&t(Uv),i&&t(tt),i&&t(Nv),$(ol,i),i&&t(Pv),i&&t(ut),i&&t(Wv),$(ml,i),i&&t(qv),i&&t(Wt),i&&t(Av),$(vl,i),i&&t(Zv),i&&t(qt),i&&t(Rv),i&&t(df),i&&t(Gv),i&&t(rn),i&&t(Vv),i&&t(Jl),i&&t(Sv),i&&t(la),i&&t(Xv),i&&t(Pl),i&&t(Lv),i&&t(mf),i&&t(Ov),i&&t(Al),i&&t(Dv),i&&t($t),i&&t(Qv),i&&t(Wn),$(Kl),i&&t(Hv),i&&t(so),$(ed),$(ca),i&&t(Yv),i&&t(An),$(od),i&&t(Kv),i&&t(ot),$(nd),$(ad),$(id),$(dd),$(ma),$(cd),i&&t(ek),i&&t(Rn),$(pd),i&&t(tk),i&&t(Bt),$(hd),$(ud),$(_d),$(ua),i&&t(ok),i&&t(Vn),$(bd),i&&t(nk),i&&t(Et),$(yd),$(vd),$(_a),$(wd),$(ba),i&&t(sk),i&&t(Ln),$(Md),i&&t(ak),i&&t(On),$(Fd),i&&t(rk),i&&t(Dn),$(xd),i&&t(ik),i&&t(qo),$(Ed),$(zd),i&&t(lk),i&&t(Qn),$(Jd),i&&t(dk),i&&t(nt),$(Cd),$(qd),$(ka),$(wa),i&&t(ck),i&&t(Yn),$(Ad),i&&t(pk),i&&t(jt),$(Zd),$(Sd),$(Fa),$($a),i&&t(hk),i&&t(ts),$(Xd),i&&t(mk),i&&t(zt),$(Ld),$(Yd),$(Ba),$(Ea),i&&t(fk),i&&t(ns),$(Kd),i&&t(uk),i&&t(Jt),$(ec),$(ac),$(za),$(Ja),i&&t(gk),i&&t(as),$(rc),i&&t(_k),i&&t(Ct),$(ic),$(hc),$(Ia),$(Ua),i&&t(bk),i&&t(is),$(mc),i&&t(yk),i&&t(It),$(fc),$(bc),$(Pa),$(Wa),$(qa),i&&t(Tk),i&&t(ds),$(yc),i&&t(vk),i&&t(Ut),$(Tc),$(Mc),$(Za),$(Ra),i&&t(kk),i&&t(ps),$(Fc),i&&t(wk),i&&t(Nt),$($c),$(jc),$(Va),$(Sa),i&&t(Mk),i&&t(ms),$(zc),i&&t(Fk),i&&t(Pt),$(Jc),$(Nc),$(La),$(Oa),i&&t($k),i&&t(gs),$(Pc),i&&t(xk),i&&t(_t),$(Wc),$(Qa),$(Rc),$(Ha),$(Ya),i&&t(Bk),i&&t(bs),$(Gc),i&&t(Ek),i&&t(bt),$(Vc),$(er),$(Oc),$(tr),$(or),i&&t(jk),i&&t(vs),$(Dc),i&&t(zk),i&&t(ks),$(Qc),$(Hc),$(sr),i&&t(Jk),i&&t(ws),$(tp),i&&t(Ck),i&&t(yt),$(op),$(rr),$(ip),$(ir),$(lr),$(dr),i&&t(Ik),i&&t(Fs),$(lp),i&&t(Uk),i&&t(Tt),$(dp),$(pr),$(fp),$(hr),$(mr),i&&t(Nk),i&&t(xs),$(up),i&&t(Pk),i&&t(vt),$(gp),$(ur),$(Tp),$(gr),$(_r),$(br),i&&t(Wk),i&&t(Es),$(vp),i&&t(qk),i&&t(kt),$(kp),$(Tr),$($p),$(vr),$(kr),i&&t(Ak),i&&t(zs),$(xp),i&&t(Zk),i&&t(wt),$(Bp),$(Mr),$(Jp),$(Fr),$($r),$(xr),i&&t(Rk),i&&t(Cs),$(Cp),i&&t(Gk),i&&t(Mt),$(Ip),$(Er),$(Wp),$(jr),$(zr),$(Jr),i&&t(Vk),i&&t(Ns),$(qp),i&&t(Sk),i&&t(at),$(Ap),$(Op),$(Ir),$(Ur),i&&t(Xk),i&&t(Ws),$(Dp),i&&t(Lk),i&&t(rt),$(Qp),$(sh),$(Pr),$(Wr),i&&t(Ok),i&&t(Zs),$(ah),i&&t(Dk),i&&t(it),$(rh),$(fh),$(Ar),$(Zr),i&&t(Qk),i&&t(Gs),$(uh),i&&t(Hk),i&&t(lt),$(gh),$(Fh),$(Gr),$(Vr),i&&t(Yk),i&&t(Ss),$($h),i&&t(Kk),i&&t(dt),$(xh),$(Nh),$(Xr),$(Lr),i&&t(ew),i&&t(Ls),$(Ph),i&&t(tw),i&&t(ct),$(Wh),$(Xh),$(Dr),$(Qr),i&&t(ow),i&&t(Ds),$(Lh),i&&t(nw),i&&t(pt),$(Oh),$(om),$(Yr),$(Kr),i&&t(sw),i&&t(Hs),$(nm),i&&t(aw),i&&t(ht),$(sm),$(hm),$(ti),$(oi),i&&t(rw),i&&t(Ks),$(mm),i&&t(iw),i&&t(mt),$(fm),$(km),$(si),$(ai)}}}const s8={local:"bert",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.BertConfig",title:"BertConfig"},{local:"transformers.BertTokenizer",title:"BertTokenizer"},{local:"transformers.BertTokenizerFast",title:"BertTokenizerFast"},{local:"transformers.TFBertTokenizer",title:"TFBertTokenizer"},{local:"transformers.models.bert.modeling_bert.BertForPreTrainingOutput",title:"Bert specific outputs"},{local:"transformers.BertModel",title:"BertModel"},{local:"transformers.BertForPreTraining",title:"BertForPreTraining"},{local:"transformers.BertLMHeadModel",title:"BertLMHeadModel"},{local:"transformers.BertForMaskedLM",title:"BertForMaskedLM"},{local:"transformers.BertForNextSentencePrediction",title:"BertForNextSentencePrediction"},{local:"transformers.BertForSequenceClassification",title:"BertForSequenceClassification"},{local:"transformers.BertForMultipleChoice",title:"BertForMultipleChoice"},{local:"transformers.BertForTokenClassification",title:"BertForTokenClassification"},{local:"transformers.BertForQuestionAnswering",title:"BertForQuestionAnswering"},{local:"transformers.TFBertModel",title:"TFBertModel"},{local:"transformers.TFBertForPreTraining",title:"TFBertForPreTraining"},{local:"transformers.TFBertLMHeadModel",title:"TFBertModelLMHeadModel"},{local:"transformers.TFBertForMaskedLM",title:"TFBertForMaskedLM"},{local:"transformers.TFBertForNextSentencePrediction",title:"TFBertForNextSentencePrediction"},{local:"transformers.TFBertForSequenceClassification",title:"TFBertForSequenceClassification"},{local:"transformers.TFBertForMultipleChoice",title:"TFBertForMultipleChoice"},{local:"transformers.TFBertForTokenClassification",title:"TFBertForTokenClassification"},{local:"transformers.TFBertForQuestionAnswering",title:"TFBertForQuestionAnswering"},{local:"transformers.FlaxBertModel",title:"FlaxBertModel"},{local:"transformers.FlaxBertForPreTraining",title:"FlaxBertForPreTraining"},{local:"transformers.FlaxBertForCausalLM",title:"FlaxBertForCausalLM"},{local:"transformers.FlaxBertForMaskedLM",title:"FlaxBertForMaskedLM"},{local:"transformers.FlaxBertForNextSentencePrediction",title:"FlaxBertForNextSentencePrediction"},{local:"transformers.FlaxBertForSequenceClassification",title:"FlaxBertForSequenceClassification"},{local:"transformers.FlaxBertForMultipleChoice",title:"FlaxBertForMultipleChoice"},{local:"transformers.FlaxBertForTokenClassification",title:"FlaxBertForTokenClassification"},{local:"transformers.FlaxBertForQuestionAnswering",title:"FlaxBertForQuestionAnswering"}],title:"BERT"};function a8(x){return qS(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class m8 extends US{constructor(d){super();NS(this,d,a8,n8,PS,{})}}export{m8 as default,s8 as metadata};
