import{S as Wv,i as Nv,s as Av,e as s,k as p,w as v,t as o,M as Sv,c as r,d as t,m,a,x as w,h as n,b as g,G as e,g as _,y as M,q as $,o as R,B,v as Gv,L as He}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ke}from"../../chunks/Tip-hf-doc-builder.js";import{D as ne}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ye}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as et}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Qe}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Vv(C){let d,b,h,u,y;return u=new Ye({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFJlbUJlcnRNb2RlbCUyQyUyMFJlbUJlcnRDb25maWclMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwUmVtQkVSVCUyMHJlbWJlcnQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwUmVtQmVydENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwZnJvbSUyMHRoZSUyMHJlbWJlcnQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMFJlbUJlcnRNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RemBertModel, RemBertConfig

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a RemBERT rembert style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = RemBertConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model from the rembert style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=s("p"),b=o("Example:"),h=p(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);b=n(c,"Example:"),c.forEach(t),h=m(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),y=!0},p:He,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){R(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),B(u,l)}}}function Lv(C){let d,b,h,u,y;return u=new Ye({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=s("p"),b=o("sequence pair mask has the following format:"),h=p(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);b=n(c,"sequence pair mask has the following format:"),c.forEach(t),h=m(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),y=!0},p:He,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){R(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),B(u,l)}}}function Xv(C){let d,b,h,u,y;return u=new Ye({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=s("p"),b=o("sequence pair mask has the following format:"),h=p(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);b=n(c,"sequence pair mask has the following format:"),c.forEach(t),h=m(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),y=!0},p:He,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){R(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),B(u,l)}}}function Dv(C){let d,b,h,u,y;return{c(){d=s("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),y=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=a(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var j=a(h);u=n(j,"Module"),j.forEach(t),y=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,y)},d(l){l&&t(d)}}}function Pv(C){let d,b,h,u,y;return u=new Ye({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSZW1CZXJ0TW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnJlbWJlcnQlMjIpJTBBbW9kZWwlMjAlM0QlMjBSZW1CZXJ0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnJlbWJlcnQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RemBertModel
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertModel.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=s("p"),b=o("Example:"),h=p(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);b=n(c,"Example:"),c.forEach(t),h=m(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),y=!0},p:He,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){R(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),B(u,l)}}}function Ov(C){let d,b,h,u,y;return{c(){d=s("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),y=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=a(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var j=a(h);u=n(j,"Module"),j.forEach(t),y=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,y)},d(l){l&&t(d)}}}function Qv(C){let d,b,h,u,y;return u=new Ye({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSZW1CZXJ0Rm9yQ2F1c2FsTE0lMkMlMjBSZW1CZXJ0Q29uZmlnJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZyZW1iZXJ0JTIyKSUwQWNvbmZpZyUyMCUzRCUyMFJlbUJlcnRDb25maWcuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnJlbWJlcnQlMjIpJTBBY29uZmlnLmlzX2RlY29kZXIlMjAlM0QlMjBUcnVlJTBBbW9kZWwlMjAlM0QlMjBSZW1CZXJ0Rm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnJlbWJlcnQlMjIlMkMlMjBjb25maWclM0Rjb25maWcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFwcmVkaWN0aW9uX2xvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RemBertForCausalLM, RemBertConfig
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config = RemBertConfig.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config.is_decoder = <span class="hljs-literal">True</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForCausalLM.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>, config=config)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>prediction_logits = outputs.logits`}}),{c(){d=s("p"),b=o("Example:"),h=p(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);b=n(c,"Example:"),c.forEach(t),h=m(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),y=!0},p:He,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){R(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),B(u,l)}}}function Hv(C){let d,b,h,u,y;return{c(){d=s("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),y=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=a(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var j=a(h);u=n(j,"Module"),j.forEach(t),y=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,y)},d(l){l&&t(d)}}}function Yv(C){let d,b,h,u,y;return u=new Ye({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSZW1CZXJ0Rm9yTWFza2VkTE0lMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnJlbWJlcnQlMjIpJTBBbW9kZWwlMjAlM0QlMjBSZW1CZXJ0Rm9yTWFza2VkTE0uZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnJlbWJlcnQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwJTVCTUFTSyU1RC4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwcmV0cmlldmUlMjBpbmRleCUyMG9mJTIwJTVCTUFTSyU1RCUwQW1hc2tfdG9rZW5faW5kZXglMjAlM0QlMjAoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkKSU1QjAlNUQubm9uemVybyhhc190dXBsZSUzRFRydWUpJTVCMCU1RCUwQSUwQXByZWRpY3RlZF90b2tlbl9pZCUyMCUzRCUyMGxvZ2l0cyU1QjAlMkMlMjBtYXNrX3Rva2VuX2luZGV4JTVELmFyZ21heChheGlzJTNELTEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwUGFyaXMuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMjMlMjBtYXNrJTIwbGFiZWxzJTIwb2YlMjBub24tJTVCTUFTSyU1RCUyMHRva2VucyUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLndoZXJlKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCUyQyUyMGxhYmVscyUyQyUyMC0xMDApJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RemBertForMaskedLM
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForMaskedLM.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)`}}),{c(){d=s("p"),b=o("Example:"),h=p(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);b=n(c,"Example:"),c.forEach(t),h=m(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),y=!0},p:He,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){R(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),B(u,l)}}}function Kv(C){let d,b,h,u,y;return{c(){d=s("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),y=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=a(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var j=a(h);u=n(j,"Module"),j.forEach(t),y=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,y)},d(l){l&&t(d)}}}function ew(C){let d,b,h,u,y;return u=new Ye({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFJlbUJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGcmVtYmVydCUyMiklMEFtb2RlbCUyMCUzRCUyMFJlbUJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZyZW1iZXJ0JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZCUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoKS5pdGVtKCklMEElMEElMjMlMjBUbyUyMHRyYWluJTIwYSUyMG1vZGVsJTIwb24lMjAlNjBudW1fbGFiZWxzJTYwJTIwY2xhc3NlcyUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyU2MCUyMHRvJTIwJTYwLmZyb21fcHJldHJhaW5lZCguLi4pJTYwJTBBbnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBSZW1CZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGcmVtYmVydCUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, RemBertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = logits.argmax().item()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=s("p"),b=o("Example of single-label classification:"),h=p(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);b=n(c,"Example of single-label classification:"),c.forEach(t),h=m(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),y=!0},p:He,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){R(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),B(u,l)}}}function tw(C){let d,b,h,u,y;return u=new Ye({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFJlbUJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGcmVtYmVydCUyMiklMEFtb2RlbCUyMCUzRCUyMFJlbUJlcnRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZyZW1iZXJ0JTIyJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkcyUyMCUzRCUyMHRvcmNoLmFyYW5nZSgwJTJDJTIwbG9naXRzLnNoYXBlJTVCLTElNUQpJTVCdG9yY2guc2lnbW9pZChsb2dpdHMpLnNxdWVlemUoZGltJTNEMCklMjAlM0UlMjAwLjUlNUQlMEElMEElMjMlMjBUbyUyMHRyYWluJTIwYSUyMG1vZGVsJTIwb24lMjAlNjBudW1fbGFiZWxzJTYwJTIwY2xhc3NlcyUyQyUyMHlvdSUyMGNhbiUyMHBhc3MlMjAlNjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyU2MCUyMHRvJTIwJTYwLmZyb21fcHJldHJhaW5lZCguLi4pJTYwJTBBbnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBSZW1CZXJ0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyZ29vZ2xlJTJGcmVtYmVydCUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, RemBertForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;google/rembert&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 = RemBertForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;google/rembert&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),b=o("Example:"),h=p(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);b=n(c,"Example:"),c.forEach(t),h=m(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),y=!0},p:He,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){R(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),B(u,l)}}}function sw(C){let d,b,h,u,y;return{c(){d=s("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),y=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=a(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var j=a(h);u=n(j,"Module"),j.forEach(t),y=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,y)},d(l){l&&t(d)}}}function rw(C){let d,b,h,u,y;return u=new Ye({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSZW1CZXJ0Rm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGcmVtYmVydCUyMiklMEFtb2RlbCUyMCUzRCUyMFJlbUJlcnRGb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZyZW1iZXJ0JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjAlMjJIdWdnaW5nRmFjZSUyMGlzJTIwYSUyMGNvbXBhbnklMjBiYXNlZCUyMGluJTIwUGFyaXMlMjBhbmQlMjBOZXclMjBZb3JrJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTBBKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUyMCUzRCUyMGxvZ2l0cy5hcmdtYXgoLTEpJTBBJTBBJTIzJTIwTm90ZSUyMHRoYXQlMjB0b2tlbnMlMjBhcmUlMjBjbGFzc2lmaWVkJTIwcmF0aGVyJTIwdGhlbiUyMGlucHV0JTIwd29yZHMlMjB3aGljaCUyMG1lYW5zJTIwdGhhdCUwQSUyMyUyMHRoZXJlJTIwbWlnaHQlMjBiZSUyMG1vcmUlMjBwcmVkaWN0ZWQlMjB0b2tlbiUyMGNsYXNzZXMlMjB0aGFuJTIwd29yZHMuJTBBJTIzJTIwTXVsdGlwbGUlMjB0b2tlbiUyMGNsYXNzZXMlMjBtaWdodCUyMGFjY291bnQlMjBmb3IlMjB0aGUlMjBzYW1lJTIwd29yZCUwQXByZWRpY3RlZF90b2tlbnNfY2xhc3NlcyUyMCUzRCUyMCU1Qm1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnQuaXRlbSgpJTVEJTIwZm9yJTIwdCUyMGluJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyU1QjAlNUQlNUQlMEElMEFsYWJlbHMlMjAlM0QlMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTBBbG9zcyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3Nz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RemBertForTokenClassification
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForTokenClassification.from_pretrained(<span class="hljs-string">&quot;google/rembert&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=s("p"),b=o("Example:"),h=p(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);b=n(c,"Example:"),c.forEach(t),h=m(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),y=!0},p:He,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){R(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),B(u,l)}}}function aw(C){let d,b,h,u,y;return{c(){d=s("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=s("code"),u=o("Module"),y=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=r(l,"P",{});var c=a(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var j=a(h);u=n(j,"Module"),j.forEach(t),y=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,y)},d(l){l&&t(d)}}}function iw(C){let d,b,h,u,y;return u=new Ye({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSZW1CZXJ0Rm9yUXVlc3Rpb25BbnN3ZXJpbmclMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnJlbWJlcnQlMjIpJTBBbW9kZWwlMjAlM0QlMjBSZW1CZXJ0Rm9yUXVlc3Rpb25BbnN3ZXJpbmcuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnJlbWJlcnQlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWFuc3dlcl9zdGFydF9pbmRleCUyMCUzRCUyMG91dHB1dHMuc3RhcnRfbG9naXRzLmFyZ21heCgpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMG91dHB1dHMuZW5kX2xvZ2l0cy5hcmdtYXgoKSUwQSUwQXByZWRpY3RfYW5zd2VyX3Rva2VucyUyMCUzRCUyMGlucHV0cy5pbnB1dF9pZHMlNUIwJTJDJTIwYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNBJTIwYW5zd2VyX2VuZF9pbmRleCUyMCUyQiUyMDElNUQlMEElMEElMjMlMjB0YXJnZXQlMjBpcyUyMCUyMm5pY2UlMjBwdXBwZXQlMjIlMEF0YXJnZXRfc3RhcnRfaW5kZXglMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxNSU1RCklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBzdGFydF9wb3NpdGlvbnMlM0R0YXJnZXRfc3RhcnRfaW5kZXglMkMlMjBlbmRfcG9zaXRpb25zJTNEdGFyZ2V0X2VuZF9pbmRleCklMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3Nz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RemBertForQuestionAnswering
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RemBertForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]

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

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = tf.math.argmax(selected_logits, axis=-<span class="hljs-number">1</span>)`}}),{c(){d=s("p"),b=o("Example:"),h=p(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);b=n(c,"Example:"),c.forEach(t),h=m(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),y=!0},p:He,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){R(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),B(u,l)}}}function uw(C){let d,b;return d=new Ye({props:{code:"bGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwUGFyaXMuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMjMlMjBtYXNrJTIwbGFiZWxzJTIwb2YlMjBub24tJTVCTUFTSyU1RCUyMHRva2VucyUwQWxhYmVscyUyMCUzRCUyMHRmLndoZXJlKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCUyQyUyMGxhYmVscyUyQyUyMC0xMDApJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(<span class="hljs-string">&quot;The capital of France is Paris.&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># mask labels of non-[MASK] tokens</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.where(inputs.input_ids == tokenizer.mask_token_id, labels, -<span class="hljs-number">100</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)`}}),{c(){v(d.$$.fragment)},l(h){w(d.$$.fragment,h)},m(h,u){M(d,h,u),b=!0},p:He,i(h){b||($(d.$$.fragment,h),b=!0)},o(h){R(d.$$.fragment,h),b=!1},d(h){B(d,h)}}}function fw(C){let d,b,h,u,y,l,c,j,Me,ge,N,ae,te,k,$e,D,Re,_e,S,Be,le,Q,Fe,be,V,Ee,ye,L,me,Ce,oe,J,U,Te,X,je,ke,A,ie,he,z,Je,P,ze,ve,Z,ue,de,W,Ue,O,ce,se,I,fe,x,Ie,xe;return{c(){d=s("p"),b=o("TensorFlow models and layers in "),h=s("code"),u=o("transformers"),y=o(" accept two formats as input:"),l=p(),c=s("ul"),j=s("li"),Me=o("having all inputs as keyword arguments (like PyTorch models), or"),ge=p(),N=s("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),te=p(),k=s("p"),$e=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),D=s("code"),Re=o("model.fit()"),_e=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),S=s("code"),Be=o("model.fit()"),le=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=s("code"),Fe=o("fit()"),be=o(" and "),V=s("code"),Ee=o("predict()"),ye=o(`, such as when creating your own layers or models with
the Keras `),L=s("code"),me=o("Functional"),Ce=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),J=s("ul"),U=s("li"),Te=o("a single Tensor with "),X=s("code"),je=o("input_ids"),ke=o(" only and nothing else: "),A=s("code"),ie=o("model(input_ids)"),he=p(),z=s("li"),Je=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=s("code"),ze=o("model([input_ids, attention_mask])"),ve=o(" or "),Z=s("code"),ue=o("model([input_ids, attention_mask, token_type_ids])"),de=p(),W=s("li"),Ue=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),O=s("code"),ce=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),se=p(),I=s("p"),fe=o(`Note that when creating models and layers with
`),x=s("a"),Ie=o("subclassing"),xe=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(f){d=r(f,"P",{});var F=a(d);b=n(F,"TensorFlow models and layers in "),h=r(F,"CODE",{});var Le=a(h);u=n(Le,"transformers"),Le.forEach(t),y=n(F," accept two formats as input:"),F.forEach(t),l=m(f),c=r(f,"UL",{});var re=a(c);j=r(re,"LI",{});var Ne=a(j);Me=n(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),ge=m(re),N=r(re,"LI",{});var qe=a(N);ae=n(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),re.forEach(t),te=m(f),k=r(f,"P",{});var E=a(k);$e=n(E,`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 `),D=r(E,"CODE",{});var Xe=a(D);Re=n(Xe,"model.fit()"),Xe.forEach(t),_e=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),S=r(E,"CODE",{});var Ae=a(S);Be=n(Ae,"model.fit()"),Ae.forEach(t),le=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),Q=r(E,"CODE",{});var We=a(Q);Fe=n(We,"fit()"),We.forEach(t),be=n(E," and "),V=r(E,"CODE",{});var De=a(V);Ee=n(De,"predict()"),De.forEach(t),ye=n(E,`, such as when creating your own layers or models with
the Keras `),L=r(E,"CODE",{});var Ve=a(L);me=n(Ve,"Functional"),Ve.forEach(t),Ce=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),oe=m(f),J=r(f,"UL",{});var q=a(J);U=r(q,"LI",{});var G=a(U);Te=n(G,"a single Tensor with "),X=r(G,"CODE",{});var Se=a(X);je=n(Se,"input_ids"),Se.forEach(t),ke=n(G," only and nothing else: "),A=r(G,"CODE",{});var Ze=a(A);ie=n(Ze,"model(input_ids)"),Ze.forEach(t),G.forEach(t),he=m(q),z=r(q,"LI",{});var H=a(z);Je=n(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=r(H,"CODE",{});var Ge=a(P);ze=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),ve=n(H," or "),Z=r(H,"CODE",{});var Pe=a(Z);ue=n(Pe,"model([input_ids, attention_mask, token_type_ids])"),Pe.forEach(t),H.forEach(t),de=m(q),W=r(q,"LI",{});var we=a(W);Ue=n(we,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),O=r(we,"CODE",{});var pe=a(O);ce=n(pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),pe.forEach(t),we.forEach(t),q.forEach(t),se=m(f),I=r(f,"P",{});var K=a(I);fe=n(K,`Note that when creating models and layers with
`),x=r(K,"A",{href:!0,rel:!0});var Oe=a(x);Ie=n(Oe,"subclassing"),Oe.forEach(t),xe=n(K,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),K.forEach(t),this.h()},h(){g(x,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),g(x,"rel","nofollow")},m(f,F){_(f,d,F),e(d,b),e(d,h),e(h,u),e(d,y),_(f,l,F),_(f,c,F),e(c,j),e(j,Me),e(c,ge),e(c,N),e(N,ae),_(f,te,F),_(f,k,F),e(k,$e),e(k,D),e(D,Re),e(k,_e),e(k,S),e(S,Be),e(k,le),e(k,Q),e(Q,Fe),e(k,be),e(k,V),e(V,Ee),e(k,ye),e(k,L),e(L,me),e(k,Ce),_(f,oe,F),_(f,J,F),e(J,U),e(U,Te),e(U,X),e(X,je),e(U,ke),e(U,A),e(A,ie),e(J,he),e(J,z),e(z,Je),e(z,P),e(P,ze),e(z,ve),e(z,Z),e(Z,ue),e(J,de),e(J,W),e(W,Ue),e(W,O),e(O,ce),_(f,se,F),_(f,I,F),e(I,fe),e(I,x),e(x,Ie),e(I,xe)},d(f){f&&t(d),f&&t(l),f&&t(c),f&&t(te),f&&t(k),f&&t(oe),f&&t(J),f&&t(se),f&&t(I)}}}function gw(C){let d,b,h,u,y;return u=new Ye({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJlbUJlcnRGb3JDYXVzYWxMTSUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGcmVtYmVydCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGUmVtQmVydEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZyZW1iZXJ0JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRemBertForCausalLM
<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;google/rembert&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRemBertForCausalLM.from_pretrained(<span class="hljs-string">&quot;google/rembert&quot;</span>)

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

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

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

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

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

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

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

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

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]`}}),{c(){d=s("p"),b=o("Example:"),h=p(),v(u.$$.fragment)},l(l){d=r(l,"P",{});var c=a(d);b=n(c,"Example:"),c.forEach(t),h=m(l),w(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),y=!0},p:He,i(l){y||($(u.$$.fragment,l),y=!0)},o(l){R(u.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),B(u,l)}}}function jw(C){let d,b;return d=new Ye({props:{code:"JTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdGYuY29uc3RhbnQoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRmLmNvbnN0YW50KCU1QjE1JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG91dHB1dHMubG9zcyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = tf.constant([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = tf.constant([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(outputs.loss)`}}),{c(){v(d.$$.fragment)},l(h){w(d.$$.fragment,h)},m(h,u){M(d,h,u),b=!0},p:He,i(h){b||($(d.$$.fragment,h),b=!0)},o(h){R(d.$$.fragment,h),b=!1},d(h){B(d,h)}}}function Jw(C){let d,b,h,u,y,l,c,j,Me,ge,N,ae,te,k,$e,D,Re,_e,S,Be,le,Q,Fe,be,V,Ee,ye,L,me,Ce,oe,J,U,Te,X,je,ke,A,ie,he,z,Je,P,ze,ve,Z,ue,de,W,Ue,O,ce,se,I,fe,x,Ie,xe,f,F,Le,re,Ne,qe,E,Xe,Ae,We,De,Ve,q,G,Se,Ze,H,Ge,Pe,we,pe,K,Oe,so,bp,pa,yp,Tp,ps,kp,vp,wp,ro,Mp,ma,$p,Rp,ha,Bp,Fp,Ep,Go,Vd,ao,Vo,ci,ms,Cp,pi,jp,Ld,tt,hs,Jp,us,zp,fs,Up,Ip,xp,gs,Zp,ua,qp,Wp,Np,Ot,_s,Ap,mi,Sp,Gp,bs,fa,Vp,hi,Lp,Xp,ga,Dp,ui,Pp,Op,Lo,ys,Qp,Ts,Hp,fi,Yp,Kp,em,Bt,ks,tm,gi,om,nm,Xo,sm,io,rm,_i,am,im,bi,lm,dm,cm,_a,vs,Xd,lo,Do,yi,ws,pm,Ti,mm,Dd,nt,Ms,hm,Lt,um,ki,fm,gm,$s,_m,bm,ba,ym,Tm,km,Qt,Rs,vm,vi,wm,Mm,Bs,ya,$m,wi,Rm,Bm,Ta,Fm,Mi,Em,Cm,Po,Fs,jm,Es,Jm,$i,zm,Um,Im,Ft,Cs,xm,Ri,Zm,qm,Oo,Wm,Bi,Nm,Am,ka,js,Pd,co,Qo,Fi,Js,Sm,Ei,Gm,Od,ht,zs,Vm,Us,Lm,Is,Xm,Dm,Pm,xs,Om,Zs,Qm,Hm,Ym,st,Km,Ci,eh,th,ji,oh,nh,Ji,sh,rh,zi,ah,ih,Ui,lh,dh,Ii,ch,ph,mh,Et,qs,hh,po,uh,va,fh,gh,xi,_h,bh,yh,Ho,Th,Yo,Qd,mo,Ko,Zi,Ws,kh,qi,vh,Hd,Xt,Ns,wh,ho,Mh,Wi,$h,Rh,As,Bh,Fh,Eh,Ct,Ss,Ch,uo,jh,wa,Jh,zh,Ni,Uh,Ih,xh,en,Zh,tn,Yd,fo,on,Ai,Gs,qh,Si,Wh,Kd,Dt,Vs,Nh,go,Ah,Gi,Sh,Gh,Ls,Vh,Lh,Xh,jt,Xs,Dh,_o,Ph,Ma,Oh,Qh,Vi,Hh,Yh,Kh,nn,eu,sn,ec,bo,rn,Li,Ds,tu,Xi,ou,tc,wt,Ps,nu,Di,su,ru,Os,au,Qs,iu,lu,du,ft,Hs,cu,yo,pu,$a,mu,hu,Pi,uu,fu,gu,an,_u,ln,bu,dn,oc,To,cn,Oi,Ys,yu,Qi,Tu,nc,Mt,Ks,ku,Hi,vu,wu,er,Mu,tr,$u,Ru,Bu,Jt,or,Fu,ko,Eu,Ra,Cu,ju,Yi,Ju,zu,Uu,pn,Iu,mn,sc,vo,hn,Ki,nr,xu,el,Zu,rc,$t,sr,qu,tl,Wu,Nu,rr,Au,ar,Su,Gu,Vu,zt,ir,Lu,wo,Xu,Ba,Du,Pu,ol,Ou,Qu,Hu,un,Yu,fn,ac,Mo,gn,nl,lr,Ku,sl,ef,ic,Rt,dr,tf,$o,of,rl,nf,sf,al,rf,af,lf,cr,df,pr,cf,pf,mf,Ut,mr,hf,Ro,uf,Fa,ff,gf,il,_f,bf,yf,_n,Tf,bn,lc,Bo,yn,ll,hr,kf,dl,vf,dc,rt,ur,wf,cl,Mf,$f,fr,Rf,Ea,Bf,Ff,Ef,gr,Cf,_r,jf,Jf,zf,Tn,Uf,It,br,If,Fo,xf,Ca,Zf,qf,pl,Wf,Nf,Af,kn,Sf,vn,cc,Eo,wn,ml,yr,Gf,hl,Vf,pc,at,Tr,Lf,kr,Xf,ul,Df,Pf,Of,vr,Qf,ja,Hf,Yf,Kf,wr,eg,Mr,tg,og,ng,Mn,sg,gt,$r,rg,Co,ag,Ja,ig,lg,fl,dg,cg,pg,$n,mg,Rn,hg,Bn,mc,jo,Fn,gl,Rr,ug,_l,fg,hc,it,Br,gg,Fr,_g,bl,bg,yg,Tg,Er,kg,za,vg,wg,Mg,Cr,$g,jr,Rg,Bg,Fg,En,Eg,_t,Jr,Cg,ot,jg,yl,Jg,zg,Tl,Ug,Ig,kl,xg,Zg,vl,qg,Wg,wl,Ng,Ag,Ml,Sg,Gg,$l,Vg,Lg,Xg,zr,Ur,Dg,Rl,Pg,Og,Qg,Ir,Hg,Bl,Yg,Kg,e_,Y,t_,Fl,o_,n_,El,s_,r_,Cl,a_,i_,jl,l_,d_,Jl,c_,p_,zl,m_,h_,Ul,u_,f_,Il,g_,__,xl,b_,y_,Zl,T_,k_,ql,v_,w_,Wl,M_,$_,Nl,R_,B_,Al,F_,E_,Sl,C_,j_,Gl,J_,z_,Vl,U_,I_,Ll,x_,Z_,Xl,q_,W_,Dl,N_,A_,S_,Cn,uc,Jo,jn,Pl,xr,G_,Ol,V_,fc,lt,Zr,L_,Ql,X_,D_,qr,P_,Ua,O_,Q_,H_,Wr,Y_,Nr,K_,eb,tb,Jn,ob,bt,Ar,nb,zo,sb,Ia,rb,ab,Hl,ib,lb,db,zn,cb,Un,pb,In,gc,Uo,xn,Yl,Sr,mb,Kl,hb,_c,dt,Gr,ub,ed,fb,gb,Vr,_b,xa,bb,yb,Tb,Lr,kb,Xr,vb,wb,Mb,Zn,$b,xt,Dr,Rb,Io,Bb,Za,Fb,Eb,td,Cb,jb,Jb,qn,zb,Wn,bc,xo,Nn,od,Pr,Ub,nd,Ib,yc,ct,Or,xb,sd,Zb,qb,Qr,Wb,qa,Nb,Ab,Sb,Hr,Gb,Yr,Vb,Lb,Xb,An,Db,yt,Kr,Pb,Zo,Ob,Wa,Qb,Hb,rd,Yb,Kb,ey,Sn,ty,Gn,oy,Vn,Tc,qo,Ln,ad,ea,ny,id,sy,kc,pt,ta,ry,Wo,ay,ld,iy,ly,dd,dy,cy,py,oa,my,Na,hy,uy,fy,na,gy,sa,_y,by,yy,Xn,Ty,Tt,ra,ky,No,vy,Aa,wy,My,cd,$y,Ry,By,Dn,Fy,Pn,Ey,On,vc;return l=new et({}),k=new et({}),z=new et({}),Ze=new et({}),K=new ne({props:{name:"class transformers.RemBertConfig",anchor:"transformers.RemBertConfig",parameters:[{name:"vocab_size",val:" = 250300"},{name:"hidden_size",val:" = 1152"},{name:"num_hidden_layers",val:" = 32"},{name:"num_attention_heads",val:" = 18"},{name:"input_embedding_size",val:" = 256"},{name:"output_embedding_size",val:" = 1664"},{name:"intermediate_size",val:" = 4608"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.0"},{name:"attention_probs_dropout_prob",val:" = 0.0"},{name:"classifier_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"use_cache",val:" = True"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 312"},{name:"eos_token_id",val:" = 313"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.RemBertConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 250300) &#x2014;
Vocabulary size of the RemBERT 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.33.0/en/model_doc/rembert#transformers.RemBertModel">RemBertModel</a> or <a href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.TFRemBertModel">TFRemBertModel</a>. Vocabulary size of the model.
Defines the different tokens that can be represented by the <em>inputs_ids</em> passed to the forward method of
<a href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertModel">RemBertModel</a>.`,name:"vocab_size"},{anchor:"transformers.RemBertConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1152) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.RemBertConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.RemBertConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 18) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.RemBertConfig.input_embedding_size",description:`<strong>input_embedding_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the input embeddings.`,name:"input_embedding_size"},{anchor:"transformers.RemBertConfig.output_embedding_size",description:`<strong>output_embedding_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1664) &#x2014;
Dimensionality of the output embeddings.`,name:"output_embedding_size"},{anchor:"transformers.RemBertConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4608) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.RemBertConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.RemBertConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.RemBertConfig.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.RemBertConfig.classifier_dropout_prob",description:`<strong>classifier_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the classifier layer when fine-tuning.`,name:"classifier_dropout_prob"},{anchor:"transformers.RemBertConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.RemBertConfig.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.33.0/en/model_doc/rembert#transformers.RemBertModel">RemBertModel</a> or <a href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.TFRemBertModel">TFRemBertModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.RemBertConfig.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.RemBertConfig.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.RemBertConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model is used as a decoder or not. If <code>False</code>, the model is used as an encoder.`,name:"is_decoder"},{anchor:"transformers.RemBertConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/rembert/configuration_rembert.py#L32"}}),Go=new Qe({props:{anchor:"transformers.RemBertConfig.example",$$slots:{default:[Vv]},$$scope:{ctx:C}}}),ms=new et({}),hs=new ne({props:{name:"class transformers.RemBertTokenizer",anchor:"transformers.RemBertTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = False"},{name:"remove_space",val:" = True"},{name:"keep_accents",val:" = True"},{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.RemBertTokenizer.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.RemBertTokenizer.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.RemBertTokenizer.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.RemBertTokenizer.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.RemBertTokenizer.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.RemBertTokenizer.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.RemBertTokenizer.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.RemBertTokenizer.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.RemBertTokenizer.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.33.0/src/transformers/models/rembert/tokenization_rembert.py#L43"}}),_s=new ne({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.RemBertTokenizer.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.RemBertTokenizer.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.RemBertTokenizer.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.33.0/src/transformers/models/rembert/tokenization_rembert.py#L172",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>
`}}),ys=new ne({props:{name:"get_special_tokens_mask",anchor:"transformers.RemBertTokenizer.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.RemBertTokenizer.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.RemBertTokenizer.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.RemBertTokenizer.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.33.0/src/transformers/models/rembert/tokenization_rembert.py#L197",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>
`}}),ks=new ne({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.RemBertTokenizer.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.RemBertTokenizer.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.RemBertTokenizer.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.33.0/src/transformers/models/rembert/tokenization_rembert.py#L228",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>
`}}),Xo=new Qe({props:{anchor:"transformers.RemBertTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[Lv]},$$scope:{ctx:C}}}),vs=new ne({props:{name:"save_vocabulary",anchor:"transformers.RemBertTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/rembert/tokenization_rembert.py#L258"}}),ws=new et({}),Ms=new ne({props:{name:"class transformers.RemBertTokenizerFast",anchor:"transformers.RemBertTokenizerFast",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.RemBertTokenizerFast.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.RemBertTokenizerFast.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.RemBertTokenizerFast.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.RemBertTokenizerFast.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.RemBertTokenizerFast.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.RemBertTokenizerFast.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.RemBertTokenizerFast.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.RemBertTokenizerFast.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.RemBertTokenizerFast.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.RemBertTokenizerFast.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.RemBertTokenizerFast.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.33.0/src/transformers/models/rembert/tokenization_rembert_fast.py#L51"}}),Rs=new ne({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.RemBertTokenizerFast.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.RemBertTokenizerFast.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.RemBertTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/rembert/tokenization_rembert_fast.py#L147",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>
`}}),Fs=new ne({props:{name:"get_special_tokens_mask",anchor:"transformers.RemBertTokenizerFast.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.RemBertTokenizerFast.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.RemBertTokenizerFast.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.RemBertTokenizerFast.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;
Set to True if 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.33.0/src/transformers/models/rembert/tokenization_rembert_fast.py#L172",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>
`}}),Cs=new ne({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.RemBertTokenizerFast.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.RemBertTokenizerFast.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.RemBertTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>None</code>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/rembert/tokenization_rembert_fast.py#L203",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>
`}}),Oo=new Qe({props:{anchor:"transformers.RemBertTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[Xv]},$$scope:{ctx:C}}}),js=new ne({props:{name:"save_vocabulary",anchor:"transformers.RemBertTokenizerFast.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/rembert/tokenization_rembert_fast.py#L233"}}),Js=new et({}),zs=new ne({props:{name:"class transformers.RemBertModel",anchor:"transformers.RemBertModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.RemBertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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.33.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.33.0/src/transformers/models/rembert/modeling_rembert.py#L746"}}),qs=new ne({props:{name:"forward",anchor:"transformers.RemBertModel.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = 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:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RemBertModel.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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.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.RemBertModel.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.RemBertModel.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.RemBertModel.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.RemBertModel.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.RemBertModel.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RemBertModel.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.RemBertModel.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.RemBertModel.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.33.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RemBertModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.RemBertModel.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.RemBertModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.RemBertModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/rembert/modeling_rembert.py#L785",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</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.33.0/en/model_doc/rembert#transformers.RemBertConfig"
>RemBertConfig</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>
<p>If <code>past_key_values</code> is used only the last hidden-state of the sequences of shape <code>(batch_size, 1, hidden_size)</code> is output.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.33.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPastAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ho=new Ke({props:{$$slots:{default:[Dv]},$$scope:{ctx:C}}}),Yo=new Qe({props:{anchor:"transformers.RemBertModel.forward.example",$$slots:{default:[Pv]},$$scope:{ctx:C}}}),Ws=new et({}),Ns=new ne({props:{name:"class transformers.RemBertForCausalLM",anchor:"transformers.RemBertForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RemBertForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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.33.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.33.0/src/transformers/models/rembert/modeling_rembert.py#L1020"}}),Ss=new ne({props:{name:"forward",anchor:"transformers.RemBertForCausalLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = 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:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RemBertForCausalLM.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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.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.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RemBertForCausalLM.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.RemBertForCausalLM.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.RemBertForCausalLM.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.33.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RemBertForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.RemBertForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.RemBertForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.RemBertForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the left-to-right language modeling loss (next word prediction). Indices should be in
<code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are
ignored (masked), the loss is only computed for the tokens with labels n <code>[0, ..., config.vocab_size]</code>.`,name:"labels"},{anchor:"transformers.RemBertForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/rembert/modeling_rembert.py#L1041",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertConfig"
>RemBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.33.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),en=new Ke({props:{$$slots:{default:[Ov]},$$scope:{ctx:C}}}),tn=new Qe({props:{anchor:"transformers.RemBertForCausalLM.forward.example",$$slots:{default:[Qv]},$$scope:{ctx:C}}}),Gs=new et({}),Vs=new ne({props:{name:"class transformers.RemBertForMaskedLM",anchor:"transformers.RemBertForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RemBertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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.33.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.33.0/src/transformers/models/rembert/modeling_rembert.py#L916"}}),Xs=new ne({props:{name:"forward",anchor:"transformers.RemBertForMaskedLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.LongTensor] = 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:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",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.RemBertForMaskedLM.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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.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.RemBertForMaskedLM.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.RemBertForMaskedLM.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.RemBertForMaskedLM.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.RemBertForMaskedLM.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.RemBertForMaskedLM.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RemBertForMaskedLM.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.RemBertForMaskedLM.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.RemBertForMaskedLM.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.33.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RemBertForMaskedLM.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.33.0/src/transformers/models/rembert/modeling_rembert.py#L940",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.0/en/model_doc/rembert#transformers.RemBertConfig"
>RemBertConfig</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.33.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),nn=new Ke({props:{$$slots:{default:[Hv]},$$scope:{ctx:C}}}),sn=new Qe({props:{anchor:"transformers.RemBertForMaskedLM.forward.example",$$slots:{default:[Yv]},$$scope:{ctx:C}}}),Ds=new et({}),Ps=new ne({props:{name:"class transformers.RemBertForSequenceClassification",anchor:"transformers.RemBertForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RemBertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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.33.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.33.0/src/transformers/models/rembert/modeling_rembert.py#L1172"}}),Hs=new ne({props:{name:"forward",anchor:"transformers.RemBertForSequenceClassification.forward",parameters:[{name:"input_ids",val:": FloatTensor = 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.FloatTensor] = 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.RemBertForSequenceClassification.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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.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.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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.RemBertForSequenceClassification.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.33.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RemBertForSequenceClassification.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.33.0/src/transformers/models/rembert/modeling_rembert.py#L1183",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.0/en/model_doc/rembert#transformers.RemBertConfig"
>RemBertConfig</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.33.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),an=new Ke({props:{$$slots:{default:[Kv]},$$scope:{ctx:C}}}),ln=new Qe({props:{anchor:"transformers.RemBertForSequenceClassification.forward.example",$$slots:{default:[ew]},$$scope:{ctx:C}}}),dn=new Qe({props:{anchor:"transformers.RemBertForSequenceClassification.forward.example-2",$$slots:{default:[tw]},$$scope:{ctx:C}}}),Ys=new et({}),Ks=new ne({props:{name:"class transformers.RemBertForMultipleChoice",anchor:"transformers.RemBertForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RemBertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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.33.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.33.0/src/transformers/models/rembert/modeling_rembert.py#L1268"}}),or=new ne({props:{name:"forward",anchor:"transformers.RemBertForMultipleChoice.forward",parameters:[{name:"input_ids",val:": FloatTensor = 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.FloatTensor] = 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.RemBertForMultipleChoice.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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.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.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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.RemBertForMultipleChoice.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.33.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RemBertForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/rembert/modeling_rembert.py#L1279",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.0/en/model_doc/rembert#transformers.RemBertConfig"
>RemBertConfig</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.33.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),pn=new Ke({props:{$$slots:{default:[ow]},$$scope:{ctx:C}}}),mn=new Qe({props:{anchor:"transformers.RemBertForMultipleChoice.forward.example",$$slots:{default:[nw]},$$scope:{ctx:C}}}),nr=new et({}),sr=new ne({props:{name:"class transformers.RemBertForTokenClassification",anchor:"transformers.RemBertForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RemBertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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.33.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.33.0/src/transformers/models/rembert/modeling_rembert.py#L1359"}}),ir=new ne({props:{name:"forward",anchor:"transformers.RemBertForTokenClassification.forward",parameters:[{name:"input_ids",val:": FloatTensor = 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.FloatTensor] = 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.RemBertForTokenClassification.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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.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.RemBertForTokenClassification.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.RemBertForTokenClassification.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.RemBertForTokenClassification.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.RemBertForTokenClassification.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.RemBertForTokenClassification.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RemBertForTokenClassification.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.RemBertForTokenClassification.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.RemBertForTokenClassification.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.33.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RemBertForTokenClassification.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.33.0/src/transformers/models/rembert/modeling_rembert.py#L1371",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.0/en/model_doc/rembert#transformers.RemBertConfig"
>RemBertConfig</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.33.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),un=new Ke({props:{$$slots:{default:[sw]},$$scope:{ctx:C}}}),fn=new Qe({props:{anchor:"transformers.RemBertForTokenClassification.forward.example",$$slots:{default:[rw]},$$scope:{ctx:C}}}),lr=new et({}),dr=new ne({props:{name:"class transformers.RemBertForQuestionAnswering",anchor:"transformers.RemBertForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RemBertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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.33.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.33.0/src/transformers/models/rembert/modeling_rembert.py#L1437"}}),mr=new ne({props:{name:"forward",anchor:"transformers.RemBertForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": FloatTensor = 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.FloatTensor] = 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.RemBertForQuestionAnswering.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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.33.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RemBertForQuestionAnswering.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.RemBertForQuestionAnswering.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.33.0/src/transformers/models/rembert/modeling_rembert.py#L1449",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.0/en/model_doc/rembert#transformers.RemBertConfig"
>RemBertConfig</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.33.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_n=new Ke({props:{$$slots:{default:[aw]},$$scope:{ctx:C}}}),bn=new Qe({props:{anchor:"transformers.RemBertForQuestionAnswering.forward.example",$$slots:{default:[iw]},$$scope:{ctx:C}}}),hr=new et({}),ur=new ne({props:{name:"class transformers.TFRemBertModel",anchor:"transformers.TFRemBertModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRemBertModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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.33.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.33.0/src/transformers/models/rembert/modeling_tf_rembert.py#L916"}}),Tn=new Ke({props:{$$slots:{default:[lw]},$$scope:{ctx:C}}}),br=new ne({props:{name:"call",anchor:"transformers.TFRemBertModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_hidden_states",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"training",val:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFRemBertModel.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.33.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.TFRemBertModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRemBertModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRemBertModel.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRemBertModel.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRemBertModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRemBertModel.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.TFRemBertModel.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.TFRemBertModel.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.33.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.TFRemBertModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRemBertModel.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFRemBertModel.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.TFRemBertModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFRemBertModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/rembert/modeling_tf_rembert.py#L922",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertConfig"
>RemBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you\u2019re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.33.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),kn=new Ke({props:{$$slots:{default:[dw]},$$scope:{ctx:C}}}),vn=new Qe({props:{anchor:"transformers.TFRemBertModel.call.example",$$slots:{default:[cw]},$$scope:{ctx:C}}}),yr=new et({}),Tr=new ne({props:{name:"class transformers.TFRemBertForMaskedLM",anchor:"transformers.TFRemBertForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRemBertForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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.33.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.33.0/src/transformers/models/rembert/modeling_tf_rembert.py#L987"}}),Mn=new Ke({props:{$$slots:{default:[pw]},$$scope:{ctx:C}}}),$r=new ne({props:{name:"call",anchor:"transformers.TFRemBertForMaskedLM.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.TFRemBertForMaskedLM.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.33.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.TFRemBertForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRemBertForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRemBertForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRemBertForMaskedLM.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRemBertForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRemBertForMaskedLM.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.TFRemBertForMaskedLM.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.TFRemBertForMaskedLM.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.33.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.TFRemBertForMaskedLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRemBertForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/rembert/modeling_tf_rembert.py#L1003",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.0/en/model_doc/rembert#transformers.RemBertConfig"
>RemBertConfig</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.33.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),$n=new Ke({props:{$$slots:{default:[mw]},$$scope:{ctx:C}}}),Rn=new Qe({props:{anchor:"transformers.TFRemBertForMaskedLM.call.example",$$slots:{default:[hw]},$$scope:{ctx:C}}}),Bn=new Qe({props:{anchor:"transformers.TFRemBertForMaskedLM.call.example-2",$$slots:{default:[uw]},$$scope:{ctx:C}}}),Rr=new et({}),Br=new ne({props:{name:"class transformers.TFRemBertForCausalLM",anchor:"transformers.TFRemBertForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRemBertForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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.33.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.33.0/src/transformers/models/rembert/modeling_tf_rembert.py#L1061"}}),En=new Ke({props:{$$slots:{default:[fw]},$$scope:{ctx:C}}}),Jr=new ne({props:{name:"call",anchor:"transformers.TFRemBertForCausalLM.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"position_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_hidden_states",val:": np.ndarray | tf.Tensor | None = None"},{name:"encoder_attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"past_key_values",val:": Optional[Tuple[Tuple[Union[np.ndarray, tf.Tensor]]]] = None"},{name:"use_cache",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": Optional[bool] = False"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/rembert/modeling_tf_rembert.py#L1087",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.0/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertConfig"
>RemBertConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.33.0/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Cn=new Qe({props:{anchor:"transformers.TFRemBertForCausalLM.call.example",$$slots:{default:[gw]},$$scope:{ctx:C}}}),xr=new et({}),Zr=new ne({props:{name:"class transformers.TFRemBertForSequenceClassification",anchor:"transformers.TFRemBertForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRemBertForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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.33.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.33.0/src/transformers/models/rembert/modeling_tf_rembert.py#L1180"}}),Jn=new Ke({props:{$$slots:{default:[_w]},$$scope:{ctx:C}}}),Ar=new ne({props:{name:"call",anchor:"transformers.TFRemBertForSequenceClassification.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.TFRemBertForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.33.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.TFRemBertForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRemBertForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRemBertForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRemBertForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRemBertForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRemBertForSequenceClassification.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.TFRemBertForSequenceClassification.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.TFRemBertForSequenceClassification.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.33.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.TFRemBertForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRemBertForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/rembert/modeling_tf_rembert.py#L1194",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.0/en/model_doc/rembert#transformers.RemBertConfig"
>RemBertConfig</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.33.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),zn=new Ke({props:{$$slots:{default:[bw]},$$scope:{ctx:C}}}),Un=new Qe({props:{anchor:"transformers.TFRemBertForSequenceClassification.call.example",$$slots:{default:[yw]},$$scope:{ctx:C}}}),In=new Qe({props:{anchor:"transformers.TFRemBertForSequenceClassification.call.example-2",$$slots:{default:[Tw]},$$scope:{ctx:C}}}),Sr=new et({}),Gr=new ne({props:{name:"class transformers.TFRemBertForMultipleChoice",anchor:"transformers.TFRemBertForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRemBertForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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.33.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.33.0/src/transformers/models/rembert/modeling_tf_rembert.py#L1257"}}),Zn=new Ke({props:{$$slots:{default:[kw]},$$scope:{ctx:C}}}),Dr=new ne({props:{name:"call",anchor:"transformers.TFRemBertForMultipleChoice.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.TFRemBertForMultipleChoice.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.33.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.TFRemBertForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRemBertForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRemBertForMultipleChoice.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRemBertForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRemBertForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRemBertForMultipleChoice.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.TFRemBertForMultipleChoice.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.TFRemBertForMultipleChoice.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.33.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.TFRemBertForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRemBertForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/rembert/modeling_tf_rembert.py#L1267",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.0/en/model_doc/rembert#transformers.RemBertConfig"
>RemBertConfig</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.33.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),qn=new Ke({props:{$$slots:{default:[vw]},$$scope:{ctx:C}}}),Wn=new Qe({props:{anchor:"transformers.TFRemBertForMultipleChoice.call.example",$$slots:{default:[ww]},$$scope:{ctx:C}}}),Pr=new et({}),Or=new ne({props:{name:"class transformers.TFRemBertForTokenClassification",anchor:"transformers.TFRemBertForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRemBertForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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.33.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.33.0/src/transformers/models/rembert/modeling_tf_rembert.py#L1353"}}),An=new Ke({props:{$$slots:{default:[Mw]},$$scope:{ctx:C}}}),Kr=new ne({props:{name:"call",anchor:"transformers.TFRemBertForTokenClassification.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.TFRemBertForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.33.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.TFRemBertForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRemBertForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRemBertForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRemBertForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRemBertForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRemBertForTokenClassification.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.TFRemBertForTokenClassification.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.TFRemBertForTokenClassification.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.33.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.TFRemBertForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRemBertForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/rembert/modeling_tf_rembert.py#L1365",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.0/en/model_doc/rembert#transformers.RemBertConfig"
>RemBertConfig</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.33.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Sn=new Ke({props:{$$slots:{default:[$w]},$$scope:{ctx:C}}}),Gn=new Qe({props:{anchor:"transformers.TFRemBertForTokenClassification.call.example",$$slots:{default:[Rw]},$$scope:{ctx:C}}}),Vn=new Qe({props:{anchor:"transformers.TFRemBertForTokenClassification.call.example-2",$$slots:{default:[Bw]},$$scope:{ctx:C}}}),ea=new et({}),ta=new ne({props:{name:"class transformers.TFRemBertForQuestionAnswering",anchor:"transformers.TFRemBertForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRemBertForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertConfig">RemBertConfig</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.33.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.33.0/src/transformers/models/rembert/modeling_tf_rembert.py#L1426"}}),Xn=new Ke({props:{$$slots:{default:[Fw]},$$scope:{ctx:C}}}),ra=new ne({props:{name:"call",anchor:"transformers.TFRemBertForQuestionAnswering.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.TFRemBertForQuestionAnswering.call.input_ids",description:`<strong>input_ids</strong> (<code>np.ndarray</code>, <code>tf.Tensor</code>, <code>List[tf.Tensor]</code> \`<code>Dict[str, tf.Tensor]</code> or <code>Dict[str, np.ndarray]</code> and each example must have the shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.33.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.TFRemBertForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRemBertForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRemBertForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRemBertForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRemBertForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>np.ndarray</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRemBertForQuestionAnswering.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.TFRemBertForQuestionAnswering.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.TFRemBertForQuestionAnswering.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.33.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.TFRemBertForQuestionAnswering.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to \`False&#x201C;) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRemBertForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.TFRemBertForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.33.0/src/transformers/models/rembert/modeling_tf_rembert.py#L1437",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.0/en/model_doc/rembert#transformers.RemBertConfig"
>RemBertConfig</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.33.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Dn=new Ke({props:{$$slots:{default:[Ew]},$$scope:{ctx:C}}}),Pn=new Qe({props:{anchor:"transformers.TFRemBertForQuestionAnswering.call.example",$$slots:{default:[Cw]},$$scope:{ctx:C}}}),On=new Qe({props:{anchor:"transformers.TFRemBertForQuestionAnswering.call.example-2",$$slots:{default:[jw]},$$scope:{ctx:C}}}),{c(){d=s("meta"),b=p(),h=s("h1"),u=s("a"),y=s("span"),v(l.$$.fragment),c=p(),j=s("span"),Me=o("RemBERT"),ge=p(),N=s("h2"),ae=s("a"),te=s("span"),v(k.$$.fragment),$e=p(),D=s("span"),Re=o("Overview"),_e=p(),S=s("p"),Be=o("The RemBERT model was proposed in "),le=s("a"),Q=o("Rethinking Embedding Coupling in Pre-trained Language Models"),Fe=o(" by Hyung Won Chung, Thibault F\xE9vry, Henry Tsai, Melvin Johnson, Sebastian Ruder."),be=p(),V=s("p"),Ee=o("The abstract from the paper is the following:"),ye=p(),L=s("p"),me=s("em"),Ce=o(`We re-evaluate the standard practice of sharing weights between input and output embeddings in state-of-the-art
pre-trained language models. We show that decoupled embeddings provide increased modeling flexibility, allowing us to
significantly improve the efficiency of parameter allocation in the input embedding of multilingual models. By
reallocating the input embedding parameters in the Transformer layers, we achieve dramatically better performance on
standard natural language understanding tasks with the same number of parameters during fine-tuning. We also show that
allocating additional capacity to the output embedding provides benefits to the model that persist through the
fine-tuning stage even though the output embedding is discarded after pre-training. Our analysis shows that larger
output embeddings prevent the model\u2019s last layers from overspecializing to the pre-training task and encourage
Transformer representations to be more general and more transferable to other tasks and languages. Harnessing these
findings, we are able to train models that achieve strong performance on the XTREME benchmark without increasing the
number of parameters at the fine-tuning stage.`),oe=p(),J=s("p"),U=o("Tips:"),Te=p(),X=s("p"),je=o(`For fine-tuning, RemBERT can be thought of as a bigger version of mBERT with an ALBERT-like factorization of the
embedding layer. The embeddings are not tied in pre-training, in contrast with BERT, which enables smaller input
embeddings (preserved during fine-tuning) and bigger output embeddings (discarded at fine-tuning). The tokenizer is
also similar to the Albert one rather than the BERT one.`),ke=p(),A=s("h2"),ie=s("a"),he=s("span"),v(z.$$.fragment),Je=p(),P=s("span"),ze=o("Documentation resources"),ve=p(),Z=s("ul"),ue=s("li"),de=s("a"),W=o("Text classification task guide"),Ue=p(),O=s("li"),ce=s("a"),se=o("Token classification task guide"),I=p(),fe=s("li"),x=s("a"),Ie=o("Question answering task guide"),xe=p(),f=s("li"),F=s("a"),Le=o("Causal language modeling task guide"),re=p(),Ne=s("li"),qe=s("a"),E=o("Masked language modeling task guide"),Xe=p(),Ae=s("li"),We=s("a"),De=o("Multiple choice task guide"),Ve=p(),q=s("h2"),G=s("a"),Se=s("span"),v(Ze.$$.fragment),H=p(),Ge=s("span"),Pe=o("RemBertConfig"),we=p(),pe=s("div"),v(K.$$.fragment),Oe=p(),so=s("p"),bp=o("This is the configuration class to store the configuration of a "),pa=s("a"),yp=o("RemBertModel"),Tp=o(`. It is used to instantiate an
RemBERT 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 RemBERT
`),ps=s("a"),kp=o("google/rembert"),vp=o(" architecture."),wp=p(),ro=s("p"),Mp=o("Configuration objects inherit from "),ma=s("a"),$p=o("PretrainedConfig"),Rp=o(` and can be used to control the model outputs. Read the
documentation from `),ha=s("a"),Bp=o("PretrainedConfig"),Fp=o(" for more information."),Ep=p(),v(Go.$$.fragment),Vd=p(),ao=s("h2"),Vo=s("a"),ci=s("span"),v(ms.$$.fragment),Cp=p(),pi=s("span"),jp=o("RemBertTokenizer"),Ld=p(),tt=s("div"),v(hs.$$.fragment),Jp=p(),us=s("p"),zp=o("Construct a RemBERT tokenizer. Based on "),fs=s("a"),Up=o("SentencePiece"),Ip=o("."),xp=p(),gs=s("p"),Zp=o("This tokenizer inherits from "),ua=s("a"),qp=o("PreTrainedTokenizer"),Wp=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Np=p(),Ot=s("div"),v(_s.$$.fragment),Ap=p(),mi=s("p"),Sp=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A REMBERT sequence has the following format:`),Gp=p(),bs=s("ul"),fa=s("li"),Vp=o("single sequence: "),hi=s("code"),Lp=o("[CLS] X [SEP]"),Xp=p(),ga=s("li"),Dp=o("pair of sequences: "),ui=s("code"),Pp=o("[CLS] A [SEP] B [SEP]"),Op=p(),Lo=s("div"),v(ys.$$.fragment),Qp=p(),Ts=s("p"),Hp=o(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),fi=s("code"),Yp=o("prepare_for_model"),Kp=o(" method."),em=p(),Bt=s("div"),v(ks.$$.fragment),tm=p(),gi=s("p"),om=o("Create a mask from the two sequences passed to be used in a sequence-pair classification task. A RemBERT"),nm=p(),v(Xo.$$.fragment),sm=p(),io=s("p"),rm=o("If "),_i=s("code"),am=o("token_ids_1"),im=o(" is "),bi=s("code"),lm=o("None"),dm=o(", this method only returns the first portion of the mask (0s)."),cm=p(),_a=s("div"),v(vs.$$.fragment),Xd=p(),lo=s("h2"),Do=s("a"),yi=s("span"),v(ws.$$.fragment),pm=p(),Ti=s("span"),mm=o("RemBertTokenizerFast"),Dd=p(),nt=s("div"),v(Ms.$$.fragment),hm=p(),Lt=s("p"),um=o("Construct a \u201Cfast\u201D RemBert tokenizer (backed by HuggingFace\u2019s "),ki=s("em"),fm=o("tokenizers"),gm=o(` library). Based on
`),$s=s("a"),_m=o("Unigram"),bm=o(`. This
tokenizer inherits from `),ba=s("a"),ym=o("PreTrainedTokenizerFast"),Tm=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods`),km=p(),Qt=s("div"),v(Rs.$$.fragment),vm=p(),vi=s("p"),wm=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RemBERT sequence has the following format:`),Mm=p(),Bs=s("ul"),ya=s("li"),$m=o("single sequence: "),wi=s("code"),Rm=o("[CLS] X [SEP]"),Bm=p(),Ta=s("li"),Fm=o("pair of sequences: "),Mi=s("code"),Em=o("[CLS] A [SEP] B [SEP]"),Cm=p(),Po=s("div"),v(Fs.$$.fragment),jm=p(),Es=s("p"),Jm=o(`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),$i=s("code"),zm=o("prepare_for_model"),Um=o(" method."),Im=p(),Ft=s("div"),v(Cs.$$.fragment),xm=p(),Ri=s("p"),Zm=o("Creates a mask from the two sequences passed to be used in a sequence-pair classification task. A RemBERT"),qm=p(),v(Oo.$$.fragment),Wm=p(),Bi=s("p"),Nm=o("if token_ids_1 is None, only returns the first portion of the mask (0s)."),Am=p(),ka=s("div"),v(js.$$.fragment),Pd=p(),co=s("h2"),Qo=s("a"),Fi=s("span"),v(Js.$$.fragment),Sm=p(),Ei=s("span"),Gm=o("RemBertModel"),Od=p(),ht=s("div"),v(zs.$$.fragment),Vm=p(),Us=s("p"),Lm=o(`The bare RemBERT Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Is=s("a"),Xm=o("torch.nn.Module"),Dm=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Pm=p(),xs=s("p"),Om=o(`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),Zs=s("a"),Qm=o(`Attention is
all you need`),Hm=o(` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),Ym=p(),st=s("p"),Km=o("To behave as an decoder the model needs to be initialized with the "),Ci=s("code"),eh=o("is_decoder"),th=o(` argument of the configuration set
to `),ji=s("code"),oh=o("True"),nh=o(". To be used in a Seq2Seq model, the model needs to initialized with both "),Ji=s("code"),sh=o("is_decoder"),rh=o(` argument and
`),zi=s("code"),ah=o("add_cross_attention"),ih=o(" set to "),Ui=s("code"),lh=o("True"),dh=o("; an "),Ii=s("code"),ch=o("encoder_hidden_states"),ph=o(" is then expected as an input to the forward pass."),mh=p(),Et=s("div"),v(qs.$$.fragment),hh=p(),po=s("p"),uh=o("The "),va=s("a"),fh=o("RemBertModel"),gh=o(" forward method, overrides the "),xi=s("code"),_h=o("__call__"),bh=o(" special method."),yh=p(),v(Ho.$$.fragment),Th=p(),v(Yo.$$.fragment),Qd=p(),mo=s("h2"),Ko=s("a"),Zi=s("span"),v(Ws.$$.fragment),kh=p(),qi=s("span"),vh=o("RemBertForCausalLM"),Hd=p(),Xt=s("div"),v(Ns.$$.fragment),wh=p(),ho=s("p"),Mh=o("RemBERT Model with a "),Wi=s("code"),$h=o("language modeling"),Rh=o(` head on top for CLM fine-tuning.
This model is a PyTorch `),As=s("a"),Bh=o("torch.nn.Module"),Fh=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Eh=p(),Ct=s("div"),v(Ss.$$.fragment),Ch=p(),uo=s("p"),jh=o("The "),wa=s("a"),Jh=o("RemBertForCausalLM"),zh=o(" forward method, overrides the "),Ni=s("code"),Uh=o("__call__"),Ih=o(" special method."),xh=p(),v(en.$$.fragment),Zh=p(),v(tn.$$.fragment),Yd=p(),fo=s("h2"),on=s("a"),Ai=s("span"),v(Gs.$$.fragment),qh=p(),Si=s("span"),Wh=o("RemBertForMaskedLM"),Kd=p(),Dt=s("div"),v(Vs.$$.fragment),Nh=p(),go=s("p"),Ah=o("RemBERT Model with a "),Gi=s("code"),Sh=o("language modeling"),Gh=o(` head on top.
This model is a PyTorch `),Ls=s("a"),Vh=o("torch.nn.Module"),Lh=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Xh=p(),jt=s("div"),v(Xs.$$.fragment),Dh=p(),_o=s("p"),Ph=o("The "),Ma=s("a"),Oh=o("RemBertForMaskedLM"),Qh=o(" forward method, overrides the "),Vi=s("code"),Hh=o("__call__"),Yh=o(" special method."),Kh=p(),v(nn.$$.fragment),eu=p(),v(sn.$$.fragment),ec=p(),bo=s("h2"),rn=s("a"),Li=s("span"),v(Ds.$$.fragment),tu=p(),Xi=s("span"),ou=o("RemBertForSequenceClassification"),tc=p(),wt=s("div"),v(Ps.$$.fragment),nu=p(),Di=s("p"),su=o(`RemBERT Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),ru=p(),Os=s("p"),au=o("This model is a PyTorch "),Qs=s("a"),iu=o("torch.nn.Module"),lu=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),du=p(),ft=s("div"),v(Hs.$$.fragment),cu=p(),yo=s("p"),pu=o("The "),$a=s("a"),mu=o("RemBertForSequenceClassification"),hu=o(" forward method, overrides the "),Pi=s("code"),uu=o("__call__"),fu=o(" special method."),gu=p(),v(an.$$.fragment),_u=p(),v(ln.$$.fragment),bu=p(),v(dn.$$.fragment),oc=p(),To=s("h2"),cn=s("a"),Oi=s("span"),v(Ys.$$.fragment),yu=p(),Qi=s("span"),Tu=o("RemBertForMultipleChoice"),nc=p(),Mt=s("div"),v(Ks.$$.fragment),ku=p(),Hi=s("p"),vu=o(`RemBERT 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.`),wu=p(),er=s("p"),Mu=o("This model is a PyTorch "),tr=s("a"),$u=o("torch.nn.Module"),Ru=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Bu=p(),Jt=s("div"),v(or.$$.fragment),Fu=p(),ko=s("p"),Eu=o("The "),Ra=s("a"),Cu=o("RemBertForMultipleChoice"),ju=o(" forward method, overrides the "),Yi=s("code"),Ju=o("__call__"),zu=o(" special method."),Uu=p(),v(pn.$$.fragment),Iu=p(),v(mn.$$.fragment),sc=p(),vo=s("h2"),hn=s("a"),Ki=s("span"),v(nr.$$.fragment),xu=p(),el=s("span"),Zu=o("RemBertForTokenClassification"),rc=p(),$t=s("div"),v(sr.$$.fragment),qu=p(),tl=s("p"),Wu=o(`RemBERT Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),Nu=p(),rr=s("p"),Au=o("This model is a PyTorch "),ar=s("a"),Su=o("torch.nn.Module"),Gu=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Vu=p(),zt=s("div"),v(ir.$$.fragment),Lu=p(),wo=s("p"),Xu=o("The "),Ba=s("a"),Du=o("RemBertForTokenClassification"),Pu=o(" forward method, overrides the "),ol=s("code"),Ou=o("__call__"),Qu=o(" special method."),Hu=p(),v(un.$$.fragment),Yu=p(),v(fn.$$.fragment),ac=p(),Mo=s("h2"),gn=s("a"),nl=s("span"),v(lr.$$.fragment),Ku=p(),sl=s("span"),ef=o("RemBertForQuestionAnswering"),ic=p(),Rt=s("div"),v(dr.$$.fragment),tf=p(),$o=s("p"),of=o(`RemBERT 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 `),rl=s("code"),nf=o("span start logits"),sf=o(" and "),al=s("code"),rf=o("span end logits"),af=o(")."),lf=p(),cr=s("p"),df=o("This model is a PyTorch "),pr=s("a"),cf=o("torch.nn.Module"),pf=o(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),mf=p(),Ut=s("div"),v(mr.$$.fragment),hf=p(),Ro=s("p"),uf=o("The "),Fa=s("a"),ff=o("RemBertForQuestionAnswering"),gf=o(" forward method, overrides the "),il=s("code"),_f=o("__call__"),bf=o(" special method."),yf=p(),v(_n.$$.fragment),Tf=p(),v(bn.$$.fragment),lc=p(),Bo=s("h2"),yn=s("a"),ll=s("span"),v(hr.$$.fragment),kf=p(),dl=s("span"),vf=o("TFRemBertModel"),dc=p(),rt=s("div"),v(ur.$$.fragment),wf=p(),cl=s("p"),Mf=o("The bare RemBERT Model transformer outputing raw hidden-states without any specific head on top."),$f=p(),fr=s("p"),Rf=o("This model inherits from "),Ea=s("a"),Bf=o("TFPreTrainedModel"),Ff=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Ef=p(),gr=s("p"),Cf=o("This model is also a "),_r=s("a"),jf=o("tf.keras.Model"),Jf=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),zf=p(),v(Tn.$$.fragment),Uf=p(),It=s("div"),v(br.$$.fragment),If=p(),Fo=s("p"),xf=o("The "),Ca=s("a"),Zf=o("TFRemBertModel"),qf=o(" forward method, overrides the "),pl=s("code"),Wf=o("__call__"),Nf=o(" special method."),Af=p(),v(kn.$$.fragment),Sf=p(),v(vn.$$.fragment),cc=p(),Eo=s("h2"),wn=s("a"),ml=s("span"),v(yr.$$.fragment),Gf=p(),hl=s("span"),Vf=o("TFRemBertForMaskedLM"),pc=p(),at=s("div"),v(Tr.$$.fragment),Lf=p(),kr=s("p"),Xf=o("RemBERT Model with a "),ul=s("code"),Df=o("language modeling"),Pf=o(" head on top."),Of=p(),vr=s("p"),Qf=o("This model inherits from "),ja=s("a"),Hf=o("TFPreTrainedModel"),Yf=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Kf=p(),wr=s("p"),eg=o("This model is also a "),Mr=s("a"),tg=o("tf.keras.Model"),og=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),ng=p(),v(Mn.$$.fragment),sg=p(),gt=s("div"),v($r.$$.fragment),rg=p(),Co=s("p"),ag=o("The "),Ja=s("a"),ig=o("TFRemBertForMaskedLM"),lg=o(" forward method, overrides the "),fl=s("code"),dg=o("__call__"),cg=o(" special method."),pg=p(),v($n.$$.fragment),mg=p(),v(Rn.$$.fragment),hg=p(),v(Bn.$$.fragment),mc=p(),jo=s("h2"),Fn=s("a"),gl=s("span"),v(Rr.$$.fragment),ug=p(),_l=s("span"),fg=o("TFRemBertForCausalLM"),hc=p(),it=s("div"),v(Br.$$.fragment),gg=p(),Fr=s("p"),_g=o("RemBERT Model with a "),bl=s("code"),bg=o("language modeling"),yg=o(" head on top for CLM fine-tuning."),Tg=p(),Er=s("p"),kg=o("This model inherits from "),za=s("a"),vg=o("TFPreTrainedModel"),wg=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Mg=p(),Cr=s("p"),$g=o("This model is also a "),jr=s("a"),Rg=o("tf.keras.Model"),Bg=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Fg=p(),v(En.$$.fragment),Eg=p(),_t=s("div"),v(Jr.$$.fragment),Cg=p(),ot=s("p"),jg=o("encoder_hidden_states  ("),yl=s("code"),Jg=o("tf.Tensor"),zg=o(" of shape "),Tl=s("code"),Ug=o("(batch_size, sequence_length, hidden_size)"),Ig=o(", "),kl=s("em"),xg=o("optional"),Zg=o(`):
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.
encoder_attention_mask (`),vl=s("code"),qg=o("tf.Tensor"),Wg=o(" of shape "),wl=s("code"),Ng=o("(batch_size, sequence_length)"),Ag=o(", "),Ml=s("em"),Sg=o("optional"),Gg=o(`):
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in `),$l=s("code"),Vg=o("[0, 1]"),Lg=o(":"),Xg=p(),zr=s("ul"),Ur=s("li"),Dg=o("1 for tokens that are "),Rl=s("strong"),Pg=o("not masked"),Og=o(","),Qg=p(),Ir=s("li"),Hg=o("0 for tokens that are "),Bl=s("strong"),Yg=o("masked"),Kg=o("."),e_=p(),Y=s("p"),t_=o("past_key_values ("),Fl=s("code"),o_=o("Tuple[Tuple[tf.Tensor]]"),n_=o(" of length "),El=s("code"),s_=o("config.n_layers"),r_=o(`)
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If `),Cl=s("code"),a_=o("past_key_values"),i_=o(" are used, the user can optionally input only the last "),jl=s("code"),l_=o("decoder_input_ids"),d_=o(` (those that
don\u2019t have their past key value states given to this model) of shape `),Jl=s("code"),c_=o("(batch_size, 1)"),p_=o(` instead of all
`),zl=s("code"),m_=o("decoder_input_ids"),h_=o(" of shape "),Ul=s("code"),u_=o("(batch_size, sequence_length)"),f_=o(`.
use_cache (`),Il=s("code"),g_=o("bool"),__=o(", "),xl=s("em"),b_=o("optional"),y_=o(", defaults to "),Zl=s("code"),T_=o("True"),k_=o(`):
If set to `),ql=s("code"),v_=o("True"),w_=o(", "),Wl=s("code"),M_=o("past_key_values"),$_=o(` key value states are returned and can be used to speed up decoding (see
`),Nl=s("code"),R_=o("past_key_values"),B_=o("). Set to "),Al=s("code"),F_=o("False"),E_=o(" during training, "),Sl=s("code"),C_=o("True"),j_=o(` during generation
labels (`),Gl=s("code"),J_=o("tf.Tensor"),z_=o(" or "),Vl=s("code"),U_=o("np.ndarray"),I_=o(" of shape "),Ll=s("code"),x_=o("(batch_size, sequence_length)"),Z_=o(", "),Xl=s("em"),q_=o("optional"),W_=o(`):
Labels for computing the cross entropy classification loss. Indices should be in `),Dl=s("code"),N_=o("[0, ..., config.vocab_size - 1]"),A_=o("."),S_=p(),v(Cn.$$.fragment),uc=p(),Jo=s("h2"),jn=s("a"),Pl=s("span"),v(xr.$$.fragment),G_=p(),Ol=s("span"),V_=o("TFRemBertForSequenceClassification"),fc=p(),lt=s("div"),v(Zr.$$.fragment),L_=p(),Ql=s("p"),X_=o("RemBERT Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),D_=p(),qr=s("p"),P_=o("This model inherits from "),Ua=s("a"),O_=o("TFPreTrainedModel"),Q_=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),H_=p(),Wr=s("p"),Y_=o("This model is also a "),Nr=s("a"),K_=o("tf.keras.Model"),eb=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),tb=p(),v(Jn.$$.fragment),ob=p(),bt=s("div"),v(Ar.$$.fragment),nb=p(),zo=s("p"),sb=o("The "),Ia=s("a"),rb=o("TFRemBertForSequenceClassification"),ab=o(" forward method, overrides the "),Hl=s("code"),ib=o("__call__"),lb=o(" special method."),db=p(),v(zn.$$.fragment),cb=p(),v(Un.$$.fragment),pb=p(),v(In.$$.fragment),gc=p(),Uo=s("h2"),xn=s("a"),Yl=s("span"),v(Sr.$$.fragment),mb=p(),Kl=s("span"),hb=o("TFRemBertForMultipleChoice"),_c=p(),dt=s("div"),v(Gr.$$.fragment),ub=p(),ed=s("p"),fb=o(`RemBERT 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.`),gb=p(),Vr=s("p"),_b=o("This model inherits from "),xa=s("a"),bb=o("TFPreTrainedModel"),yb=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Tb=p(),Lr=s("p"),kb=o("This model is also a "),Xr=s("a"),vb=o("tf.keras.Model"),wb=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Mb=p(),v(Zn.$$.fragment),$b=p(),xt=s("div"),v(Dr.$$.fragment),Rb=p(),Io=s("p"),Bb=o("The "),Za=s("a"),Fb=o("TFRemBertForMultipleChoice"),Eb=o(" forward method, overrides the "),td=s("code"),Cb=o("__call__"),jb=o(" special method."),Jb=p(),v(qn.$$.fragment),zb=p(),v(Wn.$$.fragment),bc=p(),xo=s("h2"),Nn=s("a"),od=s("span"),v(Pr.$$.fragment),Ub=p(),nd=s("span"),Ib=o("TFRemBertForTokenClassification"),yc=p(),ct=s("div"),v(Or.$$.fragment),xb=p(),sd=s("p"),Zb=o(`RemBERT 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.`),qb=p(),Qr=s("p"),Wb=o("This model inherits from "),qa=s("a"),Nb=o("TFPreTrainedModel"),Ab=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Sb=p(),Hr=s("p"),Gb=o("This model is also a "),Yr=s("a"),Vb=o("tf.keras.Model"),Lb=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Xb=p(),v(An.$$.fragment),Db=p(),yt=s("div"),v(Kr.$$.fragment),Pb=p(),Zo=s("p"),Ob=o("The "),Wa=s("a"),Qb=o("TFRemBertForTokenClassification"),Hb=o(" forward method, overrides the "),rd=s("code"),Yb=o("__call__"),Kb=o(" special method."),ey=p(),v(Sn.$$.fragment),ty=p(),v(Gn.$$.fragment),oy=p(),v(Vn.$$.fragment),Tc=p(),qo=s("h2"),Ln=s("a"),ad=s("span"),v(ea.$$.fragment),ny=p(),id=s("span"),sy=o("TFRemBertForQuestionAnswering"),kc=p(),pt=s("div"),v(ta.$$.fragment),ry=p(),Wo=s("p"),ay=o(`RemBERT 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 `),ld=s("code"),iy=o("span start logits"),ly=o(" and "),dd=s("code"),dy=o("span end logits"),cy=o(")."),py=p(),oa=s("p"),my=o("This model inherits from "),Na=s("a"),hy=o("TFPreTrainedModel"),uy=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),fy=p(),na=s("p"),gy=o("This model is also a "),sa=s("a"),_y=o("tf.keras.Model"),by=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),yy=p(),v(Xn.$$.fragment),Ty=p(),Tt=s("div"),v(ra.$$.fragment),ky=p(),No=s("p"),vy=o("The "),Aa=s("a"),wy=o("TFRemBertForQuestionAnswering"),My=o(" forward method, overrides the "),cd=s("code"),$y=o("__call__"),Ry=o(" special method."),By=p(),v(Dn.$$.fragment),Fy=p(),v(Pn.$$.fragment),Ey=p(),v(On.$$.fragment),this.h()},l(i){const T=Sv('[data-svelte="svelte-1phssyn"]',document.head);d=r(T,"META",{name:!0,content:!0}),T.forEach(t),b=m(i),h=r(i,"H1",{class:!0});var aa=a(h);u=r(aa,"A",{id:!0,class:!0,href:!0});var pd=a(u);y=r(pd,"SPAN",{});var md=a(y);w(l.$$.fragment,md),md.forEach(t),pd.forEach(t),c=m(aa),j=r(aa,"SPAN",{});var hd=a(j);Me=n(hd,"RemBERT"),hd.forEach(t),aa.forEach(t),ge=m(i),N=r(i,"H2",{class:!0});var ia=a(N);ae=r(ia,"A",{id:!0,class:!0,href:!0});var ud=a(ae);te=r(ud,"SPAN",{});var fd=a(te);w(k.$$.fragment,fd),fd.forEach(t),ud.forEach(t),$e=m(ia),D=r(ia,"SPAN",{});var gd=a(D);Re=n(gd,"Overview"),gd.forEach(t),ia.forEach(t),_e=m(i),S=r(i,"P",{});var la=a(S);Be=n(la,"The RemBERT model was proposed in "),le=r(la,"A",{href:!0,rel:!0});var _d=a(le);Q=n(_d,"Rethinking Embedding Coupling in Pre-trained Language Models"),_d.forEach(t),Fe=n(la," by Hyung Won Chung, Thibault F\xE9vry, Henry Tsai, Melvin Johnson, Sebastian Ruder."),la.forEach(t),be=m(i),V=r(i,"P",{});var bd=a(V);Ee=n(bd,"The abstract from the paper is the following:"),bd.forEach(t),ye=m(i),L=r(i,"P",{});var yd=a(L);me=r(yd,"EM",{});var Td=a(me);Ce=n(Td,`We re-evaluate the standard practice of sharing weights between input and output embeddings in state-of-the-art
pre-trained language models. We show that decoupled embeddings provide increased modeling flexibility, allowing us to
significantly improve the efficiency of parameter allocation in the input embedding of multilingual models. By
reallocating the input embedding parameters in the Transformer layers, we achieve dramatically better performance on
standard natural language understanding tasks with the same number of parameters during fine-tuning. We also show that
allocating additional capacity to the output embedding provides benefits to the model that persist through the
fine-tuning stage even though the output embedding is discarded after pre-training. Our analysis shows that larger
output embeddings prevent the model\u2019s last layers from overspecializing to the pre-training task and encourage
Transformer representations to be more general and more transferable to other tasks and languages. Harnessing these
findings, we are able to train models that achieve strong performance on the XTREME benchmark without increasing the
number of parameters at the fine-tuning stage.`),Td.forEach(t),yd.forEach(t),oe=m(i),J=r(i,"P",{});var kd=a(J);U=n(kd,"Tips:"),kd.forEach(t),Te=m(i),X=r(i,"P",{});var vd=a(X);je=n(vd,`For fine-tuning, RemBERT can be thought of as a bigger version of mBERT with an ALBERT-like factorization of the
embedding layer. The embeddings are not tied in pre-training, in contrast with BERT, which enables smaller input
embeddings (preserved during fine-tuning) and bigger output embeddings (discarded at fine-tuning). The tokenizer is
also similar to the Albert one rather than the BERT one.`),vd.forEach(t),ke=m(i),A=r(i,"H2",{class:!0});var da=a(A);ie=r(da,"A",{id:!0,class:!0,href:!0});var wd=a(ie);he=r(wd,"SPAN",{});var Md=a(he);w(z.$$.fragment,Md),Md.forEach(t),wd.forEach(t),Je=m(da),P=r(da,"SPAN",{});var $d=a(P);ze=n($d,"Documentation resources"),$d.forEach(t),da.forEach(t),ve=m(i),Z=r(i,"UL",{});var ut=a(Z);ue=r(ut,"LI",{});var Rd=a(ue);de=r(Rd,"A",{href:!0});var Bd=a(de);W=n(Bd,"Text classification task guide"),Bd.forEach(t),Rd.forEach(t),Ue=m(ut),O=r(ut,"LI",{});var Fd=a(O);ce=r(Fd,"A",{href:!0});var Ed=a(ce);se=n(Ed,"Token classification task guide"),Ed.forEach(t),Fd.forEach(t),I=m(ut),fe=r(ut,"LI",{});var Cd=a(fe);x=r(Cd,"A",{href:!0});var jd=a(x);Ie=n(jd,"Question answering task guide"),jd.forEach(t),Cd.forEach(t),xe=m(ut),f=r(ut,"LI",{});var Jd=a(f);F=r(Jd,"A",{href:!0});var zd=a(F);Le=n(zd,"Causal language modeling task guide"),zd.forEach(t),Jd.forEach(t),re=m(ut),Ne=r(ut,"LI",{});var Ud=a(Ne);qe=r(Ud,"A",{href:!0});var Id=a(qe);E=n(Id,"Masked language modeling task guide"),Id.forEach(t),Ud.forEach(t),Xe=m(ut),Ae=r(ut,"LI",{});var xd=a(Ae);We=r(xd,"A",{href:!0});var Zd=a(We);De=n(Zd,"Multiple choice task guide"),Zd.forEach(t),xd.forEach(t),ut.forEach(t),Ve=m(i),q=r(i,"H2",{class:!0});var ca=a(q);G=r(ca,"A",{id:!0,class:!0,href:!0});var qd=a(G);Se=r(qd,"SPAN",{});var Wd=a(Se);w(Ze.$$.fragment,Wd),Wd.forEach(t),qd.forEach(t),H=m(ca),Ge=r(ca,"SPAN",{});var Nd=a(Ge);Pe=n(Nd,"RemBertConfig"),Nd.forEach(t),ca.forEach(t),we=m(i),pe=r(i,"DIV",{class:!0});var Pt=a(pe);w(K.$$.fragment,Pt),Oe=m(Pt),so=r(Pt,"P",{});var Ao=a(so);bp=n(Ao,"This is the configuration class to store the configuration of a "),pa=r(Ao,"A",{href:!0});var Ad=a(pa);yp=n(Ad,"RemBertModel"),Ad.forEach(t),Tp=n(Ao,`. It is used to instantiate an
RemBERT 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 RemBERT
`),ps=r(Ao,"A",{href:!0,rel:!0});var Sd=a(ps);kp=n(Sd,"google/rembert"),Sd.forEach(t),vp=n(Ao," architecture."),Ao.forEach(t),wp=m(Pt),ro=r(Pt,"P",{});var So=a(ro);Mp=n(So,"Configuration objects inherit from "),ma=r(So,"A",{href:!0});var Gd=a(ma);$p=n(Gd,"PretrainedConfig"),Gd.forEach(t),Rp=n(So,` and can be used to control the model outputs. Read the
documentation from `),ha=r(So,"A",{href:!0});var Uy=a(ha);Bp=n(Uy,"PretrainedConfig"),Uy.forEach(t),Fp=n(So," for more information."),So.forEach(t),Ep=m(Pt),w(Go.$$.fragment,Pt),Pt.forEach(t),Vd=m(i),ao=r(i,"H2",{class:!0});var wc=a(ao);Vo=r(wc,"A",{id:!0,class:!0,href:!0});var Iy=a(Vo);ci=r(Iy,"SPAN",{});var xy=a(ci);w(ms.$$.fragment,xy),xy.forEach(t),Iy.forEach(t),Cp=m(wc),pi=r(wc,"SPAN",{});var Zy=a(pi);jp=n(Zy,"RemBertTokenizer"),Zy.forEach(t),wc.forEach(t),Ld=m(i),tt=r(i,"DIV",{class:!0});var kt=a(tt);w(hs.$$.fragment,kt),Jp=m(kt),us=r(kt,"P",{});var Mc=a(us);zp=n(Mc,"Construct a RemBERT tokenizer. Based on "),fs=r(Mc,"A",{href:!0,rel:!0});var qy=a(fs);Up=n(qy,"SentencePiece"),qy.forEach(t),Ip=n(Mc,"."),Mc.forEach(t),xp=m(kt),gs=r(kt,"P",{});var $c=a(gs);Zp=n($c,"This tokenizer inherits from "),ua=r($c,"A",{href:!0});var Wy=a(ua);qp=n(Wy,"PreTrainedTokenizer"),Wy.forEach(t),Wp=n($c,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),$c.forEach(t),Np=m(kt),Ot=r(kt,"DIV",{class:!0});var Sa=a(Ot);w(_s.$$.fragment,Sa),Ap=m(Sa),mi=r(Sa,"P",{});var Ny=a(mi);Sp=n(Ny,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A REMBERT sequence has the following format:`),Ny.forEach(t),Gp=m(Sa),bs=r(Sa,"UL",{});var Rc=a(bs);fa=r(Rc,"LI",{});var Cy=a(fa);Vp=n(Cy,"single sequence: "),hi=r(Cy,"CODE",{});var Ay=a(hi);Lp=n(Ay,"[CLS] X [SEP]"),Ay.forEach(t),Cy.forEach(t),Xp=m(Rc),ga=r(Rc,"LI",{});var jy=a(ga);Dp=n(jy,"pair of sequences: "),ui=r(jy,"CODE",{});var Sy=a(ui);Pp=n(Sy,"[CLS] A [SEP] B [SEP]"),Sy.forEach(t),jy.forEach(t),Rc.forEach(t),Sa.forEach(t),Op=m(kt),Lo=r(kt,"DIV",{class:!0});var Bc=a(Lo);w(ys.$$.fragment,Bc),Qp=m(Bc),Ts=r(Bc,"P",{});var Fc=a(Ts);Hp=n(Fc,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),fi=r(Fc,"CODE",{});var Gy=a(fi);Yp=n(Gy,"prepare_for_model"),Gy.forEach(t),Kp=n(Fc," method."),Fc.forEach(t),Bc.forEach(t),em=m(kt),Bt=r(kt,"DIV",{class:!0});var Qn=a(Bt);w(ks.$$.fragment,Qn),tm=m(Qn),gi=r(Qn,"P",{});var Vy=a(gi);om=n(Vy,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. A RemBERT"),Vy.forEach(t),nm=m(Qn),w(Xo.$$.fragment,Qn),sm=m(Qn),io=r(Qn,"P",{});var Ga=a(io);rm=n(Ga,"If "),_i=r(Ga,"CODE",{});var Ly=a(_i);am=n(Ly,"token_ids_1"),Ly.forEach(t),im=n(Ga," is "),bi=r(Ga,"CODE",{});var Xy=a(bi);lm=n(Xy,"None"),Xy.forEach(t),dm=n(Ga,", this method only returns the first portion of the mask (0s)."),Ga.forEach(t),Qn.forEach(t),cm=m(kt),_a=r(kt,"DIV",{class:!0});var Dy=a(_a);w(vs.$$.fragment,Dy),Dy.forEach(t),kt.forEach(t),Xd=m(i),lo=r(i,"H2",{class:!0});var Ec=a(lo);Do=r(Ec,"A",{id:!0,class:!0,href:!0});var Py=a(Do);yi=r(Py,"SPAN",{});var Oy=a(yi);w(ws.$$.fragment,Oy),Oy.forEach(t),Py.forEach(t),pm=m(Ec),Ti=r(Ec,"SPAN",{});var Qy=a(Ti);mm=n(Qy,"RemBertTokenizerFast"),Qy.forEach(t),Ec.forEach(t),Dd=m(i),nt=r(i,"DIV",{class:!0});var Zt=a(nt);w(Ms.$$.fragment,Zt),hm=m(Zt),Lt=r(Zt,"P",{});var Hn=a(Lt);um=n(Hn,"Construct a \u201Cfast\u201D RemBert tokenizer (backed by HuggingFace\u2019s "),ki=r(Hn,"EM",{});var Hy=a(ki);fm=n(Hy,"tokenizers"),Hy.forEach(t),gm=n(Hn,` library). Based on
`),$s=r(Hn,"A",{href:!0,rel:!0});var Yy=a($s);_m=n(Yy,"Unigram"),Yy.forEach(t),bm=n(Hn,`. This
tokenizer inherits from `),ba=r(Hn,"A",{href:!0});var Ky=a(ba);ym=n(Ky,"PreTrainedTokenizerFast"),Ky.forEach(t),Tm=n(Hn,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods`),Hn.forEach(t),km=m(Zt),Qt=r(Zt,"DIV",{class:!0});var Va=a(Qt);w(Rs.$$.fragment,Va),vm=m(Va),vi=r(Va,"P",{});var eT=a(vi);wm=n(eT,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A RemBERT sequence has the following format:`),eT.forEach(t),Mm=m(Va),Bs=r(Va,"UL",{});var Cc=a(Bs);ya=r(Cc,"LI",{});var Jy=a(ya);$m=n(Jy,"single sequence: "),wi=r(Jy,"CODE",{});var tT=a(wi);Rm=n(tT,"[CLS] X [SEP]"),tT.forEach(t),Jy.forEach(t),Bm=m(Cc),Ta=r(Cc,"LI",{});var zy=a(Ta);Fm=n(zy,"pair of sequences: "),Mi=r(zy,"CODE",{});var oT=a(Mi);Em=n(oT,"[CLS] A [SEP] B [SEP]"),oT.forEach(t),zy.forEach(t),Cc.forEach(t),Va.forEach(t),Cm=m(Zt),Po=r(Zt,"DIV",{class:!0});var jc=a(Po);w(Fs.$$.fragment,jc),jm=m(jc),Es=r(jc,"P",{});var Jc=a(Es);Jm=n(Jc,`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),$i=r(Jc,"CODE",{});var nT=a($i);zm=n(nT,"prepare_for_model"),nT.forEach(t),Um=n(Jc," method."),Jc.forEach(t),jc.forEach(t),Im=m(Zt),Ft=r(Zt,"DIV",{class:!0});var Yn=a(Ft);w(Cs.$$.fragment,Yn),xm=m(Yn),Ri=r(Yn,"P",{});var sT=a(Ri);Zm=n(sT,"Creates a mask from the two sequences passed to be used in a sequence-pair classification task. A RemBERT"),sT.forEach(t),qm=m(Yn),w(Oo.$$.fragment,Yn),Wm=m(Yn),Bi=r(Yn,"P",{});var rT=a(Bi);Nm=n(rT,"if token_ids_1 is None, only returns the first portion of the mask (0s)."),rT.forEach(t),Yn.forEach(t),Am=m(Zt),ka=r(Zt,"DIV",{class:!0});var aT=a(ka);w(js.$$.fragment,aT),aT.forEach(t),Zt.forEach(t),Pd=m(i),co=r(i,"H2",{class:!0});var zc=a(co);Qo=r(zc,"A",{id:!0,class:!0,href:!0});var iT=a(Qo);Fi=r(iT,"SPAN",{});var lT=a(Fi);w(Js.$$.fragment,lT),lT.forEach(t),iT.forEach(t),Sm=m(zc),Ei=r(zc,"SPAN",{});var dT=a(Ei);Gm=n(dT,"RemBertModel"),dT.forEach(t),zc.forEach(t),Od=m(i),ht=r(i,"DIV",{class:!0});var Ht=a(ht);w(zs.$$.fragment,Ht),Vm=m(Ht),Us=r(Ht,"P",{});var Uc=a(Us);Lm=n(Uc,`The bare RemBERT Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),Is=r(Uc,"A",{href:!0,rel:!0});var cT=a(Is);Xm=n(cT,"torch.nn.Module"),cT.forEach(t),Dm=n(Uc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Uc.forEach(t),Pm=m(Ht),xs=r(Ht,"P",{});var Ic=a(xs);Om=n(Ic,`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),Zs=r(Ic,"A",{href:!0,rel:!0});var pT=a(Zs);Qm=n(pT,`Attention is
all you need`),pT.forEach(t),Hm=n(Ic,` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),Ic.forEach(t),Ym=m(Ht),st=r(Ht,"P",{});var vt=a(st);Km=n(vt,"To behave as an decoder the model needs to be initialized with the "),Ci=r(vt,"CODE",{});var mT=a(Ci);eh=n(mT,"is_decoder"),mT.forEach(t),th=n(vt,` argument of the configuration set
to `),ji=r(vt,"CODE",{});var hT=a(ji);oh=n(hT,"True"),hT.forEach(t),nh=n(vt,". To be used in a Seq2Seq model, the model needs to initialized with both "),Ji=r(vt,"CODE",{});var uT=a(Ji);sh=n(uT,"is_decoder"),uT.forEach(t),rh=n(vt,` argument and
`),zi=r(vt,"CODE",{});var fT=a(zi);ah=n(fT,"add_cross_attention"),fT.forEach(t),ih=n(vt," set to "),Ui=r(vt,"CODE",{});var gT=a(Ui);lh=n(gT,"True"),gT.forEach(t),dh=n(vt,"; an "),Ii=r(vt,"CODE",{});var _T=a(Ii);ch=n(_T,"encoder_hidden_states"),_T.forEach(t),ph=n(vt," is then expected as an input to the forward pass."),vt.forEach(t),mh=m(Ht),Et=r(Ht,"DIV",{class:!0});var Kn=a(Et);w(qs.$$.fragment,Kn),hh=m(Kn),po=r(Kn,"P",{});var La=a(po);uh=n(La,"The "),va=r(La,"A",{href:!0});var bT=a(va);fh=n(bT,"RemBertModel"),bT.forEach(t),gh=n(La," forward method, overrides the "),xi=r(La,"CODE",{});var yT=a(xi);_h=n(yT,"__call__"),yT.forEach(t),bh=n(La," special method."),La.forEach(t),yh=m(Kn),w(Ho.$$.fragment,Kn),Th=m(Kn),w(Yo.$$.fragment,Kn),Kn.forEach(t),Ht.forEach(t),Qd=m(i),mo=r(i,"H2",{class:!0});var xc=a(mo);Ko=r(xc,"A",{id:!0,class:!0,href:!0});var TT=a(Ko);Zi=r(TT,"SPAN",{});var kT=a(Zi);w(Ws.$$.fragment,kT),kT.forEach(t),TT.forEach(t),kh=m(xc),qi=r(xc,"SPAN",{});var vT=a(qi);vh=n(vT,"RemBertForCausalLM"),vT.forEach(t),xc.forEach(t),Hd=m(i),Xt=r(i,"DIV",{class:!0});var Xa=a(Xt);w(Ns.$$.fragment,Xa),wh=m(Xa),ho=r(Xa,"P",{});var Da=a(ho);Mh=n(Da,"RemBERT Model with a "),Wi=r(Da,"CODE",{});var wT=a(Wi);$h=n(wT,"language modeling"),wT.forEach(t),Rh=n(Da,` head on top for CLM fine-tuning.
This model is a PyTorch `),As=r(Da,"A",{href:!0,rel:!0});var MT=a(As);Bh=n(MT,"torch.nn.Module"),MT.forEach(t),Fh=n(Da,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Da.forEach(t),Eh=m(Xa),Ct=r(Xa,"DIV",{class:!0});var es=a(Ct);w(Ss.$$.fragment,es),Ch=m(es),uo=r(es,"P",{});var Pa=a(uo);jh=n(Pa,"The "),wa=r(Pa,"A",{href:!0});var $T=a(wa);Jh=n($T,"RemBertForCausalLM"),$T.forEach(t),zh=n(Pa," forward method, overrides the "),Ni=r(Pa,"CODE",{});var RT=a(Ni);Uh=n(RT,"__call__"),RT.forEach(t),Ih=n(Pa," special method."),Pa.forEach(t),xh=m(es),w(en.$$.fragment,es),Zh=m(es),w(tn.$$.fragment,es),es.forEach(t),Xa.forEach(t),Yd=m(i),fo=r(i,"H2",{class:!0});var Zc=a(fo);on=r(Zc,"A",{id:!0,class:!0,href:!0});var BT=a(on);Ai=r(BT,"SPAN",{});var FT=a(Ai);w(Gs.$$.fragment,FT),FT.forEach(t),BT.forEach(t),qh=m(Zc),Si=r(Zc,"SPAN",{});var ET=a(Si);Wh=n(ET,"RemBertForMaskedLM"),ET.forEach(t),Zc.forEach(t),Kd=m(i),Dt=r(i,"DIV",{class:!0});var Oa=a(Dt);w(Vs.$$.fragment,Oa),Nh=m(Oa),go=r(Oa,"P",{});var Qa=a(go);Ah=n(Qa,"RemBERT Model with a "),Gi=r(Qa,"CODE",{});var CT=a(Gi);Sh=n(CT,"language modeling"),CT.forEach(t),Gh=n(Qa,` head on top.
This model is a PyTorch `),Ls=r(Qa,"A",{href:!0,rel:!0});var jT=a(Ls);Vh=n(jT,"torch.nn.Module"),jT.forEach(t),Lh=n(Qa,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Qa.forEach(t),Xh=m(Oa),jt=r(Oa,"DIV",{class:!0});var ts=a(jt);w(Xs.$$.fragment,ts),Dh=m(ts),_o=r(ts,"P",{});var Ha=a(_o);Ph=n(Ha,"The "),Ma=r(Ha,"A",{href:!0});var JT=a(Ma);Oh=n(JT,"RemBertForMaskedLM"),JT.forEach(t),Qh=n(Ha," forward method, overrides the "),Vi=r(Ha,"CODE",{});var zT=a(Vi);Hh=n(zT,"__call__"),zT.forEach(t),Yh=n(Ha," special method."),Ha.forEach(t),Kh=m(ts),w(nn.$$.fragment,ts),eu=m(ts),w(sn.$$.fragment,ts),ts.forEach(t),Oa.forEach(t),ec=m(i),bo=r(i,"H2",{class:!0});var qc=a(bo);rn=r(qc,"A",{id:!0,class:!0,href:!0});var UT=a(rn);Li=r(UT,"SPAN",{});var IT=a(Li);w(Ds.$$.fragment,IT),IT.forEach(t),UT.forEach(t),tu=m(qc),Xi=r(qc,"SPAN",{});var xT=a(Xi);ou=n(xT,"RemBertForSequenceClassification"),xT.forEach(t),qc.forEach(t),tc=m(i),wt=r(i,"DIV",{class:!0});var os=a(wt);w(Ps.$$.fragment,os),nu=m(os),Di=r(os,"P",{});var ZT=a(Di);su=n(ZT,`RemBERT Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),ZT.forEach(t),ru=m(os),Os=r(os,"P",{});var Wc=a(Os);au=n(Wc,"This model is a PyTorch "),Qs=r(Wc,"A",{href:!0,rel:!0});var qT=a(Qs);iu=n(qT,"torch.nn.Module"),qT.forEach(t),lu=n(Wc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Wc.forEach(t),du=m(os),ft=r(os,"DIV",{class:!0});var Yt=a(ft);w(Hs.$$.fragment,Yt),cu=m(Yt),yo=r(Yt,"P",{});var Ya=a(yo);pu=n(Ya,"The "),$a=r(Ya,"A",{href:!0});var WT=a($a);mu=n(WT,"RemBertForSequenceClassification"),WT.forEach(t),hu=n(Ya," forward method, overrides the "),Pi=r(Ya,"CODE",{});var NT=a(Pi);uu=n(NT,"__call__"),NT.forEach(t),fu=n(Ya," special method."),Ya.forEach(t),gu=m(Yt),w(an.$$.fragment,Yt),_u=m(Yt),w(ln.$$.fragment,Yt),bu=m(Yt),w(dn.$$.fragment,Yt),Yt.forEach(t),os.forEach(t),oc=m(i),To=r(i,"H2",{class:!0});var Nc=a(To);cn=r(Nc,"A",{id:!0,class:!0,href:!0});var AT=a(cn);Oi=r(AT,"SPAN",{});var ST=a(Oi);w(Ys.$$.fragment,ST),ST.forEach(t),AT.forEach(t),yu=m(Nc),Qi=r(Nc,"SPAN",{});var GT=a(Qi);Tu=n(GT,"RemBertForMultipleChoice"),GT.forEach(t),Nc.forEach(t),nc=m(i),Mt=r(i,"DIV",{class:!0});var ns=a(Mt);w(Ks.$$.fragment,ns),ku=m(ns),Hi=r(ns,"P",{});var VT=a(Hi);vu=n(VT,`RemBERT 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.`),VT.forEach(t),wu=m(ns),er=r(ns,"P",{});var Ac=a(er);Mu=n(Ac,"This model is a PyTorch "),tr=r(Ac,"A",{href:!0,rel:!0});var LT=a(tr);$u=n(LT,"torch.nn.Module"),LT.forEach(t),Ru=n(Ac,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ac.forEach(t),Bu=m(ns),Jt=r(ns,"DIV",{class:!0});var ss=a(Jt);w(or.$$.fragment,ss),Fu=m(ss),ko=r(ss,"P",{});var Ka=a(ko);Eu=n(Ka,"The "),Ra=r(Ka,"A",{href:!0});var XT=a(Ra);Cu=n(XT,"RemBertForMultipleChoice"),XT.forEach(t),ju=n(Ka," forward method, overrides the "),Yi=r(Ka,"CODE",{});var DT=a(Yi);Ju=n(DT,"__call__"),DT.forEach(t),zu=n(Ka," special method."),Ka.forEach(t),Uu=m(ss),w(pn.$$.fragment,ss),Iu=m(ss),w(mn.$$.fragment,ss),ss.forEach(t),ns.forEach(t),sc=m(i),vo=r(i,"H2",{class:!0});var Sc=a(vo);hn=r(Sc,"A",{id:!0,class:!0,href:!0});var PT=a(hn);Ki=r(PT,"SPAN",{});var OT=a(Ki);w(nr.$$.fragment,OT),OT.forEach(t),PT.forEach(t),xu=m(Sc),el=r(Sc,"SPAN",{});var QT=a(el);Zu=n(QT,"RemBertForTokenClassification"),QT.forEach(t),Sc.forEach(t),rc=m(i),$t=r(i,"DIV",{class:!0});var rs=a($t);w(sr.$$.fragment,rs),qu=m(rs),tl=r(rs,"P",{});var HT=a(tl);Wu=n(HT,`RemBERT 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.`),HT.forEach(t),Nu=m(rs),rr=r(rs,"P",{});var Gc=a(rr);Au=n(Gc,"This model is a PyTorch "),ar=r(Gc,"A",{href:!0,rel:!0});var YT=a(ar);Su=n(YT,"torch.nn.Module"),YT.forEach(t),Gu=n(Gc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Gc.forEach(t),Vu=m(rs),zt=r(rs,"DIV",{class:!0});var as=a(zt);w(ir.$$.fragment,as),Lu=m(as),wo=r(as,"P",{});var ei=a(wo);Xu=n(ei,"The "),Ba=r(ei,"A",{href:!0});var KT=a(Ba);Du=n(KT,"RemBertForTokenClassification"),KT.forEach(t),Pu=n(ei," forward method, overrides the "),ol=r(ei,"CODE",{});var ek=a(ol);Ou=n(ek,"__call__"),ek.forEach(t),Qu=n(ei," special method."),ei.forEach(t),Hu=m(as),w(un.$$.fragment,as),Yu=m(as),w(fn.$$.fragment,as),as.forEach(t),rs.forEach(t),ac=m(i),Mo=r(i,"H2",{class:!0});var Vc=a(Mo);gn=r(Vc,"A",{id:!0,class:!0,href:!0});var tk=a(gn);nl=r(tk,"SPAN",{});var ok=a(nl);w(lr.$$.fragment,ok),ok.forEach(t),tk.forEach(t),Ku=m(Vc),sl=r(Vc,"SPAN",{});var nk=a(sl);ef=n(nk,"RemBertForQuestionAnswering"),nk.forEach(t),Vc.forEach(t),ic=m(i),Rt=r(i,"DIV",{class:!0});var is=a(Rt);w(dr.$$.fragment,is),tf=m(is),$o=r(is,"P",{});var ti=a($o);of=n(ti,`RemBERT 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 `),rl=r(ti,"CODE",{});var sk=a(rl);nf=n(sk,"span start logits"),sk.forEach(t),sf=n(ti," and "),al=r(ti,"CODE",{});var rk=a(al);rf=n(rk,"span end logits"),rk.forEach(t),af=n(ti,")."),ti.forEach(t),lf=m(is),cr=r(is,"P",{});var Lc=a(cr);df=n(Lc,"This model is a PyTorch "),pr=r(Lc,"A",{href:!0,rel:!0});var ak=a(pr);cf=n(ak,"torch.nn.Module"),ak.forEach(t),pf=n(Lc,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Lc.forEach(t),mf=m(is),Ut=r(is,"DIV",{class:!0});var ls=a(Ut);w(mr.$$.fragment,ls),hf=m(ls),Ro=r(ls,"P",{});var oi=a(Ro);uf=n(oi,"The "),Fa=r(oi,"A",{href:!0});var ik=a(Fa);ff=n(ik,"RemBertForQuestionAnswering"),ik.forEach(t),gf=n(oi," forward method, overrides the "),il=r(oi,"CODE",{});var lk=a(il);_f=n(lk,"__call__"),lk.forEach(t),bf=n(oi," special method."),oi.forEach(t),yf=m(ls),w(_n.$$.fragment,ls),Tf=m(ls),w(bn.$$.fragment,ls),ls.forEach(t),is.forEach(t),lc=m(i),Bo=r(i,"H2",{class:!0});var Xc=a(Bo);yn=r(Xc,"A",{id:!0,class:!0,href:!0});var dk=a(yn);ll=r(dk,"SPAN",{});var ck=a(ll);w(hr.$$.fragment,ck),ck.forEach(t),dk.forEach(t),kf=m(Xc),dl=r(Xc,"SPAN",{});var pk=a(dl);vf=n(pk,"TFRemBertModel"),pk.forEach(t),Xc.forEach(t),dc=m(i),rt=r(i,"DIV",{class:!0});var qt=a(rt);w(ur.$$.fragment,qt),wf=m(qt),cl=r(qt,"P",{});var mk=a(cl);Mf=n(mk,"The bare RemBERT Model transformer outputing raw hidden-states without any specific head on top."),mk.forEach(t),$f=m(qt),fr=r(qt,"P",{});var Dc=a(fr);Rf=n(Dc,"This model inherits from "),Ea=r(Dc,"A",{href:!0});var hk=a(Ea);Bf=n(hk,"TFPreTrainedModel"),hk.forEach(t),Ff=n(Dc,`. 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.)`),Dc.forEach(t),Ef=m(qt),gr=r(qt,"P",{});var Pc=a(gr);Cf=n(Pc,"This model is also a "),_r=r(Pc,"A",{href:!0,rel:!0});var uk=a(_r);jf=n(uk,"tf.keras.Model"),uk.forEach(t),Jf=n(Pc,` 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.`),Pc.forEach(t),zf=m(qt),w(Tn.$$.fragment,qt),Uf=m(qt),It=r(qt,"DIV",{class:!0});var ds=a(It);w(br.$$.fragment,ds),If=m(ds),Fo=r(ds,"P",{});var ni=a(Fo);xf=n(ni,"The "),Ca=r(ni,"A",{href:!0});var fk=a(Ca);Zf=n(fk,"TFRemBertModel"),fk.forEach(t),qf=n(ni," forward method, overrides the "),pl=r(ni,"CODE",{});var gk=a(pl);Wf=n(gk,"__call__"),gk.forEach(t),Nf=n(ni," special method."),ni.forEach(t),Af=m(ds),w(kn.$$.fragment,ds),Sf=m(ds),w(vn.$$.fragment,ds),ds.forEach(t),qt.forEach(t),cc=m(i),Eo=r(i,"H2",{class:!0});var Oc=a(Eo);wn=r(Oc,"A",{id:!0,class:!0,href:!0});var _k=a(wn);ml=r(_k,"SPAN",{});var bk=a(ml);w(yr.$$.fragment,bk),bk.forEach(t),_k.forEach(t),Gf=m(Oc),hl=r(Oc,"SPAN",{});var yk=a(hl);Vf=n(yk,"TFRemBertForMaskedLM"),yk.forEach(t),Oc.forEach(t),pc=m(i),at=r(i,"DIV",{class:!0});var Wt=a(at);w(Tr.$$.fragment,Wt),Lf=m(Wt),kr=r(Wt,"P",{});var Qc=a(kr);Xf=n(Qc,"RemBERT Model with a "),ul=r(Qc,"CODE",{});var Tk=a(ul);Df=n(Tk,"language modeling"),Tk.forEach(t),Pf=n(Qc," head on top."),Qc.forEach(t),Of=m(Wt),vr=r(Wt,"P",{});var Hc=a(vr);Qf=n(Hc,"This model inherits from "),ja=r(Hc,"A",{href:!0});var kk=a(ja);Hf=n(kk,"TFPreTrainedModel"),kk.forEach(t),Yf=n(Hc,`. 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.)`),Hc.forEach(t),Kf=m(Wt),wr=r(Wt,"P",{});var Yc=a(wr);eg=n(Yc,"This model is also a "),Mr=r(Yc,"A",{href:!0,rel:!0});var vk=a(Mr);tg=n(vk,"tf.keras.Model"),vk.forEach(t),og=n(Yc,` 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.`),Yc.forEach(t),ng=m(Wt),w(Mn.$$.fragment,Wt),sg=m(Wt),gt=r(Wt,"DIV",{class:!0});var Kt=a(gt);w($r.$$.fragment,Kt),rg=m(Kt),Co=r(Kt,"P",{});var si=a(Co);ag=n(si,"The "),Ja=r(si,"A",{href:!0});var wk=a(Ja);ig=n(wk,"TFRemBertForMaskedLM"),wk.forEach(t),lg=n(si," forward method, overrides the "),fl=r(si,"CODE",{});var Mk=a(fl);dg=n(Mk,"__call__"),Mk.forEach(t),cg=n(si," special method."),si.forEach(t),pg=m(Kt),w($n.$$.fragment,Kt),mg=m(Kt),w(Rn.$$.fragment,Kt),hg=m(Kt),w(Bn.$$.fragment,Kt),Kt.forEach(t),Wt.forEach(t),mc=m(i),jo=r(i,"H2",{class:!0});var Kc=a(jo);Fn=r(Kc,"A",{id:!0,class:!0,href:!0});var $k=a(Fn);gl=r($k,"SPAN",{});var Rk=a(gl);w(Rr.$$.fragment,Rk),Rk.forEach(t),$k.forEach(t),ug=m(Kc),_l=r(Kc,"SPAN",{});var Bk=a(_l);fg=n(Bk,"TFRemBertForCausalLM"),Bk.forEach(t),Kc.forEach(t),hc=m(i),it=r(i,"DIV",{class:!0});var Nt=a(it);w(Br.$$.fragment,Nt),gg=m(Nt),Fr=r(Nt,"P",{});var ep=a(Fr);_g=n(ep,"RemBERT Model with a "),bl=r(ep,"CODE",{});var Fk=a(bl);bg=n(Fk,"language modeling"),Fk.forEach(t),yg=n(ep," head on top for CLM fine-tuning."),ep.forEach(t),Tg=m(Nt),Er=r(Nt,"P",{});var tp=a(Er);kg=n(tp,"This model inherits from "),za=r(tp,"A",{href:!0});var Ek=a(za);vg=n(Ek,"TFPreTrainedModel"),Ek.forEach(t),wg=n(tp,`. 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.)`),tp.forEach(t),Mg=m(Nt),Cr=r(Nt,"P",{});var op=a(Cr);$g=n(op,"This model is also a "),jr=r(op,"A",{href:!0,rel:!0});var Ck=a(jr);Rg=n(Ck,"tf.keras.Model"),Ck.forEach(t),Bg=n(op,` 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.`),op.forEach(t),Fg=m(Nt),w(En.$$.fragment,Nt),Eg=m(Nt),_t=r(Nt,"DIV",{class:!0});var eo=a(_t);w(Jr.$$.fragment,eo),Cg=m(eo),ot=r(eo,"P",{});var mt=a(ot);jg=n(mt,"encoder_hidden_states  ("),yl=r(mt,"CODE",{});var jk=a(yl);Jg=n(jk,"tf.Tensor"),jk.forEach(t),zg=n(mt," of shape "),Tl=r(mt,"CODE",{});var Jk=a(Tl);Ug=n(Jk,"(batch_size, sequence_length, hidden_size)"),Jk.forEach(t),Ig=n(mt,", "),kl=r(mt,"EM",{});var zk=a(kl);xg=n(zk,"optional"),zk.forEach(t),Zg=n(mt,`):
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.
encoder_attention_mask (`),vl=r(mt,"CODE",{});var Uk=a(vl);qg=n(Uk,"tf.Tensor"),Uk.forEach(t),Wg=n(mt," of shape "),wl=r(mt,"CODE",{});var Ik=a(wl);Ng=n(Ik,"(batch_size, sequence_length)"),Ik.forEach(t),Ag=n(mt,", "),Ml=r(mt,"EM",{});var xk=a(Ml);Sg=n(xk,"optional"),xk.forEach(t),Gg=n(mt,`):
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in `),$l=r(mt,"CODE",{});var Zk=a($l);Vg=n(Zk,"[0, 1]"),Zk.forEach(t),Lg=n(mt,":"),mt.forEach(t),Xg=m(eo),zr=r(eo,"UL",{});var np=a(zr);Ur=r(np,"LI",{});var sp=a(Ur);Dg=n(sp,"1 for tokens that are "),Rl=r(sp,"STRONG",{});var qk=a(Rl);Pg=n(qk,"not masked"),qk.forEach(t),Og=n(sp,","),sp.forEach(t),Qg=m(np),Ir=r(np,"LI",{});var rp=a(Ir);Hg=n(rp,"0 for tokens that are "),Bl=r(rp,"STRONG",{});var Wk=a(Bl);Yg=n(Wk,"masked"),Wk.forEach(t),Kg=n(rp,"."),rp.forEach(t),np.forEach(t),e_=m(eo),Y=r(eo,"P",{});var ee=a(Y);t_=n(ee,"past_key_values ("),Fl=r(ee,"CODE",{});var Nk=a(Fl);o_=n(Nk,"Tuple[Tuple[tf.Tensor]]"),Nk.forEach(t),n_=n(ee," of length "),El=r(ee,"CODE",{});var Ak=a(El);s_=n(Ak,"config.n_layers"),Ak.forEach(t),r_=n(ee,`)
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If `),Cl=r(ee,"CODE",{});var Sk=a(Cl);a_=n(Sk,"past_key_values"),Sk.forEach(t),i_=n(ee," are used, the user can optionally input only the last "),jl=r(ee,"CODE",{});var Gk=a(jl);l_=n(Gk,"decoder_input_ids"),Gk.forEach(t),d_=n(ee,` (those that
don\u2019t have their past key value states given to this model) of shape `),Jl=r(ee,"CODE",{});var Vk=a(Jl);c_=n(Vk,"(batch_size, 1)"),Vk.forEach(t),p_=n(ee,` instead of all
`),zl=r(ee,"CODE",{});var Lk=a(zl);m_=n(Lk,"decoder_input_ids"),Lk.forEach(t),h_=n(ee," of shape "),Ul=r(ee,"CODE",{});var Xk=a(Ul);u_=n(Xk,"(batch_size, sequence_length)"),Xk.forEach(t),f_=n(ee,`.
use_cache (`),Il=r(ee,"CODE",{});var Dk=a(Il);g_=n(Dk,"bool"),Dk.forEach(t),__=n(ee,", "),xl=r(ee,"EM",{});var Pk=a(xl);b_=n(Pk,"optional"),Pk.forEach(t),y_=n(ee,", defaults to "),Zl=r(ee,"CODE",{});var Ok=a(Zl);T_=n(Ok,"True"),Ok.forEach(t),k_=n(ee,`):
If set to `),ql=r(ee,"CODE",{});var Qk=a(ql);v_=n(Qk,"True"),Qk.forEach(t),w_=n(ee,", "),Wl=r(ee,"CODE",{});var Hk=a(Wl);M_=n(Hk,"past_key_values"),Hk.forEach(t),$_=n(ee,` key value states are returned and can be used to speed up decoding (see
`),Nl=r(ee,"CODE",{});var Yk=a(Nl);R_=n(Yk,"past_key_values"),Yk.forEach(t),B_=n(ee,"). Set to "),Al=r(ee,"CODE",{});var Kk=a(Al);F_=n(Kk,"False"),Kk.forEach(t),E_=n(ee," during training, "),Sl=r(ee,"CODE",{});var ev=a(Sl);C_=n(ev,"True"),ev.forEach(t),j_=n(ee,` during generation
labels (`),Gl=r(ee,"CODE",{});var tv=a(Gl);J_=n(tv,"tf.Tensor"),tv.forEach(t),z_=n(ee," or "),Vl=r(ee,"CODE",{});var ov=a(Vl);U_=n(ov,"np.ndarray"),ov.forEach(t),I_=n(ee," of shape "),Ll=r(ee,"CODE",{});var nv=a(Ll);x_=n(nv,"(batch_size, sequence_length)"),nv.forEach(t),Z_=n(ee,", "),Xl=r(ee,"EM",{});var sv=a(Xl);q_=n(sv,"optional"),sv.forEach(t),W_=n(ee,`):
Labels for computing the cross entropy classification loss. Indices should be in `),Dl=r(ee,"CODE",{});var rv=a(Dl);N_=n(rv,"[0, ..., config.vocab_size - 1]"),rv.forEach(t),A_=n(ee,"."),ee.forEach(t),S_=m(eo),w(Cn.$$.fragment,eo),eo.forEach(t),Nt.forEach(t),uc=m(i),Jo=r(i,"H2",{class:!0});var ap=a(Jo);jn=r(ap,"A",{id:!0,class:!0,href:!0});var av=a(jn);Pl=r(av,"SPAN",{});var iv=a(Pl);w(xr.$$.fragment,iv),iv.forEach(t),av.forEach(t),G_=m(ap),Ol=r(ap,"SPAN",{});var lv=a(Ol);V_=n(lv,"TFRemBertForSequenceClassification"),lv.forEach(t),ap.forEach(t),fc=m(i),lt=r(i,"DIV",{class:!0});var At=a(lt);w(Zr.$$.fragment,At),L_=m(At),Ql=r(At,"P",{});var dv=a(Ql);X_=n(dv,"RemBERT Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),dv.forEach(t),D_=m(At),qr=r(At,"P",{});var ip=a(qr);P_=n(ip,"This model inherits from "),Ua=r(ip,"A",{href:!0});var cv=a(Ua);O_=n(cv,"TFPreTrainedModel"),cv.forEach(t),Q_=n(ip,`. 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.)`),ip.forEach(t),H_=m(At),Wr=r(At,"P",{});var lp=a(Wr);Y_=n(lp,"This model is also a "),Nr=r(lp,"A",{href:!0,rel:!0});var pv=a(Nr);K_=n(pv,"tf.keras.Model"),pv.forEach(t),eb=n(lp,` 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.`),lp.forEach(t),tb=m(At),w(Jn.$$.fragment,At),ob=m(At),bt=r(At,"DIV",{class:!0});var to=a(bt);w(Ar.$$.fragment,to),nb=m(to),zo=r(to,"P",{});var ri=a(zo);sb=n(ri,"The "),Ia=r(ri,"A",{href:!0});var mv=a(Ia);rb=n(mv,"TFRemBertForSequenceClassification"),mv.forEach(t),ab=n(ri," forward method, overrides the "),Hl=r(ri,"CODE",{});var hv=a(Hl);ib=n(hv,"__call__"),hv.forEach(t),lb=n(ri," special method."),ri.forEach(t),db=m(to),w(zn.$$.fragment,to),cb=m(to),w(Un.$$.fragment,to),pb=m(to),w(In.$$.fragment,to),to.forEach(t),At.forEach(t),gc=m(i),Uo=r(i,"H2",{class:!0});var dp=a(Uo);xn=r(dp,"A",{id:!0,class:!0,href:!0});var uv=a(xn);Yl=r(uv,"SPAN",{});var fv=a(Yl);w(Sr.$$.fragment,fv),fv.forEach(t),uv.forEach(t),mb=m(dp),Kl=r(dp,"SPAN",{});var gv=a(Kl);hb=n(gv,"TFRemBertForMultipleChoice"),gv.forEach(t),dp.forEach(t),_c=m(i),dt=r(i,"DIV",{class:!0});var St=a(dt);w(Gr.$$.fragment,St),ub=m(St),ed=r(St,"P",{});var _v=a(ed);fb=n(_v,`RemBERT 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.`),_v.forEach(t),gb=m(St),Vr=r(St,"P",{});var cp=a(Vr);_b=n(cp,"This model inherits from "),xa=r(cp,"A",{href:!0});var bv=a(xa);bb=n(bv,"TFPreTrainedModel"),bv.forEach(t),yb=n(cp,`. 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.)`),cp.forEach(t),Tb=m(St),Lr=r(St,"P",{});var pp=a(Lr);kb=n(pp,"This model is also a "),Xr=r(pp,"A",{href:!0,rel:!0});var yv=a(Xr);vb=n(yv,"tf.keras.Model"),yv.forEach(t),wb=n(pp,` 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.`),pp.forEach(t),Mb=m(St),w(Zn.$$.fragment,St),$b=m(St),xt=r(St,"DIV",{class:!0});var cs=a(xt);w(Dr.$$.fragment,cs),Rb=m(cs),Io=r(cs,"P",{});var ai=a(Io);Bb=n(ai,"The "),Za=r(ai,"A",{href:!0});var Tv=a(Za);Fb=n(Tv,"TFRemBertForMultipleChoice"),Tv.forEach(t),Eb=n(ai," forward method, overrides the "),td=r(ai,"CODE",{});var kv=a(td);Cb=n(kv,"__call__"),kv.forEach(t),jb=n(ai," special method."),ai.forEach(t),Jb=m(cs),w(qn.$$.fragment,cs),zb=m(cs),w(Wn.$$.fragment,cs),cs.forEach(t),St.forEach(t),bc=m(i),xo=r(i,"H2",{class:!0});var mp=a(xo);Nn=r(mp,"A",{id:!0,class:!0,href:!0});var vv=a(Nn);od=r(vv,"SPAN",{});var wv=a(od);w(Pr.$$.fragment,wv),wv.forEach(t),vv.forEach(t),Ub=m(mp),nd=r(mp,"SPAN",{});var Mv=a(nd);Ib=n(Mv,"TFRemBertForTokenClassification"),Mv.forEach(t),mp.forEach(t),yc=m(i),ct=r(i,"DIV",{class:!0});var Gt=a(ct);w(Or.$$.fragment,Gt),xb=m(Gt),sd=r(Gt,"P",{});var $v=a(sd);Zb=n($v,`RemBERT 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.`),$v.forEach(t),qb=m(Gt),Qr=r(Gt,"P",{});var hp=a(Qr);Wb=n(hp,"This model inherits from "),qa=r(hp,"A",{href:!0});var Rv=a(qa);Nb=n(Rv,"TFPreTrainedModel"),Rv.forEach(t),Ab=n(hp,`. 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.)`),hp.forEach(t),Sb=m(Gt),Hr=r(Gt,"P",{});var up=a(Hr);Gb=n(up,"This model is also a "),Yr=r(up,"A",{href:!0,rel:!0});var Bv=a(Yr);Vb=n(Bv,"tf.keras.Model"),Bv.forEach(t),Lb=n(up,` 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.`),up.forEach(t),Xb=m(Gt),w(An.$$.fragment,Gt),Db=m(Gt),yt=r(Gt,"DIV",{class:!0});var oo=a(yt);w(Kr.$$.fragment,oo),Pb=m(oo),Zo=r(oo,"P",{});var ii=a(Zo);Ob=n(ii,"The "),Wa=r(ii,"A",{href:!0});var Fv=a(Wa);Qb=n(Fv,"TFRemBertForTokenClassification"),Fv.forEach(t),Hb=n(ii," forward method, overrides the "),rd=r(ii,"CODE",{});var Ev=a(rd);Yb=n(Ev,"__call__"),Ev.forEach(t),Kb=n(ii," special method."),ii.forEach(t),ey=m(oo),w(Sn.$$.fragment,oo),ty=m(oo),w(Gn.$$.fragment,oo),oy=m(oo),w(Vn.$$.fragment,oo),oo.forEach(t),Gt.forEach(t),Tc=m(i),qo=r(i,"H2",{class:!0});var fp=a(qo);Ln=r(fp,"A",{id:!0,class:!0,href:!0});var Cv=a(Ln);ad=r(Cv,"SPAN",{});var jv=a(ad);w(ea.$$.fragment,jv),jv.forEach(t),Cv.forEach(t),ny=m(fp),id=r(fp,"SPAN",{});var Jv=a(id);sy=n(Jv,"TFRemBertForQuestionAnswering"),Jv.forEach(t),fp.forEach(t),kc=m(i),pt=r(i,"DIV",{class:!0});var Vt=a(pt);w(ta.$$.fragment,Vt),ry=m(Vt),Wo=r(Vt,"P",{});var li=a(Wo);ay=n(li,`RemBERT 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 `),ld=r(li,"CODE",{});var zv=a(ld);iy=n(zv,"span start logits"),zv.forEach(t),ly=n(li," and "),dd=r(li,"CODE",{});var Uv=a(dd);dy=n(Uv,"span end logits"),Uv.forEach(t),cy=n(li,")."),li.forEach(t),py=m(Vt),oa=r(Vt,"P",{});var gp=a(oa);my=n(gp,"This model inherits from "),Na=r(gp,"A",{href:!0});var Iv=a(Na);hy=n(Iv,"TFPreTrainedModel"),Iv.forEach(t),uy=n(gp,`. 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.)`),gp.forEach(t),fy=m(Vt),na=r(Vt,"P",{});var _p=a(na);gy=n(_p,"This model is also a "),sa=r(_p,"A",{href:!0,rel:!0});var xv=a(sa);_y=n(xv,"tf.keras.Model"),xv.forEach(t),by=n(_p,` 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.`),_p.forEach(t),yy=m(Vt),w(Xn.$$.fragment,Vt),Ty=m(Vt),Tt=r(Vt,"DIV",{class:!0});var no=a(Tt);w(ra.$$.fragment,no),ky=m(no),No=r(no,"P",{});var di=a(No);vy=n(di,"The "),Aa=r(di,"A",{href:!0});var Zv=a(Aa);wy=n(Zv,"TFRemBertForQuestionAnswering"),Zv.forEach(t),My=n(di," forward method, overrides the "),cd=r(di,"CODE",{});var qv=a(cd);$y=n(qv,"__call__"),qv.forEach(t),Ry=n(di," special method."),di.forEach(t),By=m(no),w(Dn.$$.fragment,no),Fy=m(no),w(Pn.$$.fragment,no),Ey=m(no),w(On.$$.fragment,no),no.forEach(t),Vt.forEach(t),this.h()},h(){g(d,"name","hf:doc:metadata"),g(d,"content",JSON.stringify(zw)),g(u,"id","rembert"),g(u,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(u,"href","#rembert"),g(h,"class","relative group"),g(ae,"id","overview"),g(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"),g(ae,"href","#overview"),g(N,"class","relative group"),g(le,"href","https://arxiv.org/abs/2010.12821"),g(le,"rel","nofollow"),g(ie,"id","documentation-resources"),g(ie,"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"),g(ie,"href","#documentation-resources"),g(A,"class","relative group"),g(de,"href","../tasks/sequence_classification"),g(ce,"href","../tasks/token_classification"),g(x,"href","../tasks/question_answering"),g(F,"href","../tasks/language_modeling"),g(qe,"href","../tasks/masked_language_modeling"),g(We,"href","../tasks/multiple_choice"),g(G,"id","transformers.RemBertConfig"),g(G,"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"),g(G,"href","#transformers.RemBertConfig"),g(q,"class","relative group"),g(pa,"href","/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertModel"),g(ps,"href","https://huggingface.co/google/rembert"),g(ps,"rel","nofollow"),g(ma,"href","/docs/transformers/v4.33.0/en/main_classes/configuration#transformers.PretrainedConfig"),g(ha,"href","/docs/transformers/v4.33.0/en/main_classes/configuration#transformers.PretrainedConfig"),g(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Vo,"id","transformers.RemBertTokenizer"),g(Vo,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(Vo,"href","#transformers.RemBertTokenizer"),g(ao,"class","relative group"),g(fs,"href","https://github.com/google/sentencepiece"),g(fs,"rel","nofollow"),g(ua,"href","/docs/transformers/v4.33.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),g(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Lo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(_a,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Do,"id","transformers.RemBertTokenizerFast"),g(Do,"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"),g(Do,"href","#transformers.RemBertTokenizerFast"),g(lo,"class","relative group"),g($s,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=unigram#models"),g($s,"rel","nofollow"),g(ba,"href","/docs/transformers/v4.33.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),g(Qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Po,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(ka,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Qo,"id","transformers.RemBertModel"),g(Qo,"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"),g(Qo,"href","#transformers.RemBertModel"),g(co,"class","relative group"),g(Is,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(Is,"rel","nofollow"),g(Zs,"href","https://arxiv.org/abs/1706.03762"),g(Zs,"rel","nofollow"),g(va,"href","/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertModel"),g(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Ko,"id","transformers.RemBertForCausalLM"),g(Ko,"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"),g(Ko,"href","#transformers.RemBertForCausalLM"),g(mo,"class","relative group"),g(As,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(As,"rel","nofollow"),g(wa,"href","/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertForCausalLM"),g(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(on,"id","transformers.RemBertForMaskedLM"),g(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"),g(on,"href","#transformers.RemBertForMaskedLM"),g(fo,"class","relative group"),g(Ls,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(Ls,"rel","nofollow"),g(Ma,"href","/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertForMaskedLM"),g(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(rn,"id","transformers.RemBertForSequenceClassification"),g(rn,"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"),g(rn,"href","#transformers.RemBertForSequenceClassification"),g(bo,"class","relative group"),g(Qs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(Qs,"rel","nofollow"),g($a,"href","/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertForSequenceClassification"),g(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(cn,"id","transformers.RemBertForMultipleChoice"),g(cn,"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"),g(cn,"href","#transformers.RemBertForMultipleChoice"),g(To,"class","relative group"),g(tr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(tr,"rel","nofollow"),g(Ra,"href","/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertForMultipleChoice"),g(Jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(hn,"id","transformers.RemBertForTokenClassification"),g(hn,"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"),g(hn,"href","#transformers.RemBertForTokenClassification"),g(vo,"class","relative group"),g(ar,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(ar,"rel","nofollow"),g(Ba,"href","/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertForTokenClassification"),g(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(gn,"id","transformers.RemBertForQuestionAnswering"),g(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"),g(gn,"href","#transformers.RemBertForQuestionAnswering"),g(Mo,"class","relative group"),g(pr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(pr,"rel","nofollow"),g(Fa,"href","/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.RemBertForQuestionAnswering"),g(Ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(yn,"id","transformers.TFRemBertModel"),g(yn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(yn,"href","#transformers.TFRemBertModel"),g(Bo,"class","relative group"),g(Ea,"href","/docs/transformers/v4.33.0/en/main_classes/model#transformers.TFPreTrainedModel"),g(_r,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(_r,"rel","nofollow"),g(Ca,"href","/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.TFRemBertModel"),g(It,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(wn,"id","transformers.TFRemBertForMaskedLM"),g(wn,"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"),g(wn,"href","#transformers.TFRemBertForMaskedLM"),g(Eo,"class","relative group"),g(ja,"href","/docs/transformers/v4.33.0/en/main_classes/model#transformers.TFPreTrainedModel"),g(Mr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Mr,"rel","nofollow"),g(Ja,"href","/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.TFRemBertForMaskedLM"),g(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Fn,"id","transformers.TFRemBertForCausalLM"),g(Fn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(Fn,"href","#transformers.TFRemBertForCausalLM"),g(jo,"class","relative group"),g(za,"href","/docs/transformers/v4.33.0/en/main_classes/model#transformers.TFPreTrainedModel"),g(jr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(jr,"rel","nofollow"),g(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(jn,"id","transformers.TFRemBertForSequenceClassification"),g(jn,"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"),g(jn,"href","#transformers.TFRemBertForSequenceClassification"),g(Jo,"class","relative group"),g(Ua,"href","/docs/transformers/v4.33.0/en/main_classes/model#transformers.TFPreTrainedModel"),g(Nr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Nr,"rel","nofollow"),g(Ia,"href","/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.TFRemBertForSequenceClassification"),g(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(xn,"id","transformers.TFRemBertForMultipleChoice"),g(xn,"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"),g(xn,"href","#transformers.TFRemBertForMultipleChoice"),g(Uo,"class","relative group"),g(xa,"href","/docs/transformers/v4.33.0/en/main_classes/model#transformers.TFPreTrainedModel"),g(Xr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Xr,"rel","nofollow"),g(Za,"href","/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.TFRemBertForMultipleChoice"),g(xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Nn,"id","transformers.TFRemBertForTokenClassification"),g(Nn,"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"),g(Nn,"href","#transformers.TFRemBertForTokenClassification"),g(xo,"class","relative group"),g(qa,"href","/docs/transformers/v4.33.0/en/main_classes/model#transformers.TFPreTrainedModel"),g(Yr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Yr,"rel","nofollow"),g(Wa,"href","/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.TFRemBertForTokenClassification"),g(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(Ln,"id","transformers.TFRemBertForQuestionAnswering"),g(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"),g(Ln,"href","#transformers.TFRemBertForQuestionAnswering"),g(qo,"class","relative group"),g(Na,"href","/docs/transformers/v4.33.0/en/main_classes/model#transformers.TFPreTrainedModel"),g(sa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(sa,"rel","nofollow"),g(Aa,"href","/docs/transformers/v4.33.0/en/model_doc/rembert#transformers.TFRemBertForQuestionAnswering"),g(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),g(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(i,T){e(document.head,d),_(i,b,T),_(i,h,T),e(h,u),e(u,y),M(l,y,null),e(h,c),e(h,j),e(j,Me),_(i,ge,T),_(i,N,T),e(N,ae),e(ae,te),M(k,te,null),e(N,$e),e(N,D),e(D,Re),_(i,_e,T),_(i,S,T),e(S,Be),e(S,le),e(le,Q),e(S,Fe),_(i,be,T),_(i,V,T),e(V,Ee),_(i,ye,T),_(i,L,T),e(L,me),e(me,Ce),_(i,oe,T),_(i,J,T),e(J,U),_(i,Te,T),_(i,X,T),e(X,je),_(i,ke,T),_(i,A,T),e(A,ie),e(ie,he),M(z,he,null),e(A,Je),e(A,P),e(P,ze),_(i,ve,T),_(i,Z,T),e(Z,ue),e(ue,de),e(de,W),e(Z,Ue),e(Z,O),e(O,ce),e(ce,se),e(Z,I),e(Z,fe),e(fe,x),e(x,Ie),e(Z,xe),e(Z,f),e(f,F),e(F,Le),e(Z,re),e(Z,Ne),e(Ne,qe),e(qe,E),e(Z,Xe),e(Z,Ae),e(Ae,We),e(We,De),_(i,Ve,T),_(i,q,T),e(q,G),e(G,Se),M(Ze,Se,null),e(q,H),e(q,Ge),e(Ge,Pe),_(i,we,T),_(i,pe,T),M(K,pe,null),e(pe,Oe),e(pe,so),e(so,bp),e(so,pa),e(pa,yp),e(so,Tp),e(so,ps),e(ps,kp),e(so,vp),e(pe,wp),e(pe,ro),e(ro,Mp),e(ro,ma),e(ma,$p),e(ro,Rp),e(ro,ha),e(ha,Bp),e(ro,Fp),e(pe,Ep),M(Go,pe,null),_(i,Vd,T),_(i,ao,T),e(ao,Vo),e(Vo,ci),M(ms,ci,null),e(ao,Cp),e(ao,pi),e(pi,jp),_(i,Ld,T),_(i,tt,T),M(hs,tt,null),e(tt,Jp),e(tt,us),e(us,zp),e(us,fs),e(fs,Up),e(us,Ip),e(tt,xp),e(tt,gs),e(gs,Zp),e(gs,ua),e(ua,qp),e(gs,Wp),e(tt,Np),e(tt,Ot),M(_s,Ot,null),e(Ot,Ap),e(Ot,mi),e(mi,Sp),e(Ot,Gp),e(Ot,bs),e(bs,fa),e(fa,Vp),e(fa,hi),e(hi,Lp),e(bs,Xp),e(bs,ga),e(ga,Dp),e(ga,ui),e(ui,Pp),e(tt,Op),e(tt,Lo),M(ys,Lo,null),e(Lo,Qp),e(Lo,Ts),e(Ts,Hp),e(Ts,fi),e(fi,Yp),e(Ts,Kp),e(tt,em),e(tt,Bt),M(ks,Bt,null),e(Bt,tm),e(Bt,gi),e(gi,om),e(Bt,nm),M(Xo,Bt,null),e(Bt,sm),e(Bt,io),e(io,rm),e(io,_i),e(_i,am),e(io,im),e(io,bi),e(bi,lm),e(io,dm),e(tt,cm),e(tt,_a),M(vs,_a,null),_(i,Xd,T),_(i,lo,T),e(lo,Do),e(Do,yi),M(ws,yi,null),e(lo,pm),e(lo,Ti),e(Ti,mm),_(i,Dd,T),_(i,nt,T),M(Ms,nt,null),e(nt,hm),e(nt,Lt),e(Lt,um),e(Lt,ki),e(ki,fm),e(Lt,gm),e(Lt,$s),e($s,_m),e(Lt,bm),e(Lt,ba),e(ba,ym),e(Lt,Tm),e(nt,km),e(nt,Qt),M(Rs,Qt,null),e(Qt,vm),e(Qt,vi),e(vi,wm),e(Qt,Mm),e(Qt,Bs),e(Bs,ya),e(ya,$m),e(ya,wi),e(wi,Rm),e(Bs,Bm),e(Bs,Ta),e(Ta,Fm),e(Ta,Mi),e(Mi,Em),e(nt,Cm),e(nt,Po),M(Fs,Po,null),e(Po,jm),e(Po,Es),e(Es,Jm),e(Es,$i),e($i,zm),e(Es,Um),e(nt,Im),e(nt,Ft),M(Cs,Ft,null),e(Ft,xm),e(Ft,Ri),e(Ri,Zm),e(Ft,qm),M(Oo,Ft,null),e(Ft,Wm),e(Ft,Bi),e(Bi,Nm),e(nt,Am),e(nt,ka),M(js,ka,null),_(i,Pd,T),_(i,co,T),e(co,Qo),e(Qo,Fi),M(Js,Fi,null),e(co,Sm),e(co,Ei),e(Ei,Gm),_(i,Od,T),_(i,ht,T),M(zs,ht,null),e(ht,Vm),e(ht,Us),e(Us,Lm),e(Us,Is),e(Is,Xm),e(Us,Dm),e(ht,Pm),e(ht,xs),e(xs,Om),e(xs,Zs),e(Zs,Qm),e(xs,Hm),e(ht,Ym),e(ht,st),e(st,Km),e(st,Ci),e(Ci,eh),e(st,th),e(st,ji),e(ji,oh),e(st,nh),e(st,Ji),e(Ji,sh),e(st,rh),e(st,zi),e(zi,ah),e(st,ih),e(st,Ui),e(Ui,lh),e(st,dh),e(st,Ii),e(Ii,ch),e(st,ph),e(ht,mh),e(ht,Et),M(qs,Et,null),e(Et,hh),e(Et,po),e(po,uh),e(po,va),e(va,fh),e(po,gh),e(po,xi),e(xi,_h),e(po,bh),e(Et,yh),M(Ho,Et,null),e(Et,Th),M(Yo,Et,null),_(i,Qd,T),_(i,mo,T),e(mo,Ko),e(Ko,Zi),M(Ws,Zi,null),e(mo,kh),e(mo,qi),e(qi,vh),_(i,Hd,T),_(i,Xt,T),M(Ns,Xt,null),e(Xt,wh),e(Xt,ho),e(ho,Mh),e(ho,Wi),e(Wi,$h),e(ho,Rh),e(ho,As),e(As,Bh),e(ho,Fh),e(Xt,Eh),e(Xt,Ct),M(Ss,Ct,null),e(Ct,Ch),e(Ct,uo),e(uo,jh),e(uo,wa),e(wa,Jh),e(uo,zh),e(uo,Ni),e(Ni,Uh),e(uo,Ih),e(Ct,xh),M(en,Ct,null),e(Ct,Zh),M(tn,Ct,null),_(i,Yd,T),_(i,fo,T),e(fo,on),e(on,Ai),M(Gs,Ai,null),e(fo,qh),e(fo,Si),e(Si,Wh),_(i,Kd,T),_(i,Dt,T),M(Vs,Dt,null),e(Dt,Nh),e(Dt,go),e(go,Ah),e(go,Gi),e(Gi,Sh),e(go,Gh),e(go,Ls),e(Ls,Vh),e(go,Lh),e(Dt,Xh),e(Dt,jt),M(Xs,jt,null),e(jt,Dh),e(jt,_o),e(_o,Ph),e(_o,Ma),e(Ma,Oh),e(_o,Qh),e(_o,Vi),e(Vi,Hh),e(_o,Yh),e(jt,Kh),M(nn,jt,null),e(jt,eu),M(sn,jt,null),_(i,ec,T),_(i,bo,T),e(bo,rn),e(rn,Li),M(Ds,Li,null),e(bo,tu),e(bo,Xi),e(Xi,ou),_(i,tc,T),_(i,wt,T),M(Ps,wt,null),e(wt,nu),e(wt,Di),e(Di,su),e(wt,ru),e(wt,Os),e(Os,au),e(Os,Qs),e(Qs,iu),e(Os,lu),e(wt,du),e(wt,ft),M(Hs,ft,null),e(ft,cu),e(ft,yo),e(yo,pu),e(yo,$a),e($a,mu),e(yo,hu),e(yo,Pi),e(Pi,uu),e(yo,fu),e(ft,gu),M(an,ft,null),e(ft,_u),M(ln,ft,null),e(ft,bu),M(dn,ft,null),_(i,oc,T),_(i,To,T),e(To,cn),e(cn,Oi),M(Ys,Oi,null),e(To,yu),e(To,Qi),e(Qi,Tu),_(i,nc,T),_(i,Mt,T),M(Ks,Mt,null),e(Mt,ku),e(Mt,Hi),e(Hi,vu),e(Mt,wu),e(Mt,er),e(er,Mu),e(er,tr),e(tr,$u),e(er,Ru),e(Mt,Bu),e(Mt,Jt),M(or,Jt,null),e(Jt,Fu),e(Jt,ko),e(ko,Eu),e(ko,Ra),e(Ra,Cu),e(ko,ju),e(ko,Yi),e(Yi,Ju),e(ko,zu),e(Jt,Uu),M(pn,Jt,null),e(Jt,Iu),M(mn,Jt,null),_(i,sc,T),_(i,vo,T),e(vo,hn),e(hn,Ki),M(nr,Ki,null),e(vo,xu),e(vo,el),e(el,Zu),_(i,rc,T),_(i,$t,T),M(sr,$t,null),e($t,qu),e($t,tl),e(tl,Wu),e($t,Nu),e($t,rr),e(rr,Au),e(rr,ar),e(ar,Su),e(rr,Gu),e($t,Vu),e($t,zt),M(ir,zt,null),e(zt,Lu),e(zt,wo),e(wo,Xu),e(wo,Ba),e(Ba,Du),e(wo,Pu),e(wo,ol),e(ol,Ou),e(wo,Qu),e(zt,Hu),M(un,zt,null),e(zt,Yu),M(fn,zt,null),_(i,ac,T),_(i,Mo,T),e(Mo,gn),e(gn,nl),M(lr,nl,null),e(Mo,Ku),e(Mo,sl),e(sl,ef),_(i,ic,T),_(i,Rt,T),M(dr,Rt,null),e(Rt,tf),e(Rt,$o),e($o,of),e($o,rl),e(rl,nf),e($o,sf),e($o,al),e(al,rf),e($o,af),e(Rt,lf),e(Rt,cr),e(cr,df),e(cr,pr),e(pr,cf),e(cr,pf),e(Rt,mf),e(Rt,Ut),M(mr,Ut,null),e(Ut,hf),e(Ut,Ro),e(Ro,uf),e(Ro,Fa),e(Fa,ff),e(Ro,gf),e(Ro,il),e(il,_f),e(Ro,bf),e(Ut,yf),M(_n,Ut,null),e(Ut,Tf),M(bn,Ut,null),_(i,lc,T),_(i,Bo,T),e(Bo,yn),e(yn,ll),M(hr,ll,null),e(Bo,kf),e(Bo,dl),e(dl,vf),_(i,dc,T),_(i,rt,T),M(ur,rt,null),e(rt,wf),e(rt,cl),e(cl,Mf),e(rt,$f),e(rt,fr),e(fr,Rf),e(fr,Ea),e(Ea,Bf),e(fr,Ff),e(rt,Ef),e(rt,gr),e(gr,Cf),e(gr,_r),e(_r,jf),e(gr,Jf),e(rt,zf),M(Tn,rt,null),e(rt,Uf),e(rt,It),M(br,It,null),e(It,If),e(It,Fo),e(Fo,xf),e(Fo,Ca),e(Ca,Zf),e(Fo,qf),e(Fo,pl),e(pl,Wf),e(Fo,Nf),e(It,Af),M(kn,It,null),e(It,Sf),M(vn,It,null),_(i,cc,T),_(i,Eo,T),e(Eo,wn),e(wn,ml),M(yr,ml,null),e(Eo,Gf),e(Eo,hl),e(hl,Vf),_(i,pc,T),_(i,at,T),M(Tr,at,null),e(at,Lf),e(at,kr),e(kr,Xf),e(kr,ul),e(ul,Df),e(kr,Pf),e(at,Of),e(at,vr),e(vr,Qf),e(vr,ja),e(ja,Hf),e(vr,Yf),e(at,Kf),e(at,wr),e(wr,eg),e(wr,Mr),e(Mr,tg),e(wr,og),e(at,ng),M(Mn,at,null),e(at,sg),e(at,gt),M($r,gt,null),e(gt,rg),e(gt,Co),e(Co,ag),e(Co,Ja),e(Ja,ig),e(Co,lg),e(Co,fl),e(fl,dg),e(Co,cg),e(gt,pg),M($n,gt,null),e(gt,mg),M(Rn,gt,null),e(gt,hg),M(Bn,gt,null),_(i,mc,T),_(i,jo,T),e(jo,Fn),e(Fn,gl),M(Rr,gl,null),e(jo,ug),e(jo,_l),e(_l,fg),_(i,hc,T),_(i,it,T),M(Br,it,null),e(it,gg),e(it,Fr),e(Fr,_g),e(Fr,bl),e(bl,bg),e(Fr,yg),e(it,Tg),e(it,Er),e(Er,kg),e(Er,za),e(za,vg),e(Er,wg),e(it,Mg),e(it,Cr),e(Cr,$g),e(Cr,jr),e(jr,Rg),e(Cr,Bg),e(it,Fg),M(En,it,null),e(it,Eg),e(it,_t),M(Jr,_t,null),e(_t,Cg),e(_t,ot),e(ot,jg),e(ot,yl),e(yl,Jg),e(ot,zg),e(ot,Tl),e(Tl,Ug),e(ot,Ig),e(ot,kl),e(kl,xg),e(ot,Zg),e(ot,vl),e(vl,qg),e(ot,Wg),e(ot,wl),e(wl,Ng),e(ot,Ag),e(ot,Ml),e(Ml,Sg),e(ot,Gg),e(ot,$l),e($l,Vg),e(ot,Lg),e(_t,Xg),e(_t,zr),e(zr,Ur),e(Ur,Dg),e(Ur,Rl),e(Rl,Pg),e(Ur,Og),e(zr,Qg),e(zr,Ir),e(Ir,Hg),e(Ir,Bl),e(Bl,Yg),e(Ir,Kg),e(_t,e_),e(_t,Y),e(Y,t_),e(Y,Fl),e(Fl,o_),e(Y,n_),e(Y,El),e(El,s_),e(Y,r_),e(Y,Cl),e(Cl,a_),e(Y,i_),e(Y,jl),e(jl,l_),e(Y,d_),e(Y,Jl),e(Jl,c_),e(Y,p_),e(Y,zl),e(zl,m_),e(Y,h_),e(Y,Ul),e(Ul,u_),e(Y,f_),e(Y,Il),e(Il,g_),e(Y,__),e(Y,xl),e(xl,b_),e(Y,y_),e(Y,Zl),e(Zl,T_),e(Y,k_),e(Y,ql),e(ql,v_),e(Y,w_),e(Y,Wl),e(Wl,M_),e(Y,$_),e(Y,Nl),e(Nl,R_),e(Y,B_),e(Y,Al),e(Al,F_),e(Y,E_),e(Y,Sl),e(Sl,C_),e(Y,j_),e(Y,Gl),e(Gl,J_),e(Y,z_),e(Y,Vl),e(Vl,U_),e(Y,I_),e(Y,Ll),e(Ll,x_),e(Y,Z_),e(Y,Xl),e(Xl,q_),e(Y,W_),e(Y,Dl),e(Dl,N_),e(Y,A_),e(_t,S_),M(Cn,_t,null),_(i,uc,T),_(i,Jo,T),e(Jo,jn),e(jn,Pl),M(xr,Pl,null),e(Jo,G_),e(Jo,Ol),e(Ol,V_),_(i,fc,T),_(i,lt,T),M(Zr,lt,null),e(lt,L_),e(lt,Ql),e(Ql,X_),e(lt,D_),e(lt,qr),e(qr,P_),e(qr,Ua),e(Ua,O_),e(qr,Q_),e(lt,H_),e(lt,Wr),e(Wr,Y_),e(Wr,Nr),e(Nr,K_),e(Wr,eb),e(lt,tb),M(Jn,lt,null),e(lt,ob),e(lt,bt),M(Ar,bt,null),e(bt,nb),e(bt,zo),e(zo,sb),e(zo,Ia),e(Ia,rb),e(zo,ab),e(zo,Hl),e(Hl,ib),e(zo,lb),e(bt,db),M(zn,bt,null),e(bt,cb),M(Un,bt,null),e(bt,pb),M(In,bt,null),_(i,gc,T),_(i,Uo,T),e(Uo,xn),e(xn,Yl),M(Sr,Yl,null),e(Uo,mb),e(Uo,Kl),e(Kl,hb),_(i,_c,T),_(i,dt,T),M(Gr,dt,null),e(dt,ub),e(dt,ed),e(ed,fb),e(dt,gb),e(dt,Vr),e(Vr,_b),e(Vr,xa),e(xa,bb),e(Vr,yb),e(dt,Tb),e(dt,Lr),e(Lr,kb),e(Lr,Xr),e(Xr,vb),e(Lr,wb),e(dt,Mb),M(Zn,dt,null),e(dt,$b),e(dt,xt),M(Dr,xt,null),e(xt,Rb),e(xt,Io),e(Io,Bb),e(Io,Za),e(Za,Fb),e(Io,Eb),e(Io,td),e(td,Cb),e(Io,jb),e(xt,Jb),M(qn,xt,null),e(xt,zb),M(Wn,xt,null),_(i,bc,T),_(i,xo,T),e(xo,Nn),e(Nn,od),M(Pr,od,null),e(xo,Ub),e(xo,nd),e(nd,Ib),_(i,yc,T),_(i,ct,T),M(Or,ct,null),e(ct,xb),e(ct,sd),e(sd,Zb),e(ct,qb),e(ct,Qr),e(Qr,Wb),e(Qr,qa),e(qa,Nb),e(Qr,Ab),e(ct,Sb),e(ct,Hr),e(Hr,Gb),e(Hr,Yr),e(Yr,Vb),e(Hr,Lb),e(ct,Xb),M(An,ct,null),e(ct,Db),e(ct,yt),M(Kr,yt,null),e(yt,Pb),e(yt,Zo),e(Zo,Ob),e(Zo,Wa),e(Wa,Qb),e(Zo,Hb),e(Zo,rd),e(rd,Yb),e(Zo,Kb),e(yt,ey),M(Sn,yt,null),e(yt,ty),M(Gn,yt,null),e(yt,oy),M(Vn,yt,null),_(i,Tc,T),_(i,qo,T),e(qo,Ln),e(Ln,ad),M(ea,ad,null),e(qo,ny),e(qo,id),e(id,sy),_(i,kc,T),_(i,pt,T),M(ta,pt,null),e(pt,ry),e(pt,Wo),e(Wo,ay),e(Wo,ld),e(ld,iy),e(Wo,ly),e(Wo,dd),e(dd,dy),e(Wo,cy),e(pt,py),e(pt,oa),e(oa,my),e(oa,Na),e(Na,hy),e(oa,uy),e(pt,fy),e(pt,na),e(na,gy),e(na,sa),e(sa,_y),e(na,by),e(pt,yy),M(Xn,pt,null),e(pt,Ty),e(pt,Tt),M(ra,Tt,null),e(Tt,ky),e(Tt,No),e(No,vy),e(No,Aa),e(Aa,wy),e(No,My),e(No,cd),e(cd,$y),e(No,Ry),e(Tt,By),M(Dn,Tt,null),e(Tt,Fy),M(Pn,Tt,null),e(Tt,Ey),M(On,Tt,null),vc=!0},p(i,[T]){const aa={};T&2&&(aa.$$scope={dirty:T,ctx:i}),Go.$set(aa);const pd={};T&2&&(pd.$$scope={dirty:T,ctx:i}),Xo.$set(pd);const md={};T&2&&(md.$$scope={dirty:T,ctx:i}),Oo.$set(md);const hd={};T&2&&(hd.$$scope={dirty:T,ctx:i}),Ho.$set(hd);const ia={};T&2&&(ia.$$scope={dirty:T,ctx:i}),Yo.$set(ia);const ud={};T&2&&(ud.$$scope={dirty:T,ctx:i}),en.$set(ud);const fd={};T&2&&(fd.$$scope={dirty:T,ctx:i}),tn.$set(fd);const gd={};T&2&&(gd.$$scope={dirty:T,ctx:i}),nn.$set(gd);const la={};T&2&&(la.$$scope={dirty:T,ctx:i}),sn.$set(la);const _d={};T&2&&(_d.$$scope={dirty:T,ctx:i}),an.$set(_d);const bd={};T&2&&(bd.$$scope={dirty:T,ctx:i}),ln.$set(bd);const yd={};T&2&&(yd.$$scope={dirty:T,ctx:i}),dn.$set(yd);const Td={};T&2&&(Td.$$scope={dirty:T,ctx:i}),pn.$set(Td);const kd={};T&2&&(kd.$$scope={dirty:T,ctx:i}),mn.$set(kd);const vd={};T&2&&(vd.$$scope={dirty:T,ctx:i}),un.$set(vd);const da={};T&2&&(da.$$scope={dirty:T,ctx:i}),fn.$set(da);const wd={};T&2&&(wd.$$scope={dirty:T,ctx:i}),_n.$set(wd);const Md={};T&2&&(Md.$$scope={dirty:T,ctx:i}),bn.$set(Md);const $d={};T&2&&($d.$$scope={dirty:T,ctx:i}),Tn.$set($d);const ut={};T&2&&(ut.$$scope={dirty:T,ctx:i}),kn.$set(ut);const Rd={};T&2&&(Rd.$$scope={dirty:T,ctx:i}),vn.$set(Rd);const Bd={};T&2&&(Bd.$$scope={dirty:T,ctx:i}),Mn.$set(Bd);const Fd={};T&2&&(Fd.$$scope={dirty:T,ctx:i}),$n.$set(Fd);const Ed={};T&2&&(Ed.$$scope={dirty:T,ctx:i}),Rn.$set(Ed);const Cd={};T&2&&(Cd.$$scope={dirty:T,ctx:i}),Bn.$set(Cd);const jd={};T&2&&(jd.$$scope={dirty:T,ctx:i}),En.$set(jd);const Jd={};T&2&&(Jd.$$scope={dirty:T,ctx:i}),Cn.$set(Jd);const zd={};T&2&&(zd.$$scope={dirty:T,ctx:i}),Jn.$set(zd);const Ud={};T&2&&(Ud.$$scope={dirty:T,ctx:i}),zn.$set(Ud);const Id={};T&2&&(Id.$$scope={dirty:T,ctx:i}),Un.$set(Id);const xd={};T&2&&(xd.$$scope={dirty:T,ctx:i}),In.$set(xd);const Zd={};T&2&&(Zd.$$scope={dirty:T,ctx:i}),Zn.$set(Zd);const ca={};T&2&&(ca.$$scope={dirty:T,ctx:i}),qn.$set(ca);const qd={};T&2&&(qd.$$scope={dirty:T,ctx:i}),Wn.$set(qd);const Wd={};T&2&&(Wd.$$scope={dirty:T,ctx:i}),An.$set(Wd);const Nd={};T&2&&(Nd.$$scope={dirty:T,ctx:i}),Sn.$set(Nd);const Pt={};T&2&&(Pt.$$scope={dirty:T,ctx:i}),Gn.$set(Pt);const Ao={};T&2&&(Ao.$$scope={dirty:T,ctx:i}),Vn.$set(Ao);const Ad={};T&2&&(Ad.$$scope={dirty:T,ctx:i}),Xn.$set(Ad);const Sd={};T&2&&(Sd.$$scope={dirty:T,ctx:i}),Dn.$set(Sd);const So={};T&2&&(So.$$scope={dirty:T,ctx:i}),Pn.$set(So);const Gd={};T&2&&(Gd.$$scope={dirty:T,ctx:i}),On.$set(Gd)},i(i){vc||($(l.$$.fragment,i),$(k.$$.fragment,i),$(z.$$.fragment,i),$(Ze.$$.fragment,i),$(K.$$.fragment,i),$(Go.$$.fragment,i),$(ms.$$.fragment,i),$(hs.$$.fragment,i),$(_s.$$.fragment,i),$(ys.$$.fragment,i),$(ks.$$.fragment,i),$(Xo.$$.fragment,i),$(vs.$$.fragment,i),$(ws.$$.fragment,i),$(Ms.$$.fragment,i),$(Rs.$$.fragment,i),$(Fs.$$.fragment,i),$(Cs.$$.fragment,i),$(Oo.$$.fragment,i),$(js.$$.fragment,i),$(Js.$$.fragment,i),$(zs.$$.fragment,i),$(qs.$$.fragment,i),$(Ho.$$.fragment,i),$(Yo.$$.fragment,i),$(Ws.$$.fragment,i),$(Ns.$$.fragment,i),$(Ss.$$.fragment,i),$(en.$$.fragment,i),$(tn.$$.fragment,i),$(Gs.$$.fragment,i),$(Vs.$$.fragment,i),$(Xs.$$.fragment,i),$(nn.$$.fragment,i),$(sn.$$.fragment,i),$(Ds.$$.fragment,i),$(Ps.$$.fragment,i),$(Hs.$$.fragment,i),$(an.$$.fragment,i),$(ln.$$.fragment,i),$(dn.$$.fragment,i),$(Ys.$$.fragment,i),$(Ks.$$.fragment,i),$(or.$$.fragment,i),$(pn.$$.fragment,i),$(mn.$$.fragment,i),$(nr.$$.fragment,i),$(sr.$$.fragment,i),$(ir.$$.fragment,i),$(un.$$.fragment,i),$(fn.$$.fragment,i),$(lr.$$.fragment,i),$(dr.$$.fragment,i),$(mr.$$.fragment,i),$(_n.$$.fragment,i),$(bn.$$.fragment,i),$(hr.$$.fragment,i),$(ur.$$.fragment,i),$(Tn.$$.fragment,i),$(br.$$.fragment,i),$(kn.$$.fragment,i),$(vn.$$.fragment,i),$(yr.$$.fragment,i),$(Tr.$$.fragment,i),$(Mn.$$.fragment,i),$($r.$$.fragment,i),$($n.$$.fragment,i),$(Rn.$$.fragment,i),$(Bn.$$.fragment,i),$(Rr.$$.fragment,i),$(Br.$$.fragment,i),$(En.$$.fragment,i),$(Jr.$$.fragment,i),$(Cn.$$.fragment,i),$(xr.$$.fragment,i),$(Zr.$$.fragment,i),$(Jn.$$.fragment,i),$(Ar.$$.fragment,i),$(zn.$$.fragment,i),$(Un.$$.fragment,i),$(In.$$.fragment,i),$(Sr.$$.fragment,i),$(Gr.$$.fragment,i),$(Zn.$$.fragment,i),$(Dr.$$.fragment,i),$(qn.$$.fragment,i),$(Wn.$$.fragment,i),$(Pr.$$.fragment,i),$(Or.$$.fragment,i),$(An.$$.fragment,i),$(Kr.$$.fragment,i),$(Sn.$$.fragment,i),$(Gn.$$.fragment,i),$(Vn.$$.fragment,i),$(ea.$$.fragment,i),$(ta.$$.fragment,i),$(Xn.$$.fragment,i),$(ra.$$.fragment,i),$(Dn.$$.fragment,i),$(Pn.$$.fragment,i),$(On.$$.fragment,i),vc=!0)},o(i){R(l.$$.fragment,i),R(k.$$.fragment,i),R(z.$$.fragment,i),R(Ze.$$.fragment,i),R(K.$$.fragment,i),R(Go.$$.fragment,i),R(ms.$$.fragment,i),R(hs.$$.fragment,i),R(_s.$$.fragment,i),R(ys.$$.fragment,i),R(ks.$$.fragment,i),R(Xo.$$.fragment,i),R(vs.$$.fragment,i),R(ws.$$.fragment,i),R(Ms.$$.fragment,i),R(Rs.$$.fragment,i),R(Fs.$$.fragment,i),R(Cs.$$.fragment,i),R(Oo.$$.fragment,i),R(js.$$.fragment,i),R(Js.$$.fragment,i),R(zs.$$.fragment,i),R(qs.$$.fragment,i),R(Ho.$$.fragment,i),R(Yo.$$.fragment,i),R(Ws.$$.fragment,i),R(Ns.$$.fragment,i),R(Ss.$$.fragment,i),R(en.$$.fragment,i),R(tn.$$.fragment,i),R(Gs.$$.fragment,i),R(Vs.$$.fragment,i),R(Xs.$$.fragment,i),R(nn.$$.fragment,i),R(sn.$$.fragment,i),R(Ds.$$.fragment,i),R(Ps.$$.fragment,i),R(Hs.$$.fragment,i),R(an.$$.fragment,i),R(ln.$$.fragment,i),R(dn.$$.fragment,i),R(Ys.$$.fragment,i),R(Ks.$$.fragment,i),R(or.$$.fragment,i),R(pn.$$.fragment,i),R(mn.$$.fragment,i),R(nr.$$.fragment,i),R(sr.$$.fragment,i),R(ir.$$.fragment,i),R(un.$$.fragment,i),R(fn.$$.fragment,i),R(lr.$$.fragment,i),R(dr.$$.fragment,i),R(mr.$$.fragment,i),R(_n.$$.fragment,i),R(bn.$$.fragment,i),R(hr.$$.fragment,i),R(ur.$$.fragment,i),R(Tn.$$.fragment,i),R(br.$$.fragment,i),R(kn.$$.fragment,i),R(vn.$$.fragment,i),R(yr.$$.fragment,i),R(Tr.$$.fragment,i),R(Mn.$$.fragment,i),R($r.$$.fragment,i),R($n.$$.fragment,i),R(Rn.$$.fragment,i),R(Bn.$$.fragment,i),R(Rr.$$.fragment,i),R(Br.$$.fragment,i),R(En.$$.fragment,i),R(Jr.$$.fragment,i),R(Cn.$$.fragment,i),R(xr.$$.fragment,i),R(Zr.$$.fragment,i),R(Jn.$$.fragment,i),R(Ar.$$.fragment,i),R(zn.$$.fragment,i),R(Un.$$.fragment,i),R(In.$$.fragment,i),R(Sr.$$.fragment,i),R(Gr.$$.fragment,i),R(Zn.$$.fragment,i),R(Dr.$$.fragment,i),R(qn.$$.fragment,i),R(Wn.$$.fragment,i),R(Pr.$$.fragment,i),R(Or.$$.fragment,i),R(An.$$.fragment,i),R(Kr.$$.fragment,i),R(Sn.$$.fragment,i),R(Gn.$$.fragment,i),R(Vn.$$.fragment,i),R(ea.$$.fragment,i),R(ta.$$.fragment,i),R(Xn.$$.fragment,i),R(ra.$$.fragment,i),R(Dn.$$.fragment,i),R(Pn.$$.fragment,i),R(On.$$.fragment,i),vc=!1},d(i){t(d),i&&t(b),i&&t(h),B(l),i&&t(ge),i&&t(N),B(k),i&&t(_e),i&&t(S),i&&t(be),i&&t(V),i&&t(ye),i&&t(L),i&&t(oe),i&&t(J),i&&t(Te),i&&t(X),i&&t(ke),i&&t(A),B(z),i&&t(ve),i&&t(Z),i&&t(Ve),i&&t(q),B(Ze),i&&t(we),i&&t(pe),B(K),B(Go),i&&t(Vd),i&&t(ao),B(ms),i&&t(Ld),i&&t(tt),B(hs),B(_s),B(ys),B(ks),B(Xo),B(vs),i&&t(Xd),i&&t(lo),B(ws),i&&t(Dd),i&&t(nt),B(Ms),B(Rs),B(Fs),B(Cs),B(Oo),B(js),i&&t(Pd),i&&t(co),B(Js),i&&t(Od),i&&t(ht),B(zs),B(qs),B(Ho),B(Yo),i&&t(Qd),i&&t(mo),B(Ws),i&&t(Hd),i&&t(Xt),B(Ns),B(Ss),B(en),B(tn),i&&t(Yd),i&&t(fo),B(Gs),i&&t(Kd),i&&t(Dt),B(Vs),B(Xs),B(nn),B(sn),i&&t(ec),i&&t(bo),B(Ds),i&&t(tc),i&&t(wt),B(Ps),B(Hs),B(an),B(ln),B(dn),i&&t(oc),i&&t(To),B(Ys),i&&t(nc),i&&t(Mt),B(Ks),B(or),B(pn),B(mn),i&&t(sc),i&&t(vo),B(nr),i&&t(rc),i&&t($t),B(sr),B(ir),B(un),B(fn),i&&t(ac),i&&t(Mo),B(lr),i&&t(ic),i&&t(Rt),B(dr),B(mr),B(_n),B(bn),i&&t(lc),i&&t(Bo),B(hr),i&&t(dc),i&&t(rt),B(ur),B(Tn),B(br),B(kn),B(vn),i&&t(cc),i&&t(Eo),B(yr),i&&t(pc),i&&t(at),B(Tr),B(Mn),B($r),B($n),B(Rn),B(Bn),i&&t(mc),i&&t(jo),B(Rr),i&&t(hc),i&&t(it),B(Br),B(En),B(Jr),B(Cn),i&&t(uc),i&&t(Jo),B(xr),i&&t(fc),i&&t(lt),B(Zr),B(Jn),B(Ar),B(zn),B(Un),B(In),i&&t(gc),i&&t(Uo),B(Sr),i&&t(_c),i&&t(dt),B(Gr),B(Zn),B(Dr),B(qn),B(Wn),i&&t(bc),i&&t(xo),B(Pr),i&&t(yc),i&&t(ct),B(Or),B(An),B(Kr),B(Sn),B(Gn),B(Vn),i&&t(Tc),i&&t(qo),B(ea),i&&t(kc),i&&t(pt),B(ta),B(Xn),B(ra),B(Dn),B(Pn),B(On)}}}const zw={local:"rembert",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.RemBertConfig",title:"RemBertConfig"},{local:"transformers.RemBertTokenizer",title:"RemBertTokenizer"},{local:"transformers.RemBertTokenizerFast",title:"RemBertTokenizerFast"},{local:"transformers.RemBertModel",title:"RemBertModel"},{local:"transformers.RemBertForCausalLM",title:"RemBertForCausalLM"},{local:"transformers.RemBertForMaskedLM",title:"RemBertForMaskedLM"},{local:"transformers.RemBertForSequenceClassification",title:"RemBertForSequenceClassification"},{local:"transformers.RemBertForMultipleChoice",title:"RemBertForMultipleChoice"},{local:"transformers.RemBertForTokenClassification",title:"RemBertForTokenClassification"},{local:"transformers.RemBertForQuestionAnswering",title:"RemBertForQuestionAnswering"},{local:"transformers.TFRemBertModel",title:"TFRemBertModel"},{local:"transformers.TFRemBertForMaskedLM",title:"TFRemBertForMaskedLM"},{local:"transformers.TFRemBertForCausalLM",title:"TFRemBertForCausalLM"},{local:"transformers.TFRemBertForSequenceClassification",title:"TFRemBertForSequenceClassification"},{local:"transformers.TFRemBertForMultipleChoice",title:"TFRemBertForMultipleChoice"},{local:"transformers.TFRemBertForTokenClassification",title:"TFRemBertForTokenClassification"},{local:"transformers.TFRemBertForQuestionAnswering",title:"TFRemBertForQuestionAnswering"}],title:"RemBERT"};function Uw(C){return Gv(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Aw extends Wv{constructor(d){super();Nv(this,d,Uw,Jw,Av,{})}}export{Aw as default,zw as metadata};
