import{S as z$,i as U$,s as W$,e as r,k as p,w as T,t as o,M as I$,c as a,d as t,m,a as s,x as M,h as n,b as u,G as e,g,y as k,q as w,o as F,B as N,v as Z$,L as We}from"../../chunks/vendor-hf-doc-builder.js";import{T as ze}from"../../chunks/Tip-hf-doc-builder.js";import{D as B}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ie}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as qe}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ue}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function A$($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFJvYmVydGFQcmVMYXllck5vcm1Db25maWclMkMlMjBSb2JlcnRhUHJlTGF5ZXJOb3JtTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwUm9CRVJUYS1QcmVMYXllck5vcm0lMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMFJvYmVydGFQcmVMYXllck5vcm1Db25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwUm9iZXJ0YVByZUxheWVyTm9ybU1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> RobertaPreLayerNormConfig, RobertaPreLayerNormModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a RoBERTa-PreLayerNorm configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = RobertaPreLayerNormConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaPreLayerNormModel(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=r("p"),y=o("Examples:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Examples:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function B$($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function q$($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSb2JlcnRhUHJlTGF5ZXJOb3JtTW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmFuZHJlYXNtYWRzZW4lMkZlZmZpY2llbnRfbWxtX20wLjQwJTIyKSUwQW1vZGVsJTIwJTNEJTIwUm9iZXJ0YVByZUxheWVyTm9ybU1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJhbmRyZWFzbWFkc2VuJTJGZWZmaWNpZW50X21sbV9tMC40MCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RobertaPreLayerNormModel
<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;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaPreLayerNormModel.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&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=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function V$($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function G$($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSb2JlcnRhUHJlTGF5ZXJOb3JtRm9yQ2F1c2FsTE0lMkMlMjBBdXRvQ29uZmlnJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJhbmRyZWFzbWFkc2VuJTJGZWZmaWNpZW50X21sbV9tMC40MCUyMiklMEFjb25maWclMjAlM0QlMjBBdXRvQ29uZmlnLmZyb21fcHJldHJhaW5lZCglMjJhbmRyZWFzbWFkc2VuJTJGZWZmaWNpZW50X21sbV9tMC40MCUyMiklMEFjb25maWcuaXNfZGVjb2RlciUyMCUzRCUyMFRydWUlMEFtb2RlbCUyMCUzRCUyMFJvYmVydGFQcmVMYXllck5vcm1Gb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIlMkMlMjBjb25maWclM0Rjb25maWcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFwcmVkaWN0aW9uX2xvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RobertaPreLayerNormForCausalLM, AutoConfig
<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;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config = AutoConfig.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&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 = RobertaPreLayerNormForCausalLM.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&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=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function X$($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function S$($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSb2JlcnRhUHJlTGF5ZXJOb3JtRm9yTWFza2VkTE0lMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmFuZHJlYXNtYWRzZW4lMkZlZmZpY2llbnRfbWxtX20wLjQwJTIyKSUwQW1vZGVsJTIwJTNEJTIwUm9iZXJ0YVByZUxheWVyTm9ybUZvck1hc2tlZExNLmZyb21fcHJldHJhaW5lZCglMjJhbmRyZWFzbWFkc2VuJTJGZWZmaWNpZW50X21sbV9tMC40MCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjAlM0NtYXNrJTNFLiUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjByZXRyaWV2ZSUyMGluZGV4JTIwb2YlMjAlM0NtYXNrJTNFJTBBbWFza190b2tlbl9pbmRleCUyMCUzRCUyMChpbnB1dHMuaW5wdXRfaWRzJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQpJTVCMCU1RC5ub256ZXJvKGFzX3R1cGxlJTNEVHJ1ZSklNUIwJTVEJTBBJTBBcHJlZGljdGVkX3Rva2VuX2lkJTIwJTNEJTIwbG9naXRzJTVCMCUyQyUyMG1hc2tfdG9rZW5faW5kZXglNUQuYXJnbWF4KGF4aXMlM0QtMSklMEF0b2tlbml6ZXIuZGVjb2RlKHByZWRpY3RlZF90b2tlbl9pZCklMEElMEFsYWJlbHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjBQYXJpcy4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSU1QiUyMmlucHV0X2lkcyUyMiU1RCUwQSUyMyUyMG1hc2slMjBsYWJlbHMlMjBvZiUyMG5vbi0lM0NtYXNrJTNFJTIwdG9rZW5zJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2gud2hlcmUoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkJTJDJTIwbGFiZWxzJTJDJTIwLTEwMCklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpJTBBcm91bmQob3V0cHV0cy5sb3NzLml0ZW0oKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RobertaPreLayerNormForMaskedLM
<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;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaPreLayerNormForMaskedLM.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is &lt;mask&gt;.&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 &lt;mask&gt;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>].nonzero(as_tuple=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(outputs.loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.69</span>`}}),{c(){d=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function Q$($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function H$($){let d,y,h,f,_;return f=new Ie({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFJvYmVydGFQcmVMYXllck5vcm1Gb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBbW9kZWwlMjAlM0QlMjBSb2JlcnRhUHJlTGF5ZXJOb3JtRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwbG9naXRzLmFyZ21heCgpLml0ZW0oKSUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMFJvYmVydGFQcmVMYXllck5vcm1Gb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJhbmRyZWFzbWFkc2VuJTJGZWZmaWNpZW50X21sbV9tMC40MCUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, RobertaPreLayerNormForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaPreLayerNormForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&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 = RobertaPreLayerNormForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&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=r("p"),y=o("Example of single-label classification:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example of single-label classification:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function O$($){let d,y,h,f,_;return f=new Ie({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFJvYmVydGFQcmVMYXllck5vcm1Gb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBbW9kZWwlMjAlM0QlMjBSb2JlcnRhUHJlTGF5ZXJOb3JtRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIlMkMlMjBwcm9ibGVtX3R5cGUlM0QlMjJtdWx0aV9sYWJlbF9jbGFzc2lmaWNhdGlvbiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWRzJTIwJTNEJTIwdG9yY2guYXJhbmdlKDAlMkMlMjBsb2dpdHMuc2hhcGUlNUItMSU1RCklNUJ0b3JjaC5zaWdtb2lkKGxvZ2l0cykuc3F1ZWV6ZShkaW0lM0QwKSUyMCUzRSUyMDAuNSU1RCUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMFJvYmVydGFQcmVMYXllck5vcm1Gb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJhbmRyZWFzbWFkc2VuJTJGZWZmaWNpZW50X21sbV9tMC40MCUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, RobertaPreLayerNormForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaPreLayerNormForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&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 = RobertaPreLayerNormForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&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=r("p"),y=o("Example of multi-label classification:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example of multi-label classification:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function D$($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function Y$($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSb2JlcnRhUHJlTGF5ZXJOb3JtRm9yTXVsdGlwbGVDaG9pY2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmFuZHJlYXNtYWRzZW4lMkZlZmZpY2llbnRfbWxtX20wLjQwJTIyKSUwQW1vZGVsJTIwJTNEJTIwUm9iZXJ0YVByZUxheWVyTm9ybUZvck11bHRpcGxlQ2hvaWNlLmZyb21fcHJldHJhaW5lZCglMjJhbmRyZWFzbWFkc2VuJTJGZWZmaWNpZW50X21sbV9tMC40MCUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJJbiUyMEl0YWx5JTJDJTIwcGl6emElMjBzZXJ2ZWQlMjBpbiUyMGZvcm1hbCUyMHNldHRpbmdzJTJDJTIwc3VjaCUyMGFzJTIwYXQlMjBhJTIwcmVzdGF1cmFudCUyQyUyMGlzJTIwcHJlc2VudGVkJTIwdW5zbGljZWQuJTIyJTBBY2hvaWNlMCUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdpdGglMjBhJTIwZm9yayUyMGFuZCUyMGElMjBrbmlmZS4lMjIlMEFjaG9pY2UxJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2hpbGUlMjBoZWxkJTIwaW4lMjB0aGUlMjBoYW5kLiUyMiUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvcigwKS51bnNxdWVlemUoMCklMjAlMjAlMjMlMjBjaG9pY2UwJTIwaXMlMjBjb3JyZWN0JTIwKGFjY29yZGluZyUyMHRvJTIwV2lraXBlZGlhJTIwJTNCKSklMkMlMjBiYXRjaCUyMHNpemUlMjAxJTBBJTBBZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIoJTVCcHJvbXB0JTJDJTIwcHJvbXB0JTVEJTJDJTIwJTVCY2hvaWNlMCUyQyUyMGNob2ljZTElNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTJDJTIwcGFkZGluZyUzRFRydWUpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqJTdCayUzQSUyMHYudW5zcXVlZXplKDApJTIwZm9yJTIwayUyQyUyMHYlMjBpbiUyMGVuY29kaW5nLml0ZW1zKCklN0QlMkMlMjBsYWJlbHMlM0RsYWJlbHMpJTIwJTIwJTIzJTIwYmF0Y2glMjBzaXplJTIwaXMlMjAxJTBBJTBBJTIzJTIwdGhlJTIwbGluZWFyJTIwY2xhc3NpZmllciUyMHN0aWxsJTIwbmVlZHMlMjB0byUyMGJlJTIwdHJhaW5lZCUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3MlMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RobertaPreLayerNormForMultipleChoice
<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;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaPreLayerNormForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&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=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function K$($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function eR($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSb2JlcnRhUHJlTGF5ZXJOb3JtRm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBbW9kZWwlMjAlM0QlMjBSb2JlcnRhUHJlTGF5ZXJOb3JtRm9yVG9rZW5DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUwQSUyMCUyMCUyMCUyMCUyMkh1Z2dpbmdGYWNlJTIwaXMlMjBhJTIwY29tcGFueSUyMGJhc2VkJTIwaW4lMjBQYXJpcyUyMGFuZCUyME5ldyUyMFlvcmslMjIlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RGYWxzZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMEEpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSklMEElMEElMjMlMjBOb3RlJTIwdGhhdCUyMHRva2VucyUyMGFyZSUyMGNsYXNzaWZpZWQlMjByYXRoZXIlMjB0aGVuJTIwaW5wdXQlMjB3b3JkcyUyMHdoaWNoJTIwbWVhbnMlMjB0aGF0JTBBJTIzJTIwdGhlcmUlMjBtaWdodCUyMGJlJTIwbW9yZSUyMHByZWRpY3RlZCUyMHRva2VuJTIwY2xhc3NlcyUyMHRoYW4lMjB3b3Jkcy4lMEElMjMlMjBNdWx0aXBsZSUyMHRva2VuJTIwY2xhc3NlcyUyMG1pZ2h0JTIwYWNjb3VudCUyMGZvciUyMHRoZSUyMHNhbWUlMjB3b3JkJTBBcHJlZGljdGVkX3Rva2Vuc19jbGFzc2VzJTIwJTNEJTIwJTVCbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCdC5pdGVtKCklNUQlMjBmb3IlMjB0JTIwaW4lMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTVCMCU1RCU1RCUwQSUwQWxhYmVscyUyMCUzRCUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlMEFsb3NzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpLmxvc3M=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RobertaPreLayerNormForTokenClassification
<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;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaPreLayerNormForTokenClassification.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&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=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function tR($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function oR($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSb2JlcnRhUHJlTGF5ZXJOb3JtRm9yUXVlc3Rpb25BbnN3ZXJpbmclMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmFuZHJlYXNtYWRzZW4lMkZlZmZpY2llbnRfbWxtX20wLjQwJTIyKSUwQW1vZGVsJTIwJTNEJTIwUm9iZXJ0YVByZUxheWVyTm9ybUZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJhbmRyZWFzbWFkc2VuJTJGZWZmaWNpZW50X21sbV9tMC40MCUyMiklMEElMEFxdWVzdGlvbiUyQyUyMHRleHQlMjAlM0QlMjAlMjJXaG8lMjB3YXMlMjBKaW0lMjBIZW5zb24lM0YlMjIlMkMlMjAlMjJKaW0lMjBIZW5zb24lMjB3YXMlMjBhJTIwbmljZSUyMHB1cHBldCUyMiUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihxdWVzdGlvbiUyQyUyMHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNEJTIwb3V0cHV0cy5zdGFydF9sb2dpdHMuYXJnbWF4KCklMEFhbnN3ZXJfZW5kX2luZGV4JTIwJTNEJTIwb3V0cHV0cy5lbmRfbG9naXRzLmFyZ21heCgpJTBBJTBBcHJlZGljdF9hbnN3ZXJfdG9rZW5zJTIwJTNEJTIwaW5wdXRzLmlucHV0X2lkcyU1QjAlMkMlMjBhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0ElMjBhbnN3ZXJfZW5kX2luZGV4JTIwJTJCJTIwMSU1RCUwQSUwQSUyMyUyMHRhcmdldCUyMGlzJTIwJTIybmljZSUyMHB1cHBldCUyMiUwQXRhcmdldF9zdGFydF9pbmRleCUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxNCU1RCklMEF0YXJnZXRfZW5kX2luZGV4JTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QjE1JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3M=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RobertaPreLayerNormForQuestionAnswering
<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;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = RobertaPreLayerNormForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&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=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function nR($){let d,y,h,f,_,i,c,P,ye,he,Z,ae,te,R,be,V,ve,ue,U,Te,se,S,Me,ce,Q,ke,le,H,we,fe,ee,L,x,ie,G,Fe,ge,q,Ne,_e,J,X,O,de,$e,D,pe,Re,A,me,Y,Pe,oe,C,je,z,Ee,Le;return{c(){d=r("p"),y=o("TensorFlow models and layers in "),h=r("code"),f=o("transformers"),_=o(" accept two formats as input:"),i=p(),c=r("ul"),P=r("li"),ye=o("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),Z=r("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),te=p(),R=r("p"),be=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 `),V=r("code"),ve=o("model.fit()"),ue=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),U=r("code"),Te=o("model.fit()"),se=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),S=r("code"),Me=o("fit()"),ce=o(" and "),Q=r("code"),ke=o("predict()"),le=o(`, such as when creating your own layers or models with
the Keras `),H=r("code"),we=o("Functional"),fe=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ee=p(),L=r("ul"),x=r("li"),ie=o("a single Tensor with "),G=r("code"),Fe=o("input_ids"),ge=o(" only and nothing else: "),q=r("code"),Ne=o("model(input_ids)"),_e=p(),J=r("li"),X=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=r("code"),de=o("model([input_ids, attention_mask])"),$e=o(" or "),D=r("code"),pe=o("model([input_ids, attention_mask, token_type_ids])"),Re=p(),A=r("li"),me=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=r("code"),Pe=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=p(),C=r("p"),je=o(`Note that when creating models and layers with
`),z=r("a"),Ee=o("subclassing"),Le=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(v){d=a(v,"P",{});var j=s(d);y=n(j,"TensorFlow models and layers in "),h=a(j,"CODE",{});var Ve=s(h);f=n(Ve,"transformers"),Ve.forEach(t),_=n(j," accept two formats as input:"),j.forEach(t),i=m(v),c=a(v,"UL",{});var re=s(c);P=a(re,"LI",{});var Je=s(P);ye=n(Je,"having all inputs as keyword arguments (like PyTorch models), or"),Je.forEach(t),he=m(re),Z=a(re,"LI",{});var Ge=s(Z);ae=n(Ge,"having all inputs as a list, tuple or dict in the first positional argument."),Ge.forEach(t),re.forEach(t),te=m(v),R=a(v,"P",{});var E=s(R);be=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 `),V=a(E,"CODE",{});var Xe=s(V);ve=n(Xe,"model.fit()"),Xe.forEach(t),ue=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),U=a(E,"CODE",{});var Se=s(U);Te=n(Se,"model.fit()"),Se.forEach(t),se=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),S=a(E,"CODE",{});var Ze=s(S);Me=n(Ze,"fit()"),Ze.forEach(t),ce=n(E," and "),Q=a(E,"CODE",{});var Qe=s(Q);ke=n(Qe,"predict()"),Qe.forEach(t),le=n(E,`, such as when creating your own layers or models with
the Keras `),H=a(E,"CODE",{});var He=s(H);we=n(He,"Functional"),He.forEach(t),fe=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),ee=m(v),L=a(v,"UL",{});var W=s(L);x=a(W,"LI",{});var I=s(x);ie=n(I,"a single Tensor with "),G=a(I,"CODE",{});var Oe=s(G);Fe=n(Oe,"input_ids"),Oe.forEach(t),ge=n(I," only and nothing else: "),q=a(I,"CODE",{});var Ae=s(q);Ne=n(Ae,"model(input_ids)"),Ae.forEach(t),I.forEach(t),_e=m(W),J=a(W,"LI",{});var K=s(J);X=n(K,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=a(K,"CODE",{});var De=s(O);de=n(De,"model([input_ids, attention_mask])"),De.forEach(t),$e=n(K," or "),D=a(K,"CODE",{});var Be=s(D);pe=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),K.forEach(t),Re=m(W),A=a(W,"LI",{});var xe=s(A);me=n(xe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a(xe,"CODE",{});var Ye=s(Y);Pe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(t),xe.forEach(t),W.forEach(t),oe=m(v),C=a(v,"P",{});var ne=s(C);je=n(ne,`Note that when creating models and layers with
`),z=a(ne,"A",{href:!0,rel:!0});var Ce=s(z);Ee=n(Ce,"subclassing"),Ce.forEach(t),Le=n(ne,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ne.forEach(t),this.h()},h(){u(z,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(z,"rel","nofollow")},m(v,j){g(v,d,j),e(d,y),e(d,h),e(h,f),e(d,_),g(v,i,j),g(v,c,j),e(c,P),e(P,ye),e(c,he),e(c,Z),e(Z,ae),g(v,te,j),g(v,R,j),e(R,be),e(R,V),e(V,ve),e(R,ue),e(R,U),e(U,Te),e(R,se),e(R,S),e(S,Me),e(R,ce),e(R,Q),e(Q,ke),e(R,le),e(R,H),e(H,we),e(R,fe),g(v,ee,j),g(v,L,j),e(L,x),e(x,ie),e(x,G),e(G,Fe),e(x,ge),e(x,q),e(q,Ne),e(L,_e),e(L,J),e(J,X),e(J,O),e(O,de),e(J,$e),e(J,D),e(D,pe),e(L,Re),e(L,A),e(A,me),e(A,Y),e(Y,Pe),g(v,oe,j),g(v,C,j),e(C,je),e(C,z),e(z,Ee),e(C,Le)},d(v){v&&t(d),v&&t(i),v&&t(c),v&&t(te),v&&t(R),v&&t(ee),v&&t(L),v&&t(oe),v&&t(C)}}}function rR($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function aR($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvYmVydGFQcmVMYXllck5vcm1Nb2RlbCUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBbW9kZWwlMjAlM0QlMjBURlJvYmVydGFQcmVMYXllck5vcm1Nb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbChpbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRobertaPreLayerNormModel
<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;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRobertaPreLayerNormModel.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&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=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function sR($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function lR($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvYmVydGFQcmVMYXllck5vcm1Gb3JDYXVzYWxMTSUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBbW9kZWwlMjAlM0QlMjBURlJvYmVydGFQcmVMYXllck5vcm1Gb3JDYXVzYWxMTS5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbChpbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRobertaPreLayerNormForCausalLM
<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;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRobertaPreLayerNormForCausalLM.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&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=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function iR($){let d,y,h,f,_,i,c,P,ye,he,Z,ae,te,R,be,V,ve,ue,U,Te,se,S,Me,ce,Q,ke,le,H,we,fe,ee,L,x,ie,G,Fe,ge,q,Ne,_e,J,X,O,de,$e,D,pe,Re,A,me,Y,Pe,oe,C,je,z,Ee,Le;return{c(){d=r("p"),y=o("TensorFlow models and layers in "),h=r("code"),f=o("transformers"),_=o(" accept two formats as input:"),i=p(),c=r("ul"),P=r("li"),ye=o("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),Z=r("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),te=p(),R=r("p"),be=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 `),V=r("code"),ve=o("model.fit()"),ue=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),U=r("code"),Te=o("model.fit()"),se=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),S=r("code"),Me=o("fit()"),ce=o(" and "),Q=r("code"),ke=o("predict()"),le=o(`, such as when creating your own layers or models with
the Keras `),H=r("code"),we=o("Functional"),fe=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ee=p(),L=r("ul"),x=r("li"),ie=o("a single Tensor with "),G=r("code"),Fe=o("input_ids"),ge=o(" only and nothing else: "),q=r("code"),Ne=o("model(input_ids)"),_e=p(),J=r("li"),X=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=r("code"),de=o("model([input_ids, attention_mask])"),$e=o(" or "),D=r("code"),pe=o("model([input_ids, attention_mask, token_type_ids])"),Re=p(),A=r("li"),me=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=r("code"),Pe=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=p(),C=r("p"),je=o(`Note that when creating models and layers with
`),z=r("a"),Ee=o("subclassing"),Le=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(v){d=a(v,"P",{});var j=s(d);y=n(j,"TensorFlow models and layers in "),h=a(j,"CODE",{});var Ve=s(h);f=n(Ve,"transformers"),Ve.forEach(t),_=n(j," accept two formats as input:"),j.forEach(t),i=m(v),c=a(v,"UL",{});var re=s(c);P=a(re,"LI",{});var Je=s(P);ye=n(Je,"having all inputs as keyword arguments (like PyTorch models), or"),Je.forEach(t),he=m(re),Z=a(re,"LI",{});var Ge=s(Z);ae=n(Ge,"having all inputs as a list, tuple or dict in the first positional argument."),Ge.forEach(t),re.forEach(t),te=m(v),R=a(v,"P",{});var E=s(R);be=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 `),V=a(E,"CODE",{});var Xe=s(V);ve=n(Xe,"model.fit()"),Xe.forEach(t),ue=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),U=a(E,"CODE",{});var Se=s(U);Te=n(Se,"model.fit()"),Se.forEach(t),se=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),S=a(E,"CODE",{});var Ze=s(S);Me=n(Ze,"fit()"),Ze.forEach(t),ce=n(E," and "),Q=a(E,"CODE",{});var Qe=s(Q);ke=n(Qe,"predict()"),Qe.forEach(t),le=n(E,`, such as when creating your own layers or models with
the Keras `),H=a(E,"CODE",{});var He=s(H);we=n(He,"Functional"),He.forEach(t),fe=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),ee=m(v),L=a(v,"UL",{});var W=s(L);x=a(W,"LI",{});var I=s(x);ie=n(I,"a single Tensor with "),G=a(I,"CODE",{});var Oe=s(G);Fe=n(Oe,"input_ids"),Oe.forEach(t),ge=n(I," only and nothing else: "),q=a(I,"CODE",{});var Ae=s(q);Ne=n(Ae,"model(input_ids)"),Ae.forEach(t),I.forEach(t),_e=m(W),J=a(W,"LI",{});var K=s(J);X=n(K,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=a(K,"CODE",{});var De=s(O);de=n(De,"model([input_ids, attention_mask])"),De.forEach(t),$e=n(K," or "),D=a(K,"CODE",{});var Be=s(D);pe=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),K.forEach(t),Re=m(W),A=a(W,"LI",{});var xe=s(A);me=n(xe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a(xe,"CODE",{});var Ye=s(Y);Pe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(t),xe.forEach(t),W.forEach(t),oe=m(v),C=a(v,"P",{});var ne=s(C);je=n(ne,`Note that when creating models and layers with
`),z=a(ne,"A",{href:!0,rel:!0});var Ce=s(z);Ee=n(Ce,"subclassing"),Ce.forEach(t),Le=n(ne,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ne.forEach(t),this.h()},h(){u(z,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(z,"rel","nofollow")},m(v,j){g(v,d,j),e(d,y),e(d,h),e(h,f),e(d,_),g(v,i,j),g(v,c,j),e(c,P),e(P,ye),e(c,he),e(c,Z),e(Z,ae),g(v,te,j),g(v,R,j),e(R,be),e(R,V),e(V,ve),e(R,ue),e(R,U),e(U,Te),e(R,se),e(R,S),e(S,Me),e(R,ce),e(R,Q),e(Q,ke),e(R,le),e(R,H),e(H,we),e(R,fe),g(v,ee,j),g(v,L,j),e(L,x),e(x,ie),e(x,G),e(G,Fe),e(x,ge),e(x,q),e(q,Ne),e(L,_e),e(L,J),e(J,X),e(J,O),e(O,de),e(J,$e),e(J,D),e(D,pe),e(L,Re),e(L,A),e(A,me),e(A,Y),e(Y,Pe),g(v,oe,j),g(v,C,j),e(C,je),e(C,z),e(z,Ee),e(C,Le)},d(v){v&&t(d),v&&t(i),v&&t(c),v&&t(te),v&&t(R),v&&t(ee),v&&t(L),v&&t(oe),v&&t(C)}}}function dR($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function cR($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvYmVydGFQcmVMYXllck5vcm1Gb3JNYXNrZWRMTSUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBbW9kZWwlMjAlM0QlMjBURlJvYmVydGFQcmVMYXllck5vcm1Gb3JNYXNrZWRMTS5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwJTNDbWFzayUzRS4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjByZXRyaWV2ZSUyMGluZGV4JTIwb2YlMjAlM0NtYXNrJTNFJTBBbWFza190b2tlbl9pbmRleCUyMCUzRCUyMHRmLndoZXJlKChpbnB1dHMuaW5wdXRfaWRzJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQpJTVCMCU1RCklMEFzZWxlY3RlZF9sb2dpdHMlMjAlM0QlMjB0Zi5nYXRoZXJfbmQobG9naXRzJTVCMCU1RCUyQyUyMGluZGljZXMlM0RtYXNrX3Rva2VuX2luZGV4KSUwQSUwQXByZWRpY3RlZF90b2tlbl9pZCUyMCUzRCUyMHRmLm1hdGguYXJnbWF4KHNlbGVjdGVkX2xvZ2l0cyUyQyUyMGF4aXMlM0QtMSklMEF0b2tlbml6ZXIuZGVjb2RlKHByZWRpY3RlZF90b2tlbl9pZCk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRobertaPreLayerNormForMaskedLM
<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;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRobertaPreLayerNormForMaskedLM.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is &lt;mask&gt;.&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 &lt;mask&gt;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = tf.where((inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>selected_logits = tf.gather_nd(logits[<span class="hljs-number">0</span>], indices=mask_token_index)

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = tf.math.argmax(selected_logits, axis=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predicted_token_id)
<span class="hljs-string">&#x27; Paris&#x27;</span>`}}),{c(){d=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function pR($){let d,y;return d=new Ie({props:{code:"bGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwUGFyaXMuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMjMlMjBtYXNrJTIwbGFiZWxzJTIwb2YlMjBub24tJTNDbWFzayUzRSUyMHRva2VucyUwQWxhYmVscyUyMCUzRCUyMHRmLndoZXJlKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCUyQyUyMGxhYmVscyUyQyUyMC0xMDApJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKSUwQXJvdW5kKGZsb2F0KG91dHB1dHMubG9zcyklMkMlMjAyKQ==",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-&lt;mask&gt; tokens</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.where(inputs.input_ids == tokenizer.mask_token_id, labels, -<span class="hljs-number">100</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(outputs.loss), <span class="hljs-number">2</span>)
<span class="hljs-number">0.69</span>`}}),{c(){T(d.$$.fragment)},l(h){M(d.$$.fragment,h)},m(h,f){k(d,h,f),y=!0},p:We,i(h){y||(w(d.$$.fragment,h),y=!0)},o(h){F(d.$$.fragment,h),y=!1},d(h){N(d,h)}}}function mR($){let d,y,h,f,_,i,c,P,ye,he,Z,ae,te,R,be,V,ve,ue,U,Te,se,S,Me,ce,Q,ke,le,H,we,fe,ee,L,x,ie,G,Fe,ge,q,Ne,_e,J,X,O,de,$e,D,pe,Re,A,me,Y,Pe,oe,C,je,z,Ee,Le;return{c(){d=r("p"),y=o("TensorFlow models and layers in "),h=r("code"),f=o("transformers"),_=o(" accept two formats as input:"),i=p(),c=r("ul"),P=r("li"),ye=o("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),Z=r("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),te=p(),R=r("p"),be=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 `),V=r("code"),ve=o("model.fit()"),ue=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),U=r("code"),Te=o("model.fit()"),se=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),S=r("code"),Me=o("fit()"),ce=o(" and "),Q=r("code"),ke=o("predict()"),le=o(`, such as when creating your own layers or models with
the Keras `),H=r("code"),we=o("Functional"),fe=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ee=p(),L=r("ul"),x=r("li"),ie=o("a single Tensor with "),G=r("code"),Fe=o("input_ids"),ge=o(" only and nothing else: "),q=r("code"),Ne=o("model(input_ids)"),_e=p(),J=r("li"),X=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=r("code"),de=o("model([input_ids, attention_mask])"),$e=o(" or "),D=r("code"),pe=o("model([input_ids, attention_mask, token_type_ids])"),Re=p(),A=r("li"),me=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=r("code"),Pe=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=p(),C=r("p"),je=o(`Note that when creating models and layers with
`),z=r("a"),Ee=o("subclassing"),Le=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(v){d=a(v,"P",{});var j=s(d);y=n(j,"TensorFlow models and layers in "),h=a(j,"CODE",{});var Ve=s(h);f=n(Ve,"transformers"),Ve.forEach(t),_=n(j," accept two formats as input:"),j.forEach(t),i=m(v),c=a(v,"UL",{});var re=s(c);P=a(re,"LI",{});var Je=s(P);ye=n(Je,"having all inputs as keyword arguments (like PyTorch models), or"),Je.forEach(t),he=m(re),Z=a(re,"LI",{});var Ge=s(Z);ae=n(Ge,"having all inputs as a list, tuple or dict in the first positional argument."),Ge.forEach(t),re.forEach(t),te=m(v),R=a(v,"P",{});var E=s(R);be=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 `),V=a(E,"CODE",{});var Xe=s(V);ve=n(Xe,"model.fit()"),Xe.forEach(t),ue=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),U=a(E,"CODE",{});var Se=s(U);Te=n(Se,"model.fit()"),Se.forEach(t),se=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),S=a(E,"CODE",{});var Ze=s(S);Me=n(Ze,"fit()"),Ze.forEach(t),ce=n(E," and "),Q=a(E,"CODE",{});var Qe=s(Q);ke=n(Qe,"predict()"),Qe.forEach(t),le=n(E,`, such as when creating your own layers or models with
the Keras `),H=a(E,"CODE",{});var He=s(H);we=n(He,"Functional"),He.forEach(t),fe=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),ee=m(v),L=a(v,"UL",{});var W=s(L);x=a(W,"LI",{});var I=s(x);ie=n(I,"a single Tensor with "),G=a(I,"CODE",{});var Oe=s(G);Fe=n(Oe,"input_ids"),Oe.forEach(t),ge=n(I," only and nothing else: "),q=a(I,"CODE",{});var Ae=s(q);Ne=n(Ae,"model(input_ids)"),Ae.forEach(t),I.forEach(t),_e=m(W),J=a(W,"LI",{});var K=s(J);X=n(K,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=a(K,"CODE",{});var De=s(O);de=n(De,"model([input_ids, attention_mask])"),De.forEach(t),$e=n(K," or "),D=a(K,"CODE",{});var Be=s(D);pe=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),K.forEach(t),Re=m(W),A=a(W,"LI",{});var xe=s(A);me=n(xe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a(xe,"CODE",{});var Ye=s(Y);Pe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(t),xe.forEach(t),W.forEach(t),oe=m(v),C=a(v,"P",{});var ne=s(C);je=n(ne,`Note that when creating models and layers with
`),z=a(ne,"A",{href:!0,rel:!0});var Ce=s(z);Ee=n(Ce,"subclassing"),Ce.forEach(t),Le=n(ne,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ne.forEach(t),this.h()},h(){u(z,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(z,"rel","nofollow")},m(v,j){g(v,d,j),e(d,y),e(d,h),e(h,f),e(d,_),g(v,i,j),g(v,c,j),e(c,P),e(P,ye),e(c,he),e(c,Z),e(Z,ae),g(v,te,j),g(v,R,j),e(R,be),e(R,V),e(V,ve),e(R,ue),e(R,U),e(U,Te),e(R,se),e(R,S),e(S,Me),e(R,ce),e(R,Q),e(Q,ke),e(R,le),e(R,H),e(H,we),e(R,fe),g(v,ee,j),g(v,L,j),e(L,x),e(x,ie),e(x,G),e(G,Fe),e(x,ge),e(x,q),e(q,Ne),e(L,_e),e(L,J),e(J,X),e(J,O),e(O,de),e(J,$e),e(J,D),e(D,pe),e(L,Re),e(L,A),e(A,me),e(A,Y),e(Y,Pe),g(v,oe,j),g(v,C,j),e(C,je),e(C,z),e(z,Ee),e(C,Le)},d(v){v&&t(d),v&&t(i),v&&t(c),v&&t(te),v&&t(R),v&&t(ee),v&&t(L),v&&t(oe),v&&t(C)}}}function hR($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function uR($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvYmVydGFQcmVMYXllck5vcm1Gb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJhbmRyZWFzbWFkc2VuJTJGZWZmaWNpZW50X21sbV9tMC40MCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGUm9iZXJ0YVByZUxheWVyTm9ybUZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmFuZHJlYXNtYWRzZW4lMkZlZmZpY2llbnRfbWxtX20wLjQwJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEElMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwaW50KHRmLm1hdGguYXJnbWF4KGxvZ2l0cyUyQyUyMGF4aXMlM0QtMSklNUIwJTVEKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRobertaPreLayerNormForSequenceClassification
<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;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRobertaPreLayerNormForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&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=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function fR($){let d,y;return d=new Ie({props:{code:"JTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwVEZSb2JlcnRhUHJlTGF5ZXJOb3JtRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIlMkMlMjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyklMEElMEFsYWJlbHMlMjAlM0QlMjB0Zi5jb25zdGFudCgxKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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 = TFRobertaPreLayerNormForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&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(){T(d.$$.fragment)},l(h){M(d.$$.fragment,h)},m(h,f){k(d,h,f),y=!0},p:We,i(h){y||(w(d.$$.fragment,h),y=!0)},o(h){F(d.$$.fragment,h),y=!1},d(h){N(d,h)}}}function gR($){let d,y,h,f,_,i,c,P,ye,he,Z,ae,te,R,be,V,ve,ue,U,Te,se,S,Me,ce,Q,ke,le,H,we,fe,ee,L,x,ie,G,Fe,ge,q,Ne,_e,J,X,O,de,$e,D,pe,Re,A,me,Y,Pe,oe,C,je,z,Ee,Le;return{c(){d=r("p"),y=o("TensorFlow models and layers in "),h=r("code"),f=o("transformers"),_=o(" accept two formats as input:"),i=p(),c=r("ul"),P=r("li"),ye=o("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),Z=r("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),te=p(),R=r("p"),be=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 `),V=r("code"),ve=o("model.fit()"),ue=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),U=r("code"),Te=o("model.fit()"),se=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),S=r("code"),Me=o("fit()"),ce=o(" and "),Q=r("code"),ke=o("predict()"),le=o(`, such as when creating your own layers or models with
the Keras `),H=r("code"),we=o("Functional"),fe=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ee=p(),L=r("ul"),x=r("li"),ie=o("a single Tensor with "),G=r("code"),Fe=o("input_ids"),ge=o(" only and nothing else: "),q=r("code"),Ne=o("model(input_ids)"),_e=p(),J=r("li"),X=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=r("code"),de=o("model([input_ids, attention_mask])"),$e=o(" or "),D=r("code"),pe=o("model([input_ids, attention_mask, token_type_ids])"),Re=p(),A=r("li"),me=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=r("code"),Pe=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=p(),C=r("p"),je=o(`Note that when creating models and layers with
`),z=r("a"),Ee=o("subclassing"),Le=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(v){d=a(v,"P",{});var j=s(d);y=n(j,"TensorFlow models and layers in "),h=a(j,"CODE",{});var Ve=s(h);f=n(Ve,"transformers"),Ve.forEach(t),_=n(j," accept two formats as input:"),j.forEach(t),i=m(v),c=a(v,"UL",{});var re=s(c);P=a(re,"LI",{});var Je=s(P);ye=n(Je,"having all inputs as keyword arguments (like PyTorch models), or"),Je.forEach(t),he=m(re),Z=a(re,"LI",{});var Ge=s(Z);ae=n(Ge,"having all inputs as a list, tuple or dict in the first positional argument."),Ge.forEach(t),re.forEach(t),te=m(v),R=a(v,"P",{});var E=s(R);be=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 `),V=a(E,"CODE",{});var Xe=s(V);ve=n(Xe,"model.fit()"),Xe.forEach(t),ue=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),U=a(E,"CODE",{});var Se=s(U);Te=n(Se,"model.fit()"),Se.forEach(t),se=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),S=a(E,"CODE",{});var Ze=s(S);Me=n(Ze,"fit()"),Ze.forEach(t),ce=n(E," and "),Q=a(E,"CODE",{});var Qe=s(Q);ke=n(Qe,"predict()"),Qe.forEach(t),le=n(E,`, such as when creating your own layers or models with
the Keras `),H=a(E,"CODE",{});var He=s(H);we=n(He,"Functional"),He.forEach(t),fe=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),ee=m(v),L=a(v,"UL",{});var W=s(L);x=a(W,"LI",{});var I=s(x);ie=n(I,"a single Tensor with "),G=a(I,"CODE",{});var Oe=s(G);Fe=n(Oe,"input_ids"),Oe.forEach(t),ge=n(I," only and nothing else: "),q=a(I,"CODE",{});var Ae=s(q);Ne=n(Ae,"model(input_ids)"),Ae.forEach(t),I.forEach(t),_e=m(W),J=a(W,"LI",{});var K=s(J);X=n(K,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=a(K,"CODE",{});var De=s(O);de=n(De,"model([input_ids, attention_mask])"),De.forEach(t),$e=n(K," or "),D=a(K,"CODE",{});var Be=s(D);pe=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),K.forEach(t),Re=m(W),A=a(W,"LI",{});var xe=s(A);me=n(xe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a(xe,"CODE",{});var Ye=s(Y);Pe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(t),xe.forEach(t),W.forEach(t),oe=m(v),C=a(v,"P",{});var ne=s(C);je=n(ne,`Note that when creating models and layers with
`),z=a(ne,"A",{href:!0,rel:!0});var Ce=s(z);Ee=n(Ce,"subclassing"),Ce.forEach(t),Le=n(ne,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ne.forEach(t),this.h()},h(){u(z,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(z,"rel","nofollow")},m(v,j){g(v,d,j),e(d,y),e(d,h),e(h,f),e(d,_),g(v,i,j),g(v,c,j),e(c,P),e(P,ye),e(c,he),e(c,Z),e(Z,ae),g(v,te,j),g(v,R,j),e(R,be),e(R,V),e(V,ve),e(R,ue),e(R,U),e(U,Te),e(R,se),e(R,S),e(S,Me),e(R,ce),e(R,Q),e(Q,ke),e(R,le),e(R,H),e(H,we),e(R,fe),g(v,ee,j),g(v,L,j),e(L,x),e(x,ie),e(x,G),e(G,Fe),e(x,ge),e(x,q),e(q,Ne),e(L,_e),e(L,J),e(J,X),e(J,O),e(O,de),e(J,$e),e(J,D),e(D,pe),e(L,Re),e(L,A),e(A,me),e(A,Y),e(Y,Pe),g(v,oe,j),g(v,C,j),e(C,je),e(C,z),e(z,Ee),e(C,Le)},d(v){v&&t(d),v&&t(i),v&&t(c),v&&t(te),v&&t(R),v&&t(ee),v&&t(L),v&&t(oe),v&&t(C)}}}function _R($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function yR($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvYmVydGFQcmVMYXllck5vcm1Gb3JNdWx0aXBsZUNob2ljZSUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBbW9kZWwlMjAlM0QlMjBURlJvYmVydGFQcmVMYXllck5vcm1Gb3JNdWx0aXBsZUNob2ljZS5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIySW4lMjBJdGFseSUyQyUyMHBpenphJTIwc2VydmVkJTIwaW4lMjBmb3JtYWwlMjBzZXR0aW5ncyUyQyUyMHN1Y2glMjBhcyUyMGF0JTIwYSUyMHJlc3RhdXJhbnQlMkMlMjBpcyUyMHByZXNlbnRlZCUyMHVuc2xpY2VkLiUyMiUwQWNob2ljZTAlMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aXRoJTIwYSUyMGZvcmslMjBhbmQlMjBhJTIwa25pZmUuJTIyJTBBY2hvaWNlMSUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdoaWxlJTIwaGVsZCUyMGluJTIwdGhlJTIwaGFuZC4lMjIlMEElMEFlbmNvZGluZyUyMCUzRCUyMHRva2VuaXplciglNUJwcm9tcHQlMkMlMjBwcm9tcHQlNUQlMkMlMjAlNUJjaG9pY2UwJTJDJTIwY2hvaWNlMSU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIlMkMlMjBwYWRkaW5nJTNEVHJ1ZSklMEFpbnB1dHMlMjAlM0QlMjAlN0JrJTNBJTIwdGYuZXhwYW5kX2RpbXModiUyQyUyMDApJTIwZm9yJTIwayUyQyUyMHYlMjBpbiUyMGVuY29kaW5nLml0ZW1zKCklN0QlMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUyMCUyMCUyMyUyMGJhdGNoJTIwc2l6ZSUyMGlzJTIwMSUwQSUwQSUyMyUyMHRoZSUyMGxpbmVhciUyMGNsYXNzaWZpZXIlMjBzdGlsbCUyMG5lZWRzJTIwdG8lMjBiZSUyMHRyYWluZWQlMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRobertaPreLayerNormForMultipleChoice
<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;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRobertaPreLayerNormForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&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=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function bR($){let d,y,h,f,_,i,c,P,ye,he,Z,ae,te,R,be,V,ve,ue,U,Te,se,S,Me,ce,Q,ke,le,H,we,fe,ee,L,x,ie,G,Fe,ge,q,Ne,_e,J,X,O,de,$e,D,pe,Re,A,me,Y,Pe,oe,C,je,z,Ee,Le;return{c(){d=r("p"),y=o("TensorFlow models and layers in "),h=r("code"),f=o("transformers"),_=o(" accept two formats as input:"),i=p(),c=r("ul"),P=r("li"),ye=o("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),Z=r("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),te=p(),R=r("p"),be=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 `),V=r("code"),ve=o("model.fit()"),ue=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),U=r("code"),Te=o("model.fit()"),se=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),S=r("code"),Me=o("fit()"),ce=o(" and "),Q=r("code"),ke=o("predict()"),le=o(`, such as when creating your own layers or models with
the Keras `),H=r("code"),we=o("Functional"),fe=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ee=p(),L=r("ul"),x=r("li"),ie=o("a single Tensor with "),G=r("code"),Fe=o("input_ids"),ge=o(" only and nothing else: "),q=r("code"),Ne=o("model(input_ids)"),_e=p(),J=r("li"),X=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=r("code"),de=o("model([input_ids, attention_mask])"),$e=o(" or "),D=r("code"),pe=o("model([input_ids, attention_mask, token_type_ids])"),Re=p(),A=r("li"),me=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=r("code"),Pe=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=p(),C=r("p"),je=o(`Note that when creating models and layers with
`),z=r("a"),Ee=o("subclassing"),Le=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(v){d=a(v,"P",{});var j=s(d);y=n(j,"TensorFlow models and layers in "),h=a(j,"CODE",{});var Ve=s(h);f=n(Ve,"transformers"),Ve.forEach(t),_=n(j," accept two formats as input:"),j.forEach(t),i=m(v),c=a(v,"UL",{});var re=s(c);P=a(re,"LI",{});var Je=s(P);ye=n(Je,"having all inputs as keyword arguments (like PyTorch models), or"),Je.forEach(t),he=m(re),Z=a(re,"LI",{});var Ge=s(Z);ae=n(Ge,"having all inputs as a list, tuple or dict in the first positional argument."),Ge.forEach(t),re.forEach(t),te=m(v),R=a(v,"P",{});var E=s(R);be=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 `),V=a(E,"CODE",{});var Xe=s(V);ve=n(Xe,"model.fit()"),Xe.forEach(t),ue=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),U=a(E,"CODE",{});var Se=s(U);Te=n(Se,"model.fit()"),Se.forEach(t),se=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),S=a(E,"CODE",{});var Ze=s(S);Me=n(Ze,"fit()"),Ze.forEach(t),ce=n(E," and "),Q=a(E,"CODE",{});var Qe=s(Q);ke=n(Qe,"predict()"),Qe.forEach(t),le=n(E,`, such as when creating your own layers or models with
the Keras `),H=a(E,"CODE",{});var He=s(H);we=n(He,"Functional"),He.forEach(t),fe=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),ee=m(v),L=a(v,"UL",{});var W=s(L);x=a(W,"LI",{});var I=s(x);ie=n(I,"a single Tensor with "),G=a(I,"CODE",{});var Oe=s(G);Fe=n(Oe,"input_ids"),Oe.forEach(t),ge=n(I," only and nothing else: "),q=a(I,"CODE",{});var Ae=s(q);Ne=n(Ae,"model(input_ids)"),Ae.forEach(t),I.forEach(t),_e=m(W),J=a(W,"LI",{});var K=s(J);X=n(K,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=a(K,"CODE",{});var De=s(O);de=n(De,"model([input_ids, attention_mask])"),De.forEach(t),$e=n(K," or "),D=a(K,"CODE",{});var Be=s(D);pe=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),K.forEach(t),Re=m(W),A=a(W,"LI",{});var xe=s(A);me=n(xe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a(xe,"CODE",{});var Ye=s(Y);Pe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(t),xe.forEach(t),W.forEach(t),oe=m(v),C=a(v,"P",{});var ne=s(C);je=n(ne,`Note that when creating models and layers with
`),z=a(ne,"A",{href:!0,rel:!0});var Ce=s(z);Ee=n(Ce,"subclassing"),Ce.forEach(t),Le=n(ne,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ne.forEach(t),this.h()},h(){u(z,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(z,"rel","nofollow")},m(v,j){g(v,d,j),e(d,y),e(d,h),e(h,f),e(d,_),g(v,i,j),g(v,c,j),e(c,P),e(P,ye),e(c,he),e(c,Z),e(Z,ae),g(v,te,j),g(v,R,j),e(R,be),e(R,V),e(V,ve),e(R,ue),e(R,U),e(U,Te),e(R,se),e(R,S),e(S,Me),e(R,ce),e(R,Q),e(Q,ke),e(R,le),e(R,H),e(H,we),e(R,fe),g(v,ee,j),g(v,L,j),e(L,x),e(x,ie),e(x,G),e(G,Fe),e(x,ge),e(x,q),e(q,Ne),e(L,_e),e(L,J),e(J,X),e(J,O),e(O,de),e(J,$e),e(J,D),e(D,pe),e(L,Re),e(L,A),e(A,me),e(A,Y),e(Y,Pe),g(v,oe,j),g(v,C,j),e(C,je),e(C,z),e(z,Ee),e(C,Le)},d(v){v&&t(d),v&&t(i),v&&t(c),v&&t(te),v&&t(R),v&&t(ee),v&&t(L),v&&t(oe),v&&t(C)}}}function vR($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function TR($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvYmVydGFQcmVMYXllck5vcm1Gb3JUb2tlbkNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJhbmRyZWFzbWFkc2VuJTJGZWZmaWNpZW50X21sbV9tMC40MCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGUm9iZXJ0YVByZUxheWVyTm9ybUZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmFuZHJlYXNtYWRzZW4lMkZlZmZpY2llbnRfbWxtX20wLjQwJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjAlMjJIdWdnaW5nRmFjZSUyMGlzJTIwYSUyMGNvbXBhbnklMjBiYXNlZCUyMGluJTIwUGFyaXMlMjBhbmQlMjBOZXclMjBZb3JrJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyJTBBKSUwQSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEFwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTIwJTNEJTIwdGYubWF0aC5hcmdtYXgobG9naXRzJTJDJTIwYXhpcyUzRC0xKSUwQSUwQSUyMyUyME5vdGUlMjB0aGF0JTIwdG9rZW5zJTIwYXJlJTIwY2xhc3NpZmllZCUyMHJhdGhlciUyMHRoZW4lMjBpbnB1dCUyMHdvcmRzJTIwd2hpY2glMjBtZWFucyUyMHRoYXQlMEElMjMlMjB0aGVyZSUyMG1pZ2h0JTIwYmUlMjBtb3JlJTIwcHJlZGljdGVkJTIwdG9rZW4lMjBjbGFzc2VzJTIwdGhhbiUyMHdvcmRzLiUwQSUyMyUyME11bHRpcGxlJTIwdG9rZW4lMjBjbGFzc2VzJTIwbWlnaHQlMjBhY2NvdW50JTIwZm9yJTIwdGhlJTIwc2FtZSUyMHdvcmQlMEFwcmVkaWN0ZWRfdG9rZW5zX2NsYXNzZXMlMjAlM0QlMjAlNUJtb2RlbC5jb25maWcuaWQybGFiZWwlNUJ0JTVEJTIwZm9yJTIwdCUyMGluJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyU1QjAlNUQubnVtcHkoKS50b2xpc3QoKSU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRobertaPreLayerNormForTokenClassification
<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;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRobertaPreLayerNormForTokenClassification.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&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=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function MR($){let d,y;return d=new Ie({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(){T(d.$$.fragment)},l(h){M(d.$$.fragment,h)},m(h,f){k(d,h,f),y=!0},p:We,i(h){y||(w(d.$$.fragment,h),y=!0)},o(h){F(d.$$.fragment,h),y=!1},d(h){N(d,h)}}}function kR($){let d,y,h,f,_,i,c,P,ye,he,Z,ae,te,R,be,V,ve,ue,U,Te,se,S,Me,ce,Q,ke,le,H,we,fe,ee,L,x,ie,G,Fe,ge,q,Ne,_e,J,X,O,de,$e,D,pe,Re,A,me,Y,Pe,oe,C,je,z,Ee,Le;return{c(){d=r("p"),y=o("TensorFlow models and layers in "),h=r("code"),f=o("transformers"),_=o(" accept two formats as input:"),i=p(),c=r("ul"),P=r("li"),ye=o("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),Z=r("li"),ae=o("having all inputs as a list, tuple or dict in the first positional argument."),te=p(),R=r("p"),be=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 `),V=r("code"),ve=o("model.fit()"),ue=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),U=r("code"),Te=o("model.fit()"),se=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),S=r("code"),Me=o("fit()"),ce=o(" and "),Q=r("code"),ke=o("predict()"),le=o(`, such as when creating your own layers or models with
the Keras `),H=r("code"),we=o("Functional"),fe=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),ee=p(),L=r("ul"),x=r("li"),ie=o("a single Tensor with "),G=r("code"),Fe=o("input_ids"),ge=o(" only and nothing else: "),q=r("code"),Ne=o("model(input_ids)"),_e=p(),J=r("li"),X=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=r("code"),de=o("model([input_ids, attention_mask])"),$e=o(" or "),D=r("code"),pe=o("model([input_ids, attention_mask, token_type_ids])"),Re=p(),A=r("li"),me=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=r("code"),Pe=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=p(),C=r("p"),je=o(`Note that when creating models and layers with
`),z=r("a"),Ee=o("subclassing"),Le=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(v){d=a(v,"P",{});var j=s(d);y=n(j,"TensorFlow models and layers in "),h=a(j,"CODE",{});var Ve=s(h);f=n(Ve,"transformers"),Ve.forEach(t),_=n(j," accept two formats as input:"),j.forEach(t),i=m(v),c=a(v,"UL",{});var re=s(c);P=a(re,"LI",{});var Je=s(P);ye=n(Je,"having all inputs as keyword arguments (like PyTorch models), or"),Je.forEach(t),he=m(re),Z=a(re,"LI",{});var Ge=s(Z);ae=n(Ge,"having all inputs as a list, tuple or dict in the first positional argument."),Ge.forEach(t),re.forEach(t),te=m(v),R=a(v,"P",{});var E=s(R);be=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 `),V=a(E,"CODE",{});var Xe=s(V);ve=n(Xe,"model.fit()"),Xe.forEach(t),ue=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),U=a(E,"CODE",{});var Se=s(U);Te=n(Se,"model.fit()"),Se.forEach(t),se=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),S=a(E,"CODE",{});var Ze=s(S);Me=n(Ze,"fit()"),Ze.forEach(t),ce=n(E," and "),Q=a(E,"CODE",{});var Qe=s(Q);ke=n(Qe,"predict()"),Qe.forEach(t),le=n(E,`, such as when creating your own layers or models with
the Keras `),H=a(E,"CODE",{});var He=s(H);we=n(He,"Functional"),He.forEach(t),fe=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),ee=m(v),L=a(v,"UL",{});var W=s(L);x=a(W,"LI",{});var I=s(x);ie=n(I,"a single Tensor with "),G=a(I,"CODE",{});var Oe=s(G);Fe=n(Oe,"input_ids"),Oe.forEach(t),ge=n(I," only and nothing else: "),q=a(I,"CODE",{});var Ae=s(q);Ne=n(Ae,"model(input_ids)"),Ae.forEach(t),I.forEach(t),_e=m(W),J=a(W,"LI",{});var K=s(J);X=n(K,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),O=a(K,"CODE",{});var De=s(O);de=n(De,"model([input_ids, attention_mask])"),De.forEach(t),$e=n(K," or "),D=a(K,"CODE",{});var Be=s(D);pe=n(Be,"model([input_ids, attention_mask, token_type_ids])"),Be.forEach(t),K.forEach(t),Re=m(W),A=a(W,"LI",{});var xe=s(A);me=n(xe,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a(xe,"CODE",{});var Ye=s(Y);Pe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(t),xe.forEach(t),W.forEach(t),oe=m(v),C=a(v,"P",{});var ne=s(C);je=n(ne,`Note that when creating models and layers with
`),z=a(ne,"A",{href:!0,rel:!0});var Ce=s(z);Ee=n(Ce,"subclassing"),Ce.forEach(t),Le=n(ne,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ne.forEach(t),this.h()},h(){u(z,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(z,"rel","nofollow")},m(v,j){g(v,d,j),e(d,y),e(d,h),e(h,f),e(d,_),g(v,i,j),g(v,c,j),e(c,P),e(P,ye),e(c,he),e(c,Z),e(Z,ae),g(v,te,j),g(v,R,j),e(R,be),e(R,V),e(V,ve),e(R,ue),e(R,U),e(U,Te),e(R,se),e(R,S),e(S,Me),e(R,ce),e(R,Q),e(Q,ke),e(R,le),e(R,H),e(H,we),e(R,fe),g(v,ee,j),g(v,L,j),e(L,x),e(x,ie),e(x,G),e(G,Fe),e(x,ge),e(x,q),e(q,Ne),e(L,_e),e(L,J),e(J,X),e(J,O),e(O,de),e(J,$e),e(J,D),e(D,pe),e(L,Re),e(L,A),e(A,me),e(A,Y),e(Y,Pe),g(v,oe,j),g(v,C,j),e(C,je),e(C,z),e(z,Ee),e(C,Le)},d(v){v&&t(d),v&&t(i),v&&t(c),v&&t(te),v&&t(R),v&&t(ee),v&&t(L),v&&t(oe),v&&t(C)}}}function wR($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function FR($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlJvYmVydGFQcmVMYXllck5vcm1Gb3JRdWVzdGlvbkFuc3dlcmluZyUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBbW9kZWwlMjAlM0QlMjBURlJvYmVydGFQcmVMYXllck5vcm1Gb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNEJTIwaW50KHRmLm1hdGguYXJnbWF4KG91dHB1dHMuc3RhcnRfbG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChvdXRwdXRzLmVuZF9sb2dpdHMlMkMlMjBheGlzJTNELTEpJTVCMCU1RCklMEElMEFwcmVkaWN0X2Fuc3dlcl90b2tlbnMlMjAlM0QlMjBpbnB1dHMuaW5wdXRfaWRzJTVCMCUyQyUyMGFuc3dlcl9zdGFydF9pbmRleCUyMCUzQSUyMGFuc3dlcl9lbmRfaW5kZXglMjAlMkIlMjAxJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFRobertaPreLayerNormForQuestionAnswering
<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;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFRobertaPreLayerNormForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&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=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function NR($){let d,y;return d=new Ie({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(){T(d.$$.fragment)},l(h){M(d.$$.fragment,h)},m(h,f){k(d,h,f),y=!0},p:We,i(h){y||(w(d.$$.fragment,h),y=!0)},o(h){F(d.$$.fragment,h),y=!1},d(h){N(d,h)}}}function $R($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function RR($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Um9iZXJ0YVByZUxheWVyTm9ybU1vZGVsJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4Um9iZXJ0YVByZUxheWVyTm9ybU1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJhbmRyZWFzbWFkc2VuJTJGZWZmaWNpZW50X21sbV9tMC40MCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxRobertaPreLayerNormModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaPreLayerNormModel.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function PR($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function jR($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Um9iZXJ0YVByZUxheWVyTm9ybUZvckNhdXNhbExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4Um9iZXJ0YVByZUxheWVyTm9ybUZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJhbmRyZWFzbWFkc2VuJTJGZWZmaWNpZW50X21sbV9tMC40MCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQSUyMyUyMHJldHJpZXZlJTIwbG9ndHMlMjBmb3IlMjBuZXh0JTIwdG9rZW4lMEFuZXh0X3Rva2VuX2xvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRzJTVCJTNBJTJDJTIwLTElNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxRobertaPreLayerNormForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaPreLayerNormForCausalLM.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve logts for next token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>next_token_logits = outputs.logits[:, -<span class="hljs-number">1</span>]`}}),{c(){d=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function ER($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function LR($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Um9iZXJ0YVByZUxheWVyTm9ybUZvck1hc2tlZExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4Um9iZXJ0YVByZUxheWVyTm9ybUZvck1hc2tlZExNLmZyb21fcHJldHJhaW5lZCglMjJhbmRyZWFzbWFkc2VuJTJGZWZmaWNpZW50X21sbV9tMC40MCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjAlNUJNQVNLJTVELiUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxRobertaPreLayerNormForMaskedLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaPreLayerNormForMaskedLM.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function JR($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function xR($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Um9iZXJ0YVByZUxheWVyTm9ybUZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJhbmRyZWFzbWFkc2VuJTJGZWZmaWNpZW50X21sbV9tMC40MCUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhSb2JlcnRhUHJlTGF5ZXJOb3JtRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxRobertaPreLayerNormForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaPreLayerNormForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function CR($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function zR($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Um9iZXJ0YVByZUxheWVyTm9ybUZvck11bHRpcGxlQ2hvaWNlJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4Um9iZXJ0YVByZUxheWVyTm9ybUZvck11bHRpcGxlQ2hvaWNlLmZyb21fcHJldHJhaW5lZCglMjJhbmRyZWFzbWFkc2VuJTJGZWZmaWNpZW50X21sbV9tMC40MCUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJJbiUyMEl0YWx5JTJDJTIwcGl6emElMjBzZXJ2ZWQlMjBpbiUyMGZvcm1hbCUyMHNldHRpbmdzJTJDJTIwc3VjaCUyMGFzJTIwYXQlMjBhJTIwcmVzdGF1cmFudCUyQyUyMGlzJTIwcHJlc2VudGVkJTIwdW5zbGljZWQuJTIyJTBBY2hvaWNlMCUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdpdGglMjBhJTIwZm9yayUyMGFuZCUyMGElMjBrbmlmZS4lMjIlMEFjaG9pY2UxJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2hpbGUlMjBoZWxkJTIwaW4lMjB0aGUlMjBoYW5kLiUyMiUwQSUwQWVuY29kaW5nJTIwJTNEJTIwdG9rZW5pemVyKCU1QnByb21wdCUyQyUyMHByb21wdCU1RCUyQyUyMCU1QmNob2ljZTAlMkMlMjBjaG9pY2UxJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIlMkMlMjBwYWRkaW5nJTNEVHJ1ZSklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKiolN0JrJTNBJTIwdiU1Qk5vbmUlMkMlMjAlM0ElNUQlMjBmb3IlMjBrJTJDJTIwdiUyMGluJTIwZW5jb2RpbmcuaXRlbXMoKSU3RCklMEElMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxRobertaPreLayerNormForMultipleChoice

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaPreLayerNormForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function UR($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function WR($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Um9iZXJ0YVByZUxheWVyTm9ybUZvclRva2VuQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJhbmRyZWFzbWFkc2VuJTJGZWZmaWNpZW50X21sbV9tMC40MCUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhSb2JlcnRhUHJlTGF5ZXJOb3JtRm9yVG9rZW5DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxRobertaPreLayerNormForTokenClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaPreLayerNormForTokenClassification.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function IR($){let d,y,h,f,_;return{c(){d=r("p"),y=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r("code"),f=o("Module"),_=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(i){d=a(i,"P",{});var c=s(d);y=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a(c,"CODE",{});var P=s(h);f=n(P,"Module"),P.forEach(t),_=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(i,c){g(i,d,c),e(d,y),e(d,h),e(h,f),e(d,_)},d(i){i&&t(d)}}}function ZR($){let d,y,h,f,_;return f=new Ie({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4Um9iZXJ0YVByZUxheWVyTm9ybUZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyYW5kcmVhc21hZHNlbiUyRmVmZmljaWVudF9tbG1fbTAuNDAlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4Um9iZXJ0YVByZUxheWVyTm9ybUZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJhbmRyZWFzbWFkc2VuJTJGZWZmaWNpZW50X21sbV9tMC40MCUyMiklMEElMEFxdWVzdGlvbiUyQyUyMHRleHQlMjAlM0QlMjAlMjJXaG8lMjB3YXMlMjBKaW0lMjBIZW5zb24lM0YlMjIlMkMlMjAlMjJKaW0lMjBIZW5zb24lMjB3YXMlMjBhJTIwbmljZSUyMHB1cHBldCUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihxdWVzdGlvbiUyQyUyMHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBc3RhcnRfc2NvcmVzJTIwJTNEJTIwb3V0cHV0cy5zdGFydF9sb2dpdHMlMEFlbmRfc2NvcmVzJTIwJTNEJTIwb3V0cHV0cy5lbmRfbG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxRobertaPreLayerNormForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxRobertaPreLayerNormForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;andreasmadsen/efficient_mlm_m0.40&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits`}}),{c(){d=r("p"),y=o("Example:"),h=p(),T(f.$$.fragment)},l(i){d=a(i,"P",{});var c=s(d);y=n(c,"Example:"),c.forEach(t),h=m(i),M(f.$$.fragment,i)},m(i,c){g(i,d,c),e(d,y),g(i,h,c),k(f,i,c),_=!0},p:We,i(i){_||(w(f.$$.fragment,i),_=!0)},o(i){F(f.$$.fragment,i),_=!1},d(i){i&&t(d),i&&t(h),N(f,i)}}}function AR($){let d,y,h,f,_,i,c,P,ye,he,Z,ae,te,R,be,V,ve,ue,U,Te,se,S,Me,ce,Q,ke,le,H,we,fe,ee,L,x,ie,G,Fe,ge,q,Ne,_e,J,X,O,de,$e,D,pe,Re,A,me,Y,Pe,oe,C,je,z,Ee,Le,v,j,Ve,re,Je,Ge,E,Xe,Se,Ze,Qe,He,W,I,Oe,Ae,K,De,Be,xe,Ye,ne,Ce,Nn,Wd,ba,_f,Id,yf,ph,ft,Zd,ki,bf,vf,Ad,wi,Tf,Mf,Bd,Fi,kf,wf,qd,Ni,Ff,Nf,Vd,$i,$f,Rf,Gd,Ri,Pf,mh,Po,$n,Xd,va,jf,Sd,Ef,hh,Ut,Ta,Lf,so,Jf,Pi,xf,Cf,ji,zf,Uf,Ma,Wf,If,Zf,jo,Af,Ei,Bf,qf,Li,Vf,Gf,Xf,Rn,uh,Eo,Pn,Qd,ka,Sf,Hd,Qf,fh,Ke,wa,Hf,Od,Of,Df,Fa,Yf,Ji,Kf,eg,tg,Na,og,$a,ng,rg,ag,Ra,sg,Dd,lg,ig,dg,lt,cg,Yd,pg,mg,Kd,hg,ug,ec,fg,gg,tc,_g,yg,oc,bg,vg,nc,Tg,Mg,kg,jn,wg,rc,Fg,Ng,Pa,$g,Rg,Wt,ja,Pg,Lo,jg,xi,Eg,Lg,ac,Jg,xg,Cg,En,zg,Ln,gh,Jo,Jn,sc,Ea,Ug,lc,Wg,_h,_t,La,Ig,Ja,Zg,ic,Ag,Bg,qg,xa,Vg,Ci,Gg,Xg,Sg,Ca,Qg,za,Hg,Og,Dg,It,Ua,Yg,xo,Kg,zi,e_,t_,dc,o_,n_,r_,xn,a_,Cn,yh,Co,zn,cc,Wa,s_,pc,l_,bh,yt,Ia,i_,Za,d_,mc,c_,p_,m_,Aa,h_,Ui,u_,f_,g_,Ba,__,qa,y_,b_,v_,Zt,Va,T_,zo,M_,Wi,k_,w_,hc,F_,N_,$_,Un,R_,Wn,vh,Uo,In,uc,Ga,P_,fc,j_,Th,bt,Xa,E_,gc,L_,J_,Sa,x_,Ii,C_,z_,U_,Qa,W_,Ha,I_,Z_,A_,wt,Oa,B_,Wo,q_,Zi,V_,G_,_c,X_,S_,Q_,Zn,H_,An,O_,Bn,Mh,Io,qn,yc,Da,D_,bc,Y_,kh,vt,Ya,K_,vc,ey,ty,Ka,oy,Ai,ny,ry,ay,es,sy,ts,ly,iy,dy,At,os,cy,Zo,py,Bi,my,hy,Tc,uy,fy,gy,Vn,_y,Gn,wh,Ao,Xn,Mc,ns,yy,kc,by,Fh,Tt,rs,vy,wc,Ty,My,as,ky,qi,wy,Fy,Ny,ss,$y,ls,Ry,Py,jy,Bt,is,Ey,Bo,Ly,Vi,Jy,xy,Fc,Cy,zy,Uy,Sn,Wy,Qn,Nh,qo,Hn,Nc,ds,Iy,$c,Zy,$h,Mt,cs,Ay,Vo,By,Rc,qy,Vy,Pc,Gy,Xy,Sy,ps,Qy,Gi,Hy,Oy,Dy,ms,Yy,hs,Ky,eb,tb,qt,us,ob,Go,nb,Xi,rb,ab,jc,sb,lb,ib,On,db,Dn,Rh,Xo,Yn,Ec,fs,cb,Lc,pb,Ph,it,gs,mb,Jc,hb,ub,_s,fb,Si,gb,_b,yb,ys,bb,bs,vb,Tb,Mb,Kn,kb,Vt,vs,wb,So,Fb,Qi,Nb,$b,xc,Rb,Pb,jb,er,Eb,tr,jh,Qo,or,Cc,Ts,Lb,zc,Jb,Eh,Ho,Ms,xb,Gt,ks,Cb,Oo,zb,Hi,Ub,Wb,Uc,Ib,Zb,Ab,nr,Bb,rr,Lh,Do,ar,Wc,ws,qb,Ic,Vb,Jh,dt,Fs,Gb,Ns,Xb,Zc,Sb,Qb,Hb,$s,Ob,Oi,Db,Yb,Kb,Rs,ev,Ps,tv,ov,nv,sr,rv,Ft,js,av,Yo,sv,Di,lv,iv,Ac,dv,cv,pv,lr,mv,ir,hv,dr,xh,Ko,cr,Bc,Es,uv,qc,fv,Ch,ct,Ls,gv,Vc,_v,yv,Js,bv,Yi,vv,Tv,Mv,xs,kv,Cs,wv,Fv,Nv,pr,$v,Nt,zs,Rv,en,Pv,Ki,jv,Ev,Gc,Lv,Jv,xv,mr,Cv,hr,zv,ur,zh,tn,fr,Xc,Us,Uv,Sc,Wv,Uh,pt,Ws,Iv,Qc,Zv,Av,Is,Bv,ed,qv,Vv,Gv,Zs,Xv,As,Sv,Qv,Hv,gr,Ov,Xt,Bs,Dv,on,Yv,td,Kv,eT,Hc,tT,oT,nT,_r,rT,yr,Wh,nn,br,Oc,qs,aT,Dc,sT,Ih,mt,Vs,lT,Yc,iT,dT,Gs,cT,od,pT,mT,hT,Xs,uT,Ss,fT,gT,_T,vr,yT,$t,Qs,bT,rn,vT,nd,TT,MT,Kc,kT,wT,FT,Tr,NT,Mr,$T,kr,Zh,an,wr,ep,Hs,RT,tp,PT,Ah,ht,Os,jT,sn,ET,op,LT,JT,np,xT,CT,zT,Ds,UT,rd,WT,IT,ZT,Ys,AT,Ks,BT,qT,VT,Fr,GT,Rt,el,XT,ln,ST,ad,QT,HT,rp,OT,DT,YT,Nr,KT,$r,eM,Rr,Bh,dn,Pr,ap,tl,tM,sp,oM,qh,et,ol,nM,lp,rM,aM,nl,sM,sd,lM,iM,dM,rl,cM,al,pM,mM,hM,ip,uM,fM,lo,dp,sl,gM,_M,cp,ll,yM,bM,pp,il,vM,TM,mp,dl,MM,kM,St,cl,wM,cn,FM,hp,NM,$M,up,RM,PM,jM,jr,EM,Er,Vh,pn,Lr,fp,pl,LM,gp,JM,Gh,tt,ml,xM,_p,CM,zM,hl,UM,ld,WM,IM,ZM,ul,AM,fl,BM,qM,VM,yp,GM,XM,io,bp,gl,SM,QM,vp,_l,HM,OM,Tp,yl,DM,YM,Mp,bl,KM,ek,Qt,vl,tk,mn,ok,kp,nk,rk,wp,ak,sk,lk,Jr,ik,xr,Xh,hn,Cr,Fp,Tl,dk,Np,ck,Sh,ot,Ml,pk,kl,mk,$p,hk,uk,fk,wl,gk,id,_k,yk,bk,Fl,vk,Nl,Tk,Mk,kk,Rp,wk,Fk,co,Pp,$l,Nk,$k,jp,Rl,Rk,Pk,Ep,Pl,jk,Ek,Lp,jl,Lk,Jk,Ht,El,xk,un,Ck,Jp,zk,Uk,xp,Wk,Ik,Zk,zr,Ak,Ur,Qh,fn,Wr,Cp,Ll,Bk,zp,qk,Hh,nt,Jl,Vk,Up,Gk,Xk,xl,Sk,dd,Qk,Hk,Ok,Cl,Dk,zl,Yk,Kk,ew,Wp,tw,ow,po,Ip,Ul,nw,rw,Zp,Wl,aw,sw,Ap,Il,lw,iw,Bp,Zl,dw,cw,Ot,Al,pw,gn,mw,qp,hw,uw,Vp,fw,gw,_w,Ir,yw,Zr,Oh,_n,Ar,Gp,Bl,bw,Xp,vw,Dh,rt,ql,Tw,Sp,Mw,kw,Vl,ww,cd,Fw,Nw,$w,Gl,Rw,Xl,Pw,jw,Ew,Qp,Lw,Jw,mo,Hp,Sl,xw,Cw,Op,Ql,zw,Uw,Dp,Hl,Ww,Iw,Yp,Ol,Zw,Aw,Dt,Dl,Bw,yn,qw,Kp,Vw,Gw,em,Xw,Sw,Qw,Br,Hw,qr,Yh,bn,Vr,tm,Yl,Ow,om,Dw,Kh,at,Kl,Yw,nm,Kw,e2,ei,t2,pd,o2,n2,r2,ti,a2,oi,s2,l2,i2,rm,d2,c2,ho,am,ni,p2,m2,sm,ri,h2,u2,lm,ai,f2,g2,im,si,_2,y2,Yt,li,b2,vn,v2,dm,T2,M2,cm,k2,w2,F2,Gr,N2,Xr,eu,Tn,Sr,pm,ii,$2,mm,R2,tu,st,di,P2,Mn,j2,hm,E2,L2,um,J2,x2,C2,ci,z2,md,U2,W2,I2,pi,Z2,mi,A2,B2,q2,fm,V2,G2,uo,gm,hi,X2,S2,_m,ui,Q2,H2,ym,fi,O2,D2,bm,gi,Y2,K2,Kt,_i,e0,kn,t0,vm,o0,n0,Tm,r0,a0,s0,Qr,l0,Hr,ou;return i=new qe({}),R=new qe({}),ba=new qe({}),va=new qe({}),Ta=new B({props:{name:"class transformers.RobertaPreLayerNormConfig",anchor:"transformers.RobertaPreLayerNormConfig",parameters:[{name:"vocab_size",val:" = 50265"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"pad_token_id",val:" = 1"},{name:"bos_token_id",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"position_embedding_type",val:" = 'absolute'"},{name:"use_cache",val:" = True"},{name:"classifier_dropout",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.RobertaPreLayerNormConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50265) &#x2014;
Vocabulary size of the RoBERTa-PreLayerNorm model. Defines the number of different tokens that can be
represented by the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormModel">RobertaPreLayerNormModel</a> or
<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormModel">TFRobertaPreLayerNormModel</a>.`,name:"vocab_size"},{anchor:"transformers.RobertaPreLayerNormConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.RobertaPreLayerNormConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.RobertaPreLayerNormConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.RobertaPreLayerNormConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.RobertaPreLayerNormConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.RobertaPreLayerNormConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.RobertaPreLayerNormConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.RobertaPreLayerNormConfig.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.RobertaPreLayerNormConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormModel">RobertaPreLayerNormModel</a> or
<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormModel">TFRobertaPreLayerNormModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.RobertaPreLayerNormConfig.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.RobertaPreLayerNormConfig.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.RobertaPreLayerNormConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.RobertaPreLayerNormConfig.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.RobertaPreLayerNormConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.RobertaPreLayerNormConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/configuration_roberta_prelayernorm.py#L35"}}),Rn=new Ue({props:{anchor:"transformers.RobertaPreLayerNormConfig.example",$$slots:{default:[A$]},$$scope:{ctx:$}}}),ka=new qe({}),wa=new B({props:{name:"class transformers.RobertaPreLayerNormModel",anchor:"transformers.RobertaPreLayerNormModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.RobertaPreLayerNormModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L694"}}),ja=new B({props:{name:"forward",anchor:"transformers.RobertaPreLayerNormModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RobertaPreLayerNormModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormModel.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.RobertaPreLayerNormModel.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.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormModel.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.RobertaPreLayerNormModel.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.RobertaPreLayerNormModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormModel.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.RobertaPreLayerNormModel.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.RobertaPreLayerNormModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaPreLayerNormModel.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.RobertaPreLayerNormModel.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.RobertaPreLayerNormModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.RobertaPreLayerNormModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L737",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),En=new ze({props:{$$slots:{default:[B$]},$$scope:{ctx:$}}}),Ln=new Ue({props:{anchor:"transformers.RobertaPreLayerNormModel.forward.example",$$slots:{default:[q$]},$$scope:{ctx:$}}}),Ea=new qe({}),La=new B({props:{name:"class transformers.RobertaPreLayerNormForCausalLM",anchor:"transformers.RobertaPreLayerNormForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RobertaPreLayerNormForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L880"}}),Ua=new B({props:{name:"forward",anchor:"transformers.RobertaPreLayerNormForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"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:"past_key_values",val:": 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.RobertaPreLayerNormForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.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.RobertaPreLayerNormForCausalLM.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.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.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.RobertaPreLayerNormForCausalLM.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.RobertaPreLayerNormForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.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.RobertaPreLayerNormForCausalLM.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.RobertaPreLayerNormForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.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.RobertaPreLayerNormForCausalLM.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.RobertaPreLayerNormForCausalLM.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 in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L903",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xn=new ze({props:{$$slots:{default:[V$]},$$scope:{ctx:$}}}),Cn=new Ue({props:{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.example",$$slots:{default:[G$]},$$scope:{ctx:$}}}),Wa=new qe({}),Ia=new B({props:{name:"class transformers.RobertaPreLayerNormForMaskedLM",anchor:"transformers.RobertaPreLayerNormForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RobertaPreLayerNormForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1033"}}),Va=new B({props:{name:"forward",anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"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.RobertaPreLayerNormForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.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.RobertaPreLayerNormForMaskedLM.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.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.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.RobertaPreLayerNormForMaskedLM.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.RobertaPreLayerNormForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.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.RobertaPreLayerNormForMaskedLM.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.RobertaPreLayerNormForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, any]</code>, optional, defaults to <em>{}</em>) &#x2014;
Used to hide legacy arguments that have been deprecated.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1058",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Un=new ze({props:{$$slots:{default:[X$]},$$scope:{ctx:$}}}),Wn=new Ue({props:{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.example",$$slots:{default:[S$]},$$scope:{ctx:$}}}),Ga=new qe({}),Xa=new B({props:{name:"class transformers.RobertaPreLayerNormForSequenceClassification",anchor:"transformers.RobertaPreLayerNormForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1167"}}),Oa=new B({props:{name:"forward",anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.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.RobertaPreLayerNormForSequenceClassification.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.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.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.RobertaPreLayerNormForSequenceClassification.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.RobertaPreLayerNormForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.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.RobertaPreLayerNormForSequenceClassification.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.RobertaPreLayerNormForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1179",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Zn=new ze({props:{$$slots:{default:[Q$]},$$scope:{ctx:$}}}),An=new Ue({props:{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.example",$$slots:{default:[H$]},$$scope:{ctx:$}}}),Bn=new Ue({props:{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.example-2",$$slots:{default:[O$]},$$scope:{ctx:$}}}),Da=new qe({}),Ya=new B({props:{name:"class transformers.RobertaPreLayerNormForMultipleChoice",anchor:"transformers.RobertaPreLayerNormForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1266"}}),os=new B({props:{name:"forward",anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.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.RobertaPreLayerNormForMultipleChoice.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.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.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.RobertaPreLayerNormForMultipleChoice.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.RobertaPreLayerNormForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.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.RobertaPreLayerNormForMultipleChoice.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.RobertaPreLayerNormForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1277",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Vn=new ze({props:{$$slots:{default:[D$]},$$scope:{ctx:$}}}),Gn=new Ue({props:{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.example",$$slots:{default:[Y$]},$$scope:{ctx:$}}}),ns=new qe({}),rs=new B({props:{name:"class transformers.RobertaPreLayerNormForTokenClassification",anchor:"transformers.RobertaPreLayerNormForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RobertaPreLayerNormForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1360"}}),is=new B({props:{name:"forward",anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.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.RobertaPreLayerNormForTokenClassification.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.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.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.RobertaPreLayerNormForTokenClassification.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.RobertaPreLayerNormForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.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.RobertaPreLayerNormForTokenClassification.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.RobertaPreLayerNormForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1375",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Sn=new ze({props:{$$slots:{default:[K$]},$$scope:{ctx:$}}}),Qn=new Ue({props:{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.example",$$slots:{default:[eR]},$$scope:{ctx:$}}}),ds=new qe({}),cs=new B({props:{name:"class transformers.RobertaPreLayerNormForQuestionAnswering",anchor:"transformers.RobertaPreLayerNormForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1467"}}),us=new B({props:{name:"forward",anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.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.RobertaPreLayerNormForQuestionAnswering.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.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.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.RobertaPreLayerNormForQuestionAnswering.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.RobertaPreLayerNormForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.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.RobertaPreLayerNormForQuestionAnswering.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.RobertaPreLayerNormForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.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.RobertaPreLayerNormForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1478",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),On=new ze({props:{$$slots:{default:[tR]},$$scope:{ctx:$}}}),Dn=new Ue({props:{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.example",$$slots:{default:[oR]},$$scope:{ctx:$}}}),fs=new qe({}),gs=new B({props:{name:"class transformers.TFRobertaPreLayerNormModel",anchor:"transformers.TFRobertaPreLayerNormModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaPreLayerNormModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L883"}}),Kn=new ze({props:{$$slots:{default:[nR]},$$scope:{ctx:$}}}),vs=new B({props:{name:"call",anchor:"transformers.TFRobertaPreLayerNormModel.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.TFRobertaPreLayerNormModel.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaPreLayerNormModel.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.TFRobertaPreLayerNormModel.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.TFRobertaPreLayerNormModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaPreLayerNormModel.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.TFRobertaPreLayerNormModel.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.TFRobertaPreLayerNormModel.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.TFRobertaPreLayerNormModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L888",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you\u2019re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),er=new ze({props:{$$slots:{default:[rR]},$$scope:{ctx:$}}}),tr=new Ue({props:{anchor:"transformers.TFRobertaPreLayerNormModel.call.example",$$slots:{default:[aR]},$$scope:{ctx:$}}}),Ts=new qe({}),Ms=new B({props:{name:"class transformers.TFRobertaPreLayerNormForCausalLM",anchor:"transformers.TFRobertaPreLayerNormForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1090"}}),ks=new B({props:{name:"call",anchor:"transformers.TFRobertaPreLayerNormForCausalLM.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"}],parametersDescription:[{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.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.TFRobertaPreLayerNormForCausalLM.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.TFRobertaPreLayerNormForCausalLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.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.TFRobertaPreLayerNormForCausalLM.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.TFRobertaPreLayerNormForCausalLM.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.TFRobertaPreLayerNormForCausalLM.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"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.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 cross entropy classification loss. Indices should be in <code>[0, ..., config.vocab_size - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1129",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),nr=new ze({props:{$$slots:{default:[sR]},$$scope:{ctx:$}}}),rr=new Ue({props:{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.example",$$slots:{default:[lR]},$$scope:{ctx:$}}}),ws=new qe({}),Fs=new B({props:{name:"class transformers.TFRobertaPreLayerNormForMaskedLM",anchor:"transformers.TFRobertaPreLayerNormForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1008"}}),sr=new ze({props:{$$slots:{default:[iR]},$$scope:{ctx:$}}}),js=new B({props:{name:"call",anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.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.TFRobertaPreLayerNormForMaskedLM.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.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.TFRobertaPreLayerNormForMaskedLM.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.TFRobertaPreLayerNormForMaskedLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1028",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),lr=new ze({props:{$$slots:{default:[dR]},$$scope:{ctx:$}}}),ir=new Ue({props:{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.example",$$slots:{default:[cR]},$$scope:{ctx:$}}}),dr=new Ue({props:{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.example-2",$$slots:{default:[pR]},$$scope:{ctx:$}}}),Es=new qe({}),Ls=new B({props:{name:"class transformers.TFRobertaPreLayerNormForSequenceClassification",anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1254"}}),pr=new ze({props:{$$slots:{default:[mR]},$$scope:{ctx:$}}}),zs=new B({props:{name:"call",anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.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.TFRobertaPreLayerNormForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.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.TFRobertaPreLayerNormForSequenceClassification.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.TFRobertaPreLayerNormForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1269",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),mr=new ze({props:{$$slots:{default:[hR]},$$scope:{ctx:$}}}),hr=new Ue({props:{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.example",$$slots:{default:[uR]},$$scope:{ctx:$}}}),ur=new Ue({props:{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.example-2",$$slots:{default:[fR]},$$scope:{ctx:$}}}),Us=new qe({}),Ws=new B({props:{name:"class transformers.TFRobertaPreLayerNormForMultipleChoice",anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1334"}}),gr=new ze({props:{$$slots:{default:[gR]},$$scope:{ctx:$}}}),Bs=new B({props:{name:"call",anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.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.TFRobertaPreLayerNormForMultipleChoice.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.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.TFRobertaPreLayerNormForMultipleChoice.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.TFRobertaPreLayerNormForMultipleChoice.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1348",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),_r=new ze({props:{$$slots:{default:[_R]},$$scope:{ctx:$}}}),yr=new Ue({props:{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.example",$$slots:{default:[yR]},$$scope:{ctx:$}}}),qs=new qe({}),Vs=new B({props:{name:"class transformers.TFRobertaPreLayerNormForTokenClassification",anchor:"transformers.TFRobertaPreLayerNormForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1426"}}),vr=new ze({props:{$$slots:{default:[bR]},$$scope:{ctx:$}}}),Qs=new B({props:{name:"call",anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.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.TFRobertaPreLayerNormForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.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.TFRobertaPreLayerNormForTokenClassification.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.TFRobertaPreLayerNormForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1446",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Tr=new ze({props:{$$slots:{default:[vR]},$$scope:{ctx:$}}}),Mr=new Ue({props:{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.example",$$slots:{default:[TR]},$$scope:{ctx:$}}}),kr=new Ue({props:{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.example-2",$$slots:{default:[MR]},$$scope:{ctx:$}}}),Hs=new qe({}),Os=new B({props:{name:"class transformers.TFRobertaPreLayerNormForQuestionAnswering",anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1510"}}),Fr=new ze({props:{$$slots:{default:[kR]},$$scope:{ctx:$}}}),el=new B({props:{name:"call",anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.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.TFRobertaPreLayerNormForQuestionAnswering.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.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.TFRobertaPreLayerNormForQuestionAnswering.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.TFRobertaPreLayerNormForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1525",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Nr=new ze({props:{$$slots:{default:[wR]},$$scope:{ctx:$}}}),$r=new Ue({props:{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.example",$$slots:{default:[FR]},$$scope:{ctx:$}}}),Rr=new Ue({props:{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.example-2",$$slots:{default:[NR]},$$scope:{ctx:$}}}),tl=new qe({}),ol=new B({props:{name:"class transformers.FlaxRobertaPreLayerNormModel",anchor:"transformers.FlaxRobertaPreLayerNormModel",parameters:[{name:"config",val:": RobertaPreLayerNormConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaPreLayerNormModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L995"}}),cl=new B({props:{name:"__call__",anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L819",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),jr=new ze({props:{$$slots:{default:[$R]},$$scope:{ctx:$}}}),Er=new Ue({props:{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.example",$$slots:{default:[RR]},$$scope:{ctx:$}}}),pl=new qe({}),ml=new B({props:{name:"class transformers.FlaxRobertaPreLayerNormForCausalLM",anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM",parameters:[{name:"config",val:": RobertaPreLayerNormConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1478"}}),vl=new B({props:{name:"__call__",anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L819",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key, value
states of the self-attention and the cross-attention layers if model is used in encoder-decoder setting.
Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Jr=new ze({props:{$$slots:{default:[PR]},$$scope:{ctx:$}}}),xr=new Ue({props:{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.example",$$slots:{default:[jR]},$$scope:{ctx:$}}}),Tl=new qe({}),Ml=new B({props:{name:"class transformers.FlaxRobertaPreLayerNormForMaskedLM",anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM",parameters:[{name:"config",val:": RobertaPreLayerNormConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1072"}}),El=new B({props:{name:"__call__",anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L819",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),zr=new ze({props:{$$slots:{default:[ER]},$$scope:{ctx:$}}}),Ur=new Ue({props:{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__.example",$$slots:{default:[LR]},$$scope:{ctx:$}}}),Ll=new qe({}),Jl=new B({props:{name:"class transformers.FlaxRobertaPreLayerNormForSequenceClassification",anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification",parameters:[{name:"config",val:": RobertaPreLayerNormConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1146"}}),Al=new B({props:{name:"__call__",anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L819",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ir=new ze({props:{$$slots:{default:[JR]},$$scope:{ctx:$}}}),Zr=new Ue({props:{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.example",$$slots:{default:[xR]},$$scope:{ctx:$}}}),Bl=new qe({}),ql=new B({props:{name:"class transformers.FlaxRobertaPreLayerNormForMultipleChoice",anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice",parameters:[{name:"config",val:": RobertaPreLayerNormConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1228"}}),Dl=new B({props:{name:"__call__",anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L819",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Br=new ze({props:{$$slots:{default:[CR]},$$scope:{ctx:$}}}),qr=new Ue({props:{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.example",$$slots:{default:[zR]},$$scope:{ctx:$}}}),Yl=new qe({}),Kl=new B({props:{name:"class transformers.FlaxRobertaPreLayerNormForTokenClassification",anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification",parameters:[{name:"config",val:": RobertaPreLayerNormConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1312"}}),li=new B({props:{name:"__call__",anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L819",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Gr=new ze({props:{$$slots:{default:[UR]},$$scope:{ctx:$}}}),Xr=new Ue({props:{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__.example",$$slots:{default:[WR]},$$scope:{ctx:$}}}),ii=new qe({}),di=new B({props:{name:"class transformers.FlaxRobertaPreLayerNormForQuestionAnswering",anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering",parameters:[{name:"config",val:": RobertaPreLayerNormConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1390"}}),_i=new B({props:{name:"__call__",anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L819",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Qr=new ze({props:{$$slots:{default:[IR]},$$scope:{ctx:$}}}),Hr=new Ue({props:{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.example",$$slots:{default:[ZR]},$$scope:{ctx:$}}}),{c(){d=r("meta"),y=p(),h=r("h1"),f=r("a"),_=r("span"),T(i.$$.fragment),c=p(),P=r("span"),ye=o("RoBERTa-PreLayerNorm"),he=p(),Z=r("h2"),ae=r("a"),te=r("span"),T(R.$$.fragment),be=p(),V=r("span"),ve=o("Overview"),ue=p(),U=r("p"),Te=o("The RoBERTa-PreLayerNorm model was proposed in "),se=r("a"),S=o("fairseq: A Fast, Extensible Toolkit for Sequence Modeling"),Me=o(` by Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, Michael Auli.
It is identical to using the `),ce=r("code"),Q=o("--encoder-normalize-before"),ke=o(" flag in "),le=r("a"),H=o("fairseq"),we=o("."),fe=p(),ee=r("p"),L=o("The abstract from the paper is the following:"),x=p(),ie=r("p"),G=r("em"),Fe=o("fairseq is an open-source sequence modeling toolkit that allows researchers and developers to train custom models for translation, summarization, language modeling, and other text generation tasks. The toolkit is based on PyTorch and supports distributed training across multiple GPUs and machines. We also support fast mixed-precision training and inference on modern GPUs."),ge=p(),q=r("p"),Ne=o("Tips:"),_e=p(),J=r("ul"),X=r("li"),O=o("The implementation is the same as "),de=r("a"),$e=o("Roberta"),D=o(" except instead of using "),pe=r("em"),Re=o("Add and Norm"),A=o(" it does "),me=r("em"),Y=o("Norm and Add"),Pe=o(". "),oe=r("em"),C=o("Add"),je=o(" and "),z=r("em"),Ee=o("Norm"),Le=o(" refers to the Addition and LayerNormalization as described in "),v=r("a"),j=o("Attention Is All You Need"),Ve=o("."),re=p(),Je=r("li"),Ge=o("This is identical to using the "),E=r("code"),Xe=o("--encoder-normalize-before"),Se=o(" flag in "),Ze=r("a"),Qe=o("fairseq"),He=o("."),W=p(),I=r("p"),Oe=o("This model was contributed by "),Ae=r("a"),K=o("andreasmaden"),De=o(`.
The original code can be found `),Be=r("a"),xe=o("here"),Ye=o("."),ne=p(),Ce=r("h2"),Nn=r("a"),Wd=r("span"),T(ba.$$.fragment),_f=p(),Id=r("span"),yf=o("Documentation resources"),ph=p(),ft=r("ul"),Zd=r("li"),ki=r("a"),bf=o("Text classification task guide"),vf=p(),Ad=r("li"),wi=r("a"),Tf=o("Token classification task guide"),Mf=p(),Bd=r("li"),Fi=r("a"),kf=o("Question answering task guide"),wf=p(),qd=r("li"),Ni=r("a"),Ff=o("Causal language modeling task guide"),Nf=p(),Vd=r("li"),$i=r("a"),$f=o("Masked language modeling task guide"),Rf=p(),Gd=r("li"),Ri=r("a"),Pf=o("Multiple choice task guide"),mh=p(),Po=r("h2"),$n=r("a"),Xd=r("span"),T(va.$$.fragment),jf=p(),Sd=r("span"),Ef=o("RobertaPreLayerNormConfig"),hh=p(),Ut=r("div"),T(Ta.$$.fragment),Lf=p(),so=r("p"),Jf=o("This is the configuration class to store the configuration of a "),Pi=r("a"),xf=o("RobertaPreLayerNormModel"),Cf=o(` or a
`),ji=r("a"),zf=o("TFRobertaPreLayerNormModel"),Uf=o(`. It is used to instantiate a RoBERTa-PreLayerNorm 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 RoBERTa-PreLayerNorm
`),Ma=r("a"),Wf=o("andreasmadsen/efficient_mlm_m0.40"),If=o(" architecture."),Zf=p(),jo=r("p"),Af=o("Configuration objects inherit from "),Ei=r("a"),Bf=o("PretrainedConfig"),qf=o(` and can be used to control the model outputs. Read the
documentation from `),Li=r("a"),Vf=o("PretrainedConfig"),Gf=o(" for more information."),Xf=p(),T(Rn.$$.fragment),uh=p(),Eo=r("h2"),Pn=r("a"),Qd=r("span"),T(ka.$$.fragment),Sf=p(),Hd=r("span"),Qf=o("RobertaPreLayerNormModel"),fh=p(),Ke=r("div"),T(wa.$$.fragment),Hf=p(),Od=r("p"),Of=o("The bare RoBERTa-PreLayerNorm Model transformer outputting raw hidden-states without any specific head on top."),Df=p(),Fa=r("p"),Yf=o("This model inherits from "),Ji=r("a"),Kf=o("PreTrainedModel"),eg=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.)`),tg=p(),Na=r("p"),og=o("This model is also a PyTorch "),$a=r("a"),ng=o("torch.nn.Module"),rg=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ag=p(),Ra=r("p"),sg=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 `),Dd=r("em"),lg=o(`Attention is
all you need`),ig=o(`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),dg=p(),lt=r("p"),cg=o("To behave as an decoder the model needs to be initialized with the "),Yd=r("code"),pg=o("is_decoder"),mg=o(` argument of the configuration set
to `),Kd=r("code"),hg=o("True"),ug=o(". To be used in a Seq2Seq model, the model needs to initialized with both "),ec=r("code"),fg=o("is_decoder"),gg=o(` argument and
`),tc=r("code"),_g=o("add_cross_attention"),yg=o(" set to "),oc=r("code"),bg=o("True"),vg=o("; an "),nc=r("code"),Tg=o("encoder_hidden_states"),Mg=o(" is then expected as an input to the forward pass."),kg=p(),jn=r("p"),wg=o(".. _"),rc=r("em"),Fg=o("Attention is all you need"),Ng=o(": "),Pa=r("a"),$g=o("https://arxiv.org/abs/1706.03762"),Rg=p(),Wt=r("div"),T(ja.$$.fragment),Pg=p(),Lo=r("p"),jg=o("The "),xi=r("a"),Eg=o("RobertaPreLayerNormModel"),Lg=o(" forward method, overrides the "),ac=r("code"),Jg=o("__call__"),xg=o(" special method."),Cg=p(),T(En.$$.fragment),zg=p(),T(Ln.$$.fragment),gh=p(),Jo=r("h2"),Jn=r("a"),sc=r("span"),T(Ea.$$.fragment),Ug=p(),lc=r("span"),Wg=o("RobertaPreLayerNormForCausalLM"),_h=p(),_t=r("div"),T(La.$$.fragment),Ig=p(),Ja=r("p"),Zg=o("RoBERTa-PreLayerNorm Model with a "),ic=r("code"),Ag=o("language modeling"),Bg=o(" head on top for CLM fine-tuning."),qg=p(),xa=r("p"),Vg=o("This model inherits from "),Ci=r("a"),Gg=o("PreTrainedModel"),Xg=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.)`),Sg=p(),Ca=r("p"),Qg=o("This model is also a PyTorch "),za=r("a"),Hg=o("torch.nn.Module"),Og=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Dg=p(),It=r("div"),T(Ua.$$.fragment),Yg=p(),xo=r("p"),Kg=o("The "),zi=r("a"),e_=o("RobertaPreLayerNormForCausalLM"),t_=o(" forward method, overrides the "),dc=r("code"),o_=o("__call__"),n_=o(" special method."),r_=p(),T(xn.$$.fragment),a_=p(),T(Cn.$$.fragment),yh=p(),Co=r("h2"),zn=r("a"),cc=r("span"),T(Wa.$$.fragment),s_=p(),pc=r("span"),l_=o("RobertaPreLayerNormForMaskedLM"),bh=p(),yt=r("div"),T(Ia.$$.fragment),i_=p(),Za=r("p"),d_=o("RoBERTa-PreLayerNorm Model with a "),mc=r("code"),c_=o("language modeling"),p_=o(" head on top."),m_=p(),Aa=r("p"),h_=o("This model inherits from "),Ui=r("a"),u_=o("PreTrainedModel"),f_=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.)`),g_=p(),Ba=r("p"),__=o("This model is also a PyTorch "),qa=r("a"),y_=o("torch.nn.Module"),b_=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),v_=p(),Zt=r("div"),T(Va.$$.fragment),T_=p(),zo=r("p"),M_=o("The "),Wi=r("a"),k_=o("RobertaPreLayerNormForMaskedLM"),w_=o(" forward method, overrides the "),hc=r("code"),F_=o("__call__"),N_=o(" special method."),$_=p(),T(Un.$$.fragment),R_=p(),T(Wn.$$.fragment),vh=p(),Uo=r("h2"),In=r("a"),uc=r("span"),T(Ga.$$.fragment),P_=p(),fc=r("span"),j_=o("RobertaPreLayerNormForSequenceClassification"),Th=p(),bt=r("div"),T(Xa.$$.fragment),E_=p(),gc=r("p"),L_=o(`RoBERTa-PreLayerNorm Model transformer with a sequence classification/regression head on top (a linear layer on top
of the pooled output) e.g. for GLUE tasks.`),J_=p(),Sa=r("p"),x_=o("This model inherits from "),Ii=r("a"),C_=o("PreTrainedModel"),z_=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.)`),U_=p(),Qa=r("p"),W_=o("This model is also a PyTorch "),Ha=r("a"),I_=o("torch.nn.Module"),Z_=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),A_=p(),wt=r("div"),T(Oa.$$.fragment),B_=p(),Wo=r("p"),q_=o("The "),Zi=r("a"),V_=o("RobertaPreLayerNormForSequenceClassification"),G_=o(" forward method, overrides the "),_c=r("code"),X_=o("__call__"),S_=o(" special method."),Q_=p(),T(Zn.$$.fragment),H_=p(),T(An.$$.fragment),O_=p(),T(Bn.$$.fragment),Mh=p(),Io=r("h2"),qn=r("a"),yc=r("span"),T(Da.$$.fragment),D_=p(),bc=r("span"),Y_=o("RobertaPreLayerNormForMultipleChoice"),kh=p(),vt=r("div"),T(Ya.$$.fragment),K_=p(),vc=r("p"),ey=o(`RobertaPreLayerNorm 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.`),ty=p(),Ka=r("p"),oy=o("This model inherits from "),Ai=r("a"),ny=o("PreTrainedModel"),ry=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.)`),ay=p(),es=r("p"),sy=o("This model is also a PyTorch "),ts=r("a"),ly=o("torch.nn.Module"),iy=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),dy=p(),At=r("div"),T(os.$$.fragment),cy=p(),Zo=r("p"),py=o("The "),Bi=r("a"),my=o("RobertaPreLayerNormForMultipleChoice"),hy=o(" forward method, overrides the "),Tc=r("code"),uy=o("__call__"),fy=o(" special method."),gy=p(),T(Vn.$$.fragment),_y=p(),T(Gn.$$.fragment),wh=p(),Ao=r("h2"),Xn=r("a"),Mc=r("span"),T(ns.$$.fragment),yy=p(),kc=r("span"),by=o("RobertaPreLayerNormForTokenClassification"),Fh=p(),Tt=r("div"),T(rs.$$.fragment),vy=p(),wc=r("p"),Ty=o(`RobertaPreLayerNorm 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.`),My=p(),as=r("p"),ky=o("This model inherits from "),qi=r("a"),wy=o("PreTrainedModel"),Fy=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.)`),Ny=p(),ss=r("p"),$y=o("This model is also a PyTorch "),ls=r("a"),Ry=o("torch.nn.Module"),Py=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),jy=p(),Bt=r("div"),T(is.$$.fragment),Ey=p(),Bo=r("p"),Ly=o("The "),Vi=r("a"),Jy=o("RobertaPreLayerNormForTokenClassification"),xy=o(" forward method, overrides the "),Fc=r("code"),Cy=o("__call__"),zy=o(" special method."),Uy=p(),T(Sn.$$.fragment),Wy=p(),T(Qn.$$.fragment),Nh=p(),qo=r("h2"),Hn=r("a"),Nc=r("span"),T(ds.$$.fragment),Iy=p(),$c=r("span"),Zy=o("RobertaPreLayerNormForQuestionAnswering"),$h=p(),Mt=r("div"),T(cs.$$.fragment),Ay=p(),Vo=r("p"),By=o(`RobertaPreLayerNorm 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 `),Rc=r("code"),qy=o("span start logits"),Vy=o(" and "),Pc=r("code"),Gy=o("span end logits"),Xy=o(")."),Sy=p(),ps=r("p"),Qy=o("This model inherits from "),Gi=r("a"),Hy=o("PreTrainedModel"),Oy=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.)`),Dy=p(),ms=r("p"),Yy=o("This model is also a PyTorch "),hs=r("a"),Ky=o("torch.nn.Module"),eb=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),tb=p(),qt=r("div"),T(us.$$.fragment),ob=p(),Go=r("p"),nb=o("The "),Xi=r("a"),rb=o("RobertaPreLayerNormForQuestionAnswering"),ab=o(" forward method, overrides the "),jc=r("code"),sb=o("__call__"),lb=o(" special method."),ib=p(),T(On.$$.fragment),db=p(),T(Dn.$$.fragment),Rh=p(),Xo=r("h2"),Yn=r("a"),Ec=r("span"),T(fs.$$.fragment),cb=p(),Lc=r("span"),pb=o("TFRobertaPreLayerNormModel"),Ph=p(),it=r("div"),T(gs.$$.fragment),mb=p(),Jc=r("p"),hb=o("The bare RoBERTa-PreLayerNorm Model transformer outputting raw hidden-states without any specific head on top."),ub=p(),_s=r("p"),fb=o("This model inherits from "),Si=r("a"),gb=o("TFPreTrainedModel"),_b=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.)`),yb=p(),ys=r("p"),bb=o("This model is also a "),bs=r("a"),vb=o("tf.keras.Model"),Tb=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(),T(Kn.$$.fragment),kb=p(),Vt=r("div"),T(vs.$$.fragment),wb=p(),So=r("p"),Fb=o("The "),Qi=r("a"),Nb=o("TFRobertaPreLayerNormModel"),$b=o(" forward method, overrides the "),xc=r("code"),Rb=o("__call__"),Pb=o(" special method."),jb=p(),T(er.$$.fragment),Eb=p(),T(tr.$$.fragment),jh=p(),Qo=r("h2"),or=r("a"),Cc=r("span"),T(Ts.$$.fragment),Lb=p(),zc=r("span"),Jb=o("TFRobertaPreLayerNormForCausalLM"),Eh=p(),Ho=r("div"),T(Ms.$$.fragment),xb=p(),Gt=r("div"),T(ks.$$.fragment),Cb=p(),Oo=r("p"),zb=o("The "),Hi=r("a"),Ub=o("TFRobertaPreLayerNormForCausalLM"),Wb=o(" forward method, overrides the "),Uc=r("code"),Ib=o("__call__"),Zb=o(" special method."),Ab=p(),T(nr.$$.fragment),Bb=p(),T(rr.$$.fragment),Lh=p(),Do=r("h2"),ar=r("a"),Wc=r("span"),T(ws.$$.fragment),qb=p(),Ic=r("span"),Vb=o("TFRobertaPreLayerNormForMaskedLM"),Jh=p(),dt=r("div"),T(Fs.$$.fragment),Gb=p(),Ns=r("p"),Xb=o("RoBERTa-PreLayerNorm Model with a "),Zc=r("code"),Sb=o("language modeling"),Qb=o(" head on top."),Hb=p(),$s=r("p"),Ob=o("This model inherits from "),Oi=r("a"),Db=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.)`),Kb=p(),Rs=r("p"),ev=o("This model is also a "),Ps=r("a"),tv=o("tf.keras.Model"),ov=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.`),nv=p(),T(sr.$$.fragment),rv=p(),Ft=r("div"),T(js.$$.fragment),av=p(),Yo=r("p"),sv=o("The "),Di=r("a"),lv=o("TFRobertaPreLayerNormForMaskedLM"),iv=o(" forward method, overrides the "),Ac=r("code"),dv=o("__call__"),cv=o(" special method."),pv=p(),T(lr.$$.fragment),mv=p(),T(ir.$$.fragment),hv=p(),T(dr.$$.fragment),xh=p(),Ko=r("h2"),cr=r("a"),Bc=r("span"),T(Es.$$.fragment),uv=p(),qc=r("span"),fv=o("TFRobertaPreLayerNormForSequenceClassification"),Ch=p(),ct=r("div"),T(Ls.$$.fragment),gv=p(),Vc=r("p"),_v=o(`RoBERTa-PreLayerNorm Model transformer with a sequence classification/regression head on top (a linear layer on top
of the pooled output) e.g. for GLUE tasks.`),yv=p(),Js=r("p"),bv=o("This model inherits from "),Yi=r("a"),vv=o("TFPreTrainedModel"),Tv=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.)`),Mv=p(),xs=r("p"),kv=o("This model is also a "),Cs=r("a"),wv=o("tf.keras.Model"),Fv=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.`),Nv=p(),T(pr.$$.fragment),$v=p(),Nt=r("div"),T(zs.$$.fragment),Rv=p(),en=r("p"),Pv=o("The "),Ki=r("a"),jv=o("TFRobertaPreLayerNormForSequenceClassification"),Ev=o(" forward method, overrides the "),Gc=r("code"),Lv=o("__call__"),Jv=o(" special method."),xv=p(),T(mr.$$.fragment),Cv=p(),T(hr.$$.fragment),zv=p(),T(ur.$$.fragment),zh=p(),tn=r("h2"),fr=r("a"),Xc=r("span"),T(Us.$$.fragment),Uv=p(),Sc=r("span"),Wv=o("TFRobertaPreLayerNormForMultipleChoice"),Uh=p(),pt=r("div"),T(Ws.$$.fragment),Iv=p(),Qc=r("p"),Zv=o(`RobertaPreLayerNorm 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.`),Av=p(),Is=r("p"),Bv=o("This model inherits from "),ed=r("a"),qv=o("TFPreTrainedModel"),Vv=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.)`),Gv=p(),Zs=r("p"),Xv=o("This model is also a "),As=r("a"),Sv=o("tf.keras.Model"),Qv=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.`),Hv=p(),T(gr.$$.fragment),Ov=p(),Xt=r("div"),T(Bs.$$.fragment),Dv=p(),on=r("p"),Yv=o("The "),td=r("a"),Kv=o("TFRobertaPreLayerNormForMultipleChoice"),eT=o(" forward method, overrides the "),Hc=r("code"),tT=o("__call__"),oT=o(" special method."),nT=p(),T(_r.$$.fragment),rT=p(),T(yr.$$.fragment),Wh=p(),nn=r("h2"),br=r("a"),Oc=r("span"),T(qs.$$.fragment),aT=p(),Dc=r("span"),sT=o("TFRobertaPreLayerNormForTokenClassification"),Ih=p(),mt=r("div"),T(Vs.$$.fragment),lT=p(),Yc=r("p"),iT=o(`RoBERTa-PreLayerNorm 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.`),dT=p(),Gs=r("p"),cT=o("This model inherits from "),od=r("a"),pT=o("TFPreTrainedModel"),mT=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.)`),hT=p(),Xs=r("p"),uT=o("This model is also a "),Ss=r("a"),fT=o("tf.keras.Model"),gT=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.`),_T=p(),T(vr.$$.fragment),yT=p(),$t=r("div"),T(Qs.$$.fragment),bT=p(),rn=r("p"),vT=o("The "),nd=r("a"),TT=o("TFRobertaPreLayerNormForTokenClassification"),MT=o(" forward method, overrides the "),Kc=r("code"),kT=o("__call__"),wT=o(" special method."),FT=p(),T(Tr.$$.fragment),NT=p(),T(Mr.$$.fragment),$T=p(),T(kr.$$.fragment),Zh=p(),an=r("h2"),wr=r("a"),ep=r("span"),T(Hs.$$.fragment),RT=p(),tp=r("span"),PT=o("TFRobertaPreLayerNormForQuestionAnswering"),Ah=p(),ht=r("div"),T(Os.$$.fragment),jT=p(),sn=r("p"),ET=o(`RoBERTa-PreLayerNorm 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 `),op=r("code"),LT=o("span start logits"),JT=o(" and "),np=r("code"),xT=o("span end logits"),CT=o(")."),zT=p(),Ds=r("p"),UT=o("This model inherits from "),rd=r("a"),WT=o("TFPreTrainedModel"),IT=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.)`),ZT=p(),Ys=r("p"),AT=o("This model is also a "),Ks=r("a"),BT=o("tf.keras.Model"),qT=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.`),VT=p(),T(Fr.$$.fragment),GT=p(),Rt=r("div"),T(el.$$.fragment),XT=p(),ln=r("p"),ST=o("The "),ad=r("a"),QT=o("TFRobertaPreLayerNormForQuestionAnswering"),HT=o(" forward method, overrides the "),rp=r("code"),OT=o("__call__"),DT=o(" special method."),YT=p(),T(Nr.$$.fragment),KT=p(),T($r.$$.fragment),eM=p(),T(Rr.$$.fragment),Bh=p(),dn=r("h2"),Pr=r("a"),ap=r("span"),T(tl.$$.fragment),tM=p(),sp=r("span"),oM=o("FlaxRobertaPreLayerNormModel"),qh=p(),et=r("div"),T(ol.$$.fragment),nM=p(),lp=r("p"),rM=o("The bare RoBERTa-PreLayerNorm Model transformer outputting raw hidden-states without any specific head on top."),aM=p(),nl=r("p"),sM=o("This model inherits from "),sd=r("a"),lM=o("FlaxPreTrainedModel"),iM=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),dM=p(),rl=r("p"),cM=o("This model is also a Flax Linen "),al=r("a"),pM=o("flax.linen.Module"),mM=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),hM=p(),ip=r("p"),uM=o("Finally, this model supports inherent JAX features such as:"),fM=p(),lo=r("ul"),dp=r("li"),sl=r("a"),gM=o("Just-In-Time (JIT) compilation"),_M=p(),cp=r("li"),ll=r("a"),yM=o("Automatic Differentiation"),bM=p(),pp=r("li"),il=r("a"),vM=o("Vectorization"),TM=p(),mp=r("li"),dl=r("a"),MM=o("Parallelization"),kM=p(),St=r("div"),T(cl.$$.fragment),wM=p(),cn=r("p"),FM=o("The "),hp=r("code"),NM=o("FlaxRobertaPreLayerNormPreTrainedModel"),$M=o(" forward method, overrides the "),up=r("code"),RM=o("__call__"),PM=o(" special method."),jM=p(),T(jr.$$.fragment),EM=p(),T(Er.$$.fragment),Vh=p(),pn=r("h2"),Lr=r("a"),fp=r("span"),T(pl.$$.fragment),LM=p(),gp=r("span"),JM=o("FlaxRobertaPreLayerNormForCausalLM"),Gh=p(),tt=r("div"),T(ml.$$.fragment),xM=p(),_p=r("p"),CM=o(`RobertaPreLayerNorm Model with a language modeling head on top (a linear layer on top of the hidden-states output)
e.g for autoregressive tasks.`),zM=p(),hl=r("p"),UM=o("This model inherits from "),ld=r("a"),WM=o("FlaxPreTrainedModel"),IM=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),ZM=p(),ul=r("p"),AM=o("This model is also a Flax Linen "),fl=r("a"),BM=o("flax.linen.Module"),qM=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),VM=p(),yp=r("p"),GM=o("Finally, this model supports inherent JAX features such as:"),XM=p(),io=r("ul"),bp=r("li"),gl=r("a"),SM=o("Just-In-Time (JIT) compilation"),QM=p(),vp=r("li"),_l=r("a"),HM=o("Automatic Differentiation"),OM=p(),Tp=r("li"),yl=r("a"),DM=o("Vectorization"),YM=p(),Mp=r("li"),bl=r("a"),KM=o("Parallelization"),ek=p(),Qt=r("div"),T(vl.$$.fragment),tk=p(),mn=r("p"),ok=o("The "),kp=r("code"),nk=o("FlaxRobertaPreLayerNormPreTrainedModel"),rk=o(" forward method, overrides the "),wp=r("code"),ak=o("__call__"),sk=o(" special method."),lk=p(),T(Jr.$$.fragment),ik=p(),T(xr.$$.fragment),Xh=p(),hn=r("h2"),Cr=r("a"),Fp=r("span"),T(Tl.$$.fragment),dk=p(),Np=r("span"),ck=o("FlaxRobertaPreLayerNormForMaskedLM"),Sh=p(),ot=r("div"),T(Ml.$$.fragment),pk=p(),kl=r("p"),mk=o("RoBERTa-PreLayerNorm Model with a "),$p=r("code"),hk=o("language modeling"),uk=o(" head on top."),fk=p(),wl=r("p"),gk=o("This model inherits from "),id=r("a"),_k=o("FlaxPreTrainedModel"),yk=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),bk=p(),Fl=r("p"),vk=o("This model is also a Flax Linen "),Nl=r("a"),Tk=o("flax.linen.Module"),Mk=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),kk=p(),Rp=r("p"),wk=o("Finally, this model supports inherent JAX features such as:"),Fk=p(),co=r("ul"),Pp=r("li"),$l=r("a"),Nk=o("Just-In-Time (JIT) compilation"),$k=p(),jp=r("li"),Rl=r("a"),Rk=o("Automatic Differentiation"),Pk=p(),Ep=r("li"),Pl=r("a"),jk=o("Vectorization"),Ek=p(),Lp=r("li"),jl=r("a"),Lk=o("Parallelization"),Jk=p(),Ht=r("div"),T(El.$$.fragment),xk=p(),un=r("p"),Ck=o("The "),Jp=r("code"),zk=o("FlaxRobertaPreLayerNormPreTrainedModel"),Uk=o(" forward method, overrides the "),xp=r("code"),Wk=o("__call__"),Ik=o(" special method."),Zk=p(),T(zr.$$.fragment),Ak=p(),T(Ur.$$.fragment),Qh=p(),fn=r("h2"),Wr=r("a"),Cp=r("span"),T(Ll.$$.fragment),Bk=p(),zp=r("span"),qk=o("FlaxRobertaPreLayerNormForSequenceClassification"),Hh=p(),nt=r("div"),T(Jl.$$.fragment),Vk=p(),Up=r("p"),Gk=o(`RobertaPreLayerNorm Model transformer with a sequence classification/regression head on top (a linear layer on top
of the pooled output) e.g. for GLUE tasks.`),Xk=p(),xl=r("p"),Sk=o("This model inherits from "),dd=r("a"),Qk=o("FlaxPreTrainedModel"),Hk=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Ok=p(),Cl=r("p"),Dk=o("This model is also a Flax Linen "),zl=r("a"),Yk=o("flax.linen.Module"),Kk=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),ew=p(),Wp=r("p"),tw=o("Finally, this model supports inherent JAX features such as:"),ow=p(),po=r("ul"),Ip=r("li"),Ul=r("a"),nw=o("Just-In-Time (JIT) compilation"),rw=p(),Zp=r("li"),Wl=r("a"),aw=o("Automatic Differentiation"),sw=p(),Ap=r("li"),Il=r("a"),lw=o("Vectorization"),iw=p(),Bp=r("li"),Zl=r("a"),dw=o("Parallelization"),cw=p(),Ot=r("div"),T(Al.$$.fragment),pw=p(),gn=r("p"),mw=o("The "),qp=r("code"),hw=o("FlaxRobertaPreLayerNormPreTrainedModel"),uw=o(" forward method, overrides the "),Vp=r("code"),fw=o("__call__"),gw=o(" special method."),_w=p(),T(Ir.$$.fragment),yw=p(),T(Zr.$$.fragment),Oh=p(),_n=r("h2"),Ar=r("a"),Gp=r("span"),T(Bl.$$.fragment),bw=p(),Xp=r("span"),vw=o("FlaxRobertaPreLayerNormForMultipleChoice"),Dh=p(),rt=r("div"),T(ql.$$.fragment),Tw=p(),Sp=r("p"),Mw=o(`RobertaPreLayerNorm 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.`),kw=p(),Vl=r("p"),ww=o("This model inherits from "),cd=r("a"),Fw=o("FlaxPreTrainedModel"),Nw=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),$w=p(),Gl=r("p"),Rw=o("This model is also a Flax Linen "),Xl=r("a"),Pw=o("flax.linen.Module"),jw=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Ew=p(),Qp=r("p"),Lw=o("Finally, this model supports inherent JAX features such as:"),Jw=p(),mo=r("ul"),Hp=r("li"),Sl=r("a"),xw=o("Just-In-Time (JIT) compilation"),Cw=p(),Op=r("li"),Ql=r("a"),zw=o("Automatic Differentiation"),Uw=p(),Dp=r("li"),Hl=r("a"),Ww=o("Vectorization"),Iw=p(),Yp=r("li"),Ol=r("a"),Zw=o("Parallelization"),Aw=p(),Dt=r("div"),T(Dl.$$.fragment),Bw=p(),yn=r("p"),qw=o("The "),Kp=r("code"),Vw=o("FlaxRobertaPreLayerNormPreTrainedModel"),Gw=o(" forward method, overrides the "),em=r("code"),Xw=o("__call__"),Sw=o(" special method."),Qw=p(),T(Br.$$.fragment),Hw=p(),T(qr.$$.fragment),Yh=p(),bn=r("h2"),Vr=r("a"),tm=r("span"),T(Yl.$$.fragment),Ow=p(),om=r("span"),Dw=o("FlaxRobertaPreLayerNormForTokenClassification"),Kh=p(),at=r("div"),T(Kl.$$.fragment),Yw=p(),nm=r("p"),Kw=o(`RobertaPreLayerNorm 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.`),e2=p(),ei=r("p"),t2=o("This model inherits from "),pd=r("a"),o2=o("FlaxPreTrainedModel"),n2=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),r2=p(),ti=r("p"),a2=o("This model is also a Flax Linen "),oi=r("a"),s2=o("flax.linen.Module"),l2=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),i2=p(),rm=r("p"),d2=o("Finally, this model supports inherent JAX features such as:"),c2=p(),ho=r("ul"),am=r("li"),ni=r("a"),p2=o("Just-In-Time (JIT) compilation"),m2=p(),sm=r("li"),ri=r("a"),h2=o("Automatic Differentiation"),u2=p(),lm=r("li"),ai=r("a"),f2=o("Vectorization"),g2=p(),im=r("li"),si=r("a"),_2=o("Parallelization"),y2=p(),Yt=r("div"),T(li.$$.fragment),b2=p(),vn=r("p"),v2=o("The "),dm=r("code"),T2=o("FlaxRobertaPreLayerNormPreTrainedModel"),M2=o(" forward method, overrides the "),cm=r("code"),k2=o("__call__"),w2=o(" special method."),F2=p(),T(Gr.$$.fragment),N2=p(),T(Xr.$$.fragment),eu=p(),Tn=r("h2"),Sr=r("a"),pm=r("span"),T(ii.$$.fragment),$2=p(),mm=r("span"),R2=o("FlaxRobertaPreLayerNormForQuestionAnswering"),tu=p(),st=r("div"),T(di.$$.fragment),P2=p(),Mn=r("p"),j2=o(`RobertaPreLayerNorm 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 `),hm=r("code"),E2=o("span start logits"),L2=o(" and "),um=r("code"),J2=o("span end logits"),x2=o(")."),C2=p(),ci=r("p"),z2=o("This model inherits from "),md=r("a"),U2=o("FlaxPreTrainedModel"),W2=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),I2=p(),pi=r("p"),Z2=o("This model is also a Flax Linen "),mi=r("a"),A2=o("flax.linen.Module"),B2=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),q2=p(),fm=r("p"),V2=o("Finally, this model supports inherent JAX features such as:"),G2=p(),uo=r("ul"),gm=r("li"),hi=r("a"),X2=o("Just-In-Time (JIT) compilation"),S2=p(),_m=r("li"),ui=r("a"),Q2=o("Automatic Differentiation"),H2=p(),ym=r("li"),fi=r("a"),O2=o("Vectorization"),D2=p(),bm=r("li"),gi=r("a"),Y2=o("Parallelization"),K2=p(),Kt=r("div"),T(_i.$$.fragment),e0=p(),kn=r("p"),t0=o("The "),vm=r("code"),o0=o("FlaxRobertaPreLayerNormPreTrainedModel"),n0=o(" forward method, overrides the "),Tm=r("code"),r0=o("__call__"),a0=o(" special method."),s0=p(),T(Qr.$$.fragment),l0=p(),T(Hr.$$.fragment),this.h()},l(l){const b=I$('[data-svelte="svelte-1phssyn"]',document.head);d=a(b,"META",{name:!0,content:!0}),b.forEach(t),y=m(l),h=a(l,"H1",{class:!0});var yi=s(h);f=a(yi,"A",{id:!0,class:!0,href:!0});var Mm=s(f);_=a(Mm,"SPAN",{});var km=s(_);M(i.$$.fragment,km),km.forEach(t),Mm.forEach(t),c=m(yi),P=a(yi,"SPAN",{});var wm=s(P);ye=n(wm,"RoBERTa-PreLayerNorm"),wm.forEach(t),yi.forEach(t),he=m(l),Z=a(l,"H2",{class:!0});var bi=s(Z);ae=a(bi,"A",{id:!0,class:!0,href:!0});var Fm=s(ae);te=a(Fm,"SPAN",{});var Nm=s(te);M(R.$$.fragment,Nm),Nm.forEach(t),Fm.forEach(t),be=m(bi),V=a(bi,"SPAN",{});var $m=s(V);ve=n($m,"Overview"),$m.forEach(t),bi.forEach(t),ue=m(l),U=a(l,"P",{});var fo=s(U);Te=n(fo,"The RoBERTa-PreLayerNorm model was proposed in "),se=a(fo,"A",{href:!0,rel:!0});var Rm=s(se);S=n(Rm,"fairseq: A Fast, Extensible Toolkit for Sequence Modeling"),Rm.forEach(t),Me=n(fo,` by Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, Michael Auli.
It is identical to using the `),ce=a(fo,"CODE",{});var Pm=s(ce);Q=n(Pm,"--encoder-normalize-before"),Pm.forEach(t),ke=n(fo," flag in "),le=a(fo,"A",{href:!0,rel:!0});var jm=s(le);H=n(jm,"fairseq"),jm.forEach(t),we=n(fo,"."),fo.forEach(t),fe=m(l),ee=a(l,"P",{});var Em=s(ee);L=n(Em,"The abstract from the paper is the following:"),Em.forEach(t),x=m(l),ie=a(l,"P",{});var Lm=s(ie);G=a(Lm,"EM",{});var Jm=s(G);Fe=n(Jm,"fairseq is an open-source sequence modeling toolkit that allows researchers and developers to train custom models for translation, summarization, language modeling, and other text generation tasks. The toolkit is based on PyTorch and supports distributed training across multiple GPUs and machines. We also support fast mixed-precision training and inference on modern GPUs."),Jm.forEach(t),Lm.forEach(t),ge=m(l),q=a(l,"P",{});var xm=s(q);Ne=n(xm,"Tips:"),xm.forEach(t),_e=m(l),J=a(l,"UL",{});var vi=s(J);X=a(vi,"LI",{});var ut=s(X);O=n(ut,"The implementation is the same as "),de=a(ut,"A",{href:!0});var Cm=s(de);$e=n(Cm,"Roberta"),Cm.forEach(t),D=n(ut," except instead of using "),pe=a(ut,"EM",{});var zm=s(pe);Re=n(zm,"Add and Norm"),zm.forEach(t),A=n(ut," it does "),me=a(ut,"EM",{});var Um=s(me);Y=n(Um,"Norm and Add"),Um.forEach(t),Pe=n(ut,". "),oe=a(ut,"EM",{});var Wm=s(oe);C=n(Wm,"Add"),Wm.forEach(t),je=n(ut," and "),z=a(ut,"EM",{});var Im=s(z);Ee=n(Im,"Norm"),Im.forEach(t),Le=n(ut," refers to the Addition and LayerNormalization as described in "),v=a(ut,"A",{href:!0,rel:!0});var Zm=s(v);j=n(Zm,"Attention Is All You Need"),Zm.forEach(t),Ve=n(ut,"."),ut.forEach(t),re=m(vi),Je=a(vi,"LI",{});var wn=s(Je);Ge=n(wn,"This is identical to using the "),E=a(wn,"CODE",{});var Am=s(E);Xe=n(Am,"--encoder-normalize-before"),Am.forEach(t),Se=n(wn," flag in "),Ze=a(wn,"A",{href:!0,rel:!0});var Bm=s(Ze);Qe=n(Bm,"fairseq"),Bm.forEach(t),He=n(wn,"."),wn.forEach(t),vi.forEach(t),W=m(l),I=a(l,"P",{});var Fn=s(I);Oe=n(Fn,"This model was contributed by "),Ae=a(Fn,"A",{href:!0,rel:!0});var qm=s(Ae);K=n(qm,"andreasmaden"),qm.forEach(t),De=n(Fn,`.
The original code can be found `),Be=a(Fn,"A",{href:!0,rel:!0});var Vm=s(Be);xe=n(Vm,"here"),Vm.forEach(t),Ye=n(Fn,"."),Fn.forEach(t),ne=m(l),Ce=a(l,"H2",{class:!0});var Ti=s(Ce);Nn=a(Ti,"A",{id:!0,class:!0,href:!0});var Gm=s(Nn);Wd=a(Gm,"SPAN",{});var Xm=s(Wd);M(ba.$$.fragment,Xm),Xm.forEach(t),Gm.forEach(t),_f=m(Ti),Id=a(Ti,"SPAN",{});var Sm=s(Id);yf=n(Sm,"Documentation resources"),Sm.forEach(t),Ti.forEach(t),ph=m(l),ft=a(l,"UL",{});var kt=s(ft);Zd=a(kt,"LI",{});var Qm=s(Zd);ki=a(Qm,"A",{href:!0});var Hm=s(ki);bf=n(Hm,"Text classification task guide"),Hm.forEach(t),Qm.forEach(t),vf=m(kt),Ad=a(kt,"LI",{});var Om=s(Ad);wi=a(Om,"A",{href:!0});var Dm=s(wi);Tf=n(Dm,"Token classification task guide"),Dm.forEach(t),Om.forEach(t),Mf=m(kt),Bd=a(kt,"LI",{});var Ym=s(Bd);Fi=a(Ym,"A",{href:!0});var Km=s(Fi);kf=n(Km,"Question answering task guide"),Km.forEach(t),Ym.forEach(t),wf=m(kt),qd=a(kt,"LI",{});var eh=s(qd);Ni=a(eh,"A",{href:!0});var th=s(Ni);Ff=n(th,"Causal language modeling task guide"),th.forEach(t),eh.forEach(t),Nf=m(kt),Vd=a(kt,"LI",{});var oh=s(Vd);$i=a(oh,"A",{href:!0});var nh=s($i);$f=n(nh,"Masked language modeling task guide"),nh.forEach(t),oh.forEach(t),Rf=m(kt),Gd=a(kt,"LI",{});var rh=s(Gd);Ri=a(rh,"A",{href:!0});var ah=s(Ri);Pf=n(ah,"Multiple choice task guide"),ah.forEach(t),rh.forEach(t),kt.forEach(t),mh=m(l),Po=a(l,"H2",{class:!0});var Mi=s(Po);$n=a(Mi,"A",{id:!0,class:!0,href:!0});var sh=s($n);Xd=a(sh,"SPAN",{});var lh=s(Xd);M(va.$$.fragment,lh),lh.forEach(t),sh.forEach(t),jf=m(Mi),Sd=a(Mi,"SPAN",{});var ih=s(Sd);Ef=n(ih,"RobertaPreLayerNormConfig"),ih.forEach(t),Mi.forEach(t),hh=m(l),Ut=a(l,"DIV",{class:!0});var go=s(Ut);M(Ta.$$.fragment,go),Lf=m(go),so=a(go,"P",{});var _o=s(so);Jf=n(_o,"This is the configuration class to store the configuration of a "),Pi=a(_o,"A",{href:!0});var dh=s(Pi);xf=n(dh,"RobertaPreLayerNormModel"),dh.forEach(t),Cf=n(_o,` or a
`),ji=a(_o,"A",{href:!0});var i0=s(ji);zf=n(i0,"TFRobertaPreLayerNormModel"),i0.forEach(t),Uf=n(_o,`. It is used to instantiate a RoBERTa-PreLayerNorm 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 RoBERTa-PreLayerNorm
`),Ma=a(_o,"A",{href:!0,rel:!0});var d0=s(Ma);Wf=n(d0,"andreasmadsen/efficient_mlm_m0.40"),d0.forEach(t),If=n(_o," architecture."),_o.forEach(t),Zf=m(go),jo=a(go,"P",{});var hd=s(jo);Af=n(hd,"Configuration objects inherit from "),Ei=a(hd,"A",{href:!0});var c0=s(Ei);Bf=n(c0,"PretrainedConfig"),c0.forEach(t),qf=n(hd,` and can be used to control the model outputs. Read the
documentation from `),Li=a(hd,"A",{href:!0});var p0=s(Li);Vf=n(p0,"PretrainedConfig"),p0.forEach(t),Gf=n(hd," for more information."),hd.forEach(t),Xf=m(go),M(Rn.$$.fragment,go),go.forEach(t),uh=m(l),Eo=a(l,"H2",{class:!0});var nu=s(Eo);Pn=a(nu,"A",{id:!0,class:!0,href:!0});var m0=s(Pn);Qd=a(m0,"SPAN",{});var h0=s(Qd);M(ka.$$.fragment,h0),h0.forEach(t),m0.forEach(t),Sf=m(nu),Hd=a(nu,"SPAN",{});var u0=s(Hd);Qf=n(u0,"RobertaPreLayerNormModel"),u0.forEach(t),nu.forEach(t),fh=m(l),Ke=a(l,"DIV",{class:!0});var gt=s(Ke);M(wa.$$.fragment,gt),Hf=m(gt),Od=a(gt,"P",{});var f0=s(Od);Of=n(f0,"The bare RoBERTa-PreLayerNorm Model transformer outputting raw hidden-states without any specific head on top."),f0.forEach(t),Df=m(gt),Fa=a(gt,"P",{});var ru=s(Fa);Yf=n(ru,"This model inherits from "),Ji=a(ru,"A",{href:!0});var g0=s(Ji);Kf=n(g0,"PreTrainedModel"),g0.forEach(t),eg=n(ru,`. 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.)`),ru.forEach(t),tg=m(gt),Na=a(gt,"P",{});var au=s(Na);og=n(au,"This model is also a PyTorch "),$a=a(au,"A",{href:!0,rel:!0});var _0=s($a);ng=n(_0,"torch.nn.Module"),_0.forEach(t),rg=n(au,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),au.forEach(t),ag=m(gt),Ra=a(gt,"P",{});var su=s(Ra);sg=n(su,`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 `),Dd=a(su,"EM",{});var y0=s(Dd);lg=n(y0,`Attention is
all you need`),y0.forEach(t),ig=n(su,`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),su.forEach(t),dg=m(gt),lt=a(gt,"P",{});var Pt=s(lt);cg=n(Pt,"To behave as an decoder the model needs to be initialized with the "),Yd=a(Pt,"CODE",{});var b0=s(Yd);pg=n(b0,"is_decoder"),b0.forEach(t),mg=n(Pt,` argument of the configuration set
to `),Kd=a(Pt,"CODE",{});var v0=s(Kd);hg=n(v0,"True"),v0.forEach(t),ug=n(Pt,". To be used in a Seq2Seq model, the model needs to initialized with both "),ec=a(Pt,"CODE",{});var T0=s(ec);fg=n(T0,"is_decoder"),T0.forEach(t),gg=n(Pt,` argument and
`),tc=a(Pt,"CODE",{});var M0=s(tc);_g=n(M0,"add_cross_attention"),M0.forEach(t),yg=n(Pt," set to "),oc=a(Pt,"CODE",{});var k0=s(oc);bg=n(k0,"True"),k0.forEach(t),vg=n(Pt,"; an "),nc=a(Pt,"CODE",{});var w0=s(nc);Tg=n(w0,"encoder_hidden_states"),w0.forEach(t),Mg=n(Pt," is then expected as an input to the forward pass."),Pt.forEach(t),kg=m(gt),jn=a(gt,"P",{});var ch=s(jn);wg=n(ch,".. _"),rc=a(ch,"EM",{});var F0=s(rc);Fg=n(F0,"Attention is all you need"),F0.forEach(t),Ng=n(ch,": "),Pa=a(ch,"A",{href:!0,rel:!0});var N0=s(Pa);$g=n(N0,"https://arxiv.org/abs/1706.03762"),N0.forEach(t),ch.forEach(t),Rg=m(gt),Wt=a(gt,"DIV",{class:!0});var Or=s(Wt);M(ja.$$.fragment,Or),Pg=m(Or),Lo=a(Or,"P",{});var ud=s(Lo);jg=n(ud,"The "),xi=a(ud,"A",{href:!0});var $0=s(xi);Eg=n($0,"RobertaPreLayerNormModel"),$0.forEach(t),Lg=n(ud," forward method, overrides the "),ac=a(ud,"CODE",{});var R0=s(ac);Jg=n(R0,"__call__"),R0.forEach(t),xg=n(ud," special method."),ud.forEach(t),Cg=m(Or),M(En.$$.fragment,Or),zg=m(Or),M(Ln.$$.fragment,Or),Or.forEach(t),gt.forEach(t),gh=m(l),Jo=a(l,"H2",{class:!0});var lu=s(Jo);Jn=a(lu,"A",{id:!0,class:!0,href:!0});var P0=s(Jn);sc=a(P0,"SPAN",{});var j0=s(sc);M(Ea.$$.fragment,j0),j0.forEach(t),P0.forEach(t),Ug=m(lu),lc=a(lu,"SPAN",{});var E0=s(lc);Wg=n(E0,"RobertaPreLayerNormForCausalLM"),E0.forEach(t),lu.forEach(t),_h=m(l),_t=a(l,"DIV",{class:!0});var yo=s(_t);M(La.$$.fragment,yo),Ig=m(yo),Ja=a(yo,"P",{});var iu=s(Ja);Zg=n(iu,"RoBERTa-PreLayerNorm Model with a "),ic=a(iu,"CODE",{});var L0=s(ic);Ag=n(L0,"language modeling"),L0.forEach(t),Bg=n(iu," head on top for CLM fine-tuning."),iu.forEach(t),qg=m(yo),xa=a(yo,"P",{});var du=s(xa);Vg=n(du,"This model inherits from "),Ci=a(du,"A",{href:!0});var J0=s(Ci);Gg=n(J0,"PreTrainedModel"),J0.forEach(t),Xg=n(du,`. 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.)`),du.forEach(t),Sg=m(yo),Ca=a(yo,"P",{});var cu=s(Ca);Qg=n(cu,"This model is also a PyTorch "),za=a(cu,"A",{href:!0,rel:!0});var x0=s(za);Hg=n(x0,"torch.nn.Module"),x0.forEach(t),Og=n(cu,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),cu.forEach(t),Dg=m(yo),It=a(yo,"DIV",{class:!0});var Dr=s(It);M(Ua.$$.fragment,Dr),Yg=m(Dr),xo=a(Dr,"P",{});var fd=s(xo);Kg=n(fd,"The "),zi=a(fd,"A",{href:!0});var C0=s(zi);e_=n(C0,"RobertaPreLayerNormForCausalLM"),C0.forEach(t),t_=n(fd," forward method, overrides the "),dc=a(fd,"CODE",{});var z0=s(dc);o_=n(z0,"__call__"),z0.forEach(t),n_=n(fd," special method."),fd.forEach(t),r_=m(Dr),M(xn.$$.fragment,Dr),a_=m(Dr),M(Cn.$$.fragment,Dr),Dr.forEach(t),yo.forEach(t),yh=m(l),Co=a(l,"H2",{class:!0});var pu=s(Co);zn=a(pu,"A",{id:!0,class:!0,href:!0});var U0=s(zn);cc=a(U0,"SPAN",{});var W0=s(cc);M(Wa.$$.fragment,W0),W0.forEach(t),U0.forEach(t),s_=m(pu),pc=a(pu,"SPAN",{});var I0=s(pc);l_=n(I0,"RobertaPreLayerNormForMaskedLM"),I0.forEach(t),pu.forEach(t),bh=m(l),yt=a(l,"DIV",{class:!0});var bo=s(yt);M(Ia.$$.fragment,bo),i_=m(bo),Za=a(bo,"P",{});var mu=s(Za);d_=n(mu,"RoBERTa-PreLayerNorm Model with a "),mc=a(mu,"CODE",{});var Z0=s(mc);c_=n(Z0,"language modeling"),Z0.forEach(t),p_=n(mu," head on top."),mu.forEach(t),m_=m(bo),Aa=a(bo,"P",{});var hu=s(Aa);h_=n(hu,"This model inherits from "),Ui=a(hu,"A",{href:!0});var A0=s(Ui);u_=n(A0,"PreTrainedModel"),A0.forEach(t),f_=n(hu,`. 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.)`),hu.forEach(t),g_=m(bo),Ba=a(bo,"P",{});var uu=s(Ba);__=n(uu,"This model is also a PyTorch "),qa=a(uu,"A",{href:!0,rel:!0});var B0=s(qa);y_=n(B0,"torch.nn.Module"),B0.forEach(t),b_=n(uu,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),uu.forEach(t),v_=m(bo),Zt=a(bo,"DIV",{class:!0});var Yr=s(Zt);M(Va.$$.fragment,Yr),T_=m(Yr),zo=a(Yr,"P",{});var gd=s(zo);M_=n(gd,"The "),Wi=a(gd,"A",{href:!0});var q0=s(Wi);k_=n(q0,"RobertaPreLayerNormForMaskedLM"),q0.forEach(t),w_=n(gd," forward method, overrides the "),hc=a(gd,"CODE",{});var V0=s(hc);F_=n(V0,"__call__"),V0.forEach(t),N_=n(gd," special method."),gd.forEach(t),$_=m(Yr),M(Un.$$.fragment,Yr),R_=m(Yr),M(Wn.$$.fragment,Yr),Yr.forEach(t),bo.forEach(t),vh=m(l),Uo=a(l,"H2",{class:!0});var fu=s(Uo);In=a(fu,"A",{id:!0,class:!0,href:!0});var G0=s(In);uc=a(G0,"SPAN",{});var X0=s(uc);M(Ga.$$.fragment,X0),X0.forEach(t),G0.forEach(t),P_=m(fu),fc=a(fu,"SPAN",{});var S0=s(fc);j_=n(S0,"RobertaPreLayerNormForSequenceClassification"),S0.forEach(t),fu.forEach(t),Th=m(l),bt=a(l,"DIV",{class:!0});var vo=s(bt);M(Xa.$$.fragment,vo),E_=m(vo),gc=a(vo,"P",{});var Q0=s(gc);L_=n(Q0,`RoBERTa-PreLayerNorm Model transformer with a sequence classification/regression head on top (a linear layer on top
of the pooled output) e.g. for GLUE tasks.`),Q0.forEach(t),J_=m(vo),Sa=a(vo,"P",{});var gu=s(Sa);x_=n(gu,"This model inherits from "),Ii=a(gu,"A",{href:!0});var H0=s(Ii);C_=n(H0,"PreTrainedModel"),H0.forEach(t),z_=n(gu,`. 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.)`),gu.forEach(t),U_=m(vo),Qa=a(vo,"P",{});var _u=s(Qa);W_=n(_u,"This model is also a PyTorch "),Ha=a(_u,"A",{href:!0,rel:!0});var O0=s(Ha);I_=n(O0,"torch.nn.Module"),O0.forEach(t),Z_=n(_u,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),_u.forEach(t),A_=m(vo),wt=a(vo,"DIV",{class:!0});var To=s(wt);M(Oa.$$.fragment,To),B_=m(To),Wo=a(To,"P",{});var _d=s(Wo);q_=n(_d,"The "),Zi=a(_d,"A",{href:!0});var D0=s(Zi);V_=n(D0,"RobertaPreLayerNormForSequenceClassification"),D0.forEach(t),G_=n(_d," forward method, overrides the "),_c=a(_d,"CODE",{});var Y0=s(_c);X_=n(Y0,"__call__"),Y0.forEach(t),S_=n(_d," special method."),_d.forEach(t),Q_=m(To),M(Zn.$$.fragment,To),H_=m(To),M(An.$$.fragment,To),O_=m(To),M(Bn.$$.fragment,To),To.forEach(t),vo.forEach(t),Mh=m(l),Io=a(l,"H2",{class:!0});var yu=s(Io);qn=a(yu,"A",{id:!0,class:!0,href:!0});var K0=s(qn);yc=a(K0,"SPAN",{});var e1=s(yc);M(Da.$$.fragment,e1),e1.forEach(t),K0.forEach(t),D_=m(yu),bc=a(yu,"SPAN",{});var t1=s(bc);Y_=n(t1,"RobertaPreLayerNormForMultipleChoice"),t1.forEach(t),yu.forEach(t),kh=m(l),vt=a(l,"DIV",{class:!0});var Mo=s(vt);M(Ya.$$.fragment,Mo),K_=m(Mo),vc=a(Mo,"P",{});var o1=s(vc);ey=n(o1,`RobertaPreLayerNorm 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.`),o1.forEach(t),ty=m(Mo),Ka=a(Mo,"P",{});var bu=s(Ka);oy=n(bu,"This model inherits from "),Ai=a(bu,"A",{href:!0});var n1=s(Ai);ny=n(n1,"PreTrainedModel"),n1.forEach(t),ry=n(bu,`. 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.)`),bu.forEach(t),ay=m(Mo),es=a(Mo,"P",{});var vu=s(es);sy=n(vu,"This model is also a PyTorch "),ts=a(vu,"A",{href:!0,rel:!0});var r1=s(ts);ly=n(r1,"torch.nn.Module"),r1.forEach(t),iy=n(vu,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),vu.forEach(t),dy=m(Mo),At=a(Mo,"DIV",{class:!0});var Kr=s(At);M(os.$$.fragment,Kr),cy=m(Kr),Zo=a(Kr,"P",{});var yd=s(Zo);py=n(yd,"The "),Bi=a(yd,"A",{href:!0});var a1=s(Bi);my=n(a1,"RobertaPreLayerNormForMultipleChoice"),a1.forEach(t),hy=n(yd," forward method, overrides the "),Tc=a(yd,"CODE",{});var s1=s(Tc);uy=n(s1,"__call__"),s1.forEach(t),fy=n(yd," special method."),yd.forEach(t),gy=m(Kr),M(Vn.$$.fragment,Kr),_y=m(Kr),M(Gn.$$.fragment,Kr),Kr.forEach(t),Mo.forEach(t),wh=m(l),Ao=a(l,"H2",{class:!0});var Tu=s(Ao);Xn=a(Tu,"A",{id:!0,class:!0,href:!0});var l1=s(Xn);Mc=a(l1,"SPAN",{});var i1=s(Mc);M(ns.$$.fragment,i1),i1.forEach(t),l1.forEach(t),yy=m(Tu),kc=a(Tu,"SPAN",{});var d1=s(kc);by=n(d1,"RobertaPreLayerNormForTokenClassification"),d1.forEach(t),Tu.forEach(t),Fh=m(l),Tt=a(l,"DIV",{class:!0});var ko=s(Tt);M(rs.$$.fragment,ko),vy=m(ko),wc=a(ko,"P",{});var c1=s(wc);Ty=n(c1,`RobertaPreLayerNorm 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.`),c1.forEach(t),My=m(ko),as=a(ko,"P",{});var Mu=s(as);ky=n(Mu,"This model inherits from "),qi=a(Mu,"A",{href:!0});var p1=s(qi);wy=n(p1,"PreTrainedModel"),p1.forEach(t),Fy=n(Mu,`. 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.)`),Mu.forEach(t),Ny=m(ko),ss=a(ko,"P",{});var ku=s(ss);$y=n(ku,"This model is also a PyTorch "),ls=a(ku,"A",{href:!0,rel:!0});var m1=s(ls);Ry=n(m1,"torch.nn.Module"),m1.forEach(t),Py=n(ku,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ku.forEach(t),jy=m(ko),Bt=a(ko,"DIV",{class:!0});var ea=s(Bt);M(is.$$.fragment,ea),Ey=m(ea),Bo=a(ea,"P",{});var bd=s(Bo);Ly=n(bd,"The "),Vi=a(bd,"A",{href:!0});var h1=s(Vi);Jy=n(h1,"RobertaPreLayerNormForTokenClassification"),h1.forEach(t),xy=n(bd," forward method, overrides the "),Fc=a(bd,"CODE",{});var u1=s(Fc);Cy=n(u1,"__call__"),u1.forEach(t),zy=n(bd," special method."),bd.forEach(t),Uy=m(ea),M(Sn.$$.fragment,ea),Wy=m(ea),M(Qn.$$.fragment,ea),ea.forEach(t),ko.forEach(t),Nh=m(l),qo=a(l,"H2",{class:!0});var wu=s(qo);Hn=a(wu,"A",{id:!0,class:!0,href:!0});var f1=s(Hn);Nc=a(f1,"SPAN",{});var g1=s(Nc);M(ds.$$.fragment,g1),g1.forEach(t),f1.forEach(t),Iy=m(wu),$c=a(wu,"SPAN",{});var _1=s($c);Zy=n(_1,"RobertaPreLayerNormForQuestionAnswering"),_1.forEach(t),wu.forEach(t),$h=m(l),Mt=a(l,"DIV",{class:!0});var wo=s(Mt);M(cs.$$.fragment,wo),Ay=m(wo),Vo=a(wo,"P",{});var vd=s(Vo);By=n(vd,`RobertaPreLayerNorm 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 `),Rc=a(vd,"CODE",{});var y1=s(Rc);qy=n(y1,"span start logits"),y1.forEach(t),Vy=n(vd," and "),Pc=a(vd,"CODE",{});var b1=s(Pc);Gy=n(b1,"span end logits"),b1.forEach(t),Xy=n(vd,")."),vd.forEach(t),Sy=m(wo),ps=a(wo,"P",{});var Fu=s(ps);Qy=n(Fu,"This model inherits from "),Gi=a(Fu,"A",{href:!0});var v1=s(Gi);Hy=n(v1,"PreTrainedModel"),v1.forEach(t),Oy=n(Fu,`. 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.)`),Fu.forEach(t),Dy=m(wo),ms=a(wo,"P",{});var Nu=s(ms);Yy=n(Nu,"This model is also a PyTorch "),hs=a(Nu,"A",{href:!0,rel:!0});var T1=s(hs);Ky=n(T1,"torch.nn.Module"),T1.forEach(t),eb=n(Nu,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Nu.forEach(t),tb=m(wo),qt=a(wo,"DIV",{class:!0});var ta=s(qt);M(us.$$.fragment,ta),ob=m(ta),Go=a(ta,"P",{});var Td=s(Go);nb=n(Td,"The "),Xi=a(Td,"A",{href:!0});var M1=s(Xi);rb=n(M1,"RobertaPreLayerNormForQuestionAnswering"),M1.forEach(t),ab=n(Td," forward method, overrides the "),jc=a(Td,"CODE",{});var k1=s(jc);sb=n(k1,"__call__"),k1.forEach(t),lb=n(Td," special method."),Td.forEach(t),ib=m(ta),M(On.$$.fragment,ta),db=m(ta),M(Dn.$$.fragment,ta),ta.forEach(t),wo.forEach(t),Rh=m(l),Xo=a(l,"H2",{class:!0});var $u=s(Xo);Yn=a($u,"A",{id:!0,class:!0,href:!0});var w1=s(Yn);Ec=a(w1,"SPAN",{});var F1=s(Ec);M(fs.$$.fragment,F1),F1.forEach(t),w1.forEach(t),cb=m($u),Lc=a($u,"SPAN",{});var N1=s(Lc);pb=n(N1,"TFRobertaPreLayerNormModel"),N1.forEach(t),$u.forEach(t),Ph=m(l),it=a(l,"DIV",{class:!0});var eo=s(it);M(gs.$$.fragment,eo),mb=m(eo),Jc=a(eo,"P",{});var $1=s(Jc);hb=n($1,"The bare RoBERTa-PreLayerNorm Model transformer outputting raw hidden-states without any specific head on top."),$1.forEach(t),ub=m(eo),_s=a(eo,"P",{});var Ru=s(_s);fb=n(Ru,"This model inherits from "),Si=a(Ru,"A",{href:!0});var R1=s(Si);gb=n(R1,"TFPreTrainedModel"),R1.forEach(t),_b=n(Ru,`. 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.)`),Ru.forEach(t),yb=m(eo),ys=a(eo,"P",{});var Pu=s(ys);bb=n(Pu,"This model is also a "),bs=a(Pu,"A",{href:!0,rel:!0});var P1=s(bs);vb=n(P1,"tf.keras.Model"),P1.forEach(t),Tb=n(Pu,` 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.`),Pu.forEach(t),Mb=m(eo),M(Kn.$$.fragment,eo),kb=m(eo),Vt=a(eo,"DIV",{class:!0});var oa=s(Vt);M(vs.$$.fragment,oa),wb=m(oa),So=a(oa,"P",{});var Md=s(So);Fb=n(Md,"The "),Qi=a(Md,"A",{href:!0});var j1=s(Qi);Nb=n(j1,"TFRobertaPreLayerNormModel"),j1.forEach(t),$b=n(Md," forward method, overrides the "),xc=a(Md,"CODE",{});var E1=s(xc);Rb=n(E1,"__call__"),E1.forEach(t),Pb=n(Md," special method."),Md.forEach(t),jb=m(oa),M(er.$$.fragment,oa),Eb=m(oa),M(tr.$$.fragment,oa),oa.forEach(t),eo.forEach(t),jh=m(l),Qo=a(l,"H2",{class:!0});var ju=s(Qo);or=a(ju,"A",{id:!0,class:!0,href:!0});var L1=s(or);Cc=a(L1,"SPAN",{});var J1=s(Cc);M(Ts.$$.fragment,J1),J1.forEach(t),L1.forEach(t),Lb=m(ju),zc=a(ju,"SPAN",{});var x1=s(zc);Jb=n(x1,"TFRobertaPreLayerNormForCausalLM"),x1.forEach(t),ju.forEach(t),Eh=m(l),Ho=a(l,"DIV",{class:!0});var Eu=s(Ho);M(Ms.$$.fragment,Eu),xb=m(Eu),Gt=a(Eu,"DIV",{class:!0});var na=s(Gt);M(ks.$$.fragment,na),Cb=m(na),Oo=a(na,"P",{});var kd=s(Oo);zb=n(kd,"The "),Hi=a(kd,"A",{href:!0});var C1=s(Hi);Ub=n(C1,"TFRobertaPreLayerNormForCausalLM"),C1.forEach(t),Wb=n(kd," forward method, overrides the "),Uc=a(kd,"CODE",{});var z1=s(Uc);Ib=n(z1,"__call__"),z1.forEach(t),Zb=n(kd," special method."),kd.forEach(t),Ab=m(na),M(nr.$$.fragment,na),Bb=m(na),M(rr.$$.fragment,na),na.forEach(t),Eu.forEach(t),Lh=m(l),Do=a(l,"H2",{class:!0});var Lu=s(Do);ar=a(Lu,"A",{id:!0,class:!0,href:!0});var U1=s(ar);Wc=a(U1,"SPAN",{});var W1=s(Wc);M(ws.$$.fragment,W1),W1.forEach(t),U1.forEach(t),qb=m(Lu),Ic=a(Lu,"SPAN",{});var I1=s(Ic);Vb=n(I1,"TFRobertaPreLayerNormForMaskedLM"),I1.forEach(t),Lu.forEach(t),Jh=m(l),dt=a(l,"DIV",{class:!0});var to=s(dt);M(Fs.$$.fragment,to),Gb=m(to),Ns=a(to,"P",{});var Ju=s(Ns);Xb=n(Ju,"RoBERTa-PreLayerNorm Model with a "),Zc=a(Ju,"CODE",{});var Z1=s(Zc);Sb=n(Z1,"language modeling"),Z1.forEach(t),Qb=n(Ju," head on top."),Ju.forEach(t),Hb=m(to),$s=a(to,"P",{});var xu=s($s);Ob=n(xu,"This model inherits from "),Oi=a(xu,"A",{href:!0});var A1=s(Oi);Db=n(A1,"TFPreTrainedModel"),A1.forEach(t),Yb=n(xu,`. 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.)`),xu.forEach(t),Kb=m(to),Rs=a(to,"P",{});var Cu=s(Rs);ev=n(Cu,"This model is also a "),Ps=a(Cu,"A",{href:!0,rel:!0});var B1=s(Ps);tv=n(B1,"tf.keras.Model"),B1.forEach(t),ov=n(Cu,` 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.`),Cu.forEach(t),nv=m(to),M(sr.$$.fragment,to),rv=m(to),Ft=a(to,"DIV",{class:!0});var Fo=s(Ft);M(js.$$.fragment,Fo),av=m(Fo),Yo=a(Fo,"P",{});var wd=s(Yo);sv=n(wd,"The "),Di=a(wd,"A",{href:!0});var q1=s(Di);lv=n(q1,"TFRobertaPreLayerNormForMaskedLM"),q1.forEach(t),iv=n(wd," forward method, overrides the "),Ac=a(wd,"CODE",{});var V1=s(Ac);dv=n(V1,"__call__"),V1.forEach(t),cv=n(wd," special method."),wd.forEach(t),pv=m(Fo),M(lr.$$.fragment,Fo),mv=m(Fo),M(ir.$$.fragment,Fo),hv=m(Fo),M(dr.$$.fragment,Fo),Fo.forEach(t),to.forEach(t),xh=m(l),Ko=a(l,"H2",{class:!0});var zu=s(Ko);cr=a(zu,"A",{id:!0,class:!0,href:!0});var G1=s(cr);Bc=a(G1,"SPAN",{});var X1=s(Bc);M(Es.$$.fragment,X1),X1.forEach(t),G1.forEach(t),uv=m(zu),qc=a(zu,"SPAN",{});var S1=s(qc);fv=n(S1,"TFRobertaPreLayerNormForSequenceClassification"),S1.forEach(t),zu.forEach(t),Ch=m(l),ct=a(l,"DIV",{class:!0});var oo=s(ct);M(Ls.$$.fragment,oo),gv=m(oo),Vc=a(oo,"P",{});var Q1=s(Vc);_v=n(Q1,`RoBERTa-PreLayerNorm Model transformer with a sequence classification/regression head on top (a linear layer on top
of the pooled output) e.g. for GLUE tasks.`),Q1.forEach(t),yv=m(oo),Js=a(oo,"P",{});var Uu=s(Js);bv=n(Uu,"This model inherits from "),Yi=a(Uu,"A",{href:!0});var H1=s(Yi);vv=n(H1,"TFPreTrainedModel"),H1.forEach(t),Tv=n(Uu,`. 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.)`),Uu.forEach(t),Mv=m(oo),xs=a(oo,"P",{});var Wu=s(xs);kv=n(Wu,"This model is also a "),Cs=a(Wu,"A",{href:!0,rel:!0});var O1=s(Cs);wv=n(O1,"tf.keras.Model"),O1.forEach(t),Fv=n(Wu,` 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.`),Wu.forEach(t),Nv=m(oo),M(pr.$$.fragment,oo),$v=m(oo),Nt=a(oo,"DIV",{class:!0});var No=s(Nt);M(zs.$$.fragment,No),Rv=m(No),en=a(No,"P",{});var Fd=s(en);Pv=n(Fd,"The "),Ki=a(Fd,"A",{href:!0});var D1=s(Ki);jv=n(D1,"TFRobertaPreLayerNormForSequenceClassification"),D1.forEach(t),Ev=n(Fd," forward method, overrides the "),Gc=a(Fd,"CODE",{});var Y1=s(Gc);Lv=n(Y1,"__call__"),Y1.forEach(t),Jv=n(Fd," special method."),Fd.forEach(t),xv=m(No),M(mr.$$.fragment,No),Cv=m(No),M(hr.$$.fragment,No),zv=m(No),M(ur.$$.fragment,No),No.forEach(t),oo.forEach(t),zh=m(l),tn=a(l,"H2",{class:!0});var Iu=s(tn);fr=a(Iu,"A",{id:!0,class:!0,href:!0});var K1=s(fr);Xc=a(K1,"SPAN",{});var eF=s(Xc);M(Us.$$.fragment,eF),eF.forEach(t),K1.forEach(t),Uv=m(Iu),Sc=a(Iu,"SPAN",{});var tF=s(Sc);Wv=n(tF,"TFRobertaPreLayerNormForMultipleChoice"),tF.forEach(t),Iu.forEach(t),Uh=m(l),pt=a(l,"DIV",{class:!0});var no=s(pt);M(Ws.$$.fragment,no),Iv=m(no),Qc=a(no,"P",{});var oF=s(Qc);Zv=n(oF,`RobertaPreLayerNorm 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.`),oF.forEach(t),Av=m(no),Is=a(no,"P",{});var Zu=s(Is);Bv=n(Zu,"This model inherits from "),ed=a(Zu,"A",{href:!0});var nF=s(ed);qv=n(nF,"TFPreTrainedModel"),nF.forEach(t),Vv=n(Zu,`. 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.)`),Zu.forEach(t),Gv=m(no),Zs=a(no,"P",{});var Au=s(Zs);Xv=n(Au,"This model is also a "),As=a(Au,"A",{href:!0,rel:!0});var rF=s(As);Sv=n(rF,"tf.keras.Model"),rF.forEach(t),Qv=n(Au,` 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.`),Au.forEach(t),Hv=m(no),M(gr.$$.fragment,no),Ov=m(no),Xt=a(no,"DIV",{class:!0});var ra=s(Xt);M(Bs.$$.fragment,ra),Dv=m(ra),on=a(ra,"P",{});var Nd=s(on);Yv=n(Nd,"The "),td=a(Nd,"A",{href:!0});var aF=s(td);Kv=n(aF,"TFRobertaPreLayerNormForMultipleChoice"),aF.forEach(t),eT=n(Nd," forward method, overrides the "),Hc=a(Nd,"CODE",{});var sF=s(Hc);tT=n(sF,"__call__"),sF.forEach(t),oT=n(Nd," special method."),Nd.forEach(t),nT=m(ra),M(_r.$$.fragment,ra),rT=m(ra),M(yr.$$.fragment,ra),ra.forEach(t),no.forEach(t),Wh=m(l),nn=a(l,"H2",{class:!0});var Bu=s(nn);br=a(Bu,"A",{id:!0,class:!0,href:!0});var lF=s(br);Oc=a(lF,"SPAN",{});var iF=s(Oc);M(qs.$$.fragment,iF),iF.forEach(t),lF.forEach(t),aT=m(Bu),Dc=a(Bu,"SPAN",{});var dF=s(Dc);sT=n(dF,"TFRobertaPreLayerNormForTokenClassification"),dF.forEach(t),Bu.forEach(t),Ih=m(l),mt=a(l,"DIV",{class:!0});var ro=s(mt);M(Vs.$$.fragment,ro),lT=m(ro),Yc=a(ro,"P",{});var cF=s(Yc);iT=n(cF,`RoBERTa-PreLayerNorm 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.`),cF.forEach(t),dT=m(ro),Gs=a(ro,"P",{});var qu=s(Gs);cT=n(qu,"This model inherits from "),od=a(qu,"A",{href:!0});var pF=s(od);pT=n(pF,"TFPreTrainedModel"),pF.forEach(t),mT=n(qu,`. 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.)`),qu.forEach(t),hT=m(ro),Xs=a(ro,"P",{});var Vu=s(Xs);uT=n(Vu,"This model is also a "),Ss=a(Vu,"A",{href:!0,rel:!0});var mF=s(Ss);fT=n(mF,"tf.keras.Model"),mF.forEach(t),gT=n(Vu,` 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.`),Vu.forEach(t),_T=m(ro),M(vr.$$.fragment,ro),yT=m(ro),$t=a(ro,"DIV",{class:!0});var $o=s($t);M(Qs.$$.fragment,$o),bT=m($o),rn=a($o,"P",{});var $d=s(rn);vT=n($d,"The "),nd=a($d,"A",{href:!0});var hF=s(nd);TT=n(hF,"TFRobertaPreLayerNormForTokenClassification"),hF.forEach(t),MT=n($d," forward method, overrides the "),Kc=a($d,"CODE",{});var uF=s(Kc);kT=n(uF,"__call__"),uF.forEach(t),wT=n($d," special method."),$d.forEach(t),FT=m($o),M(Tr.$$.fragment,$o),NT=m($o),M(Mr.$$.fragment,$o),$T=m($o),M(kr.$$.fragment,$o),$o.forEach(t),ro.forEach(t),Zh=m(l),an=a(l,"H2",{class:!0});var Gu=s(an);wr=a(Gu,"A",{id:!0,class:!0,href:!0});var fF=s(wr);ep=a(fF,"SPAN",{});var gF=s(ep);M(Hs.$$.fragment,gF),gF.forEach(t),fF.forEach(t),RT=m(Gu),tp=a(Gu,"SPAN",{});var _F=s(tp);PT=n(_F,"TFRobertaPreLayerNormForQuestionAnswering"),_F.forEach(t),Gu.forEach(t),Ah=m(l),ht=a(l,"DIV",{class:!0});var ao=s(ht);M(Os.$$.fragment,ao),jT=m(ao),sn=a(ao,"P",{});var Rd=s(sn);ET=n(Rd,`RoBERTa-PreLayerNorm 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 `),op=a(Rd,"CODE",{});var yF=s(op);LT=n(yF,"span start logits"),yF.forEach(t),JT=n(Rd," and "),np=a(Rd,"CODE",{});var bF=s(np);xT=n(bF,"span end logits"),bF.forEach(t),CT=n(Rd,")."),Rd.forEach(t),zT=m(ao),Ds=a(ao,"P",{});var Xu=s(Ds);UT=n(Xu,"This model inherits from "),rd=a(Xu,"A",{href:!0});var vF=s(rd);WT=n(vF,"TFPreTrainedModel"),vF.forEach(t),IT=n(Xu,`. 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.)`),Xu.forEach(t),ZT=m(ao),Ys=a(ao,"P",{});var Su=s(Ys);AT=n(Su,"This model is also a "),Ks=a(Su,"A",{href:!0,rel:!0});var TF=s(Ks);BT=n(TF,"tf.keras.Model"),TF.forEach(t),qT=n(Su,` 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.`),Su.forEach(t),VT=m(ao),M(Fr.$$.fragment,ao),GT=m(ao),Rt=a(ao,"DIV",{class:!0});var Ro=s(Rt);M(el.$$.fragment,Ro),XT=m(Ro),ln=a(Ro,"P",{});var Pd=s(ln);ST=n(Pd,"The "),ad=a(Pd,"A",{href:!0});var MF=s(ad);QT=n(MF,"TFRobertaPreLayerNormForQuestionAnswering"),MF.forEach(t),HT=n(Pd," forward method, overrides the "),rp=a(Pd,"CODE",{});var kF=s(rp);OT=n(kF,"__call__"),kF.forEach(t),DT=n(Pd," special method."),Pd.forEach(t),YT=m(Ro),M(Nr.$$.fragment,Ro),KT=m(Ro),M($r.$$.fragment,Ro),eM=m(Ro),M(Rr.$$.fragment,Ro),Ro.forEach(t),ao.forEach(t),Bh=m(l),dn=a(l,"H2",{class:!0});var Qu=s(dn);Pr=a(Qu,"A",{id:!0,class:!0,href:!0});var wF=s(Pr);ap=a(wF,"SPAN",{});var FF=s(ap);M(tl.$$.fragment,FF),FF.forEach(t),wF.forEach(t),tM=m(Qu),sp=a(Qu,"SPAN",{});var NF=s(sp);oM=n(NF,"FlaxRobertaPreLayerNormModel"),NF.forEach(t),Qu.forEach(t),qh=m(l),et=a(l,"DIV",{class:!0});var jt=s(et);M(ol.$$.fragment,jt),nM=m(jt),lp=a(jt,"P",{});var $F=s(lp);rM=n($F,"The bare RoBERTa-PreLayerNorm Model transformer outputting raw hidden-states without any specific head on top."),$F.forEach(t),aM=m(jt),nl=a(jt,"P",{});var Hu=s(nl);sM=n(Hu,"This model inherits from "),sd=a(Hu,"A",{href:!0});var RF=s(sd);lM=n(RF,"FlaxPreTrainedModel"),RF.forEach(t),iM=n(Hu,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Hu.forEach(t),dM=m(jt),rl=a(jt,"P",{});var Ou=s(rl);cM=n(Ou,"This model is also a Flax Linen "),al=a(Ou,"A",{href:!0,rel:!0});var PF=s(al);pM=n(PF,"flax.linen.Module"),PF.forEach(t),mM=n(Ou,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Ou.forEach(t),hM=m(jt),ip=a(jt,"P",{});var jF=s(ip);uM=n(jF,"Finally, this model supports inherent JAX features such as:"),jF.forEach(t),fM=m(jt),lo=a(jt,"UL",{});var aa=s(lo);dp=a(aa,"LI",{});var EF=s(dp);sl=a(EF,"A",{href:!0,rel:!0});var LF=s(sl);gM=n(LF,"Just-In-Time (JIT) compilation"),LF.forEach(t),EF.forEach(t),_M=m(aa),cp=a(aa,"LI",{});var JF=s(cp);ll=a(JF,"A",{href:!0,rel:!0});var xF=s(ll);yM=n(xF,"Automatic Differentiation"),xF.forEach(t),JF.forEach(t),bM=m(aa),pp=a(aa,"LI",{});var CF=s(pp);il=a(CF,"A",{href:!0,rel:!0});var zF=s(il);vM=n(zF,"Vectorization"),zF.forEach(t),CF.forEach(t),TM=m(aa),mp=a(aa,"LI",{});var UF=s(mp);dl=a(UF,"A",{href:!0,rel:!0});var WF=s(dl);MM=n(WF,"Parallelization"),WF.forEach(t),UF.forEach(t),aa.forEach(t),kM=m(jt),St=a(jt,"DIV",{class:!0});var sa=s(St);M(cl.$$.fragment,sa),wM=m(sa),cn=a(sa,"P",{});var jd=s(cn);FM=n(jd,"The "),hp=a(jd,"CODE",{});var IF=s(hp);NM=n(IF,"FlaxRobertaPreLayerNormPreTrainedModel"),IF.forEach(t),$M=n(jd," forward method, overrides the "),up=a(jd,"CODE",{});var ZF=s(up);RM=n(ZF,"__call__"),ZF.forEach(t),PM=n(jd," special method."),jd.forEach(t),jM=m(sa),M(jr.$$.fragment,sa),EM=m(sa),M(Er.$$.fragment,sa),sa.forEach(t),jt.forEach(t),Vh=m(l),pn=a(l,"H2",{class:!0});var Du=s(pn);Lr=a(Du,"A",{id:!0,class:!0,href:!0});var AF=s(Lr);fp=a(AF,"SPAN",{});var BF=s(fp);M(pl.$$.fragment,BF),BF.forEach(t),AF.forEach(t),LM=m(Du),gp=a(Du,"SPAN",{});var qF=s(gp);JM=n(qF,"FlaxRobertaPreLayerNormForCausalLM"),qF.forEach(t),Du.forEach(t),Gh=m(l),tt=a(l,"DIV",{class:!0});var Et=s(tt);M(ml.$$.fragment,Et),xM=m(Et),_p=a(Et,"P",{});var VF=s(_p);CM=n(VF,`RobertaPreLayerNorm Model with a language modeling head on top (a linear layer on top of the hidden-states output)
e.g for autoregressive tasks.`),VF.forEach(t),zM=m(Et),hl=a(Et,"P",{});var Yu=s(hl);UM=n(Yu,"This model inherits from "),ld=a(Yu,"A",{href:!0});var GF=s(ld);WM=n(GF,"FlaxPreTrainedModel"),GF.forEach(t),IM=n(Yu,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Yu.forEach(t),ZM=m(Et),ul=a(Et,"P",{});var Ku=s(ul);AM=n(Ku,"This model is also a Flax Linen "),fl=a(Ku,"A",{href:!0,rel:!0});var XF=s(fl);BM=n(XF,"flax.linen.Module"),XF.forEach(t),qM=n(Ku,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Ku.forEach(t),VM=m(Et),yp=a(Et,"P",{});var SF=s(yp);GM=n(SF,"Finally, this model supports inherent JAX features such as:"),SF.forEach(t),XM=m(Et),io=a(Et,"UL",{});var la=s(io);bp=a(la,"LI",{});var QF=s(bp);gl=a(QF,"A",{href:!0,rel:!0});var HF=s(gl);SM=n(HF,"Just-In-Time (JIT) compilation"),HF.forEach(t),QF.forEach(t),QM=m(la),vp=a(la,"LI",{});var OF=s(vp);_l=a(OF,"A",{href:!0,rel:!0});var DF=s(_l);HM=n(DF,"Automatic Differentiation"),DF.forEach(t),OF.forEach(t),OM=m(la),Tp=a(la,"LI",{});var YF=s(Tp);yl=a(YF,"A",{href:!0,rel:!0});var KF=s(yl);DM=n(KF,"Vectorization"),KF.forEach(t),YF.forEach(t),YM=m(la),Mp=a(la,"LI",{});var eN=s(Mp);bl=a(eN,"A",{href:!0,rel:!0});var tN=s(bl);KM=n(tN,"Parallelization"),tN.forEach(t),eN.forEach(t),la.forEach(t),ek=m(Et),Qt=a(Et,"DIV",{class:!0});var ia=s(Qt);M(vl.$$.fragment,ia),tk=m(ia),mn=a(ia,"P",{});var Ed=s(mn);ok=n(Ed,"The "),kp=a(Ed,"CODE",{});var oN=s(kp);nk=n(oN,"FlaxRobertaPreLayerNormPreTrainedModel"),oN.forEach(t),rk=n(Ed," forward method, overrides the "),wp=a(Ed,"CODE",{});var nN=s(wp);ak=n(nN,"__call__"),nN.forEach(t),sk=n(Ed," special method."),Ed.forEach(t),lk=m(ia),M(Jr.$$.fragment,ia),ik=m(ia),M(xr.$$.fragment,ia),ia.forEach(t),Et.forEach(t),Xh=m(l),hn=a(l,"H2",{class:!0});var ef=s(hn);Cr=a(ef,"A",{id:!0,class:!0,href:!0});var rN=s(Cr);Fp=a(rN,"SPAN",{});var aN=s(Fp);M(Tl.$$.fragment,aN),aN.forEach(t),rN.forEach(t),dk=m(ef),Np=a(ef,"SPAN",{});var sN=s(Np);ck=n(sN,"FlaxRobertaPreLayerNormForMaskedLM"),sN.forEach(t),ef.forEach(t),Sh=m(l),ot=a(l,"DIV",{class:!0});var Lt=s(ot);M(Ml.$$.fragment,Lt),pk=m(Lt),kl=a(Lt,"P",{});var tf=s(kl);mk=n(tf,"RoBERTa-PreLayerNorm Model with a "),$p=a(tf,"CODE",{});var lN=s($p);hk=n(lN,"language modeling"),lN.forEach(t),uk=n(tf," head on top."),tf.forEach(t),fk=m(Lt),wl=a(Lt,"P",{});var of=s(wl);gk=n(of,"This model inherits from "),id=a(of,"A",{href:!0});var iN=s(id);_k=n(iN,"FlaxPreTrainedModel"),iN.forEach(t),yk=n(of,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),of.forEach(t),bk=m(Lt),Fl=a(Lt,"P",{});var nf=s(Fl);vk=n(nf,"This model is also a Flax Linen "),Nl=a(nf,"A",{href:!0,rel:!0});var dN=s(Nl);Tk=n(dN,"flax.linen.Module"),dN.forEach(t),Mk=n(nf,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),nf.forEach(t),kk=m(Lt),Rp=a(Lt,"P",{});var cN=s(Rp);wk=n(cN,"Finally, this model supports inherent JAX features such as:"),cN.forEach(t),Fk=m(Lt),co=a(Lt,"UL",{});var da=s(co);Pp=a(da,"LI",{});var pN=s(Pp);$l=a(pN,"A",{href:!0,rel:!0});var mN=s($l);Nk=n(mN,"Just-In-Time (JIT) compilation"),mN.forEach(t),pN.forEach(t),$k=m(da),jp=a(da,"LI",{});var hN=s(jp);Rl=a(hN,"A",{href:!0,rel:!0});var uN=s(Rl);Rk=n(uN,"Automatic Differentiation"),uN.forEach(t),hN.forEach(t),Pk=m(da),Ep=a(da,"LI",{});var fN=s(Ep);Pl=a(fN,"A",{href:!0,rel:!0});var gN=s(Pl);jk=n(gN,"Vectorization"),gN.forEach(t),fN.forEach(t),Ek=m(da),Lp=a(da,"LI",{});var _N=s(Lp);jl=a(_N,"A",{href:!0,rel:!0});var yN=s(jl);Lk=n(yN,"Parallelization"),yN.forEach(t),_N.forEach(t),da.forEach(t),Jk=m(Lt),Ht=a(Lt,"DIV",{class:!0});var ca=s(Ht);M(El.$$.fragment,ca),xk=m(ca),un=a(ca,"P",{});var Ld=s(un);Ck=n(Ld,"The "),Jp=a(Ld,"CODE",{});var bN=s(Jp);zk=n(bN,"FlaxRobertaPreLayerNormPreTrainedModel"),bN.forEach(t),Uk=n(Ld," forward method, overrides the "),xp=a(Ld,"CODE",{});var vN=s(xp);Wk=n(vN,"__call__"),vN.forEach(t),Ik=n(Ld," special method."),Ld.forEach(t),Zk=m(ca),M(zr.$$.fragment,ca),Ak=m(ca),M(Ur.$$.fragment,ca),ca.forEach(t),Lt.forEach(t),Qh=m(l),fn=a(l,"H2",{class:!0});var rf=s(fn);Wr=a(rf,"A",{id:!0,class:!0,href:!0});var TN=s(Wr);Cp=a(TN,"SPAN",{});var MN=s(Cp);M(Ll.$$.fragment,MN),MN.forEach(t),TN.forEach(t),Bk=m(rf),zp=a(rf,"SPAN",{});var kN=s(zp);qk=n(kN,"FlaxRobertaPreLayerNormForSequenceClassification"),kN.forEach(t),rf.forEach(t),Hh=m(l),nt=a(l,"DIV",{class:!0});var Jt=s(nt);M(Jl.$$.fragment,Jt),Vk=m(Jt),Up=a(Jt,"P",{});var wN=s(Up);Gk=n(wN,`RobertaPreLayerNorm Model transformer with a sequence classification/regression head on top (a linear layer on top
of the pooled output) e.g. for GLUE tasks.`),wN.forEach(t),Xk=m(Jt),xl=a(Jt,"P",{});var af=s(xl);Sk=n(af,"This model inherits from "),dd=a(af,"A",{href:!0});var FN=s(dd);Qk=n(FN,"FlaxPreTrainedModel"),FN.forEach(t),Hk=n(af,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),af.forEach(t),Ok=m(Jt),Cl=a(Jt,"P",{});var sf=s(Cl);Dk=n(sf,"This model is also a Flax Linen "),zl=a(sf,"A",{href:!0,rel:!0});var NN=s(zl);Yk=n(NN,"flax.linen.Module"),NN.forEach(t),Kk=n(sf,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),sf.forEach(t),ew=m(Jt),Wp=a(Jt,"P",{});var $N=s(Wp);tw=n($N,"Finally, this model supports inherent JAX features such as:"),$N.forEach(t),ow=m(Jt),po=a(Jt,"UL",{});var pa=s(po);Ip=a(pa,"LI",{});var RN=s(Ip);Ul=a(RN,"A",{href:!0,rel:!0});var PN=s(Ul);nw=n(PN,"Just-In-Time (JIT) compilation"),PN.forEach(t),RN.forEach(t),rw=m(pa),Zp=a(pa,"LI",{});var jN=s(Zp);Wl=a(jN,"A",{href:!0,rel:!0});var EN=s(Wl);aw=n(EN,"Automatic Differentiation"),EN.forEach(t),jN.forEach(t),sw=m(pa),Ap=a(pa,"LI",{});var LN=s(Ap);Il=a(LN,"A",{href:!0,rel:!0});var JN=s(Il);lw=n(JN,"Vectorization"),JN.forEach(t),LN.forEach(t),iw=m(pa),Bp=a(pa,"LI",{});var xN=s(Bp);Zl=a(xN,"A",{href:!0,rel:!0});var CN=s(Zl);dw=n(CN,"Parallelization"),CN.forEach(t),xN.forEach(t),pa.forEach(t),cw=m(Jt),Ot=a(Jt,"DIV",{class:!0});var ma=s(Ot);M(Al.$$.fragment,ma),pw=m(ma),gn=a(ma,"P",{});var Jd=s(gn);mw=n(Jd,"The "),qp=a(Jd,"CODE",{});var zN=s(qp);hw=n(zN,"FlaxRobertaPreLayerNormPreTrainedModel"),zN.forEach(t),uw=n(Jd," forward method, overrides the "),Vp=a(Jd,"CODE",{});var UN=s(Vp);fw=n(UN,"__call__"),UN.forEach(t),gw=n(Jd," special method."),Jd.forEach(t),_w=m(ma),M(Ir.$$.fragment,ma),yw=m(ma),M(Zr.$$.fragment,ma),ma.forEach(t),Jt.forEach(t),Oh=m(l),_n=a(l,"H2",{class:!0});var lf=s(_n);Ar=a(lf,"A",{id:!0,class:!0,href:!0});var WN=s(Ar);Gp=a(WN,"SPAN",{});var IN=s(Gp);M(Bl.$$.fragment,IN),IN.forEach(t),WN.forEach(t),bw=m(lf),Xp=a(lf,"SPAN",{});var ZN=s(Xp);vw=n(ZN,"FlaxRobertaPreLayerNormForMultipleChoice"),ZN.forEach(t),lf.forEach(t),Dh=m(l),rt=a(l,"DIV",{class:!0});var xt=s(rt);M(ql.$$.fragment,xt),Tw=m(xt),Sp=a(xt,"P",{});var AN=s(Sp);Mw=n(AN,`RobertaPreLayerNorm 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.`),AN.forEach(t),kw=m(xt),Vl=a(xt,"P",{});var df=s(Vl);ww=n(df,"This model inherits from "),cd=a(df,"A",{href:!0});var BN=s(cd);Fw=n(BN,"FlaxPreTrainedModel"),BN.forEach(t),Nw=n(df,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),df.forEach(t),$w=m(xt),Gl=a(xt,"P",{});var cf=s(Gl);Rw=n(cf,"This model is also a Flax Linen "),Xl=a(cf,"A",{href:!0,rel:!0});var qN=s(Xl);Pw=n(qN,"flax.linen.Module"),qN.forEach(t),jw=n(cf,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),cf.forEach(t),Ew=m(xt),Qp=a(xt,"P",{});var VN=s(Qp);Lw=n(VN,"Finally, this model supports inherent JAX features such as:"),VN.forEach(t),Jw=m(xt),mo=a(xt,"UL",{});var ha=s(mo);Hp=a(ha,"LI",{});var GN=s(Hp);Sl=a(GN,"A",{href:!0,rel:!0});var XN=s(Sl);xw=n(XN,"Just-In-Time (JIT) compilation"),XN.forEach(t),GN.forEach(t),Cw=m(ha),Op=a(ha,"LI",{});var SN=s(Op);Ql=a(SN,"A",{href:!0,rel:!0});var QN=s(Ql);zw=n(QN,"Automatic Differentiation"),QN.forEach(t),SN.forEach(t),Uw=m(ha),Dp=a(ha,"LI",{});var HN=s(Dp);Hl=a(HN,"A",{href:!0,rel:!0});var ON=s(Hl);Ww=n(ON,"Vectorization"),ON.forEach(t),HN.forEach(t),Iw=m(ha),Yp=a(ha,"LI",{});var DN=s(Yp);Ol=a(DN,"A",{href:!0,rel:!0});var YN=s(Ol);Zw=n(YN,"Parallelization"),YN.forEach(t),DN.forEach(t),ha.forEach(t),Aw=m(xt),Dt=a(xt,"DIV",{class:!0});var ua=s(Dt);M(Dl.$$.fragment,ua),Bw=m(ua),yn=a(ua,"P",{});var xd=s(yn);qw=n(xd,"The "),Kp=a(xd,"CODE",{});var KN=s(Kp);Vw=n(KN,"FlaxRobertaPreLayerNormPreTrainedModel"),KN.forEach(t),Gw=n(xd," forward method, overrides the "),em=a(xd,"CODE",{});var e$=s(em);Xw=n(e$,"__call__"),e$.forEach(t),Sw=n(xd," special method."),xd.forEach(t),Qw=m(ua),M(Br.$$.fragment,ua),Hw=m(ua),M(qr.$$.fragment,ua),ua.forEach(t),xt.forEach(t),Yh=m(l),bn=a(l,"H2",{class:!0});var pf=s(bn);Vr=a(pf,"A",{id:!0,class:!0,href:!0});var t$=s(Vr);tm=a(t$,"SPAN",{});var o$=s(tm);M(Yl.$$.fragment,o$),o$.forEach(t),t$.forEach(t),Ow=m(pf),om=a(pf,"SPAN",{});var n$=s(om);Dw=n(n$,"FlaxRobertaPreLayerNormForTokenClassification"),n$.forEach(t),pf.forEach(t),Kh=m(l),at=a(l,"DIV",{class:!0});var Ct=s(at);M(Kl.$$.fragment,Ct),Yw=m(Ct),nm=a(Ct,"P",{});var r$=s(nm);Kw=n(r$,`RobertaPreLayerNorm 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.`),r$.forEach(t),e2=m(Ct),ei=a(Ct,"P",{});var mf=s(ei);t2=n(mf,"This model inherits from "),pd=a(mf,"A",{href:!0});var a$=s(pd);o2=n(a$,"FlaxPreTrainedModel"),a$.forEach(t),n2=n(mf,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),mf.forEach(t),r2=m(Ct),ti=a(Ct,"P",{});var hf=s(ti);a2=n(hf,"This model is also a Flax Linen "),oi=a(hf,"A",{href:!0,rel:!0});var s$=s(oi);s2=n(s$,"flax.linen.Module"),s$.forEach(t),l2=n(hf,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),hf.forEach(t),i2=m(Ct),rm=a(Ct,"P",{});var l$=s(rm);d2=n(l$,"Finally, this model supports inherent JAX features such as:"),l$.forEach(t),c2=m(Ct),ho=a(Ct,"UL",{});var fa=s(ho);am=a(fa,"LI",{});var i$=s(am);ni=a(i$,"A",{href:!0,rel:!0});var d$=s(ni);p2=n(d$,"Just-In-Time (JIT) compilation"),d$.forEach(t),i$.forEach(t),m2=m(fa),sm=a(fa,"LI",{});var c$=s(sm);ri=a(c$,"A",{href:!0,rel:!0});var p$=s(ri);h2=n(p$,"Automatic Differentiation"),p$.forEach(t),c$.forEach(t),u2=m(fa),lm=a(fa,"LI",{});var m$=s(lm);ai=a(m$,"A",{href:!0,rel:!0});var h$=s(ai);f2=n(h$,"Vectorization"),h$.forEach(t),m$.forEach(t),g2=m(fa),im=a(fa,"LI",{});var u$=s(im);si=a(u$,"A",{href:!0,rel:!0});var f$=s(si);_2=n(f$,"Parallelization"),f$.forEach(t),u$.forEach(t),fa.forEach(t),y2=m(Ct),Yt=a(Ct,"DIV",{class:!0});var ga=s(Yt);M(li.$$.fragment,ga),b2=m(ga),vn=a(ga,"P",{});var Cd=s(vn);v2=n(Cd,"The "),dm=a(Cd,"CODE",{});var g$=s(dm);T2=n(g$,"FlaxRobertaPreLayerNormPreTrainedModel"),g$.forEach(t),M2=n(Cd," forward method, overrides the "),cm=a(Cd,"CODE",{});var _$=s(cm);k2=n(_$,"__call__"),_$.forEach(t),w2=n(Cd," special method."),Cd.forEach(t),F2=m(ga),M(Gr.$$.fragment,ga),N2=m(ga),M(Xr.$$.fragment,ga),ga.forEach(t),Ct.forEach(t),eu=m(l),Tn=a(l,"H2",{class:!0});var uf=s(Tn);Sr=a(uf,"A",{id:!0,class:!0,href:!0});var y$=s(Sr);pm=a(y$,"SPAN",{});var b$=s(pm);M(ii.$$.fragment,b$),b$.forEach(t),y$.forEach(t),$2=m(uf),mm=a(uf,"SPAN",{});var v$=s(mm);R2=n(v$,"FlaxRobertaPreLayerNormForQuestionAnswering"),v$.forEach(t),uf.forEach(t),tu=m(l),st=a(l,"DIV",{class:!0});var zt=s(st);M(di.$$.fragment,zt),P2=m(zt),Mn=a(zt,"P",{});var zd=s(Mn);j2=n(zd,`RobertaPreLayerNorm 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 `),hm=a(zd,"CODE",{});var T$=s(hm);E2=n(T$,"span start logits"),T$.forEach(t),L2=n(zd," and "),um=a(zd,"CODE",{});var M$=s(um);J2=n(M$,"span end logits"),M$.forEach(t),x2=n(zd,")."),zd.forEach(t),C2=m(zt),ci=a(zt,"P",{});var ff=s(ci);z2=n(ff,"This model inherits from "),md=a(ff,"A",{href:!0});var k$=s(md);U2=n(k$,"FlaxPreTrainedModel"),k$.forEach(t),W2=n(ff,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),ff.forEach(t),I2=m(zt),pi=a(zt,"P",{});var gf=s(pi);Z2=n(gf,"This model is also a Flax Linen "),mi=a(gf,"A",{href:!0,rel:!0});var w$=s(mi);A2=n(w$,"flax.linen.Module"),w$.forEach(t),B2=n(gf,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),gf.forEach(t),q2=m(zt),fm=a(zt,"P",{});var F$=s(fm);V2=n(F$,"Finally, this model supports inherent JAX features such as:"),F$.forEach(t),G2=m(zt),uo=a(zt,"UL",{});var _a=s(uo);gm=a(_a,"LI",{});var N$=s(gm);hi=a(N$,"A",{href:!0,rel:!0});var $$=s(hi);X2=n($$,"Just-In-Time (JIT) compilation"),$$.forEach(t),N$.forEach(t),S2=m(_a),_m=a(_a,"LI",{});var R$=s(_m);ui=a(R$,"A",{href:!0,rel:!0});var P$=s(ui);Q2=n(P$,"Automatic Differentiation"),P$.forEach(t),R$.forEach(t),H2=m(_a),ym=a(_a,"LI",{});var j$=s(ym);fi=a(j$,"A",{href:!0,rel:!0});var E$=s(fi);O2=n(E$,"Vectorization"),E$.forEach(t),j$.forEach(t),D2=m(_a),bm=a(_a,"LI",{});var L$=s(bm);gi=a(L$,"A",{href:!0,rel:!0});var J$=s(gi);Y2=n(J$,"Parallelization"),J$.forEach(t),L$.forEach(t),_a.forEach(t),K2=m(zt),Kt=a(zt,"DIV",{class:!0});var ya=s(Kt);M(_i.$$.fragment,ya),e0=m(ya),kn=a(ya,"P",{});var Ud=s(kn);t0=n(Ud,"The "),vm=a(Ud,"CODE",{});var x$=s(vm);o0=n(x$,"FlaxRobertaPreLayerNormPreTrainedModel"),x$.forEach(t),n0=n(Ud," forward method, overrides the "),Tm=a(Ud,"CODE",{});var C$=s(Tm);r0=n(C$,"__call__"),C$.forEach(t),a0=n(Ud," special method."),Ud.forEach(t),s0=m(ya),M(Qr.$$.fragment,ya),l0=m(ya),M(Hr.$$.fragment,ya),ya.forEach(t),zt.forEach(t),this.h()},h(){u(d,"name","hf:doc:metadata"),u(d,"content",JSON.stringify(BR)),u(f,"id","robertaprelayernorm"),u(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(f,"href","#robertaprelayernorm"),u(h,"class","relative group"),u(ae,"id","overview"),u(ae,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(ae,"href","#overview"),u(Z,"class","relative group"),u(se,"href","https://arxiv.org/abs/1904.01038"),u(se,"rel","nofollow"),u(le,"href","https://fairseq.readthedocs.io/"),u(le,"rel","nofollow"),u(de,"href","roberta"),u(v,"href","https://arxiv.org/abs/1706.03762"),u(v,"rel","nofollow"),u(Ze,"href","https://fairseq.readthedocs.io/"),u(Ze,"rel","nofollow"),u(Ae,"href","https://huggingface.co/andreasmaden"),u(Ae,"rel","nofollow"),u(Be,"href","https://github.com/princeton-nlp/DinkyTrain"),u(Be,"rel","nofollow"),u(Nn,"id","documentation-resources"),u(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"),u(Nn,"href","#documentation-resources"),u(Ce,"class","relative group"),u(ki,"href","../tasks/sequence_classification"),u(wi,"href","../tasks/token_classification"),u(Fi,"href","../tasks/question_answering"),u(Ni,"href","../tasks/language_modeling"),u($i,"href","../tasks/masked_language_modeling"),u(Ri,"href","../tasks/multiple_choice"),u($n,"id","transformers.RobertaPreLayerNormConfig"),u($n,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u($n,"href","#transformers.RobertaPreLayerNormConfig"),u(Po,"class","relative group"),u(Pi,"href","/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormModel"),u(ji,"href","/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormModel"),u(Ma,"href","https://huggingface.co/andreasmadsen/efficient_mlm_m0.40"),u(Ma,"rel","nofollow"),u(Ei,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),u(Li,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),u(Ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Pn,"id","transformers.RobertaPreLayerNormModel"),u(Pn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Pn,"href","#transformers.RobertaPreLayerNormModel"),u(Eo,"class","relative group"),u(Ji,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),u($a,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u($a,"rel","nofollow"),u(Pa,"href","https://arxiv.org/abs/1706.03762"),u(Pa,"rel","nofollow"),u(xi,"href","/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormModel"),u(Wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Jn,"id","transformers.RobertaPreLayerNormForCausalLM"),u(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"),u(Jn,"href","#transformers.RobertaPreLayerNormForCausalLM"),u(Jo,"class","relative group"),u(Ci,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),u(za,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(za,"rel","nofollow"),u(zi,"href","/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormForCausalLM"),u(It,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(zn,"id","transformers.RobertaPreLayerNormForMaskedLM"),u(zn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(zn,"href","#transformers.RobertaPreLayerNormForMaskedLM"),u(Co,"class","relative group"),u(Ui,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),u(qa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(qa,"rel","nofollow"),u(Wi,"href","/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormForMaskedLM"),u(Zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(In,"id","transformers.RobertaPreLayerNormForSequenceClassification"),u(In,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(In,"href","#transformers.RobertaPreLayerNormForSequenceClassification"),u(Uo,"class","relative group"),u(Ii,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),u(Ha,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Ha,"rel","nofollow"),u(Zi,"href","/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormForSequenceClassification"),u(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(qn,"id","transformers.RobertaPreLayerNormForMultipleChoice"),u(qn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(qn,"href","#transformers.RobertaPreLayerNormForMultipleChoice"),u(Io,"class","relative group"),u(Ai,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),u(ts,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(ts,"rel","nofollow"),u(Bi,"href","/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormForMultipleChoice"),u(At,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Xn,"id","transformers.RobertaPreLayerNormForTokenClassification"),u(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"),u(Xn,"href","#transformers.RobertaPreLayerNormForTokenClassification"),u(Ao,"class","relative group"),u(qi,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),u(ls,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(ls,"rel","nofollow"),u(Vi,"href","/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormForTokenClassification"),u(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Hn,"id","transformers.RobertaPreLayerNormForQuestionAnswering"),u(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"),u(Hn,"href","#transformers.RobertaPreLayerNormForQuestionAnswering"),u(qo,"class","relative group"),u(Gi,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel"),u(hs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(hs,"rel","nofollow"),u(Xi,"href","/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormForQuestionAnswering"),u(qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Yn,"id","transformers.TFRobertaPreLayerNormModel"),u(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"),u(Yn,"href","#transformers.TFRobertaPreLayerNormModel"),u(Xo,"class","relative group"),u(Si,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(bs,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(bs,"rel","nofollow"),u(Qi,"href","/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormModel"),u(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(or,"id","transformers.TFRobertaPreLayerNormForCausalLM"),u(or,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(or,"href","#transformers.TFRobertaPreLayerNormForCausalLM"),u(Qo,"class","relative group"),u(Hi,"href","/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormForCausalLM"),u(Gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ho,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ar,"id","transformers.TFRobertaPreLayerNormForMaskedLM"),u(ar,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(ar,"href","#transformers.TFRobertaPreLayerNormForMaskedLM"),u(Do,"class","relative group"),u(Oi,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(Ps,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Ps,"rel","nofollow"),u(Di,"href","/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormForMaskedLM"),u(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(cr,"id","transformers.TFRobertaPreLayerNormForSequenceClassification"),u(cr,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(cr,"href","#transformers.TFRobertaPreLayerNormForSequenceClassification"),u(Ko,"class","relative group"),u(Yi,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(Cs,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Cs,"rel","nofollow"),u(Ki,"href","/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormForSequenceClassification"),u(Nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(fr,"id","transformers.TFRobertaPreLayerNormForMultipleChoice"),u(fr,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(fr,"href","#transformers.TFRobertaPreLayerNormForMultipleChoice"),u(tn,"class","relative group"),u(ed,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(As,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(As,"rel","nofollow"),u(td,"href","/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormForMultipleChoice"),u(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(br,"id","transformers.TFRobertaPreLayerNormForTokenClassification"),u(br,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(br,"href","#transformers.TFRobertaPreLayerNormForTokenClassification"),u(nn,"class","relative group"),u(od,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(Ss,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Ss,"rel","nofollow"),u(nd,"href","/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormForTokenClassification"),u($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(wr,"id","transformers.TFRobertaPreLayerNormForQuestionAnswering"),u(wr,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(wr,"href","#transformers.TFRobertaPreLayerNormForQuestionAnswering"),u(an,"class","relative group"),u(rd,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(Ks,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Ks,"rel","nofollow"),u(ad,"href","/docs/transformers/v4.32.0/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormForQuestionAnswering"),u(Rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Pr,"id","transformers.FlaxRobertaPreLayerNormModel"),u(Pr,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Pr,"href","#transformers.FlaxRobertaPreLayerNormModel"),u(dn,"class","relative group"),u(sd,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(al,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),u(al,"rel","nofollow"),u(sl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(sl,"rel","nofollow"),u(ll,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(ll,"rel","nofollow"),u(il,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(il,"rel","nofollow"),u(dl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(dl,"rel","nofollow"),u(St,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Lr,"id","transformers.FlaxRobertaPreLayerNormForCausalLM"),u(Lr,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Lr,"href","#transformers.FlaxRobertaPreLayerNormForCausalLM"),u(pn,"class","relative group"),u(ld,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(fl,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),u(fl,"rel","nofollow"),u(gl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(gl,"rel","nofollow"),u(_l,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(_l,"rel","nofollow"),u(yl,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(yl,"rel","nofollow"),u(bl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(bl,"rel","nofollow"),u(Qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Cr,"id","transformers.FlaxRobertaPreLayerNormForMaskedLM"),u(Cr,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Cr,"href","#transformers.FlaxRobertaPreLayerNormForMaskedLM"),u(hn,"class","relative group"),u(id,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(Nl,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),u(Nl,"rel","nofollow"),u($l,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u($l,"rel","nofollow"),u(Rl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(Rl,"rel","nofollow"),u(Pl,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(Pl,"rel","nofollow"),u(jl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(jl,"rel","nofollow"),u(Ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Wr,"id","transformers.FlaxRobertaPreLayerNormForSequenceClassification"),u(Wr,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Wr,"href","#transformers.FlaxRobertaPreLayerNormForSequenceClassification"),u(fn,"class","relative group"),u(dd,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(zl,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),u(zl,"rel","nofollow"),u(Ul,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(Ul,"rel","nofollow"),u(Wl,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(Wl,"rel","nofollow"),u(Il,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(Il,"rel","nofollow"),u(Zl,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(Zl,"rel","nofollow"),u(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ar,"id","transformers.FlaxRobertaPreLayerNormForMultipleChoice"),u(Ar,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Ar,"href","#transformers.FlaxRobertaPreLayerNormForMultipleChoice"),u(_n,"class","relative group"),u(cd,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(Xl,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),u(Xl,"rel","nofollow"),u(Sl,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(Sl,"rel","nofollow"),u(Ql,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(Ql,"rel","nofollow"),u(Hl,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(Hl,"rel","nofollow"),u(Ol,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(Ol,"rel","nofollow"),u(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Vr,"id","transformers.FlaxRobertaPreLayerNormForTokenClassification"),u(Vr,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Vr,"href","#transformers.FlaxRobertaPreLayerNormForTokenClassification"),u(bn,"class","relative group"),u(pd,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(oi,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),u(oi,"rel","nofollow"),u(ni,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(ni,"rel","nofollow"),u(ri,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(ri,"rel","nofollow"),u(ai,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(ai,"rel","nofollow"),u(si,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(si,"rel","nofollow"),u(Yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Sr,"id","transformers.FlaxRobertaPreLayerNormForQuestionAnswering"),u(Sr,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Sr,"href","#transformers.FlaxRobertaPreLayerNormForQuestionAnswering"),u(Tn,"class","relative group"),u(md,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),u(mi,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),u(mi,"rel","nofollow"),u(hi,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),u(hi,"rel","nofollow"),u(ui,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),u(ui,"rel","nofollow"),u(fi,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),u(fi,"rel","nofollow"),u(gi,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),u(gi,"rel","nofollow"),u(Kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(l,b){e(document.head,d),g(l,y,b),g(l,h,b),e(h,f),e(f,_),k(i,_,null),e(h,c),e(h,P),e(P,ye),g(l,he,b),g(l,Z,b),e(Z,ae),e(ae,te),k(R,te,null),e(Z,be),e(Z,V),e(V,ve),g(l,ue,b),g(l,U,b),e(U,Te),e(U,se),e(se,S),e(U,Me),e(U,ce),e(ce,Q),e(U,ke),e(U,le),e(le,H),e(U,we),g(l,fe,b),g(l,ee,b),e(ee,L),g(l,x,b),g(l,ie,b),e(ie,G),e(G,Fe),g(l,ge,b),g(l,q,b),e(q,Ne),g(l,_e,b),g(l,J,b),e(J,X),e(X,O),e(X,de),e(de,$e),e(X,D),e(X,pe),e(pe,Re),e(X,A),e(X,me),e(me,Y),e(X,Pe),e(X,oe),e(oe,C),e(X,je),e(X,z),e(z,Ee),e(X,Le),e(X,v),e(v,j),e(X,Ve),e(J,re),e(J,Je),e(Je,Ge),e(Je,E),e(E,Xe),e(Je,Se),e(Je,Ze),e(Ze,Qe),e(Je,He),g(l,W,b),g(l,I,b),e(I,Oe),e(I,Ae),e(Ae,K),e(I,De),e(I,Be),e(Be,xe),e(I,Ye),g(l,ne,b),g(l,Ce,b),e(Ce,Nn),e(Nn,Wd),k(ba,Wd,null),e(Ce,_f),e(Ce,Id),e(Id,yf),g(l,ph,b),g(l,ft,b),e(ft,Zd),e(Zd,ki),e(ki,bf),e(ft,vf),e(ft,Ad),e(Ad,wi),e(wi,Tf),e(ft,Mf),e(ft,Bd),e(Bd,Fi),e(Fi,kf),e(ft,wf),e(ft,qd),e(qd,Ni),e(Ni,Ff),e(ft,Nf),e(ft,Vd),e(Vd,$i),e($i,$f),e(ft,Rf),e(ft,Gd),e(Gd,Ri),e(Ri,Pf),g(l,mh,b),g(l,Po,b),e(Po,$n),e($n,Xd),k(va,Xd,null),e(Po,jf),e(Po,Sd),e(Sd,Ef),g(l,hh,b),g(l,Ut,b),k(Ta,Ut,null),e(Ut,Lf),e(Ut,so),e(so,Jf),e(so,Pi),e(Pi,xf),e(so,Cf),e(so,ji),e(ji,zf),e(so,Uf),e(so,Ma),e(Ma,Wf),e(so,If),e(Ut,Zf),e(Ut,jo),e(jo,Af),e(jo,Ei),e(Ei,Bf),e(jo,qf),e(jo,Li),e(Li,Vf),e(jo,Gf),e(Ut,Xf),k(Rn,Ut,null),g(l,uh,b),g(l,Eo,b),e(Eo,Pn),e(Pn,Qd),k(ka,Qd,null),e(Eo,Sf),e(Eo,Hd),e(Hd,Qf),g(l,fh,b),g(l,Ke,b),k(wa,Ke,null),e(Ke,Hf),e(Ke,Od),e(Od,Of),e(Ke,Df),e(Ke,Fa),e(Fa,Yf),e(Fa,Ji),e(Ji,Kf),e(Fa,eg),e(Ke,tg),e(Ke,Na),e(Na,og),e(Na,$a),e($a,ng),e(Na,rg),e(Ke,ag),e(Ke,Ra),e(Ra,sg),e(Ra,Dd),e(Dd,lg),e(Ra,ig),e(Ke,dg),e(Ke,lt),e(lt,cg),e(lt,Yd),e(Yd,pg),e(lt,mg),e(lt,Kd),e(Kd,hg),e(lt,ug),e(lt,ec),e(ec,fg),e(lt,gg),e(lt,tc),e(tc,_g),e(lt,yg),e(lt,oc),e(oc,bg),e(lt,vg),e(lt,nc),e(nc,Tg),e(lt,Mg),e(Ke,kg),e(Ke,jn),e(jn,wg),e(jn,rc),e(rc,Fg),e(jn,Ng),e(jn,Pa),e(Pa,$g),e(Ke,Rg),e(Ke,Wt),k(ja,Wt,null),e(Wt,Pg),e(Wt,Lo),e(Lo,jg),e(Lo,xi),e(xi,Eg),e(Lo,Lg),e(Lo,ac),e(ac,Jg),e(Lo,xg),e(Wt,Cg),k(En,Wt,null),e(Wt,zg),k(Ln,Wt,null),g(l,gh,b),g(l,Jo,b),e(Jo,Jn),e(Jn,sc),k(Ea,sc,null),e(Jo,Ug),e(Jo,lc),e(lc,Wg),g(l,_h,b),g(l,_t,b),k(La,_t,null),e(_t,Ig),e(_t,Ja),e(Ja,Zg),e(Ja,ic),e(ic,Ag),e(Ja,Bg),e(_t,qg),e(_t,xa),e(xa,Vg),e(xa,Ci),e(Ci,Gg),e(xa,Xg),e(_t,Sg),e(_t,Ca),e(Ca,Qg),e(Ca,za),e(za,Hg),e(Ca,Og),e(_t,Dg),e(_t,It),k(Ua,It,null),e(It,Yg),e(It,xo),e(xo,Kg),e(xo,zi),e(zi,e_),e(xo,t_),e(xo,dc),e(dc,o_),e(xo,n_),e(It,r_),k(xn,It,null),e(It,a_),k(Cn,It,null),g(l,yh,b),g(l,Co,b),e(Co,zn),e(zn,cc),k(Wa,cc,null),e(Co,s_),e(Co,pc),e(pc,l_),g(l,bh,b),g(l,yt,b),k(Ia,yt,null),e(yt,i_),e(yt,Za),e(Za,d_),e(Za,mc),e(mc,c_),e(Za,p_),e(yt,m_),e(yt,Aa),e(Aa,h_),e(Aa,Ui),e(Ui,u_),e(Aa,f_),e(yt,g_),e(yt,Ba),e(Ba,__),e(Ba,qa),e(qa,y_),e(Ba,b_),e(yt,v_),e(yt,Zt),k(Va,Zt,null),e(Zt,T_),e(Zt,zo),e(zo,M_),e(zo,Wi),e(Wi,k_),e(zo,w_),e(zo,hc),e(hc,F_),e(zo,N_),e(Zt,$_),k(Un,Zt,null),e(Zt,R_),k(Wn,Zt,null),g(l,vh,b),g(l,Uo,b),e(Uo,In),e(In,uc),k(Ga,uc,null),e(Uo,P_),e(Uo,fc),e(fc,j_),g(l,Th,b),g(l,bt,b),k(Xa,bt,null),e(bt,E_),e(bt,gc),e(gc,L_),e(bt,J_),e(bt,Sa),e(Sa,x_),e(Sa,Ii),e(Ii,C_),e(Sa,z_),e(bt,U_),e(bt,Qa),e(Qa,W_),e(Qa,Ha),e(Ha,I_),e(Qa,Z_),e(bt,A_),e(bt,wt),k(Oa,wt,null),e(wt,B_),e(wt,Wo),e(Wo,q_),e(Wo,Zi),e(Zi,V_),e(Wo,G_),e(Wo,_c),e(_c,X_),e(Wo,S_),e(wt,Q_),k(Zn,wt,null),e(wt,H_),k(An,wt,null),e(wt,O_),k(Bn,wt,null),g(l,Mh,b),g(l,Io,b),e(Io,qn),e(qn,yc),k(Da,yc,null),e(Io,D_),e(Io,bc),e(bc,Y_),g(l,kh,b),g(l,vt,b),k(Ya,vt,null),e(vt,K_),e(vt,vc),e(vc,ey),e(vt,ty),e(vt,Ka),e(Ka,oy),e(Ka,Ai),e(Ai,ny),e(Ka,ry),e(vt,ay),e(vt,es),e(es,sy),e(es,ts),e(ts,ly),e(es,iy),e(vt,dy),e(vt,At),k(os,At,null),e(At,cy),e(At,Zo),e(Zo,py),e(Zo,Bi),e(Bi,my),e(Zo,hy),e(Zo,Tc),e(Tc,uy),e(Zo,fy),e(At,gy),k(Vn,At,null),e(At,_y),k(Gn,At,null),g(l,wh,b),g(l,Ao,b),e(Ao,Xn),e(Xn,Mc),k(ns,Mc,null),e(Ao,yy),e(Ao,kc),e(kc,by),g(l,Fh,b),g(l,Tt,b),k(rs,Tt,null),e(Tt,vy),e(Tt,wc),e(wc,Ty),e(Tt,My),e(Tt,as),e(as,ky),e(as,qi),e(qi,wy),e(as,Fy),e(Tt,Ny),e(Tt,ss),e(ss,$y),e(ss,ls),e(ls,Ry),e(ss,Py),e(Tt,jy),e(Tt,Bt),k(is,Bt,null),e(Bt,Ey),e(Bt,Bo),e(Bo,Ly),e(Bo,Vi),e(Vi,Jy),e(Bo,xy),e(Bo,Fc),e(Fc,Cy),e(Bo,zy),e(Bt,Uy),k(Sn,Bt,null),e(Bt,Wy),k(Qn,Bt,null),g(l,Nh,b),g(l,qo,b),e(qo,Hn),e(Hn,Nc),k(ds,Nc,null),e(qo,Iy),e(qo,$c),e($c,Zy),g(l,$h,b),g(l,Mt,b),k(cs,Mt,null),e(Mt,Ay),e(Mt,Vo),e(Vo,By),e(Vo,Rc),e(Rc,qy),e(Vo,Vy),e(Vo,Pc),e(Pc,Gy),e(Vo,Xy),e(Mt,Sy),e(Mt,ps),e(ps,Qy),e(ps,Gi),e(Gi,Hy),e(ps,Oy),e(Mt,Dy),e(Mt,ms),e(ms,Yy),e(ms,hs),e(hs,Ky),e(ms,eb),e(Mt,tb),e(Mt,qt),k(us,qt,null),e(qt,ob),e(qt,Go),e(Go,nb),e(Go,Xi),e(Xi,rb),e(Go,ab),e(Go,jc),e(jc,sb),e(Go,lb),e(qt,ib),k(On,qt,null),e(qt,db),k(Dn,qt,null),g(l,Rh,b),g(l,Xo,b),e(Xo,Yn),e(Yn,Ec),k(fs,Ec,null),e(Xo,cb),e(Xo,Lc),e(Lc,pb),g(l,Ph,b),g(l,it,b),k(gs,it,null),e(it,mb),e(it,Jc),e(Jc,hb),e(it,ub),e(it,_s),e(_s,fb),e(_s,Si),e(Si,gb),e(_s,_b),e(it,yb),e(it,ys),e(ys,bb),e(ys,bs),e(bs,vb),e(ys,Tb),e(it,Mb),k(Kn,it,null),e(it,kb),e(it,Vt),k(vs,Vt,null),e(Vt,wb),e(Vt,So),e(So,Fb),e(So,Qi),e(Qi,Nb),e(So,$b),e(So,xc),e(xc,Rb),e(So,Pb),e(Vt,jb),k(er,Vt,null),e(Vt,Eb),k(tr,Vt,null),g(l,jh,b),g(l,Qo,b),e(Qo,or),e(or,Cc),k(Ts,Cc,null),e(Qo,Lb),e(Qo,zc),e(zc,Jb),g(l,Eh,b),g(l,Ho,b),k(Ms,Ho,null),e(Ho,xb),e(Ho,Gt),k(ks,Gt,null),e(Gt,Cb),e(Gt,Oo),e(Oo,zb),e(Oo,Hi),e(Hi,Ub),e(Oo,Wb),e(Oo,Uc),e(Uc,Ib),e(Oo,Zb),e(Gt,Ab),k(nr,Gt,null),e(Gt,Bb),k(rr,Gt,null),g(l,Lh,b),g(l,Do,b),e(Do,ar),e(ar,Wc),k(ws,Wc,null),e(Do,qb),e(Do,Ic),e(Ic,Vb),g(l,Jh,b),g(l,dt,b),k(Fs,dt,null),e(dt,Gb),e(dt,Ns),e(Ns,Xb),e(Ns,Zc),e(Zc,Sb),e(Ns,Qb),e(dt,Hb),e(dt,$s),e($s,Ob),e($s,Oi),e(Oi,Db),e($s,Yb),e(dt,Kb),e(dt,Rs),e(Rs,ev),e(Rs,Ps),e(Ps,tv),e(Rs,ov),e(dt,nv),k(sr,dt,null),e(dt,rv),e(dt,Ft),k(js,Ft,null),e(Ft,av),e(Ft,Yo),e(Yo,sv),e(Yo,Di),e(Di,lv),e(Yo,iv),e(Yo,Ac),e(Ac,dv),e(Yo,cv),e(Ft,pv),k(lr,Ft,null),e(Ft,mv),k(ir,Ft,null),e(Ft,hv),k(dr,Ft,null),g(l,xh,b),g(l,Ko,b),e(Ko,cr),e(cr,Bc),k(Es,Bc,null),e(Ko,uv),e(Ko,qc),e(qc,fv),g(l,Ch,b),g(l,ct,b),k(Ls,ct,null),e(ct,gv),e(ct,Vc),e(Vc,_v),e(ct,yv),e(ct,Js),e(Js,bv),e(Js,Yi),e(Yi,vv),e(Js,Tv),e(ct,Mv),e(ct,xs),e(xs,kv),e(xs,Cs),e(Cs,wv),e(xs,Fv),e(ct,Nv),k(pr,ct,null),e(ct,$v),e(ct,Nt),k(zs,Nt,null),e(Nt,Rv),e(Nt,en),e(en,Pv),e(en,Ki),e(Ki,jv),e(en,Ev),e(en,Gc),e(Gc,Lv),e(en,Jv),e(Nt,xv),k(mr,Nt,null),e(Nt,Cv),k(hr,Nt,null),e(Nt,zv),k(ur,Nt,null),g(l,zh,b),g(l,tn,b),e(tn,fr),e(fr,Xc),k(Us,Xc,null),e(tn,Uv),e(tn,Sc),e(Sc,Wv),g(l,Uh,b),g(l,pt,b),k(Ws,pt,null),e(pt,Iv),e(pt,Qc),e(Qc,Zv),e(pt,Av),e(pt,Is),e(Is,Bv),e(Is,ed),e(ed,qv),e(Is,Vv),e(pt,Gv),e(pt,Zs),e(Zs,Xv),e(Zs,As),e(As,Sv),e(Zs,Qv),e(pt,Hv),k(gr,pt,null),e(pt,Ov),e(pt,Xt),k(Bs,Xt,null),e(Xt,Dv),e(Xt,on),e(on,Yv),e(on,td),e(td,Kv),e(on,eT),e(on,Hc),e(Hc,tT),e(on,oT),e(Xt,nT),k(_r,Xt,null),e(Xt,rT),k(yr,Xt,null),g(l,Wh,b),g(l,nn,b),e(nn,br),e(br,Oc),k(qs,Oc,null),e(nn,aT),e(nn,Dc),e(Dc,sT),g(l,Ih,b),g(l,mt,b),k(Vs,mt,null),e(mt,lT),e(mt,Yc),e(Yc,iT),e(mt,dT),e(mt,Gs),e(Gs,cT),e(Gs,od),e(od,pT),e(Gs,mT),e(mt,hT),e(mt,Xs),e(Xs,uT),e(Xs,Ss),e(Ss,fT),e(Xs,gT),e(mt,_T),k(vr,mt,null),e(mt,yT),e(mt,$t),k(Qs,$t,null),e($t,bT),e($t,rn),e(rn,vT),e(rn,nd),e(nd,TT),e(rn,MT),e(rn,Kc),e(Kc,kT),e(rn,wT),e($t,FT),k(Tr,$t,null),e($t,NT),k(Mr,$t,null),e($t,$T),k(kr,$t,null),g(l,Zh,b),g(l,an,b),e(an,wr),e(wr,ep),k(Hs,ep,null),e(an,RT),e(an,tp),e(tp,PT),g(l,Ah,b),g(l,ht,b),k(Os,ht,null),e(ht,jT),e(ht,sn),e(sn,ET),e(sn,op),e(op,LT),e(sn,JT),e(sn,np),e(np,xT),e(sn,CT),e(ht,zT),e(ht,Ds),e(Ds,UT),e(Ds,rd),e(rd,WT),e(Ds,IT),e(ht,ZT),e(ht,Ys),e(Ys,AT),e(Ys,Ks),e(Ks,BT),e(Ys,qT),e(ht,VT),k(Fr,ht,null),e(ht,GT),e(ht,Rt),k(el,Rt,null),e(Rt,XT),e(Rt,ln),e(ln,ST),e(ln,ad),e(ad,QT),e(ln,HT),e(ln,rp),e(rp,OT),e(ln,DT),e(Rt,YT),k(Nr,Rt,null),e(Rt,KT),k($r,Rt,null),e(Rt,eM),k(Rr,Rt,null),g(l,Bh,b),g(l,dn,b),e(dn,Pr),e(Pr,ap),k(tl,ap,null),e(dn,tM),e(dn,sp),e(sp,oM),g(l,qh,b),g(l,et,b),k(ol,et,null),e(et,nM),e(et,lp),e(lp,rM),e(et,aM),e(et,nl),e(nl,sM),e(nl,sd),e(sd,lM),e(nl,iM),e(et,dM),e(et,rl),e(rl,cM),e(rl,al),e(al,pM),e(rl,mM),e(et,hM),e(et,ip),e(ip,uM),e(et,fM),e(et,lo),e(lo,dp),e(dp,sl),e(sl,gM),e(lo,_M),e(lo,cp),e(cp,ll),e(ll,yM),e(lo,bM),e(lo,pp),e(pp,il),e(il,vM),e(lo,TM),e(lo,mp),e(mp,dl),e(dl,MM),e(et,kM),e(et,St),k(cl,St,null),e(St,wM),e(St,cn),e(cn,FM),e(cn,hp),e(hp,NM),e(cn,$M),e(cn,up),e(up,RM),e(cn,PM),e(St,jM),k(jr,St,null),e(St,EM),k(Er,St,null),g(l,Vh,b),g(l,pn,b),e(pn,Lr),e(Lr,fp),k(pl,fp,null),e(pn,LM),e(pn,gp),e(gp,JM),g(l,Gh,b),g(l,tt,b),k(ml,tt,null),e(tt,xM),e(tt,_p),e(_p,CM),e(tt,zM),e(tt,hl),e(hl,UM),e(hl,ld),e(ld,WM),e(hl,IM),e(tt,ZM),e(tt,ul),e(ul,AM),e(ul,fl),e(fl,BM),e(ul,qM),e(tt,VM),e(tt,yp),e(yp,GM),e(tt,XM),e(tt,io),e(io,bp),e(bp,gl),e(gl,SM),e(io,QM),e(io,vp),e(vp,_l),e(_l,HM),e(io,OM),e(io,Tp),e(Tp,yl),e(yl,DM),e(io,YM),e(io,Mp),e(Mp,bl),e(bl,KM),e(tt,ek),e(tt,Qt),k(vl,Qt,null),e(Qt,tk),e(Qt,mn),e(mn,ok),e(mn,kp),e(kp,nk),e(mn,rk),e(mn,wp),e(wp,ak),e(mn,sk),e(Qt,lk),k(Jr,Qt,null),e(Qt,ik),k(xr,Qt,null),g(l,Xh,b),g(l,hn,b),e(hn,Cr),e(Cr,Fp),k(Tl,Fp,null),e(hn,dk),e(hn,Np),e(Np,ck),g(l,Sh,b),g(l,ot,b),k(Ml,ot,null),e(ot,pk),e(ot,kl),e(kl,mk),e(kl,$p),e($p,hk),e(kl,uk),e(ot,fk),e(ot,wl),e(wl,gk),e(wl,id),e(id,_k),e(wl,yk),e(ot,bk),e(ot,Fl),e(Fl,vk),e(Fl,Nl),e(Nl,Tk),e(Fl,Mk),e(ot,kk),e(ot,Rp),e(Rp,wk),e(ot,Fk),e(ot,co),e(co,Pp),e(Pp,$l),e($l,Nk),e(co,$k),e(co,jp),e(jp,Rl),e(Rl,Rk),e(co,Pk),e(co,Ep),e(Ep,Pl),e(Pl,jk),e(co,Ek),e(co,Lp),e(Lp,jl),e(jl,Lk),e(ot,Jk),e(ot,Ht),k(El,Ht,null),e(Ht,xk),e(Ht,un),e(un,Ck),e(un,Jp),e(Jp,zk),e(un,Uk),e(un,xp),e(xp,Wk),e(un,Ik),e(Ht,Zk),k(zr,Ht,null),e(Ht,Ak),k(Ur,Ht,null),g(l,Qh,b),g(l,fn,b),e(fn,Wr),e(Wr,Cp),k(Ll,Cp,null),e(fn,Bk),e(fn,zp),e(zp,qk),g(l,Hh,b),g(l,nt,b),k(Jl,nt,null),e(nt,Vk),e(nt,Up),e(Up,Gk),e(nt,Xk),e(nt,xl),e(xl,Sk),e(xl,dd),e(dd,Qk),e(xl,Hk),e(nt,Ok),e(nt,Cl),e(Cl,Dk),e(Cl,zl),e(zl,Yk),e(Cl,Kk),e(nt,ew),e(nt,Wp),e(Wp,tw),e(nt,ow),e(nt,po),e(po,Ip),e(Ip,Ul),e(Ul,nw),e(po,rw),e(po,Zp),e(Zp,Wl),e(Wl,aw),e(po,sw),e(po,Ap),e(Ap,Il),e(Il,lw),e(po,iw),e(po,Bp),e(Bp,Zl),e(Zl,dw),e(nt,cw),e(nt,Ot),k(Al,Ot,null),e(Ot,pw),e(Ot,gn),e(gn,mw),e(gn,qp),e(qp,hw),e(gn,uw),e(gn,Vp),e(Vp,fw),e(gn,gw),e(Ot,_w),k(Ir,Ot,null),e(Ot,yw),k(Zr,Ot,null),g(l,Oh,b),g(l,_n,b),e(_n,Ar),e(Ar,Gp),k(Bl,Gp,null),e(_n,bw),e(_n,Xp),e(Xp,vw),g(l,Dh,b),g(l,rt,b),k(ql,rt,null),e(rt,Tw),e(rt,Sp),e(Sp,Mw),e(rt,kw),e(rt,Vl),e(Vl,ww),e(Vl,cd),e(cd,Fw),e(Vl,Nw),e(rt,$w),e(rt,Gl),e(Gl,Rw),e(Gl,Xl),e(Xl,Pw),e(Gl,jw),e(rt,Ew),e(rt,Qp),e(Qp,Lw),e(rt,Jw),e(rt,mo),e(mo,Hp),e(Hp,Sl),e(Sl,xw),e(mo,Cw),e(mo,Op),e(Op,Ql),e(Ql,zw),e(mo,Uw),e(mo,Dp),e(Dp,Hl),e(Hl,Ww),e(mo,Iw),e(mo,Yp),e(Yp,Ol),e(Ol,Zw),e(rt,Aw),e(rt,Dt),k(Dl,Dt,null),e(Dt,Bw),e(Dt,yn),e(yn,qw),e(yn,Kp),e(Kp,Vw),e(yn,Gw),e(yn,em),e(em,Xw),e(yn,Sw),e(Dt,Qw),k(Br,Dt,null),e(Dt,Hw),k(qr,Dt,null),g(l,Yh,b),g(l,bn,b),e(bn,Vr),e(Vr,tm),k(Yl,tm,null),e(bn,Ow),e(bn,om),e(om,Dw),g(l,Kh,b),g(l,at,b),k(Kl,at,null),e(at,Yw),e(at,nm),e(nm,Kw),e(at,e2),e(at,ei),e(ei,t2),e(ei,pd),e(pd,o2),e(ei,n2),e(at,r2),e(at,ti),e(ti,a2),e(ti,oi),e(oi,s2),e(ti,l2),e(at,i2),e(at,rm),e(rm,d2),e(at,c2),e(at,ho),e(ho,am),e(am,ni),e(ni,p2),e(ho,m2),e(ho,sm),e(sm,ri),e(ri,h2),e(ho,u2),e(ho,lm),e(lm,ai),e(ai,f2),e(ho,g2),e(ho,im),e(im,si),e(si,_2),e(at,y2),e(at,Yt),k(li,Yt,null),e(Yt,b2),e(Yt,vn),e(vn,v2),e(vn,dm),e(dm,T2),e(vn,M2),e(vn,cm),e(cm,k2),e(vn,w2),e(Yt,F2),k(Gr,Yt,null),e(Yt,N2),k(Xr,Yt,null),g(l,eu,b),g(l,Tn,b),e(Tn,Sr),e(Sr,pm),k(ii,pm,null),e(Tn,$2),e(Tn,mm),e(mm,R2),g(l,tu,b),g(l,st,b),k(di,st,null),e(st,P2),e(st,Mn),e(Mn,j2),e(Mn,hm),e(hm,E2),e(Mn,L2),e(Mn,um),e(um,J2),e(Mn,x2),e(st,C2),e(st,ci),e(ci,z2),e(ci,md),e(md,U2),e(ci,W2),e(st,I2),e(st,pi),e(pi,Z2),e(pi,mi),e(mi,A2),e(pi,B2),e(st,q2),e(st,fm),e(fm,V2),e(st,G2),e(st,uo),e(uo,gm),e(gm,hi),e(hi,X2),e(uo,S2),e(uo,_m),e(_m,ui),e(ui,Q2),e(uo,H2),e(uo,ym),e(ym,fi),e(fi,O2),e(uo,D2),e(uo,bm),e(bm,gi),e(gi,Y2),e(st,K2),e(st,Kt),k(_i,Kt,null),e(Kt,e0),e(Kt,kn),e(kn,t0),e(kn,vm),e(vm,o0),e(kn,n0),e(kn,Tm),e(Tm,r0),e(kn,a0),e(Kt,s0),k(Qr,Kt,null),e(Kt,l0),k(Hr,Kt,null),ou=!0},p(l,[b]){const yi={};b&2&&(yi.$$scope={dirty:b,ctx:l}),Rn.$set(yi);const Mm={};b&2&&(Mm.$$scope={dirty:b,ctx:l}),En.$set(Mm);const km={};b&2&&(km.$$scope={dirty:b,ctx:l}),Ln.$set(km);const wm={};b&2&&(wm.$$scope={dirty:b,ctx:l}),xn.$set(wm);const bi={};b&2&&(bi.$$scope={dirty:b,ctx:l}),Cn.$set(bi);const Fm={};b&2&&(Fm.$$scope={dirty:b,ctx:l}),Un.$set(Fm);const Nm={};b&2&&(Nm.$$scope={dirty:b,ctx:l}),Wn.$set(Nm);const $m={};b&2&&($m.$$scope={dirty:b,ctx:l}),Zn.$set($m);const fo={};b&2&&(fo.$$scope={dirty:b,ctx:l}),An.$set(fo);const Rm={};b&2&&(Rm.$$scope={dirty:b,ctx:l}),Bn.$set(Rm);const Pm={};b&2&&(Pm.$$scope={dirty:b,ctx:l}),Vn.$set(Pm);const jm={};b&2&&(jm.$$scope={dirty:b,ctx:l}),Gn.$set(jm);const Em={};b&2&&(Em.$$scope={dirty:b,ctx:l}),Sn.$set(Em);const Lm={};b&2&&(Lm.$$scope={dirty:b,ctx:l}),Qn.$set(Lm);const Jm={};b&2&&(Jm.$$scope={dirty:b,ctx:l}),On.$set(Jm);const xm={};b&2&&(xm.$$scope={dirty:b,ctx:l}),Dn.$set(xm);const vi={};b&2&&(vi.$$scope={dirty:b,ctx:l}),Kn.$set(vi);const ut={};b&2&&(ut.$$scope={dirty:b,ctx:l}),er.$set(ut);const Cm={};b&2&&(Cm.$$scope={dirty:b,ctx:l}),tr.$set(Cm);const zm={};b&2&&(zm.$$scope={dirty:b,ctx:l}),nr.$set(zm);const Um={};b&2&&(Um.$$scope={dirty:b,ctx:l}),rr.$set(Um);const Wm={};b&2&&(Wm.$$scope={dirty:b,ctx:l}),sr.$set(Wm);const Im={};b&2&&(Im.$$scope={dirty:b,ctx:l}),lr.$set(Im);const Zm={};b&2&&(Zm.$$scope={dirty:b,ctx:l}),ir.$set(Zm);const wn={};b&2&&(wn.$$scope={dirty:b,ctx:l}),dr.$set(wn);const Am={};b&2&&(Am.$$scope={dirty:b,ctx:l}),pr.$set(Am);const Bm={};b&2&&(Bm.$$scope={dirty:b,ctx:l}),mr.$set(Bm);const Fn={};b&2&&(Fn.$$scope={dirty:b,ctx:l}),hr.$set(Fn);const qm={};b&2&&(qm.$$scope={dirty:b,ctx:l}),ur.$set(qm);const Vm={};b&2&&(Vm.$$scope={dirty:b,ctx:l}),gr.$set(Vm);const Ti={};b&2&&(Ti.$$scope={dirty:b,ctx:l}),_r.$set(Ti);const Gm={};b&2&&(Gm.$$scope={dirty:b,ctx:l}),yr.$set(Gm);const Xm={};b&2&&(Xm.$$scope={dirty:b,ctx:l}),vr.$set(Xm);const Sm={};b&2&&(Sm.$$scope={dirty:b,ctx:l}),Tr.$set(Sm);const kt={};b&2&&(kt.$$scope={dirty:b,ctx:l}),Mr.$set(kt);const Qm={};b&2&&(Qm.$$scope={dirty:b,ctx:l}),kr.$set(Qm);const Hm={};b&2&&(Hm.$$scope={dirty:b,ctx:l}),Fr.$set(Hm);const Om={};b&2&&(Om.$$scope={dirty:b,ctx:l}),Nr.$set(Om);const Dm={};b&2&&(Dm.$$scope={dirty:b,ctx:l}),$r.$set(Dm);const Ym={};b&2&&(Ym.$$scope={dirty:b,ctx:l}),Rr.$set(Ym);const Km={};b&2&&(Km.$$scope={dirty:b,ctx:l}),jr.$set(Km);const eh={};b&2&&(eh.$$scope={dirty:b,ctx:l}),Er.$set(eh);const th={};b&2&&(th.$$scope={dirty:b,ctx:l}),Jr.$set(th);const oh={};b&2&&(oh.$$scope={dirty:b,ctx:l}),xr.$set(oh);const nh={};b&2&&(nh.$$scope={dirty:b,ctx:l}),zr.$set(nh);const rh={};b&2&&(rh.$$scope={dirty:b,ctx:l}),Ur.$set(rh);const ah={};b&2&&(ah.$$scope={dirty:b,ctx:l}),Ir.$set(ah);const Mi={};b&2&&(Mi.$$scope={dirty:b,ctx:l}),Zr.$set(Mi);const sh={};b&2&&(sh.$$scope={dirty:b,ctx:l}),Br.$set(sh);const lh={};b&2&&(lh.$$scope={dirty:b,ctx:l}),qr.$set(lh);const ih={};b&2&&(ih.$$scope={dirty:b,ctx:l}),Gr.$set(ih);const go={};b&2&&(go.$$scope={dirty:b,ctx:l}),Xr.$set(go);const _o={};b&2&&(_o.$$scope={dirty:b,ctx:l}),Qr.$set(_o);const dh={};b&2&&(dh.$$scope={dirty:b,ctx:l}),Hr.$set(dh)},i(l){ou||(w(i.$$.fragment,l),w(R.$$.fragment,l),w(ba.$$.fragment,l),w(va.$$.fragment,l),w(Ta.$$.fragment,l),w(Rn.$$.fragment,l),w(ka.$$.fragment,l),w(wa.$$.fragment,l),w(ja.$$.fragment,l),w(En.$$.fragment,l),w(Ln.$$.fragment,l),w(Ea.$$.fragment,l),w(La.$$.fragment,l),w(Ua.$$.fragment,l),w(xn.$$.fragment,l),w(Cn.$$.fragment,l),w(Wa.$$.fragment,l),w(Ia.$$.fragment,l),w(Va.$$.fragment,l),w(Un.$$.fragment,l),w(Wn.$$.fragment,l),w(Ga.$$.fragment,l),w(Xa.$$.fragment,l),w(Oa.$$.fragment,l),w(Zn.$$.fragment,l),w(An.$$.fragment,l),w(Bn.$$.fragment,l),w(Da.$$.fragment,l),w(Ya.$$.fragment,l),w(os.$$.fragment,l),w(Vn.$$.fragment,l),w(Gn.$$.fragment,l),w(ns.$$.fragment,l),w(rs.$$.fragment,l),w(is.$$.fragment,l),w(Sn.$$.fragment,l),w(Qn.$$.fragment,l),w(ds.$$.fragment,l),w(cs.$$.fragment,l),w(us.$$.fragment,l),w(On.$$.fragment,l),w(Dn.$$.fragment,l),w(fs.$$.fragment,l),w(gs.$$.fragment,l),w(Kn.$$.fragment,l),w(vs.$$.fragment,l),w(er.$$.fragment,l),w(tr.$$.fragment,l),w(Ts.$$.fragment,l),w(Ms.$$.fragment,l),w(ks.$$.fragment,l),w(nr.$$.fragment,l),w(rr.$$.fragment,l),w(ws.$$.fragment,l),w(Fs.$$.fragment,l),w(sr.$$.fragment,l),w(js.$$.fragment,l),w(lr.$$.fragment,l),w(ir.$$.fragment,l),w(dr.$$.fragment,l),w(Es.$$.fragment,l),w(Ls.$$.fragment,l),w(pr.$$.fragment,l),w(zs.$$.fragment,l),w(mr.$$.fragment,l),w(hr.$$.fragment,l),w(ur.$$.fragment,l),w(Us.$$.fragment,l),w(Ws.$$.fragment,l),w(gr.$$.fragment,l),w(Bs.$$.fragment,l),w(_r.$$.fragment,l),w(yr.$$.fragment,l),w(qs.$$.fragment,l),w(Vs.$$.fragment,l),w(vr.$$.fragment,l),w(Qs.$$.fragment,l),w(Tr.$$.fragment,l),w(Mr.$$.fragment,l),w(kr.$$.fragment,l),w(Hs.$$.fragment,l),w(Os.$$.fragment,l),w(Fr.$$.fragment,l),w(el.$$.fragment,l),w(Nr.$$.fragment,l),w($r.$$.fragment,l),w(Rr.$$.fragment,l),w(tl.$$.fragment,l),w(ol.$$.fragment,l),w(cl.$$.fragment,l),w(jr.$$.fragment,l),w(Er.$$.fragment,l),w(pl.$$.fragment,l),w(ml.$$.fragment,l),w(vl.$$.fragment,l),w(Jr.$$.fragment,l),w(xr.$$.fragment,l),w(Tl.$$.fragment,l),w(Ml.$$.fragment,l),w(El.$$.fragment,l),w(zr.$$.fragment,l),w(Ur.$$.fragment,l),w(Ll.$$.fragment,l),w(Jl.$$.fragment,l),w(Al.$$.fragment,l),w(Ir.$$.fragment,l),w(Zr.$$.fragment,l),w(Bl.$$.fragment,l),w(ql.$$.fragment,l),w(Dl.$$.fragment,l),w(Br.$$.fragment,l),w(qr.$$.fragment,l),w(Yl.$$.fragment,l),w(Kl.$$.fragment,l),w(li.$$.fragment,l),w(Gr.$$.fragment,l),w(Xr.$$.fragment,l),w(ii.$$.fragment,l),w(di.$$.fragment,l),w(_i.$$.fragment,l),w(Qr.$$.fragment,l),w(Hr.$$.fragment,l),ou=!0)},o(l){F(i.$$.fragment,l),F(R.$$.fragment,l),F(ba.$$.fragment,l),F(va.$$.fragment,l),F(Ta.$$.fragment,l),F(Rn.$$.fragment,l),F(ka.$$.fragment,l),F(wa.$$.fragment,l),F(ja.$$.fragment,l),F(En.$$.fragment,l),F(Ln.$$.fragment,l),F(Ea.$$.fragment,l),F(La.$$.fragment,l),F(Ua.$$.fragment,l),F(xn.$$.fragment,l),F(Cn.$$.fragment,l),F(Wa.$$.fragment,l),F(Ia.$$.fragment,l),F(Va.$$.fragment,l),F(Un.$$.fragment,l),F(Wn.$$.fragment,l),F(Ga.$$.fragment,l),F(Xa.$$.fragment,l),F(Oa.$$.fragment,l),F(Zn.$$.fragment,l),F(An.$$.fragment,l),F(Bn.$$.fragment,l),F(Da.$$.fragment,l),F(Ya.$$.fragment,l),F(os.$$.fragment,l),F(Vn.$$.fragment,l),F(Gn.$$.fragment,l),F(ns.$$.fragment,l),F(rs.$$.fragment,l),F(is.$$.fragment,l),F(Sn.$$.fragment,l),F(Qn.$$.fragment,l),F(ds.$$.fragment,l),F(cs.$$.fragment,l),F(us.$$.fragment,l),F(On.$$.fragment,l),F(Dn.$$.fragment,l),F(fs.$$.fragment,l),F(gs.$$.fragment,l),F(Kn.$$.fragment,l),F(vs.$$.fragment,l),F(er.$$.fragment,l),F(tr.$$.fragment,l),F(Ts.$$.fragment,l),F(Ms.$$.fragment,l),F(ks.$$.fragment,l),F(nr.$$.fragment,l),F(rr.$$.fragment,l),F(ws.$$.fragment,l),F(Fs.$$.fragment,l),F(sr.$$.fragment,l),F(js.$$.fragment,l),F(lr.$$.fragment,l),F(ir.$$.fragment,l),F(dr.$$.fragment,l),F(Es.$$.fragment,l),F(Ls.$$.fragment,l),F(pr.$$.fragment,l),F(zs.$$.fragment,l),F(mr.$$.fragment,l),F(hr.$$.fragment,l),F(ur.$$.fragment,l),F(Us.$$.fragment,l),F(Ws.$$.fragment,l),F(gr.$$.fragment,l),F(Bs.$$.fragment,l),F(_r.$$.fragment,l),F(yr.$$.fragment,l),F(qs.$$.fragment,l),F(Vs.$$.fragment,l),F(vr.$$.fragment,l),F(Qs.$$.fragment,l),F(Tr.$$.fragment,l),F(Mr.$$.fragment,l),F(kr.$$.fragment,l),F(Hs.$$.fragment,l),F(Os.$$.fragment,l),F(Fr.$$.fragment,l),F(el.$$.fragment,l),F(Nr.$$.fragment,l),F($r.$$.fragment,l),F(Rr.$$.fragment,l),F(tl.$$.fragment,l),F(ol.$$.fragment,l),F(cl.$$.fragment,l),F(jr.$$.fragment,l),F(Er.$$.fragment,l),F(pl.$$.fragment,l),F(ml.$$.fragment,l),F(vl.$$.fragment,l),F(Jr.$$.fragment,l),F(xr.$$.fragment,l),F(Tl.$$.fragment,l),F(Ml.$$.fragment,l),F(El.$$.fragment,l),F(zr.$$.fragment,l),F(Ur.$$.fragment,l),F(Ll.$$.fragment,l),F(Jl.$$.fragment,l),F(Al.$$.fragment,l),F(Ir.$$.fragment,l),F(Zr.$$.fragment,l),F(Bl.$$.fragment,l),F(ql.$$.fragment,l),F(Dl.$$.fragment,l),F(Br.$$.fragment,l),F(qr.$$.fragment,l),F(Yl.$$.fragment,l),F(Kl.$$.fragment,l),F(li.$$.fragment,l),F(Gr.$$.fragment,l),F(Xr.$$.fragment,l),F(ii.$$.fragment,l),F(di.$$.fragment,l),F(_i.$$.fragment,l),F(Qr.$$.fragment,l),F(Hr.$$.fragment,l),ou=!1},d(l){t(d),l&&t(y),l&&t(h),N(i),l&&t(he),l&&t(Z),N(R),l&&t(ue),l&&t(U),l&&t(fe),l&&t(ee),l&&t(x),l&&t(ie),l&&t(ge),l&&t(q),l&&t(_e),l&&t(J),l&&t(W),l&&t(I),l&&t(ne),l&&t(Ce),N(ba),l&&t(ph),l&&t(ft),l&&t(mh),l&&t(Po),N(va),l&&t(hh),l&&t(Ut),N(Ta),N(Rn),l&&t(uh),l&&t(Eo),N(ka),l&&t(fh),l&&t(Ke),N(wa),N(ja),N(En),N(Ln),l&&t(gh),l&&t(Jo),N(Ea),l&&t(_h),l&&t(_t),N(La),N(Ua),N(xn),N(Cn),l&&t(yh),l&&t(Co),N(Wa),l&&t(bh),l&&t(yt),N(Ia),N(Va),N(Un),N(Wn),l&&t(vh),l&&t(Uo),N(Ga),l&&t(Th),l&&t(bt),N(Xa),N(Oa),N(Zn),N(An),N(Bn),l&&t(Mh),l&&t(Io),N(Da),l&&t(kh),l&&t(vt),N(Ya),N(os),N(Vn),N(Gn),l&&t(wh),l&&t(Ao),N(ns),l&&t(Fh),l&&t(Tt),N(rs),N(is),N(Sn),N(Qn),l&&t(Nh),l&&t(qo),N(ds),l&&t($h),l&&t(Mt),N(cs),N(us),N(On),N(Dn),l&&t(Rh),l&&t(Xo),N(fs),l&&t(Ph),l&&t(it),N(gs),N(Kn),N(vs),N(er),N(tr),l&&t(jh),l&&t(Qo),N(Ts),l&&t(Eh),l&&t(Ho),N(Ms),N(ks),N(nr),N(rr),l&&t(Lh),l&&t(Do),N(ws),l&&t(Jh),l&&t(dt),N(Fs),N(sr),N(js),N(lr),N(ir),N(dr),l&&t(xh),l&&t(Ko),N(Es),l&&t(Ch),l&&t(ct),N(Ls),N(pr),N(zs),N(mr),N(hr),N(ur),l&&t(zh),l&&t(tn),N(Us),l&&t(Uh),l&&t(pt),N(Ws),N(gr),N(Bs),N(_r),N(yr),l&&t(Wh),l&&t(nn),N(qs),l&&t(Ih),l&&t(mt),N(Vs),N(vr),N(Qs),N(Tr),N(Mr),N(kr),l&&t(Zh),l&&t(an),N(Hs),l&&t(Ah),l&&t(ht),N(Os),N(Fr),N(el),N(Nr),N($r),N(Rr),l&&t(Bh),l&&t(dn),N(tl),l&&t(qh),l&&t(et),N(ol),N(cl),N(jr),N(Er),l&&t(Vh),l&&t(pn),N(pl),l&&t(Gh),l&&t(tt),N(ml),N(vl),N(Jr),N(xr),l&&t(Xh),l&&t(hn),N(Tl),l&&t(Sh),l&&t(ot),N(Ml),N(El),N(zr),N(Ur),l&&t(Qh),l&&t(fn),N(Ll),l&&t(Hh),l&&t(nt),N(Jl),N(Al),N(Ir),N(Zr),l&&t(Oh),l&&t(_n),N(Bl),l&&t(Dh),l&&t(rt),N(ql),N(Dl),N(Br),N(qr),l&&t(Yh),l&&t(bn),N(Yl),l&&t(Kh),l&&t(at),N(Kl),N(li),N(Gr),N(Xr),l&&t(eu),l&&t(Tn),N(ii),l&&t(tu),l&&t(st),N(di),N(_i),N(Qr),N(Hr)}}}const BR={local:"robertaprelayernorm",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.RobertaPreLayerNormConfig",title:"RobertaPreLayerNormConfig"},{local:"transformers.RobertaPreLayerNormModel",title:"RobertaPreLayerNormModel"},{local:"transformers.RobertaPreLayerNormForCausalLM",title:"RobertaPreLayerNormForCausalLM"},{local:"transformers.RobertaPreLayerNormForMaskedLM",title:"RobertaPreLayerNormForMaskedLM"},{local:"transformers.RobertaPreLayerNormForSequenceClassification",title:"RobertaPreLayerNormForSequenceClassification"},{local:"transformers.RobertaPreLayerNormForMultipleChoice",title:"RobertaPreLayerNormForMultipleChoice"},{local:"transformers.RobertaPreLayerNormForTokenClassification",title:"RobertaPreLayerNormForTokenClassification"},{local:"transformers.RobertaPreLayerNormForQuestionAnswering",title:"RobertaPreLayerNormForQuestionAnswering"},{local:"transformers.TFRobertaPreLayerNormModel",title:"TFRobertaPreLayerNormModel"},{local:"transformers.TFRobertaPreLayerNormForCausalLM",title:"TFRobertaPreLayerNormForCausalLM"},{local:"transformers.TFRobertaPreLayerNormForMaskedLM",title:"TFRobertaPreLayerNormForMaskedLM"},{local:"transformers.TFRobertaPreLayerNormForSequenceClassification",title:"TFRobertaPreLayerNormForSequenceClassification"},{local:"transformers.TFRobertaPreLayerNormForMultipleChoice",title:"TFRobertaPreLayerNormForMultipleChoice"},{local:"transformers.TFRobertaPreLayerNormForTokenClassification",title:"TFRobertaPreLayerNormForTokenClassification"},{local:"transformers.TFRobertaPreLayerNormForQuestionAnswering",title:"TFRobertaPreLayerNormForQuestionAnswering"},{local:"transformers.FlaxRobertaPreLayerNormModel",title:"FlaxRobertaPreLayerNormModel"},{local:"transformers.FlaxRobertaPreLayerNormForCausalLM",title:"FlaxRobertaPreLayerNormForCausalLM"},{local:"transformers.FlaxRobertaPreLayerNormForMaskedLM",title:"FlaxRobertaPreLayerNormForMaskedLM"},{local:"transformers.FlaxRobertaPreLayerNormForSequenceClassification",title:"FlaxRobertaPreLayerNormForSequenceClassification"},{local:"transformers.FlaxRobertaPreLayerNormForMultipleChoice",title:"FlaxRobertaPreLayerNormForMultipleChoice"},{local:"transformers.FlaxRobertaPreLayerNormForTokenClassification",title:"FlaxRobertaPreLayerNormForTokenClassification"},{local:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering",title:"FlaxRobertaPreLayerNormForQuestionAnswering"}],title:"RoBERTa-PreLayerNorm"};function qR($){return Z$(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class OR extends z${constructor(d){super();U$(this,d,qR,AR,W$,{})}}export{OR as default,BR as metadata};
