import{S as US,i as NS,s as PS,e as s,k as c,w as k,t as o,M as WS,c as a,d as t,m as p,a as r,x as v,h as n,b as h,N as IS,G as e,g,y as w,q as M,o as $,B as F,v as qS,L as ke}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 ve}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 vM}from"../../chunks/PipelineTag-hf-doc-builder.js";function AS(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Examples:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function ZS(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"pair mask has the following format:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function RS(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"pair mask has the following format:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function GS(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Examples:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function VS(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Examples:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function SS(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function XS(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function LS(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function OS(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function DS(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function QS(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function HS(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function YS(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function KS(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function eX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function tX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function oX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example of single-label classification:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function nX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example of multi-label classification:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function sX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function aX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function rX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function iX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function lX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function dX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function cX(B){let d,y,u,f,b,l,m,E,Ee,we,Z,he,ee,x,je,G,me,qe,O,ie,le,V,de,ze,S,Je,Me,R,Ce,ce,ae,J,U,ue,D,$e,fe,X,Ie,Fe,C,_e,Q,Be,ge,H,xe,se,W,be,Y,Ue,te,I,Ne,P,pe,ye;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),u=s("code"),f=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(),x=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"),ue=o("a single Tensor with "),D=s("code"),$e=o("input_ids"),fe=o(" only and nothing else: "),X=s("code"),Ie=o("model(input_ids)"),Fe=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"),Be=o("model([input_ids, attention_mask])"),ge=o(" or "),H=s("code"),xe=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 "),u=a(j,"CODE",{});var Ze=r(u);f=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),x=a(T,"P",{});var z=r(x);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);ue=n(L,"a single Tensor with "),D=a(L,"CODE",{});var He=r(D);$e=n(He,"input_ids"),He.forEach(t),fe=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),Fe=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);Be=n(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),ge=n(A," or "),H=a(A,"CODE",{});var Re=r(H);xe=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,u),e(u,f),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,x,j),e(x,je),e(x,G),e(G,me),e(x,qe),e(x,O),e(O,ie),e(x,le),e(x,V),e(V,de),e(x,ze),e(x,S),e(S,Je),e(x,Me),e(x,R),e(R,Ce),e(x,ce),g(T,ae,j),g(T,J,j),e(J,U),e(U,ue),e(U,D),e(D,$e),e(U,fe),e(U,X),e(X,Ie),e(J,Fe),e(J,C),e(C,_e),e(C,Q),e(Q,Be),e(C,ge),e(C,H),e(H,xe),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(x),T&&t(ae),T&&t(J),T&&t(te),T&&t(I)}}}function pX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function hX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function mX(B){let d,y,u,f,b,l,m,E,Ee,we,Z,he,ee,x,je,G,me,qe,O,ie,le,V,de,ze,S,Je,Me,R,Ce,ce,ae,J,U,ue,D,$e,fe,X,Ie,Fe,C,_e,Q,Be,ge,H,xe,se,W,be,Y,Ue,te,I,Ne,P,pe,ye;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),u=s("code"),f=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(),x=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"),ue=o("a single Tensor with "),D=s("code"),$e=o("input_ids"),fe=o(" only and nothing else: "),X=s("code"),Ie=o("model(input_ids)"),Fe=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"),Be=o("model([input_ids, attention_mask])"),ge=o(" or "),H=s("code"),xe=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 "),u=a(j,"CODE",{});var Ze=r(u);f=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),x=a(T,"P",{});var z=r(x);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);ue=n(L,"a single Tensor with "),D=a(L,"CODE",{});var He=r(D);$e=n(He,"input_ids"),He.forEach(t),fe=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),Fe=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);Be=n(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),ge=n(A," or "),H=a(A,"CODE",{});var Re=r(H);xe=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,u),e(u,f),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,x,j),e(x,je),e(x,G),e(G,me),e(x,qe),e(x,O),e(O,ie),e(x,le),e(x,V),e(V,de),e(x,ze),e(x,S),e(S,Je),e(x,Me),e(x,R),e(R,Ce),e(x,ce),g(T,ae,j),g(T,J,j),e(J,U),e(U,ue),e(U,D),e(D,$e),e(U,fe),e(U,X),e(X,Ie),e(J,Fe),e(J,C),e(C,_e),e(C,Q),e(Q,Be),e(C,ge),e(C,H),e(H,xe),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(x),T&&t(ae),T&&t(J),T&&t(te),T&&t(I)}}}function uX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function fX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Examples:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function gX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function _X(B){let d,y,u,f,b,l,m,E,Ee,we,Z,he,ee,x,je,G,me,qe,O,ie,le,V,de,ze,S,Je,Me,R,Ce,ce,ae,J,U,ue,D,$e,fe,X,Ie,Fe,C,_e,Q,Be,ge,H,xe,se,W,be,Y,Ue,te,I,Ne,P,pe,ye;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),u=s("code"),f=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(),x=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"),ue=o("a single Tensor with "),D=s("code"),$e=o("input_ids"),fe=o(" only and nothing else: "),X=s("code"),Ie=o("model(input_ids)"),Fe=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"),Be=o("model([input_ids, attention_mask])"),ge=o(" or "),H=s("code"),xe=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 "),u=a(j,"CODE",{});var Ze=r(u);f=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),x=a(T,"P",{});var z=r(x);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);ue=n(L,"a single Tensor with "),D=a(L,"CODE",{});var He=r(D);$e=n(He,"input_ids"),He.forEach(t),fe=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),Fe=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);Be=n(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),ge=n(A," or "),H=a(A,"CODE",{});var Re=r(H);xe=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,u),e(u,f),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,x,j),e(x,je),e(x,G),e(G,me),e(x,qe),e(x,O),e(O,ie),e(x,le),e(x,V),e(V,de),e(x,ze),e(x,S),e(S,Je),e(x,Me),e(x,R),e(R,Ce),e(x,ce),g(T,ae,j),g(T,J,j),e(J,U),e(U,ue),e(U,D),e(D,$e),e(U,fe),e(U,X),e(X,Ie),e(J,Fe),e(J,C),e(C,_e),e(C,Q),e(Q,Be),e(C,ge),e(C,H),e(H,xe),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(x),T&&t(ae),T&&t(J),T&&t(te),T&&t(I)}}}function bX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function yX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function TX(B){let d,y;return d=new ve({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(){k(d.$$.fragment)},l(u){v(d.$$.fragment,u)},m(u,f){w(d,u,f),y=!0},p:ke,i(u){y||(M(d.$$.fragment,u),y=!0)},o(u){$(d.$$.fragment,u),y=!1},d(u){F(d,u)}}}function kX(B){let d,y,u,f,b,l,m,E,Ee,we,Z,he,ee,x,je,G,me,qe,O,ie,le,V,de,ze,S,Je,Me,R,Ce,ce,ae,J,U,ue,D,$e,fe,X,Ie,Fe,C,_e,Q,Be,ge,H,xe,se,W,be,Y,Ue,te,I,Ne,P,pe,ye;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),u=s("code"),f=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(),x=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"),ue=o("a single Tensor with "),D=s("code"),$e=o("input_ids"),fe=o(" only and nothing else: "),X=s("code"),Ie=o("model(input_ids)"),Fe=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"),Be=o("model([input_ids, attention_mask])"),ge=o(" or "),H=s("code"),xe=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 "),u=a(j,"CODE",{});var Ze=r(u);f=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),x=a(T,"P",{});var z=r(x);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);ue=n(L,"a single Tensor with "),D=a(L,"CODE",{});var He=r(D);$e=n(He,"input_ids"),He.forEach(t),fe=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),Fe=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);Be=n(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),ge=n(A," or "),H=a(A,"CODE",{});var Re=r(H);xe=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,u),e(u,f),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,x,j),e(x,je),e(x,G),e(G,me),e(x,qe),e(x,O),e(O,ie),e(x,le),e(x,V),e(V,de),e(x,ze),e(x,S),e(S,Je),e(x,Me),e(x,R),e(R,Ce),e(x,ce),g(T,ae,j),g(T,J,j),e(J,U),e(U,ue),e(U,D),e(D,$e),e(U,fe),e(U,X),e(X,Ie),e(J,Fe),e(J,C),e(C,_e),e(C,Q),e(Q,Be),e(C,ge),e(C,H),e(H,xe),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(x),T&&t(ae),T&&t(J),T&&t(te),T&&t(I)}}}function vX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function wX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Examples:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function MX(B){let d,y,u,f,b,l,m,E,Ee,we,Z,he,ee,x,je,G,me,qe,O,ie,le,V,de,ze,S,Je,Me,R,Ce,ce,ae,J,U,ue,D,$e,fe,X,Ie,Fe,C,_e,Q,Be,ge,H,xe,se,W,be,Y,Ue,te,I,Ne,P,pe,ye;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),u=s("code"),f=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(),x=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"),ue=o("a single Tensor with "),D=s("code"),$e=o("input_ids"),fe=o(" only and nothing else: "),X=s("code"),Ie=o("model(input_ids)"),Fe=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"),Be=o("model([input_ids, attention_mask])"),ge=o(" or "),H=s("code"),xe=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 "),u=a(j,"CODE",{});var Ze=r(u);f=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),x=a(T,"P",{});var z=r(x);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);ue=n(L,"a single Tensor with "),D=a(L,"CODE",{});var He=r(D);$e=n(He,"input_ids"),He.forEach(t),fe=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),Fe=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);Be=n(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),ge=n(A," or "),H=a(A,"CODE",{});var Re=r(H);xe=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,u),e(u,f),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,x,j),e(x,je),e(x,G),e(G,me),e(x,qe),e(x,O),e(O,ie),e(x,le),e(x,V),e(V,de),e(x,ze),e(x,S),e(S,Je),e(x,Me),e(x,R),e(R,Ce),e(x,ce),g(T,ae,j),g(T,J,j),e(J,U),e(U,ue),e(U,D),e(D,$e),e(U,fe),e(U,X),e(X,Ie),e(J,Fe),e(J,C),e(C,_e),e(C,Q),e(Q,Be),e(C,ge),e(C,H),e(H,xe),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(x),T&&t(ae),T&&t(J),T&&t(te),T&&t(I)}}}function $X(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function FX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function BX(B){let d,y;return d=new ve({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(){k(d.$$.fragment)},l(u){v(d.$$.fragment,u)},m(u,f){w(d,u,f),y=!0},p:ke,i(u){y||(M(d.$$.fragment,u),y=!0)},o(u){$(d.$$.fragment,u),y=!1},d(u){F(d,u)}}}function xX(B){let d,y,u,f,b,l,m,E,Ee,we,Z,he,ee,x,je,G,me,qe,O,ie,le,V,de,ze,S,Je,Me,R,Ce,ce,ae,J,U,ue,D,$e,fe,X,Ie,Fe,C,_e,Q,Be,ge,H,xe,se,W,be,Y,Ue,te,I,Ne,P,pe,ye;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),u=s("code"),f=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(),x=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"),ue=o("a single Tensor with "),D=s("code"),$e=o("input_ids"),fe=o(" only and nothing else: "),X=s("code"),Ie=o("model(input_ids)"),Fe=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"),Be=o("model([input_ids, attention_mask])"),ge=o(" or "),H=s("code"),xe=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 "),u=a(j,"CODE",{});var Ze=r(u);f=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),x=a(T,"P",{});var z=r(x);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);ue=n(L,"a single Tensor with "),D=a(L,"CODE",{});var He=r(D);$e=n(He,"input_ids"),He.forEach(t),fe=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),Fe=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);Be=n(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),ge=n(A," or "),H=a(A,"CODE",{});var Re=r(H);xe=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,u),e(u,f),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,x,j),e(x,je),e(x,G),e(G,me),e(x,qe),e(x,O),e(O,ie),e(x,le),e(x,V),e(V,de),e(x,ze),e(x,S),e(S,Je),e(x,Me),e(x,R),e(R,Ce),e(x,ce),g(T,ae,j),g(T,J,j),e(J,U),e(U,ue),e(U,D),e(D,$e),e(U,fe),e(U,X),e(X,Ie),e(J,Fe),e(J,C),e(C,_e),e(C,Q),e(Q,Be),e(C,ge),e(C,H),e(H,xe),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(x),T&&t(ae),T&&t(J),T&&t(te),T&&t(I)}}}function EX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function jX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function zX(B){let d,y,u,f,b,l,m,E,Ee,we,Z,he,ee,x,je,G,me,qe,O,ie,le,V,de,ze,S,Je,Me,R,Ce,ce,ae,J,U,ue,D,$e,fe,X,Ie,Fe,C,_e,Q,Be,ge,H,xe,se,W,be,Y,Ue,te,I,Ne,P,pe,ye;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),u=s("code"),f=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(),x=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"),ue=o("a single Tensor with "),D=s("code"),$e=o("input_ids"),fe=o(" only and nothing else: "),X=s("code"),Ie=o("model(input_ids)"),Fe=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"),Be=o("model([input_ids, attention_mask])"),ge=o(" or "),H=s("code"),xe=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 "),u=a(j,"CODE",{});var Ze=r(u);f=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),x=a(T,"P",{});var z=r(x);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);ue=n(L,"a single Tensor with "),D=a(L,"CODE",{});var He=r(D);$e=n(He,"input_ids"),He.forEach(t),fe=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),Fe=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);Be=n(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),ge=n(A," or "),H=a(A,"CODE",{});var Re=r(H);xe=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,u),e(u,f),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,x,j),e(x,je),e(x,G),e(G,me),e(x,qe),e(x,O),e(O,ie),e(x,le),e(x,V),e(V,de),e(x,ze),e(x,S),e(S,Je),e(x,Me),e(x,R),e(R,Ce),e(x,ce),g(T,ae,j),g(T,J,j),e(J,U),e(U,ue),e(U,D),e(D,$e),e(U,fe),e(U,X),e(X,Ie),e(J,Fe),e(J,C),e(C,_e),e(C,Q),e(Q,Be),e(C,ge),e(C,H),e(H,xe),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(x),T&&t(ae),T&&t(J),T&&t(te),T&&t(I)}}}function JX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function CX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function IX(B){let d,y;return d=new ve({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(){k(d.$$.fragment)},l(u){v(d.$$.fragment,u)},m(u,f){w(d,u,f),y=!0},p:ke,i(u){y||(M(d.$$.fragment,u),y=!0)},o(u){$(d.$$.fragment,u),y=!1},d(u){F(d,u)}}}function UX(B){let d,y,u,f,b,l,m,E,Ee,we,Z,he,ee,x,je,G,me,qe,O,ie,le,V,de,ze,S,Je,Me,R,Ce,ce,ae,J,U,ue,D,$e,fe,X,Ie,Fe,C,_e,Q,Be,ge,H,xe,se,W,be,Y,Ue,te,I,Ne,P,pe,ye;return{c(){d=s("p"),y=o("TensorFlow models and layers in "),u=s("code"),f=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(),x=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"),ue=o("a single Tensor with "),D=s("code"),$e=o("input_ids"),fe=o(" only and nothing else: "),X=s("code"),Ie=o("model(input_ids)"),Fe=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"),Be=o("model([input_ids, attention_mask])"),ge=o(" or "),H=s("code"),xe=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 "),u=a(j,"CODE",{});var Ze=r(u);f=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),x=a(T,"P",{});var z=r(x);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);ue=n(L,"a single Tensor with "),D=a(L,"CODE",{});var He=r(D);$e=n(He,"input_ids"),He.forEach(t),fe=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),Fe=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);Be=n(Ye,"model([input_ids, attention_mask])"),Ye.forEach(t),ge=n(A," or "),H=a(A,"CODE",{});var Re=r(H);xe=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,u),e(u,f),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,x,j),e(x,je),e(x,G),e(G,me),e(x,qe),e(x,O),e(O,ie),e(x,le),e(x,V),e(V,de),e(x,ze),e(x,S),e(S,Je),e(x,Me),e(x,R),e(R,Ce),e(x,ce),g(T,ae,j),g(T,J,j),e(J,U),e(U,ue),e(U,D),e(D,$e),e(U,fe),e(U,X),e(X,Ie),e(J,Fe),e(J,C),e(C,_e),e(C,Q),e(Q,Be),e(C,ge),e(C,H),e(H,xe),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(x),T&&t(ae),T&&t(J),T&&t(te),T&&t(I)}}}function NX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function PX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function WX(B){let d,y;return d=new ve({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(){k(d.$$.fragment)},l(u){v(d.$$.fragment,u)},m(u,f){w(d,u,f),y=!0},p:ke,i(u){y||(M(d.$$.fragment,u),y=!0)},o(u){$(d.$$.fragment,u),y=!1},d(u){F(d,u)}}}function qX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function AX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function ZX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function RX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function GX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function VX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function SX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function XX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function LX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function OX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function DX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function QX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function HX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function YX(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function KX(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function e8(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function t8(B){let d,y,u,f,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 "),u=s("code"),f=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 "),u=a(m,"CODE",{});var E=r(u);f=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,u),e(u,f),e(d,b)},d(l){l&&t(d)}}}function o8(B){let d,y,u,f,b;return f=new ve({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:"),u=c(),k(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ke,i(l){b||(M(f.$$.fragment,l),b=!0)},o(l){$(f.$$.fragment,l),b=!1},d(l){l&&t(d),l&&t(u),F(f,l)}}}function n8(B){let d,y,u,f,b,l,m,E,Ee,we,Z,he,ee,x,je,G,me,qe,O,ie,le,V,de,ze,S,Je,Me,R,Ce,ce,ae,J,U,ue,D,$e,fe,X,Ie,Fe,C,_e,Q,Be,ge,H,xe,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,Jk,Nn,aa,rg,Ai,MM,ig,$M,Ck,Rm,FM,Ik,Zi,Uk,tt,Ri,BM,Gi,xM,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,Nk,ol,Pk,ft,nl,p2,sl,h2,m2,u2,Pn,f2,al,g2,_2,rl,b2,y2,T2,Ko,Lm,k2,v2,il,w2,M2,ll,$2,F2,B2,en,Om,x2,E2,dl,j2,z2,cl,J2,C2,I2,ra,Dm,U2,N2,pl,P2,W2,q2,Qm,hl,A2,Z2,R2,dg,Hm,G2,Wk,ml,qk,Wt,tn,Ym,V2,S2,ul,X2,L2,fl,O2,D2,Q2,on,Km,H2,Y2,gl,K2,e0,_l,t0,o0,n0,nn,eu,s0,a0,bl,r0,i0,yl,l0,d0,c0,tu,Tl,p0,h0,m0,cg,ou,u0,Ak,kl,Zk,qt,sn,nu,f0,g0,vl,_0,b0,wl,y0,T0,k0,an,su,v0,w0,Ml,M0,$0,$l,F0,B0,x0,ia,au,E0,j0,Fl,z0,J0,C0,ru,Bl,I0,U0,N0,pg,iu,P0,Rk,lu,hg,W0,Gk,rn,ln,du,q0,A0,xl,Z0,R0,El,G0,V0,S0,dn,cu,X0,L0,jl,O0,D0,zl,Q0,H0,Y0,mg,pu,K0,Vk,Jl,e$,ug,t$,Sk,la,Cl,o$,Il,n$,s$,a$,Ul,r$,Nl,i$,l$,Xk,Pl,d$,fg,c$,Lk,hu,Wl,p$,ql,h$,m$,Ok,Al,u$,gg,f$,Dk,Ft,Zl,g$,Rl,_$,b$,y$,Gl,T$,Vl,k$,v$,w$,Sl,M$,Xl,$$,F$,B$,Ll,x$,Ol,E$,j$,z$,Dl,J$,Ql,C$,I$,U$,Hl,N$,Yl,P$,W$,Qk,Wn,da,_g,Kl,q$,bg,A$,Hk,so,ed,Z$,Wo,R$,mu,G$,V$,uu,S$,X$,td,L$,O$,D$,qn,Q$,fu,H$,Y$,gu,K$,eF,tF,ca,Yk,An,pa,yg,od,oF,Tg,nF,Kk,ot,nd,sF,kg,aF,rF,sd,iF,_u,lF,dF,cF,cn,ad,pF,vg,hF,mF,rd,bu,uF,wg,fF,gF,yu,_F,Mg,bF,yF,ha,id,TF,ld,kF,$g,vF,wF,MF,ao,dd,$F,Fg,FF,BF,ma,xF,Zn,EF,Bg,jF,zF,xg,JF,CF,IF,Tu,cd,ev,Rn,ua,Eg,pd,UF,jg,NF,tv,xt,hd,PF,md,WF,zg,qF,AF,ZF,ud,RF,ku,GF,VF,SF,pn,fd,XF,Jg,LF,OF,gd,vu,DF,Cg,QF,HF,wu,YF,Ig,KF,eB,ro,_d,tB,Ug,oB,nB,fa,sB,Gn,aB,Ng,rB,iB,Pg,lB,dB,ov,Vn,ga,Wg,bd,cB,qg,pB,nv,Et,yd,hB,Sn,mB,Ag,uB,fB,Zg,gB,_B,bB,Td,yB,Rg,TB,kB,vB,hn,kd,wB,vd,MB,Gg,$B,FB,BB,_a,xB,mn,wd,EB,Xn,jB,Vg,zB,JB,Sg,CB,IB,UB,ba,sv,Ln,ya,Xg,Md,NB,Lg,PB,av,On,$d,WB,Fd,qB,Mu,AB,ZB,rv,Dn,Bd,RB,xd,GB,$u,VB,SB,iv,qo,Ed,XB,jd,LB,Fu,OB,DB,QB,Ta,zd,HB,Og,YB,lv,Qn,ka,Dg,Jd,KB,Qg,ex,dv,nt,Cd,tx,Hg,ox,nx,Id,sx,Bu,ax,rx,ix,Ud,lx,Nd,dx,cx,px,Pd,hx,Wd,mx,ux,fx,gt,gx,Yg,_x,bx,Kg,yx,Tx,e_,kx,vx,t_,wx,Mx,o_,$x,Fx,n_,Bx,xx,Ex,io,qd,jx,Hn,zx,xu,Jx,Cx,s_,Ix,Ux,Nx,va,Px,wa,cv,Yn,Ma,a_,Ad,Wx,r_,qx,pv,jt,Zd,Ax,Kn,Zx,i_,Rx,Gx,l_,Vx,Sx,Xx,Rd,Lx,Eu,Ox,Dx,Qx,Gd,Hx,Vd,Yx,Kx,eE,lo,Sd,tE,es,oE,ju,nE,sE,d_,aE,rE,iE,$a,lE,Fa,hv,ts,Ba,c_,Xd,dE,p_,cE,mv,zt,Ld,pE,Od,hE,h_,mE,uE,fE,Dd,gE,zu,_E,bE,yE,Qd,TE,Hd,kE,vE,wE,co,Yd,ME,os,$E,Ju,FE,BE,m_,xE,EE,jE,xa,zE,Ea,uv,ns,ja,u_,Kd,JE,f_,CE,fv,Jt,ec,IE,tc,UE,g_,NE,PE,WE,oc,qE,Cu,AE,ZE,RE,nc,GE,sc,VE,SE,XE,po,ac,LE,ss,OE,Iu,DE,QE,__,HE,YE,KE,za,ej,Ja,gv,as,Ca,b_,rc,tj,y_,oj,_v,Ct,ic,nj,lc,sj,T_,aj,rj,ij,dc,lj,Uu,dj,cj,pj,cc,hj,pc,mj,uj,fj,ho,hc,gj,rs,_j,Nu,bj,yj,k_,Tj,kj,vj,Ia,wj,Ua,bv,is,Na,v_,mc,Mj,w_,$j,yv,It,uc,Fj,M_,Bj,xj,fc,Ej,Pu,jj,zj,Jj,gc,Cj,_c,Ij,Uj,Nj,At,bc,Pj,ls,Wj,Wu,qj,Aj,$_,Zj,Rj,Gj,Pa,Vj,Wa,Sj,qa,Tv,ds,Aa,F_,yc,Xj,B_,Lj,kv,Ut,Tc,Oj,x_,Dj,Qj,kc,Hj,qu,Yj,Kj,ez,vc,tz,wc,oz,nz,sz,mo,Mc,az,cs,rz,Au,iz,lz,E_,dz,cz,pz,Za,hz,Ra,vv,ps,Ga,j_,$c,mz,z_,uz,wv,Nt,Fc,fz,J_,gz,_z,Bc,bz,Zu,yz,Tz,kz,xc,vz,Ec,wz,Mz,$z,uo,jc,Fz,hs,Bz,Ru,xz,Ez,C_,jz,zz,Jz,Va,Cz,Sa,Mv,ms,Xa,I_,zc,Iz,U_,Uz,$v,Pt,Jc,Nz,us,Pz,N_,Wz,qz,P_,Az,Zz,Rz,Cc,Gz,Gu,Vz,Sz,Xz,Ic,Lz,Uc,Oz,Dz,Qz,fo,Nc,Hz,fs,Yz,Vu,Kz,eJ,W_,tJ,oJ,nJ,La,sJ,Oa,Fv,gs,Da,q_,Pc,aJ,A_,rJ,Bv,_t,Wc,iJ,Z_,lJ,dJ,qc,cJ,Su,pJ,hJ,mJ,Ac,uJ,Zc,fJ,gJ,_J,Qa,bJ,go,Rc,yJ,_s,TJ,Xu,kJ,vJ,R_,wJ,MJ,$J,Ha,FJ,Ya,xv,bs,Ka,G_,Gc,BJ,V_,xJ,Ev,bt,Vc,EJ,ys,jJ,S_,zJ,JJ,X_,CJ,IJ,UJ,Sc,NJ,Lu,PJ,WJ,qJ,Xc,AJ,Lc,ZJ,RJ,GJ,er,VJ,_o,Oc,SJ,Ts,XJ,Ou,LJ,OJ,L_,DJ,QJ,HJ,tr,YJ,or,jv,ks,nr,O_,Dc,KJ,D_,eC,zv,vs,Qc,tC,Zt,Hc,oC,st,nC,Q_,sC,aC,H_,rC,iC,Y_,lC,dC,K_,cC,pC,eb,hC,mC,tb,uC,fC,ob,gC,_C,bC,Yc,Kc,yC,nb,TC,kC,vC,ep,wC,sb,MC,$C,FC,ne,BC,ab,xC,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,ub,XC,LC,fb,OC,DC,gb,QC,HC,_b,YC,KC,bb,eI,tI,yb,oI,nI,Tb,sI,aI,kb,rI,iI,vb,lI,dI,wb,cI,pI,Mb,hI,mI,uI,sr,Jv,ws,ar,$b,tp,fI,Fb,gI,Cv,yt,op,_I,np,bI,Bb,yI,TI,kI,sp,vI,Du,wI,MI,$I,ap,FI,rp,BI,xI,EI,rr,jI,Rt,ip,zI,Ms,JI,Qu,CI,II,xb,UI,NI,PI,ir,WI,lr,qI,dr,Iv,$s,cr,Eb,lp,AI,jb,ZI,Uv,Tt,dp,RI,cp,GI,zb,VI,SI,XI,pp,LI,Hu,OI,DI,QI,hp,HI,mp,YI,KI,e4,pr,t4,bo,up,o4,Fs,n4,Yu,s4,a4,Jb,r4,i4,l4,hr,d4,mr,Nv,Bs,ur,Cb,fp,c4,Ib,p4,Pv,kt,gp,h4,Ub,m4,u4,_p,f4,Ku,g4,_4,b4,bp,y4,yp,T4,k4,v4,fr,w4,Gt,Tp,M4,xs,$4,ef,F4,B4,Nb,x4,E4,j4,gr,z4,_r,J4,br,Wv,Es,yr,Pb,kp,C4,Wb,I4,qv,vt,vp,U4,qb,N4,P4,wp,W4,tf,q4,A4,Z4,Mp,R4,$p,G4,V4,S4,Tr,X4,yo,Fp,L4,js,O4,of,D4,Q4,Ab,H4,Y4,K4,kr,e5,vr,Av,zs,wr,Zb,Bp,t5,Rb,o5,Zv,wt,xp,n5,Gb,s5,a5,Ep,r5,nf,i5,l5,d5,jp,c5,zp,p5,h5,m5,Mr,u5,Vt,Jp,f5,Js,g5,sf,_5,b5,Vb,y5,T5,k5,$r,v5,Fr,w5,Br,Rv,Cs,xr,Sb,Cp,M5,Xb,$5,Gv,Mt,Ip,F5,Is,B5,Lb,x5,E5,Ob,j5,z5,J5,Up,C5,af,I5,U5,N5,Np,P5,Pp,W5,q5,A5,Er,Z5,St,Wp,R5,Us,G5,rf,V5,S5,Db,X5,L5,O5,jr,D5,zr,Q5,Jr,Vv,Ns,Cr,Qb,qp,H5,Hb,Y5,Sv,at,Ap,K5,Yb,e3,t3,Zp,o3,lf,n3,s3,a3,Rp,r3,Gp,i3,l3,d3,Kb,c3,p3,Ao,ey,Vp,h3,m3,ty,Sp,u3,f3,oy,Xp,g3,_3,ny,Lp,b3,y3,To,Op,T3,Ps,k3,sy,v3,w3,ay,M3,$3,F3,Ir,B3,Ur,Xv,Ws,Nr,ry,Dp,x3,iy,E3,Lv,rt,Qp,j3,qs,z3,ly,J3,C3,dy,I3,U3,N3,Hp,P3,df,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,uy,nh,K3,eU,ko,sh,tU,As,oU,fy,nU,sU,gy,aU,rU,iU,Pr,lU,Wr,Ov,Zs,qr,_y,ah,dU,by,cU,Dv,it,rh,pU,yy,hU,mU,ih,uU,cf,fU,gU,_U,lh,bU,dh,yU,TU,kU,Ty,vU,wU,Ro,ky,ch,MU,$U,vy,ph,FU,BU,wy,hh,xU,EU,My,mh,jU,zU,vo,uh,JU,Rs,CU,$y,IU,UU,Fy,NU,PU,WU,Ar,qU,Zr,Qv,Gs,Rr,By,fh,AU,xy,ZU,Hv,lt,gh,RU,_h,GU,Ey,VU,SU,XU,bh,LU,pf,OU,DU,QU,yh,HU,Th,YU,KU,eN,jy,tN,oN,Go,zy,kh,nN,sN,Jy,vh,aN,rN,Cy,wh,iN,lN,Iy,Mh,dN,cN,wo,$h,pN,Vs,hN,Uy,mN,uN,Ny,fN,gN,_N,Gr,bN,Vr,Yv,Ss,Sr,Py,Fh,yN,Wy,TN,Kv,dt,Bh,kN,xh,vN,qy,wN,MN,$N,Eh,FN,hf,BN,xN,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,mf,s9,a9,r9,Ah,i9,Zh,l9,d9,c9,Qy,p9,h9,So,Hy,Rh,m9,u9,Yy,Gh,f9,g9,Ky,Vh,_9,b9,eT,Sh,y9,T9,$o,Xh,k9,Os,v9,tT,w9,M9,oT,$9,F9,B9,Dr,x9,Qr,ow,Ds,Hr,nT,Lh,E9,sT,j9,nw,pt,Oh,z9,aT,J9,C9,Dh,I9,uf,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,Fo,om,Y9,Qs,K9,pT,eP,tP,hT,oP,nP,sP,Yr,aP,Kr,sw,Hs,ei,mT,nm,rP,uT,iP,aw,ht,sm,lP,fT,dP,cP,am,pP,ff,hP,mP,uP,rm,fP,im,gP,_P,bP,gT,yP,TP,Lo,_T,lm,kP,vP,bT,dm,wP,MP,yT,cm,$P,FP,TT,pm,BP,xP,Bo,hm,EP,Ys,jP,kT,zP,JP,vT,CP,IP,UP,ti,NP,oi,rw,Ks,ni,wT,mm,PP,MT,WP,iw,mt,um,qP,ea,AP,$T,ZP,RP,FT,GP,VP,SP,fm,XP,gf,LP,OP,DP,gm,QP,_m,HP,YP,KP,BT,eW,tW,Oo,xT,bm,oW,nW,ET,ym,sW,aW,jT,Tm,rW,iW,zT,km,lW,dW,xo,vm,cW,ta,pW,JT,hW,mW,CT,uW,fW,gW,si,_W,ai,lw;return l=new We({}),de=new We({}),Ai=new We({}),Zi=new vM({props:{pipeline:"text-classification"}}),ol=new vM({props:{pipeline:"token-classification"}}),ml=new vM({props:{pipeline:"fill-mask"}}),kl=new vM({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:B}}}),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#L269",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#L294",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#L322",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:B}}}),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#L351"}}),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"}}),fd=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>
`}}),fa=new Te({props:{anchor:"transformers.BertTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[RS]},$$scope:{ctx:B}}}),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"}}),kd=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:B}}}),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:B}}}),Md=new We({}),$d=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"}}),Bd=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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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>
`}}),va=new Ae({props:{$$slots:{default:[SS]},$$scope:{ctx:B}}}),wa=new Te({props:{anchor:"transformers.BertModel.forward.example",$$slots:{default:[XS]},$$scope:{ctx:B}}}),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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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>
`}}),$a=new Ae({props:{$$slots:{default:[LS]},$$scope:{ctx:B}}}),Fa=new Te({props:{anchor:"transformers.BertForPreTraining.forward.example",$$slots:{default:[OS]},$$scope:{ctx:B}}}),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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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>
`}}),xa=new Ae({props:{$$slots:{default:[DS]},$$scope:{ctx:B}}}),Ea=new Te({props:{anchor:"transformers.BertLMHeadModel.forward.example",$$slots:{default:[QS]},$$scope:{ctx:B}}}),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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:B}}}),Ja=new Te({props:{anchor:"transformers.BertForMaskedLM.forward.example",$$slots:{default:[YS]},$$scope:{ctx:B}}}),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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:B}}}),Ua=new Te({props:{anchor:"transformers.BertForNextSentencePrediction.forward.example",$$slots:{default:[eX]},$$scope:{ctx:B}}}),mc=new We({}),uc=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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:B}}}),Wa=new Te({props:{anchor:"transformers.BertForSequenceClassification.forward.example",$$slots:{default:[oX]},$$scope:{ctx:B}}}),qa=new Te({props:{anchor:"transformers.BertForSequenceClassification.forward.example-2",$$slots:{default:[nX]},$$scope:{ctx:B}}}),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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:B}}}),Ra=new Te({props:{anchor:"transformers.BertForMultipleChoice.forward.example",$$slots:{default:[aX]},$$scope:{ctx:B}}}),$c=new We({}),Fc=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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:B}}}),Sa=new Te({props:{anchor:"transformers.BertForTokenClassification.forward.example",$$slots:{default:[iX]},$$scope:{ctx:B}}}),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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:B}}}),Oa=new Te({props:{anchor:"transformers.BertForQuestionAnswering.forward.example",$$slots:{default:[dX]},$$scope:{ctx:B}}}),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:B}}}),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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:B}}}),Ya=new Te({props:{anchor:"transformers.TFBertModel.call.example",$$slots:{default:[hX]},$$scope:{ctx:B}}}),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:B}}}),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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:[uX]},$$scope:{ctx:B}}}),or=new Te({props:{anchor:"transformers.TFBertForPreTraining.call.example",$$slots:{default:[fX]},$$scope:{ctx:B}}}),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:B}}}),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:B}}}),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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:B}}}),lr=new Te({props:{anchor:"transformers.TFBertForMaskedLM.call.example",$$slots:{default:[yX]},$$scope:{ctx:B}}}),dr=new Te({props:{anchor:"transformers.TFBertForMaskedLM.call.example-2",$$slots:{default:[TX]},$$scope:{ctx:B}}}),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:[kX]},$$scope:{ctx:B}}}),up=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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:[vX]},$$scope:{ctx:B}}}),mr=new Te({props:{anchor:"transformers.TFBertForNextSentencePrediction.call.example",$$slots:{default:[wX]},$$scope:{ctx:B}}}),fp=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"}}),fr=new Ae({props:{$$slots:{default:[MX]},$$scope:{ctx:B}}}),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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:[$X]},$$scope:{ctx:B}}}),_r=new Te({props:{anchor:"transformers.TFBertForSequenceClassification.call.example",$$slots:{default:[FX]},$$scope:{ctx:B}}}),br=new Te({props:{anchor:"transformers.TFBertForSequenceClassification.call.example-2",$$slots:{default:[BX]},$$scope:{ctx:B}}}),kp=new We({}),vp=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:[xX]},$$scope:{ctx:B}}}),Fp=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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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>
`}}),kr=new Ae({props:{$$slots:{default:[EX]},$$scope:{ctx:B}}}),vr=new Te({props:{anchor:"transformers.TFBertForMultipleChoice.call.example",$$slots:{default:[jX]},$$scope:{ctx:B}}}),Bp=new We({}),xp=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:B}}}),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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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>
`}}),$r=new Ae({props:{$$slots:{default:[JX]},$$scope:{ctx:B}}}),Fr=new Te({props:{anchor:"transformers.TFBertForTokenClassification.call.example",$$slots:{default:[CX]},$$scope:{ctx:B}}}),Br=new Te({props:{anchor:"transformers.TFBertForTokenClassification.call.example-2",$$slots:{default:[IX]},$$scope:{ctx:B}}}),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:B}}}),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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:B}}}),zr=new Te({props:{anchor:"transformers.TFBertForQuestionAnswering.call.example",$$slots:{default:[PX]},$$scope:{ctx:B}}}),Jr=new Te({props:{anchor:"transformers.TFBertForQuestionAnswering.call.example-2",$$slots:{default:[WX]},$$scope:{ctx:B}}}),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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:B}}}),Ur=new Te({props:{anchor:"transformers.FlaxBertModel.__call__.example",$$slots:{default:[AX]},$$scope:{ctx:B}}}),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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:B}}}),Wr=new Te({props:{anchor:"transformers.FlaxBertForPreTraining.__call__.example",$$slots:{default:[RX]},$$scope:{ctx:B}}}),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"}}),uh=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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:B}}}),Zr=new Te({props:{anchor:"transformers.FlaxBertForCausalLM.__call__.example",$$slots:{default:[VX]},$$scope:{ctx:B}}}),fh=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"}}),$h=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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:B}}}),Vr=new Te({props:{anchor:"transformers.FlaxBertForMaskedLM.__call__.example",$$slots:{default:[XX]},$$scope:{ctx:B}}}),Fh=new We({}),Bh=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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:B}}}),Lr=new Te({props:{anchor:"transformers.FlaxBertForNextSentencePrediction.__call__.example",$$slots:{default:[OX]},$$scope:{ctx:B}}}),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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:B}}}),Qr=new Te({props:{anchor:"transformers.FlaxBertForSequenceClassification.__call__.example",$$slots:{default:[QX]},$$scope:{ctx:B}}}),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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:B}}}),Kr=new Te({props:{anchor:"transformers.FlaxBertForMultipleChoice.__call__.example",$$slots:{default:[YX]},$$scope:{ctx:B}}}),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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:B}}}),oi=new Te({props:{anchor:"transformers.FlaxBertForTokenClassification.__call__.example",$$slots:{default:[e8]},$$scope:{ctx:B}}}),mm=new We({}),um=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"}}),vm=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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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:B}}}),ai=new Te({props:{anchor:"transformers.FlaxBertForQuestionAnswering.__call__.example",$$slots:{default:[o8]},$$scope:{ctx:B}}}),{c(){d=s("meta"),y=c(),u=s("h1"),f=s("a"),b=s("span"),k(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"),k(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(),ue=s("p"),D=o("The abstract from the paper is the following:"),$e=c(),fe=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.`),Fe=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).`),Be=c(),ge=s("p"),H=o("Tips:"),xe=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("."),Jk=c(),Nn=s("h2"),aa=s("a"),rg=s("span"),k(Ai.$$.fragment),MM=c(),ig=s("span"),$M=o("Resources"),Ck=c(),Rm=s("p"),FM=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."),Ik=c(),k(Zi.$$.fragment),Uk=c(),tt=s("ul"),Ri=s("li"),BM=o("A blog post on "),Gi=s("a"),xM=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"),Nk=c(),k(ol.$$.fragment),Pk=c(),ft=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("."),u2=c(),Pn=s("li"),f2=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"),k2=o("BertForTokenClassification"),v2=o(" is supported by this "),il=s("a"),w2=o("example script"),M2=o(" and "),ll=s("a"),$2=o("notebook"),F2=o("."),B2=c(),en=s("li"),Om=s("a"),x2=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"),Wk=c(),k(ml.$$.fragment),qk=c(),Wt=s("ul"),tn=s("li"),Ym=s("a"),V2=o("BertForMaskedLM"),S2=o(" is supported by this "),ul=s("a"),X2=o("example script"),L2=o(" and "),fl=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"),eu=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(),tu=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"),ou=s("a"),u0=o("Masked language modeling task guide"),Ak=c(),k(kl.$$.fragment),Zk=c(),qt=s("ul"),sn=s("li"),nu=s("a"),f0=o("BertForQuestionAnswering"),g0=o(" is supported by this "),vl=s("a"),_0=o("example script"),b0=o(" and "),wl=s("a"),y0=o("notebook"),T0=o("."),k0=c(),an=s("li"),su=s("a"),v0=o("TFBertForQuestionAnswering"),w0=o(" is supported by this "),Ml=s("a"),M0=o("example script"),$0=o(" and "),$l=s("a"),F0=o("notebook"),B0=o("."),x0=c(),ia=s("li"),au=s("a"),E0=o("FlaxBertForQuestionAnswering"),j0=o(" is supported by this "),Fl=s("a"),z0=o("example script"),J0=o("."),C0=c(),ru=s("li"),Bl=s("a"),I0=o("Question answering"),U0=o(" chapter of the \u{1F917} Hugging Face Course."),N0=c(),pg=s("li"),iu=s("a"),P0=o("Question answering task guide"),Rk=c(),lu=s("p"),hg=s("strong"),W0=o("Multiple choice"),Gk=c(),rn=s("ul"),ln=s("li"),du=s("a"),q0=o("BertForMultipleChoice"),A0=o(" is supported by this "),xl=s("a"),Z0=o("example script"),R0=o(" and "),El=s("a"),G0=o("notebook"),V0=o("."),S0=c(),dn=s("li"),cu=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"),pu=s("a"),K0=o("Multiple choice task guide"),Vk=c(),Jl=s("p"),e$=o("\u26A1\uFE0F "),ug=s("strong"),t$=o("Inference"),Sk=c(),la=s("ul"),Cl=s("li"),o$=o("A blog post on how to "),Il=s("a"),n$=o("Accelerate BERT inference with Hugging Face Transformers and AWS Inferentia"),s$=o("."),a$=c(),Ul=s("li"),r$=o("A blog post on how to "),Nl=s("a"),i$=o("Accelerate BERT inference with DeepSpeed-Inference on GPUs"),l$=o("."),Xk=c(),Pl=s("p"),d$=o("\u2699\uFE0F "),fg=s("strong"),c$=o("Pretraining"),Lk=c(),hu=s("ul"),Wl=s("li"),p$=o("A blog post on "),ql=s("a"),h$=o("Pre-Training BERT with Hugging Face Transformers and Habana Gaudi"),m$=o("."),Ok=c(),Al=s("p"),u$=o("\u{1F680} "),gg=s("strong"),f$=o("Deploy"),Dk=c(),Ft=s("ul"),Zl=s("li"),g$=o("A blog post on how to "),Rl=s("a"),_$=o("Convert Transformers to ONNX with Hugging Face Optimum"),b$=o("."),y$=c(),Gl=s("li"),T$=o("A blog post on how to "),Vl=s("a"),k$=o("Setup Deep Learning environment for Hugging Face Transformers with Habana Gaudi on AWS"),v$=o("."),w$=c(),Sl=s("li"),M$=o("A blog post on "),Xl=s("a"),$$=o("Autoscaling BERT with Hugging Face Transformers, Amazon SageMaker and Terraform module"),F$=o("."),B$=c(),Ll=s("li"),x$=o("A blog post on "),Ol=s("a"),E$=o("Serverless BERT with HuggingFace, AWS Lambda, and Docker"),j$=o("."),z$=c(),Dl=s("li"),J$=o("A blog post on "),Ql=s("a"),C$=o("Hugging Face Transformers BERT fine-tuning using Amazon SageMaker and Training Compiler"),I$=o("."),U$=c(),Hl=s("li"),N$=o("A blog post on "),Yl=s("a"),P$=o("Task-specific knowledge distillation for BERT using Transformers & Amazon SageMaker"),W$=o("."),Qk=c(),Wn=s("h2"),da=s("a"),_g=s("span"),k(Kl.$$.fragment),q$=c(),bg=s("span"),A$=o("BertConfig"),Hk=c(),so=s("div"),k(ed.$$.fragment),Z$=c(),Wo=s("p"),R$=o("This is the configuration class to store the configuration of a "),mu=s("a"),G$=o("BertModel"),V$=o(" or a "),uu=s("a"),S$=o("TFBertModel"),X$=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"),L$=o("bert-base-uncased"),O$=o(" architecture."),D$=c(),qn=s("p"),Q$=o("Configuration objects inherit from "),fu=s("a"),H$=o("PretrainedConfig"),Y$=o(` and can be used to control the model outputs. Read the
documentation from `),gu=s("a"),K$=o("PretrainedConfig"),eF=o(" for more information."),tF=c(),k(ca.$$.fragment),Yk=c(),An=s("h2"),pa=s("a"),yg=s("span"),k(od.$$.fragment),oF=c(),Tg=s("span"),nF=o("BertTokenizer"),Kk=c(),ot=s("div"),k(nd.$$.fragment),sF=c(),kg=s("p"),aF=o("Construct a BERT tokenizer. Based on WordPiece."),rF=c(),sd=s("p"),iF=o("This tokenizer inherits from "),_u=s("a"),lF=o("PreTrainedTokenizer"),dF=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),cF=c(),cn=s("div"),k(ad.$$.fragment),pF=c(),vg=s("p"),hF=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:`),mF=c(),rd=s("ul"),bu=s("li"),uF=o("single sequence: "),wg=s("code"),fF=o("[CLS] X [SEP]"),gF=c(),yu=s("li"),_F=o("pair of sequences: "),Mg=s("code"),bF=o("[CLS] A [SEP] B [SEP]"),yF=c(),ha=s("div"),k(id.$$.fragment),TF=c(),ld=s("p"),kF=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 `),$g=s("code"),vF=o("prepare_for_model"),wF=o(" method."),MF=c(),ao=s("div"),k(dd.$$.fragment),$F=c(),Fg=s("p"),FF=o("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A BERT sequence"),BF=c(),k(ma.$$.fragment),xF=c(),Zn=s("p"),EF=o("If "),Bg=s("code"),jF=o("token_ids_1"),zF=o(" is "),xg=s("code"),JF=o("None"),CF=o(", this method only returns the first portion of the mask (0s)."),IF=c(),Tu=s("div"),k(cd.$$.fragment),ev=c(),Rn=s("h2"),ua=s("a"),Eg=s("span"),k(pd.$$.fragment),UF=c(),jg=s("span"),NF=o("BertTokenizerFast"),tv=c(),xt=s("div"),k(hd.$$.fragment),PF=c(),md=s("p"),WF=o("Construct a \u201Cfast\u201D BERT tokenizer (backed by HuggingFace\u2019s "),zg=s("em"),qF=o("tokenizers"),AF=o(" library). Based on WordPiece."),ZF=c(),ud=s("p"),RF=o("This tokenizer inherits from "),ku=s("a"),GF=o("PreTrainedTokenizerFast"),VF=o(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),SF=c(),pn=s("div"),k(fd.$$.fragment),XF=c(),Jg=s("p"),LF=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:`),OF=c(),gd=s("ul"),vu=s("li"),DF=o("single sequence: "),Cg=s("code"),QF=o("[CLS] X [SEP]"),HF=c(),wu=s("li"),YF=o("pair of sequences: "),Ig=s("code"),KF=o("[CLS] A [SEP] B [SEP]"),eB=c(),ro=s("div"),k(_d.$$.fragment),tB=c(),Ug=s("p"),oB=o("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A BERT sequence"),nB=c(),k(fa.$$.fragment),sB=c(),Gn=s("p"),aB=o("If "),Ng=s("code"),rB=o("token_ids_1"),iB=o(" is "),Pg=s("code"),lB=o("None"),dB=o(", this method only returns the first portion of the mask (0s)."),ov=c(),Vn=s("h2"),ga=s("a"),Wg=s("span"),k(bd.$$.fragment),cB=c(),qg=s("span"),pB=o("TFBertTokenizer"),nv=c(),Et=s("div"),k(yd.$$.fragment),hB=c(),Sn=s("p"),mB=o(`This is an in-graph tokenizer for BERT. It should be initialized similarly to other tokenizers, using the
`),Ag=s("code"),uB=o("from_pretrained()"),fB=o(" method. It can also be initialized with the "),Zg=s("code"),gB=o("from_tokenizer()"),_B=o(` method, which imports settings
from an existing standard tokenizer object.`),bB=c(),Td=s("p"),yB=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"),TB=o("tf.string"),kB=o(" inputs to outputs."),vB=c(),hn=s("div"),k(kd.$$.fragment),wB=c(),vd=s("p"),MB=o("Instantiate a "),Gg=s("code"),$B=o("TFBertTokenizer"),FB=o(" from a pre-trained tokenizer."),BB=c(),k(_a.$$.fragment),xB=c(),mn=s("div"),k(wd.$$.fragment),EB=c(),Xn=s("p"),jB=o("Initialize a "),Vg=s("code"),zB=o("TFBertTokenizer"),JB=o(" from an existing "),Sg=s("code"),CB=o("Tokenizer"),IB=o("."),UB=c(),k(ba.$$.fragment),sv=c(),Ln=s("h2"),ya=s("a"),Xg=s("span"),k(Md.$$.fragment),NB=c(),Lg=s("span"),PB=o("Bert specific outputs"),av=c(),On=s("div"),k($d.$$.fragment),WB=c(),Fd=s("p"),qB=o("Output type of "),Mu=s("a"),AB=o("BertForPreTraining"),ZB=o("."),rv=c(),Dn=s("div"),k(Bd.$$.fragment),RB=c(),xd=s("p"),GB=o("Output type of "),$u=s("a"),VB=o("TFBertForPreTraining"),SB=o("."),iv=c(),qo=s("div"),k(Ed.$$.fragment),XB=c(),jd=s("p"),LB=o("Output type of "),Fu=s("a"),OB=o("BertForPreTraining"),DB=o("."),QB=c(),Ta=s("div"),k(zd.$$.fragment),HB=c(),Og=s("p"),YB=o("\u201CReturns a new object replacing the specified fields with new values."),lv=c(),Qn=s("h2"),ka=s("a"),Dg=s("span"),k(Jd.$$.fragment),KB=c(),Qg=s("span"),ex=o("BertModel"),dv=c(),nt=s("div"),k(Cd.$$.fragment),tx=c(),Hg=s("p"),ox=o("The bare Bert Model transformer outputting raw hidden-states without any specific head on top."),nx=c(),Id=s("p"),sx=o("This model inherits from "),Bu=s("a"),ax=o("PreTrainedModel"),rx=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.)`),ix=c(),Ud=s("p"),lx=o("This model is also a PyTorch "),Nd=s("a"),dx=o("torch.nn.Module"),cx=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),px=c(),Pd=s("p"),hx=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"),mx=o(`Attention is
all you need`),ux=o(` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),fx=c(),gt=s("p"),gx=o("To behave as an decoder the model needs to be initialized with the "),Yg=s("code"),_x=o("is_decoder"),bx=o(` argument of the configuration set
to `),Kg=s("code"),yx=o("True"),Tx=o(". To be used in a Seq2Seq model, the model needs to initialized with both "),e_=s("code"),kx=o("is_decoder"),vx=o(` argument and
`),t_=s("code"),wx=o("add_cross_attention"),Mx=o(" set to "),o_=s("code"),$x=o("True"),Fx=o("; an "),n_=s("code"),Bx=o("encoder_hidden_states"),xx=o(" is then expected as an input to the forward pass."),Ex=c(),io=s("div"),k(qd.$$.fragment),jx=c(),Hn=s("p"),zx=o("The "),xu=s("a"),Jx=o("BertModel"),Cx=o(" forward method, overrides the "),s_=s("code"),Ix=o("__call__"),Ux=o(" special method."),Nx=c(),k(va.$$.fragment),Px=c(),k(wa.$$.fragment),cv=c(),Yn=s("h2"),Ma=s("a"),a_=s("span"),k(Ad.$$.fragment),Wx=c(),r_=s("span"),qx=o("BertForPreTraining"),pv=c(),jt=s("div"),k(Zd.$$.fragment),Ax=c(),Kn=s("p"),Zx=o("Bert Model with two heads on top as done during the pretraining: a "),i_=s("code"),Rx=o("masked language modeling"),Gx=o(" head and a "),l_=s("code"),Vx=o("next sentence prediction (classification)"),Sx=o(" head."),Xx=c(),Rd=s("p"),Lx=o("This model inherits from "),Eu=s("a"),Ox=o("PreTrainedModel"),Dx=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.)`),Qx=c(),Gd=s("p"),Hx=o("This model is also a PyTorch "),Vd=s("a"),Yx=o("torch.nn.Module"),Kx=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"),k(Sd.$$.fragment),tE=c(),es=s("p"),oE=o("The "),ju=s("a"),nE=o("BertForPreTraining"),sE=o(" forward method, overrides the "),d_=s("code"),aE=o("__call__"),rE=o(" special method."),iE=c(),k($a.$$.fragment),lE=c(),k(Fa.$$.fragment),hv=c(),ts=s("h2"),Ba=s("a"),c_=s("span"),k(Xd.$$.fragment),dE=c(),p_=s("span"),cE=o("BertLMHeadModel"),mv=c(),zt=s("div"),k(Ld.$$.fragment),pE=c(),Od=s("p"),hE=o("Bert Model with a "),h_=s("code"),mE=o("language modeling"),uE=o(" head on top for CLM fine-tuning."),fE=c(),Dd=s("p"),gE=o("This model inherits from "),zu=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"),kE=o("torch.nn.Module"),vE=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"),k(Yd.$$.fragment),ME=c(),os=s("p"),$E=o("The "),Ju=s("a"),FE=o("BertLMHeadModel"),BE=o(" forward method, overrides the "),m_=s("code"),xE=o("__call__"),EE=o(" special method."),jE=c(),k(xa.$$.fragment),zE=c(),k(Ea.$$.fragment),uv=c(),ns=s("h2"),ja=s("a"),u_=s("span"),k(Kd.$$.fragment),JE=c(),f_=s("span"),CE=o("BertForMaskedLM"),fv=c(),Jt=s("div"),k(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 "),Cu=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"),k(ac.$$.fragment),LE=c(),ss=s("p"),OE=o("The "),Iu=s("a"),DE=o("BertForMaskedLM"),QE=o(" forward method, overrides the "),__=s("code"),HE=o("__call__"),YE=o(" special method."),KE=c(),k(za.$$.fragment),ej=c(),k(Ja.$$.fragment),gv=c(),as=s("h2"),Ca=s("a"),b_=s("span"),k(rc.$$.fragment),tj=c(),y_=s("span"),oj=o("BertForNextSentencePrediction"),_v=c(),Ct=s("div"),k(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 "),Uu=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"),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.`),fj=c(),ho=s("div"),k(hc.$$.fragment),gj=c(),rs=s("p"),_j=o("The "),Nu=s("a"),bj=o("BertForNextSentencePrediction"),yj=o(" forward method, overrides the "),k_=s("code"),Tj=o("__call__"),kj=o(" special method."),vj=c(),k(Ia.$$.fragment),wj=c(),k(Ua.$$.fragment),bv=c(),is=s("h2"),Na=s("a"),v_=s("span"),k(mc.$$.fragment),Mj=c(),w_=s("span"),$j=o("BertForSequenceClassification"),yv=c(),It=s("div"),k(uc.$$.fragment),Fj=c(),M_=s("p"),Bj=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.`),xj=c(),fc=s("p"),Ej=o("This model inherits from "),Pu=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"),k(bc.$$.fragment),Pj=c(),ls=s("p"),Wj=o("The "),Wu=s("a"),qj=o("BertForSequenceClassification"),Aj=o(" forward method, overrides the "),$_=s("code"),Zj=o("__call__"),Rj=o(" special method."),Gj=c(),k(Pa.$$.fragment),Vj=c(),k(Wa.$$.fragment),Sj=c(),k(qa.$$.fragment),Tv=c(),ds=s("h2"),Aa=s("a"),F_=s("span"),k(yc.$$.fragment),Xj=c(),B_=s("span"),Lj=o("BertForMultipleChoice"),kv=c(),Ut=s("div"),k(Tc.$$.fragment),Oj=c(),x_=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(),kc=s("p"),Hj=o("This model inherits from "),qu=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(),vc=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"),k(Mc.$$.fragment),az=c(),cs=s("p"),rz=o("The "),Au=s("a"),iz=o("BertForMultipleChoice"),lz=o(" forward method, overrides the "),E_=s("code"),dz=o("__call__"),cz=o(" special method."),pz=c(),k(Za.$$.fragment),hz=c(),k(Ra.$$.fragment),vv=c(),ps=s("h2"),Ga=s("a"),j_=s("span"),k($c.$$.fragment),mz=c(),z_=s("span"),uz=o("BertForTokenClassification"),wv=c(),Nt=s("div"),k(Fc.$$.fragment),fz=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(),Bc=s("p"),bz=o("This model inherits from "),Zu=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.)`),kz=c(),xc=s("p"),vz=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.`),$z=c(),uo=s("div"),k(jc.$$.fragment),Fz=c(),hs=s("p"),Bz=o("The "),Ru=s("a"),xz=o("BertForTokenClassification"),Ez=o(" forward method, overrides the "),C_=s("code"),jz=o("__call__"),zz=o(" special method."),Jz=c(),k(Va.$$.fragment),Cz=c(),k(Sa.$$.fragment),Mv=c(),ms=s("h2"),Xa=s("a"),I_=s("span"),k(zc.$$.fragment),Iz=c(),U_=s("span"),Uz=o("BertForQuestionAnswering"),$v=c(),Pt=s("div"),k(Jc.$$.fragment),Nz=c(),us=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 "),Gu=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(),fo=s("div"),k(Nc.$$.fragment),Hz=c(),fs=s("p"),Yz=o("The "),Vu=s("a"),Kz=o("BertForQuestionAnswering"),eJ=o(" forward method, overrides the "),W_=s("code"),tJ=o("__call__"),oJ=o(" special method."),nJ=c(),k(La.$$.fragment),sJ=c(),k(Oa.$$.fragment),Fv=c(),gs=s("h2"),Da=s("a"),q_=s("span"),k(Pc.$$.fragment),aJ=c(),A_=s("span"),rJ=o("TFBertModel"),Bv=c(),_t=s("div"),k(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 "),Su=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"),uJ=o("This model is also a "),Zc=s("a"),fJ=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(),k(Qa.$$.fragment),bJ=c(),go=s("div"),k(Rc.$$.fragment),yJ=c(),_s=s("p"),TJ=o("The "),Xu=s("a"),kJ=o("TFBertModel"),vJ=o(" forward method, overrides the "),R_=s("code"),wJ=o("__call__"),MJ=o(" special method."),$J=c(),k(Ha.$$.fragment),FJ=c(),k(Ya.$$.fragment),xv=c(),bs=s("h2"),Ka=s("a"),G_=s("span"),k(Gc.$$.fragment),BJ=c(),V_=s("span"),xJ=o("TFBertForPreTraining"),Ev=c(),bt=s("div"),k(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 "),Lu=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(),k(er.$$.fragment),VJ=c(),_o=s("div"),k(Oc.$$.fragment),SJ=c(),Ts=s("p"),XJ=o("The "),Ou=s("a"),LJ=o("TFBertForPreTraining"),OJ=o(" forward method, overrides the "),L_=s("code"),DJ=o("__call__"),QJ=o(" special method."),HJ=c(),k(tr.$$.fragment),YJ=c(),k(or.$$.fragment),jv=c(),ks=s("h2"),nr=s("a"),O_=s("span"),k(Dc.$$.fragment),KJ=c(),D_=s("span"),eC=o("TFBertModelLMHeadModel"),zv=c(),vs=s("div"),k(Qc.$$.fragment),tC=c(),Zt=s("div"),k(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"),uC=o("optional"),fC=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"),kC=o(","),vC=c(),ep=s("li"),wC=o("0 for tokens that are "),sb=s("strong"),MC=o("masked"),$C=o("."),FC=c(),ne=s("p"),BC=o("past_key_values ("),ab=s("code"),xC=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 "),ub=s("code"),XC=o("True"),LC=o(`):
If set to `),fb=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 "),kb=s("code"),rI=o("np.ndarray"),iI=o(" of shape "),vb=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("."),uI=c(),k(sr.$$.fragment),Jv=c(),ws=s("h2"),ar=s("a"),$b=s("span"),k(tp.$$.fragment),fI=c(),Fb=s("span"),gI=o("TFBertForMaskedLM"),Cv=c(),yt=s("div"),k(op.$$.fragment),_I=c(),np=s("p"),bI=o("Bert Model with a "),Bb=s("code"),yI=o("language modeling"),TI=o(" head on top."),kI=c(),sp=s("p"),vI=o("This model inherits from "),Du=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.)`),$I=c(),ap=s("p"),FI=o("This model is also a "),rp=s("a"),BI=o("tf.keras.Model"),xI=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(),k(rr.$$.fragment),jI=c(),Rt=s("div"),k(ip.$$.fragment),zI=c(),Ms=s("p"),JI=o("The "),Qu=s("a"),CI=o("TFBertForMaskedLM"),II=o(" forward method, overrides the "),xb=s("code"),UI=o("__call__"),NI=o(" special method."),PI=c(),k(ir.$$.fragment),WI=c(),k(lr.$$.fragment),qI=c(),k(dr.$$.fragment),Iv=c(),$s=s("h2"),cr=s("a"),Eb=s("span"),k(lp.$$.fragment),AI=c(),jb=s("span"),ZI=o("TFBertForNextSentencePrediction"),Uv=c(),Tt=s("div"),k(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 "),Hu=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(),k(pr.$$.fragment),t4=c(),bo=s("div"),k(up.$$.fragment),o4=c(),Fs=s("p"),n4=o("The "),Yu=s("a"),s4=o("TFBertForNextSentencePrediction"),a4=o(" forward method, overrides the "),Jb=s("code"),r4=o("__call__"),i4=o(" special method."),l4=c(),k(hr.$$.fragment),d4=c(),k(mr.$$.fragment),Nv=c(),Bs=s("h2"),ur=s("a"),Cb=s("span"),k(fp.$$.fragment),c4=c(),Ib=s("span"),p4=o("TFBertForSequenceClassification"),Pv=c(),kt=s("div"),k(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.`),u4=c(),_p=s("p"),f4=o("This model inherits from "),Ku=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"),k4=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.`),v4=c(),k(fr.$$.fragment),w4=c(),Gt=s("div"),k(Tp.$$.fragment),M4=c(),xs=s("p"),$4=o("The "),ef=s("a"),F4=o("TFBertForSequenceClassification"),B4=o(" forward method, overrides the "),Nb=s("code"),x4=o("__call__"),E4=o(" special method."),j4=c(),k(gr.$$.fragment),z4=c(),k(_r.$$.fragment),J4=c(),k(br.$$.fragment),Wv=c(),Es=s("h2"),yr=s("a"),Pb=s("span"),k(kp.$$.fragment),C4=c(),Wb=s("span"),I4=o("TFBertForMultipleChoice"),qv=c(),vt=s("div"),k(vp.$$.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 "),tf=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 "),$p=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(),k(Tr.$$.fragment),X4=c(),yo=s("div"),k(Fp.$$.fragment),L4=c(),js=s("p"),O4=o("The "),of=s("a"),D4=o("TFBertForMultipleChoice"),Q4=o(" forward method, overrides the "),Ab=s("code"),H4=o("__call__"),Y4=o(" special method."),K4=c(),k(kr.$$.fragment),e5=c(),k(vr.$$.fragment),Av=c(),zs=s("h2"),wr=s("a"),Zb=s("span"),k(Bp.$$.fragment),t5=c(),Rb=s("span"),o5=o("TFBertForTokenClassification"),Zv=c(),wt=s("div"),k(xp.$$.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 "),nf=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(),k(Mr.$$.fragment),u5=c(),Vt=s("div"),k(Jp.$$.fragment),f5=c(),Js=s("p"),g5=o("The "),sf=s("a"),_5=o("TFBertForTokenClassification"),b5=o(" forward method, overrides the "),Vb=s("code"),y5=o("__call__"),T5=o(" special method."),k5=c(),k($r.$$.fragment),v5=c(),k(Fr.$$.fragment),w5=c(),k(Br.$$.fragment),Rv=c(),Cs=s("h2"),xr=s("a"),Sb=s("span"),k(Cp.$$.fragment),M5=c(),Xb=s("span"),$5=o("TFBertForQuestionAnswering"),Gv=c(),Mt=s("div"),k(Ip.$$.fragment),F5=c(),Is=s("p"),B5=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"),x5=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 "),af=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(),k(Er.$$.fragment),Z5=c(),St=s("div"),k(Wp.$$.fragment),R5=c(),Us=s("p"),G5=o("The "),rf=s("a"),V5=o("TFBertForQuestionAnswering"),S5=o(" forward method, overrides the "),Db=s("code"),X5=o("__call__"),L5=o(" special method."),O5=c(),k(jr.$$.fragment),D5=c(),k(zr.$$.fragment),Q5=c(),k(Jr.$$.fragment),Vv=c(),Ns=s("h2"),Cr=s("a"),Qb=s("span"),k(qp.$$.fragment),H5=c(),Hb=s("span"),Y5=o("FlaxBertModel"),Sv=c(),at=s("div"),k(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 "),lf=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"),u3=o("Automatic Differentiation"),f3=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"),k(Op.$$.fragment),T3=c(),Ps=s("p"),k3=o("The "),sy=s("code"),v3=o("FlaxBertPreTrainedModel"),w3=o(" forward method, overrides the "),ay=s("code"),M3=o("__call__"),$3=o(" special method."),F3=c(),k(Ir.$$.fragment),B3=c(),k(Ur.$$.fragment),Xv=c(),Ws=s("h2"),Nr=s("a"),ry=s("span"),k(Dp.$$.fragment),x3=c(),iy=s("span"),E3=o("FlaxBertForPreTraining"),Lv=c(),rt=s("div"),k(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 "),df=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(),uy=s("li"),nh=s("a"),K3=o("Parallelization"),eU=c(),ko=s("div"),k(sh.$$.fragment),tU=c(),As=s("p"),oU=o("The "),fy=s("code"),nU=o("FlaxBertPreTrainedModel"),sU=o(" forward method, overrides the "),gy=s("code"),aU=o("__call__"),rU=o(" special method."),iU=c(),k(Pr.$$.fragment),lU=c(),k(Wr.$$.fragment),Ov=c(),Zs=s("h2"),qr=s("a"),_y=s("span"),k(ah.$$.fragment),dU=c(),by=s("span"),cU=o("FlaxBertForCausalLM"),Dv=c(),it=s("div"),k(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"),uU=o("This model inherits from "),cf=s("a"),fU=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.`),kU=c(),Ty=s("p"),vU=o("Finally, this model supports inherent JAX features such as:"),wU=c(),Ro=s("ul"),ky=s("li"),ch=s("a"),MU=o("Just-In-Time (JIT) compilation"),$U=c(),vy=s("li"),ph=s("a"),FU=o("Automatic Differentiation"),BU=c(),wy=s("li"),hh=s("a"),xU=o("Vectorization"),EU=c(),My=s("li"),mh=s("a"),jU=o("Parallelization"),zU=c(),vo=s("div"),k(uh.$$.fragment),JU=c(),Rs=s("p"),CU=o("The "),$y=s("code"),IU=o("FlaxBertPreTrainedModel"),UU=o(" forward method, overrides the "),Fy=s("code"),NU=o("__call__"),PU=o(" special method."),WU=c(),k(Ar.$$.fragment),qU=c(),k(Zr.$$.fragment),Qv=c(),Gs=s("h2"),Rr=s("a"),By=s("span"),k(fh.$$.fragment),AU=c(),xy=s("span"),ZU=o("FlaxBertForMaskedLM"),Hv=c(),lt=s("div"),k(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 "),pf=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"),kh=s("a"),nN=o("Just-In-Time (JIT) compilation"),sN=c(),Jy=s("li"),vh=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"),k($h.$$.fragment),pN=c(),Vs=s("p"),hN=o("The "),Uy=s("code"),mN=o("FlaxBertPreTrainedModel"),uN=o(" forward method, overrides the "),Ny=s("code"),fN=o("__call__"),gN=o(" special method."),_N=c(),k(Gr.$$.fragment),bN=c(),k(Vr.$$.fragment),Yv=c(),Ss=s("h2"),Sr=s("a"),Py=s("span"),k(Fh.$$.fragment),yN=c(),Wy=s("span"),TN=o("FlaxBertForNextSentencePrediction"),Kv=c(),dt=s("div"),k(Bh.$$.fragment),kN=c(),xh=s("p"),vN=o("Bert Model with a "),qy=s("code"),wN=o("next sentence prediction (classification)"),MN=o(" head on top."),$N=c(),Eh=s("p"),FN=o("This model inherits from "),hf=s("a"),BN=o("FlaxPreTrainedModel"),xN=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"),k(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(),k(Xr.$$.fragment),HN=c(),k(Lr.$$.fragment),ew=c(),Ls=s("h2"),Or=s("a"),Ly=s("span"),k(Ph.$$.fragment),YN=c(),Oy=s("span"),KN=o("FlaxBertForSequenceClassification"),tw=c(),ct=s("div"),k(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 "),mf=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"),u9=c(),Yy=s("li"),Gh=s("a"),f9=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(),$o=s("div"),k(Xh.$$.fragment),k9=c(),Os=s("p"),v9=o("The "),tT=s("code"),w9=o("FlaxBertPreTrainedModel"),M9=o(" forward method, overrides the "),oT=s("code"),$9=o("__call__"),F9=o(" special method."),B9=c(),k(Dr.$$.fragment),x9=c(),k(Qr.$$.fragment),ow=c(),Ds=s("h2"),Hr=s("a"),nT=s("span"),k(Lh.$$.fragment),E9=c(),sT=s("span"),j9=o("FlaxBertForMultipleChoice"),nw=c(),pt=s("div"),k(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 "),uf=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(),Fo=s("div"),k(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(),k(Yr.$$.fragment),aP=c(),k(Kr.$$.fragment),sw=c(),Hs=s("h2"),ei=s("a"),mT=s("span"),k(nm.$$.fragment),rP=c(),uT=s("span"),iP=o("FlaxBertForTokenClassification"),aw=c(),ht=s("div"),k(sm.$$.fragment),lP=c(),fT=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 "),ff=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)`),uP=c(),rm=s("p"),fP=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"),kP=o("Just-In-Time (JIT) compilation"),vP=c(),bT=s("li"),dm=s("a"),wP=o("Automatic Differentiation"),MP=c(),yT=s("li"),cm=s("a"),$P=o("Vectorization"),FP=c(),TT=s("li"),pm=s("a"),BP=o("Parallelization"),xP=c(),Bo=s("div"),k(hm.$$.fragment),EP=c(),Ys=s("p"),jP=o("The "),kT=s("code"),zP=o("FlaxBertPreTrainedModel"),JP=o(" forward method, overrides the "),vT=s("code"),CP=o("__call__"),IP=o(" special method."),UP=c(),k(ti.$$.fragment),NP=c(),k(oi.$$.fragment),rw=c(),Ks=s("h2"),ni=s("a"),wT=s("span"),k(mm.$$.fragment),PP=c(),MT=s("span"),WP=o("FlaxBertForQuestionAnswering"),iw=c(),mt=s("div"),k(um.$$.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 `),$T=s("code"),ZP=o("span start logits"),RP=o(" and "),FT=s("code"),GP=o("span end logits"),VP=o(")."),SP=c(),fm=s("p"),XP=o("This model inherits from "),gf=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(),BT=s("p"),eW=o("Finally, this model supports inherent JAX features such as:"),tW=c(),Oo=s("ul"),xT=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"),km=s("a"),lW=o("Parallelization"),dW=c(),xo=s("div"),k(vm.$$.fragment),cW=c(),ta=s("p"),pW=o("The "),JT=s("code"),hW=o("FlaxBertPreTrainedModel"),mW=o(" forward method, overrides the "),CT=s("code"),uW=o("__call__"),fW=o(" special method."),gW=c(),k(si.$$.fragment),_W=c(),k(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),u=a(i,"H1",{class:!0});var wm=r(u);f=a(wm,"A",{id:!0,class:!0,href:!0});var IT=r(f);b=a(IT,"SPAN",{});var UT=r(b);v(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 $m=r(ie);le=a($m,"A",{id:!0,class:!0,href:!0});var qT=r(le);V=a(qT,"SPAN",{});var AT=r(V);v(de.$$.fragment,AT),AT.forEach(t),qT.forEach(t),ze=p($m),S=a($m,"SPAN",{});var ZT=r(S);Je=n(ZT,"Overview"),ZT.forEach(t),$m.forEach(t),Me=p(i),R=a(i,"P",{});var Fm=r(R);Ce=n(Fm,"The BERT model was proposed in "),ce=a(Fm,"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(Fm,` 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.`),Fm.forEach(t),U=p(i),ue=a(i,"P",{});var GT=r(ue);D=n(GT,"The abstract from the paper is the following:"),GT.forEach(t),$e=p(i),fe=a(i,"P",{});var VT=r(fe);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),Fe=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),Be=p(i),ge=a(i,"P",{});var OT=r(ge);H=n(OT,"Tips:"),OT.forEach(t),xe=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 Bm=r(pe);ye=a(Bm,"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(Bm),Ze=a(Bm,"UL",{});var oa=r(Ze);oe=a(oa,"LI",{});var ek=r(oe);Se=n(ek,"a special mask token with probability 0.8"),ek.forEach(t),Xe=p(oa),z=a(oa,"LI",{});var tk=r(z);Le=n(tk,"a random token different from the one masked with probability 0.1"),tk.forEach(t),Oe=p(oa),Ge=a(oa,"LI",{});var ok=r(Ge);De=n(ok,"the same token with probability 0.1"),ok.forEach(t),oa.forEach(t),Bm.forEach(t),Qe=p(Do),q=a(Do,"LI",{});var nk=r(q);L=a(nk,"P",{});var sk=r(L);He=n(sk,"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."),sk.forEach(t),nk.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 ak=r(Re);Pe=n(ak,"thomwolf"),ak.forEach(t),Ke=n(na,". The original code can be found "),K=a(na,"A",{href:!0,rel:!0});var rk=r(K);et=n(rk,"here"),rk.forEach(t),wM=n(na,"."),na.forEach(t),Jk=p(i),Nn=a(i,"H2",{class:!0});var xm=r(Nn);aa=a(xm,"A",{id:!0,class:!0,href:!0});var ik=r(aa);rg=a(ik,"SPAN",{});var lk=r(rg);v(Ai.$$.fragment,lk),lk.forEach(t),ik.forEach(t),MM=p(xm),ig=a(xm,"SPAN",{});var dk=r(ig);$M=n(dk,"Resources"),dk.forEach(t),xm.forEach(t),Ck=p(i),Rm=a(i,"P",{});var ck=r(Rm);FM=n(ck,"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."),ck.forEach(t),Ik=p(i),v(Zi.$$.fragment,i),Uk=p(i),tt=a(i,"UL",{});var ut=r(tt);Ri=a(ut,"LI",{});var Em=r(Ri);BM=n(Em,"A blog post on "),Gi=a(Em,"A",{href:!0,rel:!0});var pk=r(Gi);xM=n(pk,"BERT Text Classification in a different language"),pk.forEach(t),EM=n(Em,"."),Em.forEach(t),jM=p(ut),Vi=a(ut,"LI",{});var jm=r(Vi);zM=n(jm,"A notebook for "),Si=a(jm,"A",{href:!0,rel:!0});var hk=r(Si);JM=n(hk,"Finetuning BERT (and friends) for multi-label text classification"),hk.forEach(t),CM=n(jm,"."),jm.forEach(t),IM=p(ut),Xi=a(ut,"LI",{});var zm=r(Xi);UM=n(zm,"A notebook on how to "),Li=a(zm,"A",{href:!0,rel:!0});var mk=r(Li);NM=n(mk,"Finetune BERT for multi-label classification using PyTorch"),mk.forEach(t),PM=n(zm,". \u{1F30E}"),zm.forEach(t),WM=p(ut),Oi=a(ut,"LI",{});var Jm=r(Oi);qM=n(Jm,"A notebook on how to "),Di=a(Jm,"A",{href:!0,rel:!0});var uk=r(Di);AM=n(uk,"warm-start an EncoderDecoder model with BERT for summarization"),uk.forEach(t),ZM=n(Jm,"."),Jm.forEach(t),RM=p(ut),Qo=a(ut,"LI",{});var un=r(Qo);Gm=a(un,"A",{href:!0});var fk=r(Gm);GM=n(fk,"BertForSequenceClassification"),fk.forEach(t),VM=n(un," is supported by this "),Qi=a(un,"A",{href:!0,rel:!0});var gk=r(Qi);SM=n(gk,"example script"),gk.forEach(t),XM=n(un," and "),Hi=a(un,"A",{href:!0,rel:!0});var _k=r(Hi);LM=n(_k,"notebook"),_k.forEach(t),OM=n(un,"."),un.forEach(t),DM=p(ut),Ho=a(ut,"LI",{});var fn=r(Ho);Vm=a(fn,"A",{href:!0});var bk=r(Vm);QM=n(bk,"TFBertForSequenceClassification"),bk.forEach(t),HM=n(fn," is supported by this "),Yi=a(fn,"A",{href:!0,rel:!0});var yk=r(Yi);YM=n(yk,"example script"),yk.forEach(t),KM=n(fn," and "),Ki=a(fn,"A",{href:!0,rel:!0});var Tk=r(Ki);e2=n(Tk,"notebook"),Tk.forEach(t),t2=n(fn,"."),fn.forEach(t),o2=p(ut),Yo=a(ut,"LI",{});var gn=r(Yo);Sm=a(gn,"A",{href:!0});var kk=r(Sm);n2=n(kk,"FlaxBertForSequenceClassification"),kk.forEach(t),s2=n(gn," is supported by this "),el=a(gn,"A",{href:!0,rel:!0});var vk=r(el);a2=n(vk,"example script"),vk.forEach(t),r2=n(gn," and "),tl=a(gn,"A",{href:!0,rel:!0});var wk=r(tl);i2=n(wk,"notebook"),wk.forEach(t),l2=n(gn,"."),gn.forEach(t),d2=p(ut),lg=a(ut,"LI",{});var Mk=r(lg);Xm=a(Mk,"A",{href:!0});var $k=r(Xm);c2=n($k,"Text classification task guide"),$k.forEach(t),Mk.forEach(t),ut.forEach(t),Nk=p(i),v(ol.$$.fragment,i),Pk=p(i),ft=a(i,"UL",{});var $t=r(ft);nl=a($t,"LI",{});var Cm=r(nl);p2=n(Cm,"A blog post on how to use "),sl=a(Cm,"A",{href:!0,rel:!0});var Fk=r(sl);h2=n(Fk,"Hugging Face Transformers with Keras: Fine-tune a non-English BERT for Named Entity Recognition"),Fk.forEach(t),m2=n(Cm,"."),Cm.forEach(t),u2=p($t),Pn=a($t,"LI",{});var sa=r(Pn);f2=n(sa,"A notebook for "),al=a(sa,"A",{href:!0,rel:!0});var Bk=r(al);g2=n(Bk,"Finetuning BERT for named-entity recognition"),Bk.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 xk=r(rl);b2=n(xk,"version"),xk.forEach(t),y2=n(sa," of the notebook instead."),sa.forEach(t),T2=p($t),Ko=a($t,"LI",{});var _n=r(Ko);Lm=a(_n,"A",{href:!0});var Ek=r(Lm);k2=n(Ek,"BertForTokenClassification"),Ek.forEach(t),v2=n(_n," is supported by this "),il=a(_n,"A",{href:!0,rel:!0});var xW=r(il);w2=n(xW,"example script"),xW.forEach(t),M2=n(_n," and "),ll=a(_n,"A",{href:!0,rel:!0});var EW=r(ll);$2=n(EW,"notebook"),EW.forEach(t),F2=n(_n,"."),_n.forEach(t),B2=p($t),en=a($t,"LI",{});var Im=r(en);Om=a(Im,"A",{href:!0});var jW=r(Om);x2=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($t),ra=a($t,"LI",{});var jk=r(ra);Dm=a(jk,"A",{href:!0});var CW=r(Dm);U2=n(CW,"FlaxBertForTokenClassification"),CW.forEach(t),N2=n(jk," is supported by this "),pl=a(jk,"A",{href:!0,rel:!0});var IW=r(pl);P2=n(IW,"example script"),IW.forEach(t),W2=n(jk,"."),jk.forEach(t),q2=p($t),Qm=a($t,"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($t),dg=a($t,"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),$t.forEach(t),Wk=p(i),v(ml.$$.fragment,i),qk=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 "),ul=a(Um,"A",{href:!0,rel:!0});var qW=r(ul);X2=n(qW,"example script"),qW.forEach(t),L2=n(Um," and "),fl=a(Um,"A",{href:!0,rel:!0});var AW=r(fl);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);eu=a(Pm,"A",{href:!0});var VW=r(eu);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),tu=a(bn,"LI",{});var yW=r(tu);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);ou=a(OW,"A",{href:!0});var DW=r(ou);u0=n(DW,"Masked language modeling task guide"),DW.forEach(t),OW.forEach(t),bn.forEach(t),Ak=p(i),v(kl.$$.fragment,i),Zk=p(i),qt=a(i,"UL",{});var yn=r(qt);sn=a(yn,"LI",{});var Wm=r(sn);nu=a(Wm,"A",{href:!0});var QW=r(nu);f0=n(QW,"BertForQuestionAnswering"),QW.forEach(t),g0=n(Wm," is supported by this "),vl=a(Wm,"A",{href:!0,rel:!0});var HW=r(vl);_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),k0=p(yn),an=a(yn,"LI",{});var qm=r(an);su=a(qm,"A",{href:!0});var KW=r(su);v0=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),$0=n(qm," and "),$l=a(qm,"A",{href:!0,rel:!0});var tq=r($l);F0=n(tq,"notebook"),tq.forEach(t),B0=n(qm,"."),qm.forEach(t),x0=p(yn),ia=a(yn,"LI",{});var zk=r(ia);au=a(zk,"A",{href:!0});var oq=r(au);E0=n(oq,"FlaxBertForQuestionAnswering"),oq.forEach(t),j0=n(zk," is supported by this "),Fl=a(zk,"A",{href:!0,rel:!0});var nq=r(Fl);z0=n(nq,"example script"),nq.forEach(t),J0=n(zk,"."),zk.forEach(t),C0=p(yn),ru=a(yn,"LI",{});var TW=r(ru);Bl=a(TW,"A",{href:!0,rel:!0});var sq=r(Bl);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);iu=a(aq,"A",{href:!0});var rq=r(iu);P0=n(rq,"Question answering task guide"),rq.forEach(t),aq.forEach(t),yn.forEach(t),Rk=p(i),lu=a(i,"P",{});var iq=r(lu);hg=a(iq,"STRONG",{});var lq=r(hg);W0=n(lq,"Multiple choice"),lq.forEach(t),iq.forEach(t),Gk=p(i),rn=a(i,"UL",{});var _f=r(rn);ln=a(_f,"LI",{});var Am=r(ln);du=a(Am,"A",{href:!0});var dq=r(du);q0=n(dq,"BertForMultipleChoice"),dq.forEach(t),A0=n(Am," is supported by this "),xl=a(Am,"A",{href:!0,rel:!0});var cq=r(xl);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(_f),dn=a(_f,"LI",{});var Zm=r(dn);cu=a(Zm,"A",{href:!0});var hq=r(cu);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 uq=r(zl);Q0=n(uq,"notebook"),uq.forEach(t),H0=n(Zm,"."),Zm.forEach(t),Y0=p(_f),mg=a(_f,"LI",{});var fq=r(mg);pu=a(fq,"A",{href:!0});var gq=r(pu);K0=n(gq,"Multiple choice task guide"),gq.forEach(t),fq.forEach(t),_f.forEach(t),Vk=p(i),Jl=a(i,"P",{});var kW=r(Jl);e$=n(kW,"\u26A1\uFE0F "),ug=a(kW,"STRONG",{});var _q=r(ug);t$=n(_q,"Inference"),_q.forEach(t),kW.forEach(t),Sk=p(i),la=a(i,"UL",{});var dw=r(la);Cl=a(dw,"LI",{});var cw=r(Cl);o$=n(cw,"A blog post on how to "),Il=a(cw,"A",{href:!0,rel:!0});var bq=r(Il);n$=n(bq,"Accelerate BERT inference with Hugging Face Transformers and AWS Inferentia"),bq.forEach(t),s$=n(cw,"."),cw.forEach(t),a$=p(dw),Ul=a(dw,"LI",{});var pw=r(Ul);r$=n(pw,"A blog post on how to "),Nl=a(pw,"A",{href:!0,rel:!0});var yq=r(Nl);i$=n(yq,"Accelerate BERT inference with DeepSpeed-Inference on GPUs"),yq.forEach(t),l$=n(pw,"."),pw.forEach(t),dw.forEach(t),Xk=p(i),Pl=a(i,"P",{});var vW=r(Pl);d$=n(vW,"\u2699\uFE0F "),fg=a(vW,"STRONG",{});var Tq=r(fg);c$=n(Tq,"Pretraining"),Tq.forEach(t),vW.forEach(t),Lk=p(i),hu=a(i,"UL",{});var kq=r(hu);Wl=a(kq,"LI",{});var hw=r(Wl);p$=n(hw,"A blog post on "),ql=a(hw,"A",{href:!0,rel:!0});var vq=r(ql);h$=n(vq,"Pre-Training BERT with Hugging Face Transformers and Habana Gaudi"),vq.forEach(t),m$=n(hw,"."),hw.forEach(t),kq.forEach(t),Ok=p(i),Al=a(i,"P",{});var wW=r(Al);u$=n(wW,"\u{1F680} "),gg=a(wW,"STRONG",{});var wq=r(gg);f$=n(wq,"Deploy"),wq.forEach(t),wW.forEach(t),Dk=p(i),Ft=a(i,"UL",{});var Eo=r(Ft);Zl=a(Eo,"LI",{});var mw=r(Zl);g$=n(mw,"A blog post on how to "),Rl=a(mw,"A",{href:!0,rel:!0});var Mq=r(Rl);_$=n(Mq,"Convert Transformers to ONNX with Hugging Face Optimum"),Mq.forEach(t),b$=n(mw,"."),mw.forEach(t),y$=p(Eo),Gl=a(Eo,"LI",{});var uw=r(Gl);T$=n(uw,"A blog post on how to "),Vl=a(uw,"A",{href:!0,rel:!0});var $q=r(Vl);k$=n($q,"Setup Deep Learning environment for Hugging Face Transformers with Habana Gaudi on AWS"),$q.forEach(t),v$=n(uw,"."),uw.forEach(t),w$=p(Eo),Sl=a(Eo,"LI",{});var fw=r(Sl);M$=n(fw,"A blog post on "),Xl=a(fw,"A",{href:!0,rel:!0});var Fq=r(Xl);$$=n(Fq,"Autoscaling BERT with Hugging Face Transformers, Amazon SageMaker and Terraform module"),Fq.forEach(t),F$=n(fw,"."),fw.forEach(t),B$=p(Eo),Ll=a(Eo,"LI",{});var gw=r(Ll);x$=n(gw,"A blog post on "),Ol=a(gw,"A",{href:!0,rel:!0});var Bq=r(Ol);E$=n(Bq,"Serverless BERT with HuggingFace, AWS Lambda, and Docker"),Bq.forEach(t),j$=n(gw,"."),gw.forEach(t),z$=p(Eo),Dl=a(Eo,"LI",{});var _w=r(Dl);J$=n(_w,"A blog post on "),Ql=a(_w,"A",{href:!0,rel:!0});var xq=r(Ql);C$=n(xq,"Hugging Face Transformers BERT fine-tuning using Amazon SageMaker and Training Compiler"),xq.forEach(t),I$=n(_w,"."),_w.forEach(t),U$=p(Eo),Hl=a(Eo,"LI",{});var bw=r(Hl);N$=n(bw,"A blog post on "),Yl=a(bw,"A",{href:!0,rel:!0});var Eq=r(Yl);P$=n(Eq,"Task-specific knowledge distillation for BERT using Transformers & Amazon SageMaker"),Eq.forEach(t),W$=n(bw,"."),bw.forEach(t),Eo.forEach(t),Qk=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);v(Kl.$$.fragment,zq),zq.forEach(t),jq.forEach(t),q$=p(yw),bg=a(yw,"SPAN",{});var Jq=r(bg);A$=n(Jq,"BertConfig"),Jq.forEach(t),yw.forEach(t),Hk=p(i),so=a(i,"DIV",{class:!0});var ri=r(so);v(ed.$$.fragment,ri),Z$=p(ri),Wo=a(ri,"P",{});var ii=r(Wo);R$=n(ii,"This is the configuration class to store the configuration of a "),mu=a(ii,"A",{href:!0});var Cq=r(mu);G$=n(Cq,"BertModel"),Cq.forEach(t),V$=n(ii," or a "),uu=a(ii,"A",{href:!0});var Iq=r(uu);S$=n(Iq,"TFBertModel"),Iq.forEach(t),X$=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);L$=n(Uq,"bert-base-uncased"),Uq.forEach(t),O$=n(ii," architecture."),ii.forEach(t),D$=p(ri),qn=a(ri,"P",{});var bf=r(qn);Q$=n(bf,"Configuration objects inherit from "),fu=a(bf,"A",{href:!0});var Nq=r(fu);H$=n(Nq,"PretrainedConfig"),Nq.forEach(t),Y$=n(bf,` and can be used to control the model outputs. Read the
documentation from `),gu=a(bf,"A",{href:!0});var Pq=r(gu);K$=n(Pq,"PretrainedConfig"),Pq.forEach(t),eF=n(bf," for more information."),bf.forEach(t),tF=p(ri),v(ca.$$.fragment,ri),ri.forEach(t),Yk=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);v(od.$$.fragment,qq),qq.forEach(t),Wq.forEach(t),oF=p(Tw),Tg=a(Tw,"SPAN",{});var Aq=r(Tg);nF=n(Aq,"BertTokenizer"),Aq.forEach(t),Tw.forEach(t),Kk=p(i),ot=a(i,"DIV",{class:!0});var Xt=r(ot);v(nd.$$.fragment,Xt),sF=p(Xt),kg=a(Xt,"P",{});var Zq=r(kg);aF=n(Zq,"Construct a BERT tokenizer. Based on WordPiece."),Zq.forEach(t),rF=p(Xt),sd=a(Xt,"P",{});var kw=r(sd);iF=n(kw,"This tokenizer inherits from "),_u=a(kw,"A",{href:!0});var Rq=r(_u);lF=n(Rq,"PreTrainedTokenizer"),Rq.forEach(t),dF=n(kw,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),kw.forEach(t),cF=p(Xt),cn=a(Xt,"DIV",{class:!0});var yf=r(cn);v(ad.$$.fragment,yf),pF=p(yf),vg=a(yf,"P",{});var Gq=r(vg);hF=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),mF=p(yf),rd=a(yf,"UL",{});var vw=r(rd);bu=a(vw,"LI",{});var MW=r(bu);uF=n(MW,"single sequence: "),wg=a(MW,"CODE",{});var Vq=r(wg);fF=n(Vq,"[CLS] X [SEP]"),Vq.forEach(t),MW.forEach(t),gF=p(vw),yu=a(vw,"LI",{});var $W=r(yu);_F=n($W,"pair of sequences: "),Mg=a($W,"CODE",{});var Sq=r(Mg);bF=n(Sq,"[CLS] A [SEP] B [SEP]"),Sq.forEach(t),$W.forEach(t),vw.forEach(t),yf.forEach(t),yF=p(Xt),ha=a(Xt,"DIV",{class:!0});var ww=r(ha);v(id.$$.fragment,ww),TF=p(ww),ld=a(ww,"P",{});var Mw=r(ld);kF=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 `),$g=a(Mw,"CODE",{});var Xq=r($g);vF=n(Xq,"prepare_for_model"),Xq.forEach(t),wF=n(Mw," method."),Mw.forEach(t),ww.forEach(t),MF=p(Xt),ao=a(Xt,"DIV",{class:!0});var li=r(ao);v(dd.$$.fragment,li),$F=p(li),Fg=a(li,"P",{});var Lq=r(Fg);FF=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),BF=p(li),v(ma.$$.fragment,li),xF=p(li),Zn=a(li,"P",{});var Tf=r(Zn);EF=n(Tf,"If "),Bg=a(Tf,"CODE",{});var Oq=r(Bg);jF=n(Oq,"token_ids_1"),Oq.forEach(t),zF=n(Tf," is "),xg=a(Tf,"CODE",{});var Dq=r(xg);JF=n(Dq,"None"),Dq.forEach(t),CF=n(Tf,", this method only returns the first portion of the mask (0s)."),Tf.forEach(t),li.forEach(t),IF=p(Xt),Tu=a(Xt,"DIV",{class:!0});var Qq=r(Tu);v(cd.$$.fragment,Qq),Qq.forEach(t),Xt.forEach(t),ev=p(i),Rn=a(i,"H2",{class:!0});var $w=r(Rn);ua=a($w,"A",{id:!0,class:!0,href:!0});var Hq=r(ua);Eg=a(Hq,"SPAN",{});var Yq=r(Eg);v(pd.$$.fragment,Yq),Yq.forEach(t),Hq.forEach(t),UF=p($w),jg=a($w,"SPAN",{});var Kq=r(jg);NF=n(Kq,"BertTokenizerFast"),Kq.forEach(t),$w.forEach(t),tv=p(i),xt=a(i,"DIV",{class:!0});var Tn=r(xt);v(hd.$$.fragment,Tn),PF=p(Tn),md=a(Tn,"P",{});var Fw=r(md);WF=n(Fw,"Construct a \u201Cfast\u201D BERT tokenizer (backed by HuggingFace\u2019s "),zg=a(Fw,"EM",{});var eA=r(zg);qF=n(eA,"tokenizers"),eA.forEach(t),AF=n(Fw," library). Based on WordPiece."),Fw.forEach(t),ZF=p(Tn),ud=a(Tn,"P",{});var Bw=r(ud);RF=n(Bw,"This tokenizer inherits from "),ku=a(Bw,"A",{href:!0});var tA=r(ku);GF=n(tA,"PreTrainedTokenizerFast"),tA.forEach(t),VF=n(Bw,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Bw.forEach(t),SF=p(Tn),pn=a(Tn,"DIV",{class:!0});var kf=r(pn);v(fd.$$.fragment,kf),XF=p(kf),Jg=a(kf,"P",{});var oA=r(Jg);LF=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),OF=p(kf),gd=a(kf,"UL",{});var xw=r(gd);vu=a(xw,"LI",{});var FW=r(vu);DF=n(FW,"single sequence: "),Cg=a(FW,"CODE",{});var nA=r(Cg);QF=n(nA,"[CLS] X [SEP]"),nA.forEach(t),FW.forEach(t),HF=p(xw),wu=a(xw,"LI",{});var BW=r(wu);YF=n(BW,"pair of sequences: "),Ig=a(BW,"CODE",{});var sA=r(Ig);KF=n(sA,"[CLS] A [SEP] B [SEP]"),sA.forEach(t),BW.forEach(t),xw.forEach(t),kf.forEach(t),eB=p(Tn),ro=a(Tn,"DIV",{class:!0});var di=r(ro);v(_d.$$.fragment,di),tB=p(di),Ug=a(di,"P",{});var aA=r(Ug);oB=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),nB=p(di),v(fa.$$.fragment,di),sB=p(di),Gn=a(di,"P",{});var vf=r(Gn);aB=n(vf,"If "),Ng=a(vf,"CODE",{});var rA=r(Ng);rB=n(rA,"token_ids_1"),rA.forEach(t),iB=n(vf," is "),Pg=a(vf,"CODE",{});var iA=r(Pg);lB=n(iA,"None"),iA.forEach(t),dB=n(vf,", this method only returns the first portion of the mask (0s)."),vf.forEach(t),di.forEach(t),Tn.forEach(t),ov=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);v(bd.$$.fragment,dA),dA.forEach(t),lA.forEach(t),cB=p(Ew),qg=a(Ew,"SPAN",{});var cA=r(qg);pB=n(cA,"TFBertTokenizer"),cA.forEach(t),Ew.forEach(t),nv=p(i),Et=a(i,"DIV",{class:!0});var kn=r(Et);v(yd.$$.fragment,kn),hB=p(kn),Sn=a(kn,"P",{});var wf=r(Sn);mB=n(wf,`This is an in-graph tokenizer for BERT. It should be initialized similarly to other tokenizers, using the
`),Ag=a(wf,"CODE",{});var pA=r(Ag);uB=n(pA,"from_pretrained()"),pA.forEach(t),fB=n(wf," method. It can also be initialized with the "),Zg=a(wf,"CODE",{});var hA=r(Zg);gB=n(hA,"from_tokenizer()"),hA.forEach(t),_B=n(wf,` method, which imports settings
from an existing standard tokenizer object.`),wf.forEach(t),bB=p(kn),Td=a(kn,"P",{});var jw=r(Td);yB=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);TB=n(mA,"tf.string"),mA.forEach(t),kB=n(jw," inputs to outputs."),jw.forEach(t),vB=p(kn),hn=a(kn,"DIV",{class:!0});var Mf=r(hn);v(kd.$$.fragment,Mf),wB=p(Mf),vd=a(Mf,"P",{});var zw=r(vd);MB=n(zw,"Instantiate a "),Gg=a(zw,"CODE",{});var uA=r(Gg);$B=n(uA,"TFBertTokenizer"),uA.forEach(t),FB=n(zw," from a pre-trained tokenizer."),zw.forEach(t),BB=p(Mf),v(_a.$$.fragment,Mf),Mf.forEach(t),xB=p(kn),mn=a(kn,"DIV",{class:!0});var $f=r(mn);v(wd.$$.fragment,$f),EB=p($f),Xn=a($f,"P",{});var Ff=r(Xn);jB=n(Ff,"Initialize a "),Vg=a(Ff,"CODE",{});var fA=r(Vg);zB=n(fA,"TFBertTokenizer"),fA.forEach(t),JB=n(Ff," from an existing "),Sg=a(Ff,"CODE",{});var gA=r(Sg);CB=n(gA,"Tokenizer"),gA.forEach(t),IB=n(Ff,"."),Ff.forEach(t),UB=p($f),v(ba.$$.fragment,$f),$f.forEach(t),kn.forEach(t),sv=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);v(Md.$$.fragment,bA),bA.forEach(t),_A.forEach(t),NB=p(Jw),Lg=a(Jw,"SPAN",{});var yA=r(Lg);PB=n(yA,"Bert specific outputs"),yA.forEach(t),Jw.forEach(t),av=p(i),On=a(i,"DIV",{class:!0});var Cw=r(On);v($d.$$.fragment,Cw),WB=p(Cw),Fd=a(Cw,"P",{});var Iw=r(Fd);qB=n(Iw,"Output type of "),Mu=a(Iw,"A",{href:!0});var TA=r(Mu);AB=n(TA,"BertForPreTraining"),TA.forEach(t),ZB=n(Iw,"."),Iw.forEach(t),Cw.forEach(t),rv=p(i),Dn=a(i,"DIV",{class:!0});var Uw=r(Dn);v(Bd.$$.fragment,Uw),RB=p(Uw),xd=a(Uw,"P",{});var Nw=r(xd);GB=n(Nw,"Output type of "),$u=a(Nw,"A",{href:!0});var kA=r($u);VB=n(kA,"TFBertForPreTraining"),kA.forEach(t),SB=n(Nw,"."),Nw.forEach(t),Uw.forEach(t),iv=p(i),qo=a(i,"DIV",{class:!0});var Bf=r(qo);v(Ed.$$.fragment,Bf),XB=p(Bf),jd=a(Bf,"P",{});var Pw=r(jd);LB=n(Pw,"Output type of "),Fu=a(Pw,"A",{href:!0});var vA=r(Fu);OB=n(vA,"BertForPreTraining"),vA.forEach(t),DB=n(Pw,"."),Pw.forEach(t),QB=p(Bf),Ta=a(Bf,"DIV",{class:!0});var Ww=r(Ta);v(zd.$$.fragment,Ww),HB=p(Ww),Og=a(Ww,"P",{});var wA=r(Og);YB=n(wA,"\u201CReturns a new object replacing the specified fields with new values."),wA.forEach(t),Ww.forEach(t),Bf.forEach(t),lv=p(i),Qn=a(i,"H2",{class:!0});var qw=r(Qn);ka=a(qw,"A",{id:!0,class:!0,href:!0});var MA=r(ka);Dg=a(MA,"SPAN",{});var $A=r(Dg);v(Jd.$$.fragment,$A),$A.forEach(t),MA.forEach(t),KB=p(qw),Qg=a(qw,"SPAN",{});var FA=r(Qg);ex=n(FA,"BertModel"),FA.forEach(t),qw.forEach(t),dv=p(i),nt=a(i,"DIV",{class:!0});var Lt=r(nt);v(Cd.$$.fragment,Lt),tx=p(Lt),Hg=a(Lt,"P",{});var BA=r(Hg);ox=n(BA,"The bare Bert Model transformer outputting raw hidden-states without any specific head on top."),BA.forEach(t),nx=p(Lt),Id=a(Lt,"P",{});var Aw=r(Id);sx=n(Aw,"This model inherits from "),Bu=a(Aw,"A",{href:!0});var xA=r(Bu);ax=n(xA,"PreTrainedModel"),xA.forEach(t),rx=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),ix=p(Lt),Ud=a(Lt,"P",{});var Zw=r(Ud);lx=n(Zw,"This model is also a PyTorch "),Nd=a(Zw,"A",{href:!0,rel:!0});var EA=r(Nd);dx=n(EA,"torch.nn.Module"),EA.forEach(t),cx=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),px=p(Lt),Pd=a(Lt,"P",{});var Rw=r(Pd);hx=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);mx=n(jA,`Attention is
all you need`),jA.forEach(t),ux=n(Rw,` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),Rw.forEach(t),fx=p(Lt),gt=a(Lt,"P",{});var Ot=r(gt);gx=n(Ot,"To behave as an decoder the model needs to be initialized with the "),Yg=a(Ot,"CODE",{});var zA=r(Yg);_x=n(zA,"is_decoder"),zA.forEach(t),bx=n(Ot,` argument of the configuration set
to `),Kg=a(Ot,"CODE",{});var JA=r(Kg);yx=n(JA,"True"),JA.forEach(t),Tx=n(Ot,". To be used in a Seq2Seq model, the model needs to initialized with both "),e_=a(Ot,"CODE",{});var CA=r(e_);kx=n(CA,"is_decoder"),CA.forEach(t),vx=n(Ot,` argument and
`),t_=a(Ot,"CODE",{});var IA=r(t_);wx=n(IA,"add_cross_attention"),IA.forEach(t),Mx=n(Ot," set to "),o_=a(Ot,"CODE",{});var UA=r(o_);$x=n(UA,"True"),UA.forEach(t),Fx=n(Ot,"; an "),n_=a(Ot,"CODE",{});var NA=r(n_);Bx=n(NA,"encoder_hidden_states"),NA.forEach(t),xx=n(Ot," is then expected as an input to the forward pass."),Ot.forEach(t),Ex=p(Lt),io=a(Lt,"DIV",{class:!0});var ci=r(io);v(qd.$$.fragment,ci),jx=p(ci),Hn=a(ci,"P",{});var xf=r(Hn);zx=n(xf,"The "),xu=a(xf,"A",{href:!0});var PA=r(xu);Jx=n(PA,"BertModel"),PA.forEach(t),Cx=n(xf," forward method, overrides the "),s_=a(xf,"CODE",{});var WA=r(s_);Ix=n(WA,"__call__"),WA.forEach(t),Ux=n(xf," special method."),xf.forEach(t),Nx=p(ci),v(va.$$.fragment,ci),Px=p(ci),v(wa.$$.fragment,ci),ci.forEach(t),Lt.forEach(t),cv=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_);v(Ad.$$.fragment,AA),AA.forEach(t),qA.forEach(t),Wx=p(Gw),r_=a(Gw,"SPAN",{});var ZA=r(r_);qx=n(ZA,"BertForPreTraining"),ZA.forEach(t),Gw.forEach(t),pv=p(i),jt=a(i,"DIV",{class:!0});var vn=r(jt);v(Zd.$$.fragment,vn),Ax=p(vn),Kn=a(vn,"P",{});var Ef=r(Kn);Zx=n(Ef,"Bert Model with two heads on top as done during the pretraining: a "),i_=a(Ef,"CODE",{});var RA=r(i_);Rx=n(RA,"masked language modeling"),RA.forEach(t),Gx=n(Ef," head and a "),l_=a(Ef,"CODE",{});var GA=r(l_);Vx=n(GA,"next sentence prediction (classification)"),GA.forEach(t),Sx=n(Ef," head."),Ef.forEach(t),Xx=p(vn),Rd=a(vn,"P",{});var Vw=r(Rd);Lx=n(Vw,"This model inherits from "),Eu=a(Vw,"A",{href:!0});var VA=r(Eu);Ox=n(VA,"PreTrainedModel"),VA.forEach(t),Dx=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),Qx=p(vn),Gd=a(vn,"P",{});var Sw=r(Gd);Hx=n(Sw,"This model is also a PyTorch "),Vd=a(Sw,"A",{href:!0,rel:!0});var SA=r(Vd);Yx=n(SA,"torch.nn.Module"),SA.forEach(t),Kx=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(vn),lo=a(vn,"DIV",{class:!0});var pi=r(lo);v(Sd.$$.fragment,pi),tE=p(pi),es=a(pi,"P",{});var jf=r(es);oE=n(jf,"The "),ju=a(jf,"A",{href:!0});var XA=r(ju);nE=n(XA,"BertForPreTraining"),XA.forEach(t),sE=n(jf," forward method, overrides the "),d_=a(jf,"CODE",{});var LA=r(d_);aE=n(LA,"__call__"),LA.forEach(t),rE=n(jf," special method."),jf.forEach(t),iE=p(pi),v($a.$$.fragment,pi),lE=p(pi),v(Fa.$$.fragment,pi),pi.forEach(t),vn.forEach(t),hv=p(i),ts=a(i,"H2",{class:!0});var Xw=r(ts);Ba=a(Xw,"A",{id:!0,class:!0,href:!0});var OA=r(Ba);c_=a(OA,"SPAN",{});var DA=r(c_);v(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),mv=p(i),zt=a(i,"DIV",{class:!0});var wn=r(zt);v(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),uE=n(Lw," head on top for CLM fine-tuning."),Lw.forEach(t),fE=p(wn),Dd=a(wn,"P",{});var Ow=r(Dd);gE=n(Ow,"This model inherits from "),zu=a(Ow,"A",{href:!0});var YA=r(zu);_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);kE=n(KA,"torch.nn.Module"),KA.forEach(t),vE=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);v(Yd.$$.fragment,hi),ME=p(hi),os=a(hi,"P",{});var zf=r(os);$E=n(zf,"The "),Ju=a(zf,"A",{href:!0});var eZ=r(Ju);FE=n(eZ,"BertLMHeadModel"),eZ.forEach(t),BE=n(zf," forward method, overrides the "),m_=a(zf,"CODE",{});var tZ=r(m_);xE=n(tZ,"__call__"),tZ.forEach(t),EE=n(zf," special method."),zf.forEach(t),jE=p(hi),v(xa.$$.fragment,hi),zE=p(hi),v(Ea.$$.fragment,hi),hi.forEach(t),wn.forEach(t),uv=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);u_=a(oZ,"SPAN",{});var nZ=r(u_);v(Kd.$$.fragment,nZ),nZ.forEach(t),oZ.forEach(t),JE=p(Qw),f_=a(Qw,"SPAN",{});var sZ=r(f_);CE=n(sZ,"BertForMaskedLM"),sZ.forEach(t),Qw.forEach(t),fv=p(i),Jt=a(i,"DIV",{class:!0});var Mn=r(Jt);v(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 "),Cu=a(Yw,"A",{href:!0});var rZ=r(Cu);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);v(ac.$$.fragment,mi),LE=p(mi),ss=a(mi,"P",{});var Jf=r(ss);OE=n(Jf,"The "),Iu=a(Jf,"A",{href:!0});var lZ=r(Iu);DE=n(lZ,"BertForMaskedLM"),lZ.forEach(t),QE=n(Jf," forward method, overrides the "),__=a(Jf,"CODE",{});var dZ=r(__);HE=n(dZ,"__call__"),dZ.forEach(t),YE=n(Jf," special method."),Jf.forEach(t),KE=p(mi),v(za.$$.fragment,mi),ej=p(mi),v(Ja.$$.fragment,mi),mi.forEach(t),Mn.forEach(t),gv=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_);v(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),_v=p(i),Ct=a(i,"DIV",{class:!0});var $n=r(Ct);v(ic.$$.fragment,$n),nj=p($n),lc=a($n,"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($n),dc=a($n,"P",{});var o1=r(dc);lj=n(o1,"This model inherits from "),Uu=a(o1,"A",{href:!0});var uZ=r(Uu);dj=n(uZ,"PreTrainedModel"),uZ.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($n),cc=a($n,"P",{});var n1=r(cc);hj=n(n1,"This model is also a PyTorch "),pc=a(n1,"A",{href:!0,rel:!0});var fZ=r(pc);mj=n(fZ,"torch.nn.Module"),fZ.forEach(t),uj=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),fj=p($n),ho=a($n,"DIV",{class:!0});var ui=r(ho);v(hc.$$.fragment,ui),gj=p(ui),rs=a(ui,"P",{});var Cf=r(rs);_j=n(Cf,"The "),Nu=a(Cf,"A",{href:!0});var gZ=r(Nu);bj=n(gZ,"BertForNextSentencePrediction"),gZ.forEach(t),yj=n(Cf," forward method, overrides the "),k_=a(Cf,"CODE",{});var _Z=r(k_);Tj=n(_Z,"__call__"),_Z.forEach(t),kj=n(Cf," special method."),Cf.forEach(t),vj=p(ui),v(Ia.$$.fragment,ui),wj=p(ui),v(Ua.$$.fragment,ui),ui.forEach(t),$n.forEach(t),bv=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);v_=a(bZ,"SPAN",{});var yZ=r(v_);v(mc.$$.fragment,yZ),yZ.forEach(t),bZ.forEach(t),Mj=p(s1),w_=a(s1,"SPAN",{});var TZ=r(w_);$j=n(TZ,"BertForSequenceClassification"),TZ.forEach(t),s1.forEach(t),yv=p(i),It=a(i,"DIV",{class:!0});var Fn=r(It);v(uc.$$.fragment,Fn),Fj=p(Fn),M_=a(Fn,"P",{});var kZ=r(M_);Bj=n(kZ,`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.`),kZ.forEach(t),xj=p(Fn),fc=a(Fn,"P",{});var a1=r(fc);Ej=n(a1,"This model inherits from "),Pu=a(a1,"A",{href:!0});var vZ=r(Pu);jj=n(vZ,"PreTrainedModel"),vZ.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(Fn),gc=a(Fn,"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(Fn),At=a(Fn,"DIV",{class:!0});var Bn=r(At);v(bc.$$.fragment,Bn),Pj=p(Bn),ls=a(Bn,"P",{});var If=r(ls);Wj=n(If,"The "),Wu=a(If,"A",{href:!0});var MZ=r(Wu);qj=n(MZ,"BertForSequenceClassification"),MZ.forEach(t),Aj=n(If," forward method, overrides the "),$_=a(If,"CODE",{});var $Z=r($_);Zj=n($Z,"__call__"),$Z.forEach(t),Rj=n(If," special method."),If.forEach(t),Gj=p(Bn),v(Pa.$$.fragment,Bn),Vj=p(Bn),v(Wa.$$.fragment,Bn),Sj=p(Bn),v(qa.$$.fragment,Bn),Bn.forEach(t),Fn.forEach(t),Tv=p(i),ds=a(i,"H2",{class:!0});var i1=r(ds);Aa=a(i1,"A",{id:!0,class:!0,href:!0});var FZ=r(Aa);F_=a(FZ,"SPAN",{});var BZ=r(F_);v(yc.$$.fragment,BZ),BZ.forEach(t),FZ.forEach(t),Xj=p(i1),B_=a(i1,"SPAN",{});var xZ=r(B_);Lj=n(xZ,"BertForMultipleChoice"),xZ.forEach(t),i1.forEach(t),kv=p(i),Ut=a(i,"DIV",{class:!0});var xn=r(Ut);v(Tc.$$.fragment,xn),Oj=p(xn),x_=a(xn,"P",{});var EZ=r(x_);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(xn),kc=a(xn,"P",{});var l1=r(kc);Hj=n(l1,"This model inherits from "),qu=a(l1,"A",{href:!0});var jZ=r(qu);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(xn),vc=a(xn,"P",{});var d1=r(vc);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(xn),mo=a(xn,"DIV",{class:!0});var fi=r(mo);v(Mc.$$.fragment,fi),az=p(fi),cs=a(fi,"P",{});var Uf=r(cs);rz=n(Uf,"The "),Au=a(Uf,"A",{href:!0});var JZ=r(Au);iz=n(JZ,"BertForMultipleChoice"),JZ.forEach(t),lz=n(Uf," forward method, overrides the "),E_=a(Uf,"CODE",{});var CZ=r(E_);dz=n(CZ,"__call__"),CZ.forEach(t),cz=n(Uf," special method."),Uf.forEach(t),pz=p(fi),v(Za.$$.fragment,fi),hz=p(fi),v(Ra.$$.fragment,fi),fi.forEach(t),xn.forEach(t),vv=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_);v($c.$$.fragment,UZ),UZ.forEach(t),IZ.forEach(t),mz=p(c1),z_=a(c1,"SPAN",{});var NZ=r(z_);uz=n(NZ,"BertForTokenClassification"),NZ.forEach(t),c1.forEach(t),wv=p(i),Nt=a(i,"DIV",{class:!0});var En=r(Nt);v(Fc.$$.fragment,En),fz=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),Bc=a(En,"P",{});var p1=r(Bc);bz=n(p1,"This model inherits from "),Zu=a(p1,"A",{href:!0});var WZ=r(Zu);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),kz=p(En),xc=a(En,"P",{});var h1=r(xc);vz=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),$z=p(En),uo=a(En,"DIV",{class:!0});var gi=r(uo);v(jc.$$.fragment,gi),Fz=p(gi),hs=a(gi,"P",{});var Nf=r(hs);Bz=n(Nf,"The "),Ru=a(Nf,"A",{href:!0});var AZ=r(Ru);xz=n(AZ,"BertForTokenClassification"),AZ.forEach(t),Ez=n(Nf," forward method, overrides the "),C_=a(Nf,"CODE",{});var ZZ=r(C_);jz=n(ZZ,"__call__"),ZZ.forEach(t),zz=n(Nf," special method."),Nf.forEach(t),Jz=p(gi),v(Va.$$.fragment,gi),Cz=p(gi),v(Sa.$$.fragment,gi),gi.forEach(t),En.forEach(t),Mv=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_);v(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),$v=p(i),Pt=a(i,"DIV",{class:!0});var jn=r(Pt);v(Jc.$$.fragment,jn),Nz=p(jn),us=a(jn,"P",{});var Pf=r(us);Pz=n(Pf,`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(Pf,"CODE",{});var SZ=r(N_);Wz=n(SZ,"span start logits"),SZ.forEach(t),qz=n(Pf," and "),P_=a(Pf,"CODE",{});var XZ=r(P_);Az=n(XZ,"span end logits"),XZ.forEach(t),Zz=n(Pf,")."),Pf.forEach(t),Rz=p(jn),Cc=a(jn,"P",{});var u1=r(Cc);Gz=n(u1,"This model inherits from "),Gu=a(u1,"A",{href:!0});var LZ=r(Gu);Vz=n(LZ,"PreTrainedModel"),LZ.forEach(t),Sz=n(u1,`. 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.)`),u1.forEach(t),Xz=p(jn),Ic=a(jn,"P",{});var f1=r(Ic);Lz=n(f1,"This model is also a PyTorch "),Uc=a(f1,"A",{href:!0,rel:!0});var OZ=r(Uc);Oz=n(OZ,"torch.nn.Module"),OZ.forEach(t),Dz=n(f1,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),f1.forEach(t),Qz=p(jn),fo=a(jn,"DIV",{class:!0});var _i=r(fo);v(Nc.$$.fragment,_i),Hz=p(_i),fs=a(_i,"P",{});var Wf=r(fs);Yz=n(Wf,"The "),Vu=a(Wf,"A",{href:!0});var DZ=r(Vu);Kz=n(DZ,"BertForQuestionAnswering"),DZ.forEach(t),eJ=n(Wf," forward method, overrides the "),W_=a(Wf,"CODE",{});var QZ=r(W_);tJ=n(QZ,"__call__"),QZ.forEach(t),oJ=n(Wf," special method."),Wf.forEach(t),nJ=p(_i),v(La.$$.fragment,_i),sJ=p(_i),v(Oa.$$.fragment,_i),_i.forEach(t),jn.forEach(t),Fv=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_);v(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),Bv=p(i),_t=a(i,"DIV",{class:!0});var jo=r(_t);v(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 "),Su=a(_1,"A",{href:!0});var t6=r(Su);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);uJ=n(b1,"This model is also a "),Zc=a(b1,"A",{href:!0,rel:!0});var o6=r(Zc);fJ=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),v(Qa.$$.fragment,jo),bJ=p(jo),go=a(jo,"DIV",{class:!0});var bi=r(go);v(Rc.$$.fragment,bi),yJ=p(bi),_s=a(bi,"P",{});var qf=r(_s);TJ=n(qf,"The "),Xu=a(qf,"A",{href:!0});var n6=r(Xu);kJ=n(n6,"TFBertModel"),n6.forEach(t),vJ=n(qf," forward method, overrides the "),R_=a(qf,"CODE",{});var s6=r(R_);wJ=n(s6,"__call__"),s6.forEach(t),MJ=n(qf," special method."),qf.forEach(t),$J=p(bi),v(Ha.$$.fragment,bi),FJ=p(bi),v(Ya.$$.fragment,bi),bi.forEach(t),jo.forEach(t),xv=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_);v(Gc.$$.fragment,r6),r6.forEach(t),a6.forEach(t),BJ=p(y1),V_=a(y1,"SPAN",{});var i6=r(V_);xJ=n(i6,"TFBertForPreTraining"),i6.forEach(t),y1.forEach(t),Ev=p(i),bt=a(i,"DIV",{class:!0});var zo=r(bt);v(Vc.$$.fragment,zo),EJ=p(zo),ys=a(zo,"P",{});var Af=r(ys);jJ=n(Af,`Bert Model with two heads on top as done during the pretraining:
a `),S_=a(Af,"CODE",{});var l6=r(S_);zJ=n(l6,"masked language modeling"),l6.forEach(t),JJ=n(Af," head and a "),X_=a(Af,"CODE",{});var d6=r(X_);CJ=n(d6,"next sentence prediction (classification)"),d6.forEach(t),IJ=n(Af," head."),Af.forEach(t),UJ=p(zo),Sc=a(zo,"P",{});var T1=r(Sc);NJ=n(T1,"This model inherits from "),Lu=a(T1,"A",{href:!0});var c6=r(Lu);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 k1=r(Xc);AJ=n(k1,"This model is also a "),Lc=a(k1,"A",{href:!0,rel:!0});var p6=r(Lc);ZJ=n(p6,"tf.keras.Model"),p6.forEach(t),RJ=n(k1,` 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.`),k1.forEach(t),GJ=p(zo),v(er.$$.fragment,zo),VJ=p(zo),_o=a(zo,"DIV",{class:!0});var yi=r(_o);v(Oc.$$.fragment,yi),SJ=p(yi),Ts=a(yi,"P",{});var Zf=r(Ts);XJ=n(Zf,"The "),Ou=a(Zf,"A",{href:!0});var h6=r(Ou);LJ=n(h6,"TFBertForPreTraining"),h6.forEach(t),OJ=n(Zf," forward method, overrides the "),L_=a(Zf,"CODE",{});var m6=r(L_);DJ=n(m6,"__call__"),m6.forEach(t),QJ=n(Zf," special method."),Zf.forEach(t),HJ=p(yi),v(tr.$$.fragment,yi),YJ=p(yi),v(or.$$.fragment,yi),yi.forEach(t),zo.forEach(t),jv=p(i),ks=a(i,"H2",{class:!0});var v1=r(ks);nr=a(v1,"A",{id:!0,class:!0,href:!0});var u6=r(nr);O_=a(u6,"SPAN",{});var f6=r(O_);v(Dc.$$.fragment,f6),f6.forEach(t),u6.forEach(t),KJ=p(v1),D_=a(v1,"SPAN",{});var g6=r(D_);eC=n(g6,"TFBertModelLMHeadModel"),g6.forEach(t),v1.forEach(t),zv=p(i),vs=a(i,"DIV",{class:!0});var w1=r(vs);v(Qc.$$.fragment,w1),tC=p(w1),Zt=a(w1,"DIV",{class:!0});var zn=r(Zt);v(Hc.$$.fragment,zn),oC=p(zn),st=a(zn,"P",{});var Bt=r(st);nC=n(Bt,"encoder_hidden_states  ("),Q_=a(Bt,"CODE",{});var _6=r(Q_);sC=n(_6,"tf.Tensor"),_6.forEach(t),aC=n(Bt," of shape "),H_=a(Bt,"CODE",{});var b6=r(H_);rC=n(b6,"(batch_size, sequence_length, hidden_size)"),b6.forEach(t),iC=n(Bt,", "),Y_=a(Bt,"EM",{});var y6=r(Y_);lC=n(y6,"optional"),y6.forEach(t),dC=n(Bt,`):
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(Bt,"CODE",{});var T6=r(K_);cC=n(T6,"tf.Tensor"),T6.forEach(t),pC=n(Bt," of shape "),eb=a(Bt,"CODE",{});var k6=r(eb);hC=n(k6,"(batch_size, sequence_length)"),k6.forEach(t),mC=n(Bt,", "),tb=a(Bt,"EM",{});var v6=r(tb);uC=n(v6,"optional"),v6.forEach(t),fC=n(Bt,`):
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(Bt,"CODE",{});var w6=r(ob);gC=n(w6,"[0, 1]"),w6.forEach(t),_C=n(Bt,":"),Bt.forEach(t),bC=p(zn),Yc=a(zn,"UL",{});var M1=r(Yc);Kc=a(M1,"LI",{});var $1=r(Kc);yC=n($1,"1 for tokens that are "),nb=a($1,"STRONG",{});var M6=r(nb);TC=n(M6,"not masked"),M6.forEach(t),kC=n($1,","),$1.forEach(t),vC=p(M1),ep=a(M1,"LI",{});var F1=r(ep);wC=n(F1,"0 for tokens that are "),sb=a(F1,"STRONG",{});var $6=r(sb);MC=n($6,"masked"),$6.forEach(t),$C=n(F1,"."),F1.forEach(t),M1.forEach(t),FC=p(zn),ne=a(zn,"P",{});var re=r(ne);BC=n(re,"past_key_values ("),ab=a(re,"CODE",{});var F6=r(ab);xC=n(F6,"Tuple[Tuple[tf.Tensor]]"),F6.forEach(t),EC=n(re," of length "),rb=a(re,"CODE",{});var B6=r(rb);jC=n(B6,"config.n_layers"),B6.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 x6=r(ib);JC=n(x6,"past_key_values"),x6.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 "),ub=a(re,"CODE",{});var U6=r(ub);XC=n(U6,"True"),U6.forEach(t),LC=n(re,`):
If set to `),fb=a(re,"CODE",{});var N6=r(fb);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 "),kb=a(re,"CODE",{});var R6=r(kb);rI=n(R6,"np.ndarray"),R6.forEach(t),iI=n(re," of shape "),vb=a(re,"CODE",{});var G6=r(vb);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),uI=p(zn),v(sr.$$.fragment,zn),zn.forEach(t),w1.forEach(t),Jv=p(i),ws=a(i,"H2",{class:!0});var B1=r(ws);ar=a(B1,"A",{id:!0,class:!0,href:!0});var X6=r(ar);$b=a(X6,"SPAN",{});var L6=r($b);v(tp.$$.fragment,L6),L6.forEach(t),X6.forEach(t),fI=p(B1),Fb=a(B1,"SPAN",{});var O6=r(Fb);gI=n(O6,"TFBertForMaskedLM"),O6.forEach(t),B1.forEach(t),Cv=p(i),yt=a(i,"DIV",{class:!0});var Jo=r(yt);v(op.$$.fragment,Jo),_I=p(Jo),np=a(Jo,"P",{});var x1=r(np);bI=n(x1,"Bert Model with a "),Bb=a(x1,"CODE",{});var D6=r(Bb);yI=n(D6,"language modeling"),D6.forEach(t),TI=n(x1," head on top."),x1.forEach(t),kI=p(Jo),sp=a(Jo,"P",{});var E1=r(sp);vI=n(E1,"This model inherits from "),Du=a(E1,"A",{href:!0});var Q6=r(Du);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),$I=p(Jo),ap=a(Jo,"P",{});var j1=r(ap);FI=n(j1,"This model is also a "),rp=a(j1,"A",{href:!0,rel:!0});var H6=r(rp);BI=n(H6,"tf.keras.Model"),H6.forEach(t),xI=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),v(rr.$$.fragment,Jo),jI=p(Jo),Rt=a(Jo,"DIV",{class:!0});var Jn=r(Rt);v(ip.$$.fragment,Jn),zI=p(Jn),Ms=a(Jn,"P",{});var Rf=r(Ms);JI=n(Rf,"The "),Qu=a(Rf,"A",{href:!0});var Y6=r(Qu);CI=n(Y6,"TFBertForMaskedLM"),Y6.forEach(t),II=n(Rf," forward method, overrides the "),xb=a(Rf,"CODE",{});var K6=r(xb);UI=n(K6,"__call__"),K6.forEach(t),NI=n(Rf," special method."),Rf.forEach(t),PI=p(Jn),v(ir.$$.fragment,Jn),WI=p(Jn),v(lr.$$.fragment,Jn),qI=p(Jn),v(dr.$$.fragment,Jn),Jn.forEach(t),Jo.forEach(t),Iv=p(i),$s=a(i,"H2",{class:!0});var z1=r($s);cr=a(z1,"A",{id:!0,class:!0,href:!0});var eR=r(cr);Eb=a(eR,"SPAN",{});var tR=r(Eb);v(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),Uv=p(i),Tt=a(i,"DIV",{class:!0});var Co=r(Tt);v(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 "),Hu=a(C1,"A",{href:!0});var sR=r(Hu);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),v(pr.$$.fragment,Co),t4=p(Co),bo=a(Co,"DIV",{class:!0});var Ti=r(bo);v(up.$$.fragment,Ti),o4=p(Ti),Fs=a(Ti,"P",{});var Gf=r(Fs);n4=n(Gf,"The "),Yu=a(Gf,"A",{href:!0});var rR=r(Yu);s4=n(rR,"TFBertForNextSentencePrediction"),rR.forEach(t),a4=n(Gf," forward method, overrides the "),Jb=a(Gf,"CODE",{});var iR=r(Jb);r4=n(iR,"__call__"),iR.forEach(t),i4=n(Gf," special method."),Gf.forEach(t),l4=p(Ti),v(hr.$$.fragment,Ti),d4=p(Ti),v(mr.$$.fragment,Ti),Ti.forEach(t),Co.forEach(t),Nv=p(i),Bs=a(i,"H2",{class:!0});var U1=r(Bs);ur=a(U1,"A",{id:!0,class:!0,href:!0});var lR=r(ur);Cb=a(lR,"SPAN",{});var dR=r(Cb);v(fp.$$.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),Pv=p(i),kt=a(i,"DIV",{class:!0});var Io=r(kt);v(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),u4=p(Io),_p=a(Io,"P",{});var N1=r(_p);f4=n(N1,"This model inherits from "),Ku=a(N1,"A",{href:!0});var hR=r(Ku);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),k4=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),v4=p(Io),v(fr.$$.fragment,Io),w4=p(Io),Gt=a(Io,"DIV",{class:!0});var Cn=r(Gt);v(Tp.$$.fragment,Cn),M4=p(Cn),xs=a(Cn,"P",{});var Vf=r(xs);$4=n(Vf,"The "),ef=a(Vf,"A",{href:!0});var uR=r(ef);F4=n(uR,"TFBertForSequenceClassification"),uR.forEach(t),B4=n(Vf," forward method, overrides the "),Nb=a(Vf,"CODE",{});var fR=r(Nb);x4=n(fR,"__call__"),fR.forEach(t),E4=n(Vf," special method."),Vf.forEach(t),j4=p(Cn),v(gr.$$.fragment,Cn),z4=p(Cn),v(_r.$$.fragment,Cn),J4=p(Cn),v(br.$$.fragment,Cn),Cn.forEach(t),Io.forEach(t),Wv=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);v(kp.$$.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),qv=p(i),vt=a(i,"DIV",{class:!0});var Uo=r(vt);v(vp.$$.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 "),tf=a(q1,"A",{href:!0});var TR=r(tf);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 "),$p=a(A1,"A",{href:!0,rel:!0});var kR=r($p);G4=n(kR,"tf.keras.Model"),kR.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),v(Tr.$$.fragment,Uo),X4=p(Uo),yo=a(Uo,"DIV",{class:!0});var ki=r(yo);v(Fp.$$.fragment,ki),L4=p(ki),js=a(ki,"P",{});var Sf=r(js);O4=n(Sf,"The "),of=a(Sf,"A",{href:!0});var vR=r(of);D4=n(vR,"TFBertForMultipleChoice"),vR.forEach(t),Q4=n(Sf," forward method, overrides the "),Ab=a(Sf,"CODE",{});var wR=r(Ab);H4=n(wR,"__call__"),wR.forEach(t),Y4=n(Sf," special method."),Sf.forEach(t),K4=p(ki),v(kr.$$.fragment,ki),e5=p(ki),v(vr.$$.fragment,ki),ki.forEach(t),Uo.forEach(t),Av=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 $R=r(Zb);v(Bp.$$.fragment,$R),$R.forEach(t),MR.forEach(t),t5=p(Z1),Rb=a(Z1,"SPAN",{});var FR=r(Rb);o5=n(FR,"TFBertForTokenClassification"),FR.forEach(t),Z1.forEach(t),Zv=p(i),wt=a(i,"DIV",{class:!0});var No=r(wt);v(xp.$$.fragment,No),n5=p(No),Gb=a(No,"P",{});var BR=r(Gb);s5=n(BR,`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.`),BR.forEach(t),a5=p(No),Ep=a(No,"P",{});var R1=r(Ep);r5=n(R1,"This model inherits from "),nf=a(R1,"A",{href:!0});var xR=r(nf);i5=n(xR,"TFPreTrainedModel"),xR.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),v(Mr.$$.fragment,No),u5=p(No),Vt=a(No,"DIV",{class:!0});var In=r(Vt);v(Jp.$$.fragment,In),f5=p(In),Js=a(In,"P",{});var Xf=r(Js);g5=n(Xf,"The "),sf=a(Xf,"A",{href:!0});var jR=r(sf);_5=n(jR,"TFBertForTokenClassification"),jR.forEach(t),b5=n(Xf," forward method, overrides the "),Vb=a(Xf,"CODE",{});var zR=r(Vb);y5=n(zR,"__call__"),zR.forEach(t),T5=n(Xf," special method."),Xf.forEach(t),k5=p(In),v($r.$$.fragment,In),v5=p(In),v(Fr.$$.fragment,In),w5=p(In),v(Br.$$.fragment,In),In.forEach(t),No.forEach(t),Rv=p(i),Cs=a(i,"H2",{class:!0});var V1=r(Cs);xr=a(V1,"A",{id:!0,class:!0,href:!0});var JR=r(xr);Sb=a(JR,"SPAN",{});var CR=r(Sb);v(Cp.$$.fragment,CR),CR.forEach(t),JR.forEach(t),M5=p(V1),Xb=a(V1,"SPAN",{});var IR=r(Xb);$5=n(IR,"TFBertForQuestionAnswering"),IR.forEach(t),V1.forEach(t),Gv=p(i),Mt=a(i,"DIV",{class:!0});var Po=r(Mt);v(Ip.$$.fragment,Po),F5=p(Po),Is=a(Po,"P",{});var Lf=r(Is);B5=n(Lf,`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(Lf,"CODE",{});var UR=r(Lb);x5=n(UR,"span start logits"),UR.forEach(t),E5=n(Lf," and "),Ob=a(Lf,"CODE",{});var NR=r(Ob);j5=n(NR,"span end logits"),NR.forEach(t),z5=n(Lf,")."),Lf.forEach(t),J5=p(Po),Up=a(Po,"P",{});var S1=r(Up);C5=n(S1,"This model inherits from "),af=a(S1,"A",{href:!0});var PR=r(af);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),v(Er.$$.fragment,Po),Z5=p(Po),St=a(Po,"DIV",{class:!0});var Un=r(St);v(Wp.$$.fragment,Un),R5=p(Un),Us=a(Un,"P",{});var Of=r(Us);G5=n(Of,"The "),rf=a(Of,"A",{href:!0});var qR=r(rf);V5=n(qR,"TFBertForQuestionAnswering"),qR.forEach(t),S5=n(Of," forward method, overrides the "),Db=a(Of,"CODE",{});var AR=r(Db);X5=n(AR,"__call__"),AR.forEach(t),L5=n(Of," special method."),Of.forEach(t),O5=p(Un),v(jr.$$.fragment,Un),D5=p(Un),v(zr.$$.fragment,Un),Q5=p(Un),v(Jr.$$.fragment,Un),Un.forEach(t),Po.forEach(t),Vv=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);v(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),Sv=p(i),at=a(i,"DIV",{class:!0});var Dt=r(at);v(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 "),lf=a(O1,"A",{href:!0});var SR=r(lf);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 vi=r(Ao);ey=a(vi,"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(vi),ty=a(vi,"LI",{});var QR=r(ty);Sp=a(QR,"A",{href:!0,rel:!0});var HR=r(Sp);u3=n(HR,"Automatic Differentiation"),HR.forEach(t),QR.forEach(t),f3=p(vi),oy=a(vi,"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(vi),ny=a(vi,"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),vi.forEach(t),y3=p(Dt),To=a(Dt,"DIV",{class:!0});var wi=r(To);v(Op.$$.fragment,wi),T3=p(wi),Ps=a(wi,"P",{});var Df=r(Ps);k3=n(Df,"The "),sy=a(Df,"CODE",{});var oG=r(sy);v3=n(oG,"FlaxBertPreTrainedModel"),oG.forEach(t),w3=n(Df," forward method, overrides the "),ay=a(Df,"CODE",{});var nG=r(ay);M3=n(nG,"__call__"),nG.forEach(t),$3=n(Df," special method."),Df.forEach(t),F3=p(wi),v(Ir.$$.fragment,wi),B3=p(wi),v(Ur.$$.fragment,wi),wi.forEach(t),Dt.forEach(t),Xv=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);v(Dp.$$.fragment,aG),aG.forEach(t),sG.forEach(t),x3=p(Q1),iy=a(Q1,"SPAN",{});var rG=r(iy);E3=n(rG,"FlaxBertForPreTraining"),rG.forEach(t),Q1.forEach(t),Lv=p(i),rt=a(i,"DIV",{class:!0});var Qt=r(rt);v(Qp.$$.fragment,Qt),j3=p(Qt),qs=a(Qt,"P",{});var Qf=r(qs);z3=n(Qf,"Bert Model with two heads on top as done during the pretraining: a "),ly=a(Qf,"CODE",{});var iG=r(ly);J3=n(iG,"masked language modeling"),iG.forEach(t),C3=n(Qf," head and a "),dy=a(Qf,"CODE",{});var lG=r(dy);I3=n(lG,"next sentence prediction (classification)"),lG.forEach(t),U3=n(Qf," head."),Qf.forEach(t),N3=p(Qt),Hp=a(Qt,"P",{});var H1=r(Hp);P3=n(H1,"This model inherits from "),df=a(H1,"A",{href:!0});var dG=r(df);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 uG=r(hy);th=a(uG,"A",{href:!0,rel:!0});var fG=r(th);D3=n(fG,"Automatic Differentiation"),fG.forEach(t),uG.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),uy=a(Mi,"LI",{});var bG=r(uy);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),ko=a(Qt,"DIV",{class:!0});var $i=r(ko);v(sh.$$.fragment,$i),tU=p($i),As=a($i,"P",{});var Hf=r(As);oU=n(Hf,"The "),fy=a(Hf,"CODE",{});var TG=r(fy);nU=n(TG,"FlaxBertPreTrainedModel"),TG.forEach(t),sU=n(Hf," forward method, overrides the "),gy=a(Hf,"CODE",{});var kG=r(gy);aU=n(kG,"__call__"),kG.forEach(t),rU=n(Hf," special method."),Hf.forEach(t),iU=p($i),v(Pr.$$.fragment,$i),lU=p($i),v(Wr.$$.fragment,$i),$i.forEach(t),Qt.forEach(t),Ov=p(i),Zs=a(i,"H2",{class:!0});var K1=r(Zs);qr=a(K1,"A",{id:!0,class:!0,href:!0});var vG=r(qr);_y=a(vG,"SPAN",{});var wG=r(_y);v(ah.$$.fragment,wG),wG.forEach(t),vG.forEach(t),dU=p(K1),by=a(K1,"SPAN",{});var MG=r(by);cU=n(MG,"FlaxBertForCausalLM"),MG.forEach(t),K1.forEach(t),Dv=p(i),it=a(i,"DIV",{class:!0});var Ht=r(it);v(rh.$$.fragment,Ht),pU=p(Ht),yy=a(Ht,"P",{});var $G=r(yy);hU=n($G,`Bert Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),$G.forEach(t),mU=p(Ht),ih=a(Ht,"P",{});var eM=r(ih);uU=n(eM,"This model inherits from "),cf=a(eM,"A",{href:!0});var FG=r(cf);fU=n(FG,"FlaxPreTrainedModel"),FG.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 BG=r(dh);yU=n(BG,"flax.linen.Module"),BG.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),kU=p(Ht),Ty=a(Ht,"P",{});var xG=r(Ty);vU=n(xG,"Finally, this model supports inherent JAX features such as:"),xG.forEach(t),wU=p(Ht),Ro=a(Ht,"UL",{});var Fi=r(Ro);ky=a(Fi,"LI",{});var EG=r(ky);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),$U=p(Fi),vy=a(Fi,"LI",{});var zG=r(vy);ph=a(zG,"A",{href:!0,rel:!0});var JG=r(ph);FU=n(JG,"Automatic Differentiation"),JG.forEach(t),zG.forEach(t),BU=p(Fi),wy=a(Fi,"LI",{});var CG=r(wy);hh=a(CG,"A",{href:!0,rel:!0});var IG=r(hh);xU=n(IG,"Vectorization"),IG.forEach(t),CG.forEach(t),EU=p(Fi),My=a(Fi,"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),Fi.forEach(t),zU=p(Ht),vo=a(Ht,"DIV",{class:!0});var Bi=r(vo);v(uh.$$.fragment,Bi),JU=p(Bi),Rs=a(Bi,"P",{});var Yf=r(Rs);CU=n(Yf,"The "),$y=a(Yf,"CODE",{});var PG=r($y);IU=n(PG,"FlaxBertPreTrainedModel"),PG.forEach(t),UU=n(Yf," forward method, overrides the "),Fy=a(Yf,"CODE",{});var WG=r(Fy);NU=n(WG,"__call__"),WG.forEach(t),PU=n(Yf," special method."),Yf.forEach(t),WU=p(Bi),v(Ar.$$.fragment,Bi),qU=p(Bi),v(Zr.$$.fragment,Bi),Bi.forEach(t),Ht.forEach(t),Qv=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);By=a(qG,"SPAN",{});var AG=r(By);v(fh.$$.fragment,AG),AG.forEach(t),qG.forEach(t),AU=p(oM),xy=a(oM,"SPAN",{});var ZG=r(xy);ZU=n(ZG,"FlaxBertForMaskedLM"),ZG.forEach(t),oM.forEach(t),Hv=p(i),lt=a(i,"DIV",{class:!0});var Yt=r(lt);v(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 "),pf=a(sM,"A",{href:!0});var GG=r(pf);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 xi=r(Go);zy=a(xi,"LI",{});var XG=r(zy);kh=a(XG,"A",{href:!0,rel:!0});var LG=r(kh);nN=n(LG,"Just-In-Time (JIT) compilation"),LG.forEach(t),XG.forEach(t),sN=p(xi),Jy=a(xi,"LI",{});var OG=r(Jy);vh=a(OG,"A",{href:!0,rel:!0});var DG=r(vh);aN=n(DG,"Automatic Differentiation"),DG.forEach(t),OG.forEach(t),rN=p(xi),Cy=a(xi,"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(xi),Iy=a(xi,"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),xi.forEach(t),cN=p(Yt),wo=a(Yt,"DIV",{class:!0});var Ei=r(wo);v($h.$$.fragment,Ei),pN=p(Ei),Vs=a(Ei,"P",{});var Kf=r(Vs);hN=n(Kf,"The "),Uy=a(Kf,"CODE",{});var eV=r(Uy);mN=n(eV,"FlaxBertPreTrainedModel"),eV.forEach(t),uN=n(Kf," forward method, overrides the "),Ny=a(Kf,"CODE",{});var tV=r(Ny);fN=n(tV,"__call__"),tV.forEach(t),gN=n(Kf," special method."),Kf.forEach(t),_N=p(Ei),v(Gr.$$.fragment,Ei),bN=p(Ei),v(Vr.$$.fragment,Ei),Ei.forEach(t),Yt.forEach(t),Yv=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);v(Fh.$$.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),Kv=p(i),dt=a(i,"DIV",{class:!0});var Kt=r(dt);v(Bh.$$.fragment,Kt),kN=p(Kt),xh=a(Kt,"P",{});var iM=r(xh);vN=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),$N=p(Kt),Eh=a(Kt,"P",{});var lM=r(Eh);FN=n(lM,"This model inherits from "),hf=a(lM,"A",{href:!0});var rV=r(hf);BN=n(rV,"FlaxPreTrainedModel"),rV.forEach(t),xN=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 uV=r(Ih);AN=n(uV,"Vectorization"),uV.forEach(t),mV.forEach(t),ZN=p(ji),Vy=a(ji,"LI",{});var fV=r(Vy);Uh=a(fV,"A",{href:!0,rel:!0});var gV=r(Uh);RN=n(gV,"Parallelization"),gV.forEach(t),fV.forEach(t),ji.forEach(t),GN=p(Kt),Mo=a(Kt,"DIV",{class:!0});var zi=r(Mo);v(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),v(Xr.$$.fragment,zi),HN=p(zi),v(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);v(Ph.$$.fragment,TV),TV.forEach(t),yV.forEach(t),YN=p(cM),Oy=a(cM,"SPAN",{});var kV=r(Oy);KN=n(kV,"FlaxBertForSequenceClassification"),kV.forEach(t),cM.forEach(t),tw=p(i),ct=a(i,"DIV",{class:!0});var eo=r(ct);v(Wh.$$.fragment,eo),e9=p(eo),Dy=a(eo,"P",{});var vV=r(Dy);t9=n(vV,`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.`),vV.forEach(t),o9=p(eo),qh=a(eo,"P",{});var pM=r(qh);n9=n(pM,"This model inherits from "),mf=a(pM,"A",{href:!0});var wV=r(mf);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 $V=r(Qy);p9=n($V,"Finally, this model supports inherent JAX features such as:"),$V.forEach(t),h9=p(eo),So=a(eo,"UL",{});var Ji=r(So);Hy=a(Ji,"LI",{});var FV=r(Hy);Rh=a(FV,"A",{href:!0,rel:!0});var BV=r(Rh);m9=n(BV,"Just-In-Time (JIT) compilation"),BV.forEach(t),FV.forEach(t),u9=p(Ji),Yy=a(Ji,"LI",{});var xV=r(Yy);Gh=a(xV,"A",{href:!0,rel:!0});var EV=r(Gh);f9=n(EV,"Automatic Differentiation"),EV.forEach(t),xV.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),$o=a(eo,"DIV",{class:!0});var Ci=r($o);v(Xh.$$.fragment,Ci),k9=p(Ci),Os=a(Ci,"P",{});var tg=r(Os);v9=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);$9=n(UV,"__call__"),UV.forEach(t),F9=n(tg," special method."),tg.forEach(t),B9=p(Ci),v(Dr.$$.fragment,Ci),x9=p(Ci),v(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);v(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);v(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 uM=r(Dh);I9=n(uM,"This model inherits from "),uf=a(uM,"A",{href:!0});var AV=r(uf);U9=n(AV,"FlaxPreTrainedModel"),AV.forEach(t),N9=n(uM,`. 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)`),uM.forEach(t),P9=p(to),Qh=a(to,"P",{});var fM=r(Qh);W9=n(fM,"This model is also a Flax Linen "),Hh=a(fM,"A",{href:!0,rel:!0});var ZV=r(Hh);q9=n(ZV,"flax.linen.Module"),ZV.forEach(t),A9=n(fM,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),fM.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),Fo=a(to,"DIV",{class:!0});var Ui=r(Fo);v(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),v(Yr.$$.fragment,Ui),aP=p(Ui),v(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);v(nm.$$.fragment,eS),eS.forEach(t),KV.forEach(t),rP=p(gM),uT=a(gM,"SPAN",{});var tS=r(uT);iP=n(tS,"FlaxBertForTokenClassification"),tS.forEach(t),gM.forEach(t),aw=p(i),ht=a(i,"DIV",{class:!0});var oo=r(ht);v(sm.$$.fragment,oo),lP=p(oo),fT=a(oo,"P",{});var oS=r(fT);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 "),ff=a(_M,"A",{href:!0});var nS=r(ff);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),uP=p(oo),rm=a(oo,"P",{});var bM=r(rm);fP=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);kP=n(iS,"Just-In-Time (JIT) compilation"),iS.forEach(t),rS.forEach(t),vP=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);$P=n(pS,"Vectorization"),pS.forEach(t),cS.forEach(t),FP=p(Ni),TT=a(Ni,"LI",{});var hS=r(TT);pm=a(hS,"A",{href:!0,rel:!0});var mS=r(pm);BP=n(mS,"Parallelization"),mS.forEach(t),hS.forEach(t),Ni.forEach(t),xP=p(oo),Bo=a(oo,"DIV",{class:!0});var Pi=r(Bo);v(hm.$$.fragment,Pi),EP=p(Pi),Ys=a(Pi,"P",{});var ng=r(Ys);jP=n(ng,"The "),kT=a(ng,"CODE",{});var uS=r(kT);zP=n(uS,"FlaxBertPreTrainedModel"),uS.forEach(t),JP=n(ng," forward method, overrides the "),vT=a(ng,"CODE",{});var fS=r(vT);CP=n(fS,"__call__"),fS.forEach(t),IP=n(ng," special method."),ng.forEach(t),UP=p(Pi),v(ti.$$.fragment,Pi),NP=p(Pi),v(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);v(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);v(um.$$.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 `),$T=a(sg,"CODE",{});var yS=r($T);ZP=n(yS,"span start logits"),yS.forEach(t),RP=n(sg," and "),FT=a(sg,"CODE",{});var TS=r(FT);GP=n(TS,"span end logits"),TS.forEach(t),VP=n(sg,")."),sg.forEach(t),SP=p(no),fm=a(no,"P",{});var TM=r(fm);XP=n(TM,"This model inherits from "),gf=a(TM,"A",{href:!0});var kS=r(gf);LP=n(kS,"FlaxPreTrainedModel"),kS.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 kM=r(gm);QP=n(kM,"This model is also a Flax Linen "),_m=a(kM,"A",{href:!0,rel:!0});var vS=r(_m);HP=n(vS,"flax.linen.Module"),vS.forEach(t),YP=n(kM,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),kM.forEach(t),KP=p(no),BT=a(no,"P",{});var wS=r(BT);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);xT=a(Wi,"LI",{});var MS=r(xT);bm=a(MS,"A",{href:!0,rel:!0});var $S=r(bm);oW=n($S,"Just-In-Time (JIT) compilation"),$S.forEach(t),MS.forEach(t),nW=p(Wi),ET=a(Wi,"LI",{});var FS=r(ET);ym=a(FS,"A",{href:!0,rel:!0});var BS=r(ym);sW=n(BS,"Automatic Differentiation"),BS.forEach(t),FS.forEach(t),aW=p(Wi),jT=a(Wi,"LI",{});var xS=r(jT);Tm=a(xS,"A",{href:!0,rel:!0});var ES=r(Tm);rW=n(ES,"Vectorization"),ES.forEach(t),xS.forEach(t),iW=p(Wi),zT=a(Wi,"LI",{});var jS=r(zT);km=a(jS,"A",{href:!0,rel:!0});var zS=r(km);lW=n(zS,"Parallelization"),zS.forEach(t),jS.forEach(t),Wi.forEach(t),dW=p(no),xo=a(no,"DIV",{class:!0});var qi=r(xo);v(vm.$$.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);uW=n(CS,"__call__"),CS.forEach(t),fW=n(ag," special method."),ag.forEach(t),gW=p(qi),v(si.$$.fragment,qi),_W=p(qi),v(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(f,"id","bert"),h(f,"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(f,"href","#bert"),h(u,"class","relative group"),h(ee,"alt","Models"),IS(ee.src,x="https://img.shields.io/badge/All_model_pages-bert-blueviolet")||h(ee,"src",x),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(ul,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#robertabertdistilbert-and-masked-language-modeling"),h(ul,"rel","nofollow"),h(fl,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb"),h(fl,"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(eu,"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(ou,"href","../tasks/masked_language_modeling"),h(nu,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertForQuestionAnswering"),h(vl,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/question-answering"),h(vl,"rel","nofollow"),h(wl,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering.ipynb"),h(wl,"rel","nofollow"),h(su,"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($l,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering-tf.ipynb"),h($l,"rel","nofollow"),h(au,"href","/docs/transformers/main/en/model_doc/bert#transformers.FlaxBertForQuestionAnswering"),h(Fl,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/question-answering"),h(Fl,"rel","nofollow"),h(Bl,"href","https://huggingface.co/course/chapter7/7?fw=pt"),h(Bl,"rel","nofollow"),h(iu,"href","../tasks/question_answering"),h(du,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertForMultipleChoice"),h(xl,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/multiple-choice"),h(xl,"rel","nofollow"),h(El,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice.ipynb"),h(El,"rel","nofollow"),h(cu,"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(pu,"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(mu,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertModel"),h(uu,"href","/docs/transformers/main/en/model_doc/bert#transformers.TFBertModel"),h(td,"href","https://huggingface.co/bert-base-uncased"),h(td,"rel","nofollow"),h(fu,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),h(gu,"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(_u,"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(Tu,"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(ua,"id","transformers.BertTokenizerFast"),h(ua,"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(ua,"href","#transformers.BertTokenizerFast"),h(Rn,"class","relative group"),h(ku,"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(xt,"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(Mu,"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($u,"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(Fu,"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(ka,"id","transformers.BertModel"),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.BertModel"),h(Qn,"class","relative group"),h(Bu,"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(xu,"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(Eu,"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(ju,"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(Ba,"id","transformers.BertLMHeadModel"),h(Ba,"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(Ba,"href","#transformers.BertLMHeadModel"),h(ts,"class","relative group"),h(zu,"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(Ju,"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(Cu,"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(Iu,"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(Uu,"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(Nu,"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(Pu,"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(Wu,"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(qu,"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(Au,"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(Zu,"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(Ru,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertForTokenClassification"),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(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(Gu,"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(Vu,"href","/docs/transformers/main/en/model_doc/bert#transformers.BertForQuestionAnswering"),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(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(Su,"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(Xu,"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(Lu,"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(Ou,"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(ks,"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(vs,"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(Du,"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(Qu,"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($s,"class","relative group"),h(Hu,"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(Yu,"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(ur,"id","transformers.TFBertForSequenceClassification"),h(ur,"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(ur,"href","#transformers.TFBertForSequenceClassification"),h(Bs,"class","relative group"),h(Ku,"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(ef,"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(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(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(tf,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),h($p,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),h($p,"rel","nofollow"),h(of,"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(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(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(nf,"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(sf,"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(xr,"id","transformers.TFBertForQuestionAnswering"),h(xr,"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(xr,"href","#transformers.TFBertForQuestionAnswering"),h(Cs,"class","relative group"),h(af,"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(rf,"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(lf,"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(df,"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(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(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(cf,"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(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(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(pf,"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(kh,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(kh,"rel","nofollow"),h(vh,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(vh,"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(hf,"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(mf,"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($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(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(uf,"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(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(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(ff,"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(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(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(gf,"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(km,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(km,"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(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,u,_),e(u,f),e(f,b),w(l,b,null),e(u,m),e(u,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,ue,_),e(ue,D),g(i,$e,_),g(i,fe,_),e(fe,X),e(X,Ie),g(i,Fe,_),g(i,C,_),e(C,_e),e(_e,Q),g(i,Be,_),g(i,ge,_),e(ge,H),g(i,xe,_),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,Jk,_),g(i,Nn,_),e(Nn,aa),e(aa,rg),w(Ai,rg,null),e(Nn,MM),e(Nn,ig),e(ig,$M),g(i,Ck,_),g(i,Rm,_),e(Rm,FM),g(i,Ik,_),w(Zi,i,_),g(i,Uk,_),g(i,tt,_),e(tt,Ri),e(Ri,BM),e(Ri,Gi),e(Gi,xM),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,Nk,_),w(ol,i,_),g(i,Pk,_),g(i,ft,_),e(ft,nl),e(nl,p2),e(nl,sl),e(sl,h2),e(nl,m2),e(ft,u2),e(ft,Pn),e(Pn,f2),e(Pn,al),e(al,g2),e(Pn,_2),e(Pn,rl),e(rl,b2),e(Pn,y2),e(ft,T2),e(ft,Ko),e(Ko,Lm),e(Lm,k2),e(Ko,v2),e(Ko,il),e(il,w2),e(Ko,M2),e(Ko,ll),e(ll,$2),e(Ko,F2),e(ft,B2),e(ft,en),e(en,Om),e(Om,x2),e(en,E2),e(en,dl),e(dl,j2),e(en,z2),e(en,cl),e(cl,J2),e(en,C2),e(ft,I2),e(ft,ra),e(ra,Dm),e(Dm,U2),e(ra,N2),e(ra,pl),e(pl,P2),e(ra,W2),e(ft,q2),e(ft,Qm),e(Qm,hl),e(hl,A2),e(Qm,Z2),e(ft,R2),e(ft,dg),e(dg,Hm),e(Hm,G2),g(i,Wk,_),w(ml,i,_),g(i,qk,_),g(i,Wt,_),e(Wt,tn),e(tn,Ym),e(Ym,V2),e(tn,S2),e(tn,ul),e(ul,X2),e(tn,L2),e(tn,fl),e(fl,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,eu),e(eu,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,tu),e(tu,Tl),e(Tl,p0),e(tu,h0),e(Wt,m0),e(Wt,cg),e(cg,ou),e(ou,u0),g(i,Ak,_),w(kl,i,_),g(i,Zk,_),g(i,qt,_),e(qt,sn),e(sn,nu),e(nu,f0),e(sn,g0),e(sn,vl),e(vl,_0),e(sn,b0),e(sn,wl),e(wl,y0),e(sn,T0),e(qt,k0),e(qt,an),e(an,su),e(su,v0),e(an,w0),e(an,Ml),e(Ml,M0),e(an,$0),e(an,$l),e($l,F0),e(an,B0),e(qt,x0),e(qt,ia),e(ia,au),e(au,E0),e(ia,j0),e(ia,Fl),e(Fl,z0),e(ia,J0),e(qt,C0),e(qt,ru),e(ru,Bl),e(Bl,I0),e(ru,U0),e(qt,N0),e(qt,pg),e(pg,iu),e(iu,P0),g(i,Rk,_),g(i,lu,_),e(lu,hg),e(hg,W0),g(i,Gk,_),g(i,rn,_),e(rn,ln),e(ln,du),e(du,q0),e(ln,A0),e(ln,xl),e(xl,Z0),e(ln,R0),e(ln,El),e(El,G0),e(ln,V0),e(rn,S0),e(rn,dn),e(dn,cu),e(cu,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,pu),e(pu,K0),g(i,Vk,_),g(i,Jl,_),e(Jl,e$),e(Jl,ug),e(ug,t$),g(i,Sk,_),g(i,la,_),e(la,Cl),e(Cl,o$),e(Cl,Il),e(Il,n$),e(Cl,s$),e(la,a$),e(la,Ul),e(Ul,r$),e(Ul,Nl),e(Nl,i$),e(Ul,l$),g(i,Xk,_),g(i,Pl,_),e(Pl,d$),e(Pl,fg),e(fg,c$),g(i,Lk,_),g(i,hu,_),e(hu,Wl),e(Wl,p$),e(Wl,ql),e(ql,h$),e(Wl,m$),g(i,Ok,_),g(i,Al,_),e(Al,u$),e(Al,gg),e(gg,f$),g(i,Dk,_),g(i,Ft,_),e(Ft,Zl),e(Zl,g$),e(Zl,Rl),e(Rl,_$),e(Zl,b$),e(Ft,y$),e(Ft,Gl),e(Gl,T$),e(Gl,Vl),e(Vl,k$),e(Gl,v$),e(Ft,w$),e(Ft,Sl),e(Sl,M$),e(Sl,Xl),e(Xl,$$),e(Sl,F$),e(Ft,B$),e(Ft,Ll),e(Ll,x$),e(Ll,Ol),e(Ol,E$),e(Ll,j$),e(Ft,z$),e(Ft,Dl),e(Dl,J$),e(Dl,Ql),e(Ql,C$),e(Dl,I$),e(Ft,U$),e(Ft,Hl),e(Hl,N$),e(Hl,Yl),e(Yl,P$),e(Hl,W$),g(i,Qk,_),g(i,Wn,_),e(Wn,da),e(da,_g),w(Kl,_g,null),e(Wn,q$),e(Wn,bg),e(bg,A$),g(i,Hk,_),g(i,so,_),w(ed,so,null),e(so,Z$),e(so,Wo),e(Wo,R$),e(Wo,mu),e(mu,G$),e(Wo,V$),e(Wo,uu),e(uu,S$),e(Wo,X$),e(Wo,td),e(td,L$),e(Wo,O$),e(so,D$),e(so,qn),e(qn,Q$),e(qn,fu),e(fu,H$),e(qn,Y$),e(qn,gu),e(gu,K$),e(qn,eF),e(so,tF),w(ca,so,null),g(i,Yk,_),g(i,An,_),e(An,pa),e(pa,yg),w(od,yg,null),e(An,oF),e(An,Tg),e(Tg,nF),g(i,Kk,_),g(i,ot,_),w(nd,ot,null),e(ot,sF),e(ot,kg),e(kg,aF),e(ot,rF),e(ot,sd),e(sd,iF),e(sd,_u),e(_u,lF),e(sd,dF),e(ot,cF),e(ot,cn),w(ad,cn,null),e(cn,pF),e(cn,vg),e(vg,hF),e(cn,mF),e(cn,rd),e(rd,bu),e(bu,uF),e(bu,wg),e(wg,fF),e(rd,gF),e(rd,yu),e(yu,_F),e(yu,Mg),e(Mg,bF),e(ot,yF),e(ot,ha),w(id,ha,null),e(ha,TF),e(ha,ld),e(ld,kF),e(ld,$g),e($g,vF),e(ld,wF),e(ot,MF),e(ot,ao),w(dd,ao,null),e(ao,$F),e(ao,Fg),e(Fg,FF),e(ao,BF),w(ma,ao,null),e(ao,xF),e(ao,Zn),e(Zn,EF),e(Zn,Bg),e(Bg,jF),e(Zn,zF),e(Zn,xg),e(xg,JF),e(Zn,CF),e(ot,IF),e(ot,Tu),w(cd,Tu,null),g(i,ev,_),g(i,Rn,_),e(Rn,ua),e(ua,Eg),w(pd,Eg,null),e(Rn,UF),e(Rn,jg),e(jg,NF),g(i,tv,_),g(i,xt,_),w(hd,xt,null),e(xt,PF),e(xt,md),e(md,WF),e(md,zg),e(zg,qF),e(md,AF),e(xt,ZF),e(xt,ud),e(ud,RF),e(ud,ku),e(ku,GF),e(ud,VF),e(xt,SF),e(xt,pn),w(fd,pn,null),e(pn,XF),e(pn,Jg),e(Jg,LF),e(pn,OF),e(pn,gd),e(gd,vu),e(vu,DF),e(vu,Cg),e(Cg,QF),e(gd,HF),e(gd,wu),e(wu,YF),e(wu,Ig),e(Ig,KF),e(xt,eB),e(xt,ro),w(_d,ro,null),e(ro,tB),e(ro,Ug),e(Ug,oB),e(ro,nB),w(fa,ro,null),e(ro,sB),e(ro,Gn),e(Gn,aB),e(Gn,Ng),e(Ng,rB),e(Gn,iB),e(Gn,Pg),e(Pg,lB),e(Gn,dB),g(i,ov,_),g(i,Vn,_),e(Vn,ga),e(ga,Wg),w(bd,Wg,null),e(Vn,cB),e(Vn,qg),e(qg,pB),g(i,nv,_),g(i,Et,_),w(yd,Et,null),e(Et,hB),e(Et,Sn),e(Sn,mB),e(Sn,Ag),e(Ag,uB),e(Sn,fB),e(Sn,Zg),e(Zg,gB),e(Sn,_B),e(Et,bB),e(Et,Td),e(Td,yB),e(Td,Rg),e(Rg,TB),e(Td,kB),e(Et,vB),e(Et,hn),w(kd,hn,null),e(hn,wB),e(hn,vd),e(vd,MB),e(vd,Gg),e(Gg,$B),e(vd,FB),e(hn,BB),w(_a,hn,null),e(Et,xB),e(Et,mn),w(wd,mn,null),e(mn,EB),e(mn,Xn),e(Xn,jB),e(Xn,Vg),e(Vg,zB),e(Xn,JB),e(Xn,Sg),e(Sg,CB),e(Xn,IB),e(mn,UB),w(ba,mn,null),g(i,sv,_),g(i,Ln,_),e(Ln,ya),e(ya,Xg),w(Md,Xg,null),e(Ln,NB),e(Ln,Lg),e(Lg,PB),g(i,av,_),g(i,On,_),w($d,On,null),e(On,WB),e(On,Fd),e(Fd,qB),e(Fd,Mu),e(Mu,AB),e(Fd,ZB),g(i,rv,_),g(i,Dn,_),w(Bd,Dn,null),e(Dn,RB),e(Dn,xd),e(xd,GB),e(xd,$u),e($u,VB),e(xd,SB),g(i,iv,_),g(i,qo,_),w(Ed,qo,null),e(qo,XB),e(qo,jd),e(jd,LB),e(jd,Fu),e(Fu,OB),e(jd,DB),e(qo,QB),e(qo,Ta),w(zd,Ta,null),e(Ta,HB),e(Ta,Og),e(Og,YB),g(i,lv,_),g(i,Qn,_),e(Qn,ka),e(ka,Dg),w(Jd,Dg,null),e(Qn,KB),e(Qn,Qg),e(Qg,ex),g(i,dv,_),g(i,nt,_),w(Cd,nt,null),e(nt,tx),e(nt,Hg),e(Hg,ox),e(nt,nx),e(nt,Id),e(Id,sx),e(Id,Bu),e(Bu,ax),e(Id,rx),e(nt,ix),e(nt,Ud),e(Ud,lx),e(Ud,Nd),e(Nd,dx),e(Ud,cx),e(nt,px),e(nt,Pd),e(Pd,hx),e(Pd,Wd),e(Wd,mx),e(Pd,ux),e(nt,fx),e(nt,gt),e(gt,gx),e(gt,Yg),e(Yg,_x),e(gt,bx),e(gt,Kg),e(Kg,yx),e(gt,Tx),e(gt,e_),e(e_,kx),e(gt,vx),e(gt,t_),e(t_,wx),e(gt,Mx),e(gt,o_),e(o_,$x),e(gt,Fx),e(gt,n_),e(n_,Bx),e(gt,xx),e(nt,Ex),e(nt,io),w(qd,io,null),e(io,jx),e(io,Hn),e(Hn,zx),e(Hn,xu),e(xu,Jx),e(Hn,Cx),e(Hn,s_),e(s_,Ix),e(Hn,Ux),e(io,Nx),w(va,io,null),e(io,Px),w(wa,io,null),g(i,cv,_),g(i,Yn,_),e(Yn,Ma),e(Ma,a_),w(Ad,a_,null),e(Yn,Wx),e(Yn,r_),e(r_,qx),g(i,pv,_),g(i,jt,_),w(Zd,jt,null),e(jt,Ax),e(jt,Kn),e(Kn,Zx),e(Kn,i_),e(i_,Rx),e(Kn,Gx),e(Kn,l_),e(l_,Vx),e(Kn,Sx),e(jt,Xx),e(jt,Rd),e(Rd,Lx),e(Rd,Eu),e(Eu,Ox),e(Rd,Dx),e(jt,Qx),e(jt,Gd),e(Gd,Hx),e(Gd,Vd),e(Vd,Yx),e(Gd,Kx),e(jt,eE),e(jt,lo),w(Sd,lo,null),e(lo,tE),e(lo,es),e(es,oE),e(es,ju),e(ju,nE),e(es,sE),e(es,d_),e(d_,aE),e(es,rE),e(lo,iE),w($a,lo,null),e(lo,lE),w(Fa,lo,null),g(i,hv,_),g(i,ts,_),e(ts,Ba),e(Ba,c_),w(Xd,c_,null),e(ts,dE),e(ts,p_),e(p_,cE),g(i,mv,_),g(i,zt,_),w(Ld,zt,null),e(zt,pE),e(zt,Od),e(Od,hE),e(Od,h_),e(h_,mE),e(Od,uE),e(zt,fE),e(zt,Dd),e(Dd,gE),e(Dd,zu),e(zu,_E),e(Dd,bE),e(zt,yE),e(zt,Qd),e(Qd,TE),e(Qd,Hd),e(Hd,kE),e(Qd,vE),e(zt,wE),e(zt,co),w(Yd,co,null),e(co,ME),e(co,os),e(os,$E),e(os,Ju),e(Ju,FE),e(os,BE),e(os,m_),e(m_,xE),e(os,EE),e(co,jE),w(xa,co,null),e(co,zE),w(Ea,co,null),g(i,uv,_),g(i,ns,_),e(ns,ja),e(ja,u_),w(Kd,u_,null),e(ns,JE),e(ns,f_),e(f_,CE),g(i,fv,_),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,Cu),e(Cu,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,Iu),e(Iu,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,gv,_),g(i,as,_),e(as,Ca),e(Ca,b_),w(rc,b_,null),e(as,tj),e(as,y_),e(y_,oj),g(i,_v,_),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,Uu),e(Uu,dj),e(dc,cj),e(Ct,pj),e(Ct,cc),e(cc,hj),e(cc,pc),e(pc,mj),e(cc,uj),e(Ct,fj),e(Ct,ho),w(hc,ho,null),e(ho,gj),e(ho,rs),e(rs,_j),e(rs,Nu),e(Nu,bj),e(rs,yj),e(rs,k_),e(k_,Tj),e(rs,kj),e(ho,vj),w(Ia,ho,null),e(ho,wj),w(Ua,ho,null),g(i,bv,_),g(i,is,_),e(is,Na),e(Na,v_),w(mc,v_,null),e(is,Mj),e(is,w_),e(w_,$j),g(i,yv,_),g(i,It,_),w(uc,It,null),e(It,Fj),e(It,M_),e(M_,Bj),e(It,xj),e(It,fc),e(fc,Ej),e(fc,Pu),e(Pu,jj),e(fc,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,Wu),e(Wu,qj),e(ls,Aj),e(ls,$_),e($_,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,Tv,_),g(i,ds,_),e(ds,Aa),e(Aa,F_),w(yc,F_,null),e(ds,Xj),e(ds,B_),e(B_,Lj),g(i,kv,_),g(i,Ut,_),w(Tc,Ut,null),e(Ut,Oj),e(Ut,x_),e(x_,Dj),e(Ut,Qj),e(Ut,kc),e(kc,Hj),e(kc,qu),e(qu,Yj),e(kc,Kj),e(Ut,ez),e(Ut,vc),e(vc,tz),e(vc,wc),e(wc,oz),e(vc,nz),e(Ut,sz),e(Ut,mo),w(Mc,mo,null),e(mo,az),e(mo,cs),e(cs,rz),e(cs,Au),e(Au,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,vv,_),g(i,ps,_),e(ps,Ga),e(Ga,j_),w($c,j_,null),e(ps,mz),e(ps,z_),e(z_,uz),g(i,wv,_),g(i,Nt,_),w(Fc,Nt,null),e(Nt,fz),e(Nt,J_),e(J_,gz),e(Nt,_z),e(Nt,Bc),e(Bc,bz),e(Bc,Zu),e(Zu,yz),e(Bc,Tz),e(Nt,kz),e(Nt,xc),e(xc,vz),e(xc,Ec),e(Ec,wz),e(xc,Mz),e(Nt,$z),e(Nt,uo),w(jc,uo,null),e(uo,Fz),e(uo,hs),e(hs,Bz),e(hs,Ru),e(Ru,xz),e(hs,Ez),e(hs,C_),e(C_,jz),e(hs,zz),e(uo,Jz),w(Va,uo,null),e(uo,Cz),w(Sa,uo,null),g(i,Mv,_),g(i,ms,_),e(ms,Xa),e(Xa,I_),w(zc,I_,null),e(ms,Iz),e(ms,U_),e(U_,Uz),g(i,$v,_),g(i,Pt,_),w(Jc,Pt,null),e(Pt,Nz),e(Pt,us),e(us,Pz),e(us,N_),e(N_,Wz),e(us,qz),e(us,P_),e(P_,Az),e(us,Zz),e(Pt,Rz),e(Pt,Cc),e(Cc,Gz),e(Cc,Gu),e(Gu,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,fo),w(Nc,fo,null),e(fo,Hz),e(fo,fs),e(fs,Yz),e(fs,Vu),e(Vu,Kz),e(fs,eJ),e(fs,W_),e(W_,tJ),e(fs,oJ),e(fo,nJ),w(La,fo,null),e(fo,sJ),w(Oa,fo,null),g(i,Fv,_),g(i,gs,_),e(gs,Da),e(Da,q_),w(Pc,q_,null),e(gs,aJ),e(gs,A_),e(A_,rJ),g(i,Bv,_),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,Su),e(Su,pJ),e(qc,hJ),e(_t,mJ),e(_t,Ac),e(Ac,uJ),e(Ac,Zc),e(Zc,fJ),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,Xu),e(Xu,kJ),e(_s,vJ),e(_s,R_),e(R_,wJ),e(_s,MJ),e(go,$J),w(Ha,go,null),e(go,FJ),w(Ya,go,null),g(i,xv,_),g(i,bs,_),e(bs,Ka),e(Ka,G_),w(Gc,G_,null),e(bs,BJ),e(bs,V_),e(V_,xJ),g(i,Ev,_),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,Lu),e(Lu,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,Ou),e(Ou,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,jv,_),g(i,ks,_),e(ks,nr),e(nr,O_),w(Dc,O_,null),e(ks,KJ),e(ks,D_),e(D_,eC),g(i,zv,_),g(i,vs,_),w(Qc,vs,null),e(vs,tC),e(vs,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,uC),e(st,fC),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,kC),e(Yc,vC),e(Yc,ep),e(ep,wC),e(ep,sb),e(sb,MC),e(ep,$C),e(Zt,FC),e(Zt,ne),e(ne,BC),e(ne,ab),e(ab,xC),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,ub),e(ub,XC),e(ne,LC),e(ne,fb),e(fb,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,kb),e(kb,rI),e(ne,iI),e(ne,vb),e(vb,lI),e(ne,dI),e(ne,wb),e(wb,cI),e(ne,pI),e(ne,Mb),e(Mb,hI),e(ne,mI),e(Zt,uI),w(sr,Zt,null),g(i,Jv,_),g(i,ws,_),e(ws,ar),e(ar,$b),w(tp,$b,null),e(ws,fI),e(ws,Fb),e(Fb,gI),g(i,Cv,_),g(i,yt,_),w(op,yt,null),e(yt,_I),e(yt,np),e(np,bI),e(np,Bb),e(Bb,yI),e(np,TI),e(yt,kI),e(yt,sp),e(sp,vI),e(sp,Du),e(Du,wI),e(sp,MI),e(yt,$I),e(yt,ap),e(ap,FI),e(ap,rp),e(rp,BI),e(ap,xI),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,Qu),e(Qu,CI),e(Ms,II),e(Ms,xb),e(xb,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,Iv,_),g(i,$s,_),e($s,cr),e(cr,Eb),w(lp,Eb,null),e($s,AI),e($s,jb),e(jb,ZI),g(i,Uv,_),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,Hu),e(Hu,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(up,bo,null),e(bo,o4),e(bo,Fs),e(Fs,n4),e(Fs,Yu),e(Yu,s4),e(Fs,a4),e(Fs,Jb),e(Jb,r4),e(Fs,i4),e(bo,l4),w(hr,bo,null),e(bo,d4),w(mr,bo,null),g(i,Nv,_),g(i,Bs,_),e(Bs,ur),e(ur,Cb),w(fp,Cb,null),e(Bs,c4),e(Bs,Ib),e(Ib,p4),g(i,Pv,_),g(i,kt,_),w(gp,kt,null),e(kt,h4),e(kt,Ub),e(Ub,m4),e(kt,u4),e(kt,_p),e(_p,f4),e(_p,Ku),e(Ku,g4),e(_p,_4),e(kt,b4),e(kt,bp),e(bp,y4),e(bp,yp),e(yp,T4),e(bp,k4),e(kt,v4),w(fr,kt,null),e(kt,w4),e(kt,Gt),w(Tp,Gt,null),e(Gt,M4),e(Gt,xs),e(xs,$4),e(xs,ef),e(ef,F4),e(xs,B4),e(xs,Nb),e(Nb,x4),e(xs,E4),e(Gt,j4),w(gr,Gt,null),e(Gt,z4),w(_r,Gt,null),e(Gt,J4),w(br,Gt,null),g(i,Wv,_),g(i,Es,_),e(Es,yr),e(yr,Pb),w(kp,Pb,null),e(Es,C4),e(Es,Wb),e(Wb,I4),g(i,qv,_),g(i,vt,_),w(vp,vt,null),e(vt,U4),e(vt,qb),e(qb,N4),e(vt,P4),e(vt,wp),e(wp,W4),e(wp,tf),e(tf,q4),e(wp,A4),e(vt,Z4),e(vt,Mp),e(Mp,R4),e(Mp,$p),e($p,G4),e(Mp,V4),e(vt,S4),w(Tr,vt,null),e(vt,X4),e(vt,yo),w(Fp,yo,null),e(yo,L4),e(yo,js),e(js,O4),e(js,of),e(of,D4),e(js,Q4),e(js,Ab),e(Ab,H4),e(js,Y4),e(yo,K4),w(kr,yo,null),e(yo,e5),w(vr,yo,null),g(i,Av,_),g(i,zs,_),e(zs,wr),e(wr,Zb),w(Bp,Zb,null),e(zs,t5),e(zs,Rb),e(Rb,o5),g(i,Zv,_),g(i,wt,_),w(xp,wt,null),e(wt,n5),e(wt,Gb),e(Gb,s5),e(wt,a5),e(wt,Ep),e(Ep,r5),e(Ep,nf),e(nf,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,u5),e(wt,Vt),w(Jp,Vt,null),e(Vt,f5),e(Vt,Js),e(Js,g5),e(Js,sf),e(sf,_5),e(Js,b5),e(Js,Vb),e(Vb,y5),e(Js,T5),e(Vt,k5),w($r,Vt,null),e(Vt,v5),w(Fr,Vt,null),e(Vt,w5),w(Br,Vt,null),g(i,Rv,_),g(i,Cs,_),e(Cs,xr),e(xr,Sb),w(Cp,Sb,null),e(Cs,M5),e(Cs,Xb),e(Xb,$5),g(i,Gv,_),g(i,Mt,_),w(Ip,Mt,null),e(Mt,F5),e(Mt,Is),e(Is,B5),e(Is,Lb),e(Lb,x5),e(Is,E5),e(Is,Ob),e(Ob,j5),e(Is,z5),e(Mt,J5),e(Mt,Up),e(Up,C5),e(Up,af),e(af,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,rf),e(rf,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,Vv,_),g(i,Ns,_),e(Ns,Cr),e(Cr,Qb),w(qp,Qb,null),e(Ns,H5),e(Ns,Hb),e(Hb,Y5),g(i,Sv,_),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,lf),e(lf,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,u3),e(Ao,f3),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,k3),e(Ps,sy),e(sy,v3),e(Ps,w3),e(Ps,ay),e(ay,M3),e(Ps,$3),e(To,F3),w(Ir,To,null),e(To,B3),w(Ur,To,null),g(i,Xv,_),g(i,Ws,_),e(Ws,Nr),e(Nr,ry),w(Dp,ry,null),e(Ws,x3),e(Ws,iy),e(iy,E3),g(i,Lv,_),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,df),e(df,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,uy),e(uy,nh),e(nh,K3),e(rt,eU),e(rt,ko),w(sh,ko,null),e(ko,tU),e(ko,As),e(As,oU),e(As,fy),e(fy,nU),e(As,sU),e(As,gy),e(gy,aU),e(As,rU),e(ko,iU),w(Pr,ko,null),e(ko,lU),w(Wr,ko,null),g(i,Ov,_),g(i,Zs,_),e(Zs,qr),e(qr,_y),w(ah,_y,null),e(Zs,dU),e(Zs,by),e(by,cU),g(i,Dv,_),g(i,it,_),w(rh,it,null),e(it,pU),e(it,yy),e(yy,hU),e(it,mU),e(it,ih),e(ih,uU),e(ih,cf),e(cf,fU),e(ih,gU),e(it,_U),e(it,lh),e(lh,bU),e(lh,dh),e(dh,yU),e(lh,TU),e(it,kU),e(it,Ty),e(Ty,vU),e(it,wU),e(it,Ro),e(Ro,ky),e(ky,ch),e(ch,MU),e(Ro,$U),e(Ro,vy),e(vy,ph),e(ph,FU),e(Ro,BU),e(Ro,wy),e(wy,hh),e(hh,xU),e(Ro,EU),e(Ro,My),e(My,mh),e(mh,jU),e(it,zU),e(it,vo),w(uh,vo,null),e(vo,JU),e(vo,Rs),e(Rs,CU),e(Rs,$y),e($y,IU),e(Rs,UU),e(Rs,Fy),e(Fy,NU),e(Rs,PU),e(vo,WU),w(Ar,vo,null),e(vo,qU),w(Zr,vo,null),g(i,Qv,_),g(i,Gs,_),e(Gs,Rr),e(Rr,By),w(fh,By,null),e(Gs,AU),e(Gs,xy),e(xy,ZU),g(i,Hv,_),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,pf),e(pf,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,kh),e(kh,nN),e(Go,sN),e(Go,Jy),e(Jy,vh),e(vh,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($h,wo,null),e(wo,pN),e(wo,Vs),e(Vs,hN),e(Vs,Uy),e(Uy,mN),e(Vs,uN),e(Vs,Ny),e(Ny,fN),e(Vs,gN),e(wo,_N),w(Gr,wo,null),e(wo,bN),w(Vr,wo,null),g(i,Yv,_),g(i,Ss,_),e(Ss,Sr),e(Sr,Py),w(Fh,Py,null),e(Ss,yN),e(Ss,Wy),e(Wy,TN),g(i,Kv,_),g(i,dt,_),w(Bh,dt,null),e(dt,kN),e(dt,xh),e(xh,vN),e(xh,qy),e(qy,wN),e(xh,MN),e(dt,$N),e(dt,Eh),e(Eh,FN),e(Eh,hf),e(hf,BN),e(Eh,xN),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,mf),e(mf,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,u9),e(So,Yy),e(Yy,Gh),e(Gh,f9),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,$o),w(Xh,$o,null),e($o,k9),e($o,Os),e(Os,v9),e(Os,tT),e(tT,w9),e(Os,M9),e(Os,oT),e(oT,$9),e(Os,F9),e($o,B9),w(Dr,$o,null),e($o,x9),w(Qr,$o,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,uf),e(uf,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,Fo),w(om,Fo,null),e(Fo,Y9),e(Fo,Qs),e(Qs,K9),e(Qs,pT),e(pT,eP),e(Qs,tP),e(Qs,hT),e(hT,oP),e(Qs,nP),e(Fo,sP),w(Yr,Fo,null),e(Fo,aP),w(Kr,Fo,null),g(i,sw,_),g(i,Hs,_),e(Hs,ei),e(ei,mT),w(nm,mT,null),e(Hs,rP),e(Hs,uT),e(uT,iP),g(i,aw,_),g(i,ht,_),w(sm,ht,null),e(ht,lP),e(ht,fT),e(fT,dP),e(ht,cP),e(ht,am),e(am,pP),e(am,ff),e(ff,hP),e(am,mP),e(ht,uP),e(ht,rm),e(rm,fP),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,kP),e(Lo,vP),e(Lo,bT),e(bT,dm),e(dm,wP),e(Lo,MP),e(Lo,yT),e(yT,cm),e(cm,$P),e(Lo,FP),e(Lo,TT),e(TT,pm),e(pm,BP),e(ht,xP),e(ht,Bo),w(hm,Bo,null),e(Bo,EP),e(Bo,Ys),e(Ys,jP),e(Ys,kT),e(kT,zP),e(Ys,JP),e(Ys,vT),e(vT,CP),e(Ys,IP),e(Bo,UP),w(ti,Bo,null),e(Bo,NP),w(oi,Bo,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(um,mt,null),e(mt,qP),e(mt,ea),e(ea,AP),e(ea,$T),e($T,ZP),e(ea,RP),e(ea,FT),e(FT,GP),e(ea,VP),e(mt,SP),e(mt,fm),e(fm,XP),e(fm,gf),e(gf,LP),e(fm,OP),e(mt,DP),e(mt,gm),e(gm,QP),e(gm,_m),e(_m,HP),e(gm,YP),e(mt,KP),e(mt,BT),e(BT,eW),e(mt,tW),e(mt,Oo),e(Oo,xT),e(xT,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,km),e(km,lW),e(mt,dW),e(mt,xo),w(vm,xo,null),e(xo,cW),e(xo,ta),e(ta,pW),e(ta,JT),e(JT,hW),e(ta,mW),e(ta,CT),e(CT,uW),e(ta,fW),e(xo,gW),w(si,xo,null),e(xo,_W),w(ai,xo,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}),fa.$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}),va.$set(PT);const WT={};_&2&&(WT.$$scope={dirty:_,ctx:i}),wa.$set(WT);const $m={};_&2&&($m.$$scope={dirty:_,ctx:i}),$a.$set($m);const qT={};_&2&&(qT.$$scope={dirty:_,ctx:i}),Fa.$set(qT);const AT={};_&2&&(AT.$$scope={dirty:_,ctx:i}),xa.$set(AT);const ZT={};_&2&&(ZT.$$scope={dirty:_,ctx:i}),Ea.$set(ZT);const Fm={};_&2&&(Fm.$$scope={dirty:_,ctx:i}),za.$set(Fm);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 Bm={};_&2&&(Bm.$$scope={dirty:_,ctx:i}),Qa.$set(Bm);const KT={};_&2&&(KT.$$scope={dirty:_,ctx:i}),Ha.$set(KT);const oa={};_&2&&(oa.$$scope={dirty:_,ctx:i}),Ya.$set(oa);const ek={};_&2&&(ek.$$scope={dirty:_,ctx:i}),er.$set(ek);const tk={};_&2&&(tk.$$scope={dirty:_,ctx:i}),tr.$set(tk);const ok={};_&2&&(ok.$$scope={dirty:_,ctx:i}),or.$set(ok);const nk={};_&2&&(nk.$$scope={dirty:_,ctx:i}),sr.$set(nk);const sk={};_&2&&(sk.$$scope={dirty:_,ctx:i}),rr.$set(sk);const na={};_&2&&(na.$$scope={dirty:_,ctx:i}),ir.$set(na);const ak={};_&2&&(ak.$$scope={dirty:_,ctx:i}),lr.$set(ak);const rk={};_&2&&(rk.$$scope={dirty:_,ctx:i}),dr.$set(rk);const xm={};_&2&&(xm.$$scope={dirty:_,ctx:i}),pr.$set(xm);const ik={};_&2&&(ik.$$scope={dirty:_,ctx:i}),hr.$set(ik);const lk={};_&2&&(lk.$$scope={dirty:_,ctx:i}),mr.$set(lk);const dk={};_&2&&(dk.$$scope={dirty:_,ctx:i}),fr.$set(dk);const ck={};_&2&&(ck.$$scope={dirty:_,ctx:i}),gr.$set(ck);const ut={};_&2&&(ut.$$scope={dirty:_,ctx:i}),_r.$set(ut);const Em={};_&2&&(Em.$$scope={dirty:_,ctx:i}),br.$set(Em);const pk={};_&2&&(pk.$$scope={dirty:_,ctx:i}),Tr.$set(pk);const jm={};_&2&&(jm.$$scope={dirty:_,ctx:i}),kr.$set(jm);const hk={};_&2&&(hk.$$scope={dirty:_,ctx:i}),vr.$set(hk);const zm={};_&2&&(zm.$$scope={dirty:_,ctx:i}),Mr.$set(zm);const mk={};_&2&&(mk.$$scope={dirty:_,ctx:i}),$r.$set(mk);const Jm={};_&2&&(Jm.$$scope={dirty:_,ctx:i}),Fr.$set(Jm);const uk={};_&2&&(uk.$$scope={dirty:_,ctx:i}),Br.$set(uk);const un={};_&2&&(un.$$scope={dirty:_,ctx:i}),Er.$set(un);const fk={};_&2&&(fk.$$scope={dirty:_,ctx:i}),jr.$set(fk);const gk={};_&2&&(gk.$$scope={dirty:_,ctx:i}),zr.$set(gk);const _k={};_&2&&(_k.$$scope={dirty:_,ctx:i}),Jr.$set(_k);const fn={};_&2&&(fn.$$scope={dirty:_,ctx:i}),Ir.$set(fn);const bk={};_&2&&(bk.$$scope={dirty:_,ctx:i}),Ur.$set(bk);const yk={};_&2&&(yk.$$scope={dirty:_,ctx:i}),Pr.$set(yk);const Tk={};_&2&&(Tk.$$scope={dirty:_,ctx:i}),Wr.$set(Tk);const gn={};_&2&&(gn.$$scope={dirty:_,ctx:i}),Ar.$set(gn);const kk={};_&2&&(kk.$$scope={dirty:_,ctx:i}),Zr.$set(kk);const vk={};_&2&&(vk.$$scope={dirty:_,ctx:i}),Gr.$set(vk);const wk={};_&2&&(wk.$$scope={dirty:_,ctx:i}),Vr.$set(wk);const Mk={};_&2&&(Mk.$$scope={dirty:_,ctx:i}),Xr.$set(Mk);const $k={};_&2&&($k.$$scope={dirty:_,ctx:i}),Lr.$set($k);const $t={};_&2&&($t.$$scope={dirty:_,ctx:i}),Dr.$set($t);const Cm={};_&2&&(Cm.$$scope={dirty:_,ctx:i}),Qr.$set(Cm);const Fk={};_&2&&(Fk.$$scope={dirty:_,ctx:i}),Yr.$set(Fk);const sa={};_&2&&(sa.$$scope={dirty:_,ctx:i}),Kr.$set(sa);const Bk={};_&2&&(Bk.$$scope={dirty:_,ctx:i}),ti.$set(Bk);const xk={};_&2&&(xk.$$scope={dirty:_,ctx:i}),oi.$set(xk);const _n={};_&2&&(_n.$$scope={dirty:_,ctx:i}),si.$set(_n);const Ek={};_&2&&(Ek.$$scope={dirty:_,ctx:i}),ai.$set(Ek)},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(kl.$$.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(fd.$$.fragment,i),M(_d.$$.fragment,i),M(fa.$$.fragment,i),M(bd.$$.fragment,i),M(yd.$$.fragment,i),M(kd.$$.fragment,i),M(_a.$$.fragment,i),M(wd.$$.fragment,i),M(ba.$$.fragment,i),M(Md.$$.fragment,i),M($d.$$.fragment,i),M(Bd.$$.fragment,i),M(Ed.$$.fragment,i),M(zd.$$.fragment,i),M(Jd.$$.fragment,i),M(Cd.$$.fragment,i),M(qd.$$.fragment,i),M(va.$$.fragment,i),M(wa.$$.fragment,i),M(Ad.$$.fragment,i),M(Zd.$$.fragment,i),M(Sd.$$.fragment,i),M($a.$$.fragment,i),M(Fa.$$.fragment,i),M(Xd.$$.fragment,i),M(Ld.$$.fragment,i),M(Yd.$$.fragment,i),M(xa.$$.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(uc.$$.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($c.$$.fragment,i),M(Fc.$$.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(up.$$.fragment,i),M(hr.$$.fragment,i),M(mr.$$.fragment,i),M(fp.$$.fragment,i),M(gp.$$.fragment,i),M(fr.$$.fragment,i),M(Tp.$$.fragment,i),M(gr.$$.fragment,i),M(_r.$$.fragment,i),M(br.$$.fragment,i),M(kp.$$.fragment,i),M(vp.$$.fragment,i),M(Tr.$$.fragment,i),M(Fp.$$.fragment,i),M(kr.$$.fragment,i),M(vr.$$.fragment,i),M(Bp.$$.fragment,i),M(xp.$$.fragment,i),M(Mr.$$.fragment,i),M(Jp.$$.fragment,i),M($r.$$.fragment,i),M(Fr.$$.fragment,i),M(Br.$$.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(uh.$$.fragment,i),M(Ar.$$.fragment,i),M(Zr.$$.fragment,i),M(fh.$$.fragment,i),M(gh.$$.fragment,i),M($h.$$.fragment,i),M(Gr.$$.fragment,i),M(Vr.$$.fragment,i),M(Fh.$$.fragment,i),M(Bh.$$.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(um.$$.fragment,i),M(vm.$$.fragment,i),M(si.$$.fragment,i),M(ai.$$.fragment,i),lw=!0)},o(i){$(l.$$.fragment,i),$(de.$$.fragment,i),$(Ai.$$.fragment,i),$(Zi.$$.fragment,i),$(ol.$$.fragment,i),$(ml.$$.fragment,i),$(kl.$$.fragment,i),$(Kl.$$.fragment,i),$(ed.$$.fragment,i),$(ca.$$.fragment,i),$(od.$$.fragment,i),$(nd.$$.fragment,i),$(ad.$$.fragment,i),$(id.$$.fragment,i),$(dd.$$.fragment,i),$(ma.$$.fragment,i),$(cd.$$.fragment,i),$(pd.$$.fragment,i),$(hd.$$.fragment,i),$(fd.$$.fragment,i),$(_d.$$.fragment,i),$(fa.$$.fragment,i),$(bd.$$.fragment,i),$(yd.$$.fragment,i),$(kd.$$.fragment,i),$(_a.$$.fragment,i),$(wd.$$.fragment,i),$(ba.$$.fragment,i),$(Md.$$.fragment,i),$($d.$$.fragment,i),$(Bd.$$.fragment,i),$(Ed.$$.fragment,i),$(zd.$$.fragment,i),$(Jd.$$.fragment,i),$(Cd.$$.fragment,i),$(qd.$$.fragment,i),$(va.$$.fragment,i),$(wa.$$.fragment,i),$(Ad.$$.fragment,i),$(Zd.$$.fragment,i),$(Sd.$$.fragment,i),$($a.$$.fragment,i),$(Fa.$$.fragment,i),$(Xd.$$.fragment,i),$(Ld.$$.fragment,i),$(Yd.$$.fragment,i),$(xa.$$.fragment,i),$(Ea.$$.fragment,i),$(Kd.$$.fragment,i),$(ec.$$.fragment,i),$(ac.$$.fragment,i),$(za.$$.fragment,i),$(Ja.$$.fragment,i),$(rc.$$.fragment,i),$(ic.$$.fragment,i),$(hc.$$.fragment,i),$(Ia.$$.fragment,i),$(Ua.$$.fragment,i),$(mc.$$.fragment,i),$(uc.$$.fragment,i),$(bc.$$.fragment,i),$(Pa.$$.fragment,i),$(Wa.$$.fragment,i),$(qa.$$.fragment,i),$(yc.$$.fragment,i),$(Tc.$$.fragment,i),$(Mc.$$.fragment,i),$(Za.$$.fragment,i),$(Ra.$$.fragment,i),$($c.$$.fragment,i),$(Fc.$$.fragment,i),$(jc.$$.fragment,i),$(Va.$$.fragment,i),$(Sa.$$.fragment,i),$(zc.$$.fragment,i),$(Jc.$$.fragment,i),$(Nc.$$.fragment,i),$(La.$$.fragment,i),$(Oa.$$.fragment,i),$(Pc.$$.fragment,i),$(Wc.$$.fragment,i),$(Qa.$$.fragment,i),$(Rc.$$.fragment,i),$(Ha.$$.fragment,i),$(Ya.$$.fragment,i),$(Gc.$$.fragment,i),$(Vc.$$.fragment,i),$(er.$$.fragment,i),$(Oc.$$.fragment,i),$(tr.$$.fragment,i),$(or.$$.fragment,i),$(Dc.$$.fragment,i),$(Qc.$$.fragment,i),$(Hc.$$.fragment,i),$(sr.$$.fragment,i),$(tp.$$.fragment,i),$(op.$$.fragment,i),$(rr.$$.fragment,i),$(ip.$$.fragment,i),$(ir.$$.fragment,i),$(lr.$$.fragment,i),$(dr.$$.fragment,i),$(lp.$$.fragment,i),$(dp.$$.fragment,i),$(pr.$$.fragment,i),$(up.$$.fragment,i),$(hr.$$.fragment,i),$(mr.$$.fragment,i),$(fp.$$.fragment,i),$(gp.$$.fragment,i),$(fr.$$.fragment,i),$(Tp.$$.fragment,i),$(gr.$$.fragment,i),$(_r.$$.fragment,i),$(br.$$.fragment,i),$(kp.$$.fragment,i),$(vp.$$.fragment,i),$(Tr.$$.fragment,i),$(Fp.$$.fragment,i),$(kr.$$.fragment,i),$(vr.$$.fragment,i),$(Bp.$$.fragment,i),$(xp.$$.fragment,i),$(Mr.$$.fragment,i),$(Jp.$$.fragment,i),$($r.$$.fragment,i),$(Fr.$$.fragment,i),$(Br.$$.fragment,i),$(Cp.$$.fragment,i),$(Ip.$$.fragment,i),$(Er.$$.fragment,i),$(Wp.$$.fragment,i),$(jr.$$.fragment,i),$(zr.$$.fragment,i),$(Jr.$$.fragment,i),$(qp.$$.fragment,i),$(Ap.$$.fragment,i),$(Op.$$.fragment,i),$(Ir.$$.fragment,i),$(Ur.$$.fragment,i),$(Dp.$$.fragment,i),$(Qp.$$.fragment,i),$(sh.$$.fragment,i),$(Pr.$$.fragment,i),$(Wr.$$.fragment,i),$(ah.$$.fragment,i),$(rh.$$.fragment,i),$(uh.$$.fragment,i),$(Ar.$$.fragment,i),$(Zr.$$.fragment,i),$(fh.$$.fragment,i),$(gh.$$.fragment,i),$($h.$$.fragment,i),$(Gr.$$.fragment,i),$(Vr.$$.fragment,i),$(Fh.$$.fragment,i),$(Bh.$$.fragment,i),$(Nh.$$.fragment,i),$(Xr.$$.fragment,i),$(Lr.$$.fragment,i),$(Ph.$$.fragment,i),$(Wh.$$.fragment,i),$(Xh.$$.fragment,i),$(Dr.$$.fragment,i),$(Qr.$$.fragment,i),$(Lh.$$.fragment,i),$(Oh.$$.fragment,i),$(om.$$.fragment,i),$(Yr.$$.fragment,i),$(Kr.$$.fragment,i),$(nm.$$.fragment,i),$(sm.$$.fragment,i),$(hm.$$.fragment,i),$(ti.$$.fragment,i),$(oi.$$.fragment,i),$(mm.$$.fragment,i),$(um.$$.fragment,i),$(vm.$$.fragment,i),$(si.$$.fragment,i),$(ai.$$.fragment,i),lw=!1},d(i){t(d),i&&t(y),i&&t(u),F(l),i&&t(we),i&&t(Z),i&&t(O),i&&t(ie),F(de),i&&t(Me),i&&t(R),i&&t(U),i&&t(ue),i&&t($e),i&&t(fe),i&&t(Fe),i&&t(C),i&&t(Be),i&&t(ge),i&&t(xe),i&&t(se),i&&t(Ve),i&&t(A),i&&t(Jk),i&&t(Nn),F(Ai),i&&t(Ck),i&&t(Rm),i&&t(Ik),F(Zi,i),i&&t(Uk),i&&t(tt),i&&t(Nk),F(ol,i),i&&t(Pk),i&&t(ft),i&&t(Wk),F(ml,i),i&&t(qk),i&&t(Wt),i&&t(Ak),F(kl,i),i&&t(Zk),i&&t(qt),i&&t(Rk),i&&t(lu),i&&t(Gk),i&&t(rn),i&&t(Vk),i&&t(Jl),i&&t(Sk),i&&t(la),i&&t(Xk),i&&t(Pl),i&&t(Lk),i&&t(hu),i&&t(Ok),i&&t(Al),i&&t(Dk),i&&t(Ft),i&&t(Qk),i&&t(Wn),F(Kl),i&&t(Hk),i&&t(so),F(ed),F(ca),i&&t(Yk),i&&t(An),F(od),i&&t(Kk),i&&t(ot),F(nd),F(ad),F(id),F(dd),F(ma),F(cd),i&&t(ev),i&&t(Rn),F(pd),i&&t(tv),i&&t(xt),F(hd),F(fd),F(_d),F(fa),i&&t(ov),i&&t(Vn),F(bd),i&&t(nv),i&&t(Et),F(yd),F(kd),F(_a),F(wd),F(ba),i&&t(sv),i&&t(Ln),F(Md),i&&t(av),i&&t(On),F($d),i&&t(rv),i&&t(Dn),F(Bd),i&&t(iv),i&&t(qo),F(Ed),F(zd),i&&t(lv),i&&t(Qn),F(Jd),i&&t(dv),i&&t(nt),F(Cd),F(qd),F(va),F(wa),i&&t(cv),i&&t(Yn),F(Ad),i&&t(pv),i&&t(jt),F(Zd),F(Sd),F($a),F(Fa),i&&t(hv),i&&t(ts),F(Xd),i&&t(mv),i&&t(zt),F(Ld),F(Yd),F(xa),F(Ea),i&&t(uv),i&&t(ns),F(Kd),i&&t(fv),i&&t(Jt),F(ec),F(ac),F(za),F(Ja),i&&t(gv),i&&t(as),F(rc),i&&t(_v),i&&t(Ct),F(ic),F(hc),F(Ia),F(Ua),i&&t(bv),i&&t(is),F(mc),i&&t(yv),i&&t(It),F(uc),F(bc),F(Pa),F(Wa),F(qa),i&&t(Tv),i&&t(ds),F(yc),i&&t(kv),i&&t(Ut),F(Tc),F(Mc),F(Za),F(Ra),i&&t(vv),i&&t(ps),F($c),i&&t(wv),i&&t(Nt),F(Fc),F(jc),F(Va),F(Sa),i&&t(Mv),i&&t(ms),F(zc),i&&t($v),i&&t(Pt),F(Jc),F(Nc),F(La),F(Oa),i&&t(Fv),i&&t(gs),F(Pc),i&&t(Bv),i&&t(_t),F(Wc),F(Qa),F(Rc),F(Ha),F(Ya),i&&t(xv),i&&t(bs),F(Gc),i&&t(Ev),i&&t(bt),F(Vc),F(er),F(Oc),F(tr),F(or),i&&t(jv),i&&t(ks),F(Dc),i&&t(zv),i&&t(vs),F(Qc),F(Hc),F(sr),i&&t(Jv),i&&t(ws),F(tp),i&&t(Cv),i&&t(yt),F(op),F(rr),F(ip),F(ir),F(lr),F(dr),i&&t(Iv),i&&t($s),F(lp),i&&t(Uv),i&&t(Tt),F(dp),F(pr),F(up),F(hr),F(mr),i&&t(Nv),i&&t(Bs),F(fp),i&&t(Pv),i&&t(kt),F(gp),F(fr),F(Tp),F(gr),F(_r),F(br),i&&t(Wv),i&&t(Es),F(kp),i&&t(qv),i&&t(vt),F(vp),F(Tr),F(Fp),F(kr),F(vr),i&&t(Av),i&&t(zs),F(Bp),i&&t(Zv),i&&t(wt),F(xp),F(Mr),F(Jp),F($r),F(Fr),F(Br),i&&t(Rv),i&&t(Cs),F(Cp),i&&t(Gv),i&&t(Mt),F(Ip),F(Er),F(Wp),F(jr),F(zr),F(Jr),i&&t(Vv),i&&t(Ns),F(qp),i&&t(Sv),i&&t(at),F(Ap),F(Op),F(Ir),F(Ur),i&&t(Xv),i&&t(Ws),F(Dp),i&&t(Lv),i&&t(rt),F(Qp),F(sh),F(Pr),F(Wr),i&&t(Ov),i&&t(Zs),F(ah),i&&t(Dv),i&&t(it),F(rh),F(uh),F(Ar),F(Zr),i&&t(Qv),i&&t(Gs),F(fh),i&&t(Hv),i&&t(lt),F(gh),F($h),F(Gr),F(Vr),i&&t(Yv),i&&t(Ss),F(Fh),i&&t(Kv),i&&t(dt),F(Bh),F(Nh),F(Xr),F(Lr),i&&t(ew),i&&t(Ls),F(Ph),i&&t(tw),i&&t(ct),F(Wh),F(Xh),F(Dr),F(Qr),i&&t(ow),i&&t(Ds),F(Lh),i&&t(nw),i&&t(pt),F(Oh),F(om),F(Yr),F(Kr),i&&t(sw),i&&t(Hs),F(nm),i&&t(aw),i&&t(ht),F(sm),F(hm),F(ti),F(oi),i&&t(rw),i&&t(Ks),F(mm),i&&t(iw),i&&t(mt),F(um),F(vm),F(si),F(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(B){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};
