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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=s("p"),y=o("Examples:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Examples:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 ZV(B){let d,y,u,f,b;return f=new ke({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=s("p"),y=o("pair mask has the following format:"),u=c(),v(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),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 RV(B){let d,y,u,f,b;return f=new ke({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=s("p"),y=o("pair mask has the following format:"),u=c(),v(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),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 GV(B){let d,y,u,f,b;return f=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRGQmVydFRva2VuaXplciUwQSUwQXRmX3Rva2VuaXplciUyMCUzRCUyMFRGQmVydFRva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIp",highlighted:`<span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TFBertTokenizer

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

tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
tf_tokenizer = TFBertTokenizer.from_tokenizer(tokenizer)`}}),{c(){d=s("p"),y=o("Examples:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Examples:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 VV(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 XV(B){let d,y,u,f,b;return f=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCZXJ0TW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJlcnQtYmFzZS11bmNhc2VkJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmVydE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BertModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertModel.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 LV(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 OV(B){let d,y,u,f,b;return f=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCZXJ0Rm9yUHJlVHJhaW5pbmclMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJlcnQtYmFzZS11bmNhc2VkJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmVydEZvclByZVRyYWluaW5nLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQXByZWRpY3Rpb25fbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5wcmVkaWN0aW9uX2xvZ2l0cyUwQXNlcV9yZWxhdGlvbnNoaXBfbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5zZXFfcmVsYXRpb25zaGlwX2xvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BertForPreTraining
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertForPreTraining.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>prediction_logits = outputs.prediction_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>seq_relationship_logits = outputs.seq_relationship_logits`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 DV(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 QV(B){let d,y,u,f,b;return f=new ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEJlcnRMTUhlYWRNb2RlbCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJlcnQtYmFzZS11bmNhc2VkJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmVydExNSGVhZE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEaW5wdXRzJTVCJTIyaW5wdXRfaWRzJTIyJTVEKSUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3MlMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BertLMHeadModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertLMHeadModel.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=inputs[<span class="hljs-string">&quot;input_ids&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 HV(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 YV(B){let d,y,u,f,b;return f=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCZXJ0Rm9yTWFza2VkTE0lMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJlcnQtYmFzZS11bmNhc2VkJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmVydEZvck1hc2tlZExNLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjAlNUJNQVNLJTVELiUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjByZXRyaWV2ZSUyMGluZGV4JTIwb2YlMjAlNUJNQVNLJTVEJTBBbWFza190b2tlbl9pbmRleCUyMCUzRCUyMChpbnB1dHMuaW5wdXRfaWRzJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQpJTVCMCU1RC5ub256ZXJvKGFzX3R1cGxlJTNEVHJ1ZSklNUIwJTVEJTBBJTBBcHJlZGljdGVkX3Rva2VuX2lkJTIwJTNEJTIwbG9naXRzJTVCMCUyQyUyMG1hc2tfdG9rZW5faW5kZXglNUQuYXJnbWF4KGF4aXMlM0QtMSklMEF0b2tlbml6ZXIuZGVjb2RlKHByZWRpY3RlZF90b2tlbl9pZCklMEElMEFsYWJlbHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjBQYXJpcy4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSU1QiUyMmlucHV0X2lkcyUyMiU1RCUwQSUyMyUyMG1hc2slMjBsYWJlbHMlMjBvZiUyMG5vbi0lNUJNQVNLJTVEJTIwdG9rZW5zJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2gud2hlcmUoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkJTJDJTIwbGFiZWxzJTJDJTIwLTEwMCklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpJTBBcm91bmQob3V0cHV0cy5sb3NzLml0ZW0oKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BertForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is [MASK].&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve index of [MASK]</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>].nonzero(as_tuple=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = logits[<span class="hljs-number">0</span>, mask_token_index].argmax(axis=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predicted_token_id)
<span class="hljs-string">&#x27;paris&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(<span class="hljs-string">&quot;The capital of France is Paris.&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># mask labels of non-[MASK] tokens</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.where(inputs.input_ids == tokenizer.mask_token_id, labels, -<span class="hljs-number">100</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(outputs.loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.88</span>`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 KV(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 ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCZXJ0Rm9yTmV4dFNlbnRlbmNlUHJlZGljdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBCZXJ0Rm9yTmV4dFNlbnRlbmNlUHJlZGljdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIySW4lMjBJdGFseSUyQyUyMHBpenphJTIwc2VydmVkJTIwaW4lMjBmb3JtYWwlMjBzZXR0aW5ncyUyQyUyMHN1Y2glMjBhcyUyMGF0JTIwYSUyMHJlc3RhdXJhbnQlMkMlMjBpcyUyMHByZXNlbnRlZCUyMHVuc2xpY2VkLiUyMiUwQW5leHRfc2VudGVuY2UlMjAlM0QlMjAlMjJUaGUlMjBza3klMjBpcyUyMGJsdWUlMjBkdWUlMjB0byUyMHRoZSUyMHNob3J0ZXIlMjB3YXZlbGVuZ3RoJTIwb2YlMjBibHVlJTIwbGlnaHQuJTIyJTBBZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIocHJvbXB0JTJDJTIwbmV4dF9zZW50ZW5jZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqZW5jb2RpbmclMkMlMjBsYWJlbHMlM0R0b3JjaC5Mb25nVGVuc29yKCU1QjElNUQpKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRzJTBBYXNzZXJ0JTIwbG9naXRzJTVCMCUyQyUyMDAlNUQlMjAlM0MlMjBsb2dpdHMlNUIwJTJDJTIwMSU1RCUyMCUyMCUyMyUyMG5leHQlMjBzZW50ZW5jZSUyMHdhcyUyMHJhbmRvbQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BertForNextSentencePrediction
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertForNextSentencePrediction.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>next_sentence = <span class="hljs-string">&quot;The sky is blue due to the shorter wavelength of blue light.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer(prompt, next_sentence, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding, labels=torch.LongTensor([<span class="hljs-number">1</span>]))
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">assert</span> logits[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>] &lt; logits[<span class="hljs-number">0</span>, <span class="hljs-number">1</span>]  <span class="hljs-comment"># next sentence was random</span>`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIydGV4dGF0dGFjayUyRmJlcnQtYmFzZS11bmNhc2VkLXllbHAtcG9sYXJpdHklMjIpJTBBbW9kZWwlMjAlM0QlMjBCZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIydGV4dGF0dGFjayUyRmJlcnQtYmFzZS11bmNhc2VkLXllbHAtcG9sYXJpdHklMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwbG9naXRzLmFyZ21heCgpLml0ZW0oKSUwQW1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9jbGFzc19pZCU1RCUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMEJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJ0ZXh0YXR0YWNrJTJGYmVydC1iYXNlLXVuY2FzZWQteWVscC1wb2xhcml0eSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcyUwQXJvdW5kKGxvc3MuaXRlbSgpJTJDJTIwMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;textattack/bert-base-uncased-yelp-polarity&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;textattack/bert-base-uncased-yelp-polarity&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = logits.argmax().item()
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;LABEL_1&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;textattack/bert-base-uncased-yelp-polarity&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.01</span>`}}),{c(){d=s("p"),y=o("Example of single-label classification:"),u=c(),v(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),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 ke({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIydGV4dGF0dGFjayUyRmJlcnQtYmFzZS11bmNhc2VkLXllbHAtcG9sYXJpdHklMjIpJTBBbW9kZWwlMjAlM0QlMjBCZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIydGV4dGF0dGFjayUyRmJlcnQtYmFzZS11bmNhc2VkLXllbHAtcG9sYXJpdHklMjIlMkMlMjBwcm9ibGVtX3R5cGUlM0QlMjJtdWx0aV9sYWJlbF9jbGFzc2lmaWNhdGlvbiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWRzJTIwJTNEJTIwdG9yY2guYXJhbmdlKDAlMkMlMjBsb2dpdHMuc2hhcGUlNUItMSU1RCklNUJ0b3JjaC5zaWdtb2lkKGxvZ2l0cykuc3F1ZWV6ZShkaW0lM0QwKSUyMCUzRSUyMDAuNSU1RCUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMEJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJ0ZXh0YXR0YWNrJTJGYmVydC1iYXNlLXVuY2FzZWQteWVscC1wb2xhcml0eSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BertForSequenceClassification

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = torch.arange(<span class="hljs-number">0</span>, logits.shape[-<span class="hljs-number">1</span>])[torch.sigmoid(logits).squeeze(dim=<span class="hljs-number">0</span>) &gt; <span class="hljs-number">0.5</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;textattack/bert-base-uncased-yelp-polarity&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.<span class="hljs-built_in">sum</span>(
<span class="hljs-meta">... </span>    torch.nn.functional.one_hot(predicted_class_ids[<span class="hljs-literal">None</span>, :].clone(), num_classes=num_labels), dim=<span class="hljs-number">1</span>
<span class="hljs-meta">... </span>).to(torch.<span class="hljs-built_in">float</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=s("p"),y=o("Example of multi-label classification:"),u=c(),v(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),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCZXJ0Rm9yTXVsdGlwbGVDaG9pY2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmJlcnQtYmFzZS11bmNhc2VkJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmVydEZvck11bHRpcGxlQ2hvaWNlLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJJbiUyMEl0YWx5JTJDJTIwcGl6emElMjBzZXJ2ZWQlMjBpbiUyMGZvcm1hbCUyMHNldHRpbmdzJTJDJTIwc3VjaCUyMGFzJTIwYXQlMjBhJTIwcmVzdGF1cmFudCUyQyUyMGlzJTIwcHJlc2VudGVkJTIwdW5zbGljZWQuJTIyJTBBY2hvaWNlMCUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdpdGglMjBhJTIwZm9yayUyMGFuZCUyMGElMjBrbmlmZS4lMjIlMEFjaG9pY2UxJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2hpbGUlMjBoZWxkJTIwaW4lMjB0aGUlMjBoYW5kLiUyMiUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvcigwKS51bnNxdWVlemUoMCklMjAlMjAlMjMlMjBjaG9pY2UwJTIwaXMlMjBjb3JyZWN0JTIwKGFjY29yZGluZyUyMHRvJTIwV2lraXBlZGlhJTIwJTNCKSklMkMlMjBiYXRjaCUyMHNpemUlMjAxJTBBJTBBZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIoJTVCcHJvbXB0JTJDJTIwcHJvbXB0JTVEJTJDJTIwJTVCY2hvaWNlMCUyQyUyMGNob2ljZTElNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTJDJTIwcGFkZGluZyUzRFRydWUpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqJTdCayUzQSUyMHYudW5zcXVlZXplKDApJTIwZm9yJTIwayUyQyUyMHYlMjBpbiUyMGVuY29kaW5nLml0ZW1zKCklN0QlMkMlMjBsYWJlbHMlM0RsYWJlbHMpJTIwJTIwJTIzJTIwYmF0Y2glMjBzaXplJTIwaXMlMjAxJTBBJTBBJTIzJTIwdGhlJTIwbGluZWFyJTIwY2xhc3NpZmllciUyMHN0aWxsJTIwbmVlZHMlMjB0byUyMGJlJTIwdHJhaW5lZCUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3MlMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BertForMultipleChoice
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCZXJ0Rm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZGJtZHolMkZiZXJ0LWxhcmdlLWNhc2VkLWZpbmV0dW5lZC1jb25sbDAzLWVuZ2xpc2glMjIpJTBBbW9kZWwlMjAlM0QlMjBCZXJ0Rm9yVG9rZW5DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZGJtZHolMkZiZXJ0LWxhcmdlLWNhc2VkLWZpbmV0dW5lZC1jb25sbDAzLWVuZ2xpc2glMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUwQSUyMCUyMCUyMCUyMCUyMkh1Z2dpbmdGYWNlJTIwaXMlMjBhJTIwY29tcGFueSUyMGJhc2VkJTIwaW4lMjBQYXJpcyUyMGFuZCUyME5ldyUyMFlvcmslMjIlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RGYWxzZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMEEpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSklMEElMEElMjMlMjBOb3RlJTIwdGhhdCUyMHRva2VucyUyMGFyZSUyMGNsYXNzaWZpZWQlMjByYXRoZXIlMjB0aGVuJTIwaW5wdXQlMjB3b3JkcyUyMHdoaWNoJTIwbWVhbnMlMjB0aGF0JTBBJTIzJTIwdGhlcmUlMjBtaWdodCUyMGJlJTIwbW9yZSUyMHByZWRpY3RlZCUyMHRva2VuJTIwY2xhc3NlcyUyMHRoYW4lMjB3b3Jkcy4lMEElMjMlMjBNdWx0aXBsZSUyMHRva2VuJTIwY2xhc3NlcyUyMG1pZ2h0JTIwYWNjb3VudCUyMGZvciUyMHRoZSUyMHNhbWUlMjB3b3JkJTBBcHJlZGljdGVkX3Rva2Vuc19jbGFzc2VzJTIwJTNEJTIwJTVCbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCdC5pdGVtKCklNUQlMjBmb3IlMjB0JTIwaW4lMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTVCMCU1RCU1RCUwQXByZWRpY3RlZF90b2tlbnNfY2xhc3NlcyUwQSUwQWxhYmVscyUyMCUzRCUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlMEFsb3NzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpLmxvc3MlMEFyb3VuZChsb3NzLml0ZW0oKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BertForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;dbmdz/bert-large-cased-finetuned-conll03-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;dbmdz/bert-large-cased-finetuned-conll03-english&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;HuggingFace is a company based in Paris and New York&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = logits.argmax(-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t.item()] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>]]
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes
[<span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;I-ORG&#x27;</span>, <span class="hljs-string">&#x27;I-ORG&#x27;</span>, <span class="hljs-string">&#x27;I-ORG&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;I-LOC&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;I-LOC&#x27;</span>, <span class="hljs-string">&#x27;I-LOC&#x27;</span>] 

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.01</span>`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCZXJ0Rm9yUXVlc3Rpb25BbnN3ZXJpbmclMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmRlZXBzZXQlMkZiZXJ0LWJhc2UtY2FzZWQtc3F1YWQyJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmVydEZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJkZWVwc2V0JTJGYmVydC1iYXNlLWNhc2VkLXNxdWFkMiUyMiklMEElMEFxdWVzdGlvbiUyQyUyMHRleHQlMjAlM0QlMjAlMjJXaG8lMjB3YXMlMjBKaW0lMjBIZW5zb24lM0YlMjIlMkMlMjAlMjJKaW0lMjBIZW5zb24lMjB3YXMlMjBhJTIwbmljZSUyMHB1cHBldCUyMiUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihxdWVzdGlvbiUyQyUyMHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNEJTIwb3V0cHV0cy5zdGFydF9sb2dpdHMuYXJnbWF4KCklMEFhbnN3ZXJfZW5kX2luZGV4JTIwJTNEJTIwb3V0cHV0cy5lbmRfbG9naXRzLmFyZ21heCgpJTBBJTBBcHJlZGljdF9hbnN3ZXJfdG9rZW5zJTIwJTNEJTIwaW5wdXRzLmlucHV0X2lkcyU1QjAlMkMlMjBhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0ElMjBhbnN3ZXJfZW5kX2luZGV4JTIwJTJCJTIwMSU1RCUwQXRva2VuaXplci5kZWNvZGUocHJlZGljdF9hbnN3ZXJfdG9rZW5zJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTBBJTBBJTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QjE0JTVEKSUwQXRhcmdldF9lbmRfaW5kZXglMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCMTUlNUQpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwc3RhcnRfcG9zaXRpb25zJTNEdGFyZ2V0X3N0YXJ0X2luZGV4JTJDJTIwZW5kX3Bvc2l0aW9ucyUzRHRhcmdldF9lbmRfaW5kZXgpJTBBbG9zcyUyMCUzRCUyMG91dHB1dHMubG9zcyUwQXJvdW5kKGxvc3MuaXRlbSgpJTJDJTIwMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BertForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> torch

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;deepset/bert-base-cased-squad2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;deepset/bert-base-cased-squad2&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = outputs.start_logits.argmax()
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = outputs.end_logits.argmax()

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predict_answer_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-string">&#x27;a nice puppet&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = torch.tensor([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">7.41</span>`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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,S,de,ze,V,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 `),S=s("code"),de=o("fit()"),ze=o(" and "),V=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 Ve=r(E);Ee=n(Ve,"having all inputs as keyword arguments (like PyTorch models), or"),Ve.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 `),S=a(z,"CODE",{});var Ge=r(S);de=n(Ge,"fit()"),Ge.forEach(t),ze=n(z," and "),V=a(z,"CODE",{});var De=r(V);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 Se=r(X);Ie=n(Se,"model(input_ids)"),Se.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,S),e(S,de),e(x,ze),e(x,V),e(V,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 ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkJlcnRNb2RlbCUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkJlcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbChpbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBertModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBertModel.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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,S,de,ze,V,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 `),S=s("code"),de=o("fit()"),ze=o(" and "),V=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 Ve=r(E);Ee=n(Ve,"having all inputs as keyword arguments (like PyTorch models), or"),Ve.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 `),S=a(z,"CODE",{});var Ge=r(S);de=n(Ge,"fit()"),Ge.forEach(t),ze=n(z," and "),V=a(z,"CODE",{});var De=r(V);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 Se=r(X);Ie=n(Se,"model(input_ids)"),Se.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,S),e(S,de),e(x,ze),e(x,V),e(V,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 ke({props:{code:"aW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFRGQmVydEZvclByZVRyYWluaW5nJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkJlcnRGb3JQcmVUcmFpbmluZy5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBaW5wdXRfaWRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RUcnVlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEElMjMlMjBCYXRjaCUyMHNpemUlMjAxJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0X2lkcyklMEFwcmVkaWN0aW9uX2xvZ2l0cyUyQyUyMHNlcV9yZWxhdGlvbnNoaXBfbG9naXRzJTIwJTNEJTIwb3V0cHV0cyU1QiUzQTIlNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBertForPreTraining

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(input_ids)
<span class="hljs-meta">&gt;&gt;&gt; </span>prediction_logits, seq_relationship_logits = outputs[:<span class="hljs-number">2</span>]`}}),{c(){d=s("p"),y=o("Examples:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Examples:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkJlcnRMTUhlYWRNb2RlbCUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkJlcnRMTUhlYWRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbChpbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBertLMHeadModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBertLMHeadModel.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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,S,de,ze,V,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 `),S=s("code"),de=o("fit()"),ze=o(" and "),V=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 Ve=r(E);Ee=n(Ve,"having all inputs as keyword arguments (like PyTorch models), or"),Ve.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 `),S=a(z,"CODE",{});var Ge=r(S);de=n(Ge,"fit()"),Ge.forEach(t),ze=n(z," and "),V=a(z,"CODE",{});var De=r(V);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 Se=r(X);Ie=n(Se,"model(input_ids)"),Se.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,S),e(S,de),e(x,ze),e(x,V),e(V,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 ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkJlcnRGb3JNYXNrZWRMTSUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkJlcnRGb3JNYXNrZWRMTS5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwJTVCTUFTSyU1RC4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjByZXRyaWV2ZSUyMGluZGV4JTIwb2YlMjAlNUJNQVNLJTVEJTBBbWFza190b2tlbl9pbmRleCUyMCUzRCUyMHRmLndoZXJlKChpbnB1dHMuaW5wdXRfaWRzJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQpJTVCMCU1RCklMEFzZWxlY3RlZF9sb2dpdHMlMjAlM0QlMjB0Zi5nYXRoZXJfbmQobG9naXRzJTVCMCU1RCUyQyUyMGluZGljZXMlM0RtYXNrX3Rva2VuX2luZGV4KSUwQSUwQXByZWRpY3RlZF90b2tlbl9pZCUyMCUzRCUyMHRmLm1hdGguYXJnbWF4KHNlbGVjdGVkX2xvZ2l0cyUyQyUyMGF4aXMlM0QtMSklMEF0b2tlbml6ZXIuZGVjb2RlKHByZWRpY3RlZF90b2tlbl9pZCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBertForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is [MASK].&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve index of [MASK]</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = tf.where((inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>selected_logits = tf.gather_nd(logits[<span class="hljs-number">0</span>], indices=mask_token_index)

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = tf.math.argmax(selected_logits, axis=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predicted_token_id)
<span class="hljs-string">&#x27;paris&#x27;</span>`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 ke({props:{code:"bGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwUGFyaXMuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMjMlMjBtYXNrJTIwbGFiZWxzJTIwb2YlMjBub24tJTVCTUFTSyU1RCUyMHRva2VucyUwQWxhYmVscyUyMCUzRCUyMHRmLndoZXJlKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCUyQyUyMGxhYmVscyUyQyUyMC0xMDApJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKSUwQXJvdW5kKGZsb2F0KG91dHB1dHMubG9zcyklMkMlMjAyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(<span class="hljs-string">&quot;The capital of France is Paris.&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># mask labels of non-[MASK] tokens</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.where(inputs.input_ids == tokenizer.mask_token_id, labels, -<span class="hljs-number">100</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(outputs.loss), <span class="hljs-number">2</span>)
<span class="hljs-number">0.88</span>`}}),{c(){v(d.$$.fragment)},l(u){k(d.$$.fragment,u)},m(u,f){w(d,u,f),y=!0},p:ve,i(u){y||(M(d.$$.fragment,u),y=!0)},o(u){$(d.$$.fragment,u),y=!1},d(u){F(d,u)}}}function vX(B){let d,y,u,f,b,l,m,E,Ee,we,Z,he,ee,x,je,G,me,qe,O,ie,le,S,de,ze,V,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 `),S=s("code"),de=o("fit()"),ze=o(" and "),V=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 Ve=r(E);Ee=n(Ve,"having all inputs as keyword arguments (like PyTorch models), or"),Ve.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 `),S=a(z,"CODE",{});var Ge=r(S);de=n(Ge,"fit()"),Ge.forEach(t),ze=n(z," and "),V=a(z,"CODE",{});var De=r(V);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 Se=r(X);Ie=n(Se,"model(input_ids)"),Se.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,S),e(S,de),e(x,ze),e(x,V),e(V,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 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 wX(B){let d,y,u,f,b;return f=new ke({props:{code:"aW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFRGQmVydEZvck5leHRTZW50ZW5jZVByZWRpY3Rpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGQmVydEZvck5leHRTZW50ZW5jZVByZWRpY3Rpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmJlcnQtYmFzZS11bmNhc2VkJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkluJTIwSXRhbHklMkMlMjBwaXp6YSUyMHNlcnZlZCUyMGluJTIwZm9ybWFsJTIwc2V0dGluZ3MlMkMlMjBzdWNoJTIwYXMlMjBhdCUyMGElMjByZXN0YXVyYW50JTJDJTIwaXMlMjBwcmVzZW50ZWQlMjB1bnNsaWNlZC4lMjIlMEFuZXh0X3NlbnRlbmNlJTIwJTNEJTIwJTIyVGhlJTIwc2t5JTIwaXMlMjBibHVlJTIwZHVlJTIwdG8lMjB0aGUlMjBzaG9ydGVyJTIwd2F2ZWxlbmd0aCUyMG9mJTIwYmx1ZSUyMGxpZ2h0LiUyMiUwQWVuY29kaW5nJTIwJTNEJTIwdG9rZW5pemVyKHByb21wdCUyQyUyMG5leHRfc2VudGVuY2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKGVuY29kaW5nJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTJDJTIwdG9rZW5fdHlwZV9pZHMlM0RlbmNvZGluZyU1QiUyMnRva2VuX3R5cGVfaWRzJTIyJTVEKSU1QjAlNUQlMEFhc3NlcnQlMjBsb2dpdHMlNUIwJTVEJTVCMCU1RCUyMCUzQyUyMGxvZ2l0cyU1QjAlNUQlNUIxJTVEJTIwJTIwJTIzJTIwdGhlJTIwbmV4dCUyMHNlbnRlbmNlJTIwd2FzJTIwcmFuZG9t",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBertForNextSentencePrediction

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBertForNextSentencePrediction.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>next_sentence = <span class="hljs-string">&quot;The sky is blue due to the shorter wavelength of blue light.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer(prompt, next_sentence, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(encoding[<span class="hljs-string">&quot;input_ids&quot;</span>], token_type_ids=encoding[<span class="hljs-string">&quot;token_type_ids&quot;</span>])[<span class="hljs-number">0</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">assert</span> logits[<span class="hljs-number">0</span>][<span class="hljs-number">0</span>] &lt; logits[<span class="hljs-number">0</span>][<span class="hljs-number">1</span>]  <span class="hljs-comment"># the next sentence was random</span>`}}),{c(){d=s("p"),y=o("Examples:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Examples:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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,S,de,ze,V,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 `),S=s("code"),de=o("fit()"),ze=o(" and "),V=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 Ve=r(E);Ee=n(Ve,"having all inputs as keyword arguments (like PyTorch models), or"),Ve.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 `),S=a(z,"CODE",{});var Ge=r(S);de=n(Ge,"fit()"),Ge.forEach(t),ze=n(z," and "),V=a(z,"CODE",{});var De=r(V);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 Se=r(X);Ie=n(Se,"model(input_ids)"),Se.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,S),e(S,de),e(x,ze),e(x,V),e(V,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 ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ5ZHNoaWVoJTJGYmVydC1iYXNlLXVuY2FzZWQteWVscC1wb2xhcml0eSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGQmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMnlkc2hpZWglMkZiZXJ0LWJhc2UtdW5jYXNlZC15ZWxwLXBvbGFyaXR5JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEElMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwaW50KHRmLm1hdGguYXJnbWF4KGxvZ2l0cyUyQyUyMGF4aXMlM0QtMSklNUIwJTVEKSUwQW1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9jbGFzc19pZCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBertForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;ydshieh/bert-base-uncased-yelp-polarity&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;ydshieh/bert-base-uncased-yelp-polarity&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = <span class="hljs-built_in">int</span>(tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;LABEL_1&#x27;</span>`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 ke({props:{code:"JTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwVEZCZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyeWRzaGllaCUyRmJlcnQtYmFzZS11bmNhc2VkLXllbHAtcG9sYXJpdHklMjIlMkMlMjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyklMEElMEFsYWJlbHMlMjAlM0QlMjB0Zi5jb25zdGFudCgxKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcyUwQXJvdW5kKGZsb2F0KGxvc3MpJTJDJTIwMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;ydshieh/bert-base-uncased-yelp-polarity&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.constant(<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(loss), <span class="hljs-number">2</span>)
<span class="hljs-number">0.01</span>`}}),{c(){v(d.$$.fragment)},l(u){k(d.$$.fragment,u)},m(u,f){w(d,u,f),y=!0},p:ve,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,S,de,ze,V,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 `),S=s("code"),de=o("fit()"),ze=o(" and "),V=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 Ve=r(E);Ee=n(Ve,"having all inputs as keyword arguments (like PyTorch models), or"),Ve.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 `),S=a(z,"CODE",{});var Ge=r(S);de=n(Ge,"fit()"),Ge.forEach(t),ze=n(z," and "),V=a(z,"CODE",{});var De=r(V);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 Se=r(X);Ie=n(Se,"model(input_ids)"),Se.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,S),e(S,de),e(x,ze),e(x,V),e(V,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 ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkJlcnRGb3JNdWx0aXBsZUNob2ljZSUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkJlcnRGb3JNdWx0aXBsZUNob2ljZS5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIySW4lMjBJdGFseSUyQyUyMHBpenphJTIwc2VydmVkJTIwaW4lMjBmb3JtYWwlMjBzZXR0aW5ncyUyQyUyMHN1Y2glMjBhcyUyMGF0JTIwYSUyMHJlc3RhdXJhbnQlMkMlMjBpcyUyMHByZXNlbnRlZCUyMHVuc2xpY2VkLiUyMiUwQWNob2ljZTAlMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aXRoJTIwYSUyMGZvcmslMjBhbmQlMjBhJTIwa25pZmUuJTIyJTBBY2hvaWNlMSUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdoaWxlJTIwaGVsZCUyMGluJTIwdGhlJTIwaGFuZC4lMjIlMEElMEFlbmNvZGluZyUyMCUzRCUyMHRva2VuaXplciglNUJwcm9tcHQlMkMlMjBwcm9tcHQlNUQlMkMlMjAlNUJjaG9pY2UwJTJDJTIwY2hvaWNlMSU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIlMkMlMjBwYWRkaW5nJTNEVHJ1ZSklMEFpbnB1dHMlMjAlM0QlMjAlN0JrJTNBJTIwdGYuZXhwYW5kX2RpbXModiUyQyUyMDApJTIwZm9yJTIwayUyQyUyMHYlMjBpbiUyMGVuY29kaW5nLml0ZW1zKCklN0QlMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUyMCUyMCUyMyUyMGJhdGNoJTIwc2l6ZSUyMGlzJTIwMSUwQSUwQSUyMyUyMHRoZSUyMGxpbmVhciUyMGNsYXNzaWZpZXIlMjBzdGlsbCUyMG5lZWRzJTIwdG8lMjBiZSUyMHRyYWluZWQlMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBertForMultipleChoice
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBertForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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,S,de,ze,V,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 `),S=s("code"),de=o("fit()"),ze=o(" and "),V=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 Ve=r(E);Ee=n(Ve,"having all inputs as keyword arguments (like PyTorch models), or"),Ve.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 `),S=a(z,"CODE",{});var Ge=r(S);de=n(Ge,"fit()"),Ge.forEach(t),ze=n(z," and "),V=a(z,"CODE",{});var De=r(V);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 Se=r(X);Ie=n(Se,"model(input_ids)"),Se.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,S),e(S,de),e(x,ze),e(x,V),e(V,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 ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkJlcnRGb3JUb2tlbkNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJkYm1keiUyRmJlcnQtbGFyZ2UtY2FzZWQtZmluZXR1bmVkLWNvbmxsMDMtZW5nbGlzaCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGQmVydEZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmRibWR6JTJGYmVydC1sYXJnZS1jYXNlZC1maW5ldHVuZWQtY29ubGwwMy1lbmdsaXNoJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjAlMjJIdWdnaW5nRmFjZSUyMGlzJTIwYSUyMGNvbXBhbnklMjBiYXNlZCUyMGluJTIwUGFyaXMlMjBhbmQlMjBOZXclMjBZb3JrJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyJTBBKSUwQSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEFwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTIwJTNEJTIwdGYubWF0aC5hcmdtYXgobG9naXRzJTJDJTIwYXhpcyUzRC0xKSUwQSUwQSUyMyUyME5vdGUlMjB0aGF0JTIwdG9rZW5zJTIwYXJlJTIwY2xhc3NpZmllZCUyMHJhdGhlciUyMHRoZW4lMjBpbnB1dCUyMHdvcmRzJTIwd2hpY2glMjBtZWFucyUyMHRoYXQlMEElMjMlMjB0aGVyZSUyMG1pZ2h0JTIwYmUlMjBtb3JlJTIwcHJlZGljdGVkJTIwdG9rZW4lMjBjbGFzc2VzJTIwdGhhbiUyMHdvcmRzLiUwQSUyMyUyME11bHRpcGxlJTIwdG9rZW4lMjBjbGFzc2VzJTIwbWlnaHQlMjBhY2NvdW50JTIwZm9yJTIwdGhlJTIwc2FtZSUyMHdvcmQlMEFwcmVkaWN0ZWRfdG9rZW5zX2NsYXNzZXMlMjAlM0QlMjAlNUJtb2RlbC5jb25maWcuaWQybGFiZWwlNUJ0JTVEJTIwZm9yJTIwdCUyMGluJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyU1QjAlNUQubnVtcHkoKS50b2xpc3QoKSU1RCUwQXByZWRpY3RlZF90b2tlbnNfY2xhc3Nlcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBertForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;dbmdz/bert-large-cased-finetuned-conll03-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;dbmdz/bert-large-cased-finetuned-conll03-english&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;HuggingFace is a company based in Paris and New York&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>].numpy().tolist()]
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes
[<span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;I-ORG&#x27;</span>, <span class="hljs-string">&#x27;I-ORG&#x27;</span>, <span class="hljs-string">&#x27;I-ORG&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;I-LOC&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;I-LOC&#x27;</span>, <span class="hljs-string">&#x27;I-LOC&#x27;</span>] `}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 ke({props:{code:"bGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3NzKSUwQXJvdW5kKGZsb2F0KGxvc3MpJTJDJTIwMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(model(**inputs, labels=labels).loss)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(loss), <span class="hljs-number">2</span>)
<span class="hljs-number">0.01</span>`}}),{c(){v(d.$$.fragment)},l(u){k(d.$$.fragment,u)},m(u,f){w(d,u,f),y=!0},p:ve,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,S,de,ze,V,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 `),S=s("code"),de=o("fit()"),ze=o(" and "),V=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 Ve=r(E);Ee=n(Ve,"having all inputs as keyword arguments (like PyTorch models), or"),Ve.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 `),S=a(z,"CODE",{});var Ge=r(S);de=n(Ge,"fit()"),Ge.forEach(t),ze=n(z," and "),V=a(z,"CODE",{});var De=r(V);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 Se=r(X);Ie=n(Se,"model(input_ids)"),Se.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,S),e(S,de),e(x,ze),e(x,V),e(V,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 ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkJlcnRGb3JRdWVzdGlvbkFuc3dlcmluZyUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeWRzaGllaCUyRmJlcnQtYmFzZS1jYXNlZC1zcXVhZDIlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkJlcnRGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyeWRzaGllaCUyRmJlcnQtYmFzZS1jYXNlZC1zcXVhZDIlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNEJTIwaW50KHRmLm1hdGguYXJnbWF4KG91dHB1dHMuc3RhcnRfbG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChvdXRwdXRzLmVuZF9sb2dpdHMlMkMlMjBheGlzJTNELTEpJTVCMCU1RCklMEElMEFwcmVkaWN0X2Fuc3dlcl90b2tlbnMlMjAlM0QlMjBpbnB1dHMuaW5wdXRfaWRzJTVCMCUyQyUyMGFuc3dlcl9zdGFydF9pbmRleCUyMCUzQSUyMGFuc3dlcl9lbmRfaW5kZXglMjAlMkIlMjAxJTVEJTBBdG9rZW5pemVyLmRlY29kZShwcmVkaWN0X2Fuc3dlcl90b2tlbnMp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFBertForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;ydshieh/bert-base-cased-squad2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFBertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;ydshieh/bert-base-cased-squad2&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = <span class="hljs-built_in">int</span>(tf.math.argmax(outputs.start_logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = <span class="hljs-built_in">int</span>(tf.math.argmax(outputs.end_logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predict_answer_tokens)
<span class="hljs-string">&#x27;a nice puppet&#x27;</span>`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 ke({props:{code:"JTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdGYuY29uc3RhbnQoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRmLmNvbnN0YW50KCU1QjE1JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG91dHB1dHMubG9zcyklMEFyb3VuZChmbG9hdChsb3NzKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = tf.constant([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = tf.constant([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(outputs.loss)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(loss), <span class="hljs-number">2</span>)
<span class="hljs-number">7.41</span>`}}),{c(){v(d.$$.fragment)},l(u){k(d.$$.fragment,u)},m(u,f){w(d,u,f),y=!0},p:ve,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 ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmVydE1vZGVsJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmVydE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBertModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertModel.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmVydEZvclByZVRyYWluaW5nJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmVydEZvclByZVRyYWluaW5nLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQXByZWRpY3Rpb25fbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5wcmVkaWN0aW9uX2xvZ2l0cyUwQXNlcV9yZWxhdGlvbnNoaXBfbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5zZXFfcmVsYXRpb25zaGlwX2xvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBertForPreTraining

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertForPreTraining.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>prediction_logits = outputs.prediction_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>seq_relationship_logits = outputs.seq_relationship_logits`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 SX(B){let d,y,u,f,b;return f=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmVydEZvckNhdXNhbExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmVydEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQSUyMyUyMHJldHJpZXZlJTIwbG9ndHMlMjBmb3IlMjBuZXh0JTIwdG9rZW4lMEFuZXh0X3Rva2VuX2xvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRzJTVCJTNBJTJDJTIwLTElNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBertForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertForCausalLM.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve logts for next token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>next_token_logits = outputs.logits[:, -<span class="hljs-number">1</span>]`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 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 XX(B){let d,y,u,f,b;return f=new ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmVydEZvck1hc2tlZExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmVydEZvck1hc2tlZExNLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjAlNUJNQVNLJTVELiUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBertForMaskedLM

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is [MASK].&quot;</span>, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmVydEZvck5leHRTZW50ZW5jZVByZWRpY3Rpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhCZXJ0Rm9yTmV4dFNlbnRlbmNlUHJlZGljdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIySW4lMjBJdGFseSUyQyUyMHBpenphJTIwc2VydmVkJTIwaW4lMjBmb3JtYWwlMjBzZXR0aW5ncyUyQyUyMHN1Y2glMjBhcyUyMGF0JTIwYSUyMHJlc3RhdXJhbnQlMkMlMjBpcyUyMHByZXNlbnRlZCUyMHVuc2xpY2VkLiUyMiUwQW5leHRfc2VudGVuY2UlMjAlM0QlMjAlMjJUaGUlMjBza3klMjBpcyUyMGJsdWUlMjBkdWUlMjB0byUyMHRoZSUyMHNob3J0ZXIlMjB3YXZlbGVuZ3RoJTIwb2YlMjBibHVlJTIwbGlnaHQuJTIyJTBBZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIocHJvbXB0JTJDJTIwbmV4dF9zZW50ZW5jZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmVuY29kaW5nKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRzJTBBYXNzZXJ0JTIwbG9naXRzJTVCMCUyQyUyMDAlNUQlMjAlM0MlMjBsb2dpdHMlNUIwJTJDJTIwMSU1RCUyMCUyMCUyMyUyMG5leHQlMjBzZW50ZW5jZSUyMHdhcyUyMHJhbmRvbQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBertForNextSentencePrediction

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertForNextSentencePrediction.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>next_sentence = <span class="hljs-string">&quot;The sky is blue due to the shorter wavelength of blue light.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer(prompt, next_sentence, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">assert</span> logits[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>] &lt; logits[<span class="hljs-number">0</span>, <span class="hljs-number">1</span>]  <span class="hljs-comment"># next sentence was random</span>`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhCZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBertForSequenceClassification

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmVydEZvck11bHRpcGxlQ2hvaWNlJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmVydEZvck11bHRpcGxlQ2hvaWNlLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJJbiUyMEl0YWx5JTJDJTIwcGl6emElMjBzZXJ2ZWQlMjBpbiUyMGZvcm1hbCUyMHNldHRpbmdzJTJDJTIwc3VjaCUyMGFzJTIwYXQlMjBhJTIwcmVzdGF1cmFudCUyQyUyMGlzJTIwcHJlc2VudGVkJTIwdW5zbGljZWQuJTIyJTBBY2hvaWNlMCUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdpdGglMjBhJTIwZm9yayUyMGFuZCUyMGElMjBrbmlmZS4lMjIlMEFjaG9pY2UxJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2hpbGUlMjBoZWxkJTIwaW4lMjB0aGUlMjBoYW5kLiUyMiUwQSUwQWVuY29kaW5nJTIwJTNEJTIwdG9rZW5pemVyKCU1QnByb21wdCUyQyUyMHByb21wdCU1RCUyQyUyMCU1QmNob2ljZTAlMkMlMjBjaG9pY2UxJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIlMkMlMjBwYWRkaW5nJTNEVHJ1ZSklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKiolN0JrJTNBJTIwdiU1Qk5vbmUlMkMlMjAlM0ElNUQlMjBmb3IlMjBrJTJDJTIwdiUyMGluJTIwZW5jb2RpbmcuaXRlbXMoKSU3RCklMEElMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBertForMultipleChoice

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBertForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;bert-base-uncased&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;jax&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**{k: v[<span class="hljs-literal">None</span>, :] <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()})

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmVydEZvclRva2VuQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhCZXJ0Rm9yVG9rZW5DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBertForTokenClassification

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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 ke({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmVydEZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYmVydC1iYXNlLXVuY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmVydEZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJiZXJ0LWJhc2UtdW5jYXNlZCUyMiklMEElMEFxdWVzdGlvbiUyQyUyMHRleHQlMjAlM0QlMjAlMjJXaG8lMjB3YXMlMjBKaW0lMjBIZW5zb24lM0YlMjIlMkMlMjAlMjJKaW0lMjBIZW5zb24lMjB3YXMlMjBhJTIwbmljZSUyMHB1cHBldCUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihxdWVzdGlvbiUyQyUyMHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBc3RhcnRfc2NvcmVzJTIwJTNEJTIwb3V0cHV0cy5zdGFydF9sb2dpdHMlMEFlbmRfc2NvcmVzJTIwJTNEJTIwb3V0cHV0cy5lbmRfbG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBertForQuestionAnswering

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

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits`}}),{c(){d=s("p"),y=o("Example:"),u=c(),v(f.$$.fragment)},l(l){d=a(l,"P",{});var m=r(d);y=n(m,"Example:"),m.forEach(t),u=p(l),k(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,y),g(l,u,m),w(f,l,m),b=!0},p:ve,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,S,de,ze,V,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,Ve,Xe,z,Le,Oe,Ge,De,Qe,q,L,He,Se,A,Ye,Re,Pe,Ke,K,et,w1,Jv,Nn,aa,rg,Ai,M1,ig,$1,Cv,Rm,F1,Iv,Zi,Uv,tt,Ri,B1,Gi,x1,E1,j1,Si,z1,Vi,J1,C1,I1,Xi,U1,Li,N1,P1,W1,Oi,q1,Di,A1,Z1,R1,Qo,Gm,G1,S1,Qi,V1,X1,Hi,L1,O1,D1,Ho,Sm,Q1,H1,Yi,Y1,K1,Ki,eM,tM,oM,Yo,Vm,nM,sM,el,aM,rM,tl,iM,lM,dM,lg,Xm,cM,Nv,ol,Pv,ft,nl,pM,sl,hM,mM,uM,Pn,fM,al,gM,_M,rl,bM,yM,TM,Ko,Lm,vM,kM,il,wM,MM,ll,$M,FM,BM,en,Om,xM,EM,dl,jM,zM,cl,JM,CM,IM,ra,Dm,UM,NM,pl,PM,WM,qM,Qm,hl,AM,ZM,RM,dg,Hm,GM,Wv,ml,qv,Wt,tn,Ym,SM,VM,ul,XM,LM,fl,OM,DM,QM,on,Km,HM,YM,gl,KM,e2,_l,t2,o2,n2,nn,eu,s2,a2,bl,r2,i2,yl,l2,d2,c2,tu,Tl,p2,h2,m2,cg,ou,u2,Av,vl,Zv,qt,sn,nu,f2,g2,kl,_2,b2,wl,y2,T2,v2,an,su,k2,w2,Ml,M2,$2,$l,F2,B2,x2,ia,au,E2,j2,Fl,z2,J2,C2,ru,Bl,I2,U2,N2,pg,iu,P2,Rv,lu,hg,W2,Gv,rn,ln,du,q2,A2,xl,Z2,R2,El,G2,S2,V2,dn,cu,X2,L2,jl,O2,D2,zl,Q2,H2,Y2,mg,pu,K2,Sv,Jl,e$,ug,t$,Vv,la,Cl,o$,Il,n$,s$,a$,Ul,r$,Nl,i$,l$,Xv,Pl,d$,fg,c$,Lv,hu,Wl,p$,ql,h$,m$,Ov,Al,u$,gg,f$,Dv,Ft,Zl,g$,Rl,_$,b$,y$,Gl,T$,Sl,v$,k$,w$,Vl,M$,Xl,$$,F$,B$,Ll,x$,Ol,E$,j$,z$,Dl,J$,Ql,C$,I$,U$,Hl,N$,Yl,P$,W$,Qv,Wn,da,_g,Kl,q$,bg,A$,Hv,so,ed,Z$,Wo,R$,mu,G$,S$,uu,V$,X$,td,L$,O$,D$,qn,Q$,fu,H$,Y$,gu,K$,eF,tF,ca,Yv,An,pa,yg,od,oF,Tg,nF,Kv,ot,nd,sF,vg,aF,rF,sd,iF,_u,lF,dF,cF,cn,ad,pF,kg,hF,mF,rd,bu,uF,wg,fF,gF,yu,_F,Mg,bF,yF,ha,id,TF,ld,vF,$g,kF,wF,MF,ao,dd,$F,Fg,FF,BF,ma,xF,Zn,EF,Bg,jF,zF,xg,JF,CF,IF,Tu,cd,ek,Rn,ua,Eg,pd,UF,jg,NF,tk,xt,hd,PF,md,WF,zg,qF,AF,ZF,ud,RF,vu,GF,SF,VF,pn,fd,XF,Jg,LF,OF,gd,ku,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,ok,Sn,ga,Wg,bd,cB,qg,pB,nk,Et,yd,hB,Vn,mB,Ag,uB,fB,Zg,gB,_B,bB,Td,yB,Rg,TB,vB,kB,hn,vd,wB,kd,MB,Gg,$B,FB,BB,_a,xB,mn,wd,EB,Xn,jB,Sg,zB,JB,Vg,CB,IB,UB,ba,sk,Ln,ya,Xg,Md,NB,Lg,PB,ak,On,$d,WB,Fd,qB,Mu,AB,ZB,rk,Dn,Bd,RB,xd,GB,$u,SB,VB,ik,qo,Ed,XB,jd,LB,Fu,OB,DB,QB,Ta,zd,HB,Og,YB,lk,Qn,va,Dg,Jd,KB,Qg,ex,dk,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_,vx,kx,t_,wx,Mx,o_,$x,Fx,n_,Bx,xx,Ex,io,qd,jx,Hn,zx,xu,Jx,Cx,s_,Ix,Ux,Nx,ka,Px,wa,ck,Yn,Ma,a_,Ad,Wx,r_,qx,pk,jt,Zd,Ax,Kn,Zx,i_,Rx,Gx,l_,Sx,Vx,Xx,Rd,Lx,Eu,Ox,Dx,Qx,Gd,Hx,Sd,Yx,Kx,eE,lo,Vd,tE,es,oE,ju,nE,sE,d_,aE,rE,iE,$a,lE,Fa,hk,ts,Ba,c_,Xd,dE,p_,cE,mk,zt,Ld,pE,Od,hE,h_,mE,uE,fE,Dd,gE,zu,_E,bE,yE,Qd,TE,Hd,vE,kE,wE,co,Yd,ME,os,$E,Ju,FE,BE,m_,xE,EE,jE,xa,zE,Ea,uk,ns,ja,u_,Kd,JE,f_,CE,fk,Jt,ec,IE,tc,UE,g_,NE,PE,WE,oc,qE,Cu,AE,ZE,RE,nc,GE,sc,SE,VE,XE,po,ac,LE,ss,OE,Iu,DE,QE,__,HE,YE,KE,za,ej,Ja,gk,as,Ca,b_,rc,tj,y_,oj,_k,Ct,ic,nj,lc,sj,T_,aj,rj,ij,dc,lj,Uu,dj,cj,pj,cc,hj,pc,mj,uj,fj,ho,hc,gj,rs,_j,Nu,bj,yj,v_,Tj,vj,kj,Ia,wj,Ua,bk,is,Na,k_,mc,Mj,w_,$j,yk,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,Sj,Wa,Vj,qa,Tk,ds,Aa,F_,yc,Xj,B_,Lj,vk,Ut,Tc,Oj,x_,Dj,Qj,vc,Hj,qu,Yj,Kj,e4,kc,t4,wc,o4,n4,s4,mo,Mc,a4,cs,r4,Au,i4,l4,E_,d4,c4,p4,Za,h4,Ra,kk,ps,Ga,j_,$c,m4,z_,u4,wk,Nt,Fc,f4,J_,g4,_4,Bc,b4,Zu,y4,T4,v4,xc,k4,Ec,w4,M4,$4,uo,jc,F4,hs,B4,Ru,x4,E4,C_,j4,z4,J4,Sa,C4,Va,Mk,ms,Xa,I_,zc,I4,U_,U4,$k,Pt,Jc,N4,us,P4,N_,W4,q4,P_,A4,Z4,R4,Cc,G4,Gu,S4,V4,X4,Ic,L4,Uc,O4,D4,Q4,fo,Nc,H4,fs,Y4,Su,K4,e3,W_,t3,o3,n3,La,s3,Oa,Fk,gs,Da,q_,Pc,a3,A_,r3,Bk,_t,Wc,i3,Z_,l3,d3,qc,c3,Vu,p3,h3,m3,Ac,u3,Zc,f3,g3,_3,Qa,b3,go,Rc,y3,_s,T3,Xu,v3,k3,R_,w3,M3,$3,Ha,F3,Ya,xk,bs,Ka,G_,Gc,B3,S_,x3,Ek,bt,Sc,E3,ys,j3,V_,z3,J3,X_,C3,I3,U3,Vc,N3,Lu,P3,W3,q3,Xc,A3,Lc,Z3,R3,G3,er,S3,_o,Oc,V3,Ts,X3,Ou,L3,O3,L_,D3,Q3,H3,tr,Y3,or,jk,vs,nr,O_,Dc,K3,D_,ez,zk,ks,Qc,tz,Zt,Hc,oz,st,nz,Q_,sz,az,H_,rz,iz,Y_,lz,dz,K_,cz,pz,eb,hz,mz,tb,uz,fz,ob,gz,_z,bz,Yc,Kc,yz,nb,Tz,vz,kz,ep,wz,sb,Mz,$z,Fz,ne,Bz,ab,xz,Ez,rb,jz,zz,ib,Jz,Cz,lb,Iz,Uz,db,Nz,Pz,cb,Wz,qz,pb,Az,Zz,hb,Rz,Gz,mb,Sz,Vz,ub,Xz,Lz,fb,Oz,Dz,gb,Qz,Hz,_b,Yz,Kz,bb,eJ,tJ,yb,oJ,nJ,Tb,sJ,aJ,vb,rJ,iJ,kb,lJ,dJ,wb,cJ,pJ,Mb,hJ,mJ,uJ,sr,Jk,ws,ar,$b,tp,fJ,Fb,gJ,Ck,yt,op,_J,np,bJ,Bb,yJ,TJ,vJ,sp,kJ,Du,wJ,MJ,$J,ap,FJ,rp,BJ,xJ,EJ,rr,jJ,Rt,ip,zJ,Ms,JJ,Qu,CJ,IJ,xb,UJ,NJ,PJ,ir,WJ,lr,qJ,dr,Ik,$s,cr,Eb,lp,AJ,jb,ZJ,Uk,Tt,dp,RJ,cp,GJ,zb,SJ,VJ,XJ,pp,LJ,Hu,OJ,DJ,QJ,hp,HJ,mp,YJ,KJ,eC,pr,tC,bo,up,oC,Fs,nC,Yu,sC,aC,Jb,rC,iC,lC,hr,dC,mr,Nk,Bs,ur,Cb,fp,cC,Ib,pC,Pk,vt,gp,hC,Ub,mC,uC,_p,fC,Ku,gC,_C,bC,bp,yC,yp,TC,vC,kC,fr,wC,Gt,Tp,MC,xs,$C,ef,FC,BC,Nb,xC,EC,jC,gr,zC,_r,JC,br,Wk,Es,yr,Pb,vp,CC,Wb,IC,qk,kt,kp,UC,qb,NC,PC,wp,WC,tf,qC,AC,ZC,Mp,RC,$p,GC,SC,VC,Tr,XC,yo,Fp,LC,js,OC,of,DC,QC,Ab,HC,YC,KC,vr,e5,kr,Ak,zs,wr,Zb,Bp,t5,Rb,o5,Zk,wt,xp,n5,Gb,s5,a5,Ep,r5,nf,i5,l5,d5,jp,c5,zp,p5,h5,m5,Mr,u5,St,Jp,f5,Js,g5,sf,_5,b5,Sb,y5,T5,v5,$r,k5,Fr,w5,Br,Rk,Cs,xr,Vb,Cp,M5,Xb,$5,Gk,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,Vt,Wp,R5,Us,G5,rf,S5,V5,Db,X5,L5,O5,jr,D5,zr,Q5,Jr,Sk,Ns,Cr,Qb,qp,H5,Hb,Y5,Vk,at,Ap,K5,Yb,eI,tI,Zp,oI,lf,nI,sI,aI,Rp,rI,Gp,iI,lI,dI,Kb,cI,pI,Ao,ey,Sp,hI,mI,ty,Vp,uI,fI,oy,Xp,gI,_I,ny,Lp,bI,yI,To,Op,TI,Ps,vI,sy,kI,wI,ay,MI,$I,FI,Ir,BI,Ur,Xk,Ws,Nr,ry,Dp,xI,iy,EI,Lk,rt,Qp,jI,qs,zI,ly,JI,CI,dy,II,UI,NI,Hp,PI,df,WI,qI,AI,Yp,ZI,Kp,RI,GI,SI,cy,VI,XI,Zo,py,eh,LI,OI,hy,th,DI,QI,my,oh,HI,YI,uy,nh,KI,eU,vo,sh,tU,As,oU,fy,nU,sU,gy,aU,rU,iU,Pr,lU,Wr,Ok,Zs,qr,_y,ah,dU,by,cU,Dk,it,rh,pU,yy,hU,mU,ih,uU,cf,fU,gU,_U,lh,bU,dh,yU,TU,vU,Ty,kU,wU,Ro,vy,ch,MU,$U,ky,ph,FU,BU,wy,hh,xU,EU,My,mh,jU,zU,ko,uh,JU,Rs,CU,$y,IU,UU,Fy,NU,PU,WU,Ar,qU,Zr,Qk,Gs,Rr,By,fh,AU,xy,ZU,Hk,lt,gh,RU,_h,GU,Ey,SU,VU,XU,bh,LU,pf,OU,DU,QU,yh,HU,Th,YU,KU,eN,jy,tN,oN,Go,zy,vh,nN,sN,Jy,kh,aN,rN,Cy,wh,iN,lN,Iy,Mh,dN,cN,wo,$h,pN,Ss,hN,Uy,mN,uN,Ny,fN,gN,_N,Gr,bN,Sr,Yk,Vs,Vr,Py,Fh,yN,Wy,TN,Kk,dt,Bh,vN,xh,kN,qy,wN,MN,$N,Eh,FN,hf,BN,xN,EN,jh,jN,zh,zN,JN,CN,Ay,IN,UN,So,Zy,Jh,NN,PN,Ry,Ch,WN,qN,Gy,Ih,AN,ZN,Sy,Uh,RN,GN,Mo,Nh,SN,Xs,VN,Vy,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,Vo,Hy,Rh,m9,u9,Yy,Gh,f9,g9,Ky,Sh,_9,b9,eT,Vh,y9,T9,$o,Xh,v9,Os,k9,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,S9,V9,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,vP,kP,bT,dm,wP,MP,yT,cm,$P,FP,TT,pm,BP,xP,Bo,hm,EP,Ys,jP,vT,zP,JP,kT,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,SP,VP,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,vm,lW,dW,xo,km,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 k1({props:{pipeline:"text-classification"}}),ol=new k1({props:{pipeline:"token-classification"}}),ml=new k1({props:{pipeline:"fill-mask"}}),vl=new k1({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/v4.30.0/en/model_doc/bert#transformers.BertModel">BertModel</a> or <a href="/docs/transformers/v4.30.0/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/v4.30.0/en/model_doc/bert#transformers.BertModel">BertModel</a> or <a href="/docs/transformers/v4.30.0/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/v4.30.0/src/transformers/models/bert/configuration_bert.py#L72"}}),ca=new Te({props:{anchor:"transformers.BertConfig.example",$$slots:{default:[AV]},$$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/v4.30.0/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/v4.30.0/src/transformers/models/bert/tokenization_bert.py#L267",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),id=new N({props:{name:"get_special_tokens_mask",anchor:"transformers.BertTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.BertTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.BertTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.BertTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/tokenization_bert.py#L292",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),dd=new N({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.BertTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.BertTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.BertTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/tokenization_bert.py#L320",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),ma=new Te({props:{anchor:"transformers.BertTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[ZV]},$$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/v4.30.0/src/transformers/models/bert/tokenization_bert.py#L349"}}),pd=new We({}),hd=new N({props:{name:"class transformers.BertTokenizerFast",anchor:"transformers.BertTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{name:"unk_token",val:" = '[UNK]'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '[PAD]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"tokenize_chinese_chars",val:" = True"},{name:"strip_accents",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BertTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
File containing the vocabulary.`,name:"vocab_file"},{anchor:"transformers.BertTokenizerFast.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.BertTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[UNK]&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.BertTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.BertTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[PAD]&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.BertTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.BertTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.BertTokenizerFast.clean_text",description:`<strong>clean_text</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to clean the text before tokenization by removing any control characters and replacing all
whitespaces by the classic one.`,name:"clean_text"},{anchor:"transformers.BertTokenizerFast.tokenize_chinese_chars",description:`<strong>tokenize_chinese_chars</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to tokenize Chinese characters. This should likely be deactivated for Japanese (see <a href="https://github.com/huggingface/transformers/issues/328" rel="nofollow">this
issue</a>).`,name:"tokenize_chinese_chars"},{anchor:"transformers.BertTokenizerFast.strip_accents",description:`<strong>strip_accents</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to strip all accents. If this option is not specified, then it will be determined by the
value for <code>lowercase</code> (as in the original BERT).`,name:"strip_accents"},{anchor:"transformers.BertTokenizerFast.wordpieces_prefix",description:`<strong>wordpieces_prefix</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;##&quot;</code>) &#x2014;
The prefix for subwords.`,name:"wordpieces_prefix"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/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/v4.30.0/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/v4.30.0/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:[RV]},$$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 set to false will use standard TF Text BertTokenizer, making it servable by TF Serving.`,name:"use_fast_bert_tokenizer"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/tokenization_bert_tf.py#L11"}}),vd=new N({props:{name:"from_pretrained",anchor:"transformers.TFBertTokenizer.from_pretrained",parameters:[{name:"pretrained_model_name_or_path",val:": typing.Union[str, os.PathLike]"},{name:"*init_inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBertTokenizer.from_pretrained.pretrained_model_name_or_path",description:`<strong>pretrained_model_name_or_path</strong> (<code>str</code> or <code>os.PathLike</code>) &#x2014;
The name or path to the pre-trained tokenizer.`,name:"pretrained_model_name_or_path"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/tokenization_bert_tf.py#L138"}}),_a=new Te({props:{anchor:"transformers.TFBertTokenizer.from_pretrained.example",$$slots:{default:[GV]},$$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/v4.30.0/src/transformers/models/bert/tokenization_bert_tf.py#L99"}}),ba=new Te({props:{anchor:"transformers.TFBertTokenizer.from_tokenizer.example",$$slots:{default:[SV]},$$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/v4.30.0/src/transformers/models/bert/modeling_bert.py#L770"}}),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/v4.30.0/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:": ndarray = None"},{name:"seq_relationship_logits",val:": ndarray = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[jax._src.numpy.ndarray.ndarray]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[jax._src.numpy.ndarray.ndarray]] = 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/v4.30.0/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/v4.30.0/src/flax/struct.py#L108"}}),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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/modeling_bert.py#L873"}}),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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/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/v4.30.0/src/transformers/models/bert/modeling_bert.py#L912",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ka=new Ae({props:{$$slots:{default:[VV]},$$scope:{ctx:B}}}),wa=new Te({props:{anchor:"transformers.BertModel.forward.example",$$slots:{default:[XV]},$$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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/modeling_bert.py#L1055"}}),Vd=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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/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/v4.30.0/src/transformers/models/bert/modeling_bert.py#L1073",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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:[LV]},$$scope:{ctx:B}}}),Fa=new Te({props:{anchor:"transformers.BertForPreTraining.forward.example",$$slots:{default:[OV]},$$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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/modeling_bert.py#L1161"}}),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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/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/v4.30.0/src/transformers/models/bert/modeling_bert.py#L1183",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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:[DV]},$$scope:{ctx:B}}}),Ea=new Te({props:{anchor:"transformers.BertLMHeadModel.forward.example",$$slots:{default:[QV]},$$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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/modeling_bert.py#L1301"}}),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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/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/v4.30.0/src/transformers/models/bert/modeling_bert.py#L1326",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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:[HV]},$$scope:{ctx:B}}}),Ja=new Te({props:{anchor:"transformers.BertForMaskedLM.forward.example",$$slots:{default:[YV]},$$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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/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/v4.30.0/src/transformers/models/bert/modeling_bert.py#L1422",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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:[KV]},$$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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/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/v4.30.0/src/transformers/models/bert/modeling_bert.py#L1533",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/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/v4.30.0/src/transformers/models/bert/modeling_bert.py#L1634",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/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/v4.30.0/src/transformers/models/bert/modeling_bert.py#L1731",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/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/v4.30.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Sa=new Ae({props:{$$slots:{default:[rX]},$$scope:{ctx:B}}}),Va=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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/modeling_bert.py#L1799"}}),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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/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/v4.30.0/src/transformers/models/bert/modeling_bert.py#L1812",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.30.0/src/transformers/models/bert/modeling_tf_bert.py#L1044",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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({}),Sc=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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.30.0/src/transformers/models/bert/modeling_tf_bert.py#L1136",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/src/transformers/models/bert/modeling_tf_bert.py#L1342",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.30.0/src/transformers/models/bert/modeling_tf_bert.py#L1248",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/src/transformers/models/bert/modeling_tf_bert.py#L1434"}}),pr=new Ae({props:{$$slots:{default:[vX]},$$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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.30.0/src/transformers/models/bert/modeling_tf_bert.py#L1444",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFNextSentencePredictorOutput"
>transformers.modeling_tf_outputs.TFNextSentencePredictorOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),hr=new Ae({props:{$$slots:{default:[kX]},$$scope:{ctx: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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.30.0/src/transformers/models/bert/modeling_tf_bert.py#L1540",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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}}}),vp=new We({}),kp=new N({props:{name:"class transformers.TFBertForMultipleChoice",anchor:"transformers.TFBertForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFBertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.30.0/src/transformers/models/bert/modeling_tf_bert.py#L1619",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/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/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),vr=new Ae({props:{$$slots:{default:[EX]},$$scope:{ctx:B}}}),kr=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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.30.0/src/transformers/models/bert/modeling_tf_bert.py#L1731",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/v4.30.0/src/transformers/models/bert/modeling_tf_bert.py#L1816",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/modeling_flax_bert.py#L856",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/modeling_flax_bert.py#L856",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/modeling_flax_bert.py#L856",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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:[SX]},$$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/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/modeling_flax_bert.py#L856",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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:[VX]},$$scope:{ctx:B}}}),Sr=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/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/modeling_flax_bert.py#L856",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/modeling_flax_bert.py#L856",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/modeling_flax_bert.py#L856",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/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/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/modeling_flax_bert.py#L856",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/modeling_flax_bert.py#L1593"}}),km=new N({props:{name:"__call__",anchor:"transformers.FlaxBertForQuestionAnswering.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxBertForQuestionAnswering.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/bert/modeling_flax_bert.py#L856",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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"),v(l.$$.fragment),m=c(),E=s("span"),Ee=o("BERT"),we=c(),Z=s("div"),he=s("a"),ee=s("img"),je=c(),G=s("a"),me=s("img"),O=c(),ie=s("h2"),le=s("a"),S=s("span"),v(de.$$.fragment),ze=c(),V=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"),Ve=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."),Se=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"),w1=o("."),Jv=c(),Nn=s("h2"),aa=s("a"),rg=s("span"),v(Ai.$$.fragment),M1=c(),ig=s("span"),$1=o("Resources"),Cv=c(),Rm=s("p"),F1=o("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with BERT. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),Iv=c(),v(Zi.$$.fragment),Uv=c(),tt=s("ul"),Ri=s("li"),B1=o("A blog post on "),Gi=s("a"),x1=o("BERT Text Classification in a different language"),E1=o("."),j1=c(),Si=s("li"),z1=o("A notebook for "),Vi=s("a"),J1=o("Finetuning BERT (and friends) for multi-label text classification"),C1=o("."),I1=c(),Xi=s("li"),U1=o("A notebook on how to "),Li=s("a"),N1=o("Finetune BERT for multi-label classification using PyTorch"),P1=o(". \u{1F30E}"),W1=c(),Oi=s("li"),q1=o("A notebook on how to "),Di=s("a"),A1=o("warm-start an EncoderDecoder model with BERT for summarization"),Z1=o("."),R1=c(),Qo=s("li"),Gm=s("a"),G1=o("BertForSequenceClassification"),S1=o(" is supported by this "),Qi=s("a"),V1=o("example script"),X1=o(" and "),Hi=s("a"),L1=o("notebook"),O1=o("."),D1=c(),Ho=s("li"),Sm=s("a"),Q1=o("TFBertForSequenceClassification"),H1=o(" is supported by this "),Yi=s("a"),Y1=o("example script"),K1=o(" and "),Ki=s("a"),eM=o("notebook"),tM=o("."),oM=c(),Yo=s("li"),Vm=s("a"),nM=o("FlaxBertForSequenceClassification"),sM=o(" is supported by this "),el=s("a"),aM=o("example script"),rM=o(" and "),tl=s("a"),iM=o("notebook"),lM=o("."),dM=c(),lg=s("li"),Xm=s("a"),cM=o("Text classification task guide"),Nv=c(),v(ol.$$.fragment),Pv=c(),ft=s("ul"),nl=s("li"),pM=o("A blog post on how to use "),sl=s("a"),hM=o("Hugging Face Transformers with Keras: Fine-tune a non-English BERT for Named Entity Recognition"),mM=o("."),uM=c(),Pn=s("li"),fM=o("A notebook for "),al=s("a"),gM=o("Finetuning BERT for named-entity recognition"),_M=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"),bM=o("version"),yM=o(" of the notebook instead."),TM=c(),Ko=s("li"),Lm=s("a"),vM=o("BertForTokenClassification"),kM=o(" is supported by this "),il=s("a"),wM=o("example script"),MM=o(" and "),ll=s("a"),$M=o("notebook"),FM=o("."),BM=c(),en=s("li"),Om=s("a"),xM=o("TFBertForTokenClassification"),EM=o(" is supported by this "),dl=s("a"),jM=o("example script"),zM=o(" and "),cl=s("a"),JM=o("notebook"),CM=o("."),IM=c(),ra=s("li"),Dm=s("a"),UM=o("FlaxBertForTokenClassification"),NM=o(" is supported by this "),pl=s("a"),PM=o("example script"),WM=o("."),qM=c(),Qm=s("li"),hl=s("a"),AM=o("Token classification"),ZM=o(" chapter of the \u{1F917} Hugging Face Course."),RM=c(),dg=s("li"),Hm=s("a"),GM=o("Token classification task guide"),Wv=c(),v(ml.$$.fragment),qv=c(),Wt=s("ul"),tn=s("li"),Ym=s("a"),SM=o("BertForMaskedLM"),VM=o(" is supported by this "),ul=s("a"),XM=o("example script"),LM=o(" and "),fl=s("a"),OM=o("notebook"),DM=o("."),QM=c(),on=s("li"),Km=s("a"),HM=o("TFBertForMaskedLM"),YM=o(" is supported by this "),gl=s("a"),KM=o("example script"),e2=o(" and "),_l=s("a"),t2=o("notebook"),o2=o("."),n2=c(),nn=s("li"),eu=s("a"),s2=o("FlaxBertForMaskedLM"),a2=o(" is supported by this "),bl=s("a"),r2=o("example script"),i2=o(" and "),yl=s("a"),l2=o("notebook"),d2=o("."),c2=c(),tu=s("li"),Tl=s("a"),p2=o("Masked language modeling"),h2=o(" chapter of the \u{1F917} Hugging Face Course."),m2=c(),cg=s("li"),ou=s("a"),u2=o("Masked language modeling task guide"),Av=c(),v(vl.$$.fragment),Zv=c(),qt=s("ul"),sn=s("li"),nu=s("a"),f2=o("BertForQuestionAnswering"),g2=o(" is supported by this "),kl=s("a"),_2=o("example script"),b2=o(" and "),wl=s("a"),y2=o("notebook"),T2=o("."),v2=c(),an=s("li"),su=s("a"),k2=o("TFBertForQuestionAnswering"),w2=o(" is supported by this "),Ml=s("a"),M2=o("example script"),$2=o(" and "),$l=s("a"),F2=o("notebook"),B2=o("."),x2=c(),ia=s("li"),au=s("a"),E2=o("FlaxBertForQuestionAnswering"),j2=o(" is supported by this "),Fl=s("a"),z2=o("example script"),J2=o("."),C2=c(),ru=s("li"),Bl=s("a"),I2=o("Question answering"),U2=o(" chapter of the \u{1F917} Hugging Face Course."),N2=c(),pg=s("li"),iu=s("a"),P2=o("Question answering task guide"),Rv=c(),lu=s("p"),hg=s("strong"),W2=o("Multiple choice"),Gv=c(),rn=s("ul"),ln=s("li"),du=s("a"),q2=o("BertForMultipleChoice"),A2=o(" is supported by this "),xl=s("a"),Z2=o("example script"),R2=o(" and "),El=s("a"),G2=o("notebook"),S2=o("."),V2=c(),dn=s("li"),cu=s("a"),X2=o("TFBertForMultipleChoice"),L2=o(" is supported by this "),jl=s("a"),O2=o("example script"),D2=o(" and "),zl=s("a"),Q2=o("notebook"),H2=o("."),Y2=c(),mg=s("li"),pu=s("a"),K2=o("Multiple choice task guide"),Sv=c(),Jl=s("p"),e$=o("\u26A1\uFE0F "),ug=s("strong"),t$=o("Inference"),Vv=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("."),Xv=c(),Pl=s("p"),d$=o("\u2699\uFE0F "),fg=s("strong"),c$=o("Pretraining"),Lv=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("."),Ov=c(),Al=s("p"),u$=o("\u{1F680} "),gg=s("strong"),f$=o("Deploy"),Dv=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 "),Sl=s("a"),v$=o("Setup Deep Learning environment for Hugging Face Transformers with Habana Gaudi on AWS"),k$=o("."),w$=c(),Vl=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("."),Qv=c(),Wn=s("h2"),da=s("a"),_g=s("span"),v(Kl.$$.fragment),q$=c(),bg=s("span"),A$=o("BertConfig"),Hv=c(),so=s("div"),v(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"),S$=o(" or a "),uu=s("a"),V$=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(),v(ca.$$.fragment),Yv=c(),An=s("h2"),pa=s("a"),yg=s("span"),v(od.$$.fragment),oF=c(),Tg=s("span"),nF=o("BertTokenizer"),Kv=c(),ot=s("div"),v(nd.$$.fragment),sF=c(),vg=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"),v(ad.$$.fragment),pF=c(),kg=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"),v(id.$$.fragment),TF=c(),ld=s("p"),vF=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"),kF=o("prepare_for_model"),wF=o(" method."),MF=c(),ao=s("div"),v(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(),v(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"),v(cd.$$.fragment),ek=c(),Rn=s("h2"),ua=s("a"),Eg=s("span"),v(pd.$$.fragment),UF=c(),jg=s("span"),NF=o("BertTokenizerFast"),tk=c(),xt=s("div"),v(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 "),vu=s("a"),GF=o("PreTrainedTokenizerFast"),SF=o(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),VF=c(),pn=s("div"),v(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"),ku=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"),v(_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(),v(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)."),ok=c(),Sn=s("h2"),ga=s("a"),Wg=s("span"),v(bd.$$.fragment),cB=c(),qg=s("span"),pB=o("TFBertTokenizer"),nk=c(),Et=s("div"),v(yd.$$.fragment),hB=c(),Vn=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"),vB=o(" inputs to outputs."),kB=c(),hn=s("div"),v(vd.$$.fragment),wB=c(),kd=s("p"),MB=o("Instantiate a "),Gg=s("code"),$B=o("TFBertTokenizer"),FB=o(" from a pre-trained tokenizer."),BB=c(),v(_a.$$.fragment),xB=c(),mn=s("div"),v(wd.$$.fragment),EB=c(),Xn=s("p"),jB=o("Initialize a "),Sg=s("code"),zB=o("TFBertTokenizer"),JB=o(" from an existing "),Vg=s("code"),CB=o("Tokenizer"),IB=o("."),UB=c(),v(ba.$$.fragment),sk=c(),Ln=s("h2"),ya=s("a"),Xg=s("span"),v(Md.$$.fragment),NB=c(),Lg=s("span"),PB=o("Bert specific outputs"),ak=c(),On=s("div"),v($d.$$.fragment),WB=c(),Fd=s("p"),qB=o("Output type of "),Mu=s("a"),AB=o("BertForPreTraining"),ZB=o("."),rk=c(),Dn=s("div"),v(Bd.$$.fragment),RB=c(),xd=s("p"),GB=o("Output type of "),$u=s("a"),SB=o("TFBertForPreTraining"),VB=o("."),ik=c(),qo=s("div"),v(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"),v(zd.$$.fragment),HB=c(),Og=s("p"),YB=o("\u201CReturns a new object replacing the specified fields with new values."),lk=c(),Qn=s("h2"),va=s("a"),Dg=s("span"),v(Jd.$$.fragment),KB=c(),Qg=s("span"),ex=o("BertModel"),dk=c(),nt=s("div"),v(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"),vx=o("is_decoder"),kx=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"),v(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(),v(ka.$$.fragment),Px=c(),v(wa.$$.fragment),ck=c(),Yn=s("h2"),Ma=s("a"),a_=s("span"),v(Ad.$$.fragment),Wx=c(),r_=s("span"),qx=o("BertForPreTraining"),pk=c(),jt=s("div"),v(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"),Sx=o("next sentence prediction (classification)"),Vx=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 "),Sd=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"),v(Vd.$$.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(),v($a.$$.fragment),lE=c(),v(Fa.$$.fragment),hk=c(),ts=s("h2"),Ba=s("a"),c_=s("span"),v(Xd.$$.fragment),dE=c(),p_=s("span"),cE=o("BertLMHeadModel"),mk=c(),zt=s("div"),v(Ld.$$.fragment),pE=c(),Od=s("p"),hE=o("Bert Model with a "),h_=s("code"),mE=o("language modeling"),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"),vE=o("torch.nn.Module"),kE=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),wE=c(),co=s("div"),v(Yd.$$.fragment),ME=c(),os=s("p"),$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(),v(xa.$$.fragment),zE=c(),v(Ea.$$.fragment),uk=c(),ns=s("h2"),ja=s("a"),u_=s("span"),v(Kd.$$.fragment),JE=c(),f_=s("span"),CE=o("BertForMaskedLM"),fk=c(),Jt=s("div"),v(ec.$$.fragment),IE=c(),tc=s("p"),UE=o("Bert Model with a "),g_=s("code"),NE=o("language modeling"),PE=o(" head on top."),WE=c(),oc=s("p"),qE=o("This model inherits from "),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"),SE=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.`),XE=c(),po=s("div"),v(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(),v(za.$$.fragment),ej=c(),v(Ja.$$.fragment),gk=c(),as=s("h2"),Ca=s("a"),b_=s("span"),v(rc.$$.fragment),tj=c(),y_=s("span"),oj=o("BertForNextSentencePrediction"),_k=c(),Ct=s("div"),v(ic.$$.fragment),nj=c(),lc=s("p"),sj=o("Bert Model with a "),T_=s("code"),aj=o("next sentence prediction (classification)"),rj=o(" head on top."),ij=c(),dc=s("p"),lj=o("This model inherits from "),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"),v(hc.$$.fragment),gj=c(),rs=s("p"),_j=o("The "),Nu=s("a"),bj=o("BertForNextSentencePrediction"),yj=o(" forward method, overrides the "),v_=s("code"),Tj=o("__call__"),vj=o(" special method."),kj=c(),v(Ia.$$.fragment),wj=c(),v(Ua.$$.fragment),bk=c(),is=s("h2"),Na=s("a"),k_=s("span"),v(mc.$$.fragment),Mj=c(),w_=s("span"),$j=o("BertForSequenceClassification"),yk=c(),It=s("div"),v(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"),v(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(),v(Pa.$$.fragment),Sj=c(),v(Wa.$$.fragment),Vj=c(),v(qa.$$.fragment),Tk=c(),ds=s("h2"),Aa=s("a"),F_=s("span"),v(yc.$$.fragment),Xj=c(),B_=s("span"),Lj=o("BertForMultipleChoice"),vk=c(),Ut=s("div"),v(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(),vc=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.)`),e4=c(),kc=s("p"),t4=o("This model is also a PyTorch "),wc=s("a"),o4=o("torch.nn.Module"),n4=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),s4=c(),mo=s("div"),v(Mc.$$.fragment),a4=c(),cs=s("p"),r4=o("The "),Au=s("a"),i4=o("BertForMultipleChoice"),l4=o(" forward method, overrides the "),E_=s("code"),d4=o("__call__"),c4=o(" special method."),p4=c(),v(Za.$$.fragment),h4=c(),v(Ra.$$.fragment),kk=c(),ps=s("h2"),Ga=s("a"),j_=s("span"),v($c.$$.fragment),m4=c(),z_=s("span"),u4=o("BertForTokenClassification"),wk=c(),Nt=s("div"),v(Fc.$$.fragment),f4=c(),J_=s("p"),g4=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.`),_4=c(),Bc=s("p"),b4=o("This model inherits from "),Zu=s("a"),y4=o("PreTrainedModel"),T4=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.)`),v4=c(),xc=s("p"),k4=o("This model is also a PyTorch "),Ec=s("a"),w4=o("torch.nn.Module"),M4=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),$4=c(),uo=s("div"),v(jc.$$.fragment),F4=c(),hs=s("p"),B4=o("The "),Ru=s("a"),x4=o("BertForTokenClassification"),E4=o(" forward method, overrides the "),C_=s("code"),j4=o("__call__"),z4=o(" special method."),J4=c(),v(Sa.$$.fragment),C4=c(),v(Va.$$.fragment),Mk=c(),ms=s("h2"),Xa=s("a"),I_=s("span"),v(zc.$$.fragment),I4=c(),U_=s("span"),U4=o("BertForQuestionAnswering"),$k=c(),Pt=s("div"),v(Jc.$$.fragment),N4=c(),us=s("p"),P4=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"),W4=o("span start logits"),q4=o(" and "),P_=s("code"),A4=o("span end logits"),Z4=o(")."),R4=c(),Cc=s("p"),G4=o("This model inherits from "),Gu=s("a"),S4=o("PreTrainedModel"),V4=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.)`),X4=c(),Ic=s("p"),L4=o("This model is also a PyTorch "),Uc=s("a"),O4=o("torch.nn.Module"),D4=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Q4=c(),fo=s("div"),v(Nc.$$.fragment),H4=c(),fs=s("p"),Y4=o("The "),Su=s("a"),K4=o("BertForQuestionAnswering"),e3=o(" forward method, overrides the "),W_=s("code"),t3=o("__call__"),o3=o(" special method."),n3=c(),v(La.$$.fragment),s3=c(),v(Oa.$$.fragment),Fk=c(),gs=s("h2"),Da=s("a"),q_=s("span"),v(Pc.$$.fragment),a3=c(),A_=s("span"),r3=o("TFBertModel"),Bk=c(),_t=s("div"),v(Wc.$$.fragment),i3=c(),Z_=s("p"),l3=o("The bare Bert Model transformer outputting raw hidden-states without any specific head on top."),d3=c(),qc=s("p"),c3=o("This model inherits from "),Vu=s("a"),p3=o("TFPreTrainedModel"),h3=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.)`),m3=c(),Ac=s("p"),u3=o("This model is also a "),Zc=s("a"),f3=o("tf.keras.Model"),g3=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.`),_3=c(),v(Qa.$$.fragment),b3=c(),go=s("div"),v(Rc.$$.fragment),y3=c(),_s=s("p"),T3=o("The "),Xu=s("a"),v3=o("TFBertModel"),k3=o(" forward method, overrides the "),R_=s("code"),w3=o("__call__"),M3=o(" special method."),$3=c(),v(Ha.$$.fragment),F3=c(),v(Ya.$$.fragment),xk=c(),bs=s("h2"),Ka=s("a"),G_=s("span"),v(Gc.$$.fragment),B3=c(),S_=s("span"),x3=o("TFBertForPreTraining"),Ek=c(),bt=s("div"),v(Sc.$$.fragment),E3=c(),ys=s("p"),j3=o(`Bert Model with two heads on top as done during the pretraining:
a `),V_=s("code"),z3=o("masked language modeling"),J3=o(" head and a "),X_=s("code"),C3=o("next sentence prediction (classification)"),I3=o(" head."),U3=c(),Vc=s("p"),N3=o("This model inherits from "),Lu=s("a"),P3=o("TFPreTrainedModel"),W3=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.)`),q3=c(),Xc=s("p"),A3=o("This model is also a "),Lc=s("a"),Z3=o("tf.keras.Model"),R3=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.`),G3=c(),v(er.$$.fragment),S3=c(),_o=s("div"),v(Oc.$$.fragment),V3=c(),Ts=s("p"),X3=o("The "),Ou=s("a"),L3=o("TFBertForPreTraining"),O3=o(" forward method, overrides the "),L_=s("code"),D3=o("__call__"),Q3=o(" special method."),H3=c(),v(tr.$$.fragment),Y3=c(),v(or.$$.fragment),jk=c(),vs=s("h2"),nr=s("a"),O_=s("span"),v(Dc.$$.fragment),K3=c(),D_=s("span"),ez=o("TFBertModelLMHeadModel"),zk=c(),ks=s("div"),v(Qc.$$.fragment),tz=c(),Zt=s("div"),v(Hc.$$.fragment),oz=c(),st=s("p"),nz=o("encoder_hidden_states  ("),Q_=s("code"),sz=o("tf.Tensor"),az=o(" of shape "),H_=s("code"),rz=o("(batch_size, sequence_length, hidden_size)"),iz=o(", "),Y_=s("em"),lz=o("optional"),dz=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"),cz=o("tf.Tensor"),pz=o(" of shape "),eb=s("code"),hz=o("(batch_size, sequence_length)"),mz=o(", "),tb=s("em"),uz=o("optional"),fz=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"),gz=o("[0, 1]"),_z=o(":"),bz=c(),Yc=s("ul"),Kc=s("li"),yz=o("1 for tokens that are "),nb=s("strong"),Tz=o("not masked"),vz=o(","),kz=c(),ep=s("li"),wz=o("0 for tokens that are "),sb=s("strong"),Mz=o("masked"),$z=o("."),Fz=c(),ne=s("p"),Bz=o("past_key_values ("),ab=s("code"),xz=o("Tuple[Tuple[tf.Tensor]]"),Ez=o(" of length "),rb=s("code"),jz=o("config.n_layers"),zz=o(`)
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If `),ib=s("code"),Jz=o("past_key_values"),Cz=o(" are used, the user can optionally input only the last "),lb=s("code"),Iz=o("decoder_input_ids"),Uz=o(` (those that
don\u2019t have their past key value states given to this model) of shape `),db=s("code"),Nz=o("(batch_size, 1)"),Pz=o(` instead of all
`),cb=s("code"),Wz=o("decoder_input_ids"),qz=o(" of shape "),pb=s("code"),Az=o("(batch_size, sequence_length)"),Zz=o(`.
use_cache (`),hb=s("code"),Rz=o("bool"),Gz=o(", "),mb=s("em"),Sz=o("optional"),Vz=o(", defaults to "),ub=s("code"),Xz=o("True"),Lz=o(`):
If set to `),fb=s("code"),Oz=o("True"),Dz=o(", "),gb=s("code"),Qz=o("past_key_values"),Hz=o(` key value states are returned and can be used to speed up decoding (see
`),_b=s("code"),Yz=o("past_key_values"),Kz=o("). Set to "),bb=s("code"),eJ=o("False"),tJ=o(" during training, "),yb=s("code"),oJ=o("True"),nJ=o(` during generation
labels (`),Tb=s("code"),sJ=o("tf.Tensor"),aJ=o(" or "),vb=s("code"),rJ=o("np.ndarray"),iJ=o(" of shape "),kb=s("code"),lJ=o("(batch_size, sequence_length)"),dJ=o(", "),wb=s("em"),cJ=o("optional"),pJ=o(`):
Labels for computing the cross entropy classification loss. Indices should be in `),Mb=s("code"),hJ=o("[0, ..., config.vocab_size - 1]"),mJ=o("."),uJ=c(),v(sr.$$.fragment),Jk=c(),ws=s("h2"),ar=s("a"),$b=s("span"),v(tp.$$.fragment),fJ=c(),Fb=s("span"),gJ=o("TFBertForMaskedLM"),Ck=c(),yt=s("div"),v(op.$$.fragment),_J=c(),np=s("p"),bJ=o("Bert Model with a "),Bb=s("code"),yJ=o("language modeling"),TJ=o(" head on top."),vJ=c(),sp=s("p"),kJ=o("This model inherits from "),Du=s("a"),wJ=o("TFPreTrainedModel"),MJ=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.)`),$J=c(),ap=s("p"),FJ=o("This model is also a "),rp=s("a"),BJ=o("tf.keras.Model"),xJ=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.`),EJ=c(),v(rr.$$.fragment),jJ=c(),Rt=s("div"),v(ip.$$.fragment),zJ=c(),Ms=s("p"),JJ=o("The "),Qu=s("a"),CJ=o("TFBertForMaskedLM"),IJ=o(" forward method, overrides the "),xb=s("code"),UJ=o("__call__"),NJ=o(" special method."),PJ=c(),v(ir.$$.fragment),WJ=c(),v(lr.$$.fragment),qJ=c(),v(dr.$$.fragment),Ik=c(),$s=s("h2"),cr=s("a"),Eb=s("span"),v(lp.$$.fragment),AJ=c(),jb=s("span"),ZJ=o("TFBertForNextSentencePrediction"),Uk=c(),Tt=s("div"),v(dp.$$.fragment),RJ=c(),cp=s("p"),GJ=o("Bert Model with a "),zb=s("code"),SJ=o("next sentence prediction (classification)"),VJ=o(" head on top."),XJ=c(),pp=s("p"),LJ=o("This model inherits from "),Hu=s("a"),OJ=o("TFPreTrainedModel"),DJ=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(),hp=s("p"),HJ=o("This model is also a "),mp=s("a"),YJ=o("tf.keras.Model"),KJ=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.`),eC=c(),v(pr.$$.fragment),tC=c(),bo=s("div"),v(up.$$.fragment),oC=c(),Fs=s("p"),nC=o("The "),Yu=s("a"),sC=o("TFBertForNextSentencePrediction"),aC=o(" forward method, overrides the "),Jb=s("code"),rC=o("__call__"),iC=o(" special method."),lC=c(),v(hr.$$.fragment),dC=c(),v(mr.$$.fragment),Nk=c(),Bs=s("h2"),ur=s("a"),Cb=s("span"),v(fp.$$.fragment),cC=c(),Ib=s("span"),pC=o("TFBertForSequenceClassification"),Pk=c(),vt=s("div"),v(gp.$$.fragment),hC=c(),Ub=s("p"),mC=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.`),uC=c(),_p=s("p"),fC=o("This model inherits from "),Ku=s("a"),gC=o("TFPreTrainedModel"),_C=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.)`),bC=c(),bp=s("p"),yC=o("This model is also a "),yp=s("a"),TC=o("tf.keras.Model"),vC=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.`),kC=c(),v(fr.$$.fragment),wC=c(),Gt=s("div"),v(Tp.$$.fragment),MC=c(),xs=s("p"),$C=o("The "),ef=s("a"),FC=o("TFBertForSequenceClassification"),BC=o(" forward method, overrides the "),Nb=s("code"),xC=o("__call__"),EC=o(" special method."),jC=c(),v(gr.$$.fragment),zC=c(),v(_r.$$.fragment),JC=c(),v(br.$$.fragment),Wk=c(),Es=s("h2"),yr=s("a"),Pb=s("span"),v(vp.$$.fragment),CC=c(),Wb=s("span"),IC=o("TFBertForMultipleChoice"),qk=c(),kt=s("div"),v(kp.$$.fragment),UC=c(),qb=s("p"),NC=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.`),PC=c(),wp=s("p"),WC=o("This model inherits from "),tf=s("a"),qC=o("TFPreTrainedModel"),AC=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.)`),ZC=c(),Mp=s("p"),RC=o("This model is also a "),$p=s("a"),GC=o("tf.keras.Model"),SC=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.`),VC=c(),v(Tr.$$.fragment),XC=c(),yo=s("div"),v(Fp.$$.fragment),LC=c(),js=s("p"),OC=o("The "),of=s("a"),DC=o("TFBertForMultipleChoice"),QC=o(" forward method, overrides the "),Ab=s("code"),HC=o("__call__"),YC=o(" special method."),KC=c(),v(vr.$$.fragment),e5=c(),v(kr.$$.fragment),Ak=c(),zs=s("h2"),wr=s("a"),Zb=s("span"),v(Bp.$$.fragment),t5=c(),Rb=s("span"),o5=o("TFBertForTokenClassification"),Zk=c(),wt=s("div"),v(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(),v(Mr.$$.fragment),u5=c(),St=s("div"),v(Jp.$$.fragment),f5=c(),Js=s("p"),g5=o("The "),sf=s("a"),_5=o("TFBertForTokenClassification"),b5=o(" forward method, overrides the "),Sb=s("code"),y5=o("__call__"),T5=o(" special method."),v5=c(),v($r.$$.fragment),k5=c(),v(Fr.$$.fragment),w5=c(),v(Br.$$.fragment),Rk=c(),Cs=s("h2"),xr=s("a"),Vb=s("span"),v(Cp.$$.fragment),M5=c(),Xb=s("span"),$5=o("TFBertForQuestionAnswering"),Gk=c(),Mt=s("div"),v(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(),v(Er.$$.fragment),Z5=c(),Vt=s("div"),v(Wp.$$.fragment),R5=c(),Us=s("p"),G5=o("The "),rf=s("a"),S5=o("TFBertForQuestionAnswering"),V5=o(" forward method, overrides the "),Db=s("code"),X5=o("__call__"),L5=o(" special method."),O5=c(),v(jr.$$.fragment),D5=c(),v(zr.$$.fragment),Q5=c(),v(Jr.$$.fragment),Sk=c(),Ns=s("h2"),Cr=s("a"),Qb=s("span"),v(qp.$$.fragment),H5=c(),Hb=s("span"),Y5=o("FlaxBertModel"),Vk=c(),at=s("div"),v(Ap.$$.fragment),K5=c(),Yb=s("p"),eI=o("The bare Bert Model transformer outputting raw hidden-states without any specific head on top."),tI=c(),Zp=s("p"),oI=o("This model inherits from "),lf=s("a"),nI=o("FlaxPreTrainedModel"),sI=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)`),aI=c(),Rp=s("p"),rI=o("This model is also a Flax Linen "),Gp=s("a"),iI=o("flax.linen.Module"),lI=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.`),dI=c(),Kb=s("p"),cI=o("Finally, this model supports inherent JAX features such as:"),pI=c(),Ao=s("ul"),ey=s("li"),Sp=s("a"),hI=o("Just-In-Time (JIT) compilation"),mI=c(),ty=s("li"),Vp=s("a"),uI=o("Automatic Differentiation"),fI=c(),oy=s("li"),Xp=s("a"),gI=o("Vectorization"),_I=c(),ny=s("li"),Lp=s("a"),bI=o("Parallelization"),yI=c(),To=s("div"),v(Op.$$.fragment),TI=c(),Ps=s("p"),vI=o("The "),sy=s("code"),kI=o("FlaxBertPreTrainedModel"),wI=o(" forward method, overrides the "),ay=s("code"),MI=o("__call__"),$I=o(" special method."),FI=c(),v(Ir.$$.fragment),BI=c(),v(Ur.$$.fragment),Xk=c(),Ws=s("h2"),Nr=s("a"),ry=s("span"),v(Dp.$$.fragment),xI=c(),iy=s("span"),EI=o("FlaxBertForPreTraining"),Lk=c(),rt=s("div"),v(Qp.$$.fragment),jI=c(),qs=s("p"),zI=o("Bert Model with two heads on top as done during the pretraining: a "),ly=s("code"),JI=o("masked language modeling"),CI=o(" head and a "),dy=s("code"),II=o("next sentence prediction (classification)"),UI=o(" head."),NI=c(),Hp=s("p"),PI=o("This model inherits from "),df=s("a"),WI=o("FlaxPreTrainedModel"),qI=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)`),AI=c(),Yp=s("p"),ZI=o("This model is also a Flax Linen "),Kp=s("a"),RI=o("flax.linen.Module"),GI=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.`),SI=c(),cy=s("p"),VI=o("Finally, this model supports inherent JAX features such as:"),XI=c(),Zo=s("ul"),py=s("li"),eh=s("a"),LI=o("Just-In-Time (JIT) compilation"),OI=c(),hy=s("li"),th=s("a"),DI=o("Automatic Differentiation"),QI=c(),my=s("li"),oh=s("a"),HI=o("Vectorization"),YI=c(),uy=s("li"),nh=s("a"),KI=o("Parallelization"),eU=c(),vo=s("div"),v(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(),v(Pr.$$.fragment),lU=c(),v(Wr.$$.fragment),Ok=c(),Zs=s("h2"),qr=s("a"),_y=s("span"),v(ah.$$.fragment),dU=c(),by=s("span"),cU=o("FlaxBertForCausalLM"),Dk=c(),it=s("div"),v(rh.$$.fragment),pU=c(),yy=s("p"),hU=o(`Bert Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),mU=c(),ih=s("p"),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.`),vU=c(),Ty=s("p"),kU=o("Finally, this model supports inherent JAX features such as:"),wU=c(),Ro=s("ul"),vy=s("li"),ch=s("a"),MU=o("Just-In-Time (JIT) compilation"),$U=c(),ky=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(),ko=s("div"),v(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(),v(Ar.$$.fragment),qU=c(),v(Zr.$$.fragment),Qk=c(),Gs=s("h2"),Rr=s("a"),By=s("span"),v(fh.$$.fragment),AU=c(),xy=s("span"),ZU=o("FlaxBertForMaskedLM"),Hk=c(),lt=s("div"),v(gh.$$.fragment),RU=c(),_h=s("p"),GU=o("Bert Model with a "),Ey=s("code"),SU=o("language modeling"),VU=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"),vh=s("a"),nN=o("Just-In-Time (JIT) compilation"),sN=c(),Jy=s("li"),kh=s("a"),aN=o("Automatic Differentiation"),rN=c(),Cy=s("li"),wh=s("a"),iN=o("Vectorization"),lN=c(),Iy=s("li"),Mh=s("a"),dN=o("Parallelization"),cN=c(),wo=s("div"),v($h.$$.fragment),pN=c(),Ss=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(),v(Gr.$$.fragment),bN=c(),v(Sr.$$.fragment),Yk=c(),Vs=s("h2"),Vr=s("a"),Py=s("span"),v(Fh.$$.fragment),yN=c(),Wy=s("span"),TN=o("FlaxBertForNextSentencePrediction"),Kk=c(),dt=s("div"),v(Bh.$$.fragment),vN=c(),xh=s("p"),kN=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(),So=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(),Sy=s("li"),Uh=s("a"),RN=o("Parallelization"),GN=c(),Mo=s("div"),v(Nh.$$.fragment),SN=c(),Xs=s("p"),VN=o("The "),Vy=s("code"),XN=o("FlaxBertPreTrainedModel"),LN=o(" forward method, overrides the "),Xy=s("code"),ON=o("__call__"),DN=o(" special method."),QN=c(),v(Xr.$$.fragment),HN=c(),v(Lr.$$.fragment),ew=c(),Ls=s("h2"),Or=s("a"),Ly=s("span"),v(Ph.$$.fragment),YN=c(),Oy=s("span"),KN=o("FlaxBertForSequenceClassification"),tw=c(),ct=s("div"),v(Wh.$$.fragment),e9=c(),Dy=s("p"),t9=o(`Bert Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),o9=c(),qh=s("p"),n9=o("This model inherits from "),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(),Vo=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"),Sh=s("a"),_9=o("Vectorization"),b9=c(),eT=s("li"),Vh=s("a"),y9=o("Parallelization"),T9=c(),$o=s("div"),v(Xh.$$.fragment),v9=c(),Os=s("p"),k9=o("The "),tT=s("code"),w9=o("FlaxBertPreTrainedModel"),M9=o(" forward method, overrides the "),oT=s("code"),$9=o("__call__"),F9=o(" special method."),B9=c(),v(Dr.$$.fragment),x9=c(),v(Qr.$$.fragment),ow=c(),Ds=s("h2"),Hr=s("a"),nT=s("span"),v(Lh.$$.fragment),E9=c(),sT=s("span"),j9=o("FlaxBertForMultipleChoice"),nw=c(),pt=s("div"),v(Oh.$$.fragment),z9=c(),aT=s("p"),J9=o(`Bert Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),C9=c(),Dh=s("p"),I9=o("This model inherits from "),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"),S9=o("Just-In-Time (JIT) compilation"),V9=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"),v(om.$$.fragment),Y9=c(),Qs=s("p"),K9=o("The "),pT=s("code"),eP=o("FlaxBertPreTrainedModel"),tP=o(" forward method, overrides the "),hT=s("code"),oP=o("__call__"),nP=o(" special method."),sP=c(),v(Yr.$$.fragment),aP=c(),v(Kr.$$.fragment),sw=c(),Hs=s("h2"),ei=s("a"),mT=s("span"),v(nm.$$.fragment),rP=c(),uT=s("span"),iP=o("FlaxBertForTokenClassification"),aw=c(),ht=s("div"),v(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"),vP=o("Just-In-Time (JIT) compilation"),kP=c(),bT=s("li"),dm=s("a"),wP=o("Automatic Differentiation"),MP=c(),yT=s("li"),cm=s("a"),$P=o("Vectorization"),FP=c(),TT=s("li"),pm=s("a"),BP=o("Parallelization"),xP=c(),Bo=s("div"),v(hm.$$.fragment),EP=c(),Ys=s("p"),jP=o("The "),vT=s("code"),zP=o("FlaxBertPreTrainedModel"),JP=o(" forward method, overrides the "),kT=s("code"),CP=o("__call__"),IP=o(" special method."),UP=c(),v(ti.$$.fragment),NP=c(),v(oi.$$.fragment),rw=c(),Ks=s("h2"),ni=s("a"),wT=s("span"),v(mm.$$.fragment),PP=c(),MT=s("span"),WP=o("FlaxBertForQuestionAnswering"),iw=c(),mt=s("div"),v(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"),SP=o(")."),VP=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"),vm=s("a"),lW=o("Parallelization"),dW=c(),xo=s("div"),v(km.$$.fragment),cW=c(),ta=s("p"),pW=o("The "),JT=s("code"),hW=o("FlaxBertPreTrainedModel"),mW=o(" forward method, overrides the "),CT=s("code"),uW=o("__call__"),fW=o(" special method."),gW=c(),v(si.$$.fragment),_W=c(),v(ai.$$.fragment),this.h()},l(i){const _=WV('[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);k(l.$$.fragment,UT),UT.forEach(t),IT.forEach(t),m=p(wm),E=a(wm,"SPAN",{});var NT=r(E);Ee=n(NT,"BERT"),NT.forEach(t),wm.forEach(t),we=p(i),Z=a(i,"DIV",{class:!0});var Mm=r(Z);he=a(Mm,"A",{href:!0});var PT=r(he);ee=a(PT,"IMG",{alt:!0,src:!0}),PT.forEach(t),je=p(Mm),G=a(Mm,"A",{href:!0});var WT=r(G);me=a(WT,"IMG",{alt:!0,src:!0}),WT.forEach(t),Mm.forEach(t),O=p(i),ie=a(i,"H2",{class:!0});var $m=r(ie);le=a($m,"A",{id:!0,class:!0,href:!0});var qT=r(le);S=a(qT,"SPAN",{});var AT=r(S);k(de.$$.fragment,AT),AT.forEach(t),qT.forEach(t),ze=p($m),V=a($m,"SPAN",{});var ZT=r(V);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 ST=r(fe);X=a(ST,"EM",{});var VT=r(X);Ie=n(VT,`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.`),VT.forEach(t),ST.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 ev=r(oe);Ve=n(ev,"a special mask token with probability 0.8"),ev.forEach(t),Xe=p(oa),z=a(oa,"LI",{});var tv=r(z);Le=n(tv,"a random token different from the one masked with probability 0.1"),tv.forEach(t),Oe=p(oa),Ge=a(oa,"LI",{});var ov=r(Ge);De=n(ov,"the same token with probability 0.1"),ov.forEach(t),oa.forEach(t),Bm.forEach(t),Qe=p(Do),q=a(Do,"LI",{});var nv=r(q);L=a(nv,"P",{});var sv=r(L);He=n(sv,"The model must predict the original sentence, but has a second objective: inputs are two sentences A and B (with a separation token in between). With probability 50%, the sentences are consecutive in the corpus, in the remaining 50% they are not related. The model has to predict if the sentences are consecutive or not."),sv.forEach(t),nv.forEach(t),Do.forEach(t),Se=p(i),A=a(i,"P",{});var na=r(A);Ye=n(na,"This model was contributed by "),Re=a(na,"A",{href:!0,rel:!0});var av=r(Re);Pe=n(av,"thomwolf"),av.forEach(t),Ke=n(na,". The original code can be found "),K=a(na,"A",{href:!0,rel:!0});var rv=r(K);et=n(rv,"here"),rv.forEach(t),w1=n(na,"."),na.forEach(t),Jv=p(i),Nn=a(i,"H2",{class:!0});var xm=r(Nn);aa=a(xm,"A",{id:!0,class:!0,href:!0});var iv=r(aa);rg=a(iv,"SPAN",{});var lv=r(rg);k(Ai.$$.fragment,lv),lv.forEach(t),iv.forEach(t),M1=p(xm),ig=a(xm,"SPAN",{});var dv=r(ig);$1=n(dv,"Resources"),dv.forEach(t),xm.forEach(t),Cv=p(i),Rm=a(i,"P",{});var cv=r(Rm);F1=n(cv,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with BERT. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),cv.forEach(t),Iv=p(i),k(Zi.$$.fragment,i),Uv=p(i),tt=a(i,"UL",{});var ut=r(tt);Ri=a(ut,"LI",{});var Em=r(Ri);B1=n(Em,"A blog post on "),Gi=a(Em,"A",{href:!0,rel:!0});var pv=r(Gi);x1=n(pv,"BERT Text Classification in a different language"),pv.forEach(t),E1=n(Em,"."),Em.forEach(t),j1=p(ut),Si=a(ut,"LI",{});var jm=r(Si);z1=n(jm,"A notebook for "),Vi=a(jm,"A",{href:!0,rel:!0});var hv=r(Vi);J1=n(hv,"Finetuning BERT (and friends) for multi-label text classification"),hv.forEach(t),C1=n(jm,"."),jm.forEach(t),I1=p(ut),Xi=a(ut,"LI",{});var zm=r(Xi);U1=n(zm,"A notebook on how to "),Li=a(zm,"A",{href:!0,rel:!0});var mv=r(Li);N1=n(mv,"Finetune BERT for multi-label classification using PyTorch"),mv.forEach(t),P1=n(zm,". \u{1F30E}"),zm.forEach(t),W1=p(ut),Oi=a(ut,"LI",{});var Jm=r(Oi);q1=n(Jm,"A notebook on how to "),Di=a(Jm,"A",{href:!0,rel:!0});var uv=r(Di);A1=n(uv,"warm-start an EncoderDecoder model with BERT for summarization"),uv.forEach(t),Z1=n(Jm,"."),Jm.forEach(t),R1=p(ut),Qo=a(ut,"LI",{});var un=r(Qo);Gm=a(un,"A",{href:!0});var fv=r(Gm);G1=n(fv,"BertForSequenceClassification"),fv.forEach(t),S1=n(un," is supported by this "),Qi=a(un,"A",{href:!0,rel:!0});var gv=r(Qi);V1=n(gv,"example script"),gv.forEach(t),X1=n(un," and "),Hi=a(un,"A",{href:!0,rel:!0});var _v=r(Hi);L1=n(_v,"notebook"),_v.forEach(t),O1=n(un,"."),un.forEach(t),D1=p(ut),Ho=a(ut,"LI",{});var fn=r(Ho);Sm=a(fn,"A",{href:!0});var bv=r(Sm);Q1=n(bv,"TFBertForSequenceClassification"),bv.forEach(t),H1=n(fn," is supported by this "),Yi=a(fn,"A",{href:!0,rel:!0});var yv=r(Yi);Y1=n(yv,"example script"),yv.forEach(t),K1=n(fn," and "),Ki=a(fn,"A",{href:!0,rel:!0});var Tv=r(Ki);eM=n(Tv,"notebook"),Tv.forEach(t),tM=n(fn,"."),fn.forEach(t),oM=p(ut),Yo=a(ut,"LI",{});var gn=r(Yo);Vm=a(gn,"A",{href:!0});var vv=r(Vm);nM=n(vv,"FlaxBertForSequenceClassification"),vv.forEach(t),sM=n(gn," is supported by this "),el=a(gn,"A",{href:!0,rel:!0});var kv=r(el);aM=n(kv,"example script"),kv.forEach(t),rM=n(gn," and "),tl=a(gn,"A",{href:!0,rel:!0});var wv=r(tl);iM=n(wv,"notebook"),wv.forEach(t),lM=n(gn,"."),gn.forEach(t),dM=p(ut),lg=a(ut,"LI",{});var Mv=r(lg);Xm=a(Mv,"A",{href:!0});var $v=r(Xm);cM=n($v,"Text classification task guide"),$v.forEach(t),Mv.forEach(t),ut.forEach(t),Nv=p(i),k(ol.$$.fragment,i),Pv=p(i),ft=a(i,"UL",{});var $t=r(ft);nl=a($t,"LI",{});var Cm=r(nl);pM=n(Cm,"A blog post on how to use "),sl=a(Cm,"A",{href:!0,rel:!0});var Fv=r(sl);hM=n(Fv,"Hugging Face Transformers with Keras: Fine-tune a non-English BERT for Named Entity Recognition"),Fv.forEach(t),mM=n(Cm,"."),Cm.forEach(t),uM=p($t),Pn=a($t,"LI",{});var sa=r(Pn);fM=n(sa,"A notebook for "),al=a(sa,"A",{href:!0,rel:!0});var Bv=r(al);gM=n(Bv,"Finetuning BERT for named-entity recognition"),Bv.forEach(t),_M=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 xv=r(rl);bM=n(xv,"version"),xv.forEach(t),yM=n(sa," of the notebook instead."),sa.forEach(t),TM=p($t),Ko=a($t,"LI",{});var _n=r(Ko);Lm=a(_n,"A",{href:!0});var Ev=r(Lm);vM=n(Ev,"BertForTokenClassification"),Ev.forEach(t),kM=n(_n," is supported by this "),il=a(_n,"A",{href:!0,rel:!0});var xW=r(il);wM=n(xW,"example script"),xW.forEach(t),MM=n(_n," and "),ll=a(_n,"A",{href:!0,rel:!0});var EW=r(ll);$M=n(EW,"notebook"),EW.forEach(t),FM=n(_n,"."),_n.forEach(t),BM=p($t),en=a($t,"LI",{});var Im=r(en);Om=a(Im,"A",{href:!0});var jW=r(Om);xM=n(jW,"TFBertForTokenClassification"),jW.forEach(t),EM=n(Im," is supported by this "),dl=a(Im,"A",{href:!0,rel:!0});var zW=r(dl);jM=n(zW,"example script"),zW.forEach(t),zM=n(Im," and "),cl=a(Im,"A",{href:!0,rel:!0});var JW=r(cl);JM=n(JW,"notebook"),JW.forEach(t),CM=n(Im,"."),Im.forEach(t),IM=p($t),ra=a($t,"LI",{});var jv=r(ra);Dm=a(jv,"A",{href:!0});var CW=r(Dm);UM=n(CW,"FlaxBertForTokenClassification"),CW.forEach(t),NM=n(jv," is supported by this "),pl=a(jv,"A",{href:!0,rel:!0});var IW=r(pl);PM=n(IW,"example script"),IW.forEach(t),WM=n(jv,"."),jv.forEach(t),qM=p($t),Qm=a($t,"LI",{});var bW=r(Qm);hl=a(bW,"A",{href:!0,rel:!0});var UW=r(hl);AM=n(UW,"Token classification"),UW.forEach(t),ZM=n(bW," chapter of the \u{1F917} Hugging Face Course."),bW.forEach(t),RM=p($t),dg=a($t,"LI",{});var NW=r(dg);Hm=a(NW,"A",{href:!0});var PW=r(Hm);GM=n(PW,"Token classification task guide"),PW.forEach(t),NW.forEach(t),$t.forEach(t),Wv=p(i),k(ml.$$.fragment,i),qv=p(i),Wt=a(i,"UL",{});var bn=r(Wt);tn=a(bn,"LI",{});var Um=r(tn);Ym=a(Um,"A",{href:!0});var WW=r(Ym);SM=n(WW,"BertForMaskedLM"),WW.forEach(t),VM=n(Um," is supported by this "),ul=a(Um,"A",{href:!0,rel:!0});var qW=r(ul);XM=n(qW,"example script"),qW.forEach(t),LM=n(Um," and "),fl=a(Um,"A",{href:!0,rel:!0});var AW=r(fl);OM=n(AW,"notebook"),AW.forEach(t),DM=n(Um,"."),Um.forEach(t),QM=p(bn),on=a(bn,"LI",{});var Nm=r(on);Km=a(Nm,"A",{href:!0});var ZW=r(Km);HM=n(ZW,"TFBertForMaskedLM"),ZW.forEach(t),YM=n(Nm," is supported by this "),gl=a(Nm,"A",{href:!0,rel:!0});var RW=r(gl);KM=n(RW,"example script"),RW.forEach(t),e2=n(Nm," and "),_l=a(Nm,"A",{href:!0,rel:!0});var GW=r(_l);t2=n(GW,"notebook"),GW.forEach(t),o2=n(Nm,"."),Nm.forEach(t),n2=p(bn),nn=a(bn,"LI",{});var Pm=r(nn);eu=a(Pm,"A",{href:!0});var SW=r(eu);s2=n(SW,"FlaxBertForMaskedLM"),SW.forEach(t),a2=n(Pm," is supported by this "),bl=a(Pm,"A",{href:!0,rel:!0});var VW=r(bl);r2=n(VW,"example script"),VW.forEach(t),i2=n(Pm," and "),yl=a(Pm,"A",{href:!0,rel:!0});var XW=r(yl);l2=n(XW,"notebook"),XW.forEach(t),d2=n(Pm,"."),Pm.forEach(t),c2=p(bn),tu=a(bn,"LI",{});var yW=r(tu);Tl=a(yW,"A",{href:!0,rel:!0});var LW=r(Tl);p2=n(LW,"Masked language modeling"),LW.forEach(t),h2=n(yW," chapter of the \u{1F917} Hugging Face Course."),yW.forEach(t),m2=p(bn),cg=a(bn,"LI",{});var OW=r(cg);ou=a(OW,"A",{href:!0});var DW=r(ou);u2=n(DW,"Masked language modeling task guide"),DW.forEach(t),OW.forEach(t),bn.forEach(t),Av=p(i),k(vl.$$.fragment,i),Zv=p(i),qt=a(i,"UL",{});var yn=r(qt);sn=a(yn,"LI",{});var Wm=r(sn);nu=a(Wm,"A",{href:!0});var QW=r(nu);f2=n(QW,"BertForQuestionAnswering"),QW.forEach(t),g2=n(Wm," is supported by this "),kl=a(Wm,"A",{href:!0,rel:!0});var HW=r(kl);_2=n(HW,"example script"),HW.forEach(t),b2=n(Wm," and "),wl=a(Wm,"A",{href:!0,rel:!0});var YW=r(wl);y2=n(YW,"notebook"),YW.forEach(t),T2=n(Wm,"."),Wm.forEach(t),v2=p(yn),an=a(yn,"LI",{});var qm=r(an);su=a(qm,"A",{href:!0});var KW=r(su);k2=n(KW,"TFBertForQuestionAnswering"),KW.forEach(t),w2=n(qm," is supported by this "),Ml=a(qm,"A",{href:!0,rel:!0});var eq=r(Ml);M2=n(eq,"example script"),eq.forEach(t),$2=n(qm," and "),$l=a(qm,"A",{href:!0,rel:!0});var tq=r($l);F2=n(tq,"notebook"),tq.forEach(t),B2=n(qm,"."),qm.forEach(t),x2=p(yn),ia=a(yn,"LI",{});var zv=r(ia);au=a(zv,"A",{href:!0});var oq=r(au);E2=n(oq,"FlaxBertForQuestionAnswering"),oq.forEach(t),j2=n(zv," is supported by this "),Fl=a(zv,"A",{href:!0,rel:!0});var nq=r(Fl);z2=n(nq,"example script"),nq.forEach(t),J2=n(zv,"."),zv.forEach(t),C2=p(yn),ru=a(yn,"LI",{});var TW=r(ru);Bl=a(TW,"A",{href:!0,rel:!0});var sq=r(Bl);I2=n(sq,"Question answering"),sq.forEach(t),U2=n(TW," chapter of the \u{1F917} Hugging Face Course."),TW.forEach(t),N2=p(yn),pg=a(yn,"LI",{});var aq=r(pg);iu=a(aq,"A",{href:!0});var rq=r(iu);P2=n(rq,"Question answering task guide"),rq.forEach(t),aq.forEach(t),yn.forEach(t),Rv=p(i),lu=a(i,"P",{});var iq=r(lu);hg=a(iq,"STRONG",{});var lq=r(hg);W2=n(lq,"Multiple choice"),lq.forEach(t),iq.forEach(t),Gv=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);q2=n(dq,"BertForMultipleChoice"),dq.forEach(t),A2=n(Am," is supported by this "),xl=a(Am,"A",{href:!0,rel:!0});var cq=r(xl);Z2=n(cq,"example script"),cq.forEach(t),R2=n(Am," and "),El=a(Am,"A",{href:!0,rel:!0});var pq=r(El);G2=n(pq,"notebook"),pq.forEach(t),S2=n(Am,"."),Am.forEach(t),V2=p(_f),dn=a(_f,"LI",{});var Zm=r(dn);cu=a(Zm,"A",{href:!0});var hq=r(cu);X2=n(hq,"TFBertForMultipleChoice"),hq.forEach(t),L2=n(Zm," is supported by this "),jl=a(Zm,"A",{href:!0,rel:!0});var mq=r(jl);O2=n(mq,"example script"),mq.forEach(t),D2=n(Zm," and "),zl=a(Zm,"A",{href:!0,rel:!0});var uq=r(zl);Q2=n(uq,"notebook"),uq.forEach(t),H2=n(Zm,"."),Zm.forEach(t),Y2=p(_f),mg=a(_f,"LI",{});var fq=r(mg);pu=a(fq,"A",{href:!0});var gq=r(pu);K2=n(gq,"Multiple choice task guide"),gq.forEach(t),fq.forEach(t),_f.forEach(t),Sv=p(i),Jl=a(i,"P",{});var vW=r(Jl);e$=n(vW,"\u26A1\uFE0F "),ug=a(vW,"STRONG",{});var _q=r(ug);t$=n(_q,"Inference"),_q.forEach(t),vW.forEach(t),Vv=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),Xv=p(i),Pl=a(i,"P",{});var kW=r(Pl);d$=n(kW,"\u2699\uFE0F "),fg=a(kW,"STRONG",{});var Tq=r(fg);c$=n(Tq,"Pretraining"),Tq.forEach(t),kW.forEach(t),Lv=p(i),hu=a(i,"UL",{});var vq=r(hu);Wl=a(vq,"LI",{});var hw=r(Wl);p$=n(hw,"A blog post on "),ql=a(hw,"A",{href:!0,rel:!0});var kq=r(ql);h$=n(kq,"Pre-Training BERT with Hugging Face Transformers and Habana Gaudi"),kq.forEach(t),m$=n(hw,"."),hw.forEach(t),vq.forEach(t),Ov=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),Dv=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 "),Sl=a(uw,"A",{href:!0,rel:!0});var $q=r(Sl);v$=n($q,"Setup Deep Learning environment for Hugging Face Transformers with Habana Gaudi on AWS"),$q.forEach(t),k$=n(uw,"."),uw.forEach(t),w$=p(Eo),Vl=a(Eo,"LI",{});var fw=r(Vl);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),Qv=p(i),Wn=a(i,"H2",{class:!0});var yw=r(Wn);da=a(yw,"A",{id:!0,class:!0,href:!0});var jq=r(da);_g=a(jq,"SPAN",{});var zq=r(_g);k(Kl.$$.fragment,zq),zq.forEach(t),jq.forEach(t),q$=p(yw),bg=a(yw,"SPAN",{});var Jq=r(bg);A$=n(Jq,"BertConfig"),Jq.forEach(t),yw.forEach(t),Hv=p(i),so=a(i,"DIV",{class:!0});var ri=r(so);k(ed.$$.fragment,ri),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),S$=n(ii," or a "),uu=a(ii,"A",{href:!0});var Iq=r(uu);V$=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),k(ca.$$.fragment,ri),ri.forEach(t),Yv=p(i),An=a(i,"H2",{class:!0});var Tw=r(An);pa=a(Tw,"A",{id:!0,class:!0,href:!0});var Wq=r(pa);yg=a(Wq,"SPAN",{});var qq=r(yg);k(od.$$.fragment,qq),qq.forEach(t),Wq.forEach(t),oF=p(Tw),Tg=a(Tw,"SPAN",{});var Aq=r(Tg);nF=n(Aq,"BertTokenizer"),Aq.forEach(t),Tw.forEach(t),Kv=p(i),ot=a(i,"DIV",{class:!0});var Xt=r(ot);k(nd.$$.fragment,Xt),sF=p(Xt),vg=a(Xt,"P",{});var Zq=r(vg);aF=n(Zq,"Construct a BERT tokenizer. Based on WordPiece."),Zq.forEach(t),rF=p(Xt),sd=a(Xt,"P",{});var vw=r(sd);iF=n(vw,"This tokenizer inherits from "),_u=a(vw,"A",{href:!0});var Rq=r(_u);lF=n(Rq,"PreTrainedTokenizer"),Rq.forEach(t),dF=n(vw,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),vw.forEach(t),cF=p(Xt),cn=a(Xt,"DIV",{class:!0});var yf=r(cn);k(ad.$$.fragment,yf),pF=p(yf),kg=a(yf,"P",{});var Gq=r(kg);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 kw=r(rd);bu=a(kw,"LI",{});var MW=r(bu);uF=n(MW,"single sequence: "),wg=a(MW,"CODE",{});var Sq=r(wg);fF=n(Sq,"[CLS] X [SEP]"),Sq.forEach(t),MW.forEach(t),gF=p(kw),yu=a(kw,"LI",{});var $W=r(yu);_F=n($W,"pair of sequences: "),Mg=a($W,"CODE",{});var Vq=r(Mg);bF=n(Vq,"[CLS] A [SEP] B [SEP]"),Vq.forEach(t),$W.forEach(t),kw.forEach(t),yf.forEach(t),yF=p(Xt),ha=a(Xt,"DIV",{class:!0});var ww=r(ha);k(id.$$.fragment,ww),TF=p(ww),ld=a(ww,"P",{});var Mw=r(ld);vF=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);kF=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);k(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),k(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);k(cd.$$.fragment,Qq),Qq.forEach(t),Xt.forEach(t),ek=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);k(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),tk=p(i),xt=a(i,"DIV",{class:!0});var Tn=r(xt);k(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 "),vu=a(Bw,"A",{href:!0});var tA=r(vu);GF=n(tA,"PreTrainedTokenizerFast"),tA.forEach(t),SF=n(Bw,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Bw.forEach(t),VF=p(Tn),pn=a(Tn,"DIV",{class:!0});var vf=r(pn);k(fd.$$.fragment,vf),XF=p(vf),Jg=a(vf,"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(vf),gd=a(vf,"UL",{});var xw=r(gd);ku=a(xw,"LI",{});var FW=r(ku);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),vf.forEach(t),eB=p(Tn),ro=a(Tn,"DIV",{class:!0});var di=r(ro);k(_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),k(fa.$$.fragment,di),sB=p(di),Gn=a(di,"P",{});var kf=r(Gn);aB=n(kf,"If "),Ng=a(kf,"CODE",{});var rA=r(Ng);rB=n(rA,"token_ids_1"),rA.forEach(t),iB=n(kf," is "),Pg=a(kf,"CODE",{});var iA=r(Pg);lB=n(iA,"None"),iA.forEach(t),dB=n(kf,", this method only returns the first portion of the mask (0s)."),kf.forEach(t),di.forEach(t),Tn.forEach(t),ok=p(i),Sn=a(i,"H2",{class:!0});var Ew=r(Sn);ga=a(Ew,"A",{id:!0,class:!0,href:!0});var lA=r(ga);Wg=a(lA,"SPAN",{});var dA=r(Wg);k(bd.$$.fragment,dA),dA.forEach(t),lA.forEach(t),cB=p(Ew),qg=a(Ew,"SPAN",{});var cA=r(qg);pB=n(cA,"TFBertTokenizer"),cA.forEach(t),Ew.forEach(t),nk=p(i),Et=a(i,"DIV",{class:!0});var vn=r(Et);k(yd.$$.fragment,vn),hB=p(vn),Vn=a(vn,"P",{});var wf=r(Vn);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(vn),Td=a(vn,"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),vB=n(jw," inputs to outputs."),jw.forEach(t),kB=p(vn),hn=a(vn,"DIV",{class:!0});var Mf=r(hn);k(vd.$$.fragment,Mf),wB=p(Mf),kd=a(Mf,"P",{});var zw=r(kd);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),k(_a.$$.fragment,Mf),Mf.forEach(t),xB=p(vn),mn=a(vn,"DIV",{class:!0});var $f=r(mn);k(wd.$$.fragment,$f),EB=p($f),Xn=a($f,"P",{});var Ff=r(Xn);jB=n(Ff,"Initialize a "),Sg=a(Ff,"CODE",{});var fA=r(Sg);zB=n(fA,"TFBertTokenizer"),fA.forEach(t),JB=n(Ff," from an existing "),Vg=a(Ff,"CODE",{});var gA=r(Vg);CB=n(gA,"Tokenizer"),gA.forEach(t),IB=n(Ff,"."),Ff.forEach(t),UB=p($f),k(ba.$$.fragment,$f),$f.forEach(t),vn.forEach(t),sk=p(i),Ln=a(i,"H2",{class:!0});var Jw=r(Ln);ya=a(Jw,"A",{id:!0,class:!0,href:!0});var _A=r(ya);Xg=a(_A,"SPAN",{});var bA=r(Xg);k(Md.$$.fragment,bA),bA.forEach(t),_A.forEach(t),NB=p(Jw),Lg=a(Jw,"SPAN",{});var yA=r(Lg);PB=n(yA,"Bert specific outputs"),yA.forEach(t),Jw.forEach(t),ak=p(i),On=a(i,"DIV",{class:!0});var Cw=r(On);k($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),rk=p(i),Dn=a(i,"DIV",{class:!0});var Uw=r(Dn);k(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 vA=r($u);SB=n(vA,"TFBertForPreTraining"),vA.forEach(t),VB=n(Nw,"."),Nw.forEach(t),Uw.forEach(t),ik=p(i),qo=a(i,"DIV",{class:!0});var Bf=r(qo);k(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 kA=r(Fu);OB=n(kA,"BertForPreTraining"),kA.forEach(t),DB=n(Pw,"."),Pw.forEach(t),QB=p(Bf),Ta=a(Bf,"DIV",{class:!0});var Ww=r(Ta);k(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),lk=p(i),Qn=a(i,"H2",{class:!0});var qw=r(Qn);va=a(qw,"A",{id:!0,class:!0,href:!0});var MA=r(va);Dg=a(MA,"SPAN",{});var $A=r(Dg);k(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),dk=p(i),nt=a(i,"DIV",{class:!0});var Lt=r(nt);k(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_);vx=n(CA,"is_decoder"),CA.forEach(t),kx=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);k(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),k(ka.$$.fragment,ci),Px=p(ci),k(wa.$$.fragment,ci),ci.forEach(t),Lt.forEach(t),ck=p(i),Yn=a(i,"H2",{class:!0});var Gw=r(Yn);Ma=a(Gw,"A",{id:!0,class:!0,href:!0});var qA=r(Ma);a_=a(qA,"SPAN",{});var AA=r(a_);k(Ad.$$.fragment,AA),AA.forEach(t),qA.forEach(t),Wx=p(Gw),r_=a(Gw,"SPAN",{});var ZA=r(r_);qx=n(ZA,"BertForPreTraining"),ZA.forEach(t),Gw.forEach(t),pk=p(i),jt=a(i,"DIV",{class:!0});var kn=r(jt);k(Zd.$$.fragment,kn),Ax=p(kn),Kn=a(kn,"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_);Sx=n(GA,"next sentence prediction (classification)"),GA.forEach(t),Vx=n(Ef," head."),Ef.forEach(t),Xx=p(kn),Rd=a(kn,"P",{});var Sw=r(Rd);Lx=n(Sw,"This model inherits from "),Eu=a(Sw,"A",{href:!0});var SA=r(Eu);Ox=n(SA,"PreTrainedModel"),SA.forEach(t),Dx=n(Sw,`. 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.)`),Sw.forEach(t),Qx=p(kn),Gd=a(kn,"P",{});var Vw=r(Gd);Hx=n(Vw,"This model is also a PyTorch "),Sd=a(Vw,"A",{href:!0,rel:!0});var VA=r(Sd);Yx=n(VA,"torch.nn.Module"),VA.forEach(t),Kx=n(Vw,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Vw.forEach(t),eE=p(kn),lo=a(kn,"DIV",{class:!0});var pi=r(lo);k(Vd.$$.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),k($a.$$.fragment,pi),lE=p(pi),k(Fa.$$.fragment,pi),pi.forEach(t),kn.forEach(t),hk=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_);k(Xd.$$.fragment,DA),DA.forEach(t),OA.forEach(t),dE=p(Xw),p_=a(Xw,"SPAN",{});var QA=r(p_);cE=n(QA,"BertLMHeadModel"),QA.forEach(t),Xw.forEach(t),mk=p(i),zt=a(i,"DIV",{class:!0});var wn=r(zt);k(Ld.$$.fragment,wn),pE=p(wn),Od=a(wn,"P",{});var Lw=r(Od);hE=n(Lw,"Bert Model with a "),h_=a(Lw,"CODE",{});var HA=r(h_);mE=n(HA,"language modeling"),HA.forEach(t),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);vE=n(KA,"torch.nn.Module"),KA.forEach(t),kE=n(Dw,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Dw.forEach(t),wE=p(wn),co=a(wn,"DIV",{class:!0});var hi=r(co);k(Yd.$$.fragment,hi),ME=p(hi),os=a(hi,"P",{});var 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),k(xa.$$.fragment,hi),zE=p(hi),k(Ea.$$.fragment,hi),hi.forEach(t),wn.forEach(t),uk=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_);k(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),fk=p(i),Jt=a(i,"DIV",{class:!0});var Mn=r(Jt);k(ec.$$.fragment,Mn),IE=p(Mn),tc=a(Mn,"P",{});var Hw=r(tc);UE=n(Hw,"Bert Model with a "),g_=a(Hw,"CODE",{});var aZ=r(g_);NE=n(aZ,"language modeling"),aZ.forEach(t),PE=n(Hw," head on top."),Hw.forEach(t),WE=p(Mn),oc=a(Mn,"P",{});var Yw=r(oc);qE=n(Yw,"This model inherits from "),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);SE=n(iZ,"torch.nn.Module"),iZ.forEach(t),VE=n(Kw,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Kw.forEach(t),XE=p(Mn),po=a(Mn,"DIV",{class:!0});var mi=r(po);k(ac.$$.fragment,mi),LE=p(mi),ss=a(mi,"P",{});var 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),k(za.$$.fragment,mi),ej=p(mi),k(Ja.$$.fragment,mi),mi.forEach(t),Mn.forEach(t),gk=p(i),as=a(i,"H2",{class:!0});var e0=r(as);Ca=a(e0,"A",{id:!0,class:!0,href:!0});var cZ=r(Ca);b_=a(cZ,"SPAN",{});var pZ=r(b_);k(rc.$$.fragment,pZ),pZ.forEach(t),cZ.forEach(t),tj=p(e0),y_=a(e0,"SPAN",{});var hZ=r(y_);oj=n(hZ,"BertForNextSentencePrediction"),hZ.forEach(t),e0.forEach(t),_k=p(i),Ct=a(i,"DIV",{class:!0});var $n=r(Ct);k(ic.$$.fragment,$n),nj=p($n),lc=a($n,"P",{});var t0=r(lc);sj=n(t0,"Bert Model with a "),T_=a(t0,"CODE",{});var mZ=r(T_);aj=n(mZ,"next sentence prediction (classification)"),mZ.forEach(t),rj=n(t0," head on top."),t0.forEach(t),ij=p($n),dc=a($n,"P",{});var o0=r(dc);lj=n(o0,"This model inherits from "),Uu=a(o0,"A",{href:!0});var uZ=r(Uu);dj=n(uZ,"PreTrainedModel"),uZ.forEach(t),cj=n(o0,`. 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.)`),o0.forEach(t),pj=p($n),cc=a($n,"P",{});var n0=r(cc);hj=n(n0,"This model is also a PyTorch "),pc=a(n0,"A",{href:!0,rel:!0});var fZ=r(pc);mj=n(fZ,"torch.nn.Module"),fZ.forEach(t),uj=n(n0,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),n0.forEach(t),fj=p($n),ho=a($n,"DIV",{class:!0});var ui=r(ho);k(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 "),v_=a(Cf,"CODE",{});var _Z=r(v_);Tj=n(_Z,"__call__"),_Z.forEach(t),vj=n(Cf," special method."),Cf.forEach(t),kj=p(ui),k(Ia.$$.fragment,ui),wj=p(ui),k(Ua.$$.fragment,ui),ui.forEach(t),$n.forEach(t),bk=p(i),is=a(i,"H2",{class:!0});var s0=r(is);Na=a(s0,"A",{id:!0,class:!0,href:!0});var bZ=r(Na);k_=a(bZ,"SPAN",{});var yZ=r(k_);k(mc.$$.fragment,yZ),yZ.forEach(t),bZ.forEach(t),Mj=p(s0),w_=a(s0,"SPAN",{});var TZ=r(w_);$j=n(TZ,"BertForSequenceClassification"),TZ.forEach(t),s0.forEach(t),yk=p(i),It=a(i,"DIV",{class:!0});var Fn=r(It);k(uc.$$.fragment,Fn),Fj=p(Fn),M_=a(Fn,"P",{});var vZ=r(M_);Bj=n(vZ,`Bert Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),vZ.forEach(t),xj=p(Fn),fc=a(Fn,"P",{});var a0=r(fc);Ej=n(a0,"This model inherits from "),Pu=a(a0,"A",{href:!0});var kZ=r(Pu);jj=n(kZ,"PreTrainedModel"),kZ.forEach(t),zj=n(a0,`. 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.)`),a0.forEach(t),Jj=p(Fn),gc=a(Fn,"P",{});var r0=r(gc);Cj=n(r0,"This model is also a PyTorch "),_c=a(r0,"A",{href:!0,rel:!0});var wZ=r(_c);Ij=n(wZ,"torch.nn.Module"),wZ.forEach(t),Uj=n(r0,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),r0.forEach(t),Nj=p(Fn),At=a(Fn,"DIV",{class:!0});var Bn=r(At);k(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),k(Pa.$$.fragment,Bn),Sj=p(Bn),k(Wa.$$.fragment,Bn),Vj=p(Bn),k(qa.$$.fragment,Bn),Bn.forEach(t),Fn.forEach(t),Tk=p(i),ds=a(i,"H2",{class:!0});var i0=r(ds);Aa=a(i0,"A",{id:!0,class:!0,href:!0});var FZ=r(Aa);F_=a(FZ,"SPAN",{});var BZ=r(F_);k(yc.$$.fragment,BZ),BZ.forEach(t),FZ.forEach(t),Xj=p(i0),B_=a(i0,"SPAN",{});var xZ=r(B_);Lj=n(xZ,"BertForMultipleChoice"),xZ.forEach(t),i0.forEach(t),vk=p(i),Ut=a(i,"DIV",{class:!0});var xn=r(Ut);k(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),vc=a(xn,"P",{});var l0=r(vc);Hj=n(l0,"This model inherits from "),qu=a(l0,"A",{href:!0});var jZ=r(qu);Yj=n(jZ,"PreTrainedModel"),jZ.forEach(t),Kj=n(l0,`. 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.)`),l0.forEach(t),e4=p(xn),kc=a(xn,"P",{});var d0=r(kc);t4=n(d0,"This model is also a PyTorch "),wc=a(d0,"A",{href:!0,rel:!0});var zZ=r(wc);o4=n(zZ,"torch.nn.Module"),zZ.forEach(t),n4=n(d0,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),d0.forEach(t),s4=p(xn),mo=a(xn,"DIV",{class:!0});var fi=r(mo);k(Mc.$$.fragment,fi),a4=p(fi),cs=a(fi,"P",{});var Uf=r(cs);r4=n(Uf,"The "),Au=a(Uf,"A",{href:!0});var JZ=r(Au);i4=n(JZ,"BertForMultipleChoice"),JZ.forEach(t),l4=n(Uf," forward method, overrides the "),E_=a(Uf,"CODE",{});var CZ=r(E_);d4=n(CZ,"__call__"),CZ.forEach(t),c4=n(Uf," special method."),Uf.forEach(t),p4=p(fi),k(Za.$$.fragment,fi),h4=p(fi),k(Ra.$$.fragment,fi),fi.forEach(t),xn.forEach(t),kk=p(i),ps=a(i,"H2",{class:!0});var c0=r(ps);Ga=a(c0,"A",{id:!0,class:!0,href:!0});var IZ=r(Ga);j_=a(IZ,"SPAN",{});var UZ=r(j_);k($c.$$.fragment,UZ),UZ.forEach(t),IZ.forEach(t),m4=p(c0),z_=a(c0,"SPAN",{});var NZ=r(z_);u4=n(NZ,"BertForTokenClassification"),NZ.forEach(t),c0.forEach(t),wk=p(i),Nt=a(i,"DIV",{class:!0});var En=r(Nt);k(Fc.$$.fragment,En),f4=p(En),J_=a(En,"P",{});var PZ=r(J_);g4=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),_4=p(En),Bc=a(En,"P",{});var p0=r(Bc);b4=n(p0,"This model inherits from "),Zu=a(p0,"A",{href:!0});var WZ=r(Zu);y4=n(WZ,"PreTrainedModel"),WZ.forEach(t),T4=n(p0,`. 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.)`),p0.forEach(t),v4=p(En),xc=a(En,"P",{});var h0=r(xc);k4=n(h0,"This model is also a PyTorch "),Ec=a(h0,"A",{href:!0,rel:!0});var qZ=r(Ec);w4=n(qZ,"torch.nn.Module"),qZ.forEach(t),M4=n(h0,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),h0.forEach(t),$4=p(En),uo=a(En,"DIV",{class:!0});var gi=r(uo);k(jc.$$.fragment,gi),F4=p(gi),hs=a(gi,"P",{});var Nf=r(hs);B4=n(Nf,"The "),Ru=a(Nf,"A",{href:!0});var AZ=r(Ru);x4=n(AZ,"BertForTokenClassification"),AZ.forEach(t),E4=n(Nf," forward method, overrides the "),C_=a(Nf,"CODE",{});var ZZ=r(C_);j4=n(ZZ,"__call__"),ZZ.forEach(t),z4=n(Nf," special method."),Nf.forEach(t),J4=p(gi),k(Sa.$$.fragment,gi),C4=p(gi),k(Va.$$.fragment,gi),gi.forEach(t),En.forEach(t),Mk=p(i),ms=a(i,"H2",{class:!0});var m0=r(ms);Xa=a(m0,"A",{id:!0,class:!0,href:!0});var RZ=r(Xa);I_=a(RZ,"SPAN",{});var GZ=r(I_);k(zc.$$.fragment,GZ),GZ.forEach(t),RZ.forEach(t),I4=p(m0),U_=a(m0,"SPAN",{});var SZ=r(U_);U4=n(SZ,"BertForQuestionAnswering"),SZ.forEach(t),m0.forEach(t),$k=p(i),Pt=a(i,"DIV",{class:!0});var jn=r(Pt);k(Jc.$$.fragment,jn),N4=p(jn),us=a(jn,"P",{});var Pf=r(us);P4=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 VZ=r(N_);W4=n(VZ,"span start logits"),VZ.forEach(t),q4=n(Pf," and "),P_=a(Pf,"CODE",{});var XZ=r(P_);A4=n(XZ,"span end logits"),XZ.forEach(t),Z4=n(Pf,")."),Pf.forEach(t),R4=p(jn),Cc=a(jn,"P",{});var u0=r(Cc);G4=n(u0,"This model inherits from "),Gu=a(u0,"A",{href:!0});var LZ=r(Gu);S4=n(LZ,"PreTrainedModel"),LZ.forEach(t),V4=n(u0,`. 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.)`),u0.forEach(t),X4=p(jn),Ic=a(jn,"P",{});var f0=r(Ic);L4=n(f0,"This model is also a PyTorch "),Uc=a(f0,"A",{href:!0,rel:!0});var OZ=r(Uc);O4=n(OZ,"torch.nn.Module"),OZ.forEach(t),D4=n(f0,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),f0.forEach(t),Q4=p(jn),fo=a(jn,"DIV",{class:!0});var _i=r(fo);k(Nc.$$.fragment,_i),H4=p(_i),fs=a(_i,"P",{});var Wf=r(fs);Y4=n(Wf,"The "),Su=a(Wf,"A",{href:!0});var DZ=r(Su);K4=n(DZ,"BertForQuestionAnswering"),DZ.forEach(t),e3=n(Wf," forward method, overrides the "),W_=a(Wf,"CODE",{});var QZ=r(W_);t3=n(QZ,"__call__"),QZ.forEach(t),o3=n(Wf," special method."),Wf.forEach(t),n3=p(_i),k(La.$$.fragment,_i),s3=p(_i),k(Oa.$$.fragment,_i),_i.forEach(t),jn.forEach(t),Fk=p(i),gs=a(i,"H2",{class:!0});var g0=r(gs);Da=a(g0,"A",{id:!0,class:!0,href:!0});var HZ=r(Da);q_=a(HZ,"SPAN",{});var YZ=r(q_);k(Pc.$$.fragment,YZ),YZ.forEach(t),HZ.forEach(t),a3=p(g0),A_=a(g0,"SPAN",{});var KZ=r(A_);r3=n(KZ,"TFBertModel"),KZ.forEach(t),g0.forEach(t),Bk=p(i),_t=a(i,"DIV",{class:!0});var jo=r(_t);k(Wc.$$.fragment,jo),i3=p(jo),Z_=a(jo,"P",{});var e6=r(Z_);l3=n(e6,"The bare Bert Model transformer outputting raw hidden-states without any specific head on top."),e6.forEach(t),d3=p(jo),qc=a(jo,"P",{});var _0=r(qc);c3=n(_0,"This model inherits from "),Vu=a(_0,"A",{href:!0});var t6=r(Vu);p3=n(t6,"TFPreTrainedModel"),t6.forEach(t),h3=n(_0,`. 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.)`),_0.forEach(t),m3=p(jo),Ac=a(jo,"P",{});var b0=r(Ac);u3=n(b0,"This model is also a "),Zc=a(b0,"A",{href:!0,rel:!0});var o6=r(Zc);f3=n(o6,"tf.keras.Model"),o6.forEach(t),g3=n(b0,` 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.`),b0.forEach(t),_3=p(jo),k(Qa.$$.fragment,jo),b3=p(jo),go=a(jo,"DIV",{class:!0});var bi=r(go);k(Rc.$$.fragment,bi),y3=p(bi),_s=a(bi,"P",{});var qf=r(_s);T3=n(qf,"The "),Xu=a(qf,"A",{href:!0});var n6=r(Xu);v3=n(n6,"TFBertModel"),n6.forEach(t),k3=n(qf," forward method, overrides the "),R_=a(qf,"CODE",{});var s6=r(R_);w3=n(s6,"__call__"),s6.forEach(t),M3=n(qf," special method."),qf.forEach(t),$3=p(bi),k(Ha.$$.fragment,bi),F3=p(bi),k(Ya.$$.fragment,bi),bi.forEach(t),jo.forEach(t),xk=p(i),bs=a(i,"H2",{class:!0});var y0=r(bs);Ka=a(y0,"A",{id:!0,class:!0,href:!0});var a6=r(Ka);G_=a(a6,"SPAN",{});var r6=r(G_);k(Gc.$$.fragment,r6),r6.forEach(t),a6.forEach(t),B3=p(y0),S_=a(y0,"SPAN",{});var i6=r(S_);x3=n(i6,"TFBertForPreTraining"),i6.forEach(t),y0.forEach(t),Ek=p(i),bt=a(i,"DIV",{class:!0});var zo=r(bt);k(Sc.$$.fragment,zo),E3=p(zo),ys=a(zo,"P",{});var Af=r(ys);j3=n(Af,`Bert Model with two heads on top as done during the pretraining:
a `),V_=a(Af,"CODE",{});var l6=r(V_);z3=n(l6,"masked language modeling"),l6.forEach(t),J3=n(Af," head and a "),X_=a(Af,"CODE",{});var d6=r(X_);C3=n(d6,"next sentence prediction (classification)"),d6.forEach(t),I3=n(Af," head."),Af.forEach(t),U3=p(zo),Vc=a(zo,"P",{});var T0=r(Vc);N3=n(T0,"This model inherits from "),Lu=a(T0,"A",{href:!0});var c6=r(Lu);P3=n(c6,"TFPreTrainedModel"),c6.forEach(t),W3=n(T0,`. 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.)`),T0.forEach(t),q3=p(zo),Xc=a(zo,"P",{});var v0=r(Xc);A3=n(v0,"This model is also a "),Lc=a(v0,"A",{href:!0,rel:!0});var p6=r(Lc);Z3=n(p6,"tf.keras.Model"),p6.forEach(t),R3=n(v0,` 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.`),v0.forEach(t),G3=p(zo),k(er.$$.fragment,zo),S3=p(zo),_o=a(zo,"DIV",{class:!0});var yi=r(_o);k(Oc.$$.fragment,yi),V3=p(yi),Ts=a(yi,"P",{});var Zf=r(Ts);X3=n(Zf,"The "),Ou=a(Zf,"A",{href:!0});var h6=r(Ou);L3=n(h6,"TFBertForPreTraining"),h6.forEach(t),O3=n(Zf," forward method, overrides the "),L_=a(Zf,"CODE",{});var m6=r(L_);D3=n(m6,"__call__"),m6.forEach(t),Q3=n(Zf," special method."),Zf.forEach(t),H3=p(yi),k(tr.$$.fragment,yi),Y3=p(yi),k(or.$$.fragment,yi),yi.forEach(t),zo.forEach(t),jk=p(i),vs=a(i,"H2",{class:!0});var k0=r(vs);nr=a(k0,"A",{id:!0,class:!0,href:!0});var u6=r(nr);O_=a(u6,"SPAN",{});var f6=r(O_);k(Dc.$$.fragment,f6),f6.forEach(t),u6.forEach(t),K3=p(k0),D_=a(k0,"SPAN",{});var g6=r(D_);ez=n(g6,"TFBertModelLMHeadModel"),g6.forEach(t),k0.forEach(t),zk=p(i),ks=a(i,"DIV",{class:!0});var w0=r(ks);k(Qc.$$.fragment,w0),tz=p(w0),Zt=a(w0,"DIV",{class:!0});var zn=r(Zt);k(Hc.$$.fragment,zn),oz=p(zn),st=a(zn,"P",{});var Bt=r(st);nz=n(Bt,"encoder_hidden_states  ("),Q_=a(Bt,"CODE",{});var _6=r(Q_);sz=n(_6,"tf.Tensor"),_6.forEach(t),az=n(Bt," of shape "),H_=a(Bt,"CODE",{});var b6=r(H_);rz=n(b6,"(batch_size, sequence_length, hidden_size)"),b6.forEach(t),iz=n(Bt,", "),Y_=a(Bt,"EM",{});var y6=r(Y_);lz=n(y6,"optional"),y6.forEach(t),dz=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_);cz=n(T6,"tf.Tensor"),T6.forEach(t),pz=n(Bt," of shape "),eb=a(Bt,"CODE",{});var v6=r(eb);hz=n(v6,"(batch_size, sequence_length)"),v6.forEach(t),mz=n(Bt,", "),tb=a(Bt,"EM",{});var k6=r(tb);uz=n(k6,"optional"),k6.forEach(t),fz=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);gz=n(w6,"[0, 1]"),w6.forEach(t),_z=n(Bt,":"),Bt.forEach(t),bz=p(zn),Yc=a(zn,"UL",{});var M0=r(Yc);Kc=a(M0,"LI",{});var $0=r(Kc);yz=n($0,"1 for tokens that are "),nb=a($0,"STRONG",{});var M6=r(nb);Tz=n(M6,"not masked"),M6.forEach(t),vz=n($0,","),$0.forEach(t),kz=p(M0),ep=a(M0,"LI",{});var F0=r(ep);wz=n(F0,"0 for tokens that are "),sb=a(F0,"STRONG",{});var $6=r(sb);Mz=n($6,"masked"),$6.forEach(t),$z=n(F0,"."),F0.forEach(t),M0.forEach(t),Fz=p(zn),ne=a(zn,"P",{});var re=r(ne);Bz=n(re,"past_key_values ("),ab=a(re,"CODE",{});var F6=r(ab);xz=n(F6,"Tuple[Tuple[tf.Tensor]]"),F6.forEach(t),Ez=n(re," of length "),rb=a(re,"CODE",{});var B6=r(rb);jz=n(B6,"config.n_layers"),B6.forEach(t),zz=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);Jz=n(x6,"past_key_values"),x6.forEach(t),Cz=n(re," are used, the user can optionally input only the last "),lb=a(re,"CODE",{});var E6=r(lb);Iz=n(E6,"decoder_input_ids"),E6.forEach(t),Uz=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);Nz=n(j6,"(batch_size, 1)"),j6.forEach(t),Pz=n(re,` instead of all
`),cb=a(re,"CODE",{});var z6=r(cb);Wz=n(z6,"decoder_input_ids"),z6.forEach(t),qz=n(re," of shape "),pb=a(re,"CODE",{});var J6=r(pb);Az=n(J6,"(batch_size, sequence_length)"),J6.forEach(t),Zz=n(re,`.
use_cache (`),hb=a(re,"CODE",{});var C6=r(hb);Rz=n(C6,"bool"),C6.forEach(t),Gz=n(re,", "),mb=a(re,"EM",{});var I6=r(mb);Sz=n(I6,"optional"),I6.forEach(t),Vz=n(re,", defaults to "),ub=a(re,"CODE",{});var U6=r(ub);Xz=n(U6,"True"),U6.forEach(t),Lz=n(re,`):
If set to `),fb=a(re,"CODE",{});var N6=r(fb);Oz=n(N6,"True"),N6.forEach(t),Dz=n(re,", "),gb=a(re,"CODE",{});var P6=r(gb);Qz=n(P6,"past_key_values"),P6.forEach(t),Hz=n(re,` key value states are returned and can be used to speed up decoding (see
`),_b=a(re,"CODE",{});var W6=r(_b);Yz=n(W6,"past_key_values"),W6.forEach(t),Kz=n(re,"). Set to "),bb=a(re,"CODE",{});var q6=r(bb);eJ=n(q6,"False"),q6.forEach(t),tJ=n(re," during training, "),yb=a(re,"CODE",{});var A6=r(yb);oJ=n(A6,"True"),A6.forEach(t),nJ=n(re,` during generation
labels (`),Tb=a(re,"CODE",{});var Z6=r(Tb);sJ=n(Z6,"tf.Tensor"),Z6.forEach(t),aJ=n(re," or "),vb=a(re,"CODE",{});var R6=r(vb);rJ=n(R6,"np.ndarray"),R6.forEach(t),iJ=n(re," of shape "),kb=a(re,"CODE",{});var G6=r(kb);lJ=n(G6,"(batch_size, sequence_length)"),G6.forEach(t),dJ=n(re,", "),wb=a(re,"EM",{});var S6=r(wb);cJ=n(S6,"optional"),S6.forEach(t),pJ=n(re,`):
Labels for computing the cross entropy classification loss. Indices should be in `),Mb=a(re,"CODE",{});var V6=r(Mb);hJ=n(V6,"[0, ..., config.vocab_size - 1]"),V6.forEach(t),mJ=n(re,"."),re.forEach(t),uJ=p(zn),k(sr.$$.fragment,zn),zn.forEach(t),w0.forEach(t),Jk=p(i),ws=a(i,"H2",{class:!0});var B0=r(ws);ar=a(B0,"A",{id:!0,class:!0,href:!0});var X6=r(ar);$b=a(X6,"SPAN",{});var L6=r($b);k(tp.$$.fragment,L6),L6.forEach(t),X6.forEach(t),fJ=p(B0),Fb=a(B0,"SPAN",{});var O6=r(Fb);gJ=n(O6,"TFBertForMaskedLM"),O6.forEach(t),B0.forEach(t),Ck=p(i),yt=a(i,"DIV",{class:!0});var Jo=r(yt);k(op.$$.fragment,Jo),_J=p(Jo),np=a(Jo,"P",{});var x0=r(np);bJ=n(x0,"Bert Model with a "),Bb=a(x0,"CODE",{});var D6=r(Bb);yJ=n(D6,"language modeling"),D6.forEach(t),TJ=n(x0," head on top."),x0.forEach(t),vJ=p(Jo),sp=a(Jo,"P",{});var E0=r(sp);kJ=n(E0,"This model inherits from "),Du=a(E0,"A",{href:!0});var Q6=r(Du);wJ=n(Q6,"TFPreTrainedModel"),Q6.forEach(t),MJ=n(E0,`. 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.)`),E0.forEach(t),$J=p(Jo),ap=a(Jo,"P",{});var j0=r(ap);FJ=n(j0,"This model is also a "),rp=a(j0,"A",{href:!0,rel:!0});var H6=r(rp);BJ=n(H6,"tf.keras.Model"),H6.forEach(t),xJ=n(j0,` 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.`),j0.forEach(t),EJ=p(Jo),k(rr.$$.fragment,Jo),jJ=p(Jo),Rt=a(Jo,"DIV",{class:!0});var Jn=r(Rt);k(ip.$$.fragment,Jn),zJ=p(Jn),Ms=a(Jn,"P",{});var Rf=r(Ms);JJ=n(Rf,"The "),Qu=a(Rf,"A",{href:!0});var Y6=r(Qu);CJ=n(Y6,"TFBertForMaskedLM"),Y6.forEach(t),IJ=n(Rf," forward method, overrides the "),xb=a(Rf,"CODE",{});var K6=r(xb);UJ=n(K6,"__call__"),K6.forEach(t),NJ=n(Rf," special method."),Rf.forEach(t),PJ=p(Jn),k(ir.$$.fragment,Jn),WJ=p(Jn),k(lr.$$.fragment,Jn),qJ=p(Jn),k(dr.$$.fragment,Jn),Jn.forEach(t),Jo.forEach(t),Ik=p(i),$s=a(i,"H2",{class:!0});var z0=r($s);cr=a(z0,"A",{id:!0,class:!0,href:!0});var eR=r(cr);Eb=a(eR,"SPAN",{});var tR=r(Eb);k(lp.$$.fragment,tR),tR.forEach(t),eR.forEach(t),AJ=p(z0),jb=a(z0,"SPAN",{});var oR=r(jb);ZJ=n(oR,"TFBertForNextSentencePrediction"),oR.forEach(t),z0.forEach(t),Uk=p(i),Tt=a(i,"DIV",{class:!0});var Co=r(Tt);k(dp.$$.fragment,Co),RJ=p(Co),cp=a(Co,"P",{});var J0=r(cp);GJ=n(J0,"Bert Model with a "),zb=a(J0,"CODE",{});var nR=r(zb);SJ=n(nR,"next sentence prediction (classification)"),nR.forEach(t),VJ=n(J0," head on top."),J0.forEach(t),XJ=p(Co),pp=a(Co,"P",{});var C0=r(pp);LJ=n(C0,"This model inherits from "),Hu=a(C0,"A",{href:!0});var sR=r(Hu);OJ=n(sR,"TFPreTrainedModel"),sR.forEach(t),DJ=n(C0,`. 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.)`),C0.forEach(t),QJ=p(Co),hp=a(Co,"P",{});var I0=r(hp);HJ=n(I0,"This model is also a "),mp=a(I0,"A",{href:!0,rel:!0});var aR=r(mp);YJ=n(aR,"tf.keras.Model"),aR.forEach(t),KJ=n(I0,` 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.`),I0.forEach(t),eC=p(Co),k(pr.$$.fragment,Co),tC=p(Co),bo=a(Co,"DIV",{class:!0});var Ti=r(bo);k(up.$$.fragment,Ti),oC=p(Ti),Fs=a(Ti,"P",{});var Gf=r(Fs);nC=n(Gf,"The "),Yu=a(Gf,"A",{href:!0});var rR=r(Yu);sC=n(rR,"TFBertForNextSentencePrediction"),rR.forEach(t),aC=n(Gf," forward method, overrides the "),Jb=a(Gf,"CODE",{});var iR=r(Jb);rC=n(iR,"__call__"),iR.forEach(t),iC=n(Gf," special method."),Gf.forEach(t),lC=p(Ti),k(hr.$$.fragment,Ti),dC=p(Ti),k(mr.$$.fragment,Ti),Ti.forEach(t),Co.forEach(t),Nk=p(i),Bs=a(i,"H2",{class:!0});var U0=r(Bs);ur=a(U0,"A",{id:!0,class:!0,href:!0});var lR=r(ur);Cb=a(lR,"SPAN",{});var dR=r(Cb);k(fp.$$.fragment,dR),dR.forEach(t),lR.forEach(t),cC=p(U0),Ib=a(U0,"SPAN",{});var cR=r(Ib);pC=n(cR,"TFBertForSequenceClassification"),cR.forEach(t),U0.forEach(t),Pk=p(i),vt=a(i,"DIV",{class:!0});var Io=r(vt);k(gp.$$.fragment,Io),hC=p(Io),Ub=a(Io,"P",{});var pR=r(Ub);mC=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),uC=p(Io),_p=a(Io,"P",{});var N0=r(_p);fC=n(N0,"This model inherits from "),Ku=a(N0,"A",{href:!0});var hR=r(Ku);gC=n(hR,"TFPreTrainedModel"),hR.forEach(t),_C=n(N0,`. 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.)`),N0.forEach(t),bC=p(Io),bp=a(Io,"P",{});var P0=r(bp);yC=n(P0,"This model is also a "),yp=a(P0,"A",{href:!0,rel:!0});var mR=r(yp);TC=n(mR,"tf.keras.Model"),mR.forEach(t),vC=n(P0,` 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.`),P0.forEach(t),kC=p(Io),k(fr.$$.fragment,Io),wC=p(Io),Gt=a(Io,"DIV",{class:!0});var Cn=r(Gt);k(Tp.$$.fragment,Cn),MC=p(Cn),xs=a(Cn,"P",{});var Sf=r(xs);$C=n(Sf,"The "),ef=a(Sf,"A",{href:!0});var uR=r(ef);FC=n(uR,"TFBertForSequenceClassification"),uR.forEach(t),BC=n(Sf," forward method, overrides the "),Nb=a(Sf,"CODE",{});var fR=r(Nb);xC=n(fR,"__call__"),fR.forEach(t),EC=n(Sf," special method."),Sf.forEach(t),jC=p(Cn),k(gr.$$.fragment,Cn),zC=p(Cn),k(_r.$$.fragment,Cn),JC=p(Cn),k(br.$$.fragment,Cn),Cn.forEach(t),Io.forEach(t),Wk=p(i),Es=a(i,"H2",{class:!0});var W0=r(Es);yr=a(W0,"A",{id:!0,class:!0,href:!0});var gR=r(yr);Pb=a(gR,"SPAN",{});var _R=r(Pb);k(vp.$$.fragment,_R),_R.forEach(t),gR.forEach(t),CC=p(W0),Wb=a(W0,"SPAN",{});var bR=r(Wb);IC=n(bR,"TFBertForMultipleChoice"),bR.forEach(t),W0.forEach(t),qk=p(i),kt=a(i,"DIV",{class:!0});var Uo=r(kt);k(kp.$$.fragment,Uo),UC=p(Uo),qb=a(Uo,"P",{});var yR=r(qb);NC=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),PC=p(Uo),wp=a(Uo,"P",{});var q0=r(wp);WC=n(q0,"This model inherits from "),tf=a(q0,"A",{href:!0});var TR=r(tf);qC=n(TR,"TFPreTrainedModel"),TR.forEach(t),AC=n(q0,`. 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.)`),q0.forEach(t),ZC=p(Uo),Mp=a(Uo,"P",{});var A0=r(Mp);RC=n(A0,"This model is also a "),$p=a(A0,"A",{href:!0,rel:!0});var vR=r($p);GC=n(vR,"tf.keras.Model"),vR.forEach(t),SC=n(A0,` 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.`),A0.forEach(t),VC=p(Uo),k(Tr.$$.fragment,Uo),XC=p(Uo),yo=a(Uo,"DIV",{class:!0});var vi=r(yo);k(Fp.$$.fragment,vi),LC=p(vi),js=a(vi,"P",{});var Vf=r(js);OC=n(Vf,"The "),of=a(Vf,"A",{href:!0});var kR=r(of);DC=n(kR,"TFBertForMultipleChoice"),kR.forEach(t),QC=n(Vf," forward method, overrides the "),Ab=a(Vf,"CODE",{});var wR=r(Ab);HC=n(wR,"__call__"),wR.forEach(t),YC=n(Vf," special method."),Vf.forEach(t),KC=p(vi),k(vr.$$.fragment,vi),e5=p(vi),k(kr.$$.fragment,vi),vi.forEach(t),Uo.forEach(t),Ak=p(i),zs=a(i,"H2",{class:!0});var Z0=r(zs);wr=a(Z0,"A",{id:!0,class:!0,href:!0});var MR=r(wr);Zb=a(MR,"SPAN",{});var $R=r(Zb);k(Bp.$$.fragment,$R),$R.forEach(t),MR.forEach(t),t5=p(Z0),Rb=a(Z0,"SPAN",{});var FR=r(Rb);o5=n(FR,"TFBertForTokenClassification"),FR.forEach(t),Z0.forEach(t),Zk=p(i),wt=a(i,"DIV",{class:!0});var No=r(wt);k(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 R0=r(Ep);r5=n(R0,"This model inherits from "),nf=a(R0,"A",{href:!0});var xR=r(nf);i5=n(xR,"TFPreTrainedModel"),xR.forEach(t),l5=n(R0,`. 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.)`),R0.forEach(t),d5=p(No),jp=a(No,"P",{});var G0=r(jp);c5=n(G0,"This model is also a "),zp=a(G0,"A",{href:!0,rel:!0});var ER=r(zp);p5=n(ER,"tf.keras.Model"),ER.forEach(t),h5=n(G0,` 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.`),G0.forEach(t),m5=p(No),k(Mr.$$.fragment,No),u5=p(No),St=a(No,"DIV",{class:!0});var In=r(St);k(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 "),Sb=a(Xf,"CODE",{});var zR=r(Sb);y5=n(zR,"__call__"),zR.forEach(t),T5=n(Xf," special method."),Xf.forEach(t),v5=p(In),k($r.$$.fragment,In),k5=p(In),k(Fr.$$.fragment,In),w5=p(In),k(Br.$$.fragment,In),In.forEach(t),No.forEach(t),Rk=p(i),Cs=a(i,"H2",{class:!0});var S0=r(Cs);xr=a(S0,"A",{id:!0,class:!0,href:!0});var JR=r(xr);Vb=a(JR,"SPAN",{});var CR=r(Vb);k(Cp.$$.fragment,CR),CR.forEach(t),JR.forEach(t),M5=p(S0),Xb=a(S0,"SPAN",{});var IR=r(Xb);$5=n(IR,"TFBertForQuestionAnswering"),IR.forEach(t),S0.forEach(t),Gk=p(i),Mt=a(i,"DIV",{class:!0});var Po=r(Mt);k(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 V0=r(Up);C5=n(V0,"This model inherits from "),af=a(V0,"A",{href:!0});var PR=r(af);I5=n(PR,"TFPreTrainedModel"),PR.forEach(t),U5=n(V0,`. 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.)`),V0.forEach(t),N5=p(Po),Np=a(Po,"P",{});var X0=r(Np);P5=n(X0,"This model is also a "),Pp=a(X0,"A",{href:!0,rel:!0});var WR=r(Pp);W5=n(WR,"tf.keras.Model"),WR.forEach(t),q5=n(X0,` 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.`),X0.forEach(t),A5=p(Po),k(Er.$$.fragment,Po),Z5=p(Po),Vt=a(Po,"DIV",{class:!0});var Un=r(Vt);k(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);S5=n(qR,"TFBertForQuestionAnswering"),qR.forEach(t),V5=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),k(jr.$$.fragment,Un),D5=p(Un),k(zr.$$.fragment,Un),Q5=p(Un),k(Jr.$$.fragment,Un),Un.forEach(t),Po.forEach(t),Sk=p(i),Ns=a(i,"H2",{class:!0});var L0=r(Ns);Cr=a(L0,"A",{id:!0,class:!0,href:!0});var ZR=r(Cr);Qb=a(ZR,"SPAN",{});var RR=r(Qb);k(qp.$$.fragment,RR),RR.forEach(t),ZR.forEach(t),H5=p(L0),Hb=a(L0,"SPAN",{});var GR=r(Hb);Y5=n(GR,"FlaxBertModel"),GR.forEach(t),L0.forEach(t),Vk=p(i),at=a(i,"DIV",{class:!0});var Dt=r(at);k(Ap.$$.fragment,Dt),K5=p(Dt),Yb=a(Dt,"P",{});var SR=r(Yb);eI=n(SR,"The bare Bert Model transformer outputting raw hidden-states without any specific head on top."),SR.forEach(t),tI=p(Dt),Zp=a(Dt,"P",{});var O0=r(Zp);oI=n(O0,"This model inherits from "),lf=a(O0,"A",{href:!0});var VR=r(lf);nI=n(VR,"FlaxPreTrainedModel"),VR.forEach(t),sI=n(O0,`. 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)`),O0.forEach(t),aI=p(Dt),Rp=a(Dt,"P",{});var D0=r(Rp);rI=n(D0,"This model is also a Flax Linen "),Gp=a(D0,"A",{href:!0,rel:!0});var XR=r(Gp);iI=n(XR,"flax.linen.Module"),XR.forEach(t),lI=n(D0,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),D0.forEach(t),dI=p(Dt),Kb=a(Dt,"P",{});var LR=r(Kb);cI=n(LR,"Finally, this model supports inherent JAX features such as:"),LR.forEach(t),pI=p(Dt),Ao=a(Dt,"UL",{});var ki=r(Ao);ey=a(ki,"LI",{});var OR=r(ey);Sp=a(OR,"A",{href:!0,rel:!0});var DR=r(Sp);hI=n(DR,"Just-In-Time (JIT) compilation"),DR.forEach(t),OR.forEach(t),mI=p(ki),ty=a(ki,"LI",{});var QR=r(ty);Vp=a(QR,"A",{href:!0,rel:!0});var HR=r(Vp);uI=n(HR,"Automatic Differentiation"),HR.forEach(t),QR.forEach(t),fI=p(ki),oy=a(ki,"LI",{});var YR=r(oy);Xp=a(YR,"A",{href:!0,rel:!0});var KR=r(Xp);gI=n(KR,"Vectorization"),KR.forEach(t),YR.forEach(t),_I=p(ki),ny=a(ki,"LI",{});var eG=r(ny);Lp=a(eG,"A",{href:!0,rel:!0});var tG=r(Lp);bI=n(tG,"Parallelization"),tG.forEach(t),eG.forEach(t),ki.forEach(t),yI=p(Dt),To=a(Dt,"DIV",{class:!0});var wi=r(To);k(Op.$$.fragment,wi),TI=p(wi),Ps=a(wi,"P",{});var Df=r(Ps);vI=n(Df,"The "),sy=a(Df,"CODE",{});var oG=r(sy);kI=n(oG,"FlaxBertPreTrainedModel"),oG.forEach(t),wI=n(Df," forward method, overrides the "),ay=a(Df,"CODE",{});var nG=r(ay);MI=n(nG,"__call__"),nG.forEach(t),$I=n(Df," special method."),Df.forEach(t),FI=p(wi),k(Ir.$$.fragment,wi),BI=p(wi),k(Ur.$$.fragment,wi),wi.forEach(t),Dt.forEach(t),Xk=p(i),Ws=a(i,"H2",{class:!0});var Q0=r(Ws);Nr=a(Q0,"A",{id:!0,class:!0,href:!0});var sG=r(Nr);ry=a(sG,"SPAN",{});var aG=r(ry);k(Dp.$$.fragment,aG),aG.forEach(t),sG.forEach(t),xI=p(Q0),iy=a(Q0,"SPAN",{});var rG=r(iy);EI=n(rG,"FlaxBertForPreTraining"),rG.forEach(t),Q0.forEach(t),Lk=p(i),rt=a(i,"DIV",{class:!0});var Qt=r(rt);k(Qp.$$.fragment,Qt),jI=p(Qt),qs=a(Qt,"P",{});var Qf=r(qs);zI=n(Qf,"Bert Model with two heads on top as done during the pretraining: a "),ly=a(Qf,"CODE",{});var iG=r(ly);JI=n(iG,"masked language modeling"),iG.forEach(t),CI=n(Qf," head and a "),dy=a(Qf,"CODE",{});var lG=r(dy);II=n(lG,"next sentence prediction (classification)"),lG.forEach(t),UI=n(Qf," head."),Qf.forEach(t),NI=p(Qt),Hp=a(Qt,"P",{});var H0=r(Hp);PI=n(H0,"This model inherits from "),df=a(H0,"A",{href:!0});var dG=r(df);WI=n(dG,"FlaxPreTrainedModel"),dG.forEach(t),qI=n(H0,`. 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)`),H0.forEach(t),AI=p(Qt),Yp=a(Qt,"P",{});var Y0=r(Yp);ZI=n(Y0,"This model is also a Flax Linen "),Kp=a(Y0,"A",{href:!0,rel:!0});var cG=r(Kp);RI=n(cG,"flax.linen.Module"),cG.forEach(t),GI=n(Y0,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Y0.forEach(t),SI=p(Qt),cy=a(Qt,"P",{});var pG=r(cy);VI=n(pG,"Finally, this model supports inherent JAX features such as:"),pG.forEach(t),XI=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);LI=n(mG,"Just-In-Time (JIT) compilation"),mG.forEach(t),hG.forEach(t),OI=p(Mi),hy=a(Mi,"LI",{});var uG=r(hy);th=a(uG,"A",{href:!0,rel:!0});var fG=r(th);DI=n(fG,"Automatic Differentiation"),fG.forEach(t),uG.forEach(t),QI=p(Mi),my=a(Mi,"LI",{});var gG=r(my);oh=a(gG,"A",{href:!0,rel:!0});var _G=r(oh);HI=n(_G,"Vectorization"),_G.forEach(t),gG.forEach(t),YI=p(Mi),uy=a(Mi,"LI",{});var bG=r(uy);nh=a(bG,"A",{href:!0,rel:!0});var yG=r(nh);KI=n(yG,"Parallelization"),yG.forEach(t),bG.forEach(t),Mi.forEach(t),eU=p(Qt),vo=a(Qt,"DIV",{class:!0});var $i=r(vo);k(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 vG=r(gy);aU=n(vG,"__call__"),vG.forEach(t),rU=n(Hf," special method."),Hf.forEach(t),iU=p($i),k(Pr.$$.fragment,$i),lU=p($i),k(Wr.$$.fragment,$i),$i.forEach(t),Qt.forEach(t),Ok=p(i),Zs=a(i,"H2",{class:!0});var K0=r(Zs);qr=a(K0,"A",{id:!0,class:!0,href:!0});var kG=r(qr);_y=a(kG,"SPAN",{});var wG=r(_y);k(ah.$$.fragment,wG),wG.forEach(t),kG.forEach(t),dU=p(K0),by=a(K0,"SPAN",{});var MG=r(by);cU=n(MG,"FlaxBertForCausalLM"),MG.forEach(t),K0.forEach(t),Dk=p(i),it=a(i,"DIV",{class:!0});var Ht=r(it);k(rh.$$.fragment,Ht),pU=p(Ht),yy=a(Ht,"P",{});var $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 e1=r(ih);uU=n(e1,"This model inherits from "),cf=a(e1,"A",{href:!0});var FG=r(cf);fU=n(FG,"FlaxPreTrainedModel"),FG.forEach(t),gU=n(e1,`. 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)`),e1.forEach(t),_U=p(Ht),lh=a(Ht,"P",{});var t1=r(lh);bU=n(t1,"This model is also a Flax Linen "),dh=a(t1,"A",{href:!0,rel:!0});var BG=r(dh);yU=n(BG,"flax.linen.Module"),BG.forEach(t),TU=n(t1,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),t1.forEach(t),vU=p(Ht),Ty=a(Ht,"P",{});var xG=r(Ty);kU=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);vy=a(Fi,"LI",{});var EG=r(vy);ch=a(EG,"A",{href:!0,rel:!0});var jG=r(ch);MU=n(jG,"Just-In-Time (JIT) compilation"),jG.forEach(t),EG.forEach(t),$U=p(Fi),ky=a(Fi,"LI",{});var zG=r(ky);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),ko=a(Ht,"DIV",{class:!0});var Bi=r(ko);k(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),k(Ar.$$.fragment,Bi),qU=p(Bi),k(Zr.$$.fragment,Bi),Bi.forEach(t),Ht.forEach(t),Qk=p(i),Gs=a(i,"H2",{class:!0});var o1=r(Gs);Rr=a(o1,"A",{id:!0,class:!0,href:!0});var qG=r(Rr);By=a(qG,"SPAN",{});var AG=r(By);k(fh.$$.fragment,AG),AG.forEach(t),qG.forEach(t),AU=p(o1),xy=a(o1,"SPAN",{});var ZG=r(xy);ZU=n(ZG,"FlaxBertForMaskedLM"),ZG.forEach(t),o1.forEach(t),Hk=p(i),lt=a(i,"DIV",{class:!0});var Yt=r(lt);k(gh.$$.fragment,Yt),RU=p(Yt),_h=a(Yt,"P",{});var n1=r(_h);GU=n(n1,"Bert Model with a "),Ey=a(n1,"CODE",{});var RG=r(Ey);SU=n(RG,"language modeling"),RG.forEach(t),VU=n(n1," head on top."),n1.forEach(t),XU=p(Yt),bh=a(Yt,"P",{});var s1=r(bh);LU=n(s1,"This model inherits from "),pf=a(s1,"A",{href:!0});var GG=r(pf);OU=n(GG,"FlaxPreTrainedModel"),GG.forEach(t),DU=n(s1,`. 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)`),s1.forEach(t),QU=p(Yt),yh=a(Yt,"P",{});var a1=r(yh);HU=n(a1,"This model is also a Flax Linen "),Th=a(a1,"A",{href:!0,rel:!0});var SG=r(Th);YU=n(SG,"flax.linen.Module"),SG.forEach(t),KU=n(a1,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),a1.forEach(t),eN=p(Yt),jy=a(Yt,"P",{});var VG=r(jy);tN=n(VG,"Finally, this model supports inherent JAX features such as:"),VG.forEach(t),oN=p(Yt),Go=a(Yt,"UL",{});var xi=r(Go);zy=a(xi,"LI",{});var XG=r(zy);vh=a(XG,"A",{href:!0,rel:!0});var LG=r(vh);nN=n(LG,"Just-In-Time (JIT) compilation"),LG.forEach(t),XG.forEach(t),sN=p(xi),Jy=a(xi,"LI",{});var OG=r(Jy);kh=a(OG,"A",{href:!0,rel:!0});var DG=r(kh);aN=n(DG,"Automatic Differentiation"),DG.forEach(t),OG.forEach(t),rN=p(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);k($h.$$.fragment,Ei),pN=p(Ei),Ss=a(Ei,"P",{});var Kf=r(Ss);hN=n(Kf,"The "),Uy=a(Kf,"CODE",{});var eS=r(Uy);mN=n(eS,"FlaxBertPreTrainedModel"),eS.forEach(t),uN=n(Kf," forward method, overrides the "),Ny=a(Kf,"CODE",{});var tS=r(Ny);fN=n(tS,"__call__"),tS.forEach(t),gN=n(Kf," special method."),Kf.forEach(t),_N=p(Ei),k(Gr.$$.fragment,Ei),bN=p(Ei),k(Sr.$$.fragment,Ei),Ei.forEach(t),Yt.forEach(t),Yk=p(i),Vs=a(i,"H2",{class:!0});var r1=r(Vs);Vr=a(r1,"A",{id:!0,class:!0,href:!0});var oS=r(Vr);Py=a(oS,"SPAN",{});var nS=r(Py);k(Fh.$$.fragment,nS),nS.forEach(t),oS.forEach(t),yN=p(r1),Wy=a(r1,"SPAN",{});var sS=r(Wy);TN=n(sS,"FlaxBertForNextSentencePrediction"),sS.forEach(t),r1.forEach(t),Kk=p(i),dt=a(i,"DIV",{class:!0});var Kt=r(dt);k(Bh.$$.fragment,Kt),vN=p(Kt),xh=a(Kt,"P",{});var i1=r(xh);kN=n(i1,"Bert Model with a "),qy=a(i1,"CODE",{});var aS=r(qy);wN=n(aS,"next sentence prediction (classification)"),aS.forEach(t),MN=n(i1," head on top."),i1.forEach(t),$N=p(Kt),Eh=a(Kt,"P",{});var l1=r(Eh);FN=n(l1,"This model inherits from "),hf=a(l1,"A",{href:!0});var rS=r(hf);BN=n(rS,"FlaxPreTrainedModel"),rS.forEach(t),xN=n(l1,`. 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)`),l1.forEach(t),EN=p(Kt),jh=a(Kt,"P",{});var d1=r(jh);jN=n(d1,"This model is also a Flax Linen "),zh=a(d1,"A",{href:!0,rel:!0});var iS=r(zh);zN=n(iS,"flax.linen.Module"),iS.forEach(t),JN=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),CN=p(Kt),Ay=a(Kt,"P",{});var lS=r(Ay);IN=n(lS,"Finally, this model supports inherent JAX features such as:"),lS.forEach(t),UN=p(Kt),So=a(Kt,"UL",{});var ji=r(So);Zy=a(ji,"LI",{});var dS=r(Zy);Jh=a(dS,"A",{href:!0,rel:!0});var cS=r(Jh);NN=n(cS,"Just-In-Time (JIT) compilation"),cS.forEach(t),dS.forEach(t),PN=p(ji),Ry=a(ji,"LI",{});var pS=r(Ry);Ch=a(pS,"A",{href:!0,rel:!0});var hS=r(Ch);WN=n(hS,"Automatic Differentiation"),hS.forEach(t),pS.forEach(t),qN=p(ji),Gy=a(ji,"LI",{});var mS=r(Gy);Ih=a(mS,"A",{href:!0,rel:!0});var uS=r(Ih);AN=n(uS,"Vectorization"),uS.forEach(t),mS.forEach(t),ZN=p(ji),Sy=a(ji,"LI",{});var fS=r(Sy);Uh=a(fS,"A",{href:!0,rel:!0});var gS=r(Uh);RN=n(gS,"Parallelization"),gS.forEach(t),fS.forEach(t),ji.forEach(t),GN=p(Kt),Mo=a(Kt,"DIV",{class:!0});var zi=r(Mo);k(Nh.$$.fragment,zi),SN=p(zi),Xs=a(zi,"P",{});var eg=r(Xs);VN=n(eg,"The "),Vy=a(eg,"CODE",{});var _S=r(Vy);XN=n(_S,"FlaxBertPreTrainedModel"),_S.forEach(t),LN=n(eg," forward method, overrides the "),Xy=a(eg,"CODE",{});var bS=r(Xy);ON=n(bS,"__call__"),bS.forEach(t),DN=n(eg," special method."),eg.forEach(t),QN=p(zi),k(Xr.$$.fragment,zi),HN=p(zi),k(Lr.$$.fragment,zi),zi.forEach(t),Kt.forEach(t),ew=p(i),Ls=a(i,"H2",{class:!0});var c1=r(Ls);Or=a(c1,"A",{id:!0,class:!0,href:!0});var yS=r(Or);Ly=a(yS,"SPAN",{});var TS=r(Ly);k(Ph.$$.fragment,TS),TS.forEach(t),yS.forEach(t),YN=p(c1),Oy=a(c1,"SPAN",{});var vS=r(Oy);KN=n(vS,"FlaxBertForSequenceClassification"),vS.forEach(t),c1.forEach(t),tw=p(i),ct=a(i,"DIV",{class:!0});var eo=r(ct);k(Wh.$$.fragment,eo),e9=p(eo),Dy=a(eo,"P",{});var kS=r(Dy);t9=n(kS,`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.`),kS.forEach(t),o9=p(eo),qh=a(eo,"P",{});var p1=r(qh);n9=n(p1,"This model inherits from "),mf=a(p1,"A",{href:!0});var wS=r(mf);s9=n(wS,"FlaxPreTrainedModel"),wS.forEach(t),a9=n(p1,`. 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)`),p1.forEach(t),r9=p(eo),Ah=a(eo,"P",{});var h1=r(Ah);i9=n(h1,"This model is also a Flax Linen "),Zh=a(h1,"A",{href:!0,rel:!0});var MS=r(Zh);l9=n(MS,"flax.linen.Module"),MS.forEach(t),d9=n(h1,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),h1.forEach(t),c9=p(eo),Qy=a(eo,"P",{});var $S=r(Qy);p9=n($S,"Finally, this model supports inherent JAX features such as:"),$S.forEach(t),h9=p(eo),Vo=a(eo,"UL",{});var Ji=r(Vo);Hy=a(Ji,"LI",{});var FS=r(Hy);Rh=a(FS,"A",{href:!0,rel:!0});var BS=r(Rh);m9=n(BS,"Just-In-Time (JIT) compilation"),BS.forEach(t),FS.forEach(t),u9=p(Ji),Yy=a(Ji,"LI",{});var xS=r(Yy);Gh=a(xS,"A",{href:!0,rel:!0});var ES=r(Gh);f9=n(ES,"Automatic Differentiation"),ES.forEach(t),xS.forEach(t),g9=p(Ji),Ky=a(Ji,"LI",{});var jS=r(Ky);Sh=a(jS,"A",{href:!0,rel:!0});var zS=r(Sh);_9=n(zS,"Vectorization"),zS.forEach(t),jS.forEach(t),b9=p(Ji),eT=a(Ji,"LI",{});var JS=r(eT);Vh=a(JS,"A",{href:!0,rel:!0});var CS=r(Vh);y9=n(CS,"Parallelization"),CS.forEach(t),JS.forEach(t),Ji.forEach(t),T9=p(eo),$o=a(eo,"DIV",{class:!0});var Ci=r($o);k(Xh.$$.fragment,Ci),v9=p(Ci),Os=a(Ci,"P",{});var tg=r(Os);k9=n(tg,"The "),tT=a(tg,"CODE",{});var IS=r(tT);w9=n(IS,"FlaxBertPreTrainedModel"),IS.forEach(t),M9=n(tg," forward method, overrides the "),oT=a(tg,"CODE",{});var US=r(oT);$9=n(US,"__call__"),US.forEach(t),F9=n(tg," special method."),tg.forEach(t),B9=p(Ci),k(Dr.$$.fragment,Ci),x9=p(Ci),k(Qr.$$.fragment,Ci),Ci.forEach(t),eo.forEach(t),ow=p(i),Ds=a(i,"H2",{class:!0});var m1=r(Ds);Hr=a(m1,"A",{id:!0,class:!0,href:!0});var NS=r(Hr);nT=a(NS,"SPAN",{});var PS=r(nT);k(Lh.$$.fragment,PS),PS.forEach(t),NS.forEach(t),E9=p(m1),sT=a(m1,"SPAN",{});var WS=r(sT);j9=n(WS,"FlaxBertForMultipleChoice"),WS.forEach(t),m1.forEach(t),nw=p(i),pt=a(i,"DIV",{class:!0});var to=r(pt);k(Oh.$$.fragment,to),z9=p(to),aT=a(to,"P",{});var qS=r(aT);J9=n(qS,`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.`),qS.forEach(t),C9=p(to),Dh=a(to,"P",{});var u1=r(Dh);I9=n(u1,"This model inherits from "),uf=a(u1,"A",{href:!0});var AS=r(uf);U9=n(AS,"FlaxPreTrainedModel"),AS.forEach(t),N9=n(u1,`. 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)`),u1.forEach(t),P9=p(to),Qh=a(to,"P",{});var f1=r(Qh);W9=n(f1,"This model is also a Flax Linen "),Hh=a(f1,"A",{href:!0,rel:!0});var ZS=r(Hh);q9=n(ZS,"flax.linen.Module"),ZS.forEach(t),A9=n(f1,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),f1.forEach(t),Z9=p(to),rT=a(to,"P",{});var RS=r(rT);R9=n(RS,"Finally, this model supports inherent JAX features such as:"),RS.forEach(t),G9=p(to),Xo=a(to,"UL",{});var Ii=r(Xo);iT=a(Ii,"LI",{});var GS=r(iT);Yh=a(GS,"A",{href:!0,rel:!0});var SS=r(Yh);S9=n(SS,"Just-In-Time (JIT) compilation"),SS.forEach(t),GS.forEach(t),V9=p(Ii),lT=a(Ii,"LI",{});var VS=r(lT);Kh=a(VS,"A",{href:!0,rel:!0});var XS=r(Kh);X9=n(XS,"Automatic Differentiation"),XS.forEach(t),VS.forEach(t),L9=p(Ii),dT=a(Ii,"LI",{});var LS=r(dT);em=a(LS,"A",{href:!0,rel:!0});var OS=r(em);O9=n(OS,"Vectorization"),OS.forEach(t),LS.forEach(t),D9=p(Ii),cT=a(Ii,"LI",{});var DS=r(cT);tm=a(DS,"A",{href:!0,rel:!0});var QS=r(tm);Q9=n(QS,"Parallelization"),QS.forEach(t),DS.forEach(t),Ii.forEach(t),H9=p(to),Fo=a(to,"DIV",{class:!0});var Ui=r(Fo);k(om.$$.fragment,Ui),Y9=p(Ui),Qs=a(Ui,"P",{});var og=r(Qs);K9=n(og,"The "),pT=a(og,"CODE",{});var HS=r(pT);eP=n(HS,"FlaxBertPreTrainedModel"),HS.forEach(t),tP=n(og," forward method, overrides the "),hT=a(og,"CODE",{});var YS=r(hT);oP=n(YS,"__call__"),YS.forEach(t),nP=n(og," special method."),og.forEach(t),sP=p(Ui),k(Yr.$$.fragment,Ui),aP=p(Ui),k(Kr.$$.fragment,Ui),Ui.forEach(t),to.forEach(t),sw=p(i),Hs=a(i,"H2",{class:!0});var g1=r(Hs);ei=a(g1,"A",{id:!0,class:!0,href:!0});var KS=r(ei);mT=a(KS,"SPAN",{});var eV=r(mT);k(nm.$$.fragment,eV),eV.forEach(t),KS.forEach(t),rP=p(g1),uT=a(g1,"SPAN",{});var tV=r(uT);iP=n(tV,"FlaxBertForTokenClassification"),tV.forEach(t),g1.forEach(t),aw=p(i),ht=a(i,"DIV",{class:!0});var oo=r(ht);k(sm.$$.fragment,oo),lP=p(oo),fT=a(oo,"P",{});var oV=r(fT);dP=n(oV,`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.`),oV.forEach(t),cP=p(oo),am=a(oo,"P",{});var _1=r(am);pP=n(_1,"This model inherits from "),ff=a(_1,"A",{href:!0});var nV=r(ff);hP=n(nV,"FlaxPreTrainedModel"),nV.forEach(t),mP=n(_1,`. 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)`),_1.forEach(t),uP=p(oo),rm=a(oo,"P",{});var b1=r(rm);fP=n(b1,"This model is also a Flax Linen "),im=a(b1,"A",{href:!0,rel:!0});var sV=r(im);gP=n(sV,"flax.linen.Module"),sV.forEach(t),_P=n(b1,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),b1.forEach(t),bP=p(oo),gT=a(oo,"P",{});var aV=r(gT);yP=n(aV,"Finally, this model supports inherent JAX features such as:"),aV.forEach(t),TP=p(oo),Lo=a(oo,"UL",{});var Ni=r(Lo);_T=a(Ni,"LI",{});var rV=r(_T);lm=a(rV,"A",{href:!0,rel:!0});var iV=r(lm);vP=n(iV,"Just-In-Time (JIT) compilation"),iV.forEach(t),rV.forEach(t),kP=p(Ni),bT=a(Ni,"LI",{});var lV=r(bT);dm=a(lV,"A",{href:!0,rel:!0});var dV=r(dm);wP=n(dV,"Automatic Differentiation"),dV.forEach(t),lV.forEach(t),MP=p(Ni),yT=a(Ni,"LI",{});var cV=r(yT);cm=a(cV,"A",{href:!0,rel:!0});var pV=r(cm);$P=n(pV,"Vectorization"),pV.forEach(t),cV.forEach(t),FP=p(Ni),TT=a(Ni,"LI",{});var hV=r(TT);pm=a(hV,"A",{href:!0,rel:!0});var mV=r(pm);BP=n(mV,"Parallelization"),mV.forEach(t),hV.forEach(t),Ni.forEach(t),xP=p(oo),Bo=a(oo,"DIV",{class:!0});var Pi=r(Bo);k(hm.$$.fragment,Pi),EP=p(Pi),Ys=a(Pi,"P",{});var ng=r(Ys);jP=n(ng,"The "),vT=a(ng,"CODE",{});var uV=r(vT);zP=n(uV,"FlaxBertPreTrainedModel"),uV.forEach(t),JP=n(ng," forward method, overrides the "),kT=a(ng,"CODE",{});var fV=r(kT);CP=n(fV,"__call__"),fV.forEach(t),IP=n(ng," special method."),ng.forEach(t),UP=p(Pi),k(ti.$$.fragment,Pi),NP=p(Pi),k(oi.$$.fragment,Pi),Pi.forEach(t),oo.forEach(t),rw=p(i),Ks=a(i,"H2",{class:!0});var y1=r(Ks);ni=a(y1,"A",{id:!0,class:!0,href:!0});var gV=r(ni);wT=a(gV,"SPAN",{});var _V=r(wT);k(mm.$$.fragment,_V),_V.forEach(t),gV.forEach(t),PP=p(y1),MT=a(y1,"SPAN",{});var bV=r(MT);WP=n(bV,"FlaxBertForQuestionAnswering"),bV.forEach(t),y1.forEach(t),iw=p(i),mt=a(i,"DIV",{class:!0});var no=r(mt);k(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 yV=r($T);ZP=n(yV,"span start logits"),yV.forEach(t),RP=n(sg," and "),FT=a(sg,"CODE",{});var TV=r(FT);GP=n(TV,"span end logits"),TV.forEach(t),SP=n(sg,")."),sg.forEach(t),VP=p(no),fm=a(no,"P",{});var T1=r(fm);XP=n(T1,"This model inherits from "),gf=a(T1,"A",{href:!0});var vV=r(gf);LP=n(vV,"FlaxPreTrainedModel"),vV.forEach(t),OP=n(T1,`. 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)`),T1.forEach(t),DP=p(no),gm=a(no,"P",{});var v1=r(gm);QP=n(v1,"This model is also a Flax Linen "),_m=a(v1,"A",{href:!0,rel:!0});var kV=r(_m);HP=n(kV,"flax.linen.Module"),kV.forEach(t),YP=n(v1,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),v1.forEach(t),KP=p(no),BT=a(no,"P",{});var wV=r(BT);eW=n(wV,"Finally, this model supports inherent JAX features such as:"),wV.forEach(t),tW=p(no),Oo=a(no,"UL",{});var Wi=r(Oo);xT=a(Wi,"LI",{});var MV=r(xT);bm=a(MV,"A",{href:!0,rel:!0});var $V=r(bm);oW=n($V,"Just-In-Time (JIT) compilation"),$V.forEach(t),MV.forEach(t),nW=p(Wi),ET=a(Wi,"LI",{});var FV=r(ET);ym=a(FV,"A",{href:!0,rel:!0});var BV=r(ym);sW=n(BV,"Automatic Differentiation"),BV.forEach(t),FV.forEach(t),aW=p(Wi),jT=a(Wi,"LI",{});var xV=r(jT);Tm=a(xV,"A",{href:!0,rel:!0});var EV=r(Tm);rW=n(EV,"Vectorization"),EV.forEach(t),xV.forEach(t),iW=p(Wi),zT=a(Wi,"LI",{});var jV=r(zT);vm=a(jV,"A",{href:!0,rel:!0});var zV=r(vm);lW=n(zV,"Parallelization"),zV.forEach(t),jV.forEach(t),Wi.forEach(t),dW=p(no),xo=a(no,"DIV",{class:!0});var qi=r(xo);k(km.$$.fragment,qi),cW=p(qi),ta=a(qi,"P",{});var ag=r(ta);pW=n(ag,"The "),JT=a(ag,"CODE",{});var JV=r(JT);hW=n(JV,"FlaxBertPreTrainedModel"),JV.forEach(t),mW=n(ag," forward method, overrides the "),CT=a(ag,"CODE",{});var CV=r(CT);uW=n(CV,"__call__"),CV.forEach(t),fW=n(ag," special method."),ag.forEach(t),gW=p(qi),k(si.$$.fragment,qi),_W=p(qi),k(ai.$$.fragment,qi),qi.forEach(t),no.forEach(t),this.h()},h(){h(d,"name","hf:doc:metadata"),h(d,"content",JSON.stringify(s8)),h(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"),IV(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"),IV(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(Vi,"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(Vi,"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/v4.30.0/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(Sm,"href","/docs/transformers/v4.30.0/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(Vm,"href","/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/model_doc/bert#transformers.BertForQuestionAnswering"),h(kl,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/question-answering"),h(kl,"rel","nofollow"),h(wl,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering.ipynb"),h(wl,"rel","nofollow"),h(su,"href","/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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(Sl,"href","https://www.philschmid.de/getting-started-habana-gaudi#conclusion"),h(Sl,"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/v4.30.0/en/model_doc/bert#transformers.BertModel"),h(uu,"href","/docs/transformers/v4.30.0/en/model_doc/bert#transformers.TFBertModel"),h(td,"href","https://huggingface.co/bert-base-uncased"),h(td,"rel","nofollow"),h(fu,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),h(gu,"href","/docs/transformers/v4.30.0/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/v4.30.0/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(vu,"href","/docs/transformers/v4.30.0/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(Sn,"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/v4.30.0/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/v4.30.0/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/v4.30.0/en/model_doc/bert#transformers.BertForPreTraining"),h(Ta,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(qo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(va,"id","transformers.BertModel"),h(va,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(va,"href","#transformers.BertModel"),h(Qn,"class","relative group"),h(Bu,"href","/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),h(Sd,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Sd,"rel","nofollow"),h(ju,"href","/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),h(Uc,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Uc,"rel","nofollow"),h(Su,"href","/docs/transformers/v4.30.0/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(Vu,"href","/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/model_doc/bert#transformers.TFBertForPreTraining"),h(_o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(nr,"id","transformers.TFBertLMHeadModel"),h(nr,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(nr,"href","#transformers.TFBertLMHeadModel"),h(vs,"class","relative group"),h(Zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ks,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ar,"id","transformers.TFBertForMaskedLM"),h(ar,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(ar,"href","#transformers.TFBertForMaskedLM"),h(ws,"class","relative group"),h(Du,"href","/docs/transformers/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/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/v4.30.0/en/model_doc/bert#transformers.TFBertForSequenceClassification"),h(Gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(yr,"id","transformers.TFBertForMultipleChoice"),h(yr,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(yr,"href","#transformers.TFBertForMultipleChoice"),h(Es,"class","relative group"),h(tf,"href","/docs/transformers/v4.30.0/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/v4.30.0/en/model_doc/bert#transformers.TFBertForMultipleChoice"),h(yo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(wr,"id","transformers.TFBertForTokenClassification"),h(wr,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(wr,"href","#transformers.TFBertForTokenClassification"),h(zs,"class","relative group"),h(nf,"href","/docs/transformers/v4.30.0/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/v4.30.0/en/model_doc/bert#transformers.TFBertForTokenClassification"),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(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/v4.30.0/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/v4.30.0/en/model_doc/bert#transformers.TFBertForQuestionAnswering"),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(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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(Gp,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(Gp,"rel","nofollow"),h(Sp,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(Sp,"rel","nofollow"),h(Vp,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(Vp,"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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(Kp,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(Kp,"rel","nofollow"),h(eh,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(eh,"rel","nofollow"),h(th,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(th,"rel","nofollow"),h(oh,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(oh,"rel","nofollow"),h(nh,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(nh,"rel","nofollow"),h(vo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(qr,"id","transformers.FlaxBertForCausalLM"),h(qr,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(qr,"href","#transformers.FlaxBertForCausalLM"),h(Zs,"class","relative group"),h(cf,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(dh,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(dh,"rel","nofollow"),h(ch,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(ch,"rel","nofollow"),h(ph,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(ph,"rel","nofollow"),h(hh,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(hh,"rel","nofollow"),h(mh,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(mh,"rel","nofollow"),h(ko,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Rr,"id","transformers.FlaxBertForMaskedLM"),h(Rr,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(Rr,"href","#transformers.FlaxBertForMaskedLM"),h(Gs,"class","relative group"),h(pf,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(Th,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(Th,"rel","nofollow"),h(vh,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(vh,"rel","nofollow"),h(kh,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(kh,"rel","nofollow"),h(wh,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(wh,"rel","nofollow"),h(Mh,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(Mh,"rel","nofollow"),h(wo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Vr,"id","transformers.FlaxBertForNextSentencePrediction"),h(Vr,"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(Vr,"href","#transformers.FlaxBertForNextSentencePrediction"),h(Vs,"class","relative group"),h(hf,"href","/docs/transformers/v4.30.0/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/v4.30.0/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(Sh,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(Sh,"rel","nofollow"),h(Vh,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(Vh,"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/v4.30.0/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/v4.30.0/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/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),h(_m,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),h(_m,"rel","nofollow"),h(bm,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),h(bm,"rel","nofollow"),h(ym,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),h(ym,"rel","nofollow"),h(Tm,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),h(Tm,"rel","nofollow"),h(vm,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),h(vm,"rel","nofollow"),h(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,S),w(de,S,null),e(ie,ze),e(ie,V),e(V,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,Ve),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,Se,_),g(i,A,_),e(A,Ye),e(A,Re),e(Re,Pe),e(A,Ke),e(A,K),e(K,et),e(A,w1),g(i,Jv,_),g(i,Nn,_),e(Nn,aa),e(aa,rg),w(Ai,rg,null),e(Nn,M1),e(Nn,ig),e(ig,$1),g(i,Cv,_),g(i,Rm,_),e(Rm,F1),g(i,Iv,_),w(Zi,i,_),g(i,Uv,_),g(i,tt,_),e(tt,Ri),e(Ri,B1),e(Ri,Gi),e(Gi,x1),e(Ri,E1),e(tt,j1),e(tt,Si),e(Si,z1),e(Si,Vi),e(Vi,J1),e(Si,C1),e(tt,I1),e(tt,Xi),e(Xi,U1),e(Xi,Li),e(Li,N1),e(Xi,P1),e(tt,W1),e(tt,Oi),e(Oi,q1),e(Oi,Di),e(Di,A1),e(Oi,Z1),e(tt,R1),e(tt,Qo),e(Qo,Gm),e(Gm,G1),e(Qo,S1),e(Qo,Qi),e(Qi,V1),e(Qo,X1),e(Qo,Hi),e(Hi,L1),e(Qo,O1),e(tt,D1),e(tt,Ho),e(Ho,Sm),e(Sm,Q1),e(Ho,H1),e(Ho,Yi),e(Yi,Y1),e(Ho,K1),e(Ho,Ki),e(Ki,eM),e(Ho,tM),e(tt,oM),e(tt,Yo),e(Yo,Vm),e(Vm,nM),e(Yo,sM),e(Yo,el),e(el,aM),e(Yo,rM),e(Yo,tl),e(tl,iM),e(Yo,lM),e(tt,dM),e(tt,lg),e(lg,Xm),e(Xm,cM),g(i,Nv,_),w(ol,i,_),g(i,Pv,_),g(i,ft,_),e(ft,nl),e(nl,pM),e(nl,sl),e(sl,hM),e(nl,mM),e(ft,uM),e(ft,Pn),e(Pn,fM),e(Pn,al),e(al,gM),e(Pn,_M),e(Pn,rl),e(rl,bM),e(Pn,yM),e(ft,TM),e(ft,Ko),e(Ko,Lm),e(Lm,vM),e(Ko,kM),e(Ko,il),e(il,wM),e(Ko,MM),e(Ko,ll),e(ll,$M),e(Ko,FM),e(ft,BM),e(ft,en),e(en,Om),e(Om,xM),e(en,EM),e(en,dl),e(dl,jM),e(en,zM),e(en,cl),e(cl,JM),e(en,CM),e(ft,IM),e(ft,ra),e(ra,Dm),e(Dm,UM),e(ra,NM),e(ra,pl),e(pl,PM),e(ra,WM),e(ft,qM),e(ft,Qm),e(Qm,hl),e(hl,AM),e(Qm,ZM),e(ft,RM),e(ft,dg),e(dg,Hm),e(Hm,GM),g(i,Wv,_),w(ml,i,_),g(i,qv,_),g(i,Wt,_),e(Wt,tn),e(tn,Ym),e(Ym,SM),e(tn,VM),e(tn,ul),e(ul,XM),e(tn,LM),e(tn,fl),e(fl,OM),e(tn,DM),e(Wt,QM),e(Wt,on),e(on,Km),e(Km,HM),e(on,YM),e(on,gl),e(gl,KM),e(on,e2),e(on,_l),e(_l,t2),e(on,o2),e(Wt,n2),e(Wt,nn),e(nn,eu),e(eu,s2),e(nn,a2),e(nn,bl),e(bl,r2),e(nn,i2),e(nn,yl),e(yl,l2),e(nn,d2),e(Wt,c2),e(Wt,tu),e(tu,Tl),e(Tl,p2),e(tu,h2),e(Wt,m2),e(Wt,cg),e(cg,ou),e(ou,u2),g(i,Av,_),w(vl,i,_),g(i,Zv,_),g(i,qt,_),e(qt,sn),e(sn,nu),e(nu,f2),e(sn,g2),e(sn,kl),e(kl,_2),e(sn,b2),e(sn,wl),e(wl,y2),e(sn,T2),e(qt,v2),e(qt,an),e(an,su),e(su,k2),e(an,w2),e(an,Ml),e(Ml,M2),e(an,$2),e(an,$l),e($l,F2),e(an,B2),e(qt,x2),e(qt,ia),e(ia,au),e(au,E2),e(ia,j2),e(ia,Fl),e(Fl,z2),e(ia,J2),e(qt,C2),e(qt,ru),e(ru,Bl),e(Bl,I2),e(ru,U2),e(qt,N2),e(qt,pg),e(pg,iu),e(iu,P2),g(i,Rv,_),g(i,lu,_),e(lu,hg),e(hg,W2),g(i,Gv,_),g(i,rn,_),e(rn,ln),e(ln,du),e(du,q2),e(ln,A2),e(ln,xl),e(xl,Z2),e(ln,R2),e(ln,El),e(El,G2),e(ln,S2),e(rn,V2),e(rn,dn),e(dn,cu),e(cu,X2),e(dn,L2),e(dn,jl),e(jl,O2),e(dn,D2),e(dn,zl),e(zl,Q2),e(dn,H2),e(rn,Y2),e(rn,mg),e(mg,pu),e(pu,K2),g(i,Sv,_),g(i,Jl,_),e(Jl,e$),e(Jl,ug),e(ug,t$),g(i,Vv,_),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,Xv,_),g(i,Pl,_),e(Pl,d$),e(Pl,fg),e(fg,c$),g(i,Lv,_),g(i,hu,_),e(hu,Wl),e(Wl,p$),e(Wl,ql),e(ql,h$),e(Wl,m$),g(i,Ov,_),g(i,Al,_),e(Al,u$),e(Al,gg),e(gg,f$),g(i,Dv,_),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,Sl),e(Sl,v$),e(Gl,k$),e(Ft,w$),e(Ft,Vl),e(Vl,M$),e(Vl,Xl),e(Xl,$$),e(Vl,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,Qv,_),g(i,Wn,_),e(Wn,da),e(da,_g),w(Kl,_g,null),e(Wn,q$),e(Wn,bg),e(bg,A$),g(i,Hv,_),g(i,so,_),w(ed,so,null),e(so,Z$),e(so,Wo),e(Wo,R$),e(Wo,mu),e(mu,G$),e(Wo,S$),e(Wo,uu),e(uu,V$),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,Yv,_),g(i,An,_),e(An,pa),e(pa,yg),w(od,yg,null),e(An,oF),e(An,Tg),e(Tg,nF),g(i,Kv,_),g(i,ot,_),w(nd,ot,null),e(ot,sF),e(ot,vg),e(vg,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,kg),e(kg,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,vF),e(ld,$g),e($g,kF),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,ek,_),g(i,Rn,_),e(Rn,ua),e(ua,Eg),w(pd,Eg,null),e(Rn,UF),e(Rn,jg),e(jg,NF),g(i,tk,_),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,vu),e(vu,GF),e(ud,SF),e(xt,VF),e(xt,pn),w(fd,pn,null),e(pn,XF),e(pn,Jg),e(Jg,LF),e(pn,OF),e(pn,gd),e(gd,ku),e(ku,DF),e(ku,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,ok,_),g(i,Sn,_),e(Sn,ga),e(ga,Wg),w(bd,Wg,null),e(Sn,cB),e(Sn,qg),e(qg,pB),g(i,nk,_),g(i,Et,_),w(yd,Et,null),e(Et,hB),e(Et,Vn),e(Vn,mB),e(Vn,Ag),e(Ag,uB),e(Vn,fB),e(Vn,Zg),e(Zg,gB),e(Vn,_B),e(Et,bB),e(Et,Td),e(Td,yB),e(Td,Rg),e(Rg,TB),e(Td,vB),e(Et,kB),e(Et,hn),w(vd,hn,null),e(hn,wB),e(hn,kd),e(kd,MB),e(kd,Gg),e(Gg,$B),e(kd,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,Sg),e(Sg,zB),e(Xn,JB),e(Xn,Vg),e(Vg,CB),e(Xn,IB),e(mn,UB),w(ba,mn,null),g(i,sk,_),g(i,Ln,_),e(Ln,ya),e(ya,Xg),w(Md,Xg,null),e(Ln,NB),e(Ln,Lg),e(Lg,PB),g(i,ak,_),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,rk,_),g(i,Dn,_),w(Bd,Dn,null),e(Dn,RB),e(Dn,xd),e(xd,GB),e(xd,$u),e($u,SB),e(xd,VB),g(i,ik,_),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,lk,_),g(i,Qn,_),e(Qn,va),e(va,Dg),w(Jd,Dg,null),e(Qn,KB),e(Qn,Qg),e(Qg,ex),g(i,dk,_),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_,vx),e(gt,kx),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(ka,io,null),e(io,Px),w(wa,io,null),g(i,ck,_),g(i,Yn,_),e(Yn,Ma),e(Ma,a_),w(Ad,a_,null),e(Yn,Wx),e(Yn,r_),e(r_,qx),g(i,pk,_),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_,Sx),e(Kn,Vx),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,Sd),e(Sd,Yx),e(Gd,Kx),e(jt,eE),e(jt,lo),w(Vd,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,hk,_),g(i,ts,_),e(ts,Ba),e(Ba,c_),w(Xd,c_,null),e(ts,dE),e(ts,p_),e(p_,cE),g(i,mk,_),g(i,zt,_),w(Ld,zt,null),e(zt,pE),e(zt,Od),e(Od,hE),e(Od,h_),e(h_,mE),e(Od,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,vE),e(Qd,kE),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,uk,_),g(i,ns,_),e(ns,ja),e(ja,u_),w(Kd,u_,null),e(ns,JE),e(ns,f_),e(f_,CE),g(i,fk,_),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,SE),e(nc,VE),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,gk,_),g(i,as,_),e(as,Ca),e(Ca,b_),w(rc,b_,null),e(as,tj),e(as,y_),e(y_,oj),g(i,_k,_),g(i,Ct,_),w(ic,Ct,null),e(Ct,nj),e(Ct,lc),e(lc,sj),e(lc,T_),e(T_,aj),e(lc,rj),e(Ct,ij),e(Ct,dc),e(dc,lj),e(dc,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,v_),e(v_,Tj),e(rs,vj),e(ho,kj),w(Ia,ho,null),e(ho,wj),w(Ua,ho,null),g(i,bk,_),g(i,is,_),e(is,Na),e(Na,k_),w(mc,k_,null),e(is,Mj),e(is,w_),e(w_,$j),g(i,yk,_),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,Sj),w(Wa,At,null),e(At,Vj),w(qa,At,null),g(i,Tk,_),g(i,ds,_),e(ds,Aa),e(Aa,F_),w(yc,F_,null),e(ds,Xj),e(ds,B_),e(B_,Lj),g(i,vk,_),g(i,Ut,_),w(Tc,Ut,null),e(Ut,Oj),e(Ut,x_),e(x_,Dj),e(Ut,Qj),e(Ut,vc),e(vc,Hj),e(vc,qu),e(qu,Yj),e(vc,Kj),e(Ut,e4),e(Ut,kc),e(kc,t4),e(kc,wc),e(wc,o4),e(kc,n4),e(Ut,s4),e(Ut,mo),w(Mc,mo,null),e(mo,a4),e(mo,cs),e(cs,r4),e(cs,Au),e(Au,i4),e(cs,l4),e(cs,E_),e(E_,d4),e(cs,c4),e(mo,p4),w(Za,mo,null),e(mo,h4),w(Ra,mo,null),g(i,kk,_),g(i,ps,_),e(ps,Ga),e(Ga,j_),w($c,j_,null),e(ps,m4),e(ps,z_),e(z_,u4),g(i,wk,_),g(i,Nt,_),w(Fc,Nt,null),e(Nt,f4),e(Nt,J_),e(J_,g4),e(Nt,_4),e(Nt,Bc),e(Bc,b4),e(Bc,Zu),e(Zu,y4),e(Bc,T4),e(Nt,v4),e(Nt,xc),e(xc,k4),e(xc,Ec),e(Ec,w4),e(xc,M4),e(Nt,$4),e(Nt,uo),w(jc,uo,null),e(uo,F4),e(uo,hs),e(hs,B4),e(hs,Ru),e(Ru,x4),e(hs,E4),e(hs,C_),e(C_,j4),e(hs,z4),e(uo,J4),w(Sa,uo,null),e(uo,C4),w(Va,uo,null),g(i,Mk,_),g(i,ms,_),e(ms,Xa),e(Xa,I_),w(zc,I_,null),e(ms,I4),e(ms,U_),e(U_,U4),g(i,$k,_),g(i,Pt,_),w(Jc,Pt,null),e(Pt,N4),e(Pt,us),e(us,P4),e(us,N_),e(N_,W4),e(us,q4),e(us,P_),e(P_,A4),e(us,Z4),e(Pt,R4),e(Pt,Cc),e(Cc,G4),e(Cc,Gu),e(Gu,S4),e(Cc,V4),e(Pt,X4),e(Pt,Ic),e(Ic,L4),e(Ic,Uc),e(Uc,O4),e(Ic,D4),e(Pt,Q4),e(Pt,fo),w(Nc,fo,null),e(fo,H4),e(fo,fs),e(fs,Y4),e(fs,Su),e(Su,K4),e(fs,e3),e(fs,W_),e(W_,t3),e(fs,o3),e(fo,n3),w(La,fo,null),e(fo,s3),w(Oa,fo,null),g(i,Fk,_),g(i,gs,_),e(gs,Da),e(Da,q_),w(Pc,q_,null),e(gs,a3),e(gs,A_),e(A_,r3),g(i,Bk,_),g(i,_t,_),w(Wc,_t,null),e(_t,i3),e(_t,Z_),e(Z_,l3),e(_t,d3),e(_t,qc),e(qc,c3),e(qc,Vu),e(Vu,p3),e(qc,h3),e(_t,m3),e(_t,Ac),e(Ac,u3),e(Ac,Zc),e(Zc,f3),e(Ac,g3),e(_t,_3),w(Qa,_t,null),e(_t,b3),e(_t,go),w(Rc,go,null),e(go,y3),e(go,_s),e(_s,T3),e(_s,Xu),e(Xu,v3),e(_s,k3),e(_s,R_),e(R_,w3),e(_s,M3),e(go,$3),w(Ha,go,null),e(go,F3),w(Ya,go,null),g(i,xk,_),g(i,bs,_),e(bs,Ka),e(Ka,G_),w(Gc,G_,null),e(bs,B3),e(bs,S_),e(S_,x3),g(i,Ek,_),g(i,bt,_),w(Sc,bt,null),e(bt,E3),e(bt,ys),e(ys,j3),e(ys,V_),e(V_,z3),e(ys,J3),e(ys,X_),e(X_,C3),e(ys,I3),e(bt,U3),e(bt,Vc),e(Vc,N3),e(Vc,Lu),e(Lu,P3),e(Vc,W3),e(bt,q3),e(bt,Xc),e(Xc,A3),e(Xc,Lc),e(Lc,Z3),e(Xc,R3),e(bt,G3),w(er,bt,null),e(bt,S3),e(bt,_o),w(Oc,_o,null),e(_o,V3),e(_o,Ts),e(Ts,X3),e(Ts,Ou),e(Ou,L3),e(Ts,O3),e(Ts,L_),e(L_,D3),e(Ts,Q3),e(_o,H3),w(tr,_o,null),e(_o,Y3),w(or,_o,null),g(i,jk,_),g(i,vs,_),e(vs,nr),e(nr,O_),w(Dc,O_,null),e(vs,K3),e(vs,D_),e(D_,ez),g(i,zk,_),g(i,ks,_),w(Qc,ks,null),e(ks,tz),e(ks,Zt),w(Hc,Zt,null),e(Zt,oz),e(Zt,st),e(st,nz),e(st,Q_),e(Q_,sz),e(st,az),e(st,H_),e(H_,rz),e(st,iz),e(st,Y_),e(Y_,lz),e(st,dz),e(st,K_),e(K_,cz),e(st,pz),e(st,eb),e(eb,hz),e(st,mz),e(st,tb),e(tb,uz),e(st,fz),e(st,ob),e(ob,gz),e(st,_z),e(Zt,bz),e(Zt,Yc),e(Yc,Kc),e(Kc,yz),e(Kc,nb),e(nb,Tz),e(Kc,vz),e(Yc,kz),e(Yc,ep),e(ep,wz),e(ep,sb),e(sb,Mz),e(ep,$z),e(Zt,Fz),e(Zt,ne),e(ne,Bz),e(ne,ab),e(ab,xz),e(ne,Ez),e(ne,rb),e(rb,jz),e(ne,zz),e(ne,ib),e(ib,Jz),e(ne,Cz),e(ne,lb),e(lb,Iz),e(ne,Uz),e(ne,db),e(db,Nz),e(ne,Pz),e(ne,cb),e(cb,Wz),e(ne,qz),e(ne,pb),e(pb,Az),e(ne,Zz),e(ne,hb),e(hb,Rz),e(ne,Gz),e(ne,mb),e(mb,Sz),e(ne,Vz),e(ne,ub),e(ub,Xz),e(ne,Lz),e(ne,fb),e(fb,Oz),e(ne,Dz),e(ne,gb),e(gb,Qz),e(ne,Hz),e(ne,_b),e(_b,Yz),e(ne,Kz),e(ne,bb),e(bb,eJ),e(ne,tJ),e(ne,yb),e(yb,oJ),e(ne,nJ),e(ne,Tb),e(Tb,sJ),e(ne,aJ),e(ne,vb),e(vb,rJ),e(ne,iJ),e(ne,kb),e(kb,lJ),e(ne,dJ),e(ne,wb),e(wb,cJ),e(ne,pJ),e(ne,Mb),e(Mb,hJ),e(ne,mJ),e(Zt,uJ),w(sr,Zt,null),g(i,Jk,_),g(i,ws,_),e(ws,ar),e(ar,$b),w(tp,$b,null),e(ws,fJ),e(ws,Fb),e(Fb,gJ),g(i,Ck,_),g(i,yt,_),w(op,yt,null),e(yt,_J),e(yt,np),e(np,bJ),e(np,Bb),e(Bb,yJ),e(np,TJ),e(yt,vJ),e(yt,sp),e(sp,kJ),e(sp,Du),e(Du,wJ),e(sp,MJ),e(yt,$J),e(yt,ap),e(ap,FJ),e(ap,rp),e(rp,BJ),e(ap,xJ),e(yt,EJ),w(rr,yt,null),e(yt,jJ),e(yt,Rt),w(ip,Rt,null),e(Rt,zJ),e(Rt,Ms),e(Ms,JJ),e(Ms,Qu),e(Qu,CJ),e(Ms,IJ),e(Ms,xb),e(xb,UJ),e(Ms,NJ),e(Rt,PJ),w(ir,Rt,null),e(Rt,WJ),w(lr,Rt,null),e(Rt,qJ),w(dr,Rt,null),g(i,Ik,_),g(i,$s,_),e($s,cr),e(cr,Eb),w(lp,Eb,null),e($s,AJ),e($s,jb),e(jb,ZJ),g(i,Uk,_),g(i,Tt,_),w(dp,Tt,null),e(Tt,RJ),e(Tt,cp),e(cp,GJ),e(cp,zb),e(zb,SJ),e(cp,VJ),e(Tt,XJ),e(Tt,pp),e(pp,LJ),e(pp,Hu),e(Hu,OJ),e(pp,DJ),e(Tt,QJ),e(Tt,hp),e(hp,HJ),e(hp,mp),e(mp,YJ),e(hp,KJ),e(Tt,eC),w(pr,Tt,null),e(Tt,tC),e(Tt,bo),w(up,bo,null),e(bo,oC),e(bo,Fs),e(Fs,nC),e(Fs,Yu),e(Yu,sC),e(Fs,aC),e(Fs,Jb),e(Jb,rC),e(Fs,iC),e(bo,lC),w(hr,bo,null),e(bo,dC),w(mr,bo,null),g(i,Nk,_),g(i,Bs,_),e(Bs,ur),e(ur,Cb),w(fp,Cb,null),e(Bs,cC),e(Bs,Ib),e(Ib,pC),g(i,Pk,_),g(i,vt,_),w(gp,vt,null),e(vt,hC),e(vt,Ub),e(Ub,mC),e(vt,uC),e(vt,_p),e(_p,fC),e(_p,Ku),e(Ku,gC),e(_p,_C),e(vt,bC),e(vt,bp),e(bp,yC),e(bp,yp),e(yp,TC),e(bp,vC),e(vt,kC),w(fr,vt,null),e(vt,wC),e(vt,Gt),w(Tp,Gt,null),e(Gt,MC),e(Gt,xs),e(xs,$C),e(xs,ef),e(ef,FC),e(xs,BC),e(xs,Nb),e(Nb,xC),e(xs,EC),e(Gt,jC),w(gr,Gt,null),e(Gt,zC),w(_r,Gt,null),e(Gt,JC),w(br,Gt,null),g(i,Wk,_),g(i,Es,_),e(Es,yr),e(yr,Pb),w(vp,Pb,null),e(Es,CC),e(Es,Wb),e(Wb,IC),g(i,qk,_),g(i,kt,_),w(kp,kt,null),e(kt,UC),e(kt,qb),e(qb,NC),e(kt,PC),e(kt,wp),e(wp,WC),e(wp,tf),e(tf,qC),e(wp,AC),e(kt,ZC),e(kt,Mp),e(Mp,RC),e(Mp,$p),e($p,GC),e(Mp,SC),e(kt,VC),w(Tr,kt,null),e(kt,XC),e(kt,yo),w(Fp,yo,null),e(yo,LC),e(yo,js),e(js,OC),e(js,of),e(of,DC),e(js,QC),e(js,Ab),e(Ab,HC),e(js,YC),e(yo,KC),w(vr,yo,null),e(yo,e5),w(kr,yo,null),g(i,Ak,_),g(i,zs,_),e(zs,wr),e(wr,Zb),w(Bp,Zb,null),e(zs,t5),e(zs,Rb),e(Rb,o5),g(i,Zk,_),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,St),w(Jp,St,null),e(St,f5),e(St,Js),e(Js,g5),e(Js,sf),e(sf,_5),e(Js,b5),e(Js,Sb),e(Sb,y5),e(Js,T5),e(St,v5),w($r,St,null),e(St,k5),w(Fr,St,null),e(St,w5),w(Br,St,null),g(i,Rk,_),g(i,Cs,_),e(Cs,xr),e(xr,Vb),w(Cp,Vb,null),e(Cs,M5),e(Cs,Xb),e(Xb,$5),g(i,Gk,_),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,Vt),w(Wp,Vt,null),e(Vt,R5),e(Vt,Us),e(Us,G5),e(Us,rf),e(rf,S5),e(Us,V5),e(Us,Db),e(Db,X5),e(Us,L5),e(Vt,O5),w(jr,Vt,null),e(Vt,D5),w(zr,Vt,null),e(Vt,Q5),w(Jr,Vt,null),g(i,Sk,_),g(i,Ns,_),e(Ns,Cr),e(Cr,Qb),w(qp,Qb,null),e(Ns,H5),e(Ns,Hb),e(Hb,Y5),g(i,Vk,_),g(i,at,_),w(Ap,at,null),e(at,K5),e(at,Yb),e(Yb,eI),e(at,tI),e(at,Zp),e(Zp,oI),e(Zp,lf),e(lf,nI),e(Zp,sI),e(at,aI),e(at,Rp),e(Rp,rI),e(Rp,Gp),e(Gp,iI),e(Rp,lI),e(at,dI),e(at,Kb),e(Kb,cI),e(at,pI),e(at,Ao),e(Ao,ey),e(ey,Sp),e(Sp,hI),e(Ao,mI),e(Ao,ty),e(ty,Vp),e(Vp,uI),e(Ao,fI),e(Ao,oy),e(oy,Xp),e(Xp,gI),e(Ao,_I),e(Ao,ny),e(ny,Lp),e(Lp,bI),e(at,yI),e(at,To),w(Op,To,null),e(To,TI),e(To,Ps),e(Ps,vI),e(Ps,sy),e(sy,kI),e(Ps,wI),e(Ps,ay),e(ay,MI),e(Ps,$I),e(To,FI),w(Ir,To,null),e(To,BI),w(Ur,To,null),g(i,Xk,_),g(i,Ws,_),e(Ws,Nr),e(Nr,ry),w(Dp,ry,null),e(Ws,xI),e(Ws,iy),e(iy,EI),g(i,Lk,_),g(i,rt,_),w(Qp,rt,null),e(rt,jI),e(rt,qs),e(qs,zI),e(qs,ly),e(ly,JI),e(qs,CI),e(qs,dy),e(dy,II),e(qs,UI),e(rt,NI),e(rt,Hp),e(Hp,PI),e(Hp,df),e(df,WI),e(Hp,qI),e(rt,AI),e(rt,Yp),e(Yp,ZI),e(Yp,Kp),e(Kp,RI),e(Yp,GI),e(rt,SI),e(rt,cy),e(cy,VI),e(rt,XI),e(rt,Zo),e(Zo,py),e(py,eh),e(eh,LI),e(Zo,OI),e(Zo,hy),e(hy,th),e(th,DI),e(Zo,QI),e(Zo,my),e(my,oh),e(oh,HI),e(Zo,YI),e(Zo,uy),e(uy,nh),e(nh,KI),e(rt,eU),e(rt,vo),w(sh,vo,null),e(vo,tU),e(vo,As),e(As,oU),e(As,fy),e(fy,nU),e(As,sU),e(As,gy),e(gy,aU),e(As,rU),e(vo,iU),w(Pr,vo,null),e(vo,lU),w(Wr,vo,null),g(i,Ok,_),g(i,Zs,_),e(Zs,qr),e(qr,_y),w(ah,_y,null),e(Zs,dU),e(Zs,by),e(by,cU),g(i,Dk,_),g(i,it,_),w(rh,it,null),e(it,pU),e(it,yy),e(yy,hU),e(it,mU),e(it,ih),e(ih,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,vU),e(it,Ty),e(Ty,kU),e(it,wU),e(it,Ro),e(Ro,vy),e(vy,ch),e(ch,MU),e(Ro,$U),e(Ro,ky),e(ky,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,ko),w(uh,ko,null),e(ko,JU),e(ko,Rs),e(Rs,CU),e(Rs,$y),e($y,IU),e(Rs,UU),e(Rs,Fy),e(Fy,NU),e(Rs,PU),e(ko,WU),w(Ar,ko,null),e(ko,qU),w(Zr,ko,null),g(i,Qk,_),g(i,Gs,_),e(Gs,Rr),e(Rr,By),w(fh,By,null),e(Gs,AU),e(Gs,xy),e(xy,ZU),g(i,Hk,_),g(i,lt,_),w(gh,lt,null),e(lt,RU),e(lt,_h),e(_h,GU),e(_h,Ey),e(Ey,SU),e(_h,VU),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,vh),e(vh,nN),e(Go,sN),e(Go,Jy),e(Jy,kh),e(kh,aN),e(Go,rN),e(Go,Cy),e(Cy,wh),e(wh,iN),e(Go,lN),e(Go,Iy),e(Iy,Mh),e(Mh,dN),e(lt,cN),e(lt,wo),w($h,wo,null),e(wo,pN),e(wo,Ss),e(Ss,hN),e(Ss,Uy),e(Uy,mN),e(Ss,uN),e(Ss,Ny),e(Ny,fN),e(Ss,gN),e(wo,_N),w(Gr,wo,null),e(wo,bN),w(Sr,wo,null),g(i,Yk,_),g(i,Vs,_),e(Vs,Vr),e(Vr,Py),w(Fh,Py,null),e(Vs,yN),e(Vs,Wy),e(Wy,TN),g(i,Kk,_),g(i,dt,_),w(Bh,dt,null),e(dt,vN),e(dt,xh),e(xh,kN),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,So),e(So,Zy),e(Zy,Jh),e(Jh,NN),e(So,PN),e(So,Ry),e(Ry,Ch),e(Ch,WN),e(So,qN),e(So,Gy),e(Gy,Ih),e(Ih,AN),e(So,ZN),e(So,Sy),e(Sy,Uh),e(Uh,RN),e(dt,GN),e(dt,Mo),w(Nh,Mo,null),e(Mo,SN),e(Mo,Xs),e(Xs,VN),e(Xs,Vy),e(Vy,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,Vo),e(Vo,Hy),e(Hy,Rh),e(Rh,m9),e(Vo,u9),e(Vo,Yy),e(Yy,Gh),e(Gh,f9),e(Vo,g9),e(Vo,Ky),e(Ky,Sh),e(Sh,_9),e(Vo,b9),e(Vo,eT),e(eT,Vh),e(Vh,y9),e(ct,T9),e(ct,$o),w(Xh,$o,null),e($o,v9),e($o,Os),e(Os,k9),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,S9),e(Xo,V9),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,vP),e(Lo,kP),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,vT),e(vT,zP),e(Ys,JP),e(Ys,kT),e(kT,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,SP),e(mt,VP),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,vm),e(vm,lW),e(mt,dW),e(mt,xo),w(km,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}),ka.$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 ST={};_&2&&(ST.$$scope={dirty:_,ctx:i}),Ua.$set(ST);const VT={};_&2&&(VT.$$scope={dirty:_,ctx:i}),Pa.$set(VT);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}),Sa.$set(DT);const QT={};_&2&&(QT.$$scope={dirty:_,ctx:i}),Va.$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 ev={};_&2&&(ev.$$scope={dirty:_,ctx:i}),er.$set(ev);const tv={};_&2&&(tv.$$scope={dirty:_,ctx:i}),tr.$set(tv);const ov={};_&2&&(ov.$$scope={dirty:_,ctx:i}),or.$set(ov);const nv={};_&2&&(nv.$$scope={dirty:_,ctx:i}),sr.$set(nv);const sv={};_&2&&(sv.$$scope={dirty:_,ctx:i}),rr.$set(sv);const na={};_&2&&(na.$$scope={dirty:_,ctx:i}),ir.$set(na);const av={};_&2&&(av.$$scope={dirty:_,ctx:i}),lr.$set(av);const rv={};_&2&&(rv.$$scope={dirty:_,ctx:i}),dr.$set(rv);const xm={};_&2&&(xm.$$scope={dirty:_,ctx:i}),pr.$set(xm);const iv={};_&2&&(iv.$$scope={dirty:_,ctx:i}),hr.$set(iv);const lv={};_&2&&(lv.$$scope={dirty:_,ctx:i}),mr.$set(lv);const dv={};_&2&&(dv.$$scope={dirty:_,ctx:i}),fr.$set(dv);const cv={};_&2&&(cv.$$scope={dirty:_,ctx:i}),gr.$set(cv);const ut={};_&2&&(ut.$$scope={dirty:_,ctx:i}),_r.$set(ut);const Em={};_&2&&(Em.$$scope={dirty:_,ctx:i}),br.$set(Em);const pv={};_&2&&(pv.$$scope={dirty:_,ctx:i}),Tr.$set(pv);const jm={};_&2&&(jm.$$scope={dirty:_,ctx:i}),vr.$set(jm);const hv={};_&2&&(hv.$$scope={dirty:_,ctx:i}),kr.$set(hv);const zm={};_&2&&(zm.$$scope={dirty:_,ctx:i}),Mr.$set(zm);const mv={};_&2&&(mv.$$scope={dirty:_,ctx:i}),$r.$set(mv);const Jm={};_&2&&(Jm.$$scope={dirty:_,ctx:i}),Fr.$set(Jm);const uv={};_&2&&(uv.$$scope={dirty:_,ctx:i}),Br.$set(uv);const un={};_&2&&(un.$$scope={dirty:_,ctx:i}),Er.$set(un);const fv={};_&2&&(fv.$$scope={dirty:_,ctx:i}),jr.$set(fv);const gv={};_&2&&(gv.$$scope={dirty:_,ctx:i}),zr.$set(gv);const _v={};_&2&&(_v.$$scope={dirty:_,ctx:i}),Jr.$set(_v);const fn={};_&2&&(fn.$$scope={dirty:_,ctx:i}),Ir.$set(fn);const bv={};_&2&&(bv.$$scope={dirty:_,ctx:i}),Ur.$set(bv);const yv={};_&2&&(yv.$$scope={dirty:_,ctx:i}),Pr.$set(yv);const Tv={};_&2&&(Tv.$$scope={dirty:_,ctx:i}),Wr.$set(Tv);const gn={};_&2&&(gn.$$scope={dirty:_,ctx:i}),Ar.$set(gn);const vv={};_&2&&(vv.$$scope={dirty:_,ctx:i}),Zr.$set(vv);const kv={};_&2&&(kv.$$scope={dirty:_,ctx:i}),Gr.$set(kv);const wv={};_&2&&(wv.$$scope={dirty:_,ctx:i}),Sr.$set(wv);const Mv={};_&2&&(Mv.$$scope={dirty:_,ctx:i}),Xr.$set(Mv);const $v={};_&2&&($v.$$scope={dirty:_,ctx:i}),Lr.$set($v);const $t={};_&2&&($t.$$scope={dirty:_,ctx:i}),Dr.$set($t);const Cm={};_&2&&(Cm.$$scope={dirty:_,ctx:i}),Qr.$set(Cm);const Fv={};_&2&&(Fv.$$scope={dirty:_,ctx:i}),Yr.$set(Fv);const sa={};_&2&&(sa.$$scope={dirty:_,ctx:i}),Kr.$set(sa);const Bv={};_&2&&(Bv.$$scope={dirty:_,ctx:i}),ti.$set(Bv);const xv={};_&2&&(xv.$$scope={dirty:_,ctx:i}),oi.$set(xv);const _n={};_&2&&(_n.$$scope={dirty:_,ctx:i}),si.$set(_n);const Ev={};_&2&&(Ev.$$scope={dirty:_,ctx:i}),ai.$set(Ev)},i(i){lw||(M(l.$$.fragment,i),M(de.$$.fragment,i),M(Ai.$$.fragment,i),M(Zi.$$.fragment,i),M(ol.$$.fragment,i),M(ml.$$.fragment,i),M(vl.$$.fragment,i),M(Kl.$$.fragment,i),M(ed.$$.fragment,i),M(ca.$$.fragment,i),M(od.$$.fragment,i),M(nd.$$.fragment,i),M(ad.$$.fragment,i),M(id.$$.fragment,i),M(dd.$$.fragment,i),M(ma.$$.fragment,i),M(cd.$$.fragment,i),M(pd.$$.fragment,i),M(hd.$$.fragment,i),M(fd.$$.fragment,i),M(_d.$$.fragment,i),M(fa.$$.fragment,i),M(bd.$$.fragment,i),M(yd.$$.fragment,i),M(vd.$$.fragment,i),M(_a.$$.fragment,i),M(wd.$$.fragment,i),M(ba.$$.fragment,i),M(Md.$$.fragment,i),M($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(ka.$$.fragment,i),M(wa.$$.fragment,i),M(Ad.$$.fragment,i),M(Zd.$$.fragment,i),M(Vd.$$.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(Sa.$$.fragment,i),M(Va.$$.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(Sc.$$.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(vp.$$.fragment,i),M(kp.$$.fragment,i),M(Tr.$$.fragment,i),M(Fp.$$.fragment,i),M(vr.$$.fragment,i),M(kr.$$.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(Sr.$$.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(km.$$.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),$(vl.$$.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),$(vd.$$.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),$(ka.$$.fragment,i),$(wa.$$.fragment,i),$(Ad.$$.fragment,i),$(Zd.$$.fragment,i),$(Vd.$$.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),$(Sa.$$.fragment,i),$(Va.$$.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),$(Sc.$$.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),$(vp.$$.fragment,i),$(kp.$$.fragment,i),$(Tr.$$.fragment,i),$(Fp.$$.fragment,i),$(vr.$$.fragment,i),$(kr.$$.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),$(Sr.$$.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),$(km.$$.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(Se),i&&t(A),i&&t(Jv),i&&t(Nn),F(Ai),i&&t(Cv),i&&t(Rm),i&&t(Iv),F(Zi,i),i&&t(Uv),i&&t(tt),i&&t(Nv),F(ol,i),i&&t(Pv),i&&t(ft),i&&t(Wv),F(ml,i),i&&t(qv),i&&t(Wt),i&&t(Av),F(vl,i),i&&t(Zv),i&&t(qt),i&&t(Rv),i&&t(lu),i&&t(Gv),i&&t(rn),i&&t(Sv),i&&t(Jl),i&&t(Vv),i&&t(la),i&&t(Xv),i&&t(Pl),i&&t(Lv),i&&t(hu),i&&t(Ov),i&&t(Al),i&&t(Dv),i&&t(Ft),i&&t(Qv),i&&t(Wn),F(Kl),i&&t(Hv),i&&t(so),F(ed),F(ca),i&&t(Yv),i&&t(An),F(od),i&&t(Kv),i&&t(ot),F(nd),F(ad),F(id),F(dd),F(ma),F(cd),i&&t(ek),i&&t(Rn),F(pd),i&&t(tk),i&&t(xt),F(hd),F(fd),F(_d),F(fa),i&&t(ok),i&&t(Sn),F(bd),i&&t(nk),i&&t(Et),F(yd),F(vd),F(_a),F(wd),F(ba),i&&t(sk),i&&t(Ln),F(Md),i&&t(ak),i&&t(On),F($d),i&&t(rk),i&&t(Dn),F(Bd),i&&t(ik),i&&t(qo),F(Ed),F(zd),i&&t(lk),i&&t(Qn),F(Jd),i&&t(dk),i&&t(nt),F(Cd),F(qd),F(ka),F(wa),i&&t(ck),i&&t(Yn),F(Ad),i&&t(pk),i&&t(jt),F(Zd),F(Vd),F($a),F(Fa),i&&t(hk),i&&t(ts),F(Xd),i&&t(mk),i&&t(zt),F(Ld),F(Yd),F(xa),F(Ea),i&&t(uk),i&&t(ns),F(Kd),i&&t(fk),i&&t(Jt),F(ec),F(ac),F(za),F(Ja),i&&t(gk),i&&t(as),F(rc),i&&t(_k),i&&t(Ct),F(ic),F(hc),F(Ia),F(Ua),i&&t(bk),i&&t(is),F(mc),i&&t(yk),i&&t(It),F(uc),F(bc),F(Pa),F(Wa),F(qa),i&&t(Tk),i&&t(ds),F(yc),i&&t(vk),i&&t(Ut),F(Tc),F(Mc),F(Za),F(Ra),i&&t(kk),i&&t(ps),F($c),i&&t(wk),i&&t(Nt),F(Fc),F(jc),F(Sa),F(Va),i&&t(Mk),i&&t(ms),F(zc),i&&t($k),i&&t(Pt),F(Jc),F(Nc),F(La),F(Oa),i&&t(Fk),i&&t(gs),F(Pc),i&&t(Bk),i&&t(_t),F(Wc),F(Qa),F(Rc),F(Ha),F(Ya),i&&t(xk),i&&t(bs),F(Gc),i&&t(Ek),i&&t(bt),F(Sc),F(er),F(Oc),F(tr),F(or),i&&t(jk),i&&t(vs),F(Dc),i&&t(zk),i&&t(ks),F(Qc),F(Hc),F(sr),i&&t(Jk),i&&t(ws),F(tp),i&&t(Ck),i&&t(yt),F(op),F(rr),F(ip),F(ir),F(lr),F(dr),i&&t(Ik),i&&t($s),F(lp),i&&t(Uk),i&&t(Tt),F(dp),F(pr),F(up),F(hr),F(mr),i&&t(Nk),i&&t(Bs),F(fp),i&&t(Pk),i&&t(vt),F(gp),F(fr),F(Tp),F(gr),F(_r),F(br),i&&t(Wk),i&&t(Es),F(vp),i&&t(qk),i&&t(kt),F(kp),F(Tr),F(Fp),F(vr),F(kr),i&&t(Ak),i&&t(zs),F(Bp),i&&t(Zk),i&&t(wt),F(xp),F(Mr),F(Jp),F($r),F(Fr),F(Br),i&&t(Rk),i&&t(Cs),F(Cp),i&&t(Gk),i&&t(Mt),F(Ip),F(Er),F(Wp),F(jr),F(zr),F(Jr),i&&t(Sk),i&&t(Ns),F(qp),i&&t(Vk),i&&t(at),F(Ap),F(Op),F(Ir),F(Ur),i&&t(Xk),i&&t(Ws),F(Dp),i&&t(Lk),i&&t(rt),F(Qp),F(sh),F(Pr),F(Wr),i&&t(Ok),i&&t(Zs),F(ah),i&&t(Dk),i&&t(it),F(rh),F(uh),F(Ar),F(Zr),i&&t(Qk),i&&t(Gs),F(fh),i&&t(Hk),i&&t(lt),F(gh),F($h),F(Gr),F(Sr),i&&t(Yk),i&&t(Vs),F(Fh),i&&t(Kk),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(km),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 qV(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class m8 extends UV{constructor(d){super();NV(this,d,a8,n8,PV,{})}}export{m8 as default,s8 as metadata};
