import{S as Ww,i as Nw,s as Aw,e as s,k as p,w,t as o,M as Sw,c as a,d as t,m,a as r,x as v,h as n,b as g,G as e,g as _,y as M,q as $,o as R,B,v as Gw,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 Vw(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(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(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;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(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);b=n(c,"sequence pair mask has the following format:"),c.forEach(t),h=m(l),v(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 Xw(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(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);b=n(c,"sequence pair mask has the following format:"),c.forEach(t),h=m(l),v(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 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=a(l,"P",{});var c=r(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var j=r(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 Pw(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(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(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=a(l,"P",{});var c=r(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var j=r(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 Qw(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(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(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 Hw(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=a(l,"P",{});var c=r(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var j=r(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:"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(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(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 Kw(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=a(l,"P",{});var c=r(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var j=r(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 ev(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(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);b=n(c,"Example of single-label classification:"),c.forEach(t),h=m(l),v(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 tv(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(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);b=n(c,"Example of multi-label classification:"),c.forEach(t),h=m(l),v(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=a(l,"P",{});var c=r(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var j=r(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 nv(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(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(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 sv(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=a(l,"P",{});var c=r(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var j=r(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 av(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(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(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 rv(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=a(l,"P",{});var c=r(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var j=r(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 iv(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(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(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,l,c,j,Me,ge,N,re,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,we,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"),re=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])"),we=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=a(f,"P",{});var F=r(d);b=n(F,"TensorFlow models and layers in "),h=a(F,"CODE",{});var Le=r(h);u=n(Le,"transformers"),Le.forEach(t),y=n(F," accept two formats as input:"),F.forEach(t),l=m(f),c=a(f,"UL",{});var ae=r(c);j=a(ae,"LI",{});var Ne=r(j);Me=n(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),ge=m(ae),N=a(ae,"LI",{});var qe=r(N);re=n(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),ae.forEach(t),te=m(f),k=a(f,"P",{});var E=r(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=a(E,"CODE",{});var Xe=r(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=a(E,"CODE",{});var Ae=r(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=a(E,"CODE",{});var We=r(Q);Fe=n(We,"fit()"),We.forEach(t),be=n(E," and "),V=a(E,"CODE",{});var De=r(V);Ee=n(De,"predict()"),De.forEach(t),ye=n(E,`, such as when creating your own layers or models with
the Keras `),L=a(E,"CODE",{});var Ve=r(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=a(f,"UL",{});var q=r(J);U=a(q,"LI",{});var G=r(U);Te=n(G,"a single Tensor with "),X=a(G,"CODE",{});var Se=r(X);je=n(Se,"input_ids"),Se.forEach(t),ke=n(G," only and nothing else: "),A=a(G,"CODE",{});var Ze=r(A);ie=n(Ze,"model(input_ids)"),Ze.forEach(t),G.forEach(t),he=m(q),z=a(q,"LI",{});var H=r(z);Je=n(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a(H,"CODE",{});var Ge=r(P);ze=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),we=n(H," or "),Z=a(H,"CODE",{});var Pe=r(Z);ue=n(Pe,"model([input_ids, attention_mask, token_type_ids])"),Pe.forEach(t),H.forEach(t),de=m(q),W=a(q,"LI",{});var ve=r(W);Ue=n(ve,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),O=a(ve,"CODE",{});var pe=r(O);ce=n(pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),pe.forEach(t),ve.forEach(t),q.forEach(t),se=m(f),I=a(f,"P",{});var K=r(I);fe=n(K,`Note that when creating models and layers with
`),x=a(K,"A",{href:!0,rel:!0});var Oe=r(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,re),_(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,we),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 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=a(l,"P",{});var c=r(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var j=r(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 cv(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(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(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 pv(C){let d,b,h,u,y,l,c,j,Me,ge,N,re,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,we,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"),re=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])"),we=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=a(f,"P",{});var F=r(d);b=n(F,"TensorFlow models and layers in "),h=a(F,"CODE",{});var Le=r(h);u=n(Le,"transformers"),Le.forEach(t),y=n(F," accept two formats as input:"),F.forEach(t),l=m(f),c=a(f,"UL",{});var ae=r(c);j=a(ae,"LI",{});var Ne=r(j);Me=n(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),ge=m(ae),N=a(ae,"LI",{});var qe=r(N);re=n(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),ae.forEach(t),te=m(f),k=a(f,"P",{});var E=r(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=a(E,"CODE",{});var Xe=r(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=a(E,"CODE",{});var Ae=r(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=a(E,"CODE",{});var We=r(Q);Fe=n(We,"fit()"),We.forEach(t),be=n(E," and "),V=a(E,"CODE",{});var De=r(V);Ee=n(De,"predict()"),De.forEach(t),ye=n(E,`, such as when creating your own layers or models with
the Keras `),L=a(E,"CODE",{});var Ve=r(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=a(f,"UL",{});var q=r(J);U=a(q,"LI",{});var G=r(U);Te=n(G,"a single Tensor with "),X=a(G,"CODE",{});var Se=r(X);je=n(Se,"input_ids"),Se.forEach(t),ke=n(G," only and nothing else: "),A=a(G,"CODE",{});var Ze=r(A);ie=n(Ze,"model(input_ids)"),Ze.forEach(t),G.forEach(t),he=m(q),z=a(q,"LI",{});var H=r(z);Je=n(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a(H,"CODE",{});var Ge=r(P);ze=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),we=n(H," or "),Z=a(H,"CODE",{});var Pe=r(Z);ue=n(Pe,"model([input_ids, attention_mask, token_type_ids])"),Pe.forEach(t),H.forEach(t),de=m(q),W=a(q,"LI",{});var ve=r(W);Ue=n(ve,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),O=a(ve,"CODE",{});var pe=r(O);ce=n(pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),pe.forEach(t),ve.forEach(t),q.forEach(t),se=m(f),I=a(f,"P",{});var K=r(I);fe=n(K,`Note that when creating models and layers with
`),x=a(K,"A",{href:!0,rel:!0});var Oe=r(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,re),_(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,we),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 mv(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=a(l,"P",{});var c=r(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var j=r(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 hv(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(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(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 uv(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(){w(d.$$.fragment)},l(h){v(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 fv(C){let d,b,h,u,y,l,c,j,Me,ge,N,re,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,we,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"),re=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])"),we=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=a(f,"P",{});var F=r(d);b=n(F,"TensorFlow models and layers in "),h=a(F,"CODE",{});var Le=r(h);u=n(Le,"transformers"),Le.forEach(t),y=n(F," accept two formats as input:"),F.forEach(t),l=m(f),c=a(f,"UL",{});var ae=r(c);j=a(ae,"LI",{});var Ne=r(j);Me=n(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),ge=m(ae),N=a(ae,"LI",{});var qe=r(N);re=n(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),ae.forEach(t),te=m(f),k=a(f,"P",{});var E=r(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=a(E,"CODE",{});var Xe=r(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=a(E,"CODE",{});var Ae=r(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=a(E,"CODE",{});var We=r(Q);Fe=n(We,"fit()"),We.forEach(t),be=n(E," and "),V=a(E,"CODE",{});var De=r(V);Ee=n(De,"predict()"),De.forEach(t),ye=n(E,`, such as when creating your own layers or models with
the Keras `),L=a(E,"CODE",{});var Ve=r(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=a(f,"UL",{});var q=r(J);U=a(q,"LI",{});var G=r(U);Te=n(G,"a single Tensor with "),X=a(G,"CODE",{});var Se=r(X);je=n(Se,"input_ids"),Se.forEach(t),ke=n(G," only and nothing else: "),A=a(G,"CODE",{});var Ze=r(A);ie=n(Ze,"model(input_ids)"),Ze.forEach(t),G.forEach(t),he=m(q),z=a(q,"LI",{});var H=r(z);Je=n(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a(H,"CODE",{});var Ge=r(P);ze=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),we=n(H," or "),Z=a(H,"CODE",{});var Pe=r(Z);ue=n(Pe,"model([input_ids, attention_mask, token_type_ids])"),Pe.forEach(t),H.forEach(t),de=m(q),W=a(q,"LI",{});var ve=r(W);Ue=n(ve,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),O=a(ve,"CODE",{});var pe=r(O);ce=n(pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),pe.forEach(t),ve.forEach(t),q.forEach(t),se=m(f),I=a(f,"P",{});var K=r(I);fe=n(K,`Note that when creating models and layers with
`),x=a(K,"A",{href:!0,rel:!0});var Oe=r(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,re),_(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,we),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 gv(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(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(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 _v(C){let d,b,h,u,y,l,c,j,Me,ge,N,re,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,we,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"),re=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])"),we=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=a(f,"P",{});var F=r(d);b=n(F,"TensorFlow models and layers in "),h=a(F,"CODE",{});var Le=r(h);u=n(Le,"transformers"),Le.forEach(t),y=n(F," accept two formats as input:"),F.forEach(t),l=m(f),c=a(f,"UL",{});var ae=r(c);j=a(ae,"LI",{});var Ne=r(j);Me=n(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),ge=m(ae),N=a(ae,"LI",{});var qe=r(N);re=n(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),ae.forEach(t),te=m(f),k=a(f,"P",{});var E=r(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=a(E,"CODE",{});var Xe=r(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=a(E,"CODE",{});var Ae=r(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=a(E,"CODE",{});var We=r(Q);Fe=n(We,"fit()"),We.forEach(t),be=n(E," and "),V=a(E,"CODE",{});var De=r(V);Ee=n(De,"predict()"),De.forEach(t),ye=n(E,`, such as when creating your own layers or models with
the Keras `),L=a(E,"CODE",{});var Ve=r(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=a(f,"UL",{});var q=r(J);U=a(q,"LI",{});var G=r(U);Te=n(G,"a single Tensor with "),X=a(G,"CODE",{});var Se=r(X);je=n(Se,"input_ids"),Se.forEach(t),ke=n(G," only and nothing else: "),A=a(G,"CODE",{});var Ze=r(A);ie=n(Ze,"model(input_ids)"),Ze.forEach(t),G.forEach(t),he=m(q),z=a(q,"LI",{});var H=r(z);Je=n(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a(H,"CODE",{});var Ge=r(P);ze=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),we=n(H," or "),Z=a(H,"CODE",{});var Pe=r(Z);ue=n(Pe,"model([input_ids, attention_mask, token_type_ids])"),Pe.forEach(t),H.forEach(t),de=m(q),W=a(q,"LI",{});var ve=r(W);Ue=n(ve,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),O=a(ve,"CODE",{});var pe=r(O);ce=n(pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),pe.forEach(t),ve.forEach(t),q.forEach(t),se=m(f),I=a(f,"P",{});var K=r(I);fe=n(K,`Note that when creating models and layers with
`),x=a(K,"A",{href:!0,rel:!0});var Oe=r(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,re),_(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,we),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 bv(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=a(l,"P",{});var c=r(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var j=r(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:"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(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(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 Tv(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(){w(d.$$.fragment)},l(h){v(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 kv(C){let d,b,h,u,y,l,c,j,Me,ge,N,re,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,we,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"),re=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])"),we=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=a(f,"P",{});var F=r(d);b=n(F,"TensorFlow models and layers in "),h=a(F,"CODE",{});var Le=r(h);u=n(Le,"transformers"),Le.forEach(t),y=n(F," accept two formats as input:"),F.forEach(t),l=m(f),c=a(f,"UL",{});var ae=r(c);j=a(ae,"LI",{});var Ne=r(j);Me=n(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),ge=m(ae),N=a(ae,"LI",{});var qe=r(N);re=n(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),ae.forEach(t),te=m(f),k=a(f,"P",{});var E=r(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=a(E,"CODE",{});var Xe=r(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=a(E,"CODE",{});var Ae=r(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=a(E,"CODE",{});var We=r(Q);Fe=n(We,"fit()"),We.forEach(t),be=n(E," and "),V=a(E,"CODE",{});var De=r(V);Ee=n(De,"predict()"),De.forEach(t),ye=n(E,`, such as when creating your own layers or models with
the Keras `),L=a(E,"CODE",{});var Ve=r(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=a(f,"UL",{});var q=r(J);U=a(q,"LI",{});var G=r(U);Te=n(G,"a single Tensor with "),X=a(G,"CODE",{});var Se=r(X);je=n(Se,"input_ids"),Se.forEach(t),ke=n(G," only and nothing else: "),A=a(G,"CODE",{});var Ze=r(A);ie=n(Ze,"model(input_ids)"),Ze.forEach(t),G.forEach(t),he=m(q),z=a(q,"LI",{});var H=r(z);Je=n(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a(H,"CODE",{});var Ge=r(P);ze=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),we=n(H," or "),Z=a(H,"CODE",{});var Pe=r(Z);ue=n(Pe,"model([input_ids, attention_mask, token_type_ids])"),Pe.forEach(t),H.forEach(t),de=m(q),W=a(q,"LI",{});var ve=r(W);Ue=n(ve,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),O=a(ve,"CODE",{});var pe=r(O);ce=n(pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),pe.forEach(t),ve.forEach(t),q.forEach(t),se=m(f),I=a(f,"P",{});var K=r(I);fe=n(K,`Note that when creating models and layers with
`),x=a(K,"A",{href:!0,rel:!0});var Oe=r(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,re),_(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,we),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 wv(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=a(l,"P",{});var c=r(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var j=r(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 vv(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(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(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 Mv(C){let d,b,h,u,y,l,c,j,Me,ge,N,re,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,we,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"),re=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])"),we=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=a(f,"P",{});var F=r(d);b=n(F,"TensorFlow models and layers in "),h=a(F,"CODE",{});var Le=r(h);u=n(Le,"transformers"),Le.forEach(t),y=n(F," accept two formats as input:"),F.forEach(t),l=m(f),c=a(f,"UL",{});var ae=r(c);j=a(ae,"LI",{});var Ne=r(j);Me=n(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),ge=m(ae),N=a(ae,"LI",{});var qe=r(N);re=n(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),ae.forEach(t),te=m(f),k=a(f,"P",{});var E=r(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=a(E,"CODE",{});var Xe=r(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=a(E,"CODE",{});var Ae=r(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=a(E,"CODE",{});var We=r(Q);Fe=n(We,"fit()"),We.forEach(t),be=n(E," and "),V=a(E,"CODE",{});var De=r(V);Ee=n(De,"predict()"),De.forEach(t),ye=n(E,`, such as when creating your own layers or models with
the Keras `),L=a(E,"CODE",{});var Ve=r(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=a(f,"UL",{});var q=r(J);U=a(q,"LI",{});var G=r(U);Te=n(G,"a single Tensor with "),X=a(G,"CODE",{});var Se=r(X);je=n(Se,"input_ids"),Se.forEach(t),ke=n(G," only and nothing else: "),A=a(G,"CODE",{});var Ze=r(A);ie=n(Ze,"model(input_ids)"),Ze.forEach(t),G.forEach(t),he=m(q),z=a(q,"LI",{});var H=r(z);Je=n(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a(H,"CODE",{});var Ge=r(P);ze=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),we=n(H," or "),Z=a(H,"CODE",{});var Pe=r(Z);ue=n(Pe,"model([input_ids, attention_mask, token_type_ids])"),Pe.forEach(t),H.forEach(t),de=m(q),W=a(q,"LI",{});var ve=r(W);Ue=n(ve,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),O=a(ve,"CODE",{});var pe=r(O);ce=n(pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),pe.forEach(t),ve.forEach(t),q.forEach(t),se=m(f),I=a(f,"P",{});var K=r(I);fe=n(K,`Note that when creating models and layers with
`),x=a(K,"A",{href:!0,rel:!0});var Oe=r(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,re),_(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,we),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 $v(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=a(l,"P",{});var c=r(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var j=r(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 Rv(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(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(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 Bv(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(){w(d.$$.fragment)},l(h){v(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 Fv(C){let d,b,h,u,y,l,c,j,Me,ge,N,re,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,we,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"),re=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])"),we=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=a(f,"P",{});var F=r(d);b=n(F,"TensorFlow models and layers in "),h=a(F,"CODE",{});var Le=r(h);u=n(Le,"transformers"),Le.forEach(t),y=n(F," accept two formats as input:"),F.forEach(t),l=m(f),c=a(f,"UL",{});var ae=r(c);j=a(ae,"LI",{});var Ne=r(j);Me=n(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),ge=m(ae),N=a(ae,"LI",{});var qe=r(N);re=n(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),ae.forEach(t),te=m(f),k=a(f,"P",{});var E=r(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=a(E,"CODE",{});var Xe=r(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=a(E,"CODE",{});var Ae=r(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=a(E,"CODE",{});var We=r(Q);Fe=n(We,"fit()"),We.forEach(t),be=n(E," and "),V=a(E,"CODE",{});var De=r(V);Ee=n(De,"predict()"),De.forEach(t),ye=n(E,`, such as when creating your own layers or models with
the Keras `),L=a(E,"CODE",{});var Ve=r(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=a(f,"UL",{});var q=r(J);U=a(q,"LI",{});var G=r(U);Te=n(G,"a single Tensor with "),X=a(G,"CODE",{});var Se=r(X);je=n(Se,"input_ids"),Se.forEach(t),ke=n(G," only and nothing else: "),A=a(G,"CODE",{});var Ze=r(A);ie=n(Ze,"model(input_ids)"),Ze.forEach(t),G.forEach(t),he=m(q),z=a(q,"LI",{});var H=r(z);Je=n(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a(H,"CODE",{});var Ge=r(P);ze=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),we=n(H," or "),Z=a(H,"CODE",{});var Pe=r(Z);ue=n(Pe,"model([input_ids, attention_mask, token_type_ids])"),Pe.forEach(t),H.forEach(t),de=m(q),W=a(q,"LI",{});var ve=r(W);Ue=n(ve,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),O=a(ve,"CODE",{});var pe=r(O);ce=n(pe,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),pe.forEach(t),ve.forEach(t),q.forEach(t),se=m(f),I=a(f,"P",{});var K=r(I);fe=n(K,`Note that when creating models and layers with
`),x=a(K,"A",{href:!0,rel:!0});var Oe=r(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,re),_(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,we),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 Ev(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=a(l,"P",{});var c=r(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var j=r(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 Cv(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(),w(u.$$.fragment)},l(l){d=a(l,"P",{});var c=r(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(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 jv(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(){w(d.$$.fragment)},l(h){v(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 Jv(C){let d,b,h,u,y,l,c,j,Me,ge,N,re,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,we,Z,ue,de,W,Ue,O,ce,se,I,fe,x,Ie,xe,f,F,Le,ae,Ne,qe,E,Xe,Ae,We,De,Ve,q,G,Se,Ze,H,Ge,Pe,ve,pe,K,Oe,so,bp,pr,yp,Tp,ps,kp,wp,vp,ao,Mp,mr,$p,Rp,hr,Bp,Fp,Ep,Go,Vd,ro,Vo,ci,ms,Cp,pi,jp,Ld,tt,hs,Jp,us,zp,fs,Up,Ip,xp,gs,Zp,ur,qp,Wp,Np,Ot,_s,Ap,mi,Sp,Gp,bs,fr,Vp,hi,Lp,Xp,gr,Dp,ui,Pp,Op,Lo,ys,Qp,Ts,Hp,fi,Yp,Kp,em,Bt,ks,tm,gi,om,nm,Xo,sm,io,am,_i,rm,im,bi,lm,dm,cm,_r,ws,Xd,lo,Do,yi,vs,pm,Ti,mm,Dd,nt,Ms,hm,Lt,um,ki,fm,gm,$s,_m,bm,br,ym,Tm,km,Qt,Rs,wm,wi,vm,Mm,Bs,yr,$m,vi,Rm,Bm,Tr,Fm,Mi,Em,Cm,Po,Fs,jm,Es,Jm,$i,zm,Um,Im,Ft,Cs,xm,Ri,Zm,qm,Oo,Wm,Bi,Nm,Am,kr,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,ah,zi,rh,ih,Ui,lh,dh,Ii,ch,ph,mh,Et,qs,hh,po,uh,wr,fh,gh,xi,_h,bh,yh,Ho,Th,Yo,Qd,mo,Ko,Zi,Ws,kh,qi,wh,Hd,Xt,Ns,vh,ho,Mh,Wi,$h,Rh,As,Bh,Fh,Eh,Ct,Ss,Ch,uo,jh,vr,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,Mr,Oh,Qh,Vi,Hh,Yh,Kh,nn,eu,sn,ec,bo,an,Li,Ds,tu,Xi,ou,tc,vt,Ps,nu,Di,su,au,Os,ru,Qs,iu,lu,du,ft,Hs,cu,yo,pu,$r,mu,hu,Pi,uu,fu,gu,rn,_u,ln,bu,dn,oc,To,cn,Oi,Ys,yu,Qi,Tu,nc,Mt,Ks,ku,Hi,wu,vu,ea,Mu,ta,$u,Ru,Bu,Jt,oa,Fu,ko,Eu,Rr,Cu,ju,Yi,Ju,zu,Uu,pn,Iu,mn,sc,wo,hn,Ki,na,xu,el,Zu,ac,$t,sa,qu,tl,Wu,Nu,aa,Au,ra,Su,Gu,Vu,zt,ia,Lu,vo,Xu,Br,Du,Pu,ol,Ou,Qu,Hu,un,Yu,fn,rc,Mo,gn,nl,la,Ku,sl,ef,ic,Rt,da,tf,$o,of,al,nf,sf,rl,af,rf,lf,ca,df,pa,cf,pf,mf,Ut,ma,hf,Ro,uf,Fr,ff,gf,il,_f,bf,yf,_n,Tf,bn,lc,Bo,yn,ll,ha,kf,dl,wf,dc,at,ua,vf,cl,Mf,$f,fa,Rf,Er,Bf,Ff,Ef,ga,Cf,_a,jf,Jf,zf,Tn,Uf,It,ba,If,Fo,xf,Cr,Zf,qf,pl,Wf,Nf,Af,kn,Sf,wn,cc,Eo,vn,ml,ya,Gf,hl,Vf,pc,rt,Ta,Lf,ka,Xf,ul,Df,Pf,Of,wa,Qf,jr,Hf,Yf,Kf,va,eg,Ma,tg,og,ng,Mn,sg,gt,$a,ag,Co,rg,Jr,ig,lg,fl,dg,cg,pg,$n,mg,Rn,hg,Bn,mc,jo,Fn,gl,Ra,ug,_l,fg,hc,it,Ba,gg,Fa,_g,bl,bg,yg,Tg,Ea,kg,zr,wg,vg,Mg,Ca,$g,ja,Rg,Bg,Fg,En,Eg,_t,Ja,Cg,ot,jg,yl,Jg,zg,Tl,Ug,Ig,kl,xg,Zg,wl,qg,Wg,vl,Ng,Ag,Ml,Sg,Gg,$l,Vg,Lg,Xg,za,Ua,Dg,Rl,Pg,Og,Qg,Ia,Hg,Bl,Yg,Kg,e_,Y,t_,Fl,o_,n_,El,s_,a_,Cl,r_,i_,jl,l_,d_,Jl,c_,p_,zl,m_,h_,Ul,u_,f_,Il,g_,__,xl,b_,y_,Zl,T_,k_,ql,w_,v_,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,xa,G_,Ol,V_,fc,lt,Za,L_,Ql,X_,D_,qa,P_,Ur,O_,Q_,H_,Wa,Y_,Na,K_,eb,tb,Jn,ob,bt,Aa,nb,zo,sb,Ir,ab,rb,Hl,ib,lb,db,zn,cb,Un,pb,In,gc,Uo,xn,Yl,Sa,mb,Kl,hb,_c,dt,Ga,ub,ed,fb,gb,Va,_b,xr,bb,yb,Tb,La,kb,Xa,wb,vb,Mb,Zn,$b,xt,Da,Rb,Io,Bb,Zr,Fb,Eb,td,Cb,jb,Jb,qn,zb,Wn,bc,xo,Nn,od,Pa,Ub,nd,Ib,yc,ct,Oa,xb,sd,Zb,qb,Qa,Wb,qr,Nb,Ab,Sb,Ha,Gb,Ya,Vb,Lb,Xb,An,Db,yt,Ka,Pb,Zo,Ob,Wr,Qb,Hb,ad,Yb,Kb,ey,Sn,ty,Gn,oy,Vn,Tc,qo,Ln,rd,er,ny,id,sy,kc,pt,tr,ay,Wo,ry,ld,iy,ly,dd,dy,cy,py,or,my,Nr,hy,uy,fy,nr,gy,sr,_y,by,yy,Xn,Ty,Tt,ar,ky,No,wy,Ar,vy,My,cd,$y,Ry,By,Dn,Fy,Pn,Ey,On,wc;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/main/en/model_doc/rembert#transformers.RemBertModel">RemBertModel</a> or <a href="/docs/transformers/main/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/main/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/main/en/model_doc/rembert#transformers.RemBertModel">RemBertModel</a> or <a href="/docs/transformers/main/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/main/src/transformers/models/rembert/configuration_rembert.py#L32"}}),Go=new Qe({props:{anchor:"transformers.RemBertConfig.example",$$slots:{default:[Vw]},$$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/main/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/main/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/main/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/main/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:[Lw]},$$scope:{ctx:C}}}),ws=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/main/src/transformers/models/rembert/tokenization_rembert.py#L258"}}),vs=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/main/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/main/src/transformers/models/rembert/tokenization_rembert_fast.py#L144",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/main/src/transformers/models/rembert/tokenization_rembert_fast.py#L169",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/main/src/transformers/models/rembert/tokenization_rembert_fast.py#L200",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:[Xw]},$$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/main/src/transformers/models/rembert/tokenization_rembert_fast.py#L230"}}),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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/rembert/modeling_rembert.py#L785",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/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:[Dw]},$$scope:{ctx:C}}}),Yo=new Qe({props:{anchor:"transformers.RemBertModel.forward.example",$$slots:{default:[Pw]},$$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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/rembert/modeling_rembert.py#L1041",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/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:[Ow]},$$scope:{ctx:C}}}),tn=new Qe({props:{anchor:"transformers.RemBertForCausalLM.forward.example",$$slots:{default:[Qw]},$$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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/rembert/modeling_rembert.py#L940",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/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:[Hw]},$$scope:{ctx:C}}}),sn=new Qe({props:{anchor:"transformers.RemBertForMaskedLM.forward.example",$$slots:{default:[Yw]},$$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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/rembert/modeling_rembert.py#L1183",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),rn=new Ke({props:{$$slots:{default:[Kw]},$$scope:{ctx:C}}}),ln=new Qe({props:{anchor:"transformers.RemBertForSequenceClassification.forward.example",$$slots:{default:[ev]},$$scope:{ctx:C}}}),dn=new Qe({props:{anchor:"transformers.RemBertForSequenceClassification.forward.example-2",$$slots:{default:[tv]},$$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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/rembert/modeling_rembert.py#L1268"}}),oa=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/rembert/modeling_rembert.py#L1279",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/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:[ov]},$$scope:{ctx:C}}}),mn=new Qe({props:{anchor:"transformers.RemBertForMultipleChoice.forward.example",$$slots:{default:[nv]},$$scope:{ctx:C}}}),na=new et({}),sa=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/rembert/modeling_rembert.py#L1359"}}),ia=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/rembert/modeling_rembert.py#L1371",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/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:[sv]},$$scope:{ctx:C}}}),fn=new Qe({props:{anchor:"transformers.RemBertForTokenClassification.forward.example",$$slots:{default:[av]},$$scope:{ctx:C}}}),la=new et({}),da=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/rembert/modeling_rembert.py#L1437"}}),ma=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/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/main/src/transformers/models/rembert/modeling_rembert.py#L1449",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/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:[rv]},$$scope:{ctx:C}}}),bn=new Qe({props:{anchor:"transformers.RemBertForQuestionAnswering.forward.example",$$slots:{default:[iv]},$$scope:{ctx:C}}}),ha=new et({}),ua=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/rembert/modeling_tf_rembert.py#L916"}}),Tn=new Ke({props:{$$slots:{default:[lv]},$$scope:{ctx:C}}}),ba=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/main/src/transformers/models/rembert/modeling_tf_rembert.py#L922",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/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:[dv]},$$scope:{ctx:C}}}),wn=new Qe({props:{anchor:"transformers.TFRemBertModel.call.example",$$slots:{default:[cv]},$$scope:{ctx:C}}}),ya=new et({}),Ta=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/rembert/modeling_tf_rembert.py#L987"}}),Mn=new Ke({props:{$$slots:{default:[pv]},$$scope:{ctx:C}}}),$a=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/main/src/transformers/models/rembert/modeling_tf_rembert.py#L1003",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/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:[mv]},$$scope:{ctx:C}}}),Rn=new Qe({props:{anchor:"transformers.TFRemBertForMaskedLM.call.example",$$slots:{default:[hv]},$$scope:{ctx:C}}}),Bn=new Qe({props:{anchor:"transformers.TFRemBertForMaskedLM.call.example-2",$$slots:{default:[uv]},$$scope:{ctx:C}}}),Ra=new et({}),Ba=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/rembert/modeling_tf_rembert.py#L1061"}}),En=new Ke({props:{$$slots:{default:[fv]},$$scope:{ctx:C}}}),Ja=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/main/src/transformers/models/rembert/modeling_tf_rembert.py#L1087",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/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:[gv]},$$scope:{ctx:C}}}),xa=new et({}),Za=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/rembert/modeling_tf_rembert.py#L1180"}}),Jn=new Ke({props:{$$slots:{default:[_v]},$$scope:{ctx:C}}}),Aa=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/main/src/transformers/models/rembert/modeling_tf_rembert.py#L1194",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/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:[bv]},$$scope:{ctx:C}}}),Un=new Qe({props:{anchor:"transformers.TFRemBertForSequenceClassification.call.example",$$slots:{default:[yv]},$$scope:{ctx:C}}}),In=new Qe({props:{anchor:"transformers.TFRemBertForSequenceClassification.call.example-2",$$slots:{default:[Tv]},$$scope:{ctx:C}}}),Sa=new et({}),Ga=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/rembert/modeling_tf_rembert.py#L1257"}}),Zn=new Ke({props:{$$slots:{default:[kv]},$$scope:{ctx:C}}}),Da=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/main/src/transformers/models/rembert/modeling_tf_rembert.py#L1267",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/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:[wv]},$$scope:{ctx:C}}}),Wn=new Qe({props:{anchor:"transformers.TFRemBertForMultipleChoice.call.example",$$slots:{default:[vv]},$$scope:{ctx:C}}}),Pa=new et({}),Oa=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/rembert/modeling_tf_rembert.py#L1353"}}),An=new Ke({props:{$$slots:{default:[Mv]},$$scope:{ctx:C}}}),Ka=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/main/src/transformers/models/rembert/modeling_tf_rembert.py#L1365",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/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:[$v]},$$scope:{ctx:C}}}),Gn=new Qe({props:{anchor:"transformers.TFRemBertForTokenClassification.call.example",$$slots:{default:[Rv]},$$scope:{ctx:C}}}),Vn=new Qe({props:{anchor:"transformers.TFRemBertForTokenClassification.call.example-2",$$slots:{default:[Bv]},$$scope:{ctx:C}}}),er=new et({}),tr=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/main/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/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/rembert/modeling_tf_rembert.py#L1426"}}),Xn=new Ke({props:{$$slots:{default:[Fv]},$$scope:{ctx:C}}}),ar=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.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/main/src/transformers/models/rembert/modeling_tf_rembert.py#L1437",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/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/main/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:[Ev]},$$scope:{ctx:C}}}),Pn=new Qe({props:{anchor:"transformers.TFRemBertForQuestionAnswering.call.example",$$slots:{default:[Cv]},$$scope:{ctx:C}}}),On=new Qe({props:{anchor:"transformers.TFRemBertForQuestionAnswering.call.example-2",$$slots:{default:[jv]},$$scope:{ctx:C}}}),{c(){d=s("meta"),b=p(),h=s("h1"),u=s("a"),y=s("span"),w(l.$$.fragment),c=p(),j=s("span"),Me=o("RemBERT"),ge=p(),N=s("h2"),re=s("a"),te=s("span"),w(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"),w(z.$$.fragment),Je=p(),P=s("span"),ze=o("Documentation resources"),we=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"),ae=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"),w(Ze.$$.fragment),H=p(),Ge=s("span"),Pe=o("RemBertConfig"),ve=p(),pe=s("div"),w(K.$$.fragment),Oe=p(),so=s("p"),bp=o("This is the configuration class to store the configuration of a "),pr=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"),wp=o(" architecture."),vp=p(),ao=s("p"),Mp=o("Configuration objects inherit from "),mr=s("a"),$p=o("PretrainedConfig"),Rp=o(` and can be used to control the model outputs. Read the
documentation from `),hr=s("a"),Bp=o("PretrainedConfig"),Fp=o(" for more information."),Ep=p(),w(Go.$$.fragment),Vd=p(),ro=s("h2"),Vo=s("a"),ci=s("span"),w(ms.$$.fragment),Cp=p(),pi=s("span"),jp=o("RemBertTokenizer"),Ld=p(),tt=s("div"),w(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 "),ur=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"),w(_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"),fr=s("li"),Vp=o("single sequence: "),hi=s("code"),Lp=o("[CLS] X [SEP]"),Xp=p(),gr=s("li"),Dp=o("pair of sequences: "),ui=s("code"),Pp=o("[CLS] A [SEP] B [SEP]"),Op=p(),Lo=s("div"),w(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"),w(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(),w(Xo.$$.fragment),sm=p(),io=s("p"),am=o("If "),_i=s("code"),rm=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(),_r=s("div"),w(ws.$$.fragment),Xd=p(),lo=s("h2"),Do=s("a"),yi=s("span"),w(vs.$$.fragment),pm=p(),Ti=s("span"),mm=o("RemBertTokenizerFast"),Dd=p(),nt=s("div"),w(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 `),br=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"),w(Rs.$$.fragment),wm=p(),wi=s("p"),vm=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"),yr=s("li"),$m=o("single sequence: "),vi=s("code"),Rm=o("[CLS] X [SEP]"),Bm=p(),Tr=s("li"),Fm=o("pair of sequences: "),Mi=s("code"),Em=o("[CLS] A [SEP] B [SEP]"),Cm=p(),Po=s("div"),w(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"),w(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(),w(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(),kr=s("div"),w(js.$$.fragment),Pd=p(),co=s("h2"),Qo=s("a"),Fi=s("span"),w(Js.$$.fragment),Sm=p(),Ei=s("span"),Gm=o("RemBertModel"),Od=p(),ht=s("div"),w(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"),ah=o(` argument and
`),zi=s("code"),rh=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"),w(qs.$$.fragment),hh=p(),po=s("p"),uh=o("The "),wr=s("a"),fh=o("RemBertModel"),gh=o(" forward method, overrides the "),xi=s("code"),_h=o("__call__"),bh=o(" special method."),yh=p(),w(Ho.$$.fragment),Th=p(),w(Yo.$$.fragment),Qd=p(),mo=s("h2"),Ko=s("a"),Zi=s("span"),w(Ws.$$.fragment),kh=p(),qi=s("span"),wh=o("RemBertForCausalLM"),Hd=p(),Xt=s("div"),w(Ns.$$.fragment),vh=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"),w(Ss.$$.fragment),Ch=p(),uo=s("p"),jh=o("The "),vr=s("a"),Jh=o("RemBertForCausalLM"),zh=o(" forward method, overrides the "),Ni=s("code"),Uh=o("__call__"),Ih=o(" special method."),xh=p(),w(en.$$.fragment),Zh=p(),w(tn.$$.fragment),Yd=p(),fo=s("h2"),on=s("a"),Ai=s("span"),w(Gs.$$.fragment),qh=p(),Si=s("span"),Wh=o("RemBertForMaskedLM"),Kd=p(),Dt=s("div"),w(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"),w(Xs.$$.fragment),Dh=p(),_o=s("p"),Ph=o("The "),Mr=s("a"),Oh=o("RemBertForMaskedLM"),Qh=o(" forward method, overrides the "),Vi=s("code"),Hh=o("__call__"),Yh=o(" special method."),Kh=p(),w(nn.$$.fragment),eu=p(),w(sn.$$.fragment),ec=p(),bo=s("h2"),an=s("a"),Li=s("span"),w(Ds.$$.fragment),tu=p(),Xi=s("span"),ou=o("RemBertForSequenceClassification"),tc=p(),vt=s("div"),w(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.`),au=p(),Os=s("p"),ru=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"),w(Hs.$$.fragment),cu=p(),yo=s("p"),pu=o("The "),$r=s("a"),mu=o("RemBertForSequenceClassification"),hu=o(" forward method, overrides the "),Pi=s("code"),uu=o("__call__"),fu=o(" special method."),gu=p(),w(rn.$$.fragment),_u=p(),w(ln.$$.fragment),bu=p(),w(dn.$$.fragment),oc=p(),To=s("h2"),cn=s("a"),Oi=s("span"),w(Ys.$$.fragment),yu=p(),Qi=s("span"),Tu=o("RemBertForMultipleChoice"),nc=p(),Mt=s("div"),w(Ks.$$.fragment),ku=p(),Hi=s("p"),wu=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.`),vu=p(),ea=s("p"),Mu=o("This model is a PyTorch "),ta=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"),w(oa.$$.fragment),Fu=p(),ko=s("p"),Eu=o("The "),Rr=s("a"),Cu=o("RemBertForMultipleChoice"),ju=o(" forward method, overrides the "),Yi=s("code"),Ju=o("__call__"),zu=o(" special method."),Uu=p(),w(pn.$$.fragment),Iu=p(),w(mn.$$.fragment),sc=p(),wo=s("h2"),hn=s("a"),Ki=s("span"),w(na.$$.fragment),xu=p(),el=s("span"),Zu=o("RemBertForTokenClassification"),ac=p(),$t=s("div"),w(sa.$$.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(),aa=s("p"),Au=o("This model is a PyTorch "),ra=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"),w(ia.$$.fragment),Lu=p(),vo=s("p"),Xu=o("The "),Br=s("a"),Du=o("RemBertForTokenClassification"),Pu=o(" forward method, overrides the "),ol=s("code"),Ou=o("__call__"),Qu=o(" special method."),Hu=p(),w(un.$$.fragment),Yu=p(),w(fn.$$.fragment),rc=p(),Mo=s("h2"),gn=s("a"),nl=s("span"),w(la.$$.fragment),Ku=p(),sl=s("span"),ef=o("RemBertForQuestionAnswering"),ic=p(),Rt=s("div"),w(da.$$.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 `),al=s("code"),nf=o("span start logits"),sf=o(" and "),rl=s("code"),af=o("span end logits"),rf=o(")."),lf=p(),ca=s("p"),df=o("This model is a PyTorch "),pa=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"),w(ma.$$.fragment),hf=p(),Ro=s("p"),uf=o("The "),Fr=s("a"),ff=o("RemBertForQuestionAnswering"),gf=o(" forward method, overrides the "),il=s("code"),_f=o("__call__"),bf=o(" special method."),yf=p(),w(_n.$$.fragment),Tf=p(),w(bn.$$.fragment),lc=p(),Bo=s("h2"),yn=s("a"),ll=s("span"),w(ha.$$.fragment),kf=p(),dl=s("span"),wf=o("TFRemBertModel"),dc=p(),at=s("div"),w(ua.$$.fragment),vf=p(),cl=s("p"),Mf=o("The bare RemBERT Model transformer outputing raw hidden-states without any specific head on top."),$f=p(),fa=s("p"),Rf=o("This model inherits from "),Er=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(),ga=s("p"),Cf=o("This model is also a "),_a=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(),w(Tn.$$.fragment),Uf=p(),It=s("div"),w(ba.$$.fragment),If=p(),Fo=s("p"),xf=o("The "),Cr=s("a"),Zf=o("TFRemBertModel"),qf=o(" forward method, overrides the "),pl=s("code"),Wf=o("__call__"),Nf=o(" special method."),Af=p(),w(kn.$$.fragment),Sf=p(),w(wn.$$.fragment),cc=p(),Eo=s("h2"),vn=s("a"),ml=s("span"),w(ya.$$.fragment),Gf=p(),hl=s("span"),Vf=o("TFRemBertForMaskedLM"),pc=p(),rt=s("div"),w(Ta.$$.fragment),Lf=p(),ka=s("p"),Xf=o("RemBERT Model with a "),ul=s("code"),Df=o("language modeling"),Pf=o(" head on top."),Of=p(),wa=s("p"),Qf=o("This model inherits from "),jr=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(),va=s("p"),eg=o("This model is also a "),Ma=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(),w(Mn.$$.fragment),sg=p(),gt=s("div"),w($a.$$.fragment),ag=p(),Co=s("p"),rg=o("The "),Jr=s("a"),ig=o("TFRemBertForMaskedLM"),lg=o(" forward method, overrides the "),fl=s("code"),dg=o("__call__"),cg=o(" special method."),pg=p(),w($n.$$.fragment),mg=p(),w(Rn.$$.fragment),hg=p(),w(Bn.$$.fragment),mc=p(),jo=s("h2"),Fn=s("a"),gl=s("span"),w(Ra.$$.fragment),ug=p(),_l=s("span"),fg=o("TFRemBertForCausalLM"),hc=p(),it=s("div"),w(Ba.$$.fragment),gg=p(),Fa=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(),Ea=s("p"),kg=o("This model inherits from "),zr=s("a"),wg=o("TFPreTrainedModel"),vg=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(),Ca=s("p"),$g=o("This model is also a "),ja=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(),w(En.$$.fragment),Eg=p(),_t=s("div"),w(Ja.$$.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 (`),wl=s("code"),qg=o("tf.Tensor"),Wg=o(" of shape "),vl=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(),za=s("ul"),Ua=s("li"),Dg=o("1 for tokens that are "),Rl=s("strong"),Pg=o("not masked"),Og=o(","),Qg=p(),Ia=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"),a_=o(`)
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If `),Cl=s("code"),r_=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"),w_=o("True"),v_=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(),w(Cn.$$.fragment),uc=p(),Jo=s("h2"),jn=s("a"),Pl=s("span"),w(xa.$$.fragment),G_=p(),Ol=s("span"),V_=o("TFRemBertForSequenceClassification"),fc=p(),lt=s("div"),w(Za.$$.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(),qa=s("p"),P_=o("This model inherits from "),Ur=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(),Wa=s("p"),Y_=o("This model is also a "),Na=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(),w(Jn.$$.fragment),ob=p(),bt=s("div"),w(Aa.$$.fragment),nb=p(),zo=s("p"),sb=o("The "),Ir=s("a"),ab=o("TFRemBertForSequenceClassification"),rb=o(" forward method, overrides the "),Hl=s("code"),ib=o("__call__"),lb=o(" special method."),db=p(),w(zn.$$.fragment),cb=p(),w(Un.$$.fragment),pb=p(),w(In.$$.fragment),gc=p(),Uo=s("h2"),xn=s("a"),Yl=s("span"),w(Sa.$$.fragment),mb=p(),Kl=s("span"),hb=o("TFRemBertForMultipleChoice"),_c=p(),dt=s("div"),w(Ga.$$.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(),Va=s("p"),_b=o("This model inherits from "),xr=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(),La=s("p"),kb=o("This model is also a "),Xa=s("a"),wb=o("tf.keras.Model"),vb=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(),w(Zn.$$.fragment),$b=p(),xt=s("div"),w(Da.$$.fragment),Rb=p(),Io=s("p"),Bb=o("The "),Zr=s("a"),Fb=o("TFRemBertForMultipleChoice"),Eb=o(" forward method, overrides the "),td=s("code"),Cb=o("__call__"),jb=o(" special method."),Jb=p(),w(qn.$$.fragment),zb=p(),w(Wn.$$.fragment),bc=p(),xo=s("h2"),Nn=s("a"),od=s("span"),w(Pa.$$.fragment),Ub=p(),nd=s("span"),Ib=o("TFRemBertForTokenClassification"),yc=p(),ct=s("div"),w(Oa.$$.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(),Qa=s("p"),Wb=o("This model inherits from "),qr=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(),Ha=s("p"),Gb=o("This model is also a "),Ya=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(),w(An.$$.fragment),Db=p(),yt=s("div"),w(Ka.$$.fragment),Pb=p(),Zo=s("p"),Ob=o("The "),Wr=s("a"),Qb=o("TFRemBertForTokenClassification"),Hb=o(" forward method, overrides the "),ad=s("code"),Yb=o("__call__"),Kb=o(" special method."),ey=p(),w(Sn.$$.fragment),ty=p(),w(Gn.$$.fragment),oy=p(),w(Vn.$$.fragment),Tc=p(),qo=s("h2"),Ln=s("a"),rd=s("span"),w(er.$$.fragment),ny=p(),id=s("span"),sy=o("TFRemBertForQuestionAnswering"),kc=p(),pt=s("div"),w(tr.$$.fragment),ay=p(),Wo=s("p"),ry=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(),or=s("p"),my=o("This model inherits from "),Nr=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(),nr=s("p"),gy=o("This model is also a "),sr=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(),w(Xn.$$.fragment),Ty=p(),Tt=s("div"),w(ar.$$.fragment),ky=p(),No=s("p"),wy=o("The "),Ar=s("a"),vy=o("TFRemBertForQuestionAnswering"),My=o(" forward method, overrides the "),cd=s("code"),$y=o("__call__"),Ry=o(" special method."),By=p(),w(Dn.$$.fragment),Fy=p(),w(Pn.$$.fragment),Ey=p(),w(On.$$.fragment),this.h()},l(i){const T=Sw('[data-svelte="svelte-1phssyn"]',document.head);d=a(T,"META",{name:!0,content:!0}),T.forEach(t),b=m(i),h=a(i,"H1",{class:!0});var rr=r(h);u=a(rr,"A",{id:!0,class:!0,href:!0});var pd=r(u);y=a(pd,"SPAN",{});var md=r(y);v(l.$$.fragment,md),md.forEach(t),pd.forEach(t),c=m(rr),j=a(rr,"SPAN",{});var hd=r(j);Me=n(hd,"RemBERT"),hd.forEach(t),rr.forEach(t),ge=m(i),N=a(i,"H2",{class:!0});var ir=r(N);re=a(ir,"A",{id:!0,class:!0,href:!0});var ud=r(re);te=a(ud,"SPAN",{});var fd=r(te);v(k.$$.fragment,fd),fd.forEach(t),ud.forEach(t),$e=m(ir),D=a(ir,"SPAN",{});var gd=r(D);Re=n(gd,"Overview"),gd.forEach(t),ir.forEach(t),_e=m(i),S=a(i,"P",{});var lr=r(S);Be=n(lr,"The RemBERT model was proposed in "),le=a(lr,"A",{href:!0,rel:!0});var _d=r(le);Q=n(_d,"Rethinking Embedding Coupling in Pre-trained Language Models"),_d.forEach(t),Fe=n(lr," by Hyung Won Chung, Thibault F\xE9vry, Henry Tsai, Melvin Johnson, Sebastian Ruder."),lr.forEach(t),be=m(i),V=a(i,"P",{});var bd=r(V);Ee=n(bd,"The abstract from the paper is the following:"),bd.forEach(t),ye=m(i),L=a(i,"P",{});var yd=r(L);me=a(yd,"EM",{});var Td=r(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=a(i,"P",{});var kd=r(J);U=n(kd,"Tips:"),kd.forEach(t),Te=m(i),X=a(i,"P",{});var wd=r(X);je=n(wd,`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.`),wd.forEach(t),ke=m(i),A=a(i,"H2",{class:!0});var dr=r(A);ie=a(dr,"A",{id:!0,class:!0,href:!0});var vd=r(ie);he=a(vd,"SPAN",{});var Md=r(he);v(z.$$.fragment,Md),Md.forEach(t),vd.forEach(t),Je=m(dr),P=a(dr,"SPAN",{});var $d=r(P);ze=n($d,"Documentation resources"),$d.forEach(t),dr.forEach(t),we=m(i),Z=a(i,"UL",{});var ut=r(Z);ue=a(ut,"LI",{});var Rd=r(ue);de=a(Rd,"A",{href:!0});var Bd=r(de);W=n(Bd,"Text classification task guide"),Bd.forEach(t),Rd.forEach(t),Ue=m(ut),O=a(ut,"LI",{});var Fd=r(O);ce=a(Fd,"A",{href:!0});var Ed=r(ce);se=n(Ed,"Token classification task guide"),Ed.forEach(t),Fd.forEach(t),I=m(ut),fe=a(ut,"LI",{});var Cd=r(fe);x=a(Cd,"A",{href:!0});var jd=r(x);Ie=n(jd,"Question answering task guide"),jd.forEach(t),Cd.forEach(t),xe=m(ut),f=a(ut,"LI",{});var Jd=r(f);F=a(Jd,"A",{href:!0});var zd=r(F);Le=n(zd,"Causal language modeling task guide"),zd.forEach(t),Jd.forEach(t),ae=m(ut),Ne=a(ut,"LI",{});var Ud=r(Ne);qe=a(Ud,"A",{href:!0});var Id=r(qe);E=n(Id,"Masked language modeling task guide"),Id.forEach(t),Ud.forEach(t),Xe=m(ut),Ae=a(ut,"LI",{});var xd=r(Ae);We=a(xd,"A",{href:!0});var Zd=r(We);De=n(Zd,"Multiple choice task guide"),Zd.forEach(t),xd.forEach(t),ut.forEach(t),Ve=m(i),q=a(i,"H2",{class:!0});var cr=r(q);G=a(cr,"A",{id:!0,class:!0,href:!0});var qd=r(G);Se=a(qd,"SPAN",{});var Wd=r(Se);v(Ze.$$.fragment,Wd),Wd.forEach(t),qd.forEach(t),H=m(cr),Ge=a(cr,"SPAN",{});var Nd=r(Ge);Pe=n(Nd,"RemBertConfig"),Nd.forEach(t),cr.forEach(t),ve=m(i),pe=a(i,"DIV",{class:!0});var Pt=r(pe);v(K.$$.fragment,Pt),Oe=m(Pt),so=a(Pt,"P",{});var Ao=r(so);bp=n(Ao,"This is the configuration class to store the configuration of a "),pr=a(Ao,"A",{href:!0});var Ad=r(pr);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=a(Ao,"A",{href:!0,rel:!0});var Sd=r(ps);kp=n(Sd,"google/rembert"),Sd.forEach(t),wp=n(Ao," architecture."),Ao.forEach(t),vp=m(Pt),ao=a(Pt,"P",{});var So=r(ao);Mp=n(So,"Configuration objects inherit from "),mr=a(So,"A",{href:!0});var Gd=r(mr);$p=n(Gd,"PretrainedConfig"),Gd.forEach(t),Rp=n(So,` and can be used to control the model outputs. Read the
documentation from `),hr=a(So,"A",{href:!0});var Uy=r(hr);Bp=n(Uy,"PretrainedConfig"),Uy.forEach(t),Fp=n(So," for more information."),So.forEach(t),Ep=m(Pt),v(Go.$$.fragment,Pt),Pt.forEach(t),Vd=m(i),ro=a(i,"H2",{class:!0});var vc=r(ro);Vo=a(vc,"A",{id:!0,class:!0,href:!0});var Iy=r(Vo);ci=a(Iy,"SPAN",{});var xy=r(ci);v(ms.$$.fragment,xy),xy.forEach(t),Iy.forEach(t),Cp=m(vc),pi=a(vc,"SPAN",{});var Zy=r(pi);jp=n(Zy,"RemBertTokenizer"),Zy.forEach(t),vc.forEach(t),Ld=m(i),tt=a(i,"DIV",{class:!0});var kt=r(tt);v(hs.$$.fragment,kt),Jp=m(kt),us=a(kt,"P",{});var Mc=r(us);zp=n(Mc,"Construct a RemBERT tokenizer. Based on "),fs=a(Mc,"A",{href:!0,rel:!0});var qy=r(fs);Up=n(qy,"SentencePiece"),qy.forEach(t),Ip=n(Mc,"."),Mc.forEach(t),xp=m(kt),gs=a(kt,"P",{});var $c=r(gs);Zp=n($c,"This tokenizer inherits from "),ur=a($c,"A",{href:!0});var Wy=r(ur);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=a(kt,"DIV",{class:!0});var Sr=r(Ot);v(_s.$$.fragment,Sr),Ap=m(Sr),mi=a(Sr,"P",{});var Ny=r(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(Sr),bs=a(Sr,"UL",{});var Rc=r(bs);fr=a(Rc,"LI",{});var Cy=r(fr);Vp=n(Cy,"single sequence: "),hi=a(Cy,"CODE",{});var Ay=r(hi);Lp=n(Ay,"[CLS] X [SEP]"),Ay.forEach(t),Cy.forEach(t),Xp=m(Rc),gr=a(Rc,"LI",{});var jy=r(gr);Dp=n(jy,"pair of sequences: "),ui=a(jy,"CODE",{});var Sy=r(ui);Pp=n(Sy,"[CLS] A [SEP] B [SEP]"),Sy.forEach(t),jy.forEach(t),Rc.forEach(t),Sr.forEach(t),Op=m(kt),Lo=a(kt,"DIV",{class:!0});var Bc=r(Lo);v(ys.$$.fragment,Bc),Qp=m(Bc),Ts=a(Bc,"P",{});var Fc=r(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=a(Fc,"CODE",{});var Gy=r(fi);Yp=n(Gy,"prepare_for_model"),Gy.forEach(t),Kp=n(Fc," method."),Fc.forEach(t),Bc.forEach(t),em=m(kt),Bt=a(kt,"DIV",{class:!0});var Qn=r(Bt);v(ks.$$.fragment,Qn),tm=m(Qn),gi=a(Qn,"P",{});var Vy=r(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),v(Xo.$$.fragment,Qn),sm=m(Qn),io=a(Qn,"P",{});var Gr=r(io);am=n(Gr,"If "),_i=a(Gr,"CODE",{});var Ly=r(_i);rm=n(Ly,"token_ids_1"),Ly.forEach(t),im=n(Gr," is "),bi=a(Gr,"CODE",{});var Xy=r(bi);lm=n(Xy,"None"),Xy.forEach(t),dm=n(Gr,", this method only returns the first portion of the mask (0s)."),Gr.forEach(t),Qn.forEach(t),cm=m(kt),_r=a(kt,"DIV",{class:!0});var Dy=r(_r);v(ws.$$.fragment,Dy),Dy.forEach(t),kt.forEach(t),Xd=m(i),lo=a(i,"H2",{class:!0});var Ec=r(lo);Do=a(Ec,"A",{id:!0,class:!0,href:!0});var Py=r(Do);yi=a(Py,"SPAN",{});var Oy=r(yi);v(vs.$$.fragment,Oy),Oy.forEach(t),Py.forEach(t),pm=m(Ec),Ti=a(Ec,"SPAN",{});var Qy=r(Ti);mm=n(Qy,"RemBertTokenizerFast"),Qy.forEach(t),Ec.forEach(t),Dd=m(i),nt=a(i,"DIV",{class:!0});var Zt=r(nt);v(Ms.$$.fragment,Zt),hm=m(Zt),Lt=a(Zt,"P",{});var Hn=r(Lt);um=n(Hn,"Construct a \u201Cfast\u201D RemBert tokenizer (backed by HuggingFace\u2019s "),ki=a(Hn,"EM",{});var Hy=r(ki);fm=n(Hy,"tokenizers"),Hy.forEach(t),gm=n(Hn,` library). Based on
`),$s=a(Hn,"A",{href:!0,rel:!0});var Yy=r($s);_m=n(Yy,"Unigram"),Yy.forEach(t),bm=n(Hn,`. This
tokenizer inherits from `),br=a(Hn,"A",{href:!0});var Ky=r(br);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=a(Zt,"DIV",{class:!0});var Vr=r(Qt);v(Rs.$$.fragment,Vr),wm=m(Vr),wi=a(Vr,"P",{});var eT=r(wi);vm=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(Vr),Bs=a(Vr,"UL",{});var Cc=r(Bs);yr=a(Cc,"LI",{});var Jy=r(yr);$m=n(Jy,"single sequence: "),vi=a(Jy,"CODE",{});var tT=r(vi);Rm=n(tT,"[CLS] X [SEP]"),tT.forEach(t),Jy.forEach(t),Bm=m(Cc),Tr=a(Cc,"LI",{});var zy=r(Tr);Fm=n(zy,"pair of sequences: "),Mi=a(zy,"CODE",{});var oT=r(Mi);Em=n(oT,"[CLS] A [SEP] B [SEP]"),oT.forEach(t),zy.forEach(t),Cc.forEach(t),Vr.forEach(t),Cm=m(Zt),Po=a(Zt,"DIV",{class:!0});var jc=r(Po);v(Fs.$$.fragment,jc),jm=m(jc),Es=a(jc,"P",{});var Jc=r(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=a(Jc,"CODE",{});var nT=r($i);zm=n(nT,"prepare_for_model"),nT.forEach(t),Um=n(Jc," method."),Jc.forEach(t),jc.forEach(t),Im=m(Zt),Ft=a(Zt,"DIV",{class:!0});var Yn=r(Ft);v(Cs.$$.fragment,Yn),xm=m(Yn),Ri=a(Yn,"P",{});var sT=r(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),v(Oo.$$.fragment,Yn),Wm=m(Yn),Bi=a(Yn,"P",{});var aT=r(Bi);Nm=n(aT,"if token_ids_1 is None, only returns the first portion of the mask (0s)."),aT.forEach(t),Yn.forEach(t),Am=m(Zt),kr=a(Zt,"DIV",{class:!0});var rT=r(kr);v(js.$$.fragment,rT),rT.forEach(t),Zt.forEach(t),Pd=m(i),co=a(i,"H2",{class:!0});var zc=r(co);Qo=a(zc,"A",{id:!0,class:!0,href:!0});var iT=r(Qo);Fi=a(iT,"SPAN",{});var lT=r(Fi);v(Js.$$.fragment,lT),lT.forEach(t),iT.forEach(t),Sm=m(zc),Ei=a(zc,"SPAN",{});var dT=r(Ei);Gm=n(dT,"RemBertModel"),dT.forEach(t),zc.forEach(t),Od=m(i),ht=a(i,"DIV",{class:!0});var Ht=r(ht);v(zs.$$.fragment,Ht),Vm=m(Ht),Us=a(Ht,"P",{});var Uc=r(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=a(Uc,"A",{href:!0,rel:!0});var cT=r(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=a(Ht,"P",{});var Ic=r(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=a(Ic,"A",{href:!0,rel:!0});var pT=r(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=a(Ht,"P",{});var wt=r(st);Km=n(wt,"To behave as an decoder the model needs to be initialized with the "),Ci=a(wt,"CODE",{});var mT=r(Ci);eh=n(mT,"is_decoder"),mT.forEach(t),th=n(wt,` argument of the configuration set
to `),ji=a(wt,"CODE",{});var hT=r(ji);oh=n(hT,"True"),hT.forEach(t),nh=n(wt,". To be used in a Seq2Seq model, the model needs to initialized with both "),Ji=a(wt,"CODE",{});var uT=r(Ji);sh=n(uT,"is_decoder"),uT.forEach(t),ah=n(wt,` argument and
`),zi=a(wt,"CODE",{});var fT=r(zi);rh=n(fT,"add_cross_attention"),fT.forEach(t),ih=n(wt," set to "),Ui=a(wt,"CODE",{});var gT=r(Ui);lh=n(gT,"True"),gT.forEach(t),dh=n(wt,"; an "),Ii=a(wt,"CODE",{});var _T=r(Ii);ch=n(_T,"encoder_hidden_states"),_T.forEach(t),ph=n(wt," is then expected as an input to the forward pass."),wt.forEach(t),mh=m(Ht),Et=a(Ht,"DIV",{class:!0});var Kn=r(Et);v(qs.$$.fragment,Kn),hh=m(Kn),po=a(Kn,"P",{});var Lr=r(po);uh=n(Lr,"The "),wr=a(Lr,"A",{href:!0});var bT=r(wr);fh=n(bT,"RemBertModel"),bT.forEach(t),gh=n(Lr," forward method, overrides the "),xi=a(Lr,"CODE",{});var yT=r(xi);_h=n(yT,"__call__"),yT.forEach(t),bh=n(Lr," special method."),Lr.forEach(t),yh=m(Kn),v(Ho.$$.fragment,Kn),Th=m(Kn),v(Yo.$$.fragment,Kn),Kn.forEach(t),Ht.forEach(t),Qd=m(i),mo=a(i,"H2",{class:!0});var xc=r(mo);Ko=a(xc,"A",{id:!0,class:!0,href:!0});var TT=r(Ko);Zi=a(TT,"SPAN",{});var kT=r(Zi);v(Ws.$$.fragment,kT),kT.forEach(t),TT.forEach(t),kh=m(xc),qi=a(xc,"SPAN",{});var wT=r(qi);wh=n(wT,"RemBertForCausalLM"),wT.forEach(t),xc.forEach(t),Hd=m(i),Xt=a(i,"DIV",{class:!0});var Xr=r(Xt);v(Ns.$$.fragment,Xr),vh=m(Xr),ho=a(Xr,"P",{});var Dr=r(ho);Mh=n(Dr,"RemBERT Model with a "),Wi=a(Dr,"CODE",{});var vT=r(Wi);$h=n(vT,"language modeling"),vT.forEach(t),Rh=n(Dr,` head on top for CLM fine-tuning.
This model is a PyTorch `),As=a(Dr,"A",{href:!0,rel:!0});var MT=r(As);Bh=n(MT,"torch.nn.Module"),MT.forEach(t),Fh=n(Dr,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Dr.forEach(t),Eh=m(Xr),Ct=a(Xr,"DIV",{class:!0});var es=r(Ct);v(Ss.$$.fragment,es),Ch=m(es),uo=a(es,"P",{});var Pr=r(uo);jh=n(Pr,"The "),vr=a(Pr,"A",{href:!0});var $T=r(vr);Jh=n($T,"RemBertForCausalLM"),$T.forEach(t),zh=n(Pr," forward method, overrides the "),Ni=a(Pr,"CODE",{});var RT=r(Ni);Uh=n(RT,"__call__"),RT.forEach(t),Ih=n(Pr," special method."),Pr.forEach(t),xh=m(es),v(en.$$.fragment,es),Zh=m(es),v(tn.$$.fragment,es),es.forEach(t),Xr.forEach(t),Yd=m(i),fo=a(i,"H2",{class:!0});var Zc=r(fo);on=a(Zc,"A",{id:!0,class:!0,href:!0});var BT=r(on);Ai=a(BT,"SPAN",{});var FT=r(Ai);v(Gs.$$.fragment,FT),FT.forEach(t),BT.forEach(t),qh=m(Zc),Si=a(Zc,"SPAN",{});var ET=r(Si);Wh=n(ET,"RemBertForMaskedLM"),ET.forEach(t),Zc.forEach(t),Kd=m(i),Dt=a(i,"DIV",{class:!0});var Or=r(Dt);v(Vs.$$.fragment,Or),Nh=m(Or),go=a(Or,"P",{});var Qr=r(go);Ah=n(Qr,"RemBERT Model with a "),Gi=a(Qr,"CODE",{});var CT=r(Gi);Sh=n(CT,"language modeling"),CT.forEach(t),Gh=n(Qr,` head on top.
This model is a PyTorch `),Ls=a(Qr,"A",{href:!0,rel:!0});var jT=r(Ls);Vh=n(jT,"torch.nn.Module"),jT.forEach(t),Lh=n(Qr,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Qr.forEach(t),Xh=m(Or),jt=a(Or,"DIV",{class:!0});var ts=r(jt);v(Xs.$$.fragment,ts),Dh=m(ts),_o=a(ts,"P",{});var Hr=r(_o);Ph=n(Hr,"The "),Mr=a(Hr,"A",{href:!0});var JT=r(Mr);Oh=n(JT,"RemBertForMaskedLM"),JT.forEach(t),Qh=n(Hr," forward method, overrides the "),Vi=a(Hr,"CODE",{});var zT=r(Vi);Hh=n(zT,"__call__"),zT.forEach(t),Yh=n(Hr," special method."),Hr.forEach(t),Kh=m(ts),v(nn.$$.fragment,ts),eu=m(ts),v(sn.$$.fragment,ts),ts.forEach(t),Or.forEach(t),ec=m(i),bo=a(i,"H2",{class:!0});var qc=r(bo);an=a(qc,"A",{id:!0,class:!0,href:!0});var UT=r(an);Li=a(UT,"SPAN",{});var IT=r(Li);v(Ds.$$.fragment,IT),IT.forEach(t),UT.forEach(t),tu=m(qc),Xi=a(qc,"SPAN",{});var xT=r(Xi);ou=n(xT,"RemBertForSequenceClassification"),xT.forEach(t),qc.forEach(t),tc=m(i),vt=a(i,"DIV",{class:!0});var os=r(vt);v(Ps.$$.fragment,os),nu=m(os),Di=a(os,"P",{});var ZT=r(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),au=m(os),Os=a(os,"P",{});var Wc=r(Os);ru=n(Wc,"This model is a PyTorch "),Qs=a(Wc,"A",{href:!0,rel:!0});var qT=r(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=a(os,"DIV",{class:!0});var Yt=r(ft);v(Hs.$$.fragment,Yt),cu=m(Yt),yo=a(Yt,"P",{});var Yr=r(yo);pu=n(Yr,"The "),$r=a(Yr,"A",{href:!0});var WT=r($r);mu=n(WT,"RemBertForSequenceClassification"),WT.forEach(t),hu=n(Yr," forward method, overrides the "),Pi=a(Yr,"CODE",{});var NT=r(Pi);uu=n(NT,"__call__"),NT.forEach(t),fu=n(Yr," special method."),Yr.forEach(t),gu=m(Yt),v(rn.$$.fragment,Yt),_u=m(Yt),v(ln.$$.fragment,Yt),bu=m(Yt),v(dn.$$.fragment,Yt),Yt.forEach(t),os.forEach(t),oc=m(i),To=a(i,"H2",{class:!0});var Nc=r(To);cn=a(Nc,"A",{id:!0,class:!0,href:!0});var AT=r(cn);Oi=a(AT,"SPAN",{});var ST=r(Oi);v(Ys.$$.fragment,ST),ST.forEach(t),AT.forEach(t),yu=m(Nc),Qi=a(Nc,"SPAN",{});var GT=r(Qi);Tu=n(GT,"RemBertForMultipleChoice"),GT.forEach(t),Nc.forEach(t),nc=m(i),Mt=a(i,"DIV",{class:!0});var ns=r(Mt);v(Ks.$$.fragment,ns),ku=m(ns),Hi=a(ns,"P",{});var VT=r(Hi);wu=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),vu=m(ns),ea=a(ns,"P",{});var Ac=r(ea);Mu=n(Ac,"This model is a PyTorch "),ta=a(Ac,"A",{href:!0,rel:!0});var LT=r(ta);$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=a(ns,"DIV",{class:!0});var ss=r(Jt);v(oa.$$.fragment,ss),Fu=m(ss),ko=a(ss,"P",{});var Kr=r(ko);Eu=n(Kr,"The "),Rr=a(Kr,"A",{href:!0});var XT=r(Rr);Cu=n(XT,"RemBertForMultipleChoice"),XT.forEach(t),ju=n(Kr," forward method, overrides the "),Yi=a(Kr,"CODE",{});var DT=r(Yi);Ju=n(DT,"__call__"),DT.forEach(t),zu=n(Kr," special method."),Kr.forEach(t),Uu=m(ss),v(pn.$$.fragment,ss),Iu=m(ss),v(mn.$$.fragment,ss),ss.forEach(t),ns.forEach(t),sc=m(i),wo=a(i,"H2",{class:!0});var Sc=r(wo);hn=a(Sc,"A",{id:!0,class:!0,href:!0});var PT=r(hn);Ki=a(PT,"SPAN",{});var OT=r(Ki);v(na.$$.fragment,OT),OT.forEach(t),PT.forEach(t),xu=m(Sc),el=a(Sc,"SPAN",{});var QT=r(el);Zu=n(QT,"RemBertForTokenClassification"),QT.forEach(t),Sc.forEach(t),ac=m(i),$t=a(i,"DIV",{class:!0});var as=r($t);v(sa.$$.fragment,as),qu=m(as),tl=a(as,"P",{});var HT=r(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(as),aa=a(as,"P",{});var Gc=r(aa);Au=n(Gc,"This model is a PyTorch "),ra=a(Gc,"A",{href:!0,rel:!0});var YT=r(ra);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(as),zt=a(as,"DIV",{class:!0});var rs=r(zt);v(ia.$$.fragment,rs),Lu=m(rs),vo=a(rs,"P",{});var ei=r(vo);Xu=n(ei,"The "),Br=a(ei,"A",{href:!0});var KT=r(Br);Du=n(KT,"RemBertForTokenClassification"),KT.forEach(t),Pu=n(ei," forward method, overrides the "),ol=a(ei,"CODE",{});var ek=r(ol);Ou=n(ek,"__call__"),ek.forEach(t),Qu=n(ei," special method."),ei.forEach(t),Hu=m(rs),v(un.$$.fragment,rs),Yu=m(rs),v(fn.$$.fragment,rs),rs.forEach(t),as.forEach(t),rc=m(i),Mo=a(i,"H2",{class:!0});var Vc=r(Mo);gn=a(Vc,"A",{id:!0,class:!0,href:!0});var tk=r(gn);nl=a(tk,"SPAN",{});var ok=r(nl);v(la.$$.fragment,ok),ok.forEach(t),tk.forEach(t),Ku=m(Vc),sl=a(Vc,"SPAN",{});var nk=r(sl);ef=n(nk,"RemBertForQuestionAnswering"),nk.forEach(t),Vc.forEach(t),ic=m(i),Rt=a(i,"DIV",{class:!0});var is=r(Rt);v(da.$$.fragment,is),tf=m(is),$o=a(is,"P",{});var ti=r($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 `),al=a(ti,"CODE",{});var sk=r(al);nf=n(sk,"span start logits"),sk.forEach(t),sf=n(ti," and "),rl=a(ti,"CODE",{});var ak=r(rl);af=n(ak,"span end logits"),ak.forEach(t),rf=n(ti,")."),ti.forEach(t),lf=m(is),ca=a(is,"P",{});var Lc=r(ca);df=n(Lc,"This model is a PyTorch "),pa=a(Lc,"A",{href:!0,rel:!0});var rk=r(pa);cf=n(rk,"torch.nn.Module"),rk.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=a(is,"DIV",{class:!0});var ls=r(Ut);v(ma.$$.fragment,ls),hf=m(ls),Ro=a(ls,"P",{});var oi=r(Ro);uf=n(oi,"The "),Fr=a(oi,"A",{href:!0});var ik=r(Fr);ff=n(ik,"RemBertForQuestionAnswering"),ik.forEach(t),gf=n(oi," forward method, overrides the "),il=a(oi,"CODE",{});var lk=r(il);_f=n(lk,"__call__"),lk.forEach(t),bf=n(oi," special method."),oi.forEach(t),yf=m(ls),v(_n.$$.fragment,ls),Tf=m(ls),v(bn.$$.fragment,ls),ls.forEach(t),is.forEach(t),lc=m(i),Bo=a(i,"H2",{class:!0});var Xc=r(Bo);yn=a(Xc,"A",{id:!0,class:!0,href:!0});var dk=r(yn);ll=a(dk,"SPAN",{});var ck=r(ll);v(ha.$$.fragment,ck),ck.forEach(t),dk.forEach(t),kf=m(Xc),dl=a(Xc,"SPAN",{});var pk=r(dl);wf=n(pk,"TFRemBertModel"),pk.forEach(t),Xc.forEach(t),dc=m(i),at=a(i,"DIV",{class:!0});var qt=r(at);v(ua.$$.fragment,qt),vf=m(qt),cl=a(qt,"P",{});var mk=r(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),fa=a(qt,"P",{});var Dc=r(fa);Rf=n(Dc,"This model inherits from "),Er=a(Dc,"A",{href:!0});var hk=r(Er);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),ga=a(qt,"P",{});var Pc=r(ga);Cf=n(Pc,"This model is also a "),_a=a(Pc,"A",{href:!0,rel:!0});var uk=r(_a);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),v(Tn.$$.fragment,qt),Uf=m(qt),It=a(qt,"DIV",{class:!0});var ds=r(It);v(ba.$$.fragment,ds),If=m(ds),Fo=a(ds,"P",{});var ni=r(Fo);xf=n(ni,"The "),Cr=a(ni,"A",{href:!0});var fk=r(Cr);Zf=n(fk,"TFRemBertModel"),fk.forEach(t),qf=n(ni," forward method, overrides the "),pl=a(ni,"CODE",{});var gk=r(pl);Wf=n(gk,"__call__"),gk.forEach(t),Nf=n(ni," special method."),ni.forEach(t),Af=m(ds),v(kn.$$.fragment,ds),Sf=m(ds),v(wn.$$.fragment,ds),ds.forEach(t),qt.forEach(t),cc=m(i),Eo=a(i,"H2",{class:!0});var Oc=r(Eo);vn=a(Oc,"A",{id:!0,class:!0,href:!0});var _k=r(vn);ml=a(_k,"SPAN",{});var bk=r(ml);v(ya.$$.fragment,bk),bk.forEach(t),_k.forEach(t),Gf=m(Oc),hl=a(Oc,"SPAN",{});var yk=r(hl);Vf=n(yk,"TFRemBertForMaskedLM"),yk.forEach(t),Oc.forEach(t),pc=m(i),rt=a(i,"DIV",{class:!0});var Wt=r(rt);v(Ta.$$.fragment,Wt),Lf=m(Wt),ka=a(Wt,"P",{});var Qc=r(ka);Xf=n(Qc,"RemBERT Model with a "),ul=a(Qc,"CODE",{});var Tk=r(ul);Df=n(Tk,"language modeling"),Tk.forEach(t),Pf=n(Qc," head on top."),Qc.forEach(t),Of=m(Wt),wa=a(Wt,"P",{});var Hc=r(wa);Qf=n(Hc,"This model inherits from "),jr=a(Hc,"A",{href:!0});var kk=r(jr);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),va=a(Wt,"P",{});var Yc=r(va);eg=n(Yc,"This model is also a "),Ma=a(Yc,"A",{href:!0,rel:!0});var wk=r(Ma);tg=n(wk,"tf.keras.Model"),wk.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),v(Mn.$$.fragment,Wt),sg=m(Wt),gt=a(Wt,"DIV",{class:!0});var Kt=r(gt);v($a.$$.fragment,Kt),ag=m(Kt),Co=a(Kt,"P",{});var si=r(Co);rg=n(si,"The "),Jr=a(si,"A",{href:!0});var vk=r(Jr);ig=n(vk,"TFRemBertForMaskedLM"),vk.forEach(t),lg=n(si," forward method, overrides the "),fl=a(si,"CODE",{});var Mk=r(fl);dg=n(Mk,"__call__"),Mk.forEach(t),cg=n(si," special method."),si.forEach(t),pg=m(Kt),v($n.$$.fragment,Kt),mg=m(Kt),v(Rn.$$.fragment,Kt),hg=m(Kt),v(Bn.$$.fragment,Kt),Kt.forEach(t),Wt.forEach(t),mc=m(i),jo=a(i,"H2",{class:!0});var Kc=r(jo);Fn=a(Kc,"A",{id:!0,class:!0,href:!0});var $k=r(Fn);gl=a($k,"SPAN",{});var Rk=r(gl);v(Ra.$$.fragment,Rk),Rk.forEach(t),$k.forEach(t),ug=m(Kc),_l=a(Kc,"SPAN",{});var Bk=r(_l);fg=n(Bk,"TFRemBertForCausalLM"),Bk.forEach(t),Kc.forEach(t),hc=m(i),it=a(i,"DIV",{class:!0});var Nt=r(it);v(Ba.$$.fragment,Nt),gg=m(Nt),Fa=a(Nt,"P",{});var ep=r(Fa);_g=n(ep,"RemBERT Model with a "),bl=a(ep,"CODE",{});var Fk=r(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),Ea=a(Nt,"P",{});var tp=r(Ea);kg=n(tp,"This model inherits from "),zr=a(tp,"A",{href:!0});var Ek=r(zr);wg=n(Ek,"TFPreTrainedModel"),Ek.forEach(t),vg=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),Ca=a(Nt,"P",{});var op=r(Ca);$g=n(op,"This model is also a "),ja=a(op,"A",{href:!0,rel:!0});var Ck=r(ja);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),v(En.$$.fragment,Nt),Eg=m(Nt),_t=a(Nt,"DIV",{class:!0});var eo=r(_t);v(Ja.$$.fragment,eo),Cg=m(eo),ot=a(eo,"P",{});var mt=r(ot);jg=n(mt,"encoder_hidden_states  ("),yl=a(mt,"CODE",{});var jk=r(yl);Jg=n(jk,"tf.Tensor"),jk.forEach(t),zg=n(mt," of shape "),Tl=a(mt,"CODE",{});var Jk=r(Tl);Ug=n(Jk,"(batch_size, sequence_length, hidden_size)"),Jk.forEach(t),Ig=n(mt,", "),kl=a(mt,"EM",{});var zk=r(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 (`),wl=a(mt,"CODE",{});var Uk=r(wl);qg=n(Uk,"tf.Tensor"),Uk.forEach(t),Wg=n(mt," of shape "),vl=a(mt,"CODE",{});var Ik=r(vl);Ng=n(Ik,"(batch_size, sequence_length)"),Ik.forEach(t),Ag=n(mt,", "),Ml=a(mt,"EM",{});var xk=r(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=a(mt,"CODE",{});var Zk=r($l);Vg=n(Zk,"[0, 1]"),Zk.forEach(t),Lg=n(mt,":"),mt.forEach(t),Xg=m(eo),za=a(eo,"UL",{});var np=r(za);Ua=a(np,"LI",{});var sp=r(Ua);Dg=n(sp,"1 for tokens that are "),Rl=a(sp,"STRONG",{});var qk=r(Rl);Pg=n(qk,"not masked"),qk.forEach(t),Og=n(sp,","),sp.forEach(t),Qg=m(np),Ia=a(np,"LI",{});var ap=r(Ia);Hg=n(ap,"0 for tokens that are "),Bl=a(ap,"STRONG",{});var Wk=r(Bl);Yg=n(Wk,"masked"),Wk.forEach(t),Kg=n(ap,"."),ap.forEach(t),np.forEach(t),e_=m(eo),Y=a(eo,"P",{});var ee=r(Y);t_=n(ee,"past_key_values ("),Fl=a(ee,"CODE",{});var Nk=r(Fl);o_=n(Nk,"Tuple[Tuple[tf.Tensor]]"),Nk.forEach(t),n_=n(ee," of length "),El=a(ee,"CODE",{});var Ak=r(El);s_=n(Ak,"config.n_layers"),Ak.forEach(t),a_=n(ee,`)
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If `),Cl=a(ee,"CODE",{});var Sk=r(Cl);r_=n(Sk,"past_key_values"),Sk.forEach(t),i_=n(ee," are used, the user can optionally input only the last "),jl=a(ee,"CODE",{});var Gk=r(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=a(ee,"CODE",{});var Vk=r(Jl);c_=n(Vk,"(batch_size, 1)"),Vk.forEach(t),p_=n(ee,` instead of all
`),zl=a(ee,"CODE",{});var Lk=r(zl);m_=n(Lk,"decoder_input_ids"),Lk.forEach(t),h_=n(ee," of shape "),Ul=a(ee,"CODE",{});var Xk=r(Ul);u_=n(Xk,"(batch_size, sequence_length)"),Xk.forEach(t),f_=n(ee,`.
use_cache (`),Il=a(ee,"CODE",{});var Dk=r(Il);g_=n(Dk,"bool"),Dk.forEach(t),__=n(ee,", "),xl=a(ee,"EM",{});var Pk=r(xl);b_=n(Pk,"optional"),Pk.forEach(t),y_=n(ee,", defaults to "),Zl=a(ee,"CODE",{});var Ok=r(Zl);T_=n(Ok,"True"),Ok.forEach(t),k_=n(ee,`):
If set to `),ql=a(ee,"CODE",{});var Qk=r(ql);w_=n(Qk,"True"),Qk.forEach(t),v_=n(ee,", "),Wl=a(ee,"CODE",{});var Hk=r(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=a(ee,"CODE",{});var Yk=r(Nl);R_=n(Yk,"past_key_values"),Yk.forEach(t),B_=n(ee,"). Set to "),Al=a(ee,"CODE",{});var Kk=r(Al);F_=n(Kk,"False"),Kk.forEach(t),E_=n(ee," during training, "),Sl=a(ee,"CODE",{});var ew=r(Sl);C_=n(ew,"True"),ew.forEach(t),j_=n(ee,` during generation
labels (`),Gl=a(ee,"CODE",{});var tw=r(Gl);J_=n(tw,"tf.Tensor"),tw.forEach(t),z_=n(ee," or "),Vl=a(ee,"CODE",{});var ow=r(Vl);U_=n(ow,"np.ndarray"),ow.forEach(t),I_=n(ee," of shape "),Ll=a(ee,"CODE",{});var nw=r(Ll);x_=n(nw,"(batch_size, sequence_length)"),nw.forEach(t),Z_=n(ee,", "),Xl=a(ee,"EM",{});var sw=r(Xl);q_=n(sw,"optional"),sw.forEach(t),W_=n(ee,`):
Labels for computing the cross entropy classification loss. Indices should be in `),Dl=a(ee,"CODE",{});var aw=r(Dl);N_=n(aw,"[0, ..., config.vocab_size - 1]"),aw.forEach(t),A_=n(ee,"."),ee.forEach(t),S_=m(eo),v(Cn.$$.fragment,eo),eo.forEach(t),Nt.forEach(t),uc=m(i),Jo=a(i,"H2",{class:!0});var rp=r(Jo);jn=a(rp,"A",{id:!0,class:!0,href:!0});var rw=r(jn);Pl=a(rw,"SPAN",{});var iw=r(Pl);v(xa.$$.fragment,iw),iw.forEach(t),rw.forEach(t),G_=m(rp),Ol=a(rp,"SPAN",{});var lw=r(Ol);V_=n(lw,"TFRemBertForSequenceClassification"),lw.forEach(t),rp.forEach(t),fc=m(i),lt=a(i,"DIV",{class:!0});var At=r(lt);v(Za.$$.fragment,At),L_=m(At),Ql=a(At,"P",{});var dw=r(Ql);X_=n(dw,"RemBERT Model transformer with a sequence classification/regression head on top e.g., for GLUE tasks."),dw.forEach(t),D_=m(At),qa=a(At,"P",{});var ip=r(qa);P_=n(ip,"This model inherits from "),Ur=a(ip,"A",{href:!0});var cw=r(Ur);O_=n(cw,"TFPreTrainedModel"),cw.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),Wa=a(At,"P",{});var lp=r(Wa);Y_=n(lp,"This model is also a "),Na=a(lp,"A",{href:!0,rel:!0});var pw=r(Na);K_=n(pw,"tf.keras.Model"),pw.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),v(Jn.$$.fragment,At),ob=m(At),bt=a(At,"DIV",{class:!0});var to=r(bt);v(Aa.$$.fragment,to),nb=m(to),zo=a(to,"P",{});var ai=r(zo);sb=n(ai,"The "),Ir=a(ai,"A",{href:!0});var mw=r(Ir);ab=n(mw,"TFRemBertForSequenceClassification"),mw.forEach(t),rb=n(ai," forward method, overrides the "),Hl=a(ai,"CODE",{});var hw=r(Hl);ib=n(hw,"__call__"),hw.forEach(t),lb=n(ai," special method."),ai.forEach(t),db=m(to),v(zn.$$.fragment,to),cb=m(to),v(Un.$$.fragment,to),pb=m(to),v(In.$$.fragment,to),to.forEach(t),At.forEach(t),gc=m(i),Uo=a(i,"H2",{class:!0});var dp=r(Uo);xn=a(dp,"A",{id:!0,class:!0,href:!0});var uw=r(xn);Yl=a(uw,"SPAN",{});var fw=r(Yl);v(Sa.$$.fragment,fw),fw.forEach(t),uw.forEach(t),mb=m(dp),Kl=a(dp,"SPAN",{});var gw=r(Kl);hb=n(gw,"TFRemBertForMultipleChoice"),gw.forEach(t),dp.forEach(t),_c=m(i),dt=a(i,"DIV",{class:!0});var St=r(dt);v(Ga.$$.fragment,St),ub=m(St),ed=a(St,"P",{});var _w=r(ed);fb=n(_w,`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.`),_w.forEach(t),gb=m(St),Va=a(St,"P",{});var cp=r(Va);_b=n(cp,"This model inherits from "),xr=a(cp,"A",{href:!0});var bw=r(xr);bb=n(bw,"TFPreTrainedModel"),bw.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),La=a(St,"P",{});var pp=r(La);kb=n(pp,"This model is also a "),Xa=a(pp,"A",{href:!0,rel:!0});var yw=r(Xa);wb=n(yw,"tf.keras.Model"),yw.forEach(t),vb=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),v(Zn.$$.fragment,St),$b=m(St),xt=a(St,"DIV",{class:!0});var cs=r(xt);v(Da.$$.fragment,cs),Rb=m(cs),Io=a(cs,"P",{});var ri=r(Io);Bb=n(ri,"The "),Zr=a(ri,"A",{href:!0});var Tw=r(Zr);Fb=n(Tw,"TFRemBertForMultipleChoice"),Tw.forEach(t),Eb=n(ri," forward method, overrides the "),td=a(ri,"CODE",{});var kw=r(td);Cb=n(kw,"__call__"),kw.forEach(t),jb=n(ri," special method."),ri.forEach(t),Jb=m(cs),v(qn.$$.fragment,cs),zb=m(cs),v(Wn.$$.fragment,cs),cs.forEach(t),St.forEach(t),bc=m(i),xo=a(i,"H2",{class:!0});var mp=r(xo);Nn=a(mp,"A",{id:!0,class:!0,href:!0});var ww=r(Nn);od=a(ww,"SPAN",{});var vw=r(od);v(Pa.$$.fragment,vw),vw.forEach(t),ww.forEach(t),Ub=m(mp),nd=a(mp,"SPAN",{});var Mw=r(nd);Ib=n(Mw,"TFRemBertForTokenClassification"),Mw.forEach(t),mp.forEach(t),yc=m(i),ct=a(i,"DIV",{class:!0});var Gt=r(ct);v(Oa.$$.fragment,Gt),xb=m(Gt),sd=a(Gt,"P",{});var $w=r(sd);Zb=n($w,`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.`),$w.forEach(t),qb=m(Gt),Qa=a(Gt,"P",{});var hp=r(Qa);Wb=n(hp,"This model inherits from "),qr=a(hp,"A",{href:!0});var Rw=r(qr);Nb=n(Rw,"TFPreTrainedModel"),Rw.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),Ha=a(Gt,"P",{});var up=r(Ha);Gb=n(up,"This model is also a "),Ya=a(up,"A",{href:!0,rel:!0});var Bw=r(Ya);Vb=n(Bw,"tf.keras.Model"),Bw.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),v(An.$$.fragment,Gt),Db=m(Gt),yt=a(Gt,"DIV",{class:!0});var oo=r(yt);v(Ka.$$.fragment,oo),Pb=m(oo),Zo=a(oo,"P",{});var ii=r(Zo);Ob=n(ii,"The "),Wr=a(ii,"A",{href:!0});var Fw=r(Wr);Qb=n(Fw,"TFRemBertForTokenClassification"),Fw.forEach(t),Hb=n(ii," forward method, overrides the "),ad=a(ii,"CODE",{});var Ew=r(ad);Yb=n(Ew,"__call__"),Ew.forEach(t),Kb=n(ii," special method."),ii.forEach(t),ey=m(oo),v(Sn.$$.fragment,oo),ty=m(oo),v(Gn.$$.fragment,oo),oy=m(oo),v(Vn.$$.fragment,oo),oo.forEach(t),Gt.forEach(t),Tc=m(i),qo=a(i,"H2",{class:!0});var fp=r(qo);Ln=a(fp,"A",{id:!0,class:!0,href:!0});var Cw=r(Ln);rd=a(Cw,"SPAN",{});var jw=r(rd);v(er.$$.fragment,jw),jw.forEach(t),Cw.forEach(t),ny=m(fp),id=a(fp,"SPAN",{});var Jw=r(id);sy=n(Jw,"TFRemBertForQuestionAnswering"),Jw.forEach(t),fp.forEach(t),kc=m(i),pt=a(i,"DIV",{class:!0});var Vt=r(pt);v(tr.$$.fragment,Vt),ay=m(Vt),Wo=a(Vt,"P",{});var li=r(Wo);ry=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=a(li,"CODE",{});var zw=r(ld);iy=n(zw,"span start logits"),zw.forEach(t),ly=n(li," and "),dd=a(li,"CODE",{});var Uw=r(dd);dy=n(Uw,"span end logits"),Uw.forEach(t),cy=n(li,")."),li.forEach(t),py=m(Vt),or=a(Vt,"P",{});var gp=r(or);my=n(gp,"This model inherits from "),Nr=a(gp,"A",{href:!0});var Iw=r(Nr);hy=n(Iw,"TFPreTrainedModel"),Iw.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),nr=a(Vt,"P",{});var _p=r(nr);gy=n(_p,"This model is also a "),sr=a(_p,"A",{href:!0,rel:!0});var xw=r(sr);_y=n(xw,"tf.keras.Model"),xw.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),v(Xn.$$.fragment,Vt),Ty=m(Vt),Tt=a(Vt,"DIV",{class:!0});var no=r(Tt);v(ar.$$.fragment,no),ky=m(no),No=a(no,"P",{});var di=r(No);wy=n(di,"The "),Ar=a(di,"A",{href:!0});var Zw=r(Ar);vy=n(Zw,"TFRemBertForQuestionAnswering"),Zw.forEach(t),My=n(di," forward method, overrides the "),cd=a(di,"CODE",{});var qw=r(cd);$y=n(qw,"__call__"),qw.forEach(t),Ry=n(di," special method."),di.forEach(t),By=m(no),v(Dn.$$.fragment,no),Fy=m(no),v(Pn.$$.fragment,no),Ey=m(no),v(On.$$.fragment,no),no.forEach(t),Vt.forEach(t),this.h()},h(){g(d,"name","hf:doc:metadata"),g(d,"content",JSON.stringify(zv)),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(re,"id","overview"),g(re,"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(re,"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(pr,"href","/docs/transformers/main/en/model_doc/rembert#transformers.RemBertModel"),g(ps,"href","https://huggingface.co/google/rembert"),g(ps,"rel","nofollow"),g(mr,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),g(hr,"href","/docs/transformers/main/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(ro,"class","relative group"),g(fs,"href","https://github.com/google/sentencepiece"),g(fs,"rel","nofollow"),g(ur,"href","/docs/transformers/main/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(_r,"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(br,"href","/docs/transformers/main/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(kr,"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(wr,"href","/docs/transformers/main/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(vr,"href","/docs/transformers/main/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(Mr,"href","/docs/transformers/main/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(an,"id","transformers.RemBertForSequenceClassification"),g(an,"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(an,"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($r,"href","/docs/transformers/main/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(vt,"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(ta,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(ta,"rel","nofollow"),g(Rr,"href","/docs/transformers/main/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(wo,"class","relative group"),g(ra,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(ra,"rel","nofollow"),g(Br,"href","/docs/transformers/main/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(pa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),g(pa,"rel","nofollow"),g(Fr,"href","/docs/transformers/main/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(Er,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(_a,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(_a,"rel","nofollow"),g(Cr,"href","/docs/transformers/main/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(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(vn,"id","transformers.TFRemBertForMaskedLM"),g(vn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),g(vn,"href","#transformers.TFRemBertForMaskedLM"),g(Eo,"class","relative group"),g(jr,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(Ma,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Ma,"rel","nofollow"),g(Jr,"href","/docs/transformers/main/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(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(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(zr,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(ja,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(ja,"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(Ur,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(Na,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Na,"rel","nofollow"),g(Ir,"href","/docs/transformers/main/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(xr,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(Xa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Xa,"rel","nofollow"),g(Zr,"href","/docs/transformers/main/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(qr,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(Ya,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(Ya,"rel","nofollow"),g(Wr,"href","/docs/transformers/main/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(Nr,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),g(sr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),g(sr,"rel","nofollow"),g(Ar,"href","/docs/transformers/main/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,re),e(re,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,we,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,ae),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,ve,T),_(i,pe,T),M(K,pe,null),e(pe,Oe),e(pe,so),e(so,bp),e(so,pr),e(pr,yp),e(so,Tp),e(so,ps),e(ps,kp),e(so,wp),e(pe,vp),e(pe,ao),e(ao,Mp),e(ao,mr),e(mr,$p),e(ao,Rp),e(ao,hr),e(hr,Bp),e(ao,Fp),e(pe,Ep),M(Go,pe,null),_(i,Vd,T),_(i,ro,T),e(ro,Vo),e(Vo,ci),M(ms,ci,null),e(ro,Cp),e(ro,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,ur),e(ur,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,fr),e(fr,Vp),e(fr,hi),e(hi,Lp),e(bs,Xp),e(bs,gr),e(gr,Dp),e(gr,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,am),e(io,_i),e(_i,rm),e(io,im),e(io,bi),e(bi,lm),e(io,dm),e(tt,cm),e(tt,_r),M(ws,_r,null),_(i,Xd,T),_(i,lo,T),e(lo,Do),e(Do,yi),M(vs,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,br),e(br,ym),e(Lt,Tm),e(nt,km),e(nt,Qt),M(Rs,Qt,null),e(Qt,wm),e(Qt,wi),e(wi,vm),e(Qt,Mm),e(Qt,Bs),e(Bs,yr),e(yr,$m),e(yr,vi),e(vi,Rm),e(Bs,Bm),e(Bs,Tr),e(Tr,Fm),e(Tr,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,kr),M(js,kr,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,ah),e(st,zi),e(zi,rh),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,wr),e(wr,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,wh),_(i,Hd,T),_(i,Xt,T),M(Ns,Xt,null),e(Xt,vh),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,vr),e(vr,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,Mr),e(Mr,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,an),e(an,Li),M(Ds,Li,null),e(bo,tu),e(bo,Xi),e(Xi,ou),_(i,tc,T),_(i,vt,T),M(Ps,vt,null),e(vt,nu),e(vt,Di),e(Di,su),e(vt,au),e(vt,Os),e(Os,ru),e(Os,Qs),e(Qs,iu),e(Os,lu),e(vt,du),e(vt,ft),M(Hs,ft,null),e(ft,cu),e(ft,yo),e(yo,pu),e(yo,$r),e($r,mu),e(yo,hu),e(yo,Pi),e(Pi,uu),e(yo,fu),e(ft,gu),M(rn,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,wu),e(Mt,vu),e(Mt,ea),e(ea,Mu),e(ea,ta),e(ta,$u),e(ea,Ru),e(Mt,Bu),e(Mt,Jt),M(oa,Jt,null),e(Jt,Fu),e(Jt,ko),e(ko,Eu),e(ko,Rr),e(Rr,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,wo,T),e(wo,hn),e(hn,Ki),M(na,Ki,null),e(wo,xu),e(wo,el),e(el,Zu),_(i,ac,T),_(i,$t,T),M(sa,$t,null),e($t,qu),e($t,tl),e(tl,Wu),e($t,Nu),e($t,aa),e(aa,Au),e(aa,ra),e(ra,Su),e(aa,Gu),e($t,Vu),e($t,zt),M(ia,zt,null),e(zt,Lu),e(zt,vo),e(vo,Xu),e(vo,Br),e(Br,Du),e(vo,Pu),e(vo,ol),e(ol,Ou),e(vo,Qu),e(zt,Hu),M(un,zt,null),e(zt,Yu),M(fn,zt,null),_(i,rc,T),_(i,Mo,T),e(Mo,gn),e(gn,nl),M(la,nl,null),e(Mo,Ku),e(Mo,sl),e(sl,ef),_(i,ic,T),_(i,Rt,T),M(da,Rt,null),e(Rt,tf),e(Rt,$o),e($o,of),e($o,al),e(al,nf),e($o,sf),e($o,rl),e(rl,af),e($o,rf),e(Rt,lf),e(Rt,ca),e(ca,df),e(ca,pa),e(pa,cf),e(ca,pf),e(Rt,mf),e(Rt,Ut),M(ma,Ut,null),e(Ut,hf),e(Ut,Ro),e(Ro,uf),e(Ro,Fr),e(Fr,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(ha,ll,null),e(Bo,kf),e(Bo,dl),e(dl,wf),_(i,dc,T),_(i,at,T),M(ua,at,null),e(at,vf),e(at,cl),e(cl,Mf),e(at,$f),e(at,fa),e(fa,Rf),e(fa,Er),e(Er,Bf),e(fa,Ff),e(at,Ef),e(at,ga),e(ga,Cf),e(ga,_a),e(_a,jf),e(ga,Jf),e(at,zf),M(Tn,at,null),e(at,Uf),e(at,It),M(ba,It,null),e(It,If),e(It,Fo),e(Fo,xf),e(Fo,Cr),e(Cr,Zf),e(Fo,qf),e(Fo,pl),e(pl,Wf),e(Fo,Nf),e(It,Af),M(kn,It,null),e(It,Sf),M(wn,It,null),_(i,cc,T),_(i,Eo,T),e(Eo,vn),e(vn,ml),M(ya,ml,null),e(Eo,Gf),e(Eo,hl),e(hl,Vf),_(i,pc,T),_(i,rt,T),M(Ta,rt,null),e(rt,Lf),e(rt,ka),e(ka,Xf),e(ka,ul),e(ul,Df),e(ka,Pf),e(rt,Of),e(rt,wa),e(wa,Qf),e(wa,jr),e(jr,Hf),e(wa,Yf),e(rt,Kf),e(rt,va),e(va,eg),e(va,Ma),e(Ma,tg),e(va,og),e(rt,ng),M(Mn,rt,null),e(rt,sg),e(rt,gt),M($a,gt,null),e(gt,ag),e(gt,Co),e(Co,rg),e(Co,Jr),e(Jr,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(Ra,gl,null),e(jo,ug),e(jo,_l),e(_l,fg),_(i,hc,T),_(i,it,T),M(Ba,it,null),e(it,gg),e(it,Fa),e(Fa,_g),e(Fa,bl),e(bl,bg),e(Fa,yg),e(it,Tg),e(it,Ea),e(Ea,kg),e(Ea,zr),e(zr,wg),e(Ea,vg),e(it,Mg),e(it,Ca),e(Ca,$g),e(Ca,ja),e(ja,Rg),e(Ca,Bg),e(it,Fg),M(En,it,null),e(it,Eg),e(it,_t),M(Ja,_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,wl),e(wl,qg),e(ot,Wg),e(ot,vl),e(vl,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,za),e(za,Ua),e(Ua,Dg),e(Ua,Rl),e(Rl,Pg),e(Ua,Og),e(za,Qg),e(za,Ia),e(Ia,Hg),e(Ia,Bl),e(Bl,Yg),e(Ia,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,a_),e(Y,Cl),e(Cl,r_),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,w_),e(Y,v_),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(xa,Pl,null),e(Jo,G_),e(Jo,Ol),e(Ol,V_),_(i,fc,T),_(i,lt,T),M(Za,lt,null),e(lt,L_),e(lt,Ql),e(Ql,X_),e(lt,D_),e(lt,qa),e(qa,P_),e(qa,Ur),e(Ur,O_),e(qa,Q_),e(lt,H_),e(lt,Wa),e(Wa,Y_),e(Wa,Na),e(Na,K_),e(Wa,eb),e(lt,tb),M(Jn,lt,null),e(lt,ob),e(lt,bt),M(Aa,bt,null),e(bt,nb),e(bt,zo),e(zo,sb),e(zo,Ir),e(Ir,ab),e(zo,rb),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(Sa,Yl,null),e(Uo,mb),e(Uo,Kl),e(Kl,hb),_(i,_c,T),_(i,dt,T),M(Ga,dt,null),e(dt,ub),e(dt,ed),e(ed,fb),e(dt,gb),e(dt,Va),e(Va,_b),e(Va,xr),e(xr,bb),e(Va,yb),e(dt,Tb),e(dt,La),e(La,kb),e(La,Xa),e(Xa,wb),e(La,vb),e(dt,Mb),M(Zn,dt,null),e(dt,$b),e(dt,xt),M(Da,xt,null),e(xt,Rb),e(xt,Io),e(Io,Bb),e(Io,Zr),e(Zr,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(Pa,od,null),e(xo,Ub),e(xo,nd),e(nd,Ib),_(i,yc,T),_(i,ct,T),M(Oa,ct,null),e(ct,xb),e(ct,sd),e(sd,Zb),e(ct,qb),e(ct,Qa),e(Qa,Wb),e(Qa,qr),e(qr,Nb),e(Qa,Ab),e(ct,Sb),e(ct,Ha),e(Ha,Gb),e(Ha,Ya),e(Ya,Vb),e(Ha,Lb),e(ct,Xb),M(An,ct,null),e(ct,Db),e(ct,yt),M(Ka,yt,null),e(yt,Pb),e(yt,Zo),e(Zo,Ob),e(Zo,Wr),e(Wr,Qb),e(Zo,Hb),e(Zo,ad),e(ad,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,rd),M(er,rd,null),e(qo,ny),e(qo,id),e(id,sy),_(i,kc,T),_(i,pt,T),M(tr,pt,null),e(pt,ay),e(pt,Wo),e(Wo,ry),e(Wo,ld),e(ld,iy),e(Wo,ly),e(Wo,dd),e(dd,dy),e(Wo,cy),e(pt,py),e(pt,or),e(or,my),e(or,Nr),e(Nr,hy),e(or,uy),e(pt,fy),e(pt,nr),e(nr,gy),e(nr,sr),e(sr,_y),e(nr,by),e(pt,yy),M(Xn,pt,null),e(pt,Ty),e(pt,Tt),M(ar,Tt,null),e(Tt,ky),e(Tt,No),e(No,wy),e(No,Ar),e(Ar,vy),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),wc=!0},p(i,[T]){const rr={};T&2&&(rr.$$scope={dirty:T,ctx:i}),Go.$set(rr);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 ir={};T&2&&(ir.$$scope={dirty:T,ctx:i}),Yo.$set(ir);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 lr={};T&2&&(lr.$$scope={dirty:T,ctx:i}),sn.$set(lr);const _d={};T&2&&(_d.$$scope={dirty:T,ctx:i}),rn.$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 wd={};T&2&&(wd.$$scope={dirty:T,ctx:i}),un.$set(wd);const dr={};T&2&&(dr.$$scope={dirty:T,ctx:i}),fn.$set(dr);const vd={};T&2&&(vd.$$scope={dirty:T,ctx:i}),_n.$set(vd);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}),wn.$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 cr={};T&2&&(cr.$$scope={dirty:T,ctx:i}),qn.$set(cr);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){wc||($(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),$(ws.$$.fragment,i),$(vs.$$.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),$(rn.$$.fragment,i),$(ln.$$.fragment,i),$(dn.$$.fragment,i),$(Ys.$$.fragment,i),$(Ks.$$.fragment,i),$(oa.$$.fragment,i),$(pn.$$.fragment,i),$(mn.$$.fragment,i),$(na.$$.fragment,i),$(sa.$$.fragment,i),$(ia.$$.fragment,i),$(un.$$.fragment,i),$(fn.$$.fragment,i),$(la.$$.fragment,i),$(da.$$.fragment,i),$(ma.$$.fragment,i),$(_n.$$.fragment,i),$(bn.$$.fragment,i),$(ha.$$.fragment,i),$(ua.$$.fragment,i),$(Tn.$$.fragment,i),$(ba.$$.fragment,i),$(kn.$$.fragment,i),$(wn.$$.fragment,i),$(ya.$$.fragment,i),$(Ta.$$.fragment,i),$(Mn.$$.fragment,i),$($a.$$.fragment,i),$($n.$$.fragment,i),$(Rn.$$.fragment,i),$(Bn.$$.fragment,i),$(Ra.$$.fragment,i),$(Ba.$$.fragment,i),$(En.$$.fragment,i),$(Ja.$$.fragment,i),$(Cn.$$.fragment,i),$(xa.$$.fragment,i),$(Za.$$.fragment,i),$(Jn.$$.fragment,i),$(Aa.$$.fragment,i),$(zn.$$.fragment,i),$(Un.$$.fragment,i),$(In.$$.fragment,i),$(Sa.$$.fragment,i),$(Ga.$$.fragment,i),$(Zn.$$.fragment,i),$(Da.$$.fragment,i),$(qn.$$.fragment,i),$(Wn.$$.fragment,i),$(Pa.$$.fragment,i),$(Oa.$$.fragment,i),$(An.$$.fragment,i),$(Ka.$$.fragment,i),$(Sn.$$.fragment,i),$(Gn.$$.fragment,i),$(Vn.$$.fragment,i),$(er.$$.fragment,i),$(tr.$$.fragment,i),$(Xn.$$.fragment,i),$(ar.$$.fragment,i),$(Dn.$$.fragment,i),$(Pn.$$.fragment,i),$(On.$$.fragment,i),wc=!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(ws.$$.fragment,i),R(vs.$$.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(rn.$$.fragment,i),R(ln.$$.fragment,i),R(dn.$$.fragment,i),R(Ys.$$.fragment,i),R(Ks.$$.fragment,i),R(oa.$$.fragment,i),R(pn.$$.fragment,i),R(mn.$$.fragment,i),R(na.$$.fragment,i),R(sa.$$.fragment,i),R(ia.$$.fragment,i),R(un.$$.fragment,i),R(fn.$$.fragment,i),R(la.$$.fragment,i),R(da.$$.fragment,i),R(ma.$$.fragment,i),R(_n.$$.fragment,i),R(bn.$$.fragment,i),R(ha.$$.fragment,i),R(ua.$$.fragment,i),R(Tn.$$.fragment,i),R(ba.$$.fragment,i),R(kn.$$.fragment,i),R(wn.$$.fragment,i),R(ya.$$.fragment,i),R(Ta.$$.fragment,i),R(Mn.$$.fragment,i),R($a.$$.fragment,i),R($n.$$.fragment,i),R(Rn.$$.fragment,i),R(Bn.$$.fragment,i),R(Ra.$$.fragment,i),R(Ba.$$.fragment,i),R(En.$$.fragment,i),R(Ja.$$.fragment,i),R(Cn.$$.fragment,i),R(xa.$$.fragment,i),R(Za.$$.fragment,i),R(Jn.$$.fragment,i),R(Aa.$$.fragment,i),R(zn.$$.fragment,i),R(Un.$$.fragment,i),R(In.$$.fragment,i),R(Sa.$$.fragment,i),R(Ga.$$.fragment,i),R(Zn.$$.fragment,i),R(Da.$$.fragment,i),R(qn.$$.fragment,i),R(Wn.$$.fragment,i),R(Pa.$$.fragment,i),R(Oa.$$.fragment,i),R(An.$$.fragment,i),R(Ka.$$.fragment,i),R(Sn.$$.fragment,i),R(Gn.$$.fragment,i),R(Vn.$$.fragment,i),R(er.$$.fragment,i),R(tr.$$.fragment,i),R(Xn.$$.fragment,i),R(ar.$$.fragment,i),R(Dn.$$.fragment,i),R(Pn.$$.fragment,i),R(On.$$.fragment,i),wc=!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(we),i&&t(Z),i&&t(Ve),i&&t(q),B(Ze),i&&t(ve),i&&t(pe),B(K),B(Go),i&&t(Vd),i&&t(ro),B(ms),i&&t(Ld),i&&t(tt),B(hs),B(_s),B(ys),B(ks),B(Xo),B(ws),i&&t(Xd),i&&t(lo),B(vs),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(vt),B(Ps),B(Hs),B(rn),B(ln),B(dn),i&&t(oc),i&&t(To),B(Ys),i&&t(nc),i&&t(Mt),B(Ks),B(oa),B(pn),B(mn),i&&t(sc),i&&t(wo),B(na),i&&t(ac),i&&t($t),B(sa),B(ia),B(un),B(fn),i&&t(rc),i&&t(Mo),B(la),i&&t(ic),i&&t(Rt),B(da),B(ma),B(_n),B(bn),i&&t(lc),i&&t(Bo),B(ha),i&&t(dc),i&&t(at),B(ua),B(Tn),B(ba),B(kn),B(wn),i&&t(cc),i&&t(Eo),B(ya),i&&t(pc),i&&t(rt),B(Ta),B(Mn),B($a),B($n),B(Rn),B(Bn),i&&t(mc),i&&t(jo),B(Ra),i&&t(hc),i&&t(it),B(Ba),B(En),B(Ja),B(Cn),i&&t(uc),i&&t(Jo),B(xa),i&&t(fc),i&&t(lt),B(Za),B(Jn),B(Aa),B(zn),B(Un),B(In),i&&t(gc),i&&t(Uo),B(Sa),i&&t(_c),i&&t(dt),B(Ga),B(Zn),B(Da),B(qn),B(Wn),i&&t(bc),i&&t(xo),B(Pa),i&&t(yc),i&&t(ct),B(Oa),B(An),B(Ka),B(Sn),B(Gn),B(Vn),i&&t(Tc),i&&t(qo),B(er),i&&t(kc),i&&t(pt),B(tr),B(Xn),B(ar),B(Dn),B(Pn),B(On)}}}const zv={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 Uv(C){return Gw(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Av extends Ww{constructor(d){super();Nw(this,d,Uv,Jv,Aw,{})}}export{Av as default,zv as metadata};
