import{S as r3,i as l3,s as i3,e as n,k as c,w as v,t as a,M as d3,c as s,d as t,m as p,a as l,x as k,h as r,b as u,N as a3,G as e,g,y as w,q as M,o as $,B as F,v as c3,L as We}from"../../chunks/vendor-hf-doc-builder.js";import{T as Re}from"../../chunks/Tip-hf-doc-builder.js";import{D as q}from"../../chunks/Docstring-hf-doc-builder.js";import{C as qe}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ve}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ne}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function p3(E){let d,y,m,f,b;return f=new qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEFsYmVydENvbmZpZyUyQyUyMEFsYmVydE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYW4lMjBBTEJFUlQteHhsYXJnZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWFsYmVydF94eGxhcmdlX2NvbmZpZ3VyYXRpb24lMjAlM0QlMjBBbGJlcnRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGFuJTIwQUxCRVJULWJhc2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFhbGJlcnRfYmFzZV9jb25maWd1cmF0aW9uJTIwJTNEJTIwQWxiZXJ0Q29uZmlnKCUwQSUyMCUyMCUyMCUyMGhpZGRlbl9zaXplJTNENzY4JTJDJTBBJTIwJTIwJTIwJTIwbnVtX2F0dGVudGlvbl9oZWFkcyUzRDEyJTJDJTBBJTIwJTIwJTIwJTIwaW50ZXJtZWRpYXRlX3NpemUlM0QzMDcyJTJDJTBBKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwQUxCRVJULWJhc2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMEFsYmVydE1vZGVsKGFsYmVydF94eGxhcmdlX2NvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AlbertConfig, AlbertModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing an ALBERT-xxlarge style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>albert_xxlarge_configuration = AlbertConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing an ALBERT-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>albert_base_configuration = AlbertConfig(
<span class="hljs-meta">... </span>    hidden_size=<span class="hljs-number">768</span>,
<span class="hljs-meta">... </span>    num_attention_heads=<span class="hljs-number">12</span>,
<span class="hljs-meta">... </span>    intermediate_size=<span class="hljs-number">3072</span>,
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the ALBERT-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlbertModel(albert_xxlarge_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=n("p"),y=a("Examples:"),m=c(),v(f.$$.fragment)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Examples:"),h.forEach(t),m=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,y),g(i,m,h),w(f,i,h),b=!0},p:We,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function h3(E){let d,y,m,f,b;return f=new qe({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=n("p"),y=a("sequence pair mask has the following format:"),m=c(),v(f.$$.fragment)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"sequence pair mask has the following format:"),h.forEach(t),m=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,y),g(i,m,h),w(f,i,h),b=!0},p:We,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function m3(E){let d,y,m,f,b;return f=new qe({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=n("p"),y=a("sequence pair mask has the following format:"),m=c(),v(f.$$.fragment)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"sequence pair mask has the following format:"),h.forEach(t),m=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,y),g(i,m,h),w(f,i,h),b=!0},p:We,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function u3(E){let d,y,m,f,b;return{c(){d=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=a("Module"),b=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(h,"CODE",{});var j=l(m);f=r(j,"Module"),j.forEach(t),b=r(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(i,h){g(i,d,h),e(d,y),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function f3(E){let d,y,m,f,b;return f=new qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBbGJlcnRNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYWxiZXJ0LWJhc2UtdjIlMjIpJTBBbW9kZWwlMjAlM0QlMjBBbGJlcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyYWxiZXJ0LWJhc2UtdjIlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AlbertModel
<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;albert-base-v2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlbertModel.from_pretrained(<span class="hljs-string">&quot;albert-base-v2&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=n("p"),y=a("Example:"),m=c(),v(f.$$.fragment)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Example:"),h.forEach(t),m=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,y),g(i,m,h),w(f,i,h),b=!0},p:We,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function g3(E){let d,y,m,f,b;return{c(){d=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=a("Module"),b=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(h,"CODE",{});var j=l(m);f=r(j,"Module"),j.forEach(t),b=r(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(i,h){g(i,d,h),e(d,y),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function _3(E){let d,y,m,f,b;return f=new qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBbGJlcnRGb3JQcmVUcmFpbmluZyUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYWxiZXJ0LWJhc2UtdjIlMjIpJTBBbW9kZWwlMjAlM0QlMjBBbGJlcnRGb3JQcmVUcmFpbmluZy5mcm9tX3ByZXRyYWluZWQoJTIyYWxiZXJ0LWJhc2UtdjIlMjIpJTBBJTBBaW5wdXRfaWRzJTIwJTNEJTIwdG9yY2gudGVuc29yKHRva2VuaXplci5lbmNvZGUoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzRFRydWUpKS51bnNxdWVlemUoMCklMEElMjMlMjBCYXRjaCUyMHNpemUlMjAxJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0X2lkcyklMEElMEFwcmVkaWN0aW9uX2xvZ2l0cyUyMCUzRCUyMG91dHB1dHMucHJlZGljdGlvbl9sb2dpdHMlMEFzb3BfbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5zb3BfbG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AlbertForPreTraining
<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;albert-base-v2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlbertForPreTraining.from_pretrained(<span class="hljs-string">&quot;albert-base-v2&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = torch.tensor(tokenizer.encode(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, add_special_tokens=<span class="hljs-literal">True</span>)).unsqueeze(<span class="hljs-number">0</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 = outputs.prediction_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>sop_logits = outputs.sop_logits`}}),{c(){d=n("p"),y=a("Example:"),m=c(),v(f.$$.fragment)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Example:"),h.forEach(t),m=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,y),g(i,m,h),w(f,i,h),b=!0},p:We,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function b3(E){let d,y,m,f,b;return{c(){d=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=a("Module"),b=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(h,"CODE",{});var j=l(m);f=r(j,"Module"),j.forEach(t),b=r(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(i,h){g(i,d,h),e(d,y),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function y3(E){let d,y,m,f,b;return f=new qe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEFsYmVydEZvck1hc2tlZExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYWxiZXJ0LWJhc2UtdjIlMjIpJTBBbW9kZWwlMjAlM0QlMjBBbGJlcnRGb3JNYXNrZWRMTS5mcm9tX3ByZXRyYWluZWQoJTIyYWxiZXJ0LWJhc2UtdjIlMjIpJTBBJTBBJTIzJTIwYWRkJTIwbWFza190b2tlbiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJUaGUlMjBjYXBpdGFsJTIwb2YlMjAlNUJNQVNLJTVEJTIwaXMlMjBQYXJpcy4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwcmV0cmlldmUlMjBpbmRleCUyMG9mJTIwJTVCTUFTSyU1RCUwQW1hc2tfdG9rZW5faW5kZXglMjAlM0QlMjAoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkKSU1QjAlNUQubm9uemVybyhhc190dXBsZSUzRFRydWUpJTVCMCU1RCUwQXByZWRpY3RlZF90b2tlbl9pZCUyMCUzRCUyMGxvZ2l0cyU1QjAlMkMlMjBtYXNrX3Rva2VuX2luZGV4JTVELmFyZ21heChheGlzJTNELTEpJTBBdG9rZW5pemVyLmRlY29kZShwcmVkaWN0ZWRfdG9rZW5faWQp",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, AlbertForMaskedLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;albert-base-v2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlbertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;albert-base-v2&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># add mask_token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of [MASK] is Paris.&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;france&#x27;</span>`}}),{c(){d=n("p"),y=a("Example:"),m=c(),v(f.$$.fragment)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Example:"),h.forEach(t),m=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,y),g(i,m,h),w(f,i,h),b=!0},p:We,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function T3(E){let d,y;return d=new qe({props:{code:"bGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwUGFyaXMuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEFsYWJlbHMlMjAlM0QlMjB0b3JjaC53aGVyZShpbnB1dHMuaW5wdXRfaWRzJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQlMkMlMjBsYWJlbHMlMkMlMjAtMTAwKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscyklMEFyb3VuZChvdXRwdXRzLmxvc3MuaXRlbSgpJTJDJTIwMik=",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;pt&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</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.81</span>`}}),{c(){v(d.$$.fragment)},l(m){k(d.$$.fragment,m)},m(m,f){w(d,m,f),y=!0},p:We,i(m){y||(M(d.$$.fragment,m),y=!0)},o(m){$(d.$$.fragment,m),y=!1},d(m){F(d,m)}}}function v3(E){let d,y,m,f,b;return{c(){d=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=a("Module"),b=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(h,"CODE",{});var j=l(m);f=r(j,"Module"),j.forEach(t),b=r(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(i,h){g(i,d,h),e(d,y),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function k3(E){let d,y,m,f,b;return f=new qe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEFsYmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ0ZXh0YXR0YWNrJTJGYWxiZXJ0LWJhc2UtdjItaW1kYiUyMiklMEFtb2RlbCUyMCUzRCUyMEFsYmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMnRleHRhdHRhY2slMkZhbGJlcnQtYmFzZS12Mi1pbWRiJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZCUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoKS5pdGVtKCklMEFtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfY2xhc3NfaWQlNUQlMEElMEElMjMlMjBUbyUyMHRyYWluJTIwYSUyMG1vZGVsJTIwb24lMjAlNjBudW1fbGFiZWxzJTYwJTIwY2xhc3NlcyUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyU2MCUyMHRvJTIwJTYwLmZyb21fcHJldHJhaW5lZCguLi4pJTYwJTBBbnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBBbGJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJ0ZXh0YXR0YWNrJTJGYWxiZXJ0LWJhc2UtdjItaW1kYiUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcyUwQXJvdW5kKGxvc3MuaXRlbSgpJTJDJTIwMik=",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, AlbertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;textattack/albert-base-v2-imdb&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlbertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;textattack/albert-base-v2-imdb&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 = AlbertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;textattack/albert-base-v2-imdb&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.12</span>`}}),{c(){d=n("p"),y=a("Example of single-label classification:"),m=c(),v(f.$$.fragment)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Example of single-label classification:"),h.forEach(t),m=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,y),g(i,m,h),w(f,i,h),b=!0},p:We,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function w3(E){let d,y,m,f,b;return f=new qe({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEFsYmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ0ZXh0YXR0YWNrJTJGYWxiZXJ0LWJhc2UtdjItaW1kYiUyMiklMEFtb2RlbCUyMCUzRCUyMEFsYmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMnRleHRhdHRhY2slMkZhbGJlcnQtYmFzZS12Mi1pbWRiJTIyJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkcyUyMCUzRCUyMHRvcmNoLmFyYW5nZSgwJTJDJTIwbG9naXRzLnNoYXBlJTVCLTElNUQpJTVCdG9yY2guc2lnbW9pZChsb2dpdHMpLnNxdWVlemUoZGltJTNEMCklMjAlM0UlMjAwLjUlNUQlMEElMEElMjMlMjBUbyUyMHRyYWluJTIwYSUyMG1vZGVsJTIwb24lMjAlNjBudW1fbGFiZWxzJTYwJTIwY2xhc3NlcyUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyU2MCUyMHRvJTIwJTYwLmZyb21fcHJldHJhaW5lZCguLi4pJTYwJTBBbnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBBbGJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJ0ZXh0YXR0YWNrJTJGYWxiZXJ0LWJhc2UtdjItaW1kYiUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, AlbertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;textattack/albert-base-v2-imdb&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlbertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;textattack/albert-base-v2-imdb&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 = AlbertForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;textattack/albert-base-v2-imdb&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=n("p"),y=a("Example of multi-label classification:"),m=c(),v(f.$$.fragment)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Example of multi-label classification:"),h.forEach(t),m=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,y),g(i,m,h),w(f,i,h),b=!0},p:We,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function M3(E){let d,y,m,f,b;return{c(){d=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=a("Module"),b=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(h,"CODE",{});var j=l(m);f=r(j,"Module"),j.forEach(t),b=r(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(i,h){g(i,d,h),e(d,y),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function $3(E){let d,y,m,f,b;return f=new qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBbGJlcnRGb3JNdWx0aXBsZUNob2ljZSUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYWxiZXJ0LWJhc2UtdjIlMjIpJTBBbW9kZWwlMjAlM0QlMjBBbGJlcnRGb3JNdWx0aXBsZUNob2ljZS5mcm9tX3ByZXRyYWluZWQoJTIyYWxiZXJ0LWJhc2UtdjIlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIySW4lMjBJdGFseSUyQyUyMHBpenphJTIwc2VydmVkJTIwaW4lMjBmb3JtYWwlMjBzZXR0aW5ncyUyQyUyMHN1Y2glMjBhcyUyMGF0JTIwYSUyMHJlc3RhdXJhbnQlMkMlMjBpcyUyMHByZXNlbnRlZCUyMHVuc2xpY2VkLiUyMiUwQWNob2ljZTAlMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aXRoJTIwYSUyMGZvcmslMjBhbmQlMjBhJTIwa25pZmUuJTIyJTBBY2hvaWNlMSUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdoaWxlJTIwaGVsZCUyMGluJTIwdGhlJTIwaGFuZC4lMjIlMEFsYWJlbHMlMjAlM0QlMjB0b3JjaC50ZW5zb3IoMCkudW5zcXVlZXplKDApJTIwJTIwJTIzJTIwY2hvaWNlMCUyMGlzJTIwY29ycmVjdCUyMChhY2NvcmRpbmclMjB0byUyMFdpa2lwZWRpYSUyMCUzQikpJTJDJTIwYmF0Y2glMjBzaXplJTIwMSUwQSUwQWVuY29kaW5nJTIwJTNEJTIwdG9rZW5pemVyKCU1QnByb21wdCUyQyUyMHByb21wdCU1RCUyQyUyMCU1QmNob2ljZTAlMkMlMjBjaG9pY2UxJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUyMHBhZGRpbmclM0RUcnVlKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKiU3QmslM0ElMjB2LnVuc3F1ZWV6ZSgwKSUyMGZvciUyMGslMkMlMjB2JTIwaW4lMjBlbmNvZGluZy5pdGVtcygpJTdEJTJDJTIwbGFiZWxzJTNEbGFiZWxzKSUyMCUyMCUyMyUyMGJhdGNoJTIwc2l6ZSUyMGlzJTIwMSUwQSUwQSUyMyUyMHRoZSUyMGxpbmVhciUyMGNsYXNzaWZpZXIlMjBzdGlsbCUyMG5lZWRzJTIwdG8lMjBiZSUyMHRyYWluZWQlMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3NzJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AlbertForMultipleChoice
<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;albert-base-v2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlbertForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;albert-base-v2&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=n("p"),y=a("Example:"),m=c(),v(f.$$.fragment)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Example:"),h.forEach(t),m=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,y),g(i,m,h),w(f,i,h),b=!0},p:We,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function F3(E){let d,y,m,f,b;return{c(){d=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=a("Module"),b=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(h,"CODE",{});var j=l(m);f=r(j,"Module"),j.forEach(t),b=r(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(i,h){g(i,d,h),e(d,y),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function A3(E){let d,y,m,f,b;return f=new qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBBbGJlcnRGb3JUb2tlbkNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJhbGJlcnQtYmFzZS12MiUyMiklMEFtb2RlbCUyMCUzRCUyMEFsYmVydEZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmFsYmVydC1iYXNlLXYyJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjAlMjJIdWdnaW5nRmFjZSUyMGlzJTIwYSUyMGNvbXBhbnklMjBiYXNlZCUyMGluJTIwUGFyaXMlMjBhbmQlMjBOZXclMjBZb3JrJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTBBKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoLTEpJTBBJTBBJTIzJTIwTm90ZSUyMHRoYXQlMjB0b2tlbnMlMjBhcmUlMjBjbGFzc2lmaWVkJTIwcmF0aGVyJTIwdGhlbiUyMGlucHV0JTIwd29yZHMlMjB3aGljaCUyMG1lYW5zJTIwdGhhdCUwQSUyMyUyMHRoZXJlJTIwbWlnaHQlMjBiZSUyMG1vcmUlMjBwcmVkaWN0ZWQlMjB0b2tlbiUyMGNsYXNzZXMlMjB0aGFuJTIwd29yZHMuJTBBJTIzJTIwTXVsdGlwbGUlMjB0b2tlbiUyMGNsYXNzZXMlMjBtaWdodCUyMGFjY291bnQlMjBmb3IlMjB0aGUlMjBzYW1lJTIwd29yZCUwQXByZWRpY3RlZF90b2tlbnNfY2xhc3NlcyUyMCUzRCUyMCU1Qm1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnQuaXRlbSgpJTVEJTIwZm9yJTIwdCUyMGluJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyU1QjAlNUQlNUQlMEElMEFsYWJlbHMlMjAlM0QlMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTBBbG9zcyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3Nz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, AlbertForTokenClassification
<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;albert-base-v2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = AlbertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;albert-base-v2&quot;</span>)

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;albert-base-v2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAlbertForPreTraining.from_pretrained(<span class="hljs-string">&quot;albert-base-v2&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;albert-base-v2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAlbertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;albert-base-v2&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># add mask_token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">f&quot;The capital of [MASK] is Paris.&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-number">1</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = tf.math.argmax(logits[<span class="hljs-number">0</span>, mask_token_index], 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;france&#x27;</span>`}}),{c(){d=n("p"),y=a("Example:"),m=c(),v(f.$$.fragment)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Example:"),h.forEach(t),m=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,y),g(i,m,h),w(f,i,h),b=!0},p:We,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function B3(E){let d,y;return d=new qe({props:{code:"bGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwUGFyaXMuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEFsYWJlbHMlMjAlM0QlMjB0Zi53aGVyZShpbnB1dHMuaW5wdXRfaWRzJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQlMkMlMjBsYWJlbHMlMkMlMjAtMTAwKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscyklMEFyb3VuZChmbG9hdChvdXRwdXRzLmxvc3MpJTJDJTIwMik=",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>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.81</span>`}}),{c(){v(d.$$.fragment)},l(m){k(d.$$.fragment,m)},m(m,f){w(d,m,f),y=!0},p:We,i(m){y||(M(d.$$.fragment,m),y=!0)},o(m){$(d.$$.fragment,m),y=!1},d(m){F(d,m)}}}function P3(E){let d,y,m,f,b,i,h,j,Me,ye,Z,de,K,A,$e,V,ce,Ue,O,se,ae,X,le,Fe,S,Ae,Te,G,Ee,ie,ee,z,U,re,L,je,xe,D,Je,ve,C,ze,Q,pe,me,Y,ke,he,B,we,W,ue,te,I,fe,N,Ce,ge;return{c(){d=n("p"),y=a("TensorFlow models and layers in "),m=n("code"),f=a("transformers"),b=a(" accept two formats as input:"),i=c(),h=n("ul"),j=n("li"),Me=a("having all inputs as keyword arguments (like PyTorch models), or"),ye=c(),Z=n("li"),de=a("having all inputs as a list, tuple or dict in the first positional argument."),K=c(),A=n("p"),$e=a(`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 `),V=n("code"),ce=a("model.fit()"),Ue=a(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=n("code"),se=a("model.fit()"),ae=a(` supports! If, however, you want to use the second
format outside of Keras methods like `),X=n("code"),le=a("fit()"),Fe=a(" and "),S=n("code"),Ae=a("predict()"),Te=a(`, such as when creating your own layers or models with
the Keras `),G=n("code"),Ee=a("Functional"),ie=a(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ee=c(),z=n("ul"),U=n("li"),re=a("a single Tensor with "),L=n("code"),je=a("input_ids"),xe=a(" only and nothing else: "),D=n("code"),Je=a("model(input_ids)"),ve=c(),C=n("li"),ze=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=n("code"),pe=a("model([input_ids, attention_mask])"),me=a(" or "),Y=n("code"),ke=a("model([input_ids, attention_mask, token_type_ids])"),he=c(),B=n("li"),we=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),W=n("code"),ue=a('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),te=c(),I=n("p"),fe=a(`Note that when creating models and layers with
`),N=n("a"),Ce=a("subclassing"),ge=a(` 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=s(T,"P",{});var x=l(d);y=r(x,"TensorFlow models and layers in "),m=s(x,"CODE",{});var Xe=l(m);f=r(Xe,"transformers"),Xe.forEach(t),b=r(x," accept two formats as input:"),x.forEach(t),i=p(T),h=s(T,"UL",{});var oe=l(h);j=s(oe,"LI",{});var Le=l(j);Me=r(Le,"having all inputs as keyword arguments (like PyTorch models), or"),Le.forEach(t),ye=p(oe),Z=s(oe,"LI",{});var _e=l(Z);de=r(_e,"having all inputs as a list, tuple or dict in the first positional argument."),_e.forEach(t),oe.forEach(t),K=p(T),A=s(T,"P",{});var J=l(A);$e=r(J,`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 `),V=s(J,"CODE",{});var Pe=l(V);ce=r(Pe,"model.fit()"),Pe.forEach(t),Ue=r(J,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=s(J,"CODE",{});var De=l(O);se=r(De,"model.fit()"),De.forEach(t),ae=r(J,` supports! If, however, you want to use the second
format outside of Keras methods like `),X=s(J,"CODE",{});var Oe=l(X);le=r(Oe,"fit()"),Oe.forEach(t),Fe=r(J," and "),S=s(J,"CODE",{});var Ze=l(S);Ae=r(Ze,"predict()"),Ze.forEach(t),Te=r(J,`, such as when creating your own layers or models with
the Keras `),G=s(J,"CODE",{});var Qe=l(G);Ee=r(Qe,"Functional"),Qe.forEach(t),ie=r(J,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),J.forEach(t),ee=p(T),z=s(T,"UL",{});var P=l(z);U=s(P,"LI",{});var R=l(U);re=r(R,"a single Tensor with "),L=s(R,"CODE",{});var He=l(L);je=r(He,"input_ids"),He.forEach(t),xe=r(R," only and nothing else: "),D=s(R,"CODE",{});var Ye=l(D);Je=r(Ye,"model(input_ids)"),Ye.forEach(t),R.forEach(t),ve=p(P),C=s(P,"LI",{});var H=l(C);ze=r(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=s(H,"CODE",{});var Ie=l(Q);pe=r(Ie,"model([input_ids, attention_mask])"),Ie.forEach(t),me=r(H," or "),Y=s(H,"CODE",{});var Be=l(Y);ke=r(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),H.forEach(t),he=p(P),B=s(P,"LI",{});var be=l(B);we=r(be,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),W=s(be,"CODE",{});var Ge=l(W);ue=r(Ge,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ge.forEach(t),be.forEach(t),P.forEach(t),te=p(T),I=s(T,"P",{});var ne=l(I);fe=r(ne,`Note that when creating models and layers with
`),N=s(ne,"A",{href:!0,rel:!0});var Se=l(N);Ce=r(Se,"subclassing"),Se.forEach(t),ge=r(ne,` 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!`),ne.forEach(t),this.h()},h(){u(N,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(N,"rel","nofollow")},m(T,x){g(T,d,x),e(d,y),e(d,m),e(m,f),e(d,b),g(T,i,x),g(T,h,x),e(h,j),e(j,Me),e(h,ye),e(h,Z),e(Z,de),g(T,K,x),g(T,A,x),e(A,$e),e(A,V),e(V,ce),e(A,Ue),e(A,O),e(O,se),e(A,ae),e(A,X),e(X,le),e(A,Fe),e(A,S),e(S,Ae),e(A,Te),e(A,G),e(G,Ee),e(A,ie),g(T,ee,x),g(T,z,x),e(z,U),e(U,re),e(U,L),e(L,je),e(U,xe),e(U,D),e(D,Je),e(z,ve),e(z,C),e(C,ze),e(C,Q),e(Q,pe),e(C,me),e(C,Y),e(Y,ke),e(z,he),e(z,B),e(B,we),e(B,W),e(W,ue),g(T,te,x),g(T,I,x),e(I,fe),e(I,N),e(N,Ce),e(I,ge)},d(T){T&&t(d),T&&t(i),T&&t(h),T&&t(K),T&&t(A),T&&t(ee),T&&t(z),T&&t(te),T&&t(I)}}}function Z3(E){let d,y,m,f,b;return{c(){d=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=a("Module"),b=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(h,"CODE",{});var j=l(m);f=r(j,"Module"),j.forEach(t),b=r(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(i,h){g(i,d,h),e(d,y),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function G3(E){let d,y,m,f,b;return f=new qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkFsYmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnZ1bWljaGllbiUyRmFsYmVydC1iYXNlLXYyLWltZGIlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkFsYmVydEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMnZ1bWljaGllbiUyRmFsYmVydC1iYXNlLXYyLWltZGIlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWQlMjAlM0QlMjBpbnQodGYubWF0aC5hcmdtYXgobG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQpJTBBbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCcHJlZGljdGVkX2NsYXNzX2lkJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFAlbertForSequenceClassification
<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;vumichien/albert-base-v2-imdb&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAlbertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;vumichien/albert-base-v2-imdb&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=n("p"),y=a("Example:"),m=c(),v(f.$$.fragment)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Example:"),h.forEach(t),m=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,y),g(i,m,h),w(f,i,h),b=!0},p:We,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function R3(E){let d,y;return d=new qe({props:{code:"JTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwVEZBbGJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJ2dW1pY2hpZW4lMkZhbGJlcnQtYmFzZS12Mi1pbWRiJTIyJTJDJTIwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdGYuY29uc3RhbnQoMSklMEFsb3NzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpLmxvc3MlMEFyb3VuZChmbG9hdChsb3NzKSUyQyUyMDIp",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 = TFAlbertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;vumichien/albert-base-v2-imdb&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.12</span>`}}),{c(){v(d.$$.fragment)},l(m){k(d.$$.fragment,m)},m(m,f){w(d,m,f),y=!0},p:We,i(m){y||(M(d.$$.fragment,m),y=!0)},o(m){$(d.$$.fragment,m),y=!1},d(m){F(d,m)}}}function V3(E){let d,y,m,f,b,i,h,j,Me,ye,Z,de,K,A,$e,V,ce,Ue,O,se,ae,X,le,Fe,S,Ae,Te,G,Ee,ie,ee,z,U,re,L,je,xe,D,Je,ve,C,ze,Q,pe,me,Y,ke,he,B,we,W,ue,te,I,fe,N,Ce,ge;return{c(){d=n("p"),y=a("TensorFlow models and layers in "),m=n("code"),f=a("transformers"),b=a(" accept two formats as input:"),i=c(),h=n("ul"),j=n("li"),Me=a("having all inputs as keyword arguments (like PyTorch models), or"),ye=c(),Z=n("li"),de=a("having all inputs as a list, tuple or dict in the first positional argument."),K=c(),A=n("p"),$e=a(`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 `),V=n("code"),ce=a("model.fit()"),Ue=a(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=n("code"),se=a("model.fit()"),ae=a(` supports! If, however, you want to use the second
format outside of Keras methods like `),X=n("code"),le=a("fit()"),Fe=a(" and "),S=n("code"),Ae=a("predict()"),Te=a(`, such as when creating your own layers or models with
the Keras `),G=n("code"),Ee=a("Functional"),ie=a(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ee=c(),z=n("ul"),U=n("li"),re=a("a single Tensor with "),L=n("code"),je=a("input_ids"),xe=a(" only and nothing else: "),D=n("code"),Je=a("model(input_ids)"),ve=c(),C=n("li"),ze=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=n("code"),pe=a("model([input_ids, attention_mask])"),me=a(" or "),Y=n("code"),ke=a("model([input_ids, attention_mask, token_type_ids])"),he=c(),B=n("li"),we=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),W=n("code"),ue=a('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),te=c(),I=n("p"),fe=a(`Note that when creating models and layers with
`),N=n("a"),Ce=a("subclassing"),ge=a(` 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=s(T,"P",{});var x=l(d);y=r(x,"TensorFlow models and layers in "),m=s(x,"CODE",{});var Xe=l(m);f=r(Xe,"transformers"),Xe.forEach(t),b=r(x," accept two formats as input:"),x.forEach(t),i=p(T),h=s(T,"UL",{});var oe=l(h);j=s(oe,"LI",{});var Le=l(j);Me=r(Le,"having all inputs as keyword arguments (like PyTorch models), or"),Le.forEach(t),ye=p(oe),Z=s(oe,"LI",{});var _e=l(Z);de=r(_e,"having all inputs as a list, tuple or dict in the first positional argument."),_e.forEach(t),oe.forEach(t),K=p(T),A=s(T,"P",{});var J=l(A);$e=r(J,`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 `),V=s(J,"CODE",{});var Pe=l(V);ce=r(Pe,"model.fit()"),Pe.forEach(t),Ue=r(J,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=s(J,"CODE",{});var De=l(O);se=r(De,"model.fit()"),De.forEach(t),ae=r(J,` supports! If, however, you want to use the second
format outside of Keras methods like `),X=s(J,"CODE",{});var Oe=l(X);le=r(Oe,"fit()"),Oe.forEach(t),Fe=r(J," and "),S=s(J,"CODE",{});var Ze=l(S);Ae=r(Ze,"predict()"),Ze.forEach(t),Te=r(J,`, such as when creating your own layers or models with
the Keras `),G=s(J,"CODE",{});var Qe=l(G);Ee=r(Qe,"Functional"),Qe.forEach(t),ie=r(J,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),J.forEach(t),ee=p(T),z=s(T,"UL",{});var P=l(z);U=s(P,"LI",{});var R=l(U);re=r(R,"a single Tensor with "),L=s(R,"CODE",{});var He=l(L);je=r(He,"input_ids"),He.forEach(t),xe=r(R," only and nothing else: "),D=s(R,"CODE",{});var Ye=l(D);Je=r(Ye,"model(input_ids)"),Ye.forEach(t),R.forEach(t),ve=p(P),C=s(P,"LI",{});var H=l(C);ze=r(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=s(H,"CODE",{});var Ie=l(Q);pe=r(Ie,"model([input_ids, attention_mask])"),Ie.forEach(t),me=r(H," or "),Y=s(H,"CODE",{});var Be=l(Y);ke=r(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),H.forEach(t),he=p(P),B=s(P,"LI",{});var be=l(B);we=r(be,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),W=s(be,"CODE",{});var Ge=l(W);ue=r(Ge,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ge.forEach(t),be.forEach(t),P.forEach(t),te=p(T),I=s(T,"P",{});var ne=l(I);fe=r(ne,`Note that when creating models and layers with
`),N=s(ne,"A",{href:!0,rel:!0});var Se=l(N);Ce=r(Se,"subclassing"),Se.forEach(t),ge=r(ne,` 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!`),ne.forEach(t),this.h()},h(){u(N,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(N,"rel","nofollow")},m(T,x){g(T,d,x),e(d,y),e(d,m),e(m,f),e(d,b),g(T,i,x),g(T,h,x),e(h,j),e(j,Me),e(h,ye),e(h,Z),e(Z,de),g(T,K,x),g(T,A,x),e(A,$e),e(A,V),e(V,ce),e(A,Ue),e(A,O),e(O,se),e(A,ae),e(A,X),e(X,le),e(A,Fe),e(A,S),e(S,Ae),e(A,Te),e(A,G),e(G,Ee),e(A,ie),g(T,ee,x),g(T,z,x),e(z,U),e(U,re),e(U,L),e(L,je),e(U,xe),e(U,D),e(D,Je),e(z,ve),e(z,C),e(C,ze),e(C,Q),e(Q,pe),e(C,me),e(C,Y),e(Y,ke),e(z,he),e(z,B),e(B,we),e(B,W),e(W,ue),g(T,te,x),g(T,I,x),e(I,fe),e(I,N),e(N,Ce),e(I,ge)},d(T){T&&t(d),T&&t(i),T&&t(h),T&&t(K),T&&t(A),T&&t(ee),T&&t(z),T&&t(te),T&&t(I)}}}function X3(E){let d,y,m,f,b;return{c(){d=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=a("Module"),b=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(h,"CODE",{});var j=l(m);f=r(j,"Module"),j.forEach(t),b=r(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(i,h){g(i,d,h),e(d,y),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function S3(E){let d,y,m,f,b;return f=new qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkFsYmVydEZvck11bHRpcGxlQ2hvaWNlJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJhbGJlcnQtYmFzZS12MiUyMiklMEFtb2RlbCUyMCUzRCUyMFRGQWxiZXJ0Rm9yTXVsdGlwbGVDaG9pY2UuZnJvbV9wcmV0cmFpbmVkKCUyMmFsYmVydC1iYXNlLXYyJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkluJTIwSXRhbHklMkMlMjBwaXp6YSUyMHNlcnZlZCUyMGluJTIwZm9ybWFsJTIwc2V0dGluZ3MlMkMlMjBzdWNoJTIwYXMlMjBhdCUyMGElMjByZXN0YXVyYW50JTJDJTIwaXMlMjBwcmVzZW50ZWQlMjB1bnNsaWNlZC4lMjIlMEFjaG9pY2UwJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2l0aCUyMGElMjBmb3JrJTIwYW5kJTIwYSUyMGtuaWZlLiUyMiUwQWNob2ljZTElMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aGlsZSUyMGhlbGQlMjBpbiUyMHRoZSUyMGhhbmQuJTIyJTBBJTBBZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIoJTVCcHJvbXB0JTJDJTIwcHJvbXB0JTVEJTJDJTIwJTVCY2hvaWNlMCUyQyUyMGNob2ljZTElNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyJTJDJTIwcGFkZGluZyUzRFRydWUpJTBBaW5wdXRzJTIwJTNEJTIwJTdCayUzQSUyMHRmLmV4cGFuZF9kaW1zKHYlMkMlMjAwKSUyMGZvciUyMGslMkMlMjB2JTIwaW4lMjBlbmNvZGluZy5pdGVtcygpJTdEJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0cyklMjAlMjAlMjMlMjBiYXRjaCUyMHNpemUlMjBpcyUyMDElMEElMEElMjMlMjB0aGUlMjBsaW5lYXIlMjBjbGFzc2lmaWVyJTIwc3RpbGwlMjBuZWVkcyUyMHRvJTIwYmUlMjB0cmFpbmVkJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFAlbertForMultipleChoice
<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;albert-base-v2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAlbertForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;albert-base-v2&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=n("p"),y=a("Example:"),m=c(),v(f.$$.fragment)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Example:"),h.forEach(t),m=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,y),g(i,m,h),w(f,i,h),b=!0},p:We,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function L3(E){let d,y,m,f,b,i,h,j,Me,ye,Z,de,K,A,$e,V,ce,Ue,O,se,ae,X,le,Fe,S,Ae,Te,G,Ee,ie,ee,z,U,re,L,je,xe,D,Je,ve,C,ze,Q,pe,me,Y,ke,he,B,we,W,ue,te,I,fe,N,Ce,ge;return{c(){d=n("p"),y=a("TensorFlow models and layers in "),m=n("code"),f=a("transformers"),b=a(" accept two formats as input:"),i=c(),h=n("ul"),j=n("li"),Me=a("having all inputs as keyword arguments (like PyTorch models), or"),ye=c(),Z=n("li"),de=a("having all inputs as a list, tuple or dict in the first positional argument."),K=c(),A=n("p"),$e=a(`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 `),V=n("code"),ce=a("model.fit()"),Ue=a(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=n("code"),se=a("model.fit()"),ae=a(` supports! If, however, you want to use the second
format outside of Keras methods like `),X=n("code"),le=a("fit()"),Fe=a(" and "),S=n("code"),Ae=a("predict()"),Te=a(`, such as when creating your own layers or models with
the Keras `),G=n("code"),Ee=a("Functional"),ie=a(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ee=c(),z=n("ul"),U=n("li"),re=a("a single Tensor with "),L=n("code"),je=a("input_ids"),xe=a(" only and nothing else: "),D=n("code"),Je=a("model(input_ids)"),ve=c(),C=n("li"),ze=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=n("code"),pe=a("model([input_ids, attention_mask])"),me=a(" or "),Y=n("code"),ke=a("model([input_ids, attention_mask, token_type_ids])"),he=c(),B=n("li"),we=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),W=n("code"),ue=a('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),te=c(),I=n("p"),fe=a(`Note that when creating models and layers with
`),N=n("a"),Ce=a("subclassing"),ge=a(` 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=s(T,"P",{});var x=l(d);y=r(x,"TensorFlow models and layers in "),m=s(x,"CODE",{});var Xe=l(m);f=r(Xe,"transformers"),Xe.forEach(t),b=r(x," accept two formats as input:"),x.forEach(t),i=p(T),h=s(T,"UL",{});var oe=l(h);j=s(oe,"LI",{});var Le=l(j);Me=r(Le,"having all inputs as keyword arguments (like PyTorch models), or"),Le.forEach(t),ye=p(oe),Z=s(oe,"LI",{});var _e=l(Z);de=r(_e,"having all inputs as a list, tuple or dict in the first positional argument."),_e.forEach(t),oe.forEach(t),K=p(T),A=s(T,"P",{});var J=l(A);$e=r(J,`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 `),V=s(J,"CODE",{});var Pe=l(V);ce=r(Pe,"model.fit()"),Pe.forEach(t),Ue=r(J,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=s(J,"CODE",{});var De=l(O);se=r(De,"model.fit()"),De.forEach(t),ae=r(J,` supports! If, however, you want to use the second
format outside of Keras methods like `),X=s(J,"CODE",{});var Oe=l(X);le=r(Oe,"fit()"),Oe.forEach(t),Fe=r(J," and "),S=s(J,"CODE",{});var Ze=l(S);Ae=r(Ze,"predict()"),Ze.forEach(t),Te=r(J,`, such as when creating your own layers or models with
the Keras `),G=s(J,"CODE",{});var Qe=l(G);Ee=r(Qe,"Functional"),Qe.forEach(t),ie=r(J,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),J.forEach(t),ee=p(T),z=s(T,"UL",{});var P=l(z);U=s(P,"LI",{});var R=l(U);re=r(R,"a single Tensor with "),L=s(R,"CODE",{});var He=l(L);je=r(He,"input_ids"),He.forEach(t),xe=r(R," only and nothing else: "),D=s(R,"CODE",{});var Ye=l(D);Je=r(Ye,"model(input_ids)"),Ye.forEach(t),R.forEach(t),ve=p(P),C=s(P,"LI",{});var H=l(C);ze=r(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=s(H,"CODE",{});var Ie=l(Q);pe=r(Ie,"model([input_ids, attention_mask])"),Ie.forEach(t),me=r(H," or "),Y=s(H,"CODE",{});var Be=l(Y);ke=r(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),H.forEach(t),he=p(P),B=s(P,"LI",{});var be=l(B);we=r(be,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),W=s(be,"CODE",{});var Ge=l(W);ue=r(Ge,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ge.forEach(t),be.forEach(t),P.forEach(t),te=p(T),I=s(T,"P",{});var ne=l(I);fe=r(ne,`Note that when creating models and layers with
`),N=s(ne,"A",{href:!0,rel:!0});var Se=l(N);Ce=r(Se,"subclassing"),Se.forEach(t),ge=r(ne,` 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!`),ne.forEach(t),this.h()},h(){u(N,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(N,"rel","nofollow")},m(T,x){g(T,d,x),e(d,y),e(d,m),e(m,f),e(d,b),g(T,i,x),g(T,h,x),e(h,j),e(j,Me),e(h,ye),e(h,Z),e(Z,de),g(T,K,x),g(T,A,x),e(A,$e),e(A,V),e(V,ce),e(A,Ue),e(A,O),e(O,se),e(A,ae),e(A,X),e(X,le),e(A,Fe),e(A,S),e(S,Ae),e(A,Te),e(A,G),e(G,Ee),e(A,ie),g(T,ee,x),g(T,z,x),e(z,U),e(U,re),e(U,L),e(L,je),e(U,xe),e(U,D),e(D,Je),e(z,ve),e(z,C),e(C,ze),e(C,Q),e(Q,pe),e(C,me),e(C,Y),e(Y,ke),e(z,he),e(z,B),e(B,we),e(B,W),e(W,ue),g(T,te,x),g(T,I,x),e(I,fe),e(I,N),e(N,Ce),e(I,ge)},d(T){T&&t(d),T&&t(i),T&&t(h),T&&t(K),T&&t(A),T&&t(ee),T&&t(z),T&&t(te),T&&t(I)}}}function D3(E){let d,y,m,f,b;return{c(){d=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=a("Module"),b=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(h,"CODE",{});var j=l(m);f=r(j,"Module"),j.forEach(t),b=r(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(i,h){g(i,d,h),e(d,y),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function O3(E){let d,y,m,f,b;return f=new qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkFsYmVydEZvclRva2VuQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmFsYmVydC1iYXNlLXYyJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZBbGJlcnRGb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJhbGJlcnQtYmFzZS12MiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTIySHVnZ2luZ0ZhY2UlMjBpcyUyMGElMjBjb21wYW55JTIwYmFzZWQlMjBpbiUyMFBhcmlzJTIwYW5kJTIwTmV3JTIwWW9yayUyMiUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzREZhbHNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiUwQSklMEElMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUyMCUzRCUyMHRmLm1hdGguYXJnbWF4KGxvZ2l0cyUyQyUyMGF4aXMlM0QtMSklMEElMEElMjMlMjBOb3RlJTIwdGhhdCUyMHRva2VucyUyMGFyZSUyMGNsYXNzaWZpZWQlMjByYXRoZXIlMjB0aGVuJTIwaW5wdXQlMjB3b3JkcyUyMHdoaWNoJTIwbWVhbnMlMjB0aGF0JTBBJTIzJTIwdGhlcmUlMjBtaWdodCUyMGJlJTIwbW9yZSUyMHByZWRpY3RlZCUyMHRva2VuJTIwY2xhc3NlcyUyMHRoYW4lMjB3b3Jkcy4lMEElMjMlMjBNdWx0aXBsZSUyMHRva2VuJTIwY2xhc3NlcyUyMG1pZ2h0JTIwYWNjb3VudCUyMGZvciUyMHRoZSUyMHNhbWUlMjB3b3JkJTBBcHJlZGljdGVkX3Rva2Vuc19jbGFzc2VzJTIwJTNEJTIwJTVCbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCdCU1RCUyMGZvciUyMHQlMjBpbiUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlNUIwJTVELm51bXB5KCkudG9saXN0KCklNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFAlbertForTokenClassification
<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;albert-base-v2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAlbertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;albert-base-v2&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>].numpy().tolist()]`}}),{c(){d=n("p"),y=a("Example:"),m=c(),v(f.$$.fragment)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Example:"),h.forEach(t),m=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,y),g(i,m,h),w(f,i,h),b=!0},p:We,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function Q3(E){let d,y;return d=new qe({props:{code:"bGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3NzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(model(**inputs, labels=labels).loss)`}}),{c(){v(d.$$.fragment)},l(m){k(d.$$.fragment,m)},m(m,f){w(d,m,f),y=!0},p:We,i(m){y||(M(d.$$.fragment,m),y=!0)},o(m){$(d.$$.fragment,m),y=!1},d(m){F(d,m)}}}function H3(E){let d,y,m,f,b,i,h,j,Me,ye,Z,de,K,A,$e,V,ce,Ue,O,se,ae,X,le,Fe,S,Ae,Te,G,Ee,ie,ee,z,U,re,L,je,xe,D,Je,ve,C,ze,Q,pe,me,Y,ke,he,B,we,W,ue,te,I,fe,N,Ce,ge;return{c(){d=n("p"),y=a("TensorFlow models and layers in "),m=n("code"),f=a("transformers"),b=a(" accept two formats as input:"),i=c(),h=n("ul"),j=n("li"),Me=a("having all inputs as keyword arguments (like PyTorch models), or"),ye=c(),Z=n("li"),de=a("having all inputs as a list, tuple or dict in the first positional argument."),K=c(),A=n("p"),$e=a(`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 `),V=n("code"),ce=a("model.fit()"),Ue=a(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=n("code"),se=a("model.fit()"),ae=a(` supports! If, however, you want to use the second
format outside of Keras methods like `),X=n("code"),le=a("fit()"),Fe=a(" and "),S=n("code"),Ae=a("predict()"),Te=a(`, such as when creating your own layers or models with
the Keras `),G=n("code"),Ee=a("Functional"),ie=a(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ee=c(),z=n("ul"),U=n("li"),re=a("a single Tensor with "),L=n("code"),je=a("input_ids"),xe=a(" only and nothing else: "),D=n("code"),Je=a("model(input_ids)"),ve=c(),C=n("li"),ze=a(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=n("code"),pe=a("model([input_ids, attention_mask])"),me=a(" or "),Y=n("code"),ke=a("model([input_ids, attention_mask, token_type_ids])"),he=c(),B=n("li"),we=a(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),W=n("code"),ue=a('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),te=c(),I=n("p"),fe=a(`Note that when creating models and layers with
`),N=n("a"),Ce=a("subclassing"),ge=a(` 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=s(T,"P",{});var x=l(d);y=r(x,"TensorFlow models and layers in "),m=s(x,"CODE",{});var Xe=l(m);f=r(Xe,"transformers"),Xe.forEach(t),b=r(x," accept two formats as input:"),x.forEach(t),i=p(T),h=s(T,"UL",{});var oe=l(h);j=s(oe,"LI",{});var Le=l(j);Me=r(Le,"having all inputs as keyword arguments (like PyTorch models), or"),Le.forEach(t),ye=p(oe),Z=s(oe,"LI",{});var _e=l(Z);de=r(_e,"having all inputs as a list, tuple or dict in the first positional argument."),_e.forEach(t),oe.forEach(t),K=p(T),A=s(T,"P",{});var J=l(A);$e=r(J,`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 `),V=s(J,"CODE",{});var Pe=l(V);ce=r(Pe,"model.fit()"),Pe.forEach(t),Ue=r(J,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=s(J,"CODE",{});var De=l(O);se=r(De,"model.fit()"),De.forEach(t),ae=r(J,` supports! If, however, you want to use the second
format outside of Keras methods like `),X=s(J,"CODE",{});var Oe=l(X);le=r(Oe,"fit()"),Oe.forEach(t),Fe=r(J," and "),S=s(J,"CODE",{});var Ze=l(S);Ae=r(Ze,"predict()"),Ze.forEach(t),Te=r(J,`, such as when creating your own layers or models with
the Keras `),G=s(J,"CODE",{});var Qe=l(G);Ee=r(Qe,"Functional"),Qe.forEach(t),ie=r(J,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),J.forEach(t),ee=p(T),z=s(T,"UL",{});var P=l(z);U=s(P,"LI",{});var R=l(U);re=r(R,"a single Tensor with "),L=s(R,"CODE",{});var He=l(L);je=r(He,"input_ids"),He.forEach(t),xe=r(R," only and nothing else: "),D=s(R,"CODE",{});var Ye=l(D);Je=r(Ye,"model(input_ids)"),Ye.forEach(t),R.forEach(t),ve=p(P),C=s(P,"LI",{});var H=l(C);ze=r(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),Q=s(H,"CODE",{});var Ie=l(Q);pe=r(Ie,"model([input_ids, attention_mask])"),Ie.forEach(t),me=r(H," or "),Y=s(H,"CODE",{});var Be=l(Y);ke=r(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),H.forEach(t),he=p(P),B=s(P,"LI",{});var be=l(B);we=r(be,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),W=s(be,"CODE",{});var Ge=l(W);ue=r(Ge,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ge.forEach(t),be.forEach(t),P.forEach(t),te=p(T),I=s(T,"P",{});var ne=l(I);fe=r(ne,`Note that when creating models and layers with
`),N=s(ne,"A",{href:!0,rel:!0});var Se=l(N);Ce=r(Se,"subclassing"),Se.forEach(t),ge=r(ne,` 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!`),ne.forEach(t),this.h()},h(){u(N,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(N,"rel","nofollow")},m(T,x){g(T,d,x),e(d,y),e(d,m),e(m,f),e(d,b),g(T,i,x),g(T,h,x),e(h,j),e(j,Me),e(h,ye),e(h,Z),e(Z,de),g(T,K,x),g(T,A,x),e(A,$e),e(A,V),e(V,ce),e(A,Ue),e(A,O),e(O,se),e(A,ae),e(A,X),e(X,le),e(A,Fe),e(A,S),e(S,Ae),e(A,Te),e(A,G),e(G,Ee),e(A,ie),g(T,ee,x),g(T,z,x),e(z,U),e(U,re),e(U,L),e(L,je),e(U,xe),e(U,D),e(D,Je),e(z,ve),e(z,C),e(C,ze),e(C,Q),e(Q,pe),e(C,me),e(C,Y),e(Y,ke),e(z,he),e(z,B),e(B,we),e(B,W),e(W,ue),g(T,te,x),g(T,I,x),e(I,fe),e(I,N),e(N,Ce),e(I,ge)},d(T){T&&t(d),T&&t(i),T&&t(h),T&&t(K),T&&t(A),T&&t(ee),T&&t(z),T&&t(te),T&&t(I)}}}function Y3(E){let d,y,m,f,b;return{c(){d=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=a("Module"),b=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(h,"CODE",{});var j=l(m);f=r(j,"Module"),j.forEach(t),b=r(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(i,h){g(i,d,h),e(d,y),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function K3(E){let d,y,m,f,b;return f=new qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURkFsYmVydEZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ2dW1pY2hpZW4lMkZhbGJlcnQtYmFzZS12Mi1zcXVhZDIlMjIpJTBBbW9kZWwlMjAlM0QlMjBURkFsYmVydEZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJ2dW1pY2hpZW4lMkZhbGJlcnQtYmFzZS12Mi1zcXVhZDIlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNEJTIwaW50KHRmLm1hdGguYXJnbWF4KG91dHB1dHMuc3RhcnRfbG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChvdXRwdXRzLmVuZF9sb2dpdHMlMkMlMjBheGlzJTNELTEpJTVCMCU1RCklMEElMEFwcmVkaWN0X2Fuc3dlcl90b2tlbnMlMjAlM0QlMjBpbnB1dHMuaW5wdXRfaWRzJTVCMCUyQyUyMGFuc3dlcl9zdGFydF9pbmRleCUyMCUzQSUyMGFuc3dlcl9lbmRfaW5kZXglMjAlMkIlMjAxJTVEJTBBdG9rZW5pemVyLmRlY29kZShwcmVkaWN0X2Fuc3dlcl90b2tlbnMp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFAlbertForQuestionAnswering
<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;vumichien/albert-base-v2-squad2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFAlbertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;vumichien/albert-base-v2-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=n("p"),y=a("Example:"),m=c(),v(f.$$.fragment)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Example:"),h.forEach(t),m=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,y),g(i,m,h),w(f,i,h),b=!0},p:We,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function e4(E){let d,y;return d=new qe({props:{code:"JTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdGYuY29uc3RhbnQoJTVCMTIlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRmLmNvbnN0YW50KCU1QjEzJTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG91dHB1dHMubG9zcyklMEFyb3VuZChmbG9hdChsb3NzKSUyQyUyMDIp",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">12</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = tf.constant([<span class="hljs-number">13</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.36</span>`}}),{c(){v(d.$$.fragment)},l(m){k(d.$$.fragment,m)},m(m,f){w(d,m,f),y=!0},p:We,i(m){y||(M(d.$$.fragment,m),y=!0)},o(m){$(d.$$.fragment,m),y=!1},d(m){F(d,m)}}}function t4(E){let d,y,m,f,b;return{c(){d=n("p"),y=a("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=n("code"),f=a("Module"),b=a(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s(h,"CODE",{});var j=l(m);f=r(j,"Module"),j.forEach(t),b=r(h,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),h.forEach(t)},m(i,h){g(i,d,h),e(d,y),e(d,m),e(m,f),e(d,b)},d(i){i&&t(d)}}}function o4(E){let d,y,m,f,b;return f=new qe({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QWxiZXJ0TW9kZWwlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJhbGJlcnQtYmFzZS12MiUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhBbGJlcnRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyYWxiZXJ0LWJhc2UtdjIlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxAlbertModel

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

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;albert-base-v2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxAlbertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;albert-base-v2&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=n("p"),y=a("Example:"),m=c(),v(f.$$.fragment)},l(i){d=s(i,"P",{});var h=l(d);y=r(h,"Example:"),h.forEach(t),m=p(i),k(f.$$.fragment,i)},m(i,h){g(i,d,h),e(d,y),g(i,m,h),w(f,i,h),b=!0},p:We,i(i){b||(M(f.$$.fragment,i),b=!0)},o(i){$(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(m),F(f,i)}}}function f4(E){let d,y,m,f,b,i,h,j,Me,ye,Z,de,K,A,$e,V,ce,Ue,O,se,ae,X,le,Fe,S,Ae,Te,G,Ee,ie,ee,z,U,re,L,je,xe,D,Je,ve,C,ze,Q,pe,me,Y,ke,he,B,we,W,ue,te,I,fe,N,Ce,ge,T,x,Xe,oe,Le,_e,J,Pe,De,Oe,Ze,Qe,P,R,He,Ye,H,Ie,Be,be,Ge,ne,Se,n_,Cu,vt,Lc,bd,s_,a_,Dc,yd,r_,l_,Oc,Td,i_,d_,Qc,vd,c_,p_,Hc,kd,h_,Uu,qo,Gn,Yc,Va,m_,Kc,u_,Iu,Nt,Xa,f_,co,g_,wd,__,b_,Md,y_,T_,Sa,v_,k_,w_,Bo,M_,$d,$_,F_,Fd,A_,E_,j_,Rn,Nu,Po,Vn,ep,La,x_,tp,J_,Wu,Ke,Da,z_,Oa,C_,Qa,U_,I_,N_,Ha,W_,Ad,q_,B_,P_,wo,Ya,Z_,op,G_,R_,Ka,Ed,V_,np,X_,S_,jd,L_,sp,D_,O_,Xn,er,Q_,tr,H_,ap,Y_,K_,eb,Bt,or,tb,rp,ob,nb,Sn,sb,Zo,ab,lp,rb,lb,ip,ib,db,cb,xd,nr,qu,Go,Ln,dp,sr,pb,cp,hb,Bu,Wt,ar,mb,po,ub,pp,fb,gb,rr,_b,bb,Jd,yb,Tb,vb,Mo,lr,kb,hp,wb,Mb,ir,zd,$b,mp,Fb,Ab,Cd,Eb,up,jb,xb,Pt,dr,Jb,fp,zb,Cb,Dn,Ub,gp,Ib,Pu,Ro,On,_p,cr,Nb,bp,Wb,Zu,Vo,pr,qb,hr,Bb,Ud,Pb,Zb,Gu,Xo,mr,Gb,ur,Rb,Id,Vb,Xb,Ru,So,Qn,yp,fr,Sb,Tp,Lb,Vu,ut,gr,Db,vp,Ob,Qb,_r,Hb,Nd,Yb,Kb,ey,br,ty,yr,oy,ny,sy,Zt,Tr,ay,Lo,ry,Wd,ly,iy,kp,dy,cy,py,Hn,hy,Yn,Xu,Do,Kn,wp,vr,my,Mp,uy,Su,ft,kr,fy,Oo,gy,$p,_y,by,Fp,yy,Ty,vy,wr,ky,qd,wy,My,$y,Mr,Fy,$r,Ay,Ey,jy,Gt,Fr,xy,Qo,Jy,Bd,zy,Cy,Ap,Uy,Iy,Ny,es,Wy,ts,Lu,Ho,os,Ep,Ar,qy,jp,By,Du,gt,Er,Py,jr,Zy,xp,Gy,Ry,Vy,xr,Xy,Pd,Sy,Ly,Dy,Jr,Oy,zr,Qy,Hy,Yy,kt,Cr,Ky,Yo,eT,Zd,tT,oT,Jp,nT,sT,aT,ns,rT,ss,lT,as,Ou,Ko,rs,zp,Ur,iT,Cp,dT,Qu,_t,Ir,cT,Up,pT,hT,Nr,mT,Gd,uT,fT,gT,Wr,_T,qr,bT,yT,TT,wt,Br,vT,en,kT,Rd,wT,MT,Ip,$T,FT,AT,ls,ET,is,jT,ds,Hu,tn,cs,Np,Pr,xT,Wp,JT,Yu,bt,Zr,zT,qp,CT,UT,Gr,IT,Vd,NT,WT,qT,Rr,BT,Vr,PT,ZT,GT,Rt,Xr,RT,on,VT,Xd,XT,ST,Bp,LT,DT,OT,ps,QT,hs,Ku,nn,ms,Pp,Sr,HT,Zp,YT,ef,yt,Lr,KT,Gp,ev,tv,Dr,ov,Sd,nv,sv,av,Or,rv,Qr,lv,iv,dv,Vt,Hr,cv,sn,pv,Ld,hv,mv,Rp,uv,fv,gv,us,_v,fs,tf,an,gs,Vp,Yr,bv,Xp,yv,of,Tt,Kr,Tv,rn,vv,Sp,kv,wv,Lp,Mv,$v,Fv,el,Av,Dd,Ev,jv,xv,tl,Jv,ol,zv,Cv,Uv,Xt,nl,Iv,ln,Nv,Od,Wv,qv,Dp,Bv,Pv,Zv,_s,Gv,bs,nf,dn,ys,Op,sl,Rv,Qp,Vv,sf,lt,al,Xv,Hp,Sv,Lv,rl,Dv,Qd,Ov,Qv,Hv,ll,Yv,il,Kv,ek,tk,Ts,ok,St,dl,nk,cn,sk,Hd,ak,rk,Yp,lk,ik,dk,vs,ck,ks,af,pn,ws,Kp,cl,pk,eh,hk,rf,it,pl,mk,hn,uk,th,fk,gk,oh,_k,bk,yk,hl,Tk,Yd,vk,kk,wk,ml,Mk,ul,$k,Fk,Ak,Ms,Ek,Lt,fl,jk,mn,xk,Kd,Jk,zk,nh,Ck,Uk,Ik,$s,Nk,Fs,lf,un,As,sh,gl,Wk,ah,qk,df,dt,_l,Bk,bl,Pk,rh,Zk,Gk,Rk,yl,Vk,ec,Xk,Sk,Lk,Tl,Dk,vl,Ok,Qk,Hk,Es,Yk,Mt,kl,Kk,fn,ew,tc,tw,ow,lh,nw,sw,aw,js,rw,xs,lw,Js,cf,gn,zs,ih,wl,iw,dh,dw,pf,ct,Ml,cw,ch,pw,hw,$l,mw,oc,uw,fw,gw,Fl,_w,Al,bw,yw,Tw,Cs,vw,$t,El,kw,_n,ww,nc,Mw,$w,ph,Fw,Aw,Ew,Us,jw,Is,xw,Ns,hf,bn,Ws,hh,jl,Jw,mh,zw,mf,pt,xl,Cw,uh,Uw,Iw,Jl,Nw,sc,Ww,qw,Bw,zl,Pw,Cl,Zw,Gw,Rw,qs,Vw,Dt,Ul,Xw,yn,Sw,ac,Lw,Dw,fh,Ow,Qw,Hw,Bs,Yw,Ps,uf,Tn,Zs,gh,Il,Kw,_h,e2,ff,ht,Nl,t2,bh,o2,n2,Wl,s2,rc,a2,r2,l2,ql,i2,Bl,d2,c2,p2,Gs,h2,Ft,Pl,m2,vn,u2,lc,f2,g2,yh,_2,b2,y2,Rs,T2,Vs,v2,Xs,gf,kn,Ss,Th,Zl,k2,vh,w2,_f,mt,Gl,M2,wn,$2,kh,F2,A2,wh,E2,j2,x2,Rl,J2,ic,z2,C2,U2,Vl,I2,Xl,N2,W2,q2,Ls,B2,At,Sl,P2,Mn,Z2,dc,G2,R2,Mh,V2,X2,S2,Ds,L2,Os,D2,Qs,bf,$n,Hs,$h,Ll,O2,Fh,Q2,yf,et,Dl,H2,Ah,Y2,K2,Ol,eM,cc,tM,oM,nM,Ql,sM,Hl,aM,rM,lM,Eh,iM,dM,ho,jh,Yl,cM,pM,xh,Kl,hM,mM,Jh,ei,uM,fM,zh,ti,gM,_M,Ot,oi,bM,Fn,yM,Ch,TM,vM,Uh,kM,wM,MM,Ys,$M,Ks,Tf,An,ea,Ih,ni,FM,Nh,AM,vf,tt,si,EM,En,jM,Wh,xM,JM,qh,zM,CM,UM,ai,IM,pc,NM,WM,qM,ri,BM,li,PM,ZM,GM,Bh,RM,VM,mo,Ph,ii,XM,SM,Zh,di,LM,DM,Gh,ci,OM,QM,Rh,pi,HM,YM,Qt,hi,KM,jn,e0,Vh,t0,o0,Xh,n0,s0,a0,ta,r0,oa,kf,xn,na,Sh,mi,l0,Lh,i0,wf,ot,ui,d0,fi,c0,Dh,p0,h0,m0,gi,u0,hc,f0,g0,_0,_i,b0,bi,y0,T0,v0,Oh,k0,w0,uo,Qh,yi,M0,$0,Hh,Ti,F0,A0,Yh,vi,E0,j0,Kh,ki,x0,J0,Ht,wi,z0,Jn,C0,em,U0,I0,tm,N0,W0,q0,sa,B0,aa,Mf,zn,ra,om,Mi,P0,nm,Z0,$f,nt,$i,G0,sm,R0,V0,Fi,X0,mc,S0,L0,D0,Ai,O0,Ei,Q0,H0,Y0,am,K0,e1,fo,rm,ji,t1,o1,lm,xi,n1,s1,im,Ji,a1,r1,dm,zi,l1,i1,Yt,Ci,d1,Cn,c1,cm,p1,h1,pm,m1,u1,f1,la,g1,ia,Ff,Un,da,hm,Ui,_1,mm,b1,Af,st,Ii,y1,um,T1,v1,Ni,k1,uc,w1,M1,$1,Wi,F1,qi,A1,E1,j1,fm,x1,J1,go,gm,Bi,z1,C1,_m,Pi,U1,I1,bm,Zi,N1,W1,ym,Gi,q1,B1,Kt,Ri,P1,In,Z1,Tm,G1,R1,vm,V1,X1,S1,ca,L1,pa,Ef,Nn,ha,km,Vi,D1,wm,O1,jf,at,Xi,Q1,Mm,H1,Y1,Si,K1,fc,e$,t$,o$,Li,n$,Di,s$,a$,r$,$m,l$,i$,_o,Fm,Oi,d$,c$,Am,Qi,p$,h$,Em,Hi,m$,u$,jm,Yi,f$,g$,eo,Ki,_$,Wn,b$,xm,y$,T$,Jm,v$,k$,w$,ma,M$,ua,xf,qn,fa,zm,ed,$$,Cm,F$,Jf,rt,td,A$,Bn,E$,Um,j$,x$,Im,J$,z$,C$,od,U$,gc,I$,N$,W$,nd,q$,sd,B$,P$,Z$,Nm,G$,R$,bo,Wm,ad,V$,X$,qm,rd,S$,L$,Bm,ld,D$,O$,Pm,id,Q$,H$,to,dd,Y$,Pn,K$,Zm,eF,tF,Gm,oF,nF,sF,ga,aF,_a,zf;return i=new Ve({}),le=new Ve({}),Ge=new Ve({}),Va=new Ve({}),Xa=new q({props:{name:"class transformers.AlbertConfig",anchor:"transformers.AlbertConfig",parameters:[{name:"vocab_size",val:" = 30000"},{name:"embedding_size",val:" = 128"},{name:"hidden_size",val:" = 4096"},{name:"num_hidden_layers",val:" = 12"},{name:"num_hidden_groups",val:" = 1"},{name:"num_attention_heads",val:" = 64"},{name:"intermediate_size",val:" = 16384"},{name:"inner_group_num",val:" = 1"},{name:"hidden_act",val:" = 'gelu_new'"},{name:"hidden_dropout_prob",val:" = 0"},{name:"attention_probs_dropout_prob",val:" = 0"},{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:"classifier_dropout_prob",val:" = 0.1"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 2"},{name:"eos_token_id",val:" = 3"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AlbertConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30000) &#x2014;
Vocabulary size of the ALBERT 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.32.0/en/model_doc/albert#transformers.AlbertModel">AlbertModel</a> or <a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.TFAlbertModel">TFAlbertModel</a>.`,name:"vocab_size"},{anchor:"transformers.AlbertConfig.embedding_size",description:`<strong>embedding_size</strong> (<code>int</code>, <em>optional</em>, defaults to 128) &#x2014;
Dimensionality of vocabulary embeddings.`,name:"embedding_size"},{anchor:"transformers.AlbertConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.AlbertConfig.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.AlbertConfig.num_hidden_groups",description:`<strong>num_hidden_groups</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of groups for the hidden layers, parameters in the same group are shared.`,name:"num_hidden_groups"},{anchor:"transformers.AlbertConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.AlbertConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 16384) &#x2014;
The dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.AlbertConfig.inner_group_num",description:`<strong>inner_group_num</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of inner repetition of attention and ffn.`,name:"inner_group_num"},{anchor:"transformers.AlbertConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;gelu_new&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.AlbertConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.AlbertConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.AlbertConfig.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
(e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.AlbertConfig.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.32.0/en/model_doc/albert#transformers.AlbertModel">AlbertModel</a> or <a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.TFAlbertModel">TFAlbertModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.AlbertConfig.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.AlbertConfig.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.AlbertConfig.classifier_dropout_prob",description:`<strong>classifier_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for attached classifiers.`,name:"classifier_dropout_prob"},{anchor:"transformers.AlbertConfig.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"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/configuration_albert.py#L36"}}),Rn=new Ne({props:{anchor:"transformers.AlbertConfig.example",$$slots:{default:[p3]},$$scope:{ctx:E}}}),La=new Ve({}),Da=new q({props:{name:"class transformers.AlbertTokenizer",anchor:"transformers.AlbertTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = True"},{name:"remove_space",val:" = True"},{name:"keep_accents",val:" = False"},{name:"bos_token",val:" = '[CLS]'"},{name:"eos_token",val:" = '[SEP]'"},{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:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AlbertTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.AlbertTokenizer.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.AlbertTokenizer.remove_space",description:`<strong>remove_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to strip the text when tokenizing (removing excess spaces before and after the string).`,name:"remove_space"},{anchor:"transformers.AlbertTokenizer.keep_accents",description:`<strong>keep_accents</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to keep accents when tokenizing.`,name:"keep_accents"},{anchor:"transformers.AlbertTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.AlbertTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.AlbertTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&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.AlbertTokenizer.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.AlbertTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.AlbertTokenizer.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.AlbertTokenizer.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.AlbertTokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"},{anchor:"transformers.AlbertTokenizer.sp_model",description:`<strong>sp_model</strong> (<code>SentencePieceProcessor</code>) &#x2014;
The <em>SentencePiece</em> processor that is used for every conversion (string, tokens and IDs).`,name:"sp_model"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/tokenization_albert.py#L59"}}),Ya=new q({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.AlbertTokenizer.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.AlbertTokenizer.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.AlbertTokenizer.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.32.0/src/transformers/models/albert/tokenization_albert.py#L271",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>
`}}),er=new q({props:{name:"get_special_tokens_mask",anchor:"transformers.AlbertTokenizer.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.AlbertTokenizer.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.AlbertTokenizer.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.AlbertTokenizer.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.32.0/src/transformers/models/albert/tokenization_albert.py#L296",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>
`}}),or=new q({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.AlbertTokenizer.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.AlbertTokenizer.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.AlbertTokenizer.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.32.0/src/transformers/models/albert/tokenization_albert.py#L324",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>
`}}),Sn=new Ne({props:{anchor:"transformers.AlbertTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[h3]},$$scope:{ctx:E}}}),nr=new q({props:{name:"save_vocabulary",anchor:"transformers.AlbertTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/tokenization_albert.py#L354"}}),sr=new Ve({}),ar=new q({props:{name:"class transformers.AlbertTokenizerFast",anchor:"transformers.AlbertTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = True"},{name:"remove_space",val:" = True"},{name:"keep_accents",val:" = False"},{name:"bos_token",val:" = '[CLS]'"},{name:"eos_token",val:" = '[SEP]'"},{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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.AlbertTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.AlbertTokenizerFast.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.AlbertTokenizerFast.remove_space",description:`<strong>remove_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to strip the text when tokenizing (removing excess spaces before and after the string).`,name:"remove_space"},{anchor:"transformers.AlbertTokenizerFast.keep_accents",description:`<strong>keep_accents</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to keep accents when tokenizing.`,name:"keep_accents"},{anchor:"transformers.AlbertTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.AlbertTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The end of sequence token. .. note:: When building a sequence using special tokens, this is not the token
that is used for the end of sequence. The token used is the <code>sep_token</code>.`,name:"eos_token"},{anchor:"transformers.AlbertTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&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.AlbertTokenizerFast.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.AlbertTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.AlbertTokenizerFast.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.AlbertTokenizerFast.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"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/tokenization_albert_fast.py#L72"}}),lr=new q({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.AlbertTokenizerFast.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.AlbertTokenizerFast.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.AlbertTokenizerFast.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.32.0/src/transformers/models/albert/tokenization_albert_fast.py#L170",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>
`}}),dr=new q({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.AlbertTokenizerFast.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.AlbertTokenizerFast.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.AlbertTokenizerFast.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.32.0/src/transformers/models/albert/tokenization_albert_fast.py#L195",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>
`}}),Dn=new Ne({props:{anchor:"transformers.AlbertTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[m3]},$$scope:{ctx:E}}}),cr=new Ve({}),pr=new q({props:{name:"class transformers.models.albert.modeling_albert.AlbertForPreTrainingOutput",anchor:"transformers.models.albert.modeling_albert.AlbertForPreTrainingOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prediction_logits",val:": FloatTensor = None"},{name:"sop_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.albert.modeling_albert.AlbertForPreTrainingOutput.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.albert.modeling_albert.AlbertForPreTrainingOutput.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.albert.modeling_albert.AlbertForPreTrainingOutput.sop_logits",description:`<strong>sop_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:"sop_logits"},{anchor:"transformers.models.albert.modeling_albert.AlbertForPreTrainingOutput.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.albert.modeling_albert.AlbertForPreTrainingOutput.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.32.0/src/transformers/models/albert/modeling_albert.py#L531"}}),mr=new q({props:{name:"class transformers.models.albert.modeling_tf_albert.TFAlbertForPreTrainingOutput",anchor:"transformers.models.albert.modeling_tf_albert.TFAlbertForPreTrainingOutput",parameters:[{name:"loss",val:": tf.Tensor = None"},{name:"prediction_logits",val:": tf.Tensor = None"},{name:"sop_logits",val:": tf.Tensor = None"},{name:"hidden_states",val:": Tuple[tf.Tensor] | None = None"},{name:"attentions",val:": Tuple[tf.Tensor] | None = None"}],parametersDescription:[{anchor:"transformers.models.albert.modeling_tf_albert.TFAlbertForPreTrainingOutput.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.albert.modeling_tf_albert.TFAlbertForPreTrainingOutput.sop_logits",description:`<strong>sop_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:"sop_logits"},{anchor:"transformers.models.albert.modeling_tf_albert.TFAlbertForPreTrainingOutput.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.albert.modeling_tf_albert.TFAlbertForPreTrainingOutput.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.32.0/src/transformers/models/albert/modeling_tf_albert.py#L655"}}),fr=new Ve({}),gr=new q({props:{name:"class transformers.AlbertModel",anchor:"transformers.AlbertModel",parameters:[{name:"config",val:": AlbertConfig"},{name:"add_pooling_layer",val:": bool = True"}],parametersDescription:[{anchor:"transformers.AlbertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.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.32.0/src/transformers/models/albert/modeling_albert.py#L634"}}),Tr=new q({props:{name:"forward",anchor:"transformers.AlbertModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.AlbertModel.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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.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.AlbertModel.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.AlbertModel.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.AlbertModel.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.AlbertModel.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.AlbertModel.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.AlbertModel.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.AlbertModel.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.AlbertModel.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.32.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.32.0/src/transformers/models/albert/modeling_albert.py#L677",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPooling"
>transformers.modeling_outputs.BaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Hn=new Re({props:{$$slots:{default:[u3]},$$scope:{ctx:E}}}),Yn=new Ne({props:{anchor:"transformers.AlbertModel.forward.example",$$slots:{default:[f3]},$$scope:{ctx:E}}}),vr=new Ve({}),kr=new q({props:{name:"class transformers.AlbertForPreTraining",anchor:"transformers.AlbertForPreTraining",parameters:[{name:"config",val:": AlbertConfig"}],parametersDescription:[{anchor:"transformers.AlbertForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.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.32.0/src/transformers/models/albert/modeling_albert.py#L763"}}),Fr=new q({props:{name:"forward",anchor:"transformers.AlbertForPreTraining.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"sentence_order_label",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.AlbertForPreTraining.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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.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.AlbertForPreTraining.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.AlbertForPreTraining.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.AlbertForPreTraining.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.AlbertForPreTraining.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.AlbertForPreTraining.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.AlbertForPreTraining.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.AlbertForPreTraining.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.AlbertForPreTraining.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.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.AlbertForPreTraining.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"},{anchor:"transformers.AlbertForPreTraining.forward.sentence_order_label",description:`<strong>sentence_order_label</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>. <code>0</code> indicates original order (sequence A, then
sequence B), <code>1</code> indicates switched order (sequence B, then sequence A).`,name:"sentence_order_label"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/modeling_albert.py#L785",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.models.albert.modeling_albert.AlbertForPreTrainingOutput"
>transformers.models.albert.modeling_albert.AlbertForPreTrainingOutput</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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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>sop_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.32.0/en/model_doc/albert#transformers.models.albert.modeling_albert.AlbertForPreTrainingOutput"
>transformers.models.albert.modeling_albert.AlbertForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),es=new Re({props:{$$slots:{default:[g3]},$$scope:{ctx:E}}}),ts=new Ne({props:{anchor:"transformers.AlbertForPreTraining.forward.example",$$slots:{default:[_3]},$$scope:{ctx:E}}}),Ar=new Ve({}),Er=new q({props:{name:"class transformers.AlbertForMaskedLM",anchor:"transformers.AlbertForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.AlbertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.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.32.0/src/transformers/models/albert/modeling_albert.py#L911"}}),Cr=new q({props:{name:"forward",anchor:"transformers.AlbertForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.AlbertForMaskedLM.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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.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.AlbertForMaskedLM.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.AlbertForMaskedLM.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.AlbertForMaskedLM.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.AlbertForMaskedLM.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.AlbertForMaskedLM.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.AlbertForMaskedLM.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.AlbertForMaskedLM.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.AlbertForMaskedLM.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.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.AlbertForMaskedLM.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.32.0/src/transformers/models/albert/modeling_albert.py#L932",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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.32.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ns=new Re({props:{$$slots:{default:[b3]},$$scope:{ctx:E}}}),ss=new Ne({props:{anchor:"transformers.AlbertForMaskedLM.forward.example",$$slots:{default:[y3]},$$scope:{ctx:E}}}),as=new Ne({props:{anchor:"transformers.AlbertForMaskedLM.forward.example-2",$$slots:{default:[T3]},$$scope:{ctx:E}}}),Ur=new Ve({}),Ir=new q({props:{name:"class transformers.AlbertForSequenceClassification",anchor:"transformers.AlbertForSequenceClassification",parameters:[{name:"config",val:": AlbertConfig"}],parametersDescription:[{anchor:"transformers.AlbertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.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.32.0/src/transformers/models/albert/modeling_albert.py#L1025"}}),Br=new q({props:{name:"forward",anchor:"transformers.AlbertForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.AlbertForSequenceClassification.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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.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.AlbertForSequenceClassification.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.AlbertForSequenceClassification.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.AlbertForSequenceClassification.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.AlbertForSequenceClassification.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.AlbertForSequenceClassification.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.AlbertForSequenceClassification.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.AlbertForSequenceClassification.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.AlbertForSequenceClassification.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.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.AlbertForSequenceClassification.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.32.0/src/transformers/models/albert/modeling_albert.py#L1038",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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.32.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ls=new Re({props:{$$slots:{default:[v3]},$$scope:{ctx:E}}}),is=new Ne({props:{anchor:"transformers.AlbertForSequenceClassification.forward.example",$$slots:{default:[k3]},$$scope:{ctx:E}}}),ds=new Ne({props:{anchor:"transformers.AlbertForSequenceClassification.forward.example-2",$$slots:{default:[w3]},$$scope:{ctx:E}}}),Pr=new Ve({}),Zr=new q({props:{name:"class transformers.AlbertForMultipleChoice",anchor:"transformers.AlbertForMultipleChoice",parameters:[{name:"config",val:": AlbertConfig"}],parametersDescription:[{anchor:"transformers.AlbertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.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.32.0/src/transformers/models/albert/modeling_albert.py#L1312"}}),Xr=new q({props:{name:"forward",anchor:"transformers.AlbertForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.AlbertForMultipleChoice.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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.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.AlbertForMultipleChoice.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.AlbertForMultipleChoice.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.AlbertForMultipleChoice.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.AlbertForMultipleChoice.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.AlbertForMultipleChoice.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.AlbertForMultipleChoice.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.AlbertForMultipleChoice.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.AlbertForMultipleChoice.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.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.AlbertForMultipleChoice.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 <em>num_choices</em> is the size of the second dimension of the input tensors. (see
<em>input_ids</em> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/modeling_albert.py#L1323",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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.32.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ps=new Re({props:{$$slots:{default:[M3]},$$scope:{ctx:E}}}),hs=new Ne({props:{anchor:"transformers.AlbertForMultipleChoice.forward.example",$$slots:{default:[$3]},$$scope:{ctx:E}}}),Sr=new Ve({}),Lr=new q({props:{name:"class transformers.AlbertForTokenClassification",anchor:"transformers.AlbertForTokenClassification",parameters:[{name:"config",val:": AlbertConfig"}],parametersDescription:[{anchor:"transformers.AlbertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.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.32.0/src/transformers/models/albert/modeling_albert.py#L1126"}}),Hr=new q({props:{name:"forward",anchor:"transformers.AlbertForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.AlbertForTokenClassification.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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.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.AlbertForTokenClassification.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.AlbertForTokenClassification.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.AlbertForTokenClassification.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.AlbertForTokenClassification.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.AlbertForTokenClassification.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.AlbertForTokenClassification.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.AlbertForTokenClassification.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.AlbertForTokenClassification.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.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.AlbertForTokenClassification.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.32.0/src/transformers/models/albert/modeling_albert.py#L1143",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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.32.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),us=new Re({props:{$$slots:{default:[F3]},$$scope:{ctx:E}}}),fs=new Ne({props:{anchor:"transformers.AlbertForTokenClassification.forward.example",$$slots:{default:[A3]},$$scope:{ctx:E}}}),Yr=new Ve({}),Kr=new q({props:{name:"class transformers.AlbertForQuestionAnswering",anchor:"transformers.AlbertForQuestionAnswering",parameters:[{name:"config",val:": AlbertConfig"}],parametersDescription:[{anchor:"transformers.AlbertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.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.32.0/src/transformers/models/albert/modeling_albert.py#L1209"}}),nl=new q({props:{name:"forward",anchor:"transformers.AlbertForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.AlbertForQuestionAnswering.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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.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.AlbertForQuestionAnswering.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.AlbertForQuestionAnswering.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.AlbertForQuestionAnswering.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.AlbertForQuestionAnswering.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.AlbertForQuestionAnswering.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.AlbertForQuestionAnswering.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.AlbertForQuestionAnswering.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.AlbertForQuestionAnswering.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.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.AlbertForQuestionAnswering.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.AlbertForQuestionAnswering.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.32.0/src/transformers/models/albert/modeling_albert.py#L1220",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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.32.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_s=new Re({props:{$$slots:{default:[E3]},$$scope:{ctx:E}}}),bs=new Ne({props:{anchor:"transformers.AlbertForQuestionAnswering.forward.example",$$slots:{default:[j3]},$$scope:{ctx:E}}}),sl=new Ve({}),al=new q({props:{name:"class transformers.TFAlbertModel",anchor:"transformers.TFAlbertModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFAlbertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.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.32.0/src/transformers/models/albert/modeling_tf_albert.py#L787"}}),Ts=new Re({props:{$$slots:{default:[x3]},$$scope:{ctx:E}}}),dl=new q({props:{name:"call",anchor:"transformers.TFAlbertModel.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:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFAlbertModel.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.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.TFAlbertModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFAlbertModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFAlbertModel.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFAlbertModel.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFAlbertModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFAlbertModel.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.TFAlbertModel.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.TFAlbertModel.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.32.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.TFAlbertModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/modeling_tf_albert.py#L793",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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>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.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPooling</a> or <code>tuple(tf.Tensor)</code></p>
`}}),vs=new Re({props:{$$slots:{default:[J3]},$$scope:{ctx:E}}}),ks=new Ne({props:{anchor:"transformers.TFAlbertModel.call.example",$$slots:{default:[z3]},$$scope:{ctx:E}}}),cl=new Ve({}),pl=new q({props:{name:"class transformers.TFAlbertForPreTraining",anchor:"transformers.TFAlbertForPreTraining",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFAlbertForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.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.32.0/src/transformers/models/albert/modeling_tf_albert.py#L836"}}),Ms=new Re({props:{$$slots:{default:[C3]},$$scope:{ctx:E}}}),fl=new q({props:{name:"call",anchor:"transformers.TFAlbertForPreTraining.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:"sentence_order_label",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFAlbertForPreTraining.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.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.TFAlbertForPreTraining.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFAlbertForPreTraining.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFAlbertForPreTraining.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFAlbertForPreTraining.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFAlbertForPreTraining.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFAlbertForPreTraining.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.TFAlbertForPreTraining.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.TFAlbertForPreTraining.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.32.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.TFAlbertForPreTraining.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/modeling_tf_albert.py#L852",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.models.albert.modeling_tf_albert.TFAlbertForPreTrainingOutput"
>transformers.models.albert.modeling_tf_albert.TFAlbertForPreTrainingOutput</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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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>sop_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.32.0/en/model_doc/albert#transformers.models.albert.modeling_tf_albert.TFAlbertForPreTrainingOutput"
>transformers.models.albert.modeling_tf_albert.TFAlbertForPreTrainingOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),$s=new Re({props:{$$slots:{default:[U3]},$$scope:{ctx:E}}}),Fs=new Ne({props:{anchor:"transformers.TFAlbertForPreTraining.call.example",$$slots:{default:[I3]},$$scope:{ctx:E}}}),gl=new Ve({}),_l=new q({props:{name:"class transformers.TFAlbertForMaskedLM",anchor:"transformers.TFAlbertForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFAlbertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.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.32.0/src/transformers/models/albert/modeling_tf_albert.py#L944"}}),Es=new Re({props:{$$slots:{default:[N3]},$$scope:{ctx:E}}}),kl=new q({props:{name:"call",anchor:"transformers.TFAlbertForMaskedLM.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.TFAlbertForMaskedLM.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.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.TFAlbertForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFAlbertForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFAlbertForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFAlbertForMaskedLM.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFAlbertForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFAlbertForMaskedLM.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.TFAlbertForMaskedLM.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.TFAlbertForMaskedLM.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.32.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.TFAlbertForMaskedLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFAlbertForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/modeling_tf_albert.py#L957",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),js=new Re({props:{$$slots:{default:[W3]},$$scope:{ctx:E}}}),xs=new Ne({props:{anchor:"transformers.TFAlbertForMaskedLM.call.example",$$slots:{default:[q3]},$$scope:{ctx:E}}}),Js=new Ne({props:{anchor:"transformers.TFAlbertForMaskedLM.call.example-2",$$slots:{default:[B3]},$$scope:{ctx:E}}}),wl=new Ve({}),Ml=new q({props:{name:"class transformers.TFAlbertForSequenceClassification",anchor:"transformers.TFAlbertForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFAlbertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.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.32.0/src/transformers/models/albert/modeling_tf_albert.py#L1046"}}),Cs=new Re({props:{$$slots:{default:[P3]},$$scope:{ctx:E}}}),El=new q({props:{name:"call",anchor:"transformers.TFAlbertForSequenceClassification.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.TFAlbertForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.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.TFAlbertForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFAlbertForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFAlbertForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFAlbertForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFAlbertForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFAlbertForSequenceClassification.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.TFAlbertForSequenceClassification.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.TFAlbertForSequenceClassification.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.32.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.TFAlbertForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFAlbertForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/modeling_tf_albert.py#L1062",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Us=new Re({props:{$$slots:{default:[Z3]},$$scope:{ctx:E}}}),Is=new Ne({props:{anchor:"transformers.TFAlbertForSequenceClassification.call.example",$$slots:{default:[G3]},$$scope:{ctx:E}}}),Ns=new Ne({props:{anchor:"transformers.TFAlbertForSequenceClassification.call.example-2",$$slots:{default:[R3]},$$scope:{ctx:E}}}),jl=new Ve({}),xl=new q({props:{name:"class transformers.TFAlbertForMultipleChoice",anchor:"transformers.TFAlbertForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFAlbertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.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.32.0/src/transformers/models/albert/modeling_tf_albert.py#L1306"}}),qs=new Re({props:{$$slots:{default:[V3]},$$scope:{ctx:E}}}),Ul=new q({props:{name:"call",anchor:"transformers.TFAlbertForMultipleChoice.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.TFAlbertForMultipleChoice.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.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.TFAlbertForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFAlbertForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFAlbertForMultipleChoice.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFAlbertForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFAlbertForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFAlbertForMultipleChoice.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.TFAlbertForMultipleChoice.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.TFAlbertForMultipleChoice.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.32.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.TFAlbertForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFAlbertForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/modeling_tf_albert.py#L1320",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Bs=new Re({props:{$$slots:{default:[X3]},$$scope:{ctx:E}}}),Ps=new Ne({props:{anchor:"transformers.TFAlbertForMultipleChoice.call.example",$$slots:{default:[S3]},$$scope:{ctx:E}}}),Il=new Ve({}),Nl=new q({props:{name:"class transformers.TFAlbertForTokenClassification",anchor:"transformers.TFAlbertForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFAlbertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.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.32.0/src/transformers/models/albert/modeling_tf_albert.py#L1128"}}),Gs=new Re({props:{$$slots:{default:[L3]},$$scope:{ctx:E}}}),Pl=new q({props:{name:"call",anchor:"transformers.TFAlbertForTokenClassification.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.TFAlbertForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.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.TFAlbertForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFAlbertForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFAlbertForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFAlbertForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFAlbertForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFAlbertForTokenClassification.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.TFAlbertForTokenClassification.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.TFAlbertForTokenClassification.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.32.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.TFAlbertForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFAlbertForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/modeling_tf_albert.py#L1149",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Rs=new Re({props:{$$slots:{default:[D3]},$$scope:{ctx:E}}}),Vs=new Ne({props:{anchor:"transformers.TFAlbertForTokenClassification.call.example",$$slots:{default:[O3]},$$scope:{ctx:E}}}),Xs=new Ne({props:{anchor:"transformers.TFAlbertForTokenClassification.call.example-2",$$slots:{default:[Q3]},$$scope:{ctx:E}}}),Zl=new Ve({}),Gl=new q({props:{name:"class transformers.TFAlbertForQuestionAnswering",anchor:"transformers.TFAlbertForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFAlbertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.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.32.0/src/transformers/models/albert/modeling_tf_albert.py#L1211"}}),Ls=new Re({props:{$$slots:{default:[H3]},$$scope:{ctx:E}}}),Sl=new q({props:{name:"call",anchor:"transformers.TFAlbertForQuestionAnswering.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.TFAlbertForQuestionAnswering.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.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.TFAlbertForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFAlbertForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFAlbertForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFAlbertForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFAlbertForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFAlbertForQuestionAnswering.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.TFAlbertForQuestionAnswering.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.TFAlbertForQuestionAnswering.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.32.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.TFAlbertForQuestionAnswering.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFAlbertForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.TFAlbertForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/modeling_tf_albert.py#L1225",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ds=new Re({props:{$$slots:{default:[Y3]},$$scope:{ctx:E}}}),Os=new Ne({props:{anchor:"transformers.TFAlbertForQuestionAnswering.call.example",$$slots:{default:[K3]},$$scope:{ctx:E}}}),Qs=new Ne({props:{anchor:"transformers.TFAlbertForQuestionAnswering.call.example-2",$$slots:{default:[e4]},$$scope:{ctx:E}}}),Ll=new Ve({}),Dl=new q({props:{name:"class transformers.FlaxAlbertModel",anchor:"transformers.FlaxAlbertModel",parameters:[{name:"config",val:": AlbertConfig"},{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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxAlbertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxAlbertModel.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.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/modeling_flax_albert.py#L676"}}),oi=new q({props:{name:"__call__",anchor:"transformers.FlaxAlbertModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",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"}],parametersDescription:[{anchor:"transformers.FlaxAlbertModel.__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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxAlbertModel.__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.FlaxAlbertModel.__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.FlaxAlbertModel.__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.FlaxAlbertModel.__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.32.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.32.0/src/transformers/models/albert/modeling_flax_albert.py#L553",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ys=new Re({props:{$$slots:{default:[t4]},$$scope:{ctx:E}}}),Ks=new Ne({props:{anchor:"transformers.FlaxAlbertModel.__call__.example",$$slots:{default:[o4]},$$scope:{ctx:E}}}),ni=new Ve({}),si=new q({props:{name:"class transformers.FlaxAlbertForPreTraining",anchor:"transformers.FlaxAlbertForPreTraining",parameters:[{name:"config",val:": AlbertConfig"},{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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxAlbertForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxAlbertForPreTraining.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.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/modeling_flax_albert.py#L744"}}),hi=new q({props:{name:"__call__",anchor:"transformers.FlaxAlbertForPreTraining.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",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"}],parametersDescription:[{anchor:"transformers.FlaxAlbertForPreTraining.__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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxAlbertForPreTraining.__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.FlaxAlbertForPreTraining.__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.FlaxAlbertForPreTraining.__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.FlaxAlbertForPreTraining.__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.32.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.32.0/src/transformers/models/albert/modeling_flax_albert.py#L553",returnDescription:`
<p>A <code>transformers.models.albert.modeling_flax_albert.FlaxAlbertForPreTrainingOutput</code> 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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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>sop_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><code>transformers.models.albert.modeling_flax_albert.FlaxAlbertForPreTrainingOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ta=new Re({props:{$$slots:{default:[n4]},$$scope:{ctx:E}}}),oa=new Ne({props:{anchor:"transformers.FlaxAlbertForPreTraining.__call__.example",$$slots:{default:[s4]},$$scope:{ctx:E}}}),mi=new Ve({}),ui=new q({props:{name:"class transformers.FlaxAlbertForMaskedLM",anchor:"transformers.FlaxAlbertForMaskedLM",parameters:[{name:"config",val:": AlbertConfig"},{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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxAlbertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxAlbertForMaskedLM.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.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/modeling_flax_albert.py#L827"}}),wi=new q({props:{name:"__call__",anchor:"transformers.FlaxAlbertForMaskedLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",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"}],parametersDescription:[{anchor:"transformers.FlaxAlbertForMaskedLM.__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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxAlbertForMaskedLM.__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.FlaxAlbertForMaskedLM.__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.FlaxAlbertForMaskedLM.__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.FlaxAlbertForMaskedLM.__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.32.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.32.0/src/transformers/models/albert/modeling_flax_albert.py#L553",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),sa=new Re({props:{$$slots:{default:[a4]},$$scope:{ctx:E}}}),aa=new Ne({props:{anchor:"transformers.FlaxAlbertForMaskedLM.__call__.example",$$slots:{default:[r4]},$$scope:{ctx:E}}}),Mi=new Ve({}),$i=new q({props:{name:"class transformers.FlaxAlbertForSequenceClassification",anchor:"transformers.FlaxAlbertForSequenceClassification",parameters:[{name:"config",val:": AlbertConfig"},{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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxAlbertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxAlbertForSequenceClassification.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.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/modeling_flax_albert.py#L895"}}),Ci=new q({props:{name:"__call__",anchor:"transformers.FlaxAlbertForSequenceClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",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"}],parametersDescription:[{anchor:"transformers.FlaxAlbertForSequenceClassification.__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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxAlbertForSequenceClassification.__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.FlaxAlbertForSequenceClassification.__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.FlaxAlbertForSequenceClassification.__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.FlaxAlbertForSequenceClassification.__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.32.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.32.0/src/transformers/models/albert/modeling_flax_albert.py#L553",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),la=new Re({props:{$$slots:{default:[l4]},$$scope:{ctx:E}}}),ia=new Ne({props:{anchor:"transformers.FlaxAlbertForSequenceClassification.__call__.example",$$slots:{default:[i4]},$$scope:{ctx:E}}}),Ui=new Ve({}),Ii=new q({props:{name:"class transformers.FlaxAlbertForMultipleChoice",anchor:"transformers.FlaxAlbertForMultipleChoice",parameters:[{name:"config",val:": AlbertConfig"},{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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxAlbertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxAlbertForMultipleChoice.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.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/modeling_flax_albert.py#L968"}}),Ri=new q({props:{name:"__call__",anchor:"transformers.FlaxAlbertForMultipleChoice.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",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"}],parametersDescription:[{anchor:"transformers.FlaxAlbertForMultipleChoice.__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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxAlbertForMultipleChoice.__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.FlaxAlbertForMultipleChoice.__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.FlaxAlbertForMultipleChoice.__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.FlaxAlbertForMultipleChoice.__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.32.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.32.0/src/transformers/models/albert/modeling_flax_albert.py#L553",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ca=new Re({props:{$$slots:{default:[d4]},$$scope:{ctx:E}}}),pa=new Ne({props:{anchor:"transformers.FlaxAlbertForMultipleChoice.__call__.example",$$slots:{default:[c4]},$$scope:{ctx:E}}}),Vi=new Ve({}),Xi=new q({props:{name:"class transformers.FlaxAlbertForTokenClassification",anchor:"transformers.FlaxAlbertForTokenClassification",parameters:[{name:"config",val:": AlbertConfig"},{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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxAlbertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxAlbertForTokenClassification.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.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/modeling_flax_albert.py#L1041"}}),Ki=new q({props:{name:"__call__",anchor:"transformers.FlaxAlbertForTokenClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",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"}],parametersDescription:[{anchor:"transformers.FlaxAlbertForTokenClassification.__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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxAlbertForTokenClassification.__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.FlaxAlbertForTokenClassification.__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.FlaxAlbertForTokenClassification.__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.FlaxAlbertForTokenClassification.__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.32.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.32.0/src/transformers/models/albert/modeling_flax_albert.py#L553",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ma=new Re({props:{$$slots:{default:[p4]},$$scope:{ctx:E}}}),ua=new Ne({props:{anchor:"transformers.FlaxAlbertForTokenClassification.__call__.example",$$slots:{default:[h4]},$$scope:{ctx:E}}}),ed=new Ve({}),td=new q({props:{name:"class transformers.FlaxAlbertForQuestionAnswering",anchor:"transformers.FlaxAlbertForQuestionAnswering",parameters:[{name:"config",val:": AlbertConfig"},{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:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxAlbertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertConfig">AlbertConfig</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.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxAlbertForQuestionAnswering.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.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/albert/modeling_flax_albert.py#L1109"}}),dd=new q({props:{name:"__call__",anchor:"transformers.FlaxAlbertForQuestionAnswering.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",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"}],parametersDescription:[{anchor:"transformers.FlaxAlbertForQuestionAnswering.__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.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxAlbertForQuestionAnswering.__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.FlaxAlbertForQuestionAnswering.__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.FlaxAlbertForQuestionAnswering.__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.FlaxAlbertForQuestionAnswering.__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.32.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.32.0/src/transformers/models/albert/modeling_flax_albert.py#L553",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.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.32.0/en/model_doc/albert#transformers.AlbertConfig"
>AlbertConfig</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.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ga=new Re({props:{$$slots:{default:[m4]},$$scope:{ctx:E}}}),_a=new Ne({props:{anchor:"transformers.FlaxAlbertForQuestionAnswering.__call__.example",$$slots:{default:[u4]},$$scope:{ctx:E}}}),{c(){d=n("meta"),y=c(),m=n("h1"),f=n("a"),b=n("span"),v(i.$$.fragment),h=c(),j=n("span"),Me=a("ALBERT"),ye=c(),Z=n("div"),de=n("a"),K=n("img"),$e=c(),V=n("a"),ce=n("img"),O=c(),se=n("h2"),ae=n("a"),X=n("span"),v(le.$$.fragment),Fe=c(),S=n("span"),Ae=a("Overview"),Te=c(),G=n("p"),Ee=a("The ALBERT model was proposed in "),ie=n("a"),ee=a("ALBERT: A Lite BERT for Self-supervised Learning of Language Representations"),z=a(` by Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma,
Radu Soricut. It presents two parameter-reduction techniques to lower memory consumption and increase the training
speed of BERT:`),U=c(),re=n("ul"),L=n("li"),je=a("Splitting the embedding matrix into two smaller matrices."),xe=c(),D=n("li"),Je=a("Using repeating layers split among groups."),ve=c(),C=n("p"),ze=a("The abstract from the paper is the following:"),Q=c(),pe=n("p"),me=n("em"),Y=a(`Increasing model size when pretraining natural language representations often results in improved performance on
downstream tasks. However, at some point further model increases become harder due to GPU/TPU memory limitations,
longer training times, and unexpected model degradation. To address these problems, we present two parameter-reduction
techniques to lower memory consumption and increase the training speed of BERT. Comprehensive empirical evidence shows
that our proposed methods lead to models that scale much better compared to the original BERT. We also use a
self-supervised loss that focuses on modeling inter-sentence coherence, and show it consistently helps downstream tasks
with multi-sentence inputs. As a result, our best model establishes new state-of-the-art results on the GLUE, RACE, and
SQuAD benchmarks while having fewer parameters compared to BERT-large.`),ke=c(),he=n("p"),B=a("Tips:"),we=c(),W=n("ul"),ue=n("li"),te=a(`ALBERT is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather
than the left.`),I=c(),fe=n("li"),N=a(`ALBERT uses repeating layers which results in a small memory footprint, however the computational cost remains
similar to a BERT-like architecture with the same number of hidden layers as it has to iterate through the same
number of (repeating) layers.`),Ce=c(),ge=n("li"),T=a("Embedding size E is different from hidden size H justified because the embeddings are context independent (one embedding vector represents one token), whereas hidden states are context dependent (one hidden state represents a sequence of tokens) so it\u2019s more logical to have H >> E. Also, the embedding matrix is large since it\u2019s V x E (V being the vocab size). If E < H, it has less parameters."),x=c(),Xe=n("li"),oe=a(`Layers are split in groups that share parameters (to save memory).
Next sentence prediction is replaced by a sentence ordering prediction: in the inputs, we have two sentences A and B (that are consecutive) and we either feed A followed by B or B followed by A. The model must predict if they have been swapped or not.`),Le=c(),_e=n("p"),J=a("This model was contributed by "),Pe=n("a"),De=a("lysandre"),Oe=a(`. This model jax version was contributed by
`),Ze=n("a"),Qe=a("kamalkraj"),P=a(". The original code can be found "),R=n("a"),He=a("here"),Ye=a("."),H=c(),Ie=n("h2"),Be=n("a"),be=n("span"),v(Ge.$$.fragment),ne=c(),Se=n("span"),n_=a("Documentation resources"),Cu=c(),vt=n("ul"),Lc=n("li"),bd=n("a"),s_=a("Text classification task guide"),a_=c(),Dc=n("li"),yd=n("a"),r_=a("Token classification task guide"),l_=c(),Oc=n("li"),Td=n("a"),i_=a("Question answering task guide"),d_=c(),Qc=n("li"),vd=n("a"),c_=a("Masked language modeling task guide"),p_=c(),Hc=n("li"),kd=n("a"),h_=a("Multiple choice task guide"),Uu=c(),qo=n("h2"),Gn=n("a"),Yc=n("span"),v(Va.$$.fragment),m_=c(),Kc=n("span"),u_=a("AlbertConfig"),Iu=c(),Nt=n("div"),v(Xa.$$.fragment),f_=c(),co=n("p"),g_=a("This is the configuration class to store the configuration of a "),wd=n("a"),__=a("AlbertModel"),b_=a(" or a "),Md=n("a"),y_=a("TFAlbertModel"),T_=a(`. It is used
to instantiate an ALBERT 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 ALBERT
`),Sa=n("a"),v_=a("albert-xxlarge-v2"),k_=a(" architecture."),w_=c(),Bo=n("p"),M_=a("Configuration objects inherit from "),$d=n("a"),$_=a("PretrainedConfig"),F_=a(` and can be used to control the model outputs. Read the
documentation from `),Fd=n("a"),A_=a("PretrainedConfig"),E_=a(" for more information."),j_=c(),v(Rn.$$.fragment),Nu=c(),Po=n("h2"),Vn=n("a"),ep=n("span"),v(La.$$.fragment),x_=c(),tp=n("span"),J_=a("AlbertTokenizer"),Wu=c(),Ke=n("div"),v(Da.$$.fragment),z_=c(),Oa=n("p"),C_=a("Construct an ALBERT tokenizer. Based on "),Qa=n("a"),U_=a("SentencePiece"),I_=a("."),N_=c(),Ha=n("p"),W_=a("This tokenizer inherits from "),Ad=n("a"),q_=a("PreTrainedTokenizer"),B_=a(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),P_=c(),wo=n("div"),v(Ya.$$.fragment),Z_=c(),op=n("p"),G_=a(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An ALBERT sequence has the following format:`),R_=c(),Ka=n("ul"),Ed=n("li"),V_=a("single sequence: "),np=n("code"),X_=a("[CLS] X [SEP]"),S_=c(),jd=n("li"),L_=a("pair of sequences: "),sp=n("code"),D_=a("[CLS] A [SEP] B [SEP]"),O_=c(),Xn=n("div"),v(er.$$.fragment),Q_=c(),tr=n("p"),H_=a(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),ap=n("code"),Y_=a("prepare_for_model"),K_=a(" method."),eb=c(),Bt=n("div"),v(or.$$.fragment),tb=c(),rp=n("p"),ob=a("Create a mask from the two sequences passed to be used in a sequence-pair classification task. An ALBERT"),nb=c(),v(Sn.$$.fragment),sb=c(),Zo=n("p"),ab=a("If "),lp=n("code"),rb=a("token_ids_1"),lb=a(" is "),ip=n("code"),ib=a("None"),db=a(", this method only returns the first portion of the mask (0s)."),cb=c(),xd=n("div"),v(nr.$$.fragment),qu=c(),Go=n("h2"),Ln=n("a"),dp=n("span"),v(sr.$$.fragment),pb=c(),cp=n("span"),hb=a("AlbertTokenizerFast"),Bu=c(),Wt=n("div"),v(ar.$$.fragment),mb=c(),po=n("p"),ub=a("Construct a \u201Cfast\u201D ALBERT tokenizer (backed by HuggingFace\u2019s "),pp=n("em"),fb=a("tokenizers"),gb=a(` library). Based on
`),rr=n("a"),_b=a("Unigram"),bb=a(`. This
tokenizer inherits from `),Jd=n("a"),yb=a("PreTrainedTokenizerFast"),Tb=a(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods`),vb=c(),Mo=n("div"),v(lr.$$.fragment),kb=c(),hp=n("p"),wb=a(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An ALBERT sequence has the following format:`),Mb=c(),ir=n("ul"),zd=n("li"),$b=a("single sequence: "),mp=n("code"),Fb=a("[CLS] X [SEP]"),Ab=c(),Cd=n("li"),Eb=a("pair of sequences: "),up=n("code"),jb=a("[CLS] A [SEP] B [SEP]"),xb=c(),Pt=n("div"),v(dr.$$.fragment),Jb=c(),fp=n("p"),zb=a("Creates a mask from the two sequences passed to be used in a sequence-pair classification task. An ALBERT"),Cb=c(),v(Dn.$$.fragment),Ub=c(),gp=n("p"),Ib=a("if token_ids_1 is None, only returns the first portion of the mask (0s)."),Pu=c(),Ro=n("h2"),On=n("a"),_p=n("span"),v(cr.$$.fragment),Nb=c(),bp=n("span"),Wb=a("Albert specific outputs"),Zu=c(),Vo=n("div"),v(pr.$$.fragment),qb=c(),hr=n("p"),Bb=a("Output type of "),Ud=n("a"),Pb=a("AlbertForPreTraining"),Zb=a("."),Gu=c(),Xo=n("div"),v(mr.$$.fragment),Gb=c(),ur=n("p"),Rb=a("Output type of "),Id=n("a"),Vb=a("TFAlbertForPreTraining"),Xb=a("."),Ru=c(),So=n("h2"),Qn=n("a"),yp=n("span"),v(fr.$$.fragment),Sb=c(),Tp=n("span"),Lb=a("AlbertModel"),Vu=c(),ut=n("div"),v(gr.$$.fragment),Db=c(),vp=n("p"),Ob=a("The bare ALBERT Model transformer outputting raw hidden-states without any specific head on top."),Qb=c(),_r=n("p"),Hb=a("This model inherits from "),Nd=n("a"),Yb=a("PreTrainedModel"),Kb=a(`. 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.)`),ey=c(),br=n("p"),ty=a("This model is also a PyTorch "),yr=n("a"),oy=a("torch.nn.Module"),ny=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),sy=c(),Zt=n("div"),v(Tr.$$.fragment),ay=c(),Lo=n("p"),ry=a("The "),Wd=n("a"),ly=a("AlbertModel"),iy=a(" forward method, overrides the "),kp=n("code"),dy=a("__call__"),cy=a(" special method."),py=c(),v(Hn.$$.fragment),hy=c(),v(Yn.$$.fragment),Xu=c(),Do=n("h2"),Kn=n("a"),wp=n("span"),v(vr.$$.fragment),my=c(),Mp=n("span"),uy=a("AlbertForPreTraining"),Su=c(),ft=n("div"),v(kr.$$.fragment),fy=c(),Oo=n("p"),gy=a("Albert Model with two heads on top as done during the pretraining: a "),$p=n("code"),_y=a("masked language modeling"),by=a(` head and a
`),Fp=n("code"),yy=a("sentence order prediction (classification)"),Ty=a(" head."),vy=c(),wr=n("p"),ky=a("This model inherits from "),qd=n("a"),wy=a("PreTrainedModel"),My=a(`. 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.)`),$y=c(),Mr=n("p"),Fy=a("This model is also a PyTorch "),$r=n("a"),Ay=a("torch.nn.Module"),Ey=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),jy=c(),Gt=n("div"),v(Fr.$$.fragment),xy=c(),Qo=n("p"),Jy=a("The "),Bd=n("a"),zy=a("AlbertForPreTraining"),Cy=a(" forward method, overrides the "),Ap=n("code"),Uy=a("__call__"),Iy=a(" special method."),Ny=c(),v(es.$$.fragment),Wy=c(),v(ts.$$.fragment),Lu=c(),Ho=n("h2"),os=n("a"),Ep=n("span"),v(Ar.$$.fragment),qy=c(),jp=n("span"),By=a("AlbertForMaskedLM"),Du=c(),gt=n("div"),v(Er.$$.fragment),Py=c(),jr=n("p"),Zy=a("Albert Model with a "),xp=n("code"),Gy=a("language modeling"),Ry=a(" head on top."),Vy=c(),xr=n("p"),Xy=a("This model inherits from "),Pd=n("a"),Sy=a("PreTrainedModel"),Ly=a(`. 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.)`),Dy=c(),Jr=n("p"),Oy=a("This model is also a PyTorch "),zr=n("a"),Qy=a("torch.nn.Module"),Hy=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Yy=c(),kt=n("div"),v(Cr.$$.fragment),Ky=c(),Yo=n("p"),eT=a("The "),Zd=n("a"),tT=a("AlbertForMaskedLM"),oT=a(" forward method, overrides the "),Jp=n("code"),nT=a("__call__"),sT=a(" special method."),aT=c(),v(ns.$$.fragment),rT=c(),v(ss.$$.fragment),lT=c(),v(as.$$.fragment),Ou=c(),Ko=n("h2"),rs=n("a"),zp=n("span"),v(Ur.$$.fragment),iT=c(),Cp=n("span"),dT=a("AlbertForSequenceClassification"),Qu=c(),_t=n("div"),v(Ir.$$.fragment),cT=c(),Up=n("p"),pT=a(`Albert Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),hT=c(),Nr=n("p"),mT=a("This model inherits from "),Gd=n("a"),uT=a("PreTrainedModel"),fT=a(`. 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.)`),gT=c(),Wr=n("p"),_T=a("This model is also a PyTorch "),qr=n("a"),bT=a("torch.nn.Module"),yT=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),TT=c(),wt=n("div"),v(Br.$$.fragment),vT=c(),en=n("p"),kT=a("The "),Rd=n("a"),wT=a("AlbertForSequenceClassification"),MT=a(" forward method, overrides the "),Ip=n("code"),$T=a("__call__"),FT=a(" special method."),AT=c(),v(ls.$$.fragment),ET=c(),v(is.$$.fragment),jT=c(),v(ds.$$.fragment),Hu=c(),tn=n("h2"),cs=n("a"),Np=n("span"),v(Pr.$$.fragment),xT=c(),Wp=n("span"),JT=a("AlbertForMultipleChoice"),Yu=c(),bt=n("div"),v(Zr.$$.fragment),zT=c(),qp=n("p"),CT=a(`Albert 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.`),UT=c(),Gr=n("p"),IT=a("This model inherits from "),Vd=n("a"),NT=a("PreTrainedModel"),WT=a(`. 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.)`),qT=c(),Rr=n("p"),BT=a("This model is also a PyTorch "),Vr=n("a"),PT=a("torch.nn.Module"),ZT=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),GT=c(),Rt=n("div"),v(Xr.$$.fragment),RT=c(),on=n("p"),VT=a("The "),Xd=n("a"),XT=a("AlbertForMultipleChoice"),ST=a(" forward method, overrides the "),Bp=n("code"),LT=a("__call__"),DT=a(" special method."),OT=c(),v(ps.$$.fragment),QT=c(),v(hs.$$.fragment),Ku=c(),nn=n("h2"),ms=n("a"),Pp=n("span"),v(Sr.$$.fragment),HT=c(),Zp=n("span"),YT=a("AlbertForTokenClassification"),ef=c(),yt=n("div"),v(Lr.$$.fragment),KT=c(),Gp=n("p"),ev=a(`Albert 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.`),tv=c(),Dr=n("p"),ov=a("This model inherits from "),Sd=n("a"),nv=a("PreTrainedModel"),sv=a(`. 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.)`),av=c(),Or=n("p"),rv=a("This model is also a PyTorch "),Qr=n("a"),lv=a("torch.nn.Module"),iv=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),dv=c(),Vt=n("div"),v(Hr.$$.fragment),cv=c(),sn=n("p"),pv=a("The "),Ld=n("a"),hv=a("AlbertForTokenClassification"),mv=a(" forward method, overrides the "),Rp=n("code"),uv=a("__call__"),fv=a(" special method."),gv=c(),v(us.$$.fragment),_v=c(),v(fs.$$.fragment),tf=c(),an=n("h2"),gs=n("a"),Vp=n("span"),v(Yr.$$.fragment),bv=c(),Xp=n("span"),yv=a("AlbertForQuestionAnswering"),of=c(),Tt=n("div"),v(Kr.$$.fragment),Tv=c(),rn=n("p"),vv=a(`Albert 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 `),Sp=n("code"),kv=a("span start logits"),wv=a(" and "),Lp=n("code"),Mv=a("span end logits"),$v=a(")."),Fv=c(),el=n("p"),Av=a("This model inherits from "),Dd=n("a"),Ev=a("PreTrainedModel"),jv=a(`. 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.)`),xv=c(),tl=n("p"),Jv=a("This model is also a PyTorch "),ol=n("a"),zv=a("torch.nn.Module"),Cv=a(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Uv=c(),Xt=n("div"),v(nl.$$.fragment),Iv=c(),ln=n("p"),Nv=a("The "),Od=n("a"),Wv=a("AlbertForQuestionAnswering"),qv=a(" forward method, overrides the "),Dp=n("code"),Bv=a("__call__"),Pv=a(" special method."),Zv=c(),v(_s.$$.fragment),Gv=c(),v(bs.$$.fragment),nf=c(),dn=n("h2"),ys=n("a"),Op=n("span"),v(sl.$$.fragment),Rv=c(),Qp=n("span"),Vv=a("TFAlbertModel"),sf=c(),lt=n("div"),v(al.$$.fragment),Xv=c(),Hp=n("p"),Sv=a("The bare Albert Model transformer outputting raw hidden-states without any specific head on top."),Lv=c(),rl=n("p"),Dv=a("This model inherits from "),Qd=n("a"),Ov=a("TFPreTrainedModel"),Qv=a(`. 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.)`),Hv=c(),ll=n("p"),Yv=a("This model is also a "),il=n("a"),Kv=a("tf.keras.Model"),ek=a(` 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.`),tk=c(),v(Ts.$$.fragment),ok=c(),St=n("div"),v(dl.$$.fragment),nk=c(),cn=n("p"),sk=a("The "),Hd=n("a"),ak=a("TFAlbertModel"),rk=a(" forward method, overrides the "),Yp=n("code"),lk=a("__call__"),ik=a(" special method."),dk=c(),v(vs.$$.fragment),ck=c(),v(ks.$$.fragment),af=c(),pn=n("h2"),ws=n("a"),Kp=n("span"),v(cl.$$.fragment),pk=c(),eh=n("span"),hk=a("TFAlbertForPreTraining"),rf=c(),it=n("div"),v(pl.$$.fragment),mk=c(),hn=n("p"),uk=a("Albert Model with two heads on top for pretraining: a "),th=n("code"),fk=a("masked language modeling"),gk=a(" head and a "),oh=n("code"),_k=a("sentence order prediction"),bk=a(" (classification) head."),yk=c(),hl=n("p"),Tk=a("This model inherits from "),Yd=n("a"),vk=a("TFPreTrainedModel"),kk=a(`. 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.)`),wk=c(),ml=n("p"),Mk=a("This model is also a "),ul=n("a"),$k=a("tf.keras.Model"),Fk=a(` 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.`),Ak=c(),v(Ms.$$.fragment),Ek=c(),Lt=n("div"),v(fl.$$.fragment),jk=c(),mn=n("p"),xk=a("The "),Kd=n("a"),Jk=a("TFAlbertForPreTraining"),zk=a(" forward method, overrides the "),nh=n("code"),Ck=a("__call__"),Uk=a(" special method."),Ik=c(),v($s.$$.fragment),Nk=c(),v(Fs.$$.fragment),lf=c(),un=n("h2"),As=n("a"),sh=n("span"),v(gl.$$.fragment),Wk=c(),ah=n("span"),qk=a("TFAlbertForMaskedLM"),df=c(),dt=n("div"),v(_l.$$.fragment),Bk=c(),bl=n("p"),Pk=a("Albert Model with a "),rh=n("code"),Zk=a("language modeling"),Gk=a(" head on top."),Rk=c(),yl=n("p"),Vk=a("This model inherits from "),ec=n("a"),Xk=a("TFPreTrainedModel"),Sk=a(`. 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.)`),Lk=c(),Tl=n("p"),Dk=a("This model is also a "),vl=n("a"),Ok=a("tf.keras.Model"),Qk=a(` 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.`),Hk=c(),v(Es.$$.fragment),Yk=c(),Mt=n("div"),v(kl.$$.fragment),Kk=c(),fn=n("p"),ew=a("The "),tc=n("a"),tw=a("TFAlbertForMaskedLM"),ow=a(" forward method, overrides the "),lh=n("code"),nw=a("__call__"),sw=a(" special method."),aw=c(),v(js.$$.fragment),rw=c(),v(xs.$$.fragment),lw=c(),v(Js.$$.fragment),cf=c(),gn=n("h2"),zs=n("a"),ih=n("span"),v(wl.$$.fragment),iw=c(),dh=n("span"),dw=a("TFAlbertForSequenceClassification"),pf=c(),ct=n("div"),v(Ml.$$.fragment),cw=c(),ch=n("p"),pw=a(`Albert Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),hw=c(),$l=n("p"),mw=a("This model inherits from "),oc=n("a"),uw=a("TFPreTrainedModel"),fw=a(`. 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.)`),gw=c(),Fl=n("p"),_w=a("This model is also a "),Al=n("a"),bw=a("tf.keras.Model"),yw=a(` 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.`),Tw=c(),v(Cs.$$.fragment),vw=c(),$t=n("div"),v(El.$$.fragment),kw=c(),_n=n("p"),ww=a("The "),nc=n("a"),Mw=a("TFAlbertForSequenceClassification"),$w=a(" forward method, overrides the "),ph=n("code"),Fw=a("__call__"),Aw=a(" special method."),Ew=c(),v(Us.$$.fragment),jw=c(),v(Is.$$.fragment),xw=c(),v(Ns.$$.fragment),hf=c(),bn=n("h2"),Ws=n("a"),hh=n("span"),v(jl.$$.fragment),Jw=c(),mh=n("span"),zw=a("TFAlbertForMultipleChoice"),mf=c(),pt=n("div"),v(xl.$$.fragment),Cw=c(),uh=n("p"),Uw=a(`Albert 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.`),Iw=c(),Jl=n("p"),Nw=a("This model inherits from "),sc=n("a"),Ww=a("TFPreTrainedModel"),qw=a(`. 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.)`),Bw=c(),zl=n("p"),Pw=a("This model is also a "),Cl=n("a"),Zw=a("tf.keras.Model"),Gw=a(` 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.`),Rw=c(),v(qs.$$.fragment),Vw=c(),Dt=n("div"),v(Ul.$$.fragment),Xw=c(),yn=n("p"),Sw=a("The "),ac=n("a"),Lw=a("TFAlbertForMultipleChoice"),Dw=a(" forward method, overrides the "),fh=n("code"),Ow=a("__call__"),Qw=a(" special method."),Hw=c(),v(Bs.$$.fragment),Yw=c(),v(Ps.$$.fragment),uf=c(),Tn=n("h2"),Zs=n("a"),gh=n("span"),v(Il.$$.fragment),Kw=c(),_h=n("span"),e2=a("TFAlbertForTokenClassification"),ff=c(),ht=n("div"),v(Nl.$$.fragment),t2=c(),bh=n("p"),o2=a(`Albert 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.`),n2=c(),Wl=n("p"),s2=a("This model inherits from "),rc=n("a"),a2=a("TFPreTrainedModel"),r2=a(`. 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.)`),l2=c(),ql=n("p"),i2=a("This model is also a "),Bl=n("a"),d2=a("tf.keras.Model"),c2=a(` 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.`),p2=c(),v(Gs.$$.fragment),h2=c(),Ft=n("div"),v(Pl.$$.fragment),m2=c(),vn=n("p"),u2=a("The "),lc=n("a"),f2=a("TFAlbertForTokenClassification"),g2=a(" forward method, overrides the "),yh=n("code"),_2=a("__call__"),b2=a(" special method."),y2=c(),v(Rs.$$.fragment),T2=c(),v(Vs.$$.fragment),v2=c(),v(Xs.$$.fragment),gf=c(),kn=n("h2"),Ss=n("a"),Th=n("span"),v(Zl.$$.fragment),k2=c(),vh=n("span"),w2=a("TFAlbertForQuestionAnswering"),_f=c(),mt=n("div"),v(Gl.$$.fragment),M2=c(),wn=n("p"),$2=a(`Albert 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 `),kh=n("code"),F2=a("span start logits"),A2=a(" and "),wh=n("code"),E2=a("span end logits"),j2=a(")."),x2=c(),Rl=n("p"),J2=a("This model inherits from "),ic=n("a"),z2=a("TFPreTrainedModel"),C2=a(`. 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.)`),U2=c(),Vl=n("p"),I2=a("This model is also a "),Xl=n("a"),N2=a("tf.keras.Model"),W2=a(` 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.`),q2=c(),v(Ls.$$.fragment),B2=c(),At=n("div"),v(Sl.$$.fragment),P2=c(),Mn=n("p"),Z2=a("The "),dc=n("a"),G2=a("TFAlbertForQuestionAnswering"),R2=a(" forward method, overrides the "),Mh=n("code"),V2=a("__call__"),X2=a(" special method."),S2=c(),v(Ds.$$.fragment),L2=c(),v(Os.$$.fragment),D2=c(),v(Qs.$$.fragment),bf=c(),$n=n("h2"),Hs=n("a"),$h=n("span"),v(Ll.$$.fragment),O2=c(),Fh=n("span"),Q2=a("FlaxAlbertModel"),yf=c(),et=n("div"),v(Dl.$$.fragment),H2=c(),Ah=n("p"),Y2=a("The bare Albert Model transformer outputting raw hidden-states without any specific head on top."),K2=c(),Ol=n("p"),eM=a("This model inherits from "),cc=n("a"),tM=a("FlaxPreTrainedModel"),oM=a(`. 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)`),nM=c(),Ql=n("p"),sM=a("This model is also a Flax Linen "),Hl=n("a"),aM=a("flax.linen.Module"),rM=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),lM=c(),Eh=n("p"),iM=a("Finally, this model supports inherent JAX features such as:"),dM=c(),ho=n("ul"),jh=n("li"),Yl=n("a"),cM=a("Just-In-Time (JIT) compilation"),pM=c(),xh=n("li"),Kl=n("a"),hM=a("Automatic Differentiation"),mM=c(),Jh=n("li"),ei=n("a"),uM=a("Vectorization"),fM=c(),zh=n("li"),ti=n("a"),gM=a("Parallelization"),_M=c(),Ot=n("div"),v(oi.$$.fragment),bM=c(),Fn=n("p"),yM=a("The "),Ch=n("code"),TM=a("FlaxAlbertPreTrainedModel"),vM=a(" forward method, overrides the "),Uh=n("code"),kM=a("__call__"),wM=a(" special method."),MM=c(),v(Ys.$$.fragment),$M=c(),v(Ks.$$.fragment),Tf=c(),An=n("h2"),ea=n("a"),Ih=n("span"),v(ni.$$.fragment),FM=c(),Nh=n("span"),AM=a("FlaxAlbertForPreTraining"),vf=c(),tt=n("div"),v(si.$$.fragment),EM=c(),En=n("p"),jM=a("Albert Model with two heads on top as done during the pretraining: a "),Wh=n("code"),xM=a("masked language modeling"),JM=a(` head and a
`),qh=n("code"),zM=a("sentence order prediction (classification)"),CM=a(" head."),UM=c(),ai=n("p"),IM=a("This model inherits from "),pc=n("a"),NM=a("FlaxPreTrainedModel"),WM=a(`. 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)`),qM=c(),ri=n("p"),BM=a("This model is also a Flax Linen "),li=n("a"),PM=a("flax.linen.Module"),ZM=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),GM=c(),Bh=n("p"),RM=a("Finally, this model supports inherent JAX features such as:"),VM=c(),mo=n("ul"),Ph=n("li"),ii=n("a"),XM=a("Just-In-Time (JIT) compilation"),SM=c(),Zh=n("li"),di=n("a"),LM=a("Automatic Differentiation"),DM=c(),Gh=n("li"),ci=n("a"),OM=a("Vectorization"),QM=c(),Rh=n("li"),pi=n("a"),HM=a("Parallelization"),YM=c(),Qt=n("div"),v(hi.$$.fragment),KM=c(),jn=n("p"),e0=a("The "),Vh=n("code"),t0=a("FlaxAlbertPreTrainedModel"),o0=a(" forward method, overrides the "),Xh=n("code"),n0=a("__call__"),s0=a(" special method."),a0=c(),v(ta.$$.fragment),r0=c(),v(oa.$$.fragment),kf=c(),xn=n("h2"),na=n("a"),Sh=n("span"),v(mi.$$.fragment),l0=c(),Lh=n("span"),i0=a("FlaxAlbertForMaskedLM"),wf=c(),ot=n("div"),v(ui.$$.fragment),d0=c(),fi=n("p"),c0=a("Albert Model with a "),Dh=n("code"),p0=a("language modeling"),h0=a(" head on top."),m0=c(),gi=n("p"),u0=a("This model inherits from "),hc=n("a"),f0=a("FlaxPreTrainedModel"),g0=a(`. 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)`),_0=c(),_i=n("p"),b0=a("This model is also a Flax Linen "),bi=n("a"),y0=a("flax.linen.Module"),T0=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),v0=c(),Oh=n("p"),k0=a("Finally, this model supports inherent JAX features such as:"),w0=c(),uo=n("ul"),Qh=n("li"),yi=n("a"),M0=a("Just-In-Time (JIT) compilation"),$0=c(),Hh=n("li"),Ti=n("a"),F0=a("Automatic Differentiation"),A0=c(),Yh=n("li"),vi=n("a"),E0=a("Vectorization"),j0=c(),Kh=n("li"),ki=n("a"),x0=a("Parallelization"),J0=c(),Ht=n("div"),v(wi.$$.fragment),z0=c(),Jn=n("p"),C0=a("The "),em=n("code"),U0=a("FlaxAlbertPreTrainedModel"),I0=a(" forward method, overrides the "),tm=n("code"),N0=a("__call__"),W0=a(" special method."),q0=c(),v(sa.$$.fragment),B0=c(),v(aa.$$.fragment),Mf=c(),zn=n("h2"),ra=n("a"),om=n("span"),v(Mi.$$.fragment),P0=c(),nm=n("span"),Z0=a("FlaxAlbertForSequenceClassification"),$f=c(),nt=n("div"),v($i.$$.fragment),G0=c(),sm=n("p"),R0=a(`Albert Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),V0=c(),Fi=n("p"),X0=a("This model inherits from "),mc=n("a"),S0=a("FlaxPreTrainedModel"),L0=a(`. 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)`),D0=c(),Ai=n("p"),O0=a("This model is also a Flax Linen "),Ei=n("a"),Q0=a("flax.linen.Module"),H0=a(`
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=c(),am=n("p"),K0=a("Finally, this model supports inherent JAX features such as:"),e1=c(),fo=n("ul"),rm=n("li"),ji=n("a"),t1=a("Just-In-Time (JIT) compilation"),o1=c(),lm=n("li"),xi=n("a"),n1=a("Automatic Differentiation"),s1=c(),im=n("li"),Ji=n("a"),a1=a("Vectorization"),r1=c(),dm=n("li"),zi=n("a"),l1=a("Parallelization"),i1=c(),Yt=n("div"),v(Ci.$$.fragment),d1=c(),Cn=n("p"),c1=a("The "),cm=n("code"),p1=a("FlaxAlbertPreTrainedModel"),h1=a(" forward method, overrides the "),pm=n("code"),m1=a("__call__"),u1=a(" special method."),f1=c(),v(la.$$.fragment),g1=c(),v(ia.$$.fragment),Ff=c(),Un=n("h2"),da=n("a"),hm=n("span"),v(Ui.$$.fragment),_1=c(),mm=n("span"),b1=a("FlaxAlbertForMultipleChoice"),Af=c(),st=n("div"),v(Ii.$$.fragment),y1=c(),um=n("p"),T1=a(`Albert 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.`),v1=c(),Ni=n("p"),k1=a("This model inherits from "),uc=n("a"),w1=a("FlaxPreTrainedModel"),M1=a(`. 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=c(),Wi=n("p"),F1=a("This model is also a Flax Linen "),qi=n("a"),A1=a("flax.linen.Module"),E1=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),j1=c(),fm=n("p"),x1=a("Finally, this model supports inherent JAX features such as:"),J1=c(),go=n("ul"),gm=n("li"),Bi=n("a"),z1=a("Just-In-Time (JIT) compilation"),C1=c(),_m=n("li"),Pi=n("a"),U1=a("Automatic Differentiation"),I1=c(),bm=n("li"),Zi=n("a"),N1=a("Vectorization"),W1=c(),ym=n("li"),Gi=n("a"),q1=a("Parallelization"),B1=c(),Kt=n("div"),v(Ri.$$.fragment),P1=c(),In=n("p"),Z1=a("The "),Tm=n("code"),G1=a("FlaxAlbertPreTrainedModel"),R1=a(" forward method, overrides the "),vm=n("code"),V1=a("__call__"),X1=a(" special method."),S1=c(),v(ca.$$.fragment),L1=c(),v(pa.$$.fragment),Ef=c(),Nn=n("h2"),ha=n("a"),km=n("span"),v(Vi.$$.fragment),D1=c(),wm=n("span"),O1=a("FlaxAlbertForTokenClassification"),jf=c(),at=n("div"),v(Xi.$$.fragment),Q1=c(),Mm=n("p"),H1=a(`Albert 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.`),Y1=c(),Si=n("p"),K1=a("This model inherits from "),fc=n("a"),e$=a("FlaxPreTrainedModel"),t$=a(`. 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)`),o$=c(),Li=n("p"),n$=a("This model is also a Flax Linen "),Di=n("a"),s$=a("flax.linen.Module"),a$=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),r$=c(),$m=n("p"),l$=a("Finally, this model supports inherent JAX features such as:"),i$=c(),_o=n("ul"),Fm=n("li"),Oi=n("a"),d$=a("Just-In-Time (JIT) compilation"),c$=c(),Am=n("li"),Qi=n("a"),p$=a("Automatic Differentiation"),h$=c(),Em=n("li"),Hi=n("a"),m$=a("Vectorization"),u$=c(),jm=n("li"),Yi=n("a"),f$=a("Parallelization"),g$=c(),eo=n("div"),v(Ki.$$.fragment),_$=c(),Wn=n("p"),b$=a("The "),xm=n("code"),y$=a("FlaxAlbertPreTrainedModel"),T$=a(" forward method, overrides the "),Jm=n("code"),v$=a("__call__"),k$=a(" special method."),w$=c(),v(ma.$$.fragment),M$=c(),v(ua.$$.fragment),xf=c(),qn=n("h2"),fa=n("a"),zm=n("span"),v(ed.$$.fragment),$$=c(),Cm=n("span"),F$=a("FlaxAlbertForQuestionAnswering"),Jf=c(),rt=n("div"),v(td.$$.fragment),A$=c(),Bn=n("p"),E$=a(`Albert 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 `),Um=n("code"),j$=a("span start logits"),x$=a(" and "),Im=n("code"),J$=a("span end logits"),z$=a(")."),C$=c(),od=n("p"),U$=a("This model inherits from "),gc=n("a"),I$=a("FlaxPreTrainedModel"),N$=a(`. 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)`),W$=c(),nd=n("p"),q$=a("This model is also a Flax Linen "),sd=n("a"),B$=a("flax.linen.Module"),P$=a(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Z$=c(),Nm=n("p"),G$=a("Finally, this model supports inherent JAX features such as:"),R$=c(),bo=n("ul"),Wm=n("li"),ad=n("a"),V$=a("Just-In-Time (JIT) compilation"),X$=c(),qm=n("li"),rd=n("a"),S$=a("Automatic Differentiation"),L$=c(),Bm=n("li"),ld=n("a"),D$=a("Vectorization"),O$=c(),Pm=n("li"),id=n("a"),Q$=a("Parallelization"),H$=c(),to=n("div"),v(dd.$$.fragment),Y$=c(),Pn=n("p"),K$=a("The "),Zm=n("code"),eF=a("FlaxAlbertPreTrainedModel"),tF=a(" forward method, overrides the "),Gm=n("code"),oF=a("__call__"),nF=a(" special method."),sF=c(),v(ga.$$.fragment),aF=c(),v(_a.$$.fragment),this.h()},l(o){const _=d3('[data-svelte="svelte-1phssyn"]',document.head);d=s(_,"META",{name:!0,content:!0}),_.forEach(t),y=p(o),m=s(o,"H1",{class:!0});var cd=l(m);f=s(cd,"A",{id:!0,class:!0,href:!0});var Rm=l(f);b=s(Rm,"SPAN",{});var Vm=l(b);k(i.$$.fragment,Vm),Vm.forEach(t),Rm.forEach(t),h=p(cd),j=s(cd,"SPAN",{});var Xm=l(j);Me=r(Xm,"ALBERT"),Xm.forEach(t),cd.forEach(t),ye=p(o),Z=s(o,"DIV",{class:!0});var pd=l(Z);de=s(pd,"A",{href:!0});var Sm=l(de);K=s(Sm,"IMG",{alt:!0,src:!0}),Sm.forEach(t),$e=p(pd),V=s(pd,"A",{href:!0});var Lm=l(V);ce=s(Lm,"IMG",{alt:!0,src:!0}),Lm.forEach(t),pd.forEach(t),O=p(o),se=s(o,"H2",{class:!0});var hd=l(se);ae=s(hd,"A",{id:!0,class:!0,href:!0});var Dm=l(ae);X=s(Dm,"SPAN",{});var Om=l(X);k(le.$$.fragment,Om),Om.forEach(t),Dm.forEach(t),Fe=p(hd),S=s(hd,"SPAN",{});var Qm=l(S);Ae=r(Qm,"Overview"),Qm.forEach(t),hd.forEach(t),Te=p(o),G=s(o,"P",{});var md=l(G);Ee=r(md,"The ALBERT model was proposed in "),ie=s(md,"A",{href:!0,rel:!0});var Hm=l(ie);ee=r(Hm,"ALBERT: A Lite BERT for Self-supervised Learning of Language Representations"),Hm.forEach(t),z=r(md,` by Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma,
Radu Soricut. It presents two parameter-reduction techniques to lower memory consumption and increase the training
speed of BERT:`),md.forEach(t),U=p(o),re=s(o,"UL",{});var ud=l(re);L=s(ud,"LI",{});var Ym=l(L);je=r(Ym,"Splitting the embedding matrix into two smaller matrices."),Ym.forEach(t),xe=p(ud),D=s(ud,"LI",{});var Km=l(D);Je=r(Km,"Using repeating layers split among groups."),Km.forEach(t),ud.forEach(t),ve=p(o),C=s(o,"P",{});var eu=l(C);ze=r(eu,"The abstract from the paper is the following:"),eu.forEach(t),Q=p(o),pe=s(o,"P",{});var tu=l(pe);me=s(tu,"EM",{});var ou=l(me);Y=r(ou,`Increasing model size when pretraining natural language representations often results in improved performance on
downstream tasks. However, at some point further model increases become harder due to GPU/TPU memory limitations,
longer training times, and unexpected model degradation. To address these problems, we present two parameter-reduction
techniques to lower memory consumption and increase the training speed of BERT. Comprehensive empirical evidence shows
that our proposed methods lead to models that scale much better compared to the original BERT. We also use a
self-supervised loss that focuses on modeling inter-sentence coherence, and show it consistently helps downstream tasks
with multi-sentence inputs. As a result, our best model establishes new state-of-the-art results on the GLUE, RACE, and
SQuAD benchmarks while having fewer parameters compared to BERT-large.`),ou.forEach(t),tu.forEach(t),ke=p(o),he=s(o,"P",{});var nu=l(he);B=r(nu,"Tips:"),nu.forEach(t),we=p(o),W=s(o,"UL",{});var yo=l(W);ue=s(yo,"LI",{});var su=l(ue);te=r(su,`ALBERT is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather
than the left.`),su.forEach(t),I=p(yo),fe=s(yo,"LI",{});var au=l(fe);N=r(au,`ALBERT uses repeating layers which results in a small memory footprint, however the computational cost remains
similar to a BERT-like architecture with the same number of hidden layers as it has to iterate through the same
number of (repeating) layers.`),au.forEach(t),Ce=p(yo),ge=s(yo,"LI",{});var ru=l(ge);T=r(ru,"Embedding size E is different from hidden size H justified because the embeddings are context independent (one embedding vector represents one token), whereas hidden states are context dependent (one hidden state represents a sequence of tokens) so it\u2019s more logical to have H >> E. Also, the embedding matrix is large since it\u2019s V x E (V being the vocab size). If E < H, it has less parameters."),ru.forEach(t),x=p(yo),Xe=s(yo,"LI",{});var lu=l(Xe);oe=r(lu,`Layers are split in groups that share parameters (to save memory).
Next sentence prediction is replaced by a sentence ordering prediction: in the inputs, we have two sentences A and B (that are consecutive) and we either feed A followed by B or B followed by A. The model must predict if they have been swapped or not.`),lu.forEach(t),yo.forEach(t),Le=p(o),_e=s(o,"P",{});var To=l(_e);J=r(To,"This model was contributed by "),Pe=s(To,"A",{href:!0,rel:!0});var iu=l(Pe);De=r(iu,"lysandre"),iu.forEach(t),Oe=r(To,`. This model jax version was contributed by
`),Ze=s(To,"A",{href:!0,rel:!0});var du=l(Ze);Qe=r(du,"kamalkraj"),du.forEach(t),P=r(To,". The original code can be found "),R=s(To,"A",{href:!0,rel:!0});var cu=l(R);He=r(cu,"here"),cu.forEach(t),Ye=r(To,"."),To.forEach(t),H=p(o),Ie=s(o,"H2",{class:!0});var fd=l(Ie);Be=s(fd,"A",{id:!0,class:!0,href:!0});var pu=l(Be);be=s(pu,"SPAN",{});var hu=l(be);k(Ge.$$.fragment,hu),hu.forEach(t),pu.forEach(t),ne=p(fd),Se=s(fd,"SPAN",{});var mu=l(Se);n_=r(mu,"Documentation resources"),mu.forEach(t),fd.forEach(t),Cu=p(o),vt=s(o,"UL",{});var qt=l(vt);Lc=s(qt,"LI",{});var uu=l(Lc);bd=s(uu,"A",{href:!0});var fu=l(bd);s_=r(fu,"Text classification task guide"),fu.forEach(t),uu.forEach(t),a_=p(qt),Dc=s(qt,"LI",{});var gu=l(Dc);yd=s(gu,"A",{href:!0});var _u=l(yd);r_=r(_u,"Token classification task guide"),_u.forEach(t),gu.forEach(t),l_=p(qt),Oc=s(qt,"LI",{});var bu=l(Oc);Td=s(bu,"A",{href:!0});var yu=l(Td);i_=r(yu,"Question answering task guide"),yu.forEach(t),bu.forEach(t),d_=p(qt),Qc=s(qt,"LI",{});var Tu=l(Qc);vd=s(Tu,"A",{href:!0});var vu=l(vd);c_=r(vu,"Masked language modeling task guide"),vu.forEach(t),Tu.forEach(t),p_=p(qt),Hc=s(qt,"LI",{});var ku=l(Hc);kd=s(ku,"A",{href:!0});var wu=l(kd);h_=r(wu,"Multiple choice task guide"),wu.forEach(t),ku.forEach(t),qt.forEach(t),Uu=p(o),qo=s(o,"H2",{class:!0});var gd=l(qo);Gn=s(gd,"A",{id:!0,class:!0,href:!0});var Mu=l(Gn);Yc=s(Mu,"SPAN",{});var $u=l(Yc);k(Va.$$.fragment,$u),$u.forEach(t),Mu.forEach(t),m_=p(gd),Kc=s(gd,"SPAN",{});var Fu=l(Kc);u_=r(Fu,"AlbertConfig"),Fu.forEach(t),gd.forEach(t),Iu=p(o),Nt=s(o,"DIV",{class:!0});var vo=l(Nt);k(Xa.$$.fragment,vo),f_=p(vo),co=s(vo,"P",{});var ko=l(co);g_=r(ko,"This is the configuration class to store the configuration of a "),wd=s(ko,"A",{href:!0});var Au=l(wd);__=r(Au,"AlbertModel"),Au.forEach(t),b_=r(ko," or a "),Md=s(ko,"A",{href:!0});var Eu=l(Md);y_=r(Eu,"TFAlbertModel"),Eu.forEach(t),T_=r(ko,`. It is used
to instantiate an ALBERT 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 ALBERT
`),Sa=s(ko,"A",{href:!0,rel:!0});var ju=l(Sa);v_=r(ju,"albert-xxlarge-v2"),ju.forEach(t),k_=r(ko," architecture."),ko.forEach(t),w_=p(vo),Bo=s(vo,"P",{});var Zn=l(Bo);M_=r(Zn,"Configuration objects inherit from "),$d=s(Zn,"A",{href:!0});var xu=l($d);$_=r(xu,"PretrainedConfig"),xu.forEach(t),F_=r(Zn,` and can be used to control the model outputs. Read the
documentation from `),Fd=s(Zn,"A",{href:!0});var Ju=l(Fd);A_=r(Ju,"PretrainedConfig"),Ju.forEach(t),E_=r(Zn," for more information."),Zn.forEach(t),j_=p(vo),k(Rn.$$.fragment,vo),vo.forEach(t),Nu=p(o),Po=s(o,"H2",{class:!0});var _d=l(Po);Vn=s(_d,"A",{id:!0,class:!0,href:!0});var zu=l(Vn);ep=s(zu,"SPAN",{});var cF=l(ep);k(La.$$.fragment,cF),cF.forEach(t),zu.forEach(t),x_=p(_d),tp=s(_d,"SPAN",{});var pF=l(tp);J_=r(pF,"AlbertTokenizer"),pF.forEach(t),_d.forEach(t),Wu=p(o),Ke=s(o,"DIV",{class:!0});var Et=l(Ke);k(Da.$$.fragment,Et),z_=p(Et),Oa=s(Et,"P",{});var Cf=l(Oa);C_=r(Cf,"Construct an ALBERT tokenizer. Based on "),Qa=s(Cf,"A",{href:!0,rel:!0});var hF=l(Qa);U_=r(hF,"SentencePiece"),hF.forEach(t),I_=r(Cf,"."),Cf.forEach(t),N_=p(Et),Ha=s(Et,"P",{});var Uf=l(Ha);W_=r(Uf,"This tokenizer inherits from "),Ad=s(Uf,"A",{href:!0});var mF=l(Ad);q_=r(mF,"PreTrainedTokenizer"),mF.forEach(t),B_=r(Uf,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Uf.forEach(t),P_=p(Et),wo=s(Et,"DIV",{class:!0});var _c=l(wo);k(Ya.$$.fragment,_c),Z_=p(_c),op=s(_c,"P",{});var uF=l(op);G_=r(uF,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An ALBERT sequence has the following format:`),uF.forEach(t),R_=p(_c),Ka=s(_c,"UL",{});var If=l(Ka);Ed=s(If,"LI",{});var rF=l(Ed);V_=r(rF,"single sequence: "),np=s(rF,"CODE",{});var fF=l(np);X_=r(fF,"[CLS] X [SEP]"),fF.forEach(t),rF.forEach(t),S_=p(If),jd=s(If,"LI",{});var lF=l(jd);L_=r(lF,"pair of sequences: "),sp=s(lF,"CODE",{});var gF=l(sp);D_=r(gF,"[CLS] A [SEP] B [SEP]"),gF.forEach(t),lF.forEach(t),If.forEach(t),_c.forEach(t),O_=p(Et),Xn=s(Et,"DIV",{class:!0});var Nf=l(Xn);k(er.$$.fragment,Nf),Q_=p(Nf),tr=s(Nf,"P",{});var Wf=l(tr);H_=r(Wf,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),ap=s(Wf,"CODE",{});var _F=l(ap);Y_=r(_F,"prepare_for_model"),_F.forEach(t),K_=r(Wf," method."),Wf.forEach(t),Nf.forEach(t),eb=p(Et),Bt=s(Et,"DIV",{class:!0});var ba=l(Bt);k(or.$$.fragment,ba),tb=p(ba),rp=s(ba,"P",{});var bF=l(rp);ob=r(bF,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. An ALBERT"),bF.forEach(t),nb=p(ba),k(Sn.$$.fragment,ba),sb=p(ba),Zo=s(ba,"P",{});var bc=l(Zo);ab=r(bc,"If "),lp=s(bc,"CODE",{});var yF=l(lp);rb=r(yF,"token_ids_1"),yF.forEach(t),lb=r(bc," is "),ip=s(bc,"CODE",{});var TF=l(ip);ib=r(TF,"None"),TF.forEach(t),db=r(bc,", this method only returns the first portion of the mask (0s)."),bc.forEach(t),ba.forEach(t),cb=p(Et),xd=s(Et,"DIV",{class:!0});var vF=l(xd);k(nr.$$.fragment,vF),vF.forEach(t),Et.forEach(t),qu=p(o),Go=s(o,"H2",{class:!0});var qf=l(Go);Ln=s(qf,"A",{id:!0,class:!0,href:!0});var kF=l(Ln);dp=s(kF,"SPAN",{});var wF=l(dp);k(sr.$$.fragment,wF),wF.forEach(t),kF.forEach(t),pb=p(qf),cp=s(qf,"SPAN",{});var MF=l(cp);hb=r(MF,"AlbertTokenizerFast"),MF.forEach(t),qf.forEach(t),Bu=p(o),Wt=s(o,"DIV",{class:!0});var ya=l(Wt);k(ar.$$.fragment,ya),mb=p(ya),po=s(ya,"P",{});var Ta=l(po);ub=r(Ta,"Construct a \u201Cfast\u201D ALBERT tokenizer (backed by HuggingFace\u2019s "),pp=s(Ta,"EM",{});var $F=l(pp);fb=r($F,"tokenizers"),$F.forEach(t),gb=r(Ta,` library). Based on
`),rr=s(Ta,"A",{href:!0,rel:!0});var FF=l(rr);_b=r(FF,"Unigram"),FF.forEach(t),bb=r(Ta,`. This
tokenizer inherits from `),Jd=s(Ta,"A",{href:!0});var AF=l(Jd);yb=r(AF,"PreTrainedTokenizerFast"),AF.forEach(t),Tb=r(Ta,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods`),Ta.forEach(t),vb=p(ya),Mo=s(ya,"DIV",{class:!0});var yc=l(Mo);k(lr.$$.fragment,yc),kb=p(yc),hp=s(yc,"P",{});var EF=l(hp);wb=r(EF,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An ALBERT sequence has the following format:`),EF.forEach(t),Mb=p(yc),ir=s(yc,"UL",{});var Bf=l(ir);zd=s(Bf,"LI",{});var iF=l(zd);$b=r(iF,"single sequence: "),mp=s(iF,"CODE",{});var jF=l(mp);Fb=r(jF,"[CLS] X [SEP]"),jF.forEach(t),iF.forEach(t),Ab=p(Bf),Cd=s(Bf,"LI",{});var dF=l(Cd);Eb=r(dF,"pair of sequences: "),up=s(dF,"CODE",{});var xF=l(up);jb=r(xF,"[CLS] A [SEP] B [SEP]"),xF.forEach(t),dF.forEach(t),Bf.forEach(t),yc.forEach(t),xb=p(ya),Pt=s(ya,"DIV",{class:!0});var va=l(Pt);k(dr.$$.fragment,va),Jb=p(va),fp=s(va,"P",{});var JF=l(fp);zb=r(JF,"Creates a mask from the two sequences passed to be used in a sequence-pair classification task. An ALBERT"),JF.forEach(t),Cb=p(va),k(Dn.$$.fragment,va),Ub=p(va),gp=s(va,"P",{});var zF=l(gp);Ib=r(zF,"if token_ids_1 is None, only returns the first portion of the mask (0s)."),zF.forEach(t),va.forEach(t),ya.forEach(t),Pu=p(o),Ro=s(o,"H2",{class:!0});var Pf=l(Ro);On=s(Pf,"A",{id:!0,class:!0,href:!0});var CF=l(On);_p=s(CF,"SPAN",{});var UF=l(_p);k(cr.$$.fragment,UF),UF.forEach(t),CF.forEach(t),Nb=p(Pf),bp=s(Pf,"SPAN",{});var IF=l(bp);Wb=r(IF,"Albert specific outputs"),IF.forEach(t),Pf.forEach(t),Zu=p(o),Vo=s(o,"DIV",{class:!0});var Zf=l(Vo);k(pr.$$.fragment,Zf),qb=p(Zf),hr=s(Zf,"P",{});var Gf=l(hr);Bb=r(Gf,"Output type of "),Ud=s(Gf,"A",{href:!0});var NF=l(Ud);Pb=r(NF,"AlbertForPreTraining"),NF.forEach(t),Zb=r(Gf,"."),Gf.forEach(t),Zf.forEach(t),Gu=p(o),Xo=s(o,"DIV",{class:!0});var Rf=l(Xo);k(mr.$$.fragment,Rf),Gb=p(Rf),ur=s(Rf,"P",{});var Vf=l(ur);Rb=r(Vf,"Output type of "),Id=s(Vf,"A",{href:!0});var WF=l(Id);Vb=r(WF,"TFAlbertForPreTraining"),WF.forEach(t),Xb=r(Vf,"."),Vf.forEach(t),Rf.forEach(t),Ru=p(o),So=s(o,"H2",{class:!0});var Xf=l(So);Qn=s(Xf,"A",{id:!0,class:!0,href:!0});var qF=l(Qn);yp=s(qF,"SPAN",{});var BF=l(yp);k(fr.$$.fragment,BF),BF.forEach(t),qF.forEach(t),Sb=p(Xf),Tp=s(Xf,"SPAN",{});var PF=l(Tp);Lb=r(PF,"AlbertModel"),PF.forEach(t),Xf.forEach(t),Vu=p(o),ut=s(o,"DIV",{class:!0});var $o=l(ut);k(gr.$$.fragment,$o),Db=p($o),vp=s($o,"P",{});var ZF=l(vp);Ob=r(ZF,"The bare ALBERT Model transformer outputting raw hidden-states without any specific head on top."),ZF.forEach(t),Qb=p($o),_r=s($o,"P",{});var Sf=l(_r);Hb=r(Sf,"This model inherits from "),Nd=s(Sf,"A",{href:!0});var GF=l(Nd);Yb=r(GF,"PreTrainedModel"),GF.forEach(t),Kb=r(Sf,`. 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.)`),Sf.forEach(t),ey=p($o),br=s($o,"P",{});var Lf=l(br);ty=r(Lf,"This model is also a PyTorch "),yr=s(Lf,"A",{href:!0,rel:!0});var RF=l(yr);oy=r(RF,"torch.nn.Module"),RF.forEach(t),ny=r(Lf,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Lf.forEach(t),sy=p($o),Zt=s($o,"DIV",{class:!0});var ka=l(Zt);k(Tr.$$.fragment,ka),ay=p(ka),Lo=s(ka,"P",{});var Tc=l(Lo);ry=r(Tc,"The "),Wd=s(Tc,"A",{href:!0});var VF=l(Wd);ly=r(VF,"AlbertModel"),VF.forEach(t),iy=r(Tc," forward method, overrides the "),kp=s(Tc,"CODE",{});var XF=l(kp);dy=r(XF,"__call__"),XF.forEach(t),cy=r(Tc," special method."),Tc.forEach(t),py=p(ka),k(Hn.$$.fragment,ka),hy=p(ka),k(Yn.$$.fragment,ka),ka.forEach(t),$o.forEach(t),Xu=p(o),Do=s(o,"H2",{class:!0});var Df=l(Do);Kn=s(Df,"A",{id:!0,class:!0,href:!0});var SF=l(Kn);wp=s(SF,"SPAN",{});var LF=l(wp);k(vr.$$.fragment,LF),LF.forEach(t),SF.forEach(t),my=p(Df),Mp=s(Df,"SPAN",{});var DF=l(Mp);uy=r(DF,"AlbertForPreTraining"),DF.forEach(t),Df.forEach(t),Su=p(o),ft=s(o,"DIV",{class:!0});var Fo=l(ft);k(kr.$$.fragment,Fo),fy=p(Fo),Oo=s(Fo,"P",{});var vc=l(Oo);gy=r(vc,"Albert Model with two heads on top as done during the pretraining: a "),$p=s(vc,"CODE",{});var OF=l($p);_y=r(OF,"masked language modeling"),OF.forEach(t),by=r(vc,` head and a
`),Fp=s(vc,"CODE",{});var QF=l(Fp);yy=r(QF,"sentence order prediction (classification)"),QF.forEach(t),Ty=r(vc," head."),vc.forEach(t),vy=p(Fo),wr=s(Fo,"P",{});var Of=l(wr);ky=r(Of,"This model inherits from "),qd=s(Of,"A",{href:!0});var HF=l(qd);wy=r(HF,"PreTrainedModel"),HF.forEach(t),My=r(Of,`. 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.)`),Of.forEach(t),$y=p(Fo),Mr=s(Fo,"P",{});var Qf=l(Mr);Fy=r(Qf,"This model is also a PyTorch "),$r=s(Qf,"A",{href:!0,rel:!0});var YF=l($r);Ay=r(YF,"torch.nn.Module"),YF.forEach(t),Ey=r(Qf,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Qf.forEach(t),jy=p(Fo),Gt=s(Fo,"DIV",{class:!0});var wa=l(Gt);k(Fr.$$.fragment,wa),xy=p(wa),Qo=s(wa,"P",{});var kc=l(Qo);Jy=r(kc,"The "),Bd=s(kc,"A",{href:!0});var KF=l(Bd);zy=r(KF,"AlbertForPreTraining"),KF.forEach(t),Cy=r(kc," forward method, overrides the "),Ap=s(kc,"CODE",{});var eA=l(Ap);Uy=r(eA,"__call__"),eA.forEach(t),Iy=r(kc," special method."),kc.forEach(t),Ny=p(wa),k(es.$$.fragment,wa),Wy=p(wa),k(ts.$$.fragment,wa),wa.forEach(t),Fo.forEach(t),Lu=p(o),Ho=s(o,"H2",{class:!0});var Hf=l(Ho);os=s(Hf,"A",{id:!0,class:!0,href:!0});var tA=l(os);Ep=s(tA,"SPAN",{});var oA=l(Ep);k(Ar.$$.fragment,oA),oA.forEach(t),tA.forEach(t),qy=p(Hf),jp=s(Hf,"SPAN",{});var nA=l(jp);By=r(nA,"AlbertForMaskedLM"),nA.forEach(t),Hf.forEach(t),Du=p(o),gt=s(o,"DIV",{class:!0});var Ao=l(gt);k(Er.$$.fragment,Ao),Py=p(Ao),jr=s(Ao,"P",{});var Yf=l(jr);Zy=r(Yf,"Albert Model with a "),xp=s(Yf,"CODE",{});var sA=l(xp);Gy=r(sA,"language modeling"),sA.forEach(t),Ry=r(Yf," head on top."),Yf.forEach(t),Vy=p(Ao),xr=s(Ao,"P",{});var Kf=l(xr);Xy=r(Kf,"This model inherits from "),Pd=s(Kf,"A",{href:!0});var aA=l(Pd);Sy=r(aA,"PreTrainedModel"),aA.forEach(t),Ly=r(Kf,`. 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.)`),Kf.forEach(t),Dy=p(Ao),Jr=s(Ao,"P",{});var eg=l(Jr);Oy=r(eg,"This model is also a PyTorch "),zr=s(eg,"A",{href:!0,rel:!0});var rA=l(zr);Qy=r(rA,"torch.nn.Module"),rA.forEach(t),Hy=r(eg,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),eg.forEach(t),Yy=p(Ao),kt=s(Ao,"DIV",{class:!0});var Eo=l(kt);k(Cr.$$.fragment,Eo),Ky=p(Eo),Yo=s(Eo,"P",{});var wc=l(Yo);eT=r(wc,"The "),Zd=s(wc,"A",{href:!0});var lA=l(Zd);tT=r(lA,"AlbertForMaskedLM"),lA.forEach(t),oT=r(wc," forward method, overrides the "),Jp=s(wc,"CODE",{});var iA=l(Jp);nT=r(iA,"__call__"),iA.forEach(t),sT=r(wc," special method."),wc.forEach(t),aT=p(Eo),k(ns.$$.fragment,Eo),rT=p(Eo),k(ss.$$.fragment,Eo),lT=p(Eo),k(as.$$.fragment,Eo),Eo.forEach(t),Ao.forEach(t),Ou=p(o),Ko=s(o,"H2",{class:!0});var tg=l(Ko);rs=s(tg,"A",{id:!0,class:!0,href:!0});var dA=l(rs);zp=s(dA,"SPAN",{});var cA=l(zp);k(Ur.$$.fragment,cA),cA.forEach(t),dA.forEach(t),iT=p(tg),Cp=s(tg,"SPAN",{});var pA=l(Cp);dT=r(pA,"AlbertForSequenceClassification"),pA.forEach(t),tg.forEach(t),Qu=p(o),_t=s(o,"DIV",{class:!0});var jo=l(_t);k(Ir.$$.fragment,jo),cT=p(jo),Up=s(jo,"P",{});var hA=l(Up);pT=r(hA,`Albert Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),hA.forEach(t),hT=p(jo),Nr=s(jo,"P",{});var og=l(Nr);mT=r(og,"This model inherits from "),Gd=s(og,"A",{href:!0});var mA=l(Gd);uT=r(mA,"PreTrainedModel"),mA.forEach(t),fT=r(og,`. 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.)`),og.forEach(t),gT=p(jo),Wr=s(jo,"P",{});var ng=l(Wr);_T=r(ng,"This model is also a PyTorch "),qr=s(ng,"A",{href:!0,rel:!0});var uA=l(qr);bT=r(uA,"torch.nn.Module"),uA.forEach(t),yT=r(ng,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ng.forEach(t),TT=p(jo),wt=s(jo,"DIV",{class:!0});var xo=l(wt);k(Br.$$.fragment,xo),vT=p(xo),en=s(xo,"P",{});var Mc=l(en);kT=r(Mc,"The "),Rd=s(Mc,"A",{href:!0});var fA=l(Rd);wT=r(fA,"AlbertForSequenceClassification"),fA.forEach(t),MT=r(Mc," forward method, overrides the "),Ip=s(Mc,"CODE",{});var gA=l(Ip);$T=r(gA,"__call__"),gA.forEach(t),FT=r(Mc," special method."),Mc.forEach(t),AT=p(xo),k(ls.$$.fragment,xo),ET=p(xo),k(is.$$.fragment,xo),jT=p(xo),k(ds.$$.fragment,xo),xo.forEach(t),jo.forEach(t),Hu=p(o),tn=s(o,"H2",{class:!0});var sg=l(tn);cs=s(sg,"A",{id:!0,class:!0,href:!0});var _A=l(cs);Np=s(_A,"SPAN",{});var bA=l(Np);k(Pr.$$.fragment,bA),bA.forEach(t),_A.forEach(t),xT=p(sg),Wp=s(sg,"SPAN",{});var yA=l(Wp);JT=r(yA,"AlbertForMultipleChoice"),yA.forEach(t),sg.forEach(t),Yu=p(o),bt=s(o,"DIV",{class:!0});var Jo=l(bt);k(Zr.$$.fragment,Jo),zT=p(Jo),qp=s(Jo,"P",{});var TA=l(qp);CT=r(TA,`Albert 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.`),TA.forEach(t),UT=p(Jo),Gr=s(Jo,"P",{});var ag=l(Gr);IT=r(ag,"This model inherits from "),Vd=s(ag,"A",{href:!0});var vA=l(Vd);NT=r(vA,"PreTrainedModel"),vA.forEach(t),WT=r(ag,`. 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.)`),ag.forEach(t),qT=p(Jo),Rr=s(Jo,"P",{});var rg=l(Rr);BT=r(rg,"This model is also a PyTorch "),Vr=s(rg,"A",{href:!0,rel:!0});var kA=l(Vr);PT=r(kA,"torch.nn.Module"),kA.forEach(t),ZT=r(rg,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),rg.forEach(t),GT=p(Jo),Rt=s(Jo,"DIV",{class:!0});var Ma=l(Rt);k(Xr.$$.fragment,Ma),RT=p(Ma),on=s(Ma,"P",{});var $c=l(on);VT=r($c,"The "),Xd=s($c,"A",{href:!0});var wA=l(Xd);XT=r(wA,"AlbertForMultipleChoice"),wA.forEach(t),ST=r($c," forward method, overrides the "),Bp=s($c,"CODE",{});var MA=l(Bp);LT=r(MA,"__call__"),MA.forEach(t),DT=r($c," special method."),$c.forEach(t),OT=p(Ma),k(ps.$$.fragment,Ma),QT=p(Ma),k(hs.$$.fragment,Ma),Ma.forEach(t),Jo.forEach(t),Ku=p(o),nn=s(o,"H2",{class:!0});var lg=l(nn);ms=s(lg,"A",{id:!0,class:!0,href:!0});var $A=l(ms);Pp=s($A,"SPAN",{});var FA=l(Pp);k(Sr.$$.fragment,FA),FA.forEach(t),$A.forEach(t),HT=p(lg),Zp=s(lg,"SPAN",{});var AA=l(Zp);YT=r(AA,"AlbertForTokenClassification"),AA.forEach(t),lg.forEach(t),ef=p(o),yt=s(o,"DIV",{class:!0});var zo=l(yt);k(Lr.$$.fragment,zo),KT=p(zo),Gp=s(zo,"P",{});var EA=l(Gp);ev=r(EA,`Albert 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.`),EA.forEach(t),tv=p(zo),Dr=s(zo,"P",{});var ig=l(Dr);ov=r(ig,"This model inherits from "),Sd=s(ig,"A",{href:!0});var jA=l(Sd);nv=r(jA,"PreTrainedModel"),jA.forEach(t),sv=r(ig,`. 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.)`),ig.forEach(t),av=p(zo),Or=s(zo,"P",{});var dg=l(Or);rv=r(dg,"This model is also a PyTorch "),Qr=s(dg,"A",{href:!0,rel:!0});var xA=l(Qr);lv=r(xA,"torch.nn.Module"),xA.forEach(t),iv=r(dg,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),dg.forEach(t),dv=p(zo),Vt=s(zo,"DIV",{class:!0});var $a=l(Vt);k(Hr.$$.fragment,$a),cv=p($a),sn=s($a,"P",{});var Fc=l(sn);pv=r(Fc,"The "),Ld=s(Fc,"A",{href:!0});var JA=l(Ld);hv=r(JA,"AlbertForTokenClassification"),JA.forEach(t),mv=r(Fc," forward method, overrides the "),Rp=s(Fc,"CODE",{});var zA=l(Rp);uv=r(zA,"__call__"),zA.forEach(t),fv=r(Fc," special method."),Fc.forEach(t),gv=p($a),k(us.$$.fragment,$a),_v=p($a),k(fs.$$.fragment,$a),$a.forEach(t),zo.forEach(t),tf=p(o),an=s(o,"H2",{class:!0});var cg=l(an);gs=s(cg,"A",{id:!0,class:!0,href:!0});var CA=l(gs);Vp=s(CA,"SPAN",{});var UA=l(Vp);k(Yr.$$.fragment,UA),UA.forEach(t),CA.forEach(t),bv=p(cg),Xp=s(cg,"SPAN",{});var IA=l(Xp);yv=r(IA,"AlbertForQuestionAnswering"),IA.forEach(t),cg.forEach(t),of=p(o),Tt=s(o,"DIV",{class:!0});var Co=l(Tt);k(Kr.$$.fragment,Co),Tv=p(Co),rn=s(Co,"P",{});var Ac=l(rn);vv=r(Ac,`Albert 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 `),Sp=s(Ac,"CODE",{});var NA=l(Sp);kv=r(NA,"span start logits"),NA.forEach(t),wv=r(Ac," and "),Lp=s(Ac,"CODE",{});var WA=l(Lp);Mv=r(WA,"span end logits"),WA.forEach(t),$v=r(Ac,")."),Ac.forEach(t),Fv=p(Co),el=s(Co,"P",{});var pg=l(el);Av=r(pg,"This model inherits from "),Dd=s(pg,"A",{href:!0});var qA=l(Dd);Ev=r(qA,"PreTrainedModel"),qA.forEach(t),jv=r(pg,`. 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.)`),pg.forEach(t),xv=p(Co),tl=s(Co,"P",{});var hg=l(tl);Jv=r(hg,"This model is also a PyTorch "),ol=s(hg,"A",{href:!0,rel:!0});var BA=l(ol);zv=r(BA,"torch.nn.Module"),BA.forEach(t),Cv=r(hg,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),hg.forEach(t),Uv=p(Co),Xt=s(Co,"DIV",{class:!0});var Fa=l(Xt);k(nl.$$.fragment,Fa),Iv=p(Fa),ln=s(Fa,"P",{});var Ec=l(ln);Nv=r(Ec,"The "),Od=s(Ec,"A",{href:!0});var PA=l(Od);Wv=r(PA,"AlbertForQuestionAnswering"),PA.forEach(t),qv=r(Ec," forward method, overrides the "),Dp=s(Ec,"CODE",{});var ZA=l(Dp);Bv=r(ZA,"__call__"),ZA.forEach(t),Pv=r(Ec," special method."),Ec.forEach(t),Zv=p(Fa),k(_s.$$.fragment,Fa),Gv=p(Fa),k(bs.$$.fragment,Fa),Fa.forEach(t),Co.forEach(t),nf=p(o),dn=s(o,"H2",{class:!0});var mg=l(dn);ys=s(mg,"A",{id:!0,class:!0,href:!0});var GA=l(ys);Op=s(GA,"SPAN",{});var RA=l(Op);k(sl.$$.fragment,RA),RA.forEach(t),GA.forEach(t),Rv=p(mg),Qp=s(mg,"SPAN",{});var VA=l(Qp);Vv=r(VA,"TFAlbertModel"),VA.forEach(t),mg.forEach(t),sf=p(o),lt=s(o,"DIV",{class:!0});var oo=l(lt);k(al.$$.fragment,oo),Xv=p(oo),Hp=s(oo,"P",{});var XA=l(Hp);Sv=r(XA,"The bare Albert Model transformer outputting raw hidden-states without any specific head on top."),XA.forEach(t),Lv=p(oo),rl=s(oo,"P",{});var ug=l(rl);Dv=r(ug,"This model inherits from "),Qd=s(ug,"A",{href:!0});var SA=l(Qd);Ov=r(SA,"TFPreTrainedModel"),SA.forEach(t),Qv=r(ug,`. 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.)`),ug.forEach(t),Hv=p(oo),ll=s(oo,"P",{});var fg=l(ll);Yv=r(fg,"This model is also a "),il=s(fg,"A",{href:!0,rel:!0});var LA=l(il);Kv=r(LA,"tf.keras.Model"),LA.forEach(t),ek=r(fg,` 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.`),fg.forEach(t),tk=p(oo),k(Ts.$$.fragment,oo),ok=p(oo),St=s(oo,"DIV",{class:!0});var Aa=l(St);k(dl.$$.fragment,Aa),nk=p(Aa),cn=s(Aa,"P",{});var jc=l(cn);sk=r(jc,"The "),Hd=s(jc,"A",{href:!0});var DA=l(Hd);ak=r(DA,"TFAlbertModel"),DA.forEach(t),rk=r(jc," forward method, overrides the "),Yp=s(jc,"CODE",{});var OA=l(Yp);lk=r(OA,"__call__"),OA.forEach(t),ik=r(jc," special method."),jc.forEach(t),dk=p(Aa),k(vs.$$.fragment,Aa),ck=p(Aa),k(ks.$$.fragment,Aa),Aa.forEach(t),oo.forEach(t),af=p(o),pn=s(o,"H2",{class:!0});var gg=l(pn);ws=s(gg,"A",{id:!0,class:!0,href:!0});var QA=l(ws);Kp=s(QA,"SPAN",{});var HA=l(Kp);k(cl.$$.fragment,HA),HA.forEach(t),QA.forEach(t),pk=p(gg),eh=s(gg,"SPAN",{});var YA=l(eh);hk=r(YA,"TFAlbertForPreTraining"),YA.forEach(t),gg.forEach(t),rf=p(o),it=s(o,"DIV",{class:!0});var no=l(it);k(pl.$$.fragment,no),mk=p(no),hn=s(no,"P",{});var xc=l(hn);uk=r(xc,"Albert Model with two heads on top for pretraining: a "),th=s(xc,"CODE",{});var KA=l(th);fk=r(KA,"masked language modeling"),KA.forEach(t),gk=r(xc," head and a "),oh=s(xc,"CODE",{});var eE=l(oh);_k=r(eE,"sentence order prediction"),eE.forEach(t),bk=r(xc," (classification) head."),xc.forEach(t),yk=p(no),hl=s(no,"P",{});var _g=l(hl);Tk=r(_g,"This model inherits from "),Yd=s(_g,"A",{href:!0});var tE=l(Yd);vk=r(tE,"TFPreTrainedModel"),tE.forEach(t),kk=r(_g,`. 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.)`),_g.forEach(t),wk=p(no),ml=s(no,"P",{});var bg=l(ml);Mk=r(bg,"This model is also a "),ul=s(bg,"A",{href:!0,rel:!0});var oE=l(ul);$k=r(oE,"tf.keras.Model"),oE.forEach(t),Fk=r(bg,` 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.`),bg.forEach(t),Ak=p(no),k(Ms.$$.fragment,no),Ek=p(no),Lt=s(no,"DIV",{class:!0});var Ea=l(Lt);k(fl.$$.fragment,Ea),jk=p(Ea),mn=s(Ea,"P",{});var Jc=l(mn);xk=r(Jc,"The "),Kd=s(Jc,"A",{href:!0});var nE=l(Kd);Jk=r(nE,"TFAlbertForPreTraining"),nE.forEach(t),zk=r(Jc," forward method, overrides the "),nh=s(Jc,"CODE",{});var sE=l(nh);Ck=r(sE,"__call__"),sE.forEach(t),Uk=r(Jc," special method."),Jc.forEach(t),Ik=p(Ea),k($s.$$.fragment,Ea),Nk=p(Ea),k(Fs.$$.fragment,Ea),Ea.forEach(t),no.forEach(t),lf=p(o),un=s(o,"H2",{class:!0});var yg=l(un);As=s(yg,"A",{id:!0,class:!0,href:!0});var aE=l(As);sh=s(aE,"SPAN",{});var rE=l(sh);k(gl.$$.fragment,rE),rE.forEach(t),aE.forEach(t),Wk=p(yg),ah=s(yg,"SPAN",{});var lE=l(ah);qk=r(lE,"TFAlbertForMaskedLM"),lE.forEach(t),yg.forEach(t),df=p(o),dt=s(o,"DIV",{class:!0});var so=l(dt);k(_l.$$.fragment,so),Bk=p(so),bl=s(so,"P",{});var Tg=l(bl);Pk=r(Tg,"Albert Model with a "),rh=s(Tg,"CODE",{});var iE=l(rh);Zk=r(iE,"language modeling"),iE.forEach(t),Gk=r(Tg," head on top."),Tg.forEach(t),Rk=p(so),yl=s(so,"P",{});var vg=l(yl);Vk=r(vg,"This model inherits from "),ec=s(vg,"A",{href:!0});var dE=l(ec);Xk=r(dE,"TFPreTrainedModel"),dE.forEach(t),Sk=r(vg,`. 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.)`),vg.forEach(t),Lk=p(so),Tl=s(so,"P",{});var kg=l(Tl);Dk=r(kg,"This model is also a "),vl=s(kg,"A",{href:!0,rel:!0});var cE=l(vl);Ok=r(cE,"tf.keras.Model"),cE.forEach(t),Qk=r(kg,` 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.`),kg.forEach(t),Hk=p(so),k(Es.$$.fragment,so),Yk=p(so),Mt=s(so,"DIV",{class:!0});var Uo=l(Mt);k(kl.$$.fragment,Uo),Kk=p(Uo),fn=s(Uo,"P",{});var zc=l(fn);ew=r(zc,"The "),tc=s(zc,"A",{href:!0});var pE=l(tc);tw=r(pE,"TFAlbertForMaskedLM"),pE.forEach(t),ow=r(zc," forward method, overrides the "),lh=s(zc,"CODE",{});var hE=l(lh);nw=r(hE,"__call__"),hE.forEach(t),sw=r(zc," special method."),zc.forEach(t),aw=p(Uo),k(js.$$.fragment,Uo),rw=p(Uo),k(xs.$$.fragment,Uo),lw=p(Uo),k(Js.$$.fragment,Uo),Uo.forEach(t),so.forEach(t),cf=p(o),gn=s(o,"H2",{class:!0});var wg=l(gn);zs=s(wg,"A",{id:!0,class:!0,href:!0});var mE=l(zs);ih=s(mE,"SPAN",{});var uE=l(ih);k(wl.$$.fragment,uE),uE.forEach(t),mE.forEach(t),iw=p(wg),dh=s(wg,"SPAN",{});var fE=l(dh);dw=r(fE,"TFAlbertForSequenceClassification"),fE.forEach(t),wg.forEach(t),pf=p(o),ct=s(o,"DIV",{class:!0});var ao=l(ct);k(Ml.$$.fragment,ao),cw=p(ao),ch=s(ao,"P",{});var gE=l(ch);pw=r(gE,`Albert Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),gE.forEach(t),hw=p(ao),$l=s(ao,"P",{});var Mg=l($l);mw=r(Mg,"This model inherits from "),oc=s(Mg,"A",{href:!0});var _E=l(oc);uw=r(_E,"TFPreTrainedModel"),_E.forEach(t),fw=r(Mg,`. 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.)`),Mg.forEach(t),gw=p(ao),Fl=s(ao,"P",{});var $g=l(Fl);_w=r($g,"This model is also a "),Al=s($g,"A",{href:!0,rel:!0});var bE=l(Al);bw=r(bE,"tf.keras.Model"),bE.forEach(t),yw=r($g,` 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.`),$g.forEach(t),Tw=p(ao),k(Cs.$$.fragment,ao),vw=p(ao),$t=s(ao,"DIV",{class:!0});var Io=l($t);k(El.$$.fragment,Io),kw=p(Io),_n=s(Io,"P",{});var Cc=l(_n);ww=r(Cc,"The "),nc=s(Cc,"A",{href:!0});var yE=l(nc);Mw=r(yE,"TFAlbertForSequenceClassification"),yE.forEach(t),$w=r(Cc," forward method, overrides the "),ph=s(Cc,"CODE",{});var TE=l(ph);Fw=r(TE,"__call__"),TE.forEach(t),Aw=r(Cc," special method."),Cc.forEach(t),Ew=p(Io),k(Us.$$.fragment,Io),jw=p(Io),k(Is.$$.fragment,Io),xw=p(Io),k(Ns.$$.fragment,Io),Io.forEach(t),ao.forEach(t),hf=p(o),bn=s(o,"H2",{class:!0});var Fg=l(bn);Ws=s(Fg,"A",{id:!0,class:!0,href:!0});var vE=l(Ws);hh=s(vE,"SPAN",{});var kE=l(hh);k(jl.$$.fragment,kE),kE.forEach(t),vE.forEach(t),Jw=p(Fg),mh=s(Fg,"SPAN",{});var wE=l(mh);zw=r(wE,"TFAlbertForMultipleChoice"),wE.forEach(t),Fg.forEach(t),mf=p(o),pt=s(o,"DIV",{class:!0});var ro=l(pt);k(xl.$$.fragment,ro),Cw=p(ro),uh=s(ro,"P",{});var ME=l(uh);Uw=r(ME,`Albert 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.`),ME.forEach(t),Iw=p(ro),Jl=s(ro,"P",{});var Ag=l(Jl);Nw=r(Ag,"This model inherits from "),sc=s(Ag,"A",{href:!0});var $E=l(sc);Ww=r($E,"TFPreTrainedModel"),$E.forEach(t),qw=r(Ag,`. 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.)`),Ag.forEach(t),Bw=p(ro),zl=s(ro,"P",{});var Eg=l(zl);Pw=r(Eg,"This model is also a "),Cl=s(Eg,"A",{href:!0,rel:!0});var FE=l(Cl);Zw=r(FE,"tf.keras.Model"),FE.forEach(t),Gw=r(Eg,` 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.`),Eg.forEach(t),Rw=p(ro),k(qs.$$.fragment,ro),Vw=p(ro),Dt=s(ro,"DIV",{class:!0});var ja=l(Dt);k(Ul.$$.fragment,ja),Xw=p(ja),yn=s(ja,"P",{});var Uc=l(yn);Sw=r(Uc,"The "),ac=s(Uc,"A",{href:!0});var AE=l(ac);Lw=r(AE,"TFAlbertForMultipleChoice"),AE.forEach(t),Dw=r(Uc," forward method, overrides the "),fh=s(Uc,"CODE",{});var EE=l(fh);Ow=r(EE,"__call__"),EE.forEach(t),Qw=r(Uc," special method."),Uc.forEach(t),Hw=p(ja),k(Bs.$$.fragment,ja),Yw=p(ja),k(Ps.$$.fragment,ja),ja.forEach(t),ro.forEach(t),uf=p(o),Tn=s(o,"H2",{class:!0});var jg=l(Tn);Zs=s(jg,"A",{id:!0,class:!0,href:!0});var jE=l(Zs);gh=s(jE,"SPAN",{});var xE=l(gh);k(Il.$$.fragment,xE),xE.forEach(t),jE.forEach(t),Kw=p(jg),_h=s(jg,"SPAN",{});var JE=l(_h);e2=r(JE,"TFAlbertForTokenClassification"),JE.forEach(t),jg.forEach(t),ff=p(o),ht=s(o,"DIV",{class:!0});var lo=l(ht);k(Nl.$$.fragment,lo),t2=p(lo),bh=s(lo,"P",{});var zE=l(bh);o2=r(zE,`Albert 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.`),zE.forEach(t),n2=p(lo),Wl=s(lo,"P",{});var xg=l(Wl);s2=r(xg,"This model inherits from "),rc=s(xg,"A",{href:!0});var CE=l(rc);a2=r(CE,"TFPreTrainedModel"),CE.forEach(t),r2=r(xg,`. 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.)`),xg.forEach(t),l2=p(lo),ql=s(lo,"P",{});var Jg=l(ql);i2=r(Jg,"This model is also a "),Bl=s(Jg,"A",{href:!0,rel:!0});var UE=l(Bl);d2=r(UE,"tf.keras.Model"),UE.forEach(t),c2=r(Jg,` 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.`),Jg.forEach(t),p2=p(lo),k(Gs.$$.fragment,lo),h2=p(lo),Ft=s(lo,"DIV",{class:!0});var No=l(Ft);k(Pl.$$.fragment,No),m2=p(No),vn=s(No,"P",{});var Ic=l(vn);u2=r(Ic,"The "),lc=s(Ic,"A",{href:!0});var IE=l(lc);f2=r(IE,"TFAlbertForTokenClassification"),IE.forEach(t),g2=r(Ic," forward method, overrides the "),yh=s(Ic,"CODE",{});var NE=l(yh);_2=r(NE,"__call__"),NE.forEach(t),b2=r(Ic," special method."),Ic.forEach(t),y2=p(No),k(Rs.$$.fragment,No),T2=p(No),k(Vs.$$.fragment,No),v2=p(No),k(Xs.$$.fragment,No),No.forEach(t),lo.forEach(t),gf=p(o),kn=s(o,"H2",{class:!0});var zg=l(kn);Ss=s(zg,"A",{id:!0,class:!0,href:!0});var WE=l(Ss);Th=s(WE,"SPAN",{});var qE=l(Th);k(Zl.$$.fragment,qE),qE.forEach(t),WE.forEach(t),k2=p(zg),vh=s(zg,"SPAN",{});var BE=l(vh);w2=r(BE,"TFAlbertForQuestionAnswering"),BE.forEach(t),zg.forEach(t),_f=p(o),mt=s(o,"DIV",{class:!0});var io=l(mt);k(Gl.$$.fragment,io),M2=p(io),wn=s(io,"P",{});var Nc=l(wn);$2=r(Nc,`Albert 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 `),kh=s(Nc,"CODE",{});var PE=l(kh);F2=r(PE,"span start logits"),PE.forEach(t),A2=r(Nc," and "),wh=s(Nc,"CODE",{});var ZE=l(wh);E2=r(ZE,"span end logits"),ZE.forEach(t),j2=r(Nc,")."),Nc.forEach(t),x2=p(io),Rl=s(io,"P",{});var Cg=l(Rl);J2=r(Cg,"This model inherits from "),ic=s(Cg,"A",{href:!0});var GE=l(ic);z2=r(GE,"TFPreTrainedModel"),GE.forEach(t),C2=r(Cg,`. 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.)`),Cg.forEach(t),U2=p(io),Vl=s(io,"P",{});var Ug=l(Vl);I2=r(Ug,"This model is also a "),Xl=s(Ug,"A",{href:!0,rel:!0});var RE=l(Xl);N2=r(RE,"tf.keras.Model"),RE.forEach(t),W2=r(Ug,` 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.`),Ug.forEach(t),q2=p(io),k(Ls.$$.fragment,io),B2=p(io),At=s(io,"DIV",{class:!0});var Wo=l(At);k(Sl.$$.fragment,Wo),P2=p(Wo),Mn=s(Wo,"P",{});var Wc=l(Mn);Z2=r(Wc,"The "),dc=s(Wc,"A",{href:!0});var VE=l(dc);G2=r(VE,"TFAlbertForQuestionAnswering"),VE.forEach(t),R2=r(Wc," forward method, overrides the "),Mh=s(Wc,"CODE",{});var XE=l(Mh);V2=r(XE,"__call__"),XE.forEach(t),X2=r(Wc," special method."),Wc.forEach(t),S2=p(Wo),k(Ds.$$.fragment,Wo),L2=p(Wo),k(Os.$$.fragment,Wo),D2=p(Wo),k(Qs.$$.fragment,Wo),Wo.forEach(t),io.forEach(t),bf=p(o),$n=s(o,"H2",{class:!0});var Ig=l($n);Hs=s(Ig,"A",{id:!0,class:!0,href:!0});var SE=l(Hs);$h=s(SE,"SPAN",{});var LE=l($h);k(Ll.$$.fragment,LE),LE.forEach(t),SE.forEach(t),O2=p(Ig),Fh=s(Ig,"SPAN",{});var DE=l(Fh);Q2=r(DE,"FlaxAlbertModel"),DE.forEach(t),Ig.forEach(t),yf=p(o),et=s(o,"DIV",{class:!0});var jt=l(et);k(Dl.$$.fragment,jt),H2=p(jt),Ah=s(jt,"P",{});var OE=l(Ah);Y2=r(OE,"The bare Albert Model transformer outputting raw hidden-states without any specific head on top."),OE.forEach(t),K2=p(jt),Ol=s(jt,"P",{});var Ng=l(Ol);eM=r(Ng,"This model inherits from "),cc=s(Ng,"A",{href:!0});var QE=l(cc);tM=r(QE,"FlaxPreTrainedModel"),QE.forEach(t),oM=r(Ng,`. 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)`),Ng.forEach(t),nM=p(jt),Ql=s(jt,"P",{});var Wg=l(Ql);sM=r(Wg,"This model is also a Flax Linen "),Hl=s(Wg,"A",{href:!0,rel:!0});var HE=l(Hl);aM=r(HE,"flax.linen.Module"),HE.forEach(t),rM=r(Wg,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Wg.forEach(t),lM=p(jt),Eh=s(jt,"P",{});var YE=l(Eh);iM=r(YE,"Finally, this model supports inherent JAX features such as:"),YE.forEach(t),dM=p(jt),ho=s(jt,"UL",{});var xa=l(ho);jh=s(xa,"LI",{});var KE=l(jh);Yl=s(KE,"A",{href:!0,rel:!0});var ej=l(Yl);cM=r(ej,"Just-In-Time (JIT) compilation"),ej.forEach(t),KE.forEach(t),pM=p(xa),xh=s(xa,"LI",{});var tj=l(xh);Kl=s(tj,"A",{href:!0,rel:!0});var oj=l(Kl);hM=r(oj,"Automatic Differentiation"),oj.forEach(t),tj.forEach(t),mM=p(xa),Jh=s(xa,"LI",{});var nj=l(Jh);ei=s(nj,"A",{href:!0,rel:!0});var sj=l(ei);uM=r(sj,"Vectorization"),sj.forEach(t),nj.forEach(t),fM=p(xa),zh=s(xa,"LI",{});var aj=l(zh);ti=s(aj,"A",{href:!0,rel:!0});var rj=l(ti);gM=r(rj,"Parallelization"),rj.forEach(t),aj.forEach(t),xa.forEach(t),_M=p(jt),Ot=s(jt,"DIV",{class:!0});var Ja=l(Ot);k(oi.$$.fragment,Ja),bM=p(Ja),Fn=s(Ja,"P",{});var qc=l(Fn);yM=r(qc,"The "),Ch=s(qc,"CODE",{});var lj=l(Ch);TM=r(lj,"FlaxAlbertPreTrainedModel"),lj.forEach(t),vM=r(qc," forward method, overrides the "),Uh=s(qc,"CODE",{});var ij=l(Uh);kM=r(ij,"__call__"),ij.forEach(t),wM=r(qc," special method."),qc.forEach(t),MM=p(Ja),k(Ys.$$.fragment,Ja),$M=p(Ja),k(Ks.$$.fragment,Ja),Ja.forEach(t),jt.forEach(t),Tf=p(o),An=s(o,"H2",{class:!0});var qg=l(An);ea=s(qg,"A",{id:!0,class:!0,href:!0});var dj=l(ea);Ih=s(dj,"SPAN",{});var cj=l(Ih);k(ni.$$.fragment,cj),cj.forEach(t),dj.forEach(t),FM=p(qg),Nh=s(qg,"SPAN",{});var pj=l(Nh);AM=r(pj,"FlaxAlbertForPreTraining"),pj.forEach(t),qg.forEach(t),vf=p(o),tt=s(o,"DIV",{class:!0});var xt=l(tt);k(si.$$.fragment,xt),EM=p(xt),En=s(xt,"P",{});var Bc=l(En);jM=r(Bc,"Albert Model with two heads on top as done during the pretraining: a "),Wh=s(Bc,"CODE",{});var hj=l(Wh);xM=r(hj,"masked language modeling"),hj.forEach(t),JM=r(Bc,` head and a
`),qh=s(Bc,"CODE",{});var mj=l(qh);zM=r(mj,"sentence order prediction (classification)"),mj.forEach(t),CM=r(Bc," head."),Bc.forEach(t),UM=p(xt),ai=s(xt,"P",{});var Bg=l(ai);IM=r(Bg,"This model inherits from "),pc=s(Bg,"A",{href:!0});var uj=l(pc);NM=r(uj,"FlaxPreTrainedModel"),uj.forEach(t),WM=r(Bg,`. 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)`),Bg.forEach(t),qM=p(xt),ri=s(xt,"P",{});var Pg=l(ri);BM=r(Pg,"This model is also a Flax Linen "),li=s(Pg,"A",{href:!0,rel:!0});var fj=l(li);PM=r(fj,"flax.linen.Module"),fj.forEach(t),ZM=r(Pg,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Pg.forEach(t),GM=p(xt),Bh=s(xt,"P",{});var gj=l(Bh);RM=r(gj,"Finally, this model supports inherent JAX features such as:"),gj.forEach(t),VM=p(xt),mo=s(xt,"UL",{});var za=l(mo);Ph=s(za,"LI",{});var _j=l(Ph);ii=s(_j,"A",{href:!0,rel:!0});var bj=l(ii);XM=r(bj,"Just-In-Time (JIT) compilation"),bj.forEach(t),_j.forEach(t),SM=p(za),Zh=s(za,"LI",{});var yj=l(Zh);di=s(yj,"A",{href:!0,rel:!0});var Tj=l(di);LM=r(Tj,"Automatic Differentiation"),Tj.forEach(t),yj.forEach(t),DM=p(za),Gh=s(za,"LI",{});var vj=l(Gh);ci=s(vj,"A",{href:!0,rel:!0});var kj=l(ci);OM=r(kj,"Vectorization"),kj.forEach(t),vj.forEach(t),QM=p(za),Rh=s(za,"LI",{});var wj=l(Rh);pi=s(wj,"A",{href:!0,rel:!0});var Mj=l(pi);HM=r(Mj,"Parallelization"),Mj.forEach(t),wj.forEach(t),za.forEach(t),YM=p(xt),Qt=s(xt,"DIV",{class:!0});var Ca=l(Qt);k(hi.$$.fragment,Ca),KM=p(Ca),jn=s(Ca,"P",{});var Pc=l(jn);e0=r(Pc,"The "),Vh=s(Pc,"CODE",{});var $j=l(Vh);t0=r($j,"FlaxAlbertPreTrainedModel"),$j.forEach(t),o0=r(Pc," forward method, overrides the "),Xh=s(Pc,"CODE",{});var Fj=l(Xh);n0=r(Fj,"__call__"),Fj.forEach(t),s0=r(Pc," special method."),Pc.forEach(t),a0=p(Ca),k(ta.$$.fragment,Ca),r0=p(Ca),k(oa.$$.fragment,Ca),Ca.forEach(t),xt.forEach(t),kf=p(o),xn=s(o,"H2",{class:!0});var Zg=l(xn);na=s(Zg,"A",{id:!0,class:!0,href:!0});var Aj=l(na);Sh=s(Aj,"SPAN",{});var Ej=l(Sh);k(mi.$$.fragment,Ej),Ej.forEach(t),Aj.forEach(t),l0=p(Zg),Lh=s(Zg,"SPAN",{});var jj=l(Lh);i0=r(jj,"FlaxAlbertForMaskedLM"),jj.forEach(t),Zg.forEach(t),wf=p(o),ot=s(o,"DIV",{class:!0});var Jt=l(ot);k(ui.$$.fragment,Jt),d0=p(Jt),fi=s(Jt,"P",{});var Gg=l(fi);c0=r(Gg,"Albert Model with a "),Dh=s(Gg,"CODE",{});var xj=l(Dh);p0=r(xj,"language modeling"),xj.forEach(t),h0=r(Gg," head on top."),Gg.forEach(t),m0=p(Jt),gi=s(Jt,"P",{});var Rg=l(gi);u0=r(Rg,"This model inherits from "),hc=s(Rg,"A",{href:!0});var Jj=l(hc);f0=r(Jj,"FlaxPreTrainedModel"),Jj.forEach(t),g0=r(Rg,`. 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)`),Rg.forEach(t),_0=p(Jt),_i=s(Jt,"P",{});var Vg=l(_i);b0=r(Vg,"This model is also a Flax Linen "),bi=s(Vg,"A",{href:!0,rel:!0});var zj=l(bi);y0=r(zj,"flax.linen.Module"),zj.forEach(t),T0=r(Vg,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Vg.forEach(t),v0=p(Jt),Oh=s(Jt,"P",{});var Cj=l(Oh);k0=r(Cj,"Finally, this model supports inherent JAX features such as:"),Cj.forEach(t),w0=p(Jt),uo=s(Jt,"UL",{});var Ua=l(uo);Qh=s(Ua,"LI",{});var Uj=l(Qh);yi=s(Uj,"A",{href:!0,rel:!0});var Ij=l(yi);M0=r(Ij,"Just-In-Time (JIT) compilation"),Ij.forEach(t),Uj.forEach(t),$0=p(Ua),Hh=s(Ua,"LI",{});var Nj=l(Hh);Ti=s(Nj,"A",{href:!0,rel:!0});var Wj=l(Ti);F0=r(Wj,"Automatic Differentiation"),Wj.forEach(t),Nj.forEach(t),A0=p(Ua),Yh=s(Ua,"LI",{});var qj=l(Yh);vi=s(qj,"A",{href:!0,rel:!0});var Bj=l(vi);E0=r(Bj,"Vectorization"),Bj.forEach(t),qj.forEach(t),j0=p(Ua),Kh=s(Ua,"LI",{});var Pj=l(Kh);ki=s(Pj,"A",{href:!0,rel:!0});var Zj=l(ki);x0=r(Zj,"Parallelization"),Zj.forEach(t),Pj.forEach(t),Ua.forEach(t),J0=p(Jt),Ht=s(Jt,"DIV",{class:!0});var Ia=l(Ht);k(wi.$$.fragment,Ia),z0=p(Ia),Jn=s(Ia,"P",{});var Zc=l(Jn);C0=r(Zc,"The "),em=s(Zc,"CODE",{});var Gj=l(em);U0=r(Gj,"FlaxAlbertPreTrainedModel"),Gj.forEach(t),I0=r(Zc," forward method, overrides the "),tm=s(Zc,"CODE",{});var Rj=l(tm);N0=r(Rj,"__call__"),Rj.forEach(t),W0=r(Zc," special method."),Zc.forEach(t),q0=p(Ia),k(sa.$$.fragment,Ia),B0=p(Ia),k(aa.$$.fragment,Ia),Ia.forEach(t),Jt.forEach(t),Mf=p(o),zn=s(o,"H2",{class:!0});var Xg=l(zn);ra=s(Xg,"A",{id:!0,class:!0,href:!0});var Vj=l(ra);om=s(Vj,"SPAN",{});var Xj=l(om);k(Mi.$$.fragment,Xj),Xj.forEach(t),Vj.forEach(t),P0=p(Xg),nm=s(Xg,"SPAN",{});var Sj=l(nm);Z0=r(Sj,"FlaxAlbertForSequenceClassification"),Sj.forEach(t),Xg.forEach(t),$f=p(o),nt=s(o,"DIV",{class:!0});var zt=l(nt);k($i.$$.fragment,zt),G0=p(zt),sm=s(zt,"P",{});var Lj=l(sm);R0=r(Lj,`Albert Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),Lj.forEach(t),V0=p(zt),Fi=s(zt,"P",{});var Sg=l(Fi);X0=r(Sg,"This model inherits from "),mc=s(Sg,"A",{href:!0});var Dj=l(mc);S0=r(Dj,"FlaxPreTrainedModel"),Dj.forEach(t),L0=r(Sg,`. 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)`),Sg.forEach(t),D0=p(zt),Ai=s(zt,"P",{});var Lg=l(Ai);O0=r(Lg,"This model is also a Flax Linen "),Ei=s(Lg,"A",{href:!0,rel:!0});var Oj=l(Ei);Q0=r(Oj,"flax.linen.Module"),Oj.forEach(t),H0=r(Lg,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Lg.forEach(t),Y0=p(zt),am=s(zt,"P",{});var Qj=l(am);K0=r(Qj,"Finally, this model supports inherent JAX features such as:"),Qj.forEach(t),e1=p(zt),fo=s(zt,"UL",{});var Na=l(fo);rm=s(Na,"LI",{});var Hj=l(rm);ji=s(Hj,"A",{href:!0,rel:!0});var Yj=l(ji);t1=r(Yj,"Just-In-Time (JIT) compilation"),Yj.forEach(t),Hj.forEach(t),o1=p(Na),lm=s(Na,"LI",{});var Kj=l(lm);xi=s(Kj,"A",{href:!0,rel:!0});var ex=l(xi);n1=r(ex,"Automatic Differentiation"),ex.forEach(t),Kj.forEach(t),s1=p(Na),im=s(Na,"LI",{});var tx=l(im);Ji=s(tx,"A",{href:!0,rel:!0});var ox=l(Ji);a1=r(ox,"Vectorization"),ox.forEach(t),tx.forEach(t),r1=p(Na),dm=s(Na,"LI",{});var nx=l(dm);zi=s(nx,"A",{href:!0,rel:!0});var sx=l(zi);l1=r(sx,"Parallelization"),sx.forEach(t),nx.forEach(t),Na.forEach(t),i1=p(zt),Yt=s(zt,"DIV",{class:!0});var Wa=l(Yt);k(Ci.$$.fragment,Wa),d1=p(Wa),Cn=s(Wa,"P",{});var Gc=l(Cn);c1=r(Gc,"The "),cm=s(Gc,"CODE",{});var ax=l(cm);p1=r(ax,"FlaxAlbertPreTrainedModel"),ax.forEach(t),h1=r(Gc," forward method, overrides the "),pm=s(Gc,"CODE",{});var rx=l(pm);m1=r(rx,"__call__"),rx.forEach(t),u1=r(Gc," special method."),Gc.forEach(t),f1=p(Wa),k(la.$$.fragment,Wa),g1=p(Wa),k(ia.$$.fragment,Wa),Wa.forEach(t),zt.forEach(t),Ff=p(o),Un=s(o,"H2",{class:!0});var Dg=l(Un);da=s(Dg,"A",{id:!0,class:!0,href:!0});var lx=l(da);hm=s(lx,"SPAN",{});var ix=l(hm);k(Ui.$$.fragment,ix),ix.forEach(t),lx.forEach(t),_1=p(Dg),mm=s(Dg,"SPAN",{});var dx=l(mm);b1=r(dx,"FlaxAlbertForMultipleChoice"),dx.forEach(t),Dg.forEach(t),Af=p(o),st=s(o,"DIV",{class:!0});var Ct=l(st);k(Ii.$$.fragment,Ct),y1=p(Ct),um=s(Ct,"P",{});var cx=l(um);T1=r(cx,`Albert 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.`),cx.forEach(t),v1=p(Ct),Ni=s(Ct,"P",{});var Og=l(Ni);k1=r(Og,"This model inherits from "),uc=s(Og,"A",{href:!0});var px=l(uc);w1=r(px,"FlaxPreTrainedModel"),px.forEach(t),M1=r(Og,`. 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)`),Og.forEach(t),$1=p(Ct),Wi=s(Ct,"P",{});var Qg=l(Wi);F1=r(Qg,"This model is also a Flax Linen "),qi=s(Qg,"A",{href:!0,rel:!0});var hx=l(qi);A1=r(hx,"flax.linen.Module"),hx.forEach(t),E1=r(Qg,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Qg.forEach(t),j1=p(Ct),fm=s(Ct,"P",{});var mx=l(fm);x1=r(mx,"Finally, this model supports inherent JAX features such as:"),mx.forEach(t),J1=p(Ct),go=s(Ct,"UL",{});var qa=l(go);gm=s(qa,"LI",{});var ux=l(gm);Bi=s(ux,"A",{href:!0,rel:!0});var fx=l(Bi);z1=r(fx,"Just-In-Time (JIT) compilation"),fx.forEach(t),ux.forEach(t),C1=p(qa),_m=s(qa,"LI",{});var gx=l(_m);Pi=s(gx,"A",{href:!0,rel:!0});var _x=l(Pi);U1=r(_x,"Automatic Differentiation"),_x.forEach(t),gx.forEach(t),I1=p(qa),bm=s(qa,"LI",{});var bx=l(bm);Zi=s(bx,"A",{href:!0,rel:!0});var yx=l(Zi);N1=r(yx,"Vectorization"),yx.forEach(t),bx.forEach(t),W1=p(qa),ym=s(qa,"LI",{});var Tx=l(ym);Gi=s(Tx,"A",{href:!0,rel:!0});var vx=l(Gi);q1=r(vx,"Parallelization"),vx.forEach(t),Tx.forEach(t),qa.forEach(t),B1=p(Ct),Kt=s(Ct,"DIV",{class:!0});var Ba=l(Kt);k(Ri.$$.fragment,Ba),P1=p(Ba),In=s(Ba,"P",{});var Rc=l(In);Z1=r(Rc,"The "),Tm=s(Rc,"CODE",{});var kx=l(Tm);G1=r(kx,"FlaxAlbertPreTrainedModel"),kx.forEach(t),R1=r(Rc," forward method, overrides the "),vm=s(Rc,"CODE",{});var wx=l(vm);V1=r(wx,"__call__"),wx.forEach(t),X1=r(Rc," special method."),Rc.forEach(t),S1=p(Ba),k(ca.$$.fragment,Ba),L1=p(Ba),k(pa.$$.fragment,Ba),Ba.forEach(t),Ct.forEach(t),Ef=p(o),Nn=s(o,"H2",{class:!0});var Hg=l(Nn);ha=s(Hg,"A",{id:!0,class:!0,href:!0});var Mx=l(ha);km=s(Mx,"SPAN",{});var $x=l(km);k(Vi.$$.fragment,$x),$x.forEach(t),Mx.forEach(t),D1=p(Hg),wm=s(Hg,"SPAN",{});var Fx=l(wm);O1=r(Fx,"FlaxAlbertForTokenClassification"),Fx.forEach(t),Hg.forEach(t),jf=p(o),at=s(o,"DIV",{class:!0});var Ut=l(at);k(Xi.$$.fragment,Ut),Q1=p(Ut),Mm=s(Ut,"P",{});var Ax=l(Mm);H1=r(Ax,`Albert 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.`),Ax.forEach(t),Y1=p(Ut),Si=s(Ut,"P",{});var Yg=l(Si);K1=r(Yg,"This model inherits from "),fc=s(Yg,"A",{href:!0});var Ex=l(fc);e$=r(Ex,"FlaxPreTrainedModel"),Ex.forEach(t),t$=r(Yg,`. 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)`),Yg.forEach(t),o$=p(Ut),Li=s(Ut,"P",{});var Kg=l(Li);n$=r(Kg,"This model is also a Flax Linen "),Di=s(Kg,"A",{href:!0,rel:!0});var jx=l(Di);s$=r(jx,"flax.linen.Module"),jx.forEach(t),a$=r(Kg,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Kg.forEach(t),r$=p(Ut),$m=s(Ut,"P",{});var xx=l($m);l$=r(xx,"Finally, this model supports inherent JAX features such as:"),xx.forEach(t),i$=p(Ut),_o=s(Ut,"UL",{});var Pa=l(_o);Fm=s(Pa,"LI",{});var Jx=l(Fm);Oi=s(Jx,"A",{href:!0,rel:!0});var zx=l(Oi);d$=r(zx,"Just-In-Time (JIT) compilation"),zx.forEach(t),Jx.forEach(t),c$=p(Pa),Am=s(Pa,"LI",{});var Cx=l(Am);Qi=s(Cx,"A",{href:!0,rel:!0});var Ux=l(Qi);p$=r(Ux,"Automatic Differentiation"),Ux.forEach(t),Cx.forEach(t),h$=p(Pa),Em=s(Pa,"LI",{});var Ix=l(Em);Hi=s(Ix,"A",{href:!0,rel:!0});var Nx=l(Hi);m$=r(Nx,"Vectorization"),Nx.forEach(t),Ix.forEach(t),u$=p(Pa),jm=s(Pa,"LI",{});var Wx=l(jm);Yi=s(Wx,"A",{href:!0,rel:!0});var qx=l(Yi);f$=r(qx,"Parallelization"),qx.forEach(t),Wx.forEach(t),Pa.forEach(t),g$=p(Ut),eo=s(Ut,"DIV",{class:!0});var Za=l(eo);k(Ki.$$.fragment,Za),_$=p(Za),Wn=s(Za,"P",{});var Vc=l(Wn);b$=r(Vc,"The "),xm=s(Vc,"CODE",{});var Bx=l(xm);y$=r(Bx,"FlaxAlbertPreTrainedModel"),Bx.forEach(t),T$=r(Vc," forward method, overrides the "),Jm=s(Vc,"CODE",{});var Px=l(Jm);v$=r(Px,"__call__"),Px.forEach(t),k$=r(Vc," special method."),Vc.forEach(t),w$=p(Za),k(ma.$$.fragment,Za),M$=p(Za),k(ua.$$.fragment,Za),Za.forEach(t),Ut.forEach(t),xf=p(o),qn=s(o,"H2",{class:!0});var e_=l(qn);fa=s(e_,"A",{id:!0,class:!0,href:!0});var Zx=l(fa);zm=s(Zx,"SPAN",{});var Gx=l(zm);k(ed.$$.fragment,Gx),Gx.forEach(t),Zx.forEach(t),$$=p(e_),Cm=s(e_,"SPAN",{});var Rx=l(Cm);F$=r(Rx,"FlaxAlbertForQuestionAnswering"),Rx.forEach(t),e_.forEach(t),Jf=p(o),rt=s(o,"DIV",{class:!0});var It=l(rt);k(td.$$.fragment,It),A$=p(It),Bn=s(It,"P",{});var Xc=l(Bn);E$=r(Xc,`Albert 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 `),Um=s(Xc,"CODE",{});var Vx=l(Um);j$=r(Vx,"span start logits"),Vx.forEach(t),x$=r(Xc," and "),Im=s(Xc,"CODE",{});var Xx=l(Im);J$=r(Xx,"span end logits"),Xx.forEach(t),z$=r(Xc,")."),Xc.forEach(t),C$=p(It),od=s(It,"P",{});var t_=l(od);U$=r(t_,"This model inherits from "),gc=s(t_,"A",{href:!0});var Sx=l(gc);I$=r(Sx,"FlaxPreTrainedModel"),Sx.forEach(t),N$=r(t_,`. 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)`),t_.forEach(t),W$=p(It),nd=s(It,"P",{});var o_=l(nd);q$=r(o_,"This model is also a Flax Linen "),sd=s(o_,"A",{href:!0,rel:!0});var Lx=l(sd);B$=r(Lx,"flax.linen.Module"),Lx.forEach(t),P$=r(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.`),o_.forEach(t),Z$=p(It),Nm=s(It,"P",{});var Dx=l(Nm);G$=r(Dx,"Finally, this model supports inherent JAX features such as:"),Dx.forEach(t),R$=p(It),bo=s(It,"UL",{});var Ga=l(bo);Wm=s(Ga,"LI",{});var Ox=l(Wm);ad=s(Ox,"A",{href:!0,rel:!0});var Qx=l(ad);V$=r(Qx,"Just-In-Time (JIT) compilation"),Qx.forEach(t),Ox.forEach(t),X$=p(Ga),qm=s(Ga,"LI",{});var Hx=l(qm);rd=s(Hx,"A",{href:!0,rel:!0});var Yx=l(rd);S$=r(Yx,"Automatic Differentiation"),Yx.forEach(t),Hx.forEach(t),L$=p(Ga),Bm=s(Ga,"LI",{});var Kx=l(Bm);ld=s(Kx,"A",{href:!0,rel:!0});var e3=l(ld);D$=r(e3,"Vectorization"),e3.forEach(t),Kx.forEach(t),O$=p(Ga),Pm=s(Ga,"LI",{});var t3=l(Pm);id=s(t3,"A",{href:!0,rel:!0});var o3=l(id);Q$=r(o3,"Parallelization"),o3.forEach(t),t3.forEach(t),Ga.forEach(t),H$=p(It),to=s(It,"DIV",{class:!0});var Ra=l(to);k(dd.$$.fragment,Ra),Y$=p(Ra),Pn=s(Ra,"P",{});var Sc=l(Pn);K$=r(Sc,"The "),Zm=s(Sc,"CODE",{});var n3=l(Zm);eF=r(n3,"FlaxAlbertPreTrainedModel"),n3.forEach(t),tF=r(Sc," forward method, overrides the "),Gm=s(Sc,"CODE",{});var s3=l(Gm);oF=r(s3,"__call__"),s3.forEach(t),nF=r(Sc," special method."),Sc.forEach(t),sF=p(Ra),k(ga.$$.fragment,Ra),aF=p(Ra),k(_a.$$.fragment,Ra),Ra.forEach(t),It.forEach(t),this.h()},h(){u(d,"name","hf:doc:metadata"),u(d,"content",JSON.stringify(g4)),u(f,"id","albert"),u(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"),u(f,"href","#albert"),u(m,"class","relative group"),u(K,"alt","Models"),a3(K.src,A="https://img.shields.io/badge/All_model_pages-albert-blueviolet")||u(K,"src",A),u(de,"href","https://huggingface.co/models?filter=albert"),u(ce,"alt","Spaces"),a3(ce.src,Ue="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||u(ce,"src",Ue),u(V,"href","https://huggingface.co/spaces/docs-demos/albert-base-v2"),u(Z,"class","flex flex-wrap space-x-1"),u(ae,"id","overview"),u(ae,"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"),u(ae,"href","#overview"),u(se,"class","relative group"),u(ie,"href","https://arxiv.org/abs/1909.11942"),u(ie,"rel","nofollow"),u(Pe,"href","https://huggingface.co/lysandre"),u(Pe,"rel","nofollow"),u(Ze,"href","https://huggingface.co/kamalkraj"),u(Ze,"rel","nofollow"),u(R,"href","https://github.com/google-research/ALBERT"),u(R,"rel","nofollow"),u(Be,"id","documentation-resources"),u(Be,"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"),u(Be,"href","#documentation-resources"),u(Ie,"class","relative group"),u(bd,"href","../tasks/sequence_classification"),u(yd,"href","../tasks/token_classification"),u(Td,"href","../tasks/question_answering"),u(vd,"href","../tasks/masked_language_modeling"),u(kd,"href","../tasks/multiple_choice"),u(Gn,"id","transformers.AlbertConfig"),u(Gn,"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"),u(Gn,"href","#transformers.AlbertConfig"),u(qo,"class","relative group"),u(wd,"href","/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertModel"),u(Md,"href","/docs/transformers/v4.32.0/en/model_doc/albert#transformers.TFAlbertModel"),u(Sa,"href","https://huggingface.co/albert-xxlarge-v2"),u(Sa,"rel","nofollow"),u($d,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),u(Fd,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),u(Nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Vn,"id","transformers.AlbertTokenizer"),u(Vn,"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"),u(Vn,"href","#transformers.AlbertTokenizer"),u(Po,"class","relative group"),u(Qa,"href","https://github.com/google/sentencepiece"),u(Qa,"rel","nofollow"),u(Ad,"href","/docs/transformers/v4.32.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),u(wo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Xn,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(xd,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ln,"id","transformers.AlbertTokenizerFast"),u(Ln,"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"),u(Ln,"href","#transformers.AlbertTokenizerFast"),u(Go,"class","relative group"),u(rr,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=unigram#models"),u(rr,"rel","nofollow"),u(Jd,"href","/docs/transformers/v4.32.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),u(Mo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(On,"id","transformers.models.albert.modeling_albert.AlbertForPreTrainingOutput"),u(On,"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"),u(On,"href","#transformers.models.albert.modeling_albert.AlbertForPreTrainingOutput"),u(Ro,"class","relative group"),u(Ud,"href","/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertForPreTraining"),u(Vo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Id,"href","/docs/transformers/v4.32.0/en/model_doc/albert#transformers.TFAlbertForPreTraining"),u(Xo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Qn,"id","transformers.AlbertModel"),u(Qn,"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"),u(Qn,"href","#transformers.AlbertModel"),u(So,"class","relative group"),u(Nd,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),u(yr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(yr,"rel","nofollow"),u(Wd,"href","/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertModel"),u(Zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Kn,"id","transformers.AlbertForPreTraining"),u(Kn,"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"),u(Kn,"href","#transformers.AlbertForPreTraining"),u(Do,"class","relative group"),u(qd,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),u($r,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u($r,"rel","nofollow"),u(Bd,"href","/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertForPreTraining"),u(Gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(os,"id","transformers.AlbertForMaskedLM"),u(os,"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"),u(os,"href","#transformers.AlbertForMaskedLM"),u(Ho,"class","relative group"),u(Pd,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),u(zr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(zr,"rel","nofollow"),u(Zd,"href","/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertForMaskedLM"),u(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(rs,"id","transformers.AlbertForSequenceClassification"),u(rs,"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"),u(rs,"href","#transformers.AlbertForSequenceClassification"),u(Ko,"class","relative group"),u(Gd,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),u(qr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(qr,"rel","nofollow"),u(Rd,"href","/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertForSequenceClassification"),u(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(cs,"id","transformers.AlbertForMultipleChoice"),u(cs,"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"),u(cs,"href","#transformers.AlbertForMultipleChoice"),u(tn,"class","relative group"),u(Vd,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),u(Vr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Vr,"rel","nofollow"),u(Xd,"href","/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertForMultipleChoice"),u(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ms,"id","transformers.AlbertForTokenClassification"),u(ms,"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"),u(ms,"href","#transformers.AlbertForTokenClassification"),u(nn,"class","relative group"),u(Sd,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),u(Qr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Qr,"rel","nofollow"),u(Ld,"href","/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertForTokenClassification"),u(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(gs,"id","transformers.AlbertForQuestionAnswering"),u(gs,"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"),u(gs,"href","#transformers.AlbertForQuestionAnswering"),u(an,"class","relative group"),u(Dd,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),u(ol,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(ol,"rel","nofollow"),u(Od,"href","/docs/transformers/v4.32.0/en/model_doc/albert#transformers.AlbertForQuestionAnswering"),u(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ys,"id","transformers.TFAlbertModel"),u(ys,"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"),u(ys,"href","#transformers.TFAlbertModel"),u(dn,"class","relative group"),u(Qd,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(il,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(il,"rel","nofollow"),u(Hd,"href","/docs/transformers/v4.32.0/en/model_doc/albert#transformers.TFAlbertModel"),u(St,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ws,"id","transformers.TFAlbertForPreTraining"),u(ws,"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"),u(ws,"href","#transformers.TFAlbertForPreTraining"),u(pn,"class","relative group"),u(Yd,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(ul,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(ul,"rel","nofollow"),u(Kd,"href","/docs/transformers/v4.32.0/en/model_doc/albert#transformers.TFAlbertForPreTraining"),u(Lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(As,"id","transformers.TFAlbertForMaskedLM"),u(As,"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"),u(As,"href","#transformers.TFAlbertForMaskedLM"),u(un,"class","relative group"),u(ec,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(vl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(vl,"rel","nofollow"),u(tc,"href","/docs/transformers/v4.32.0/en/model_doc/albert#transformers.TFAlbertForMaskedLM"),u(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(zs,"id","transformers.TFAlbertForSequenceClassification"),u(zs,"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"),u(zs,"href","#transformers.TFAlbertForSequenceClassification"),u(gn,"class","relative group"),u(oc,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(Al,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Al,"rel","nofollow"),u(nc,"href","/docs/transformers/v4.32.0/en/model_doc/albert#transformers.TFAlbertForSequenceClassification"),u($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ws,"id","transformers.TFAlbertForMultipleChoice"),u(Ws,"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"),u(Ws,"href","#transformers.TFAlbertForMultipleChoice"),u(bn,"class","relative group"),u(sc,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(Cl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Cl,"rel","nofollow"),u(ac,"href","/docs/transformers/v4.32.0/en/model_doc/albert#transformers.TFAlbertForMultipleChoice"),u(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Zs,"id","transformers.TFAlbertForTokenClassification"),u(Zs,"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"),u(Zs,"href","#transformers.TFAlbertForTokenClassification"),u(Tn,"class","relative group"),u(rc,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(Bl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Bl,"rel","nofollow"),u(lc,"href","/docs/transformers/v4.32.0/en/model_doc/albert#transformers.TFAlbertForTokenClassification"),u(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ss,"id","transformers.TFAlbertForQuestionAnswering"),u(Ss,"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"),u(Ss,"href","#transformers.TFAlbertForQuestionAnswering"),u(kn,"class","relative group"),u(ic,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(Xl,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Xl,"rel","nofollow"),u(dc,"href","/docs/transformers/v4.32.0/en/model_doc/albert#transformers.TFAlbertForQuestionAnswering"),u(At,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Hs,"id","transformers.FlaxAlbertModel"),u(Hs,"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"),u(Hs,"href","#transformers.FlaxAlbertModel"),u($n,"class","relative group"),u(cc,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(Hl,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),u(Hl,"rel","nofollow"),u(Yl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(Yl,"rel","nofollow"),u(Kl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(Kl,"rel","nofollow"),u(ei,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(ei,"rel","nofollow"),u(ti,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(ti,"rel","nofollow"),u(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ea,"id","transformers.FlaxAlbertForPreTraining"),u(ea,"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"),u(ea,"href","#transformers.FlaxAlbertForPreTraining"),u(An,"class","relative group"),u(pc,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(li,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),u(li,"rel","nofollow"),u(ii,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(ii,"rel","nofollow"),u(di,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(di,"rel","nofollow"),u(ci,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(ci,"rel","nofollow"),u(pi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(pi,"rel","nofollow"),u(Qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(na,"id","transformers.FlaxAlbertForMaskedLM"),u(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"),u(na,"href","#transformers.FlaxAlbertForMaskedLM"),u(xn,"class","relative group"),u(hc,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(bi,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),u(bi,"rel","nofollow"),u(yi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(yi,"rel","nofollow"),u(Ti,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(Ti,"rel","nofollow"),u(vi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(vi,"rel","nofollow"),u(ki,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(ki,"rel","nofollow"),u(Ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ra,"id","transformers.FlaxAlbertForSequenceClassification"),u(ra,"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"),u(ra,"href","#transformers.FlaxAlbertForSequenceClassification"),u(zn,"class","relative group"),u(mc,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(Ei,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),u(Ei,"rel","nofollow"),u(ji,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(ji,"rel","nofollow"),u(xi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(xi,"rel","nofollow"),u(Ji,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(Ji,"rel","nofollow"),u(zi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(zi,"rel","nofollow"),u(Yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(da,"id","transformers.FlaxAlbertForMultipleChoice"),u(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"),u(da,"href","#transformers.FlaxAlbertForMultipleChoice"),u(Un,"class","relative group"),u(uc,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(qi,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),u(qi,"rel","nofollow"),u(Bi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(Bi,"rel","nofollow"),u(Pi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(Pi,"rel","nofollow"),u(Zi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(Zi,"rel","nofollow"),u(Gi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(Gi,"rel","nofollow"),u(Kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ha,"id","transformers.FlaxAlbertForTokenClassification"),u(ha,"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"),u(ha,"href","#transformers.FlaxAlbertForTokenClassification"),u(Nn,"class","relative group"),u(fc,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(Di,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),u(Di,"rel","nofollow"),u(Oi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(Oi,"rel","nofollow"),u(Qi,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(Qi,"rel","nofollow"),u(Hi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(Hi,"rel","nofollow"),u(Yi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(Yi,"rel","nofollow"),u(eo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(fa,"id","transformers.FlaxAlbertForQuestionAnswering"),u(fa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(fa,"href","#transformers.FlaxAlbertForQuestionAnswering"),u(qn,"class","relative group"),u(gc,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(sd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),u(sd,"rel","nofollow"),u(ad,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(ad,"rel","nofollow"),u(rd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(rd,"rel","nofollow"),u(ld,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(ld,"rel","nofollow"),u(id,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(id,"rel","nofollow"),u(to,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,_){e(document.head,d),g(o,y,_),g(o,m,_),e(m,f),e(f,b),w(i,b,null),e(m,h),e(m,j),e(j,Me),g(o,ye,_),g(o,Z,_),e(Z,de),e(de,K),e(Z,$e),e(Z,V),e(V,ce),g(o,O,_),g(o,se,_),e(se,ae),e(ae,X),w(le,X,null),e(se,Fe),e(se,S),e(S,Ae),g(o,Te,_),g(o,G,_),e(G,Ee),e(G,ie),e(ie,ee),e(G,z),g(o,U,_),g(o,re,_),e(re,L),e(L,je),e(re,xe),e(re,D),e(D,Je),g(o,ve,_),g(o,C,_),e(C,ze),g(o,Q,_),g(o,pe,_),e(pe,me),e(me,Y),g(o,ke,_),g(o,he,_),e(he,B),g(o,we,_),g(o,W,_),e(W,ue),e(ue,te),e(W,I),e(W,fe),e(fe,N),e(W,Ce),e(W,ge),e(ge,T),e(W,x),e(W,Xe),e(Xe,oe),g(o,Le,_),g(o,_e,_),e(_e,J),e(_e,Pe),e(Pe,De),e(_e,Oe),e(_e,Ze),e(Ze,Qe),e(_e,P),e(_e,R),e(R,He),e(_e,Ye),g(o,H,_),g(o,Ie,_),e(Ie,Be),e(Be,be),w(Ge,be,null),e(Ie,ne),e(Ie,Se),e(Se,n_),g(o,Cu,_),g(o,vt,_),e(vt,Lc),e(Lc,bd),e(bd,s_),e(vt,a_),e(vt,Dc),e(Dc,yd),e(yd,r_),e(vt,l_),e(vt,Oc),e(Oc,Td),e(Td,i_),e(vt,d_),e(vt,Qc),e(Qc,vd),e(vd,c_),e(vt,p_),e(vt,Hc),e(Hc,kd),e(kd,h_),g(o,Uu,_),g(o,qo,_),e(qo,Gn),e(Gn,Yc),w(Va,Yc,null),e(qo,m_),e(qo,Kc),e(Kc,u_),g(o,Iu,_),g(o,Nt,_),w(Xa,Nt,null),e(Nt,f_),e(Nt,co),e(co,g_),e(co,wd),e(wd,__),e(co,b_),e(co,Md),e(Md,y_),e(co,T_),e(co,Sa),e(Sa,v_),e(co,k_),e(Nt,w_),e(Nt,Bo),e(Bo,M_),e(Bo,$d),e($d,$_),e(Bo,F_),e(Bo,Fd),e(Fd,A_),e(Bo,E_),e(Nt,j_),w(Rn,Nt,null),g(o,Nu,_),g(o,Po,_),e(Po,Vn),e(Vn,ep),w(La,ep,null),e(Po,x_),e(Po,tp),e(tp,J_),g(o,Wu,_),g(o,Ke,_),w(Da,Ke,null),e(Ke,z_),e(Ke,Oa),e(Oa,C_),e(Oa,Qa),e(Qa,U_),e(Oa,I_),e(Ke,N_),e(Ke,Ha),e(Ha,W_),e(Ha,Ad),e(Ad,q_),e(Ha,B_),e(Ke,P_),e(Ke,wo),w(Ya,wo,null),e(wo,Z_),e(wo,op),e(op,G_),e(wo,R_),e(wo,Ka),e(Ka,Ed),e(Ed,V_),e(Ed,np),e(np,X_),e(Ka,S_),e(Ka,jd),e(jd,L_),e(jd,sp),e(sp,D_),e(Ke,O_),e(Ke,Xn),w(er,Xn,null),e(Xn,Q_),e(Xn,tr),e(tr,H_),e(tr,ap),e(ap,Y_),e(tr,K_),e(Ke,eb),e(Ke,Bt),w(or,Bt,null),e(Bt,tb),e(Bt,rp),e(rp,ob),e(Bt,nb),w(Sn,Bt,null),e(Bt,sb),e(Bt,Zo),e(Zo,ab),e(Zo,lp),e(lp,rb),e(Zo,lb),e(Zo,ip),e(ip,ib),e(Zo,db),e(Ke,cb),e(Ke,xd),w(nr,xd,null),g(o,qu,_),g(o,Go,_),e(Go,Ln),e(Ln,dp),w(sr,dp,null),e(Go,pb),e(Go,cp),e(cp,hb),g(o,Bu,_),g(o,Wt,_),w(ar,Wt,null),e(Wt,mb),e(Wt,po),e(po,ub),e(po,pp),e(pp,fb),e(po,gb),e(po,rr),e(rr,_b),e(po,bb),e(po,Jd),e(Jd,yb),e(po,Tb),e(Wt,vb),e(Wt,Mo),w(lr,Mo,null),e(Mo,kb),e(Mo,hp),e(hp,wb),e(Mo,Mb),e(Mo,ir),e(ir,zd),e(zd,$b),e(zd,mp),e(mp,Fb),e(ir,Ab),e(ir,Cd),e(Cd,Eb),e(Cd,up),e(up,jb),e(Wt,xb),e(Wt,Pt),w(dr,Pt,null),e(Pt,Jb),e(Pt,fp),e(fp,zb),e(Pt,Cb),w(Dn,Pt,null),e(Pt,Ub),e(Pt,gp),e(gp,Ib),g(o,Pu,_),g(o,Ro,_),e(Ro,On),e(On,_p),w(cr,_p,null),e(Ro,Nb),e(Ro,bp),e(bp,Wb),g(o,Zu,_),g(o,Vo,_),w(pr,Vo,null),e(Vo,qb),e(Vo,hr),e(hr,Bb),e(hr,Ud),e(Ud,Pb),e(hr,Zb),g(o,Gu,_),g(o,Xo,_),w(mr,Xo,null),e(Xo,Gb),e(Xo,ur),e(ur,Rb),e(ur,Id),e(Id,Vb),e(ur,Xb),g(o,Ru,_),g(o,So,_),e(So,Qn),e(Qn,yp),w(fr,yp,null),e(So,Sb),e(So,Tp),e(Tp,Lb),g(o,Vu,_),g(o,ut,_),w(gr,ut,null),e(ut,Db),e(ut,vp),e(vp,Ob),e(ut,Qb),e(ut,_r),e(_r,Hb),e(_r,Nd),e(Nd,Yb),e(_r,Kb),e(ut,ey),e(ut,br),e(br,ty),e(br,yr),e(yr,oy),e(br,ny),e(ut,sy),e(ut,Zt),w(Tr,Zt,null),e(Zt,ay),e(Zt,Lo),e(Lo,ry),e(Lo,Wd),e(Wd,ly),e(Lo,iy),e(Lo,kp),e(kp,dy),e(Lo,cy),e(Zt,py),w(Hn,Zt,null),e(Zt,hy),w(Yn,Zt,null),g(o,Xu,_),g(o,Do,_),e(Do,Kn),e(Kn,wp),w(vr,wp,null),e(Do,my),e(Do,Mp),e(Mp,uy),g(o,Su,_),g(o,ft,_),w(kr,ft,null),e(ft,fy),e(ft,Oo),e(Oo,gy),e(Oo,$p),e($p,_y),e(Oo,by),e(Oo,Fp),e(Fp,yy),e(Oo,Ty),e(ft,vy),e(ft,wr),e(wr,ky),e(wr,qd),e(qd,wy),e(wr,My),e(ft,$y),e(ft,Mr),e(Mr,Fy),e(Mr,$r),e($r,Ay),e(Mr,Ey),e(ft,jy),e(ft,Gt),w(Fr,Gt,null),e(Gt,xy),e(Gt,Qo),e(Qo,Jy),e(Qo,Bd),e(Bd,zy),e(Qo,Cy),e(Qo,Ap),e(Ap,Uy),e(Qo,Iy),e(Gt,Ny),w(es,Gt,null),e(Gt,Wy),w(ts,Gt,null),g(o,Lu,_),g(o,Ho,_),e(Ho,os),e(os,Ep),w(Ar,Ep,null),e(Ho,qy),e(Ho,jp),e(jp,By),g(o,Du,_),g(o,gt,_),w(Er,gt,null),e(gt,Py),e(gt,jr),e(jr,Zy),e(jr,xp),e(xp,Gy),e(jr,Ry),e(gt,Vy),e(gt,xr),e(xr,Xy),e(xr,Pd),e(Pd,Sy),e(xr,Ly),e(gt,Dy),e(gt,Jr),e(Jr,Oy),e(Jr,zr),e(zr,Qy),e(Jr,Hy),e(gt,Yy),e(gt,kt),w(Cr,kt,null),e(kt,Ky),e(kt,Yo),e(Yo,eT),e(Yo,Zd),e(Zd,tT),e(Yo,oT),e(Yo,Jp),e(Jp,nT),e(Yo,sT),e(kt,aT),w(ns,kt,null),e(kt,rT),w(ss,kt,null),e(kt,lT),w(as,kt,null),g(o,Ou,_),g(o,Ko,_),e(Ko,rs),e(rs,zp),w(Ur,zp,null),e(Ko,iT),e(Ko,Cp),e(Cp,dT),g(o,Qu,_),g(o,_t,_),w(Ir,_t,null),e(_t,cT),e(_t,Up),e(Up,pT),e(_t,hT),e(_t,Nr),e(Nr,mT),e(Nr,Gd),e(Gd,uT),e(Nr,fT),e(_t,gT),e(_t,Wr),e(Wr,_T),e(Wr,qr),e(qr,bT),e(Wr,yT),e(_t,TT),e(_t,wt),w(Br,wt,null),e(wt,vT),e(wt,en),e(en,kT),e(en,Rd),e(Rd,wT),e(en,MT),e(en,Ip),e(Ip,$T),e(en,FT),e(wt,AT),w(ls,wt,null),e(wt,ET),w(is,wt,null),e(wt,jT),w(ds,wt,null),g(o,Hu,_),g(o,tn,_),e(tn,cs),e(cs,Np),w(Pr,Np,null),e(tn,xT),e(tn,Wp),e(Wp,JT),g(o,Yu,_),g(o,bt,_),w(Zr,bt,null),e(bt,zT),e(bt,qp),e(qp,CT),e(bt,UT),e(bt,Gr),e(Gr,IT),e(Gr,Vd),e(Vd,NT),e(Gr,WT),e(bt,qT),e(bt,Rr),e(Rr,BT),e(Rr,Vr),e(Vr,PT),e(Rr,ZT),e(bt,GT),e(bt,Rt),w(Xr,Rt,null),e(Rt,RT),e(Rt,on),e(on,VT),e(on,Xd),e(Xd,XT),e(on,ST),e(on,Bp),e(Bp,LT),e(on,DT),e(Rt,OT),w(ps,Rt,null),e(Rt,QT),w(hs,Rt,null),g(o,Ku,_),g(o,nn,_),e(nn,ms),e(ms,Pp),w(Sr,Pp,null),e(nn,HT),e(nn,Zp),e(Zp,YT),g(o,ef,_),g(o,yt,_),w(Lr,yt,null),e(yt,KT),e(yt,Gp),e(Gp,ev),e(yt,tv),e(yt,Dr),e(Dr,ov),e(Dr,Sd),e(Sd,nv),e(Dr,sv),e(yt,av),e(yt,Or),e(Or,rv),e(Or,Qr),e(Qr,lv),e(Or,iv),e(yt,dv),e(yt,Vt),w(Hr,Vt,null),e(Vt,cv),e(Vt,sn),e(sn,pv),e(sn,Ld),e(Ld,hv),e(sn,mv),e(sn,Rp),e(Rp,uv),e(sn,fv),e(Vt,gv),w(us,Vt,null),e(Vt,_v),w(fs,Vt,null),g(o,tf,_),g(o,an,_),e(an,gs),e(gs,Vp),w(Yr,Vp,null),e(an,bv),e(an,Xp),e(Xp,yv),g(o,of,_),g(o,Tt,_),w(Kr,Tt,null),e(Tt,Tv),e(Tt,rn),e(rn,vv),e(rn,Sp),e(Sp,kv),e(rn,wv),e(rn,Lp),e(Lp,Mv),e(rn,$v),e(Tt,Fv),e(Tt,el),e(el,Av),e(el,Dd),e(Dd,Ev),e(el,jv),e(Tt,xv),e(Tt,tl),e(tl,Jv),e(tl,ol),e(ol,zv),e(tl,Cv),e(Tt,Uv),e(Tt,Xt),w(nl,Xt,null),e(Xt,Iv),e(Xt,ln),e(ln,Nv),e(ln,Od),e(Od,Wv),e(ln,qv),e(ln,Dp),e(Dp,Bv),e(ln,Pv),e(Xt,Zv),w(_s,Xt,null),e(Xt,Gv),w(bs,Xt,null),g(o,nf,_),g(o,dn,_),e(dn,ys),e(ys,Op),w(sl,Op,null),e(dn,Rv),e(dn,Qp),e(Qp,Vv),g(o,sf,_),g(o,lt,_),w(al,lt,null),e(lt,Xv),e(lt,Hp),e(Hp,Sv),e(lt,Lv),e(lt,rl),e(rl,Dv),e(rl,Qd),e(Qd,Ov),e(rl,Qv),e(lt,Hv),e(lt,ll),e(ll,Yv),e(ll,il),e(il,Kv),e(ll,ek),e(lt,tk),w(Ts,lt,null),e(lt,ok),e(lt,St),w(dl,St,null),e(St,nk),e(St,cn),e(cn,sk),e(cn,Hd),e(Hd,ak),e(cn,rk),e(cn,Yp),e(Yp,lk),e(cn,ik),e(St,dk),w(vs,St,null),e(St,ck),w(ks,St,null),g(o,af,_),g(o,pn,_),e(pn,ws),e(ws,Kp),w(cl,Kp,null),e(pn,pk),e(pn,eh),e(eh,hk),g(o,rf,_),g(o,it,_),w(pl,it,null),e(it,mk),e(it,hn),e(hn,uk),e(hn,th),e(th,fk),e(hn,gk),e(hn,oh),e(oh,_k),e(hn,bk),e(it,yk),e(it,hl),e(hl,Tk),e(hl,Yd),e(Yd,vk),e(hl,kk),e(it,wk),e(it,ml),e(ml,Mk),e(ml,ul),e(ul,$k),e(ml,Fk),e(it,Ak),w(Ms,it,null),e(it,Ek),e(it,Lt),w(fl,Lt,null),e(Lt,jk),e(Lt,mn),e(mn,xk),e(mn,Kd),e(Kd,Jk),e(mn,zk),e(mn,nh),e(nh,Ck),e(mn,Uk),e(Lt,Ik),w($s,Lt,null),e(Lt,Nk),w(Fs,Lt,null),g(o,lf,_),g(o,un,_),e(un,As),e(As,sh),w(gl,sh,null),e(un,Wk),e(un,ah),e(ah,qk),g(o,df,_),g(o,dt,_),w(_l,dt,null),e(dt,Bk),e(dt,bl),e(bl,Pk),e(bl,rh),e(rh,Zk),e(bl,Gk),e(dt,Rk),e(dt,yl),e(yl,Vk),e(yl,ec),e(ec,Xk),e(yl,Sk),e(dt,Lk),e(dt,Tl),e(Tl,Dk),e(Tl,vl),e(vl,Ok),e(Tl,Qk),e(dt,Hk),w(Es,dt,null),e(dt,Yk),e(dt,Mt),w(kl,Mt,null),e(Mt,Kk),e(Mt,fn),e(fn,ew),e(fn,tc),e(tc,tw),e(fn,ow),e(fn,lh),e(lh,nw),e(fn,sw),e(Mt,aw),w(js,Mt,null),e(Mt,rw),w(xs,Mt,null),e(Mt,lw),w(Js,Mt,null),g(o,cf,_),g(o,gn,_),e(gn,zs),e(zs,ih),w(wl,ih,null),e(gn,iw),e(gn,dh),e(dh,dw),g(o,pf,_),g(o,ct,_),w(Ml,ct,null),e(ct,cw),e(ct,ch),e(ch,pw),e(ct,hw),e(ct,$l),e($l,mw),e($l,oc),e(oc,uw),e($l,fw),e(ct,gw),e(ct,Fl),e(Fl,_w),e(Fl,Al),e(Al,bw),e(Fl,yw),e(ct,Tw),w(Cs,ct,null),e(ct,vw),e(ct,$t),w(El,$t,null),e($t,kw),e($t,_n),e(_n,ww),e(_n,nc),e(nc,Mw),e(_n,$w),e(_n,ph),e(ph,Fw),e(_n,Aw),e($t,Ew),w(Us,$t,null),e($t,jw),w(Is,$t,null),e($t,xw),w(Ns,$t,null),g(o,hf,_),g(o,bn,_),e(bn,Ws),e(Ws,hh),w(jl,hh,null),e(bn,Jw),e(bn,mh),e(mh,zw),g(o,mf,_),g(o,pt,_),w(xl,pt,null),e(pt,Cw),e(pt,uh),e(uh,Uw),e(pt,Iw),e(pt,Jl),e(Jl,Nw),e(Jl,sc),e(sc,Ww),e(Jl,qw),e(pt,Bw),e(pt,zl),e(zl,Pw),e(zl,Cl),e(Cl,Zw),e(zl,Gw),e(pt,Rw),w(qs,pt,null),e(pt,Vw),e(pt,Dt),w(Ul,Dt,null),e(Dt,Xw),e(Dt,yn),e(yn,Sw),e(yn,ac),e(ac,Lw),e(yn,Dw),e(yn,fh),e(fh,Ow),e(yn,Qw),e(Dt,Hw),w(Bs,Dt,null),e(Dt,Yw),w(Ps,Dt,null),g(o,uf,_),g(o,Tn,_),e(Tn,Zs),e(Zs,gh),w(Il,gh,null),e(Tn,Kw),e(Tn,_h),e(_h,e2),g(o,ff,_),g(o,ht,_),w(Nl,ht,null),e(ht,t2),e(ht,bh),e(bh,o2),e(ht,n2),e(ht,Wl),e(Wl,s2),e(Wl,rc),e(rc,a2),e(Wl,r2),e(ht,l2),e(ht,ql),e(ql,i2),e(ql,Bl),e(Bl,d2),e(ql,c2),e(ht,p2),w(Gs,ht,null),e(ht,h2),e(ht,Ft),w(Pl,Ft,null),e(Ft,m2),e(Ft,vn),e(vn,u2),e(vn,lc),e(lc,f2),e(vn,g2),e(vn,yh),e(yh,_2),e(vn,b2),e(Ft,y2),w(Rs,Ft,null),e(Ft,T2),w(Vs,Ft,null),e(Ft,v2),w(Xs,Ft,null),g(o,gf,_),g(o,kn,_),e(kn,Ss),e(Ss,Th),w(Zl,Th,null),e(kn,k2),e(kn,vh),e(vh,w2),g(o,_f,_),g(o,mt,_),w(Gl,mt,null),e(mt,M2),e(mt,wn),e(wn,$2),e(wn,kh),e(kh,F2),e(wn,A2),e(wn,wh),e(wh,E2),e(wn,j2),e(mt,x2),e(mt,Rl),e(Rl,J2),e(Rl,ic),e(ic,z2),e(Rl,C2),e(mt,U2),e(mt,Vl),e(Vl,I2),e(Vl,Xl),e(Xl,N2),e(Vl,W2),e(mt,q2),w(Ls,mt,null),e(mt,B2),e(mt,At),w(Sl,At,null),e(At,P2),e(At,Mn),e(Mn,Z2),e(Mn,dc),e(dc,G2),e(Mn,R2),e(Mn,Mh),e(Mh,V2),e(Mn,X2),e(At,S2),w(Ds,At,null),e(At,L2),w(Os,At,null),e(At,D2),w(Qs,At,null),g(o,bf,_),g(o,$n,_),e($n,Hs),e(Hs,$h),w(Ll,$h,null),e($n,O2),e($n,Fh),e(Fh,Q2),g(o,yf,_),g(o,et,_),w(Dl,et,null),e(et,H2),e(et,Ah),e(Ah,Y2),e(et,K2),e(et,Ol),e(Ol,eM),e(Ol,cc),e(cc,tM),e(Ol,oM),e(et,nM),e(et,Ql),e(Ql,sM),e(Ql,Hl),e(Hl,aM),e(Ql,rM),e(et,lM),e(et,Eh),e(Eh,iM),e(et,dM),e(et,ho),e(ho,jh),e(jh,Yl),e(Yl,cM),e(ho,pM),e(ho,xh),e(xh,Kl),e(Kl,hM),e(ho,mM),e(ho,Jh),e(Jh,ei),e(ei,uM),e(ho,fM),e(ho,zh),e(zh,ti),e(ti,gM),e(et,_M),e(et,Ot),w(oi,Ot,null),e(Ot,bM),e(Ot,Fn),e(Fn,yM),e(Fn,Ch),e(Ch,TM),e(Fn,vM),e(Fn,Uh),e(Uh,kM),e(Fn,wM),e(Ot,MM),w(Ys,Ot,null),e(Ot,$M),w(Ks,Ot,null),g(o,Tf,_),g(o,An,_),e(An,ea),e(ea,Ih),w(ni,Ih,null),e(An,FM),e(An,Nh),e(Nh,AM),g(o,vf,_),g(o,tt,_),w(si,tt,null),e(tt,EM),e(tt,En),e(En,jM),e(En,Wh),e(Wh,xM),e(En,JM),e(En,qh),e(qh,zM),e(En,CM),e(tt,UM),e(tt,ai),e(ai,IM),e(ai,pc),e(pc,NM),e(ai,WM),e(tt,qM),e(tt,ri),e(ri,BM),e(ri,li),e(li,PM),e(ri,ZM),e(tt,GM),e(tt,Bh),e(Bh,RM),e(tt,VM),e(tt,mo),e(mo,Ph),e(Ph,ii),e(ii,XM),e(mo,SM),e(mo,Zh),e(Zh,di),e(di,LM),e(mo,DM),e(mo,Gh),e(Gh,ci),e(ci,OM),e(mo,QM),e(mo,Rh),e(Rh,pi),e(pi,HM),e(tt,YM),e(tt,Qt),w(hi,Qt,null),e(Qt,KM),e(Qt,jn),e(jn,e0),e(jn,Vh),e(Vh,t0),e(jn,o0),e(jn,Xh),e(Xh,n0),e(jn,s0),e(Qt,a0),w(ta,Qt,null),e(Qt,r0),w(oa,Qt,null),g(o,kf,_),g(o,xn,_),e(xn,na),e(na,Sh),w(mi,Sh,null),e(xn,l0),e(xn,Lh),e(Lh,i0),g(o,wf,_),g(o,ot,_),w(ui,ot,null),e(ot,d0),e(ot,fi),e(fi,c0),e(fi,Dh),e(Dh,p0),e(fi,h0),e(ot,m0),e(ot,gi),e(gi,u0),e(gi,hc),e(hc,f0),e(gi,g0),e(ot,_0),e(ot,_i),e(_i,b0),e(_i,bi),e(bi,y0),e(_i,T0),e(ot,v0),e(ot,Oh),e(Oh,k0),e(ot,w0),e(ot,uo),e(uo,Qh),e(Qh,yi),e(yi,M0),e(uo,$0),e(uo,Hh),e(Hh,Ti),e(Ti,F0),e(uo,A0),e(uo,Yh),e(Yh,vi),e(vi,E0),e(uo,j0),e(uo,Kh),e(Kh,ki),e(ki,x0),e(ot,J0),e(ot,Ht),w(wi,Ht,null),e(Ht,z0),e(Ht,Jn),e(Jn,C0),e(Jn,em),e(em,U0),e(Jn,I0),e(Jn,tm),e(tm,N0),e(Jn,W0),e(Ht,q0),w(sa,Ht,null),e(Ht,B0),w(aa,Ht,null),g(o,Mf,_),g(o,zn,_),e(zn,ra),e(ra,om),w(Mi,om,null),e(zn,P0),e(zn,nm),e(nm,Z0),g(o,$f,_),g(o,nt,_),w($i,nt,null),e(nt,G0),e(nt,sm),e(sm,R0),e(nt,V0),e(nt,Fi),e(Fi,X0),e(Fi,mc),e(mc,S0),e(Fi,L0),e(nt,D0),e(nt,Ai),e(Ai,O0),e(Ai,Ei),e(Ei,Q0),e(Ai,H0),e(nt,Y0),e(nt,am),e(am,K0),e(nt,e1),e(nt,fo),e(fo,rm),e(rm,ji),e(ji,t1),e(fo,o1),e(fo,lm),e(lm,xi),e(xi,n1),e(fo,s1),e(fo,im),e(im,Ji),e(Ji,a1),e(fo,r1),e(fo,dm),e(dm,zi),e(zi,l1),e(nt,i1),e(nt,Yt),w(Ci,Yt,null),e(Yt,d1),e(Yt,Cn),e(Cn,c1),e(Cn,cm),e(cm,p1),e(Cn,h1),e(Cn,pm),e(pm,m1),e(Cn,u1),e(Yt,f1),w(la,Yt,null),e(Yt,g1),w(ia,Yt,null),g(o,Ff,_),g(o,Un,_),e(Un,da),e(da,hm),w(Ui,hm,null),e(Un,_1),e(Un,mm),e(mm,b1),g(o,Af,_),g(o,st,_),w(Ii,st,null),e(st,y1),e(st,um),e(um,T1),e(st,v1),e(st,Ni),e(Ni,k1),e(Ni,uc),e(uc,w1),e(Ni,M1),e(st,$1),e(st,Wi),e(Wi,F1),e(Wi,qi),e(qi,A1),e(Wi,E1),e(st,j1),e(st,fm),e(fm,x1),e(st,J1),e(st,go),e(go,gm),e(gm,Bi),e(Bi,z1),e(go,C1),e(go,_m),e(_m,Pi),e(Pi,U1),e(go,I1),e(go,bm),e(bm,Zi),e(Zi,N1),e(go,W1),e(go,ym),e(ym,Gi),e(Gi,q1),e(st,B1),e(st,Kt),w(Ri,Kt,null),e(Kt,P1),e(Kt,In),e(In,Z1),e(In,Tm),e(Tm,G1),e(In,R1),e(In,vm),e(vm,V1),e(In,X1),e(Kt,S1),w(ca,Kt,null),e(Kt,L1),w(pa,Kt,null),g(o,Ef,_),g(o,Nn,_),e(Nn,ha),e(ha,km),w(Vi,km,null),e(Nn,D1),e(Nn,wm),e(wm,O1),g(o,jf,_),g(o,at,_),w(Xi,at,null),e(at,Q1),e(at,Mm),e(Mm,H1),e(at,Y1),e(at,Si),e(Si,K1),e(Si,fc),e(fc,e$),e(Si,t$),e(at,o$),e(at,Li),e(Li,n$),e(Li,Di),e(Di,s$),e(Li,a$),e(at,r$),e(at,$m),e($m,l$),e(at,i$),e(at,_o),e(_o,Fm),e(Fm,Oi),e(Oi,d$),e(_o,c$),e(_o,Am),e(Am,Qi),e(Qi,p$),e(_o,h$),e(_o,Em),e(Em,Hi),e(Hi,m$),e(_o,u$),e(_o,jm),e(jm,Yi),e(Yi,f$),e(at,g$),e(at,eo),w(Ki,eo,null),e(eo,_$),e(eo,Wn),e(Wn,b$),e(Wn,xm),e(xm,y$),e(Wn,T$),e(Wn,Jm),e(Jm,v$),e(Wn,k$),e(eo,w$),w(ma,eo,null),e(eo,M$),w(ua,eo,null),g(o,xf,_),g(o,qn,_),e(qn,fa),e(fa,zm),w(ed,zm,null),e(qn,$$),e(qn,Cm),e(Cm,F$),g(o,Jf,_),g(o,rt,_),w(td,rt,null),e(rt,A$),e(rt,Bn),e(Bn,E$),e(Bn,Um),e(Um,j$),e(Bn,x$),e(Bn,Im),e(Im,J$),e(Bn,z$),e(rt,C$),e(rt,od),e(od,U$),e(od,gc),e(gc,I$),e(od,N$),e(rt,W$),e(rt,nd),e(nd,q$),e(nd,sd),e(sd,B$),e(nd,P$),e(rt,Z$),e(rt,Nm),e(Nm,G$),e(rt,R$),e(rt,bo),e(bo,Wm),e(Wm,ad),e(ad,V$),e(bo,X$),e(bo,qm),e(qm,rd),e(rd,S$),e(bo,L$),e(bo,Bm),e(Bm,ld),e(ld,D$),e(bo,O$),e(bo,Pm),e(Pm,id),e(id,Q$),e(rt,H$),e(rt,to),w(dd,to,null),e(to,Y$),e(to,Pn),e(Pn,K$),e(Pn,Zm),e(Zm,eF),e(Pn,tF),e(Pn,Gm),e(Gm,oF),e(Pn,nF),e(to,sF),w(ga,to,null),e(to,aF),w(_a,to,null),zf=!0},p(o,[_]){const cd={};_&2&&(cd.$$scope={dirty:_,ctx:o}),Rn.$set(cd);const Rm={};_&2&&(Rm.$$scope={dirty:_,ctx:o}),Sn.$set(Rm);const Vm={};_&2&&(Vm.$$scope={dirty:_,ctx:o}),Dn.$set(Vm);const Xm={};_&2&&(Xm.$$scope={dirty:_,ctx:o}),Hn.$set(Xm);const pd={};_&2&&(pd.$$scope={dirty:_,ctx:o}),Yn.$set(pd);const Sm={};_&2&&(Sm.$$scope={dirty:_,ctx:o}),es.$set(Sm);const Lm={};_&2&&(Lm.$$scope={dirty:_,ctx:o}),ts.$set(Lm);const hd={};_&2&&(hd.$$scope={dirty:_,ctx:o}),ns.$set(hd);const Dm={};_&2&&(Dm.$$scope={dirty:_,ctx:o}),ss.$set(Dm);const Om={};_&2&&(Om.$$scope={dirty:_,ctx:o}),as.$set(Om);const Qm={};_&2&&(Qm.$$scope={dirty:_,ctx:o}),ls.$set(Qm);const md={};_&2&&(md.$$scope={dirty:_,ctx:o}),is.$set(md);const Hm={};_&2&&(Hm.$$scope={dirty:_,ctx:o}),ds.$set(Hm);const ud={};_&2&&(ud.$$scope={dirty:_,ctx:o}),ps.$set(ud);const Ym={};_&2&&(Ym.$$scope={dirty:_,ctx:o}),hs.$set(Ym);const Km={};_&2&&(Km.$$scope={dirty:_,ctx:o}),us.$set(Km);const eu={};_&2&&(eu.$$scope={dirty:_,ctx:o}),fs.$set(eu);const tu={};_&2&&(tu.$$scope={dirty:_,ctx:o}),_s.$set(tu);const ou={};_&2&&(ou.$$scope={dirty:_,ctx:o}),bs.$set(ou);const nu={};_&2&&(nu.$$scope={dirty:_,ctx:o}),Ts.$set(nu);const yo={};_&2&&(yo.$$scope={dirty:_,ctx:o}),vs.$set(yo);const su={};_&2&&(su.$$scope={dirty:_,ctx:o}),ks.$set(su);const au={};_&2&&(au.$$scope={dirty:_,ctx:o}),Ms.$set(au);const ru={};_&2&&(ru.$$scope={dirty:_,ctx:o}),$s.$set(ru);const lu={};_&2&&(lu.$$scope={dirty:_,ctx:o}),Fs.$set(lu);const To={};_&2&&(To.$$scope={dirty:_,ctx:o}),Es.$set(To);const iu={};_&2&&(iu.$$scope={dirty:_,ctx:o}),js.$set(iu);const du={};_&2&&(du.$$scope={dirty:_,ctx:o}),xs.$set(du);const cu={};_&2&&(cu.$$scope={dirty:_,ctx:o}),Js.$set(cu);const fd={};_&2&&(fd.$$scope={dirty:_,ctx:o}),Cs.$set(fd);const pu={};_&2&&(pu.$$scope={dirty:_,ctx:o}),Us.$set(pu);const hu={};_&2&&(hu.$$scope={dirty:_,ctx:o}),Is.$set(hu);const mu={};_&2&&(mu.$$scope={dirty:_,ctx:o}),Ns.$set(mu);const qt={};_&2&&(qt.$$scope={dirty:_,ctx:o}),qs.$set(qt);const uu={};_&2&&(uu.$$scope={dirty:_,ctx:o}),Bs.$set(uu);const fu={};_&2&&(fu.$$scope={dirty:_,ctx:o}),Ps.$set(fu);const gu={};_&2&&(gu.$$scope={dirty:_,ctx:o}),Gs.$set(gu);const _u={};_&2&&(_u.$$scope={dirty:_,ctx:o}),Rs.$set(_u);const bu={};_&2&&(bu.$$scope={dirty:_,ctx:o}),Vs.$set(bu);const yu={};_&2&&(yu.$$scope={dirty:_,ctx:o}),Xs.$set(yu);const Tu={};_&2&&(Tu.$$scope={dirty:_,ctx:o}),Ls.$set(Tu);const vu={};_&2&&(vu.$$scope={dirty:_,ctx:o}),Ds.$set(vu);const ku={};_&2&&(ku.$$scope={dirty:_,ctx:o}),Os.$set(ku);const wu={};_&2&&(wu.$$scope={dirty:_,ctx:o}),Qs.$set(wu);const gd={};_&2&&(gd.$$scope={dirty:_,ctx:o}),Ys.$set(gd);const Mu={};_&2&&(Mu.$$scope={dirty:_,ctx:o}),Ks.$set(Mu);const $u={};_&2&&($u.$$scope={dirty:_,ctx:o}),ta.$set($u);const Fu={};_&2&&(Fu.$$scope={dirty:_,ctx:o}),oa.$set(Fu);const vo={};_&2&&(vo.$$scope={dirty:_,ctx:o}),sa.$set(vo);const ko={};_&2&&(ko.$$scope={dirty:_,ctx:o}),aa.$set(ko);const Au={};_&2&&(Au.$$scope={dirty:_,ctx:o}),la.$set(Au);const Eu={};_&2&&(Eu.$$scope={dirty:_,ctx:o}),ia.$set(Eu);const ju={};_&2&&(ju.$$scope={dirty:_,ctx:o}),ca.$set(ju);const Zn={};_&2&&(Zn.$$scope={dirty:_,ctx:o}),pa.$set(Zn);const xu={};_&2&&(xu.$$scope={dirty:_,ctx:o}),ma.$set(xu);const Ju={};_&2&&(Ju.$$scope={dirty:_,ctx:o}),ua.$set(Ju);const _d={};_&2&&(_d.$$scope={dirty:_,ctx:o}),ga.$set(_d);const zu={};_&2&&(zu.$$scope={dirty:_,ctx:o}),_a.$set(zu)},i(o){zf||(M(i.$$.fragment,o),M(le.$$.fragment,o),M(Ge.$$.fragment,o),M(Va.$$.fragment,o),M(Xa.$$.fragment,o),M(Rn.$$.fragment,o),M(La.$$.fragment,o),M(Da.$$.fragment,o),M(Ya.$$.fragment,o),M(er.$$.fragment,o),M(or.$$.fragment,o),M(Sn.$$.fragment,o),M(nr.$$.fragment,o),M(sr.$$.fragment,o),M(ar.$$.fragment,o),M(lr.$$.fragment,o),M(dr.$$.fragment,o),M(Dn.$$.fragment,o),M(cr.$$.fragment,o),M(pr.$$.fragment,o),M(mr.$$.fragment,o),M(fr.$$.fragment,o),M(gr.$$.fragment,o),M(Tr.$$.fragment,o),M(Hn.$$.fragment,o),M(Yn.$$.fragment,o),M(vr.$$.fragment,o),M(kr.$$.fragment,o),M(Fr.$$.fragment,o),M(es.$$.fragment,o),M(ts.$$.fragment,o),M(Ar.$$.fragment,o),M(Er.$$.fragment,o),M(Cr.$$.fragment,o),M(ns.$$.fragment,o),M(ss.$$.fragment,o),M(as.$$.fragment,o),M(Ur.$$.fragment,o),M(Ir.$$.fragment,o),M(Br.$$.fragment,o),M(ls.$$.fragment,o),M(is.$$.fragment,o),M(ds.$$.fragment,o),M(Pr.$$.fragment,o),M(Zr.$$.fragment,o),M(Xr.$$.fragment,o),M(ps.$$.fragment,o),M(hs.$$.fragment,o),M(Sr.$$.fragment,o),M(Lr.$$.fragment,o),M(Hr.$$.fragment,o),M(us.$$.fragment,o),M(fs.$$.fragment,o),M(Yr.$$.fragment,o),M(Kr.$$.fragment,o),M(nl.$$.fragment,o),M(_s.$$.fragment,o),M(bs.$$.fragment,o),M(sl.$$.fragment,o),M(al.$$.fragment,o),M(Ts.$$.fragment,o),M(dl.$$.fragment,o),M(vs.$$.fragment,o),M(ks.$$.fragment,o),M(cl.$$.fragment,o),M(pl.$$.fragment,o),M(Ms.$$.fragment,o),M(fl.$$.fragment,o),M($s.$$.fragment,o),M(Fs.$$.fragment,o),M(gl.$$.fragment,o),M(_l.$$.fragment,o),M(Es.$$.fragment,o),M(kl.$$.fragment,o),M(js.$$.fragment,o),M(xs.$$.fragment,o),M(Js.$$.fragment,o),M(wl.$$.fragment,o),M(Ml.$$.fragment,o),M(Cs.$$.fragment,o),M(El.$$.fragment,o),M(Us.$$.fragment,o),M(Is.$$.fragment,o),M(Ns.$$.fragment,o),M(jl.$$.fragment,o),M(xl.$$.fragment,o),M(qs.$$.fragment,o),M(Ul.$$.fragment,o),M(Bs.$$.fragment,o),M(Ps.$$.fragment,o),M(Il.$$.fragment,o),M(Nl.$$.fragment,o),M(Gs.$$.fragment,o),M(Pl.$$.fragment,o),M(Rs.$$.fragment,o),M(Vs.$$.fragment,o),M(Xs.$$.fragment,o),M(Zl.$$.fragment,o),M(Gl.$$.fragment,o),M(Ls.$$.fragment,o),M(Sl.$$.fragment,o),M(Ds.$$.fragment,o),M(Os.$$.fragment,o),M(Qs.$$.fragment,o),M(Ll.$$.fragment,o),M(Dl.$$.fragment,o),M(oi.$$.fragment,o),M(Ys.$$.fragment,o),M(Ks.$$.fragment,o),M(ni.$$.fragment,o),M(si.$$.fragment,o),M(hi.$$.fragment,o),M(ta.$$.fragment,o),M(oa.$$.fragment,o),M(mi.$$.fragment,o),M(ui.$$.fragment,o),M(wi.$$.fragment,o),M(sa.$$.fragment,o),M(aa.$$.fragment,o),M(Mi.$$.fragment,o),M($i.$$.fragment,o),M(Ci.$$.fragment,o),M(la.$$.fragment,o),M(ia.$$.fragment,o),M(Ui.$$.fragment,o),M(Ii.$$.fragment,o),M(Ri.$$.fragment,o),M(ca.$$.fragment,o),M(pa.$$.fragment,o),M(Vi.$$.fragment,o),M(Xi.$$.fragment,o),M(Ki.$$.fragment,o),M(ma.$$.fragment,o),M(ua.$$.fragment,o),M(ed.$$.fragment,o),M(td.$$.fragment,o),M(dd.$$.fragment,o),M(ga.$$.fragment,o),M(_a.$$.fragment,o),zf=!0)},o(o){$(i.$$.fragment,o),$(le.$$.fragment,o),$(Ge.$$.fragment,o),$(Va.$$.fragment,o),$(Xa.$$.fragment,o),$(Rn.$$.fragment,o),$(La.$$.fragment,o),$(Da.$$.fragment,o),$(Ya.$$.fragment,o),$(er.$$.fragment,o),$(or.$$.fragment,o),$(Sn.$$.fragment,o),$(nr.$$.fragment,o),$(sr.$$.fragment,o),$(ar.$$.fragment,o),$(lr.$$.fragment,o),$(dr.$$.fragment,o),$(Dn.$$.fragment,o),$(cr.$$.fragment,o),$(pr.$$.fragment,o),$(mr.$$.fragment,o),$(fr.$$.fragment,o),$(gr.$$.fragment,o),$(Tr.$$.fragment,o),$(Hn.$$.fragment,o),$(Yn.$$.fragment,o),$(vr.$$.fragment,o),$(kr.$$.fragment,o),$(Fr.$$.fragment,o),$(es.$$.fragment,o),$(ts.$$.fragment,o),$(Ar.$$.fragment,o),$(Er.$$.fragment,o),$(Cr.$$.fragment,o),$(ns.$$.fragment,o),$(ss.$$.fragment,o),$(as.$$.fragment,o),$(Ur.$$.fragment,o),$(Ir.$$.fragment,o),$(Br.$$.fragment,o),$(ls.$$.fragment,o),$(is.$$.fragment,o),$(ds.$$.fragment,o),$(Pr.$$.fragment,o),$(Zr.$$.fragment,o),$(Xr.$$.fragment,o),$(ps.$$.fragment,o),$(hs.$$.fragment,o),$(Sr.$$.fragment,o),$(Lr.$$.fragment,o),$(Hr.$$.fragment,o),$(us.$$.fragment,o),$(fs.$$.fragment,o),$(Yr.$$.fragment,o),$(Kr.$$.fragment,o),$(nl.$$.fragment,o),$(_s.$$.fragment,o),$(bs.$$.fragment,o),$(sl.$$.fragment,o),$(al.$$.fragment,o),$(Ts.$$.fragment,o),$(dl.$$.fragment,o),$(vs.$$.fragment,o),$(ks.$$.fragment,o),$(cl.$$.fragment,o),$(pl.$$.fragment,o),$(Ms.$$.fragment,o),$(fl.$$.fragment,o),$($s.$$.fragment,o),$(Fs.$$.fragment,o),$(gl.$$.fragment,o),$(_l.$$.fragment,o),$(Es.$$.fragment,o),$(kl.$$.fragment,o),$(js.$$.fragment,o),$(xs.$$.fragment,o),$(Js.$$.fragment,o),$(wl.$$.fragment,o),$(Ml.$$.fragment,o),$(Cs.$$.fragment,o),$(El.$$.fragment,o),$(Us.$$.fragment,o),$(Is.$$.fragment,o),$(Ns.$$.fragment,o),$(jl.$$.fragment,o),$(xl.$$.fragment,o),$(qs.$$.fragment,o),$(Ul.$$.fragment,o),$(Bs.$$.fragment,o),$(Ps.$$.fragment,o),$(Il.$$.fragment,o),$(Nl.$$.fragment,o),$(Gs.$$.fragment,o),$(Pl.$$.fragment,o),$(Rs.$$.fragment,o),$(Vs.$$.fragment,o),$(Xs.$$.fragment,o),$(Zl.$$.fragment,o),$(Gl.$$.fragment,o),$(Ls.$$.fragment,o),$(Sl.$$.fragment,o),$(Ds.$$.fragment,o),$(Os.$$.fragment,o),$(Qs.$$.fragment,o),$(Ll.$$.fragment,o),$(Dl.$$.fragment,o),$(oi.$$.fragment,o),$(Ys.$$.fragment,o),$(Ks.$$.fragment,o),$(ni.$$.fragment,o),$(si.$$.fragment,o),$(hi.$$.fragment,o),$(ta.$$.fragment,o),$(oa.$$.fragment,o),$(mi.$$.fragment,o),$(ui.$$.fragment,o),$(wi.$$.fragment,o),$(sa.$$.fragment,o),$(aa.$$.fragment,o),$(Mi.$$.fragment,o),$($i.$$.fragment,o),$(Ci.$$.fragment,o),$(la.$$.fragment,o),$(ia.$$.fragment,o),$(Ui.$$.fragment,o),$(Ii.$$.fragment,o),$(Ri.$$.fragment,o),$(ca.$$.fragment,o),$(pa.$$.fragment,o),$(Vi.$$.fragment,o),$(Xi.$$.fragment,o),$(Ki.$$.fragment,o),$(ma.$$.fragment,o),$(ua.$$.fragment,o),$(ed.$$.fragment,o),$(td.$$.fragment,o),$(dd.$$.fragment,o),$(ga.$$.fragment,o),$(_a.$$.fragment,o),zf=!1},d(o){t(d),o&&t(y),o&&t(m),F(i),o&&t(ye),o&&t(Z),o&&t(O),o&&t(se),F(le),o&&t(Te),o&&t(G),o&&t(U),o&&t(re),o&&t(ve),o&&t(C),o&&t(Q),o&&t(pe),o&&t(ke),o&&t(he),o&&t(we),o&&t(W),o&&t(Le),o&&t(_e),o&&t(H),o&&t(Ie),F(Ge),o&&t(Cu),o&&t(vt),o&&t(Uu),o&&t(qo),F(Va),o&&t(Iu),o&&t(Nt),F(Xa),F(Rn),o&&t(Nu),o&&t(Po),F(La),o&&t(Wu),o&&t(Ke),F(Da),F(Ya),F(er),F(or),F(Sn),F(nr),o&&t(qu),o&&t(Go),F(sr),o&&t(Bu),o&&t(Wt),F(ar),F(lr),F(dr),F(Dn),o&&t(Pu),o&&t(Ro),F(cr),o&&t(Zu),o&&t(Vo),F(pr),o&&t(Gu),o&&t(Xo),F(mr),o&&t(Ru),o&&t(So),F(fr),o&&t(Vu),o&&t(ut),F(gr),F(Tr),F(Hn),F(Yn),o&&t(Xu),o&&t(Do),F(vr),o&&t(Su),o&&t(ft),F(kr),F(Fr),F(es),F(ts),o&&t(Lu),o&&t(Ho),F(Ar),o&&t(Du),o&&t(gt),F(Er),F(Cr),F(ns),F(ss),F(as),o&&t(Ou),o&&t(Ko),F(Ur),o&&t(Qu),o&&t(_t),F(Ir),F(Br),F(ls),F(is),F(ds),o&&t(Hu),o&&t(tn),F(Pr),o&&t(Yu),o&&t(bt),F(Zr),F(Xr),F(ps),F(hs),o&&t(Ku),o&&t(nn),F(Sr),o&&t(ef),o&&t(yt),F(Lr),F(Hr),F(us),F(fs),o&&t(tf),o&&t(an),F(Yr),o&&t(of),o&&t(Tt),F(Kr),F(nl),F(_s),F(bs),o&&t(nf),o&&t(dn),F(sl),o&&t(sf),o&&t(lt),F(al),F(Ts),F(dl),F(vs),F(ks),o&&t(af),o&&t(pn),F(cl),o&&t(rf),o&&t(it),F(pl),F(Ms),F(fl),F($s),F(Fs),o&&t(lf),o&&t(un),F(gl),o&&t(df),o&&t(dt),F(_l),F(Es),F(kl),F(js),F(xs),F(Js),o&&t(cf),o&&t(gn),F(wl),o&&t(pf),o&&t(ct),F(Ml),F(Cs),F(El),F(Us),F(Is),F(Ns),o&&t(hf),o&&t(bn),F(jl),o&&t(mf),o&&t(pt),F(xl),F(qs),F(Ul),F(Bs),F(Ps),o&&t(uf),o&&t(Tn),F(Il),o&&t(ff),o&&t(ht),F(Nl),F(Gs),F(Pl),F(Rs),F(Vs),F(Xs),o&&t(gf),o&&t(kn),F(Zl),o&&t(_f),o&&t(mt),F(Gl),F(Ls),F(Sl),F(Ds),F(Os),F(Qs),o&&t(bf),o&&t($n),F(Ll),o&&t(yf),o&&t(et),F(Dl),F(oi),F(Ys),F(Ks),o&&t(Tf),o&&t(An),F(ni),o&&t(vf),o&&t(tt),F(si),F(hi),F(ta),F(oa),o&&t(kf),o&&t(xn),F(mi),o&&t(wf),o&&t(ot),F(ui),F(wi),F(sa),F(aa),o&&t(Mf),o&&t(zn),F(Mi),o&&t($f),o&&t(nt),F($i),F(Ci),F(la),F(ia),o&&t(Ff),o&&t(Un),F(Ui),o&&t(Af),o&&t(st),F(Ii),F(Ri),F(ca),F(pa),o&&t(Ef),o&&t(Nn),F(Vi),o&&t(jf),o&&t(at),F(Xi),F(Ki),F(ma),F(ua),o&&t(xf),o&&t(qn),F(ed),o&&t(Jf),o&&t(rt),F(td),F(dd),F(ga),F(_a)}}}const g4={local:"albert",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.AlbertConfig",title:"AlbertConfig"},{local:"transformers.AlbertTokenizer",title:"AlbertTokenizer"},{local:"transformers.AlbertTokenizerFast",title:"AlbertTokenizerFast"},{local:"transformers.models.albert.modeling_albert.AlbertForPreTrainingOutput",title:"Albert specific outputs"},{local:"transformers.AlbertModel",title:"AlbertModel"},{local:"transformers.AlbertForPreTraining",title:"AlbertForPreTraining"},{local:"transformers.AlbertForMaskedLM",title:"AlbertForMaskedLM"},{local:"transformers.AlbertForSequenceClassification",title:"AlbertForSequenceClassification"},{local:"transformers.AlbertForMultipleChoice",title:"AlbertForMultipleChoice"},{local:"transformers.AlbertForTokenClassification",title:"AlbertForTokenClassification"},{local:"transformers.AlbertForQuestionAnswering",title:"AlbertForQuestionAnswering"},{local:"transformers.TFAlbertModel",title:"TFAlbertModel"},{local:"transformers.TFAlbertForPreTraining",title:"TFAlbertForPreTraining"},{local:"transformers.TFAlbertForMaskedLM",title:"TFAlbertForMaskedLM"},{local:"transformers.TFAlbertForSequenceClassification",title:"TFAlbertForSequenceClassification"},{local:"transformers.TFAlbertForMultipleChoice",title:"TFAlbertForMultipleChoice"},{local:"transformers.TFAlbertForTokenClassification",title:"TFAlbertForTokenClassification"},{local:"transformers.TFAlbertForQuestionAnswering",title:"TFAlbertForQuestionAnswering"},{local:"transformers.FlaxAlbertModel",title:"FlaxAlbertModel"},{local:"transformers.FlaxAlbertForPreTraining",title:"FlaxAlbertForPreTraining"},{local:"transformers.FlaxAlbertForMaskedLM",title:"FlaxAlbertForMaskedLM"},{local:"transformers.FlaxAlbertForSequenceClassification",title:"FlaxAlbertForSequenceClassification"},{local:"transformers.FlaxAlbertForMultipleChoice",title:"FlaxAlbertForMultipleChoice"},{local:"transformers.FlaxAlbertForTokenClassification",title:"FlaxAlbertForTokenClassification"},{local:"transformers.FlaxAlbertForQuestionAnswering",title:"FlaxAlbertForQuestionAnswering"}],title:"ALBERT"};function _4(E){return c3(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class M4 extends r3{constructor(d){super();l3(this,d,_4,f4,i3,{})}}export{M4 as default,g4 as metadata};
