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 q}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ie}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Be}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 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 B$($){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,J,ie,G,Fe,ge,B,Ne,_e,C,X,O,de,$e,D,pe,Re,A,me,Y,Pe,oe,x,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"),J=r("li"),ie=o("a single Tensor with "),G=r("code"),Fe=o("input_ids"),ge=o(" only and nothing else: "),B=r("code"),Ne=o("model(input_ids)"),_e=p(),C=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(),x=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 Ce=s(P);ye=n(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.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);J=a(W,"LI",{});var I=s(J);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: "),B=a(I,"CODE",{});var Ae=s(B);Ne=n(Ae,"model(input_ids)"),Ae.forEach(t),I.forEach(t),_e=m(W),C=a(W,"LI",{});var K=s(C);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 qe=s(D);pe=n(qe,"model([input_ids, attention_mask, token_type_ids])"),qe.forEach(t),K.forEach(t),Re=m(W),A=a(W,"LI",{});var Je=s(A);me=n(Je,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a(Je,"CODE",{});var Ye=s(Y);Pe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(t),Je.forEach(t),W.forEach(t),oe=m(v),x=a(v,"P",{});var ne=s(x);je=n(ne,`Note that when creating models and layers with
`),z=a(ne,"A",{href:!0,rel:!0});var xe=s(z);Ee=n(xe,"subclassing"),xe.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,J),e(J,ie),e(J,G),e(G,Fe),e(J,ge),e(J,B),e(B,Ne),e(L,_e),e(L,C),e(C,X),e(C,O),e(O,de),e(C,$e),e(C,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,x,j),e(x,je),e(x,z),e(z,Ee),e(x,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(x)}}}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,J,ie,G,Fe,ge,B,Ne,_e,C,X,O,de,$e,D,pe,Re,A,me,Y,Pe,oe,x,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"),J=r("li"),ie=o("a single Tensor with "),G=r("code"),Fe=o("input_ids"),ge=o(" only and nothing else: "),B=r("code"),Ne=o("model(input_ids)"),_e=p(),C=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(),x=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 Ce=s(P);ye=n(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.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);J=a(W,"LI",{});var I=s(J);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: "),B=a(I,"CODE",{});var Ae=s(B);Ne=n(Ae,"model(input_ids)"),Ae.forEach(t),I.forEach(t),_e=m(W),C=a(W,"LI",{});var K=s(C);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 qe=s(D);pe=n(qe,"model([input_ids, attention_mask, token_type_ids])"),qe.forEach(t),K.forEach(t),Re=m(W),A=a(W,"LI",{});var Je=s(A);me=n(Je,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a(Je,"CODE",{});var Ye=s(Y);Pe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(t),Je.forEach(t),W.forEach(t),oe=m(v),x=a(v,"P",{});var ne=s(x);je=n(ne,`Note that when creating models and layers with
`),z=a(ne,"A",{href:!0,rel:!0});var xe=s(z);Ee=n(xe,"subclassing"),xe.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,J),e(J,ie),e(J,G),e(G,Fe),e(J,ge),e(J,B),e(B,Ne),e(L,_e),e(L,C),e(C,X),e(C,O),e(O,de),e(C,$e),e(C,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,x,j),e(x,je),e(x,z),e(z,Ee),e(x,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(x)}}}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,J,ie,G,Fe,ge,B,Ne,_e,C,X,O,de,$e,D,pe,Re,A,me,Y,Pe,oe,x,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"),J=r("li"),ie=o("a single Tensor with "),G=r("code"),Fe=o("input_ids"),ge=o(" only and nothing else: "),B=r("code"),Ne=o("model(input_ids)"),_e=p(),C=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(),x=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 Ce=s(P);ye=n(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.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);J=a(W,"LI",{});var I=s(J);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: "),B=a(I,"CODE",{});var Ae=s(B);Ne=n(Ae,"model(input_ids)"),Ae.forEach(t),I.forEach(t),_e=m(W),C=a(W,"LI",{});var K=s(C);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 qe=s(D);pe=n(qe,"model([input_ids, attention_mask, token_type_ids])"),qe.forEach(t),K.forEach(t),Re=m(W),A=a(W,"LI",{});var Je=s(A);me=n(Je,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a(Je,"CODE",{});var Ye=s(Y);Pe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(t),Je.forEach(t),W.forEach(t),oe=m(v),x=a(v,"P",{});var ne=s(x);je=n(ne,`Note that when creating models and layers with
`),z=a(ne,"A",{href:!0,rel:!0});var xe=s(z);Ee=n(xe,"subclassing"),xe.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,J),e(J,ie),e(J,G),e(G,Fe),e(J,ge),e(J,B),e(B,Ne),e(L,_e),e(L,C),e(C,X),e(C,O),e(O,de),e(C,$e),e(C,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,x,j),e(x,je),e(x,z),e(z,Ee),e(x,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(x)}}}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,J,ie,G,Fe,ge,B,Ne,_e,C,X,O,de,$e,D,pe,Re,A,me,Y,Pe,oe,x,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"),J=r("li"),ie=o("a single Tensor with "),G=r("code"),Fe=o("input_ids"),ge=o(" only and nothing else: "),B=r("code"),Ne=o("model(input_ids)"),_e=p(),C=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(),x=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 Ce=s(P);ye=n(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.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);J=a(W,"LI",{});var I=s(J);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: "),B=a(I,"CODE",{});var Ae=s(B);Ne=n(Ae,"model(input_ids)"),Ae.forEach(t),I.forEach(t),_e=m(W),C=a(W,"LI",{});var K=s(C);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 qe=s(D);pe=n(qe,"model([input_ids, attention_mask, token_type_ids])"),qe.forEach(t),K.forEach(t),Re=m(W),A=a(W,"LI",{});var Je=s(A);me=n(Je,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a(Je,"CODE",{});var Ye=s(Y);Pe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(t),Je.forEach(t),W.forEach(t),oe=m(v),x=a(v,"P",{});var ne=s(x);je=n(ne,`Note that when creating models and layers with
`),z=a(ne,"A",{href:!0,rel:!0});var xe=s(z);Ee=n(xe,"subclassing"),xe.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,J),e(J,ie),e(J,G),e(G,Fe),e(J,ge),e(J,B),e(B,Ne),e(L,_e),e(L,C),e(C,X),e(C,O),e(O,de),e(C,$e),e(C,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,x,j),e(x,je),e(x,z),e(z,Ee),e(x,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(x)}}}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,J,ie,G,Fe,ge,B,Ne,_e,C,X,O,de,$e,D,pe,Re,A,me,Y,Pe,oe,x,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"),J=r("li"),ie=o("a single Tensor with "),G=r("code"),Fe=o("input_ids"),ge=o(" only and nothing else: "),B=r("code"),Ne=o("model(input_ids)"),_e=p(),C=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(),x=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 Ce=s(P);ye=n(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.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);J=a(W,"LI",{});var I=s(J);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: "),B=a(I,"CODE",{});var Ae=s(B);Ne=n(Ae,"model(input_ids)"),Ae.forEach(t),I.forEach(t),_e=m(W),C=a(W,"LI",{});var K=s(C);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 qe=s(D);pe=n(qe,"model([input_ids, attention_mask, token_type_ids])"),qe.forEach(t),K.forEach(t),Re=m(W),A=a(W,"LI",{});var Je=s(A);me=n(Je,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a(Je,"CODE",{});var Ye=s(Y);Pe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(t),Je.forEach(t),W.forEach(t),oe=m(v),x=a(v,"P",{});var ne=s(x);je=n(ne,`Note that when creating models and layers with
`),z=a(ne,"A",{href:!0,rel:!0});var xe=s(z);Ee=n(xe,"subclassing"),xe.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,J),e(J,ie),e(J,G),e(G,Fe),e(J,ge),e(J,B),e(B,Ne),e(L,_e),e(L,C),e(C,X),e(C,O),e(O,de),e(C,$e),e(C,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,x,j),e(x,je),e(x,z),e(z,Ee),e(x,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(x)}}}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,J,ie,G,Fe,ge,B,Ne,_e,C,X,O,de,$e,D,pe,Re,A,me,Y,Pe,oe,x,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"),J=r("li"),ie=o("a single Tensor with "),G=r("code"),Fe=o("input_ids"),ge=o(" only and nothing else: "),B=r("code"),Ne=o("model(input_ids)"),_e=p(),C=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(),x=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 Ce=s(P);ye=n(Ce,"having all inputs as keyword arguments (like PyTorch models), or"),Ce.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);J=a(W,"LI",{});var I=s(J);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: "),B=a(I,"CODE",{});var Ae=s(B);Ne=n(Ae,"model(input_ids)"),Ae.forEach(t),I.forEach(t),_e=m(W),C=a(W,"LI",{});var K=s(C);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 qe=s(D);pe=n(qe,"model([input_ids, attention_mask, token_type_ids])"),qe.forEach(t),K.forEach(t),Re=m(W),A=a(W,"LI",{});var Je=s(A);me=n(Je,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),Y=a(Je,"CODE",{});var Ye=s(Y);Pe=n(Ye,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ye.forEach(t),Je.forEach(t),W.forEach(t),oe=m(v),x=a(v,"P",{});var ne=s(x);je=n(ne,`Note that when creating models and layers with
`),z=a(ne,"A",{href:!0,rel:!0});var xe=s(z);Ee=n(xe,"subclassing"),xe.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,J),e(J,ie),e(J,G),e(G,Fe),e(J,ge),e(J,B),e(B,Ne),e(L,_e),e(L,C),e(C,X),e(C,O),e(O,de),e(C,$e),e(C,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,x,j),e(x,je),e(x,z),e(z,Ee),e(x,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(x)}}}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 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 JR($){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 xR($){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,J,ie,G,Fe,ge,B,Ne,_e,C,X,O,de,$e,D,pe,Re,A,me,Y,Pe,oe,x,je,z,Ee,Le,v,j,Ve,re,Ce,Ge,E,Xe,Se,Ze,Qe,He,W,I,Oe,Ae,K,De,qe,Je,Ye,ne,xe,Nn,Wd,ba,_f,Id,yf,ph,ft,Zd,ki,bf,vf,Ad,wi,Tf,Mf,qd,Fi,kf,wf,Bd,Ni,Ff,Nf,Vd,$i,$f,Rf,Gd,Ri,Pf,mh,Po,$n,Xd,va,jf,Sd,Ef,hh,Ut,Ta,Lf,so,Cf,Pi,Jf,xf,ji,zf,Uf,Ma,Wf,If,Zf,jo,Af,Ei,qf,Bf,Li,Vf,Gf,Xf,Rn,uh,Eo,Pn,Qd,ka,Sf,Hd,Qf,fh,Ke,wa,Hf,Od,Of,Df,Fa,Yf,Ci,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,Ji,Eg,Lg,ac,Cg,Jg,xg,En,zg,Ln,gh,Co,Cn,sc,Ea,Ug,lc,Wg,_h,_t,La,Ig,Ca,Zg,ic,Ag,qg,Bg,Ja,Vg,xi,Gg,Xg,Sg,xa,Qg,za,Hg,Og,Dg,It,Ua,Yg,Jo,Kg,zi,e_,t_,dc,o_,n_,r_,Jn,a_,xn,yh,xo,zn,cc,Wa,s_,pc,l_,bh,yt,Ia,i_,Za,d_,mc,c_,p_,m_,Aa,h_,Ui,u_,f_,g_,qa,__,Ba,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_,C_,Sa,J_,Ii,x_,z_,U_,Qa,W_,Ha,I_,Z_,A_,wt,Oa,q_,Wo,B_,Zi,V_,G_,_c,X_,S_,Q_,Zn,H_,An,O_,qn,Mh,Io,Bn,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,qi,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,Bi,wy,Fy,Ny,ss,$y,ls,Ry,Py,jy,qt,is,Ey,qo,Ly,Vi,Cy,Jy,Fc,xy,zy,Uy,Sn,Wy,Qn,Nh,Bo,Hn,Nc,ds,Iy,$c,Zy,$h,Mt,cs,Ay,Vo,qy,Rc,By,Vy,Pc,Gy,Xy,Sy,ps,Qy,Gi,Hy,Oy,Dy,ms,Yy,hs,Ky,eb,tb,Bt,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,Cc,hb,ub,_s,fb,Si,gb,_b,yb,ys,bb,bs,vb,Tb,Mb,Kn,kb,Vt,vs,wb,So,Fb,Qi,Nb,$b,Jc,Rb,Pb,jb,er,Eb,tr,jh,Qo,or,xc,Ts,Lb,zc,Cb,Eh,Ho,Ms,Jb,Gt,ks,xb,Oo,zb,Hi,Ub,Wb,Uc,Ib,Zb,Ab,nr,qb,rr,Lh,Do,ar,Wc,ws,Bb,Ic,Vb,Ch,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,Jh,Ko,cr,qc,Es,uv,Bc,fv,xh,ct,Ls,gv,Vc,_v,yv,Cs,bv,Yi,vv,Tv,Mv,Js,kv,xs,wv,Fv,Nv,pr,$v,Nt,zs,Rv,en,Pv,Ki,jv,Ev,Gc,Lv,Cv,Jv,mr,xv,hr,zv,ur,zh,tn,fr,Xc,Us,Uv,Sc,Wv,Uh,pt,Ws,Iv,Qc,Zv,Av,Is,qv,ed,Bv,Vv,Gv,Zs,Xv,As,Sv,Qv,Hv,gr,Ov,Xt,qs,Dv,on,Yv,td,Kv,eT,Hc,tT,oT,nT,_r,rT,yr,Wh,nn,br,Oc,Bs,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,CT,np,JT,xT,zT,Ds,UT,rd,WT,IT,ZT,Ys,AT,Ks,qT,BT,VT,Fr,GT,Rt,el,XT,ln,ST,ad,QT,HT,rp,OT,DT,YT,Nr,KT,$r,eM,Rr,qh,dn,Pr,ap,tl,tM,sp,oM,Bh,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,CM,Gh,tt,ml,JM,_p,xM,zM,hl,UM,ld,WM,IM,ZM,ul,AM,fl,qM,BM,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,Cr,ik,Jr,Xh,hn,xr,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,Ck,Ht,El,Jk,un,xk,Cp,zk,Uk,Jp,Wk,Ik,Zk,zr,Ak,Ur,Qh,fn,Wr,xp,Ll,qk,zp,Bk,Hh,nt,Cl,Vk,Up,Gk,Xk,Jl,Sk,dd,Qk,Hk,Ok,xl,Dk,zl,Yk,Kk,ew,Wp,tw,ow,po,Ip,Ul,nw,rw,Zp,Wl,aw,sw,Ap,Il,lw,iw,qp,Zl,dw,cw,Ot,Al,pw,gn,mw,Bp,hw,uw,Vp,fw,gw,_w,Ir,yw,Zr,Oh,_n,Ar,Gp,ql,bw,Xp,vw,Dh,rt,Bl,Tw,Sp,Mw,kw,Vl,ww,cd,Fw,Nw,$w,Gl,Rw,Xl,Pw,jw,Ew,Qp,Lw,Cw,mo,Hp,Sl,Jw,xw,Op,Ql,zw,Uw,Dp,Hl,Ww,Iw,Yp,Ol,Zw,Aw,Dt,Dl,qw,yn,Bw,Kp,Vw,Gw,em,Xw,Sw,Qw,qr,Hw,Br,Yh,bn,Vr,tm,Yl,Ow,om,Dw,Kh,at,Kl,Yw,nm,Kw,e1,ei,t1,pd,o1,n1,r1,ti,a1,oi,s1,l1,i1,rm,d1,c1,ho,am,ni,p1,m1,sm,ri,h1,u1,lm,ai,f1,g1,im,si,_1,y1,Yt,li,b1,vn,v1,dm,T1,M1,cm,k1,w1,F1,Gr,N1,Xr,eu,Tn,Sr,pm,ii,$1,mm,R1,tu,st,di,P1,Mn,j1,hm,E1,L1,um,C1,J1,x1,ci,z1,md,U1,W1,I1,pi,Z1,mi,A1,q1,B1,fm,V1,G1,uo,gm,hi,X1,S1,_m,ui,Q1,H1,ym,fi,O1,D1,bm,gi,Y1,K1,Kt,_i,e0,kn,t0,vm,o0,n0,Tm,r0,a0,s0,Qr,l0,Hr,ou;return i=new Be({}),R=new Be({}),ba=new Be({}),va=new Be({}),Ta=new q({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.31.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormModel">RobertaPreLayerNormModel</a> or
<a href="/docs/transformers/v4.31.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.31.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormModel">RobertaPreLayerNormModel</a> or
<a href="/docs/transformers/v4.31.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.31.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 Be({}),wa=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L694"}}),ja=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L737",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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:[q$]},$$scope:{ctx:$}}}),Ln=new Ue({props:{anchor:"transformers.RobertaPreLayerNormModel.forward.example",$$slots:{default:[B$]},$$scope:{ctx:$}}}),Ea=new Be({}),La=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L879"}}),Ua=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L902",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Jn=new ze({props:{$$slots:{default:[V$]},$$scope:{ctx:$}}}),xn=new Ue({props:{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.example",$$slots:{default:[G$]},$$scope:{ctx:$}}}),Wa=new Be({}),Ia=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1032"}}),Va=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1057",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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 Be({}),Xa=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1166"}}),Oa=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1178",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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:$}}}),qn=new Ue({props:{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.example-2",$$slots:{default:[O$]},$$scope:{ctx:$}}}),Da=new Be({}),Ya=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1265"}}),os=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1276",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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 Be({}),rs=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1359"}}),is=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1374",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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 Be({}),cs=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1466"}}),us=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1477",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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 Be({}),gs=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L883"}}),Kn=new ze({props:{$$slots:{default:[nR]},$$scope:{ctx:$}}}),vs=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L888",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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 Be({}),Ms=new q({props:{name:"class transformers.TFRobertaPreLayerNormForCausalLM",anchor:"transformers.TFRobertaPreLayerNormForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1090"}}),ks=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1129",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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 Be({}),Fs=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1008"}}),sr=new ze({props:{$$slots:{default:[iR]},$$scope:{ctx:$}}}),js=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1028",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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 Be({}),Ls=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1254"}}),pr=new ze({props:{$$slots:{default:[mR]},$$scope:{ctx:$}}}),zs=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1269",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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 Be({}),Ws=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1334"}}),gr=new ze({props:{$$slots:{default:[gR]},$$scope:{ctx:$}}}),qs=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1348",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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:$}}}),Bs=new Be({}),Vs=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1426"}}),vr=new ze({props:{$$slots:{default:[bR]},$$scope:{ctx:$}}}),Qs=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1446",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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 Be({}),Os=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1510"}}),Fr=new ze({props:{$$slots:{default:[kR]},$$scope:{ctx:$}}}),el=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1525",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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 Be({}),ol=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L995"}}),cl=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L819",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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 Be({}),ml=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1478"}}),vl=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L819",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Cr=new ze({props:{$$slots:{default:[PR]},$$scope:{ctx:$}}}),Jr=new Ue({props:{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.example",$$slots:{default:[jR]},$$scope:{ctx:$}}}),Tl=new Be({}),Ml=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1072"}}),El=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L819",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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 Be({}),Cl=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1146"}}),Al=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L819",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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:[CR]},$$scope:{ctx:$}}}),Zr=new Ue({props:{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.example",$$slots:{default:[JR]},$$scope:{ctx:$}}}),ql=new Be({}),Bl=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1228"}}),Dl=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L819",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),qr=new ze({props:{$$slots:{default:[xR]},$$scope:{ctx:$}}}),Br=new Ue({props:{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.example",$$slots:{default:[zR]},$$scope:{ctx:$}}}),Yl=new Be({}),Kl=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1312"}}),li=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L819",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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 Be({}),di=new q({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.31.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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1390"}}),_i=new q({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.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__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.31.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.31.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L819",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.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.31.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.31.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:"),J=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(),B=r("p"),Ne=o("Tips:"),_e=p(),C=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"),x=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(),Ce=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 `),qe=r("a"),Je=o("here"),Ye=o("."),ne=p(),xe=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(),qd=r("li"),Fi=r("a"),kf=o("Question answering task guide"),wf=p(),Bd=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"),Cf=o("This is the configuration class to store the configuration of a "),Pi=r("a"),Jf=o("RobertaPreLayerNormModel"),xf=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"),qf=o("PretrainedConfig"),Bf=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 "),Ci=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 "),Ji=r("a"),Eg=o("RobertaPreLayerNormModel"),Lg=o(" forward method, overrides the "),ac=r("code"),Cg=o("__call__"),Jg=o(" special method."),xg=p(),T(En.$$.fragment),zg=p(),T(Ln.$$.fragment),gh=p(),Co=r("h2"),Cn=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(),Ca=r("p"),Zg=o("RoBERTa-PreLayerNorm Model with a "),ic=r("code"),Ag=o("language modeling"),qg=o(" head on top for CLM fine-tuning."),Bg=p(),Ja=r("p"),Vg=o("This model inherits from "),xi=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(),xa=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(),Jo=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(Jn.$$.fragment),a_=p(),T(xn.$$.fragment),yh=p(),xo=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(),qa=r("p"),__=o("This model is also a PyTorch "),Ba=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.`),C_=p(),Sa=r("p"),J_=o("This model inherits from "),Ii=r("a"),x_=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),q_=p(),Wo=r("p"),B_=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(qn.$$.fragment),Mh=p(),Io=r("h2"),Bn=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 "),qi=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 "),Bi=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(),qt=r("div"),T(is.$$.fragment),Ey=p(),qo=r("p"),Ly=o("The "),Vi=r("a"),Cy=o("RobertaPreLayerNormForTokenClassification"),Jy=o(" forward method, overrides the "),Fc=r("code"),xy=o("__call__"),zy=o(" special method."),Uy=p(),T(Sn.$$.fragment),Wy=p(),T(Qn.$$.fragment),Nh=p(),Bo=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"),qy=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"),By=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(),Bt=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(),Cc=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 "),Jc=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"),xc=r("span"),T(Ts.$$.fragment),Lb=p(),zc=r("span"),Cb=o("TFRobertaPreLayerNormForCausalLM"),Eh=p(),Ho=r("div"),T(Ms.$$.fragment),Jb=p(),Gt=r("div"),T(ks.$$.fragment),xb=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),qb=p(),T(rr.$$.fragment),Lh=p(),Do=r("h2"),ar=r("a"),Wc=r("span"),T(ws.$$.fragment),Bb=p(),Ic=r("span"),Vb=o("TFRobertaPreLayerNormForMaskedLM"),Ch=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),Jh=p(),Ko=r("h2"),cr=r("a"),qc=r("span"),T(Es.$$.fragment),uv=p(),Bc=r("span"),fv=o("TFRobertaPreLayerNormForSequenceClassification"),xh=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(),Cs=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(),Js=r("p"),kv=o("This model is also a "),xs=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__"),Cv=o(" special method."),Jv=p(),T(mr.$$.fragment),xv=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"),qv=o("This model inherits from "),ed=r("a"),Bv=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(qs.$$.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(Bs.$$.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"),CT=o(" and "),np=r("code"),JT=o("span end logits"),xT=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"),qT=o("tf.keras.Model"),BT=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),qh=p(),dn=r("h2"),Pr=r("a"),ap=r("span"),T(tl.$$.fragment),tM=p(),sp=r("span"),oM=o("FlaxRobertaPreLayerNormModel"),Bh=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"),CM=o("FlaxRobertaPreLayerNormForCausalLM"),Gh=p(),tt=r("div"),T(ml.$$.fragment),JM=p(),_p=r("p"),xM=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"),qM=o("flax.linen.Module"),BM=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(Cr.$$.fragment),ik=p(),T(Jr.$$.fragment),Xh=p(),hn=r("h2"),xr=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"),Ck=p(),Ht=r("div"),T(El.$$.fragment),Jk=p(),un=r("p"),xk=o("The "),Cp=r("code"),zk=o("FlaxRobertaPreLayerNormPreTrainedModel"),Uk=o(" forward method, overrides the "),Jp=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"),xp=r("span"),T(Ll.$$.fragment),qk=p(),zp=r("span"),Bk=o("FlaxRobertaPreLayerNormForSequenceClassification"),Hh=p(),nt=r("div"),T(Cl.$$.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(),Jl=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(),xl=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(),qp=r("li"),Zl=r("a"),dw=o("Parallelization"),cw=p(),Ot=r("div"),T(Al.$$.fragment),pw=p(),gn=r("p"),mw=o("The "),Bp=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(ql.$$.fragment),bw=p(),Xp=r("span"),vw=o("FlaxRobertaPreLayerNormForMultipleChoice"),Dh=p(),rt=r("div"),T(Bl.$$.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:"),Cw=p(),mo=r("ul"),Hp=r("li"),Sl=r("a"),Jw=o("Just-In-Time (JIT) compilation"),xw=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),qw=p(),yn=r("p"),Bw=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(qr.$$.fragment),Hw=p(),T(Br.$$.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.`),e1=p(),ei=r("p"),t1=o("This model inherits from "),pd=r("a"),o1=o("FlaxPreTrainedModel"),n1=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)`),r1=p(),ti=r("p"),a1=o("This model is also a Flax Linen "),oi=r("a"),s1=o("flax.linen.Module"),l1=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.`),i1=p(),rm=r("p"),d1=o("Finally, this model supports inherent JAX features such as:"),c1=p(),ho=r("ul"),am=r("li"),ni=r("a"),p1=o("Just-In-Time (JIT) compilation"),m1=p(),sm=r("li"),ri=r("a"),h1=o("Automatic Differentiation"),u1=p(),lm=r("li"),ai=r("a"),f1=o("Vectorization"),g1=p(),im=r("li"),si=r("a"),_1=o("Parallelization"),y1=p(),Yt=r("div"),T(li.$$.fragment),b1=p(),vn=r("p"),v1=o("The "),dm=r("code"),T1=o("FlaxRobertaPreLayerNormPreTrainedModel"),M1=o(" forward method, overrides the "),cm=r("code"),k1=o("__call__"),w1=o(" special method."),F1=p(),T(Gr.$$.fragment),N1=p(),T(Xr.$$.fragment),eu=p(),Tn=r("h2"),Sr=r("a"),pm=r("span"),T(ii.$$.fragment),$1=p(),mm=r("span"),R1=o("FlaxRobertaPreLayerNormForQuestionAnswering"),tu=p(),st=r("div"),T(di.$$.fragment),P1=p(),Mn=r("p"),j1=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"),E1=o("span start logits"),L1=o(" and "),um=r("code"),C1=o("span end logits"),J1=o(")."),x1=p(),ci=r("p"),z1=o("This model inherits from "),md=r("a"),U1=o("FlaxPreTrainedModel"),W1=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)`),I1=p(),pi=r("p"),Z1=o("This model is also a Flax Linen "),mi=r("a"),A1=o("flax.linen.Module"),q1=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.`),B1=p(),fm=r("p"),V1=o("Finally, this model supports inherent JAX features such as:"),G1=p(),uo=r("ul"),gm=r("li"),hi=r("a"),X1=o("Just-In-Time (JIT) compilation"),S1=p(),_m=r("li"),ui=r("a"),Q1=o("Automatic Differentiation"),H1=p(),ym=r("li"),fi=r("a"),O1=o("Vectorization"),D1=p(),bm=r("li"),gi=r("a"),Y1=o("Parallelization"),K1=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),J=m(l),ie=a(l,"P",{});var Lm=s(ie);G=a(Lm,"EM",{});var Cm=s(G);Fe=n(Cm,"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."),Cm.forEach(t),Lm.forEach(t),ge=m(l),B=a(l,"P",{});var Jm=s(B);Ne=n(Jm,"Tips:"),Jm.forEach(t),_e=m(l),C=a(l,"UL",{});var vi=s(C);X=a(vi,"LI",{});var ut=s(X);O=n(ut,"The implementation is the same as "),de=a(ut,"A",{href:!0});var xm=s(de);$e=n(xm,"Roberta"),xm.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);x=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),Ce=a(vi,"LI",{});var wn=s(Ce);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 qm=s(Ze);Qe=n(qm,"fairseq"),qm.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 Bm=s(Ae);K=n(Bm,"andreasmaden"),Bm.forEach(t),De=n(Fn,`.
The original code can be found `),qe=a(Fn,"A",{href:!0,rel:!0});var Vm=s(qe);Je=n(Vm,"here"),Vm.forEach(t),Ye=n(Fn,"."),Fn.forEach(t),ne=m(l),xe=a(l,"H2",{class:!0});var Ti=s(xe);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),qd=a(kt,"LI",{});var Ym=s(qd);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),Bd=a(kt,"LI",{});var eh=s(Bd);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);Cf=n(_o,"This is the configuration class to store the configuration of a "),Pi=a(_o,"A",{href:!0});var dh=s(Pi);Jf=n(dh,"RobertaPreLayerNormModel"),dh.forEach(t),xf=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);qf=n(c0,"PretrainedConfig"),c0.forEach(t),Bf=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 "),Ci=a(ru,"A",{href:!0});var g0=s(Ci);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 "),Ji=a(ud,"A",{href:!0});var $0=s(Ji);Eg=n($0,"RobertaPreLayerNormModel"),$0.forEach(t),Lg=n(ud," forward method, overrides the "),ac=a(ud,"CODE",{});var R0=s(ac);Cg=n(R0,"__call__"),R0.forEach(t),Jg=n(ud," special method."),ud.forEach(t),xg=m(Or),M(En.$$.fragment,Or),zg=m(Or),M(Ln.$$.fragment,Or),Or.forEach(t),gt.forEach(t),gh=m(l),Co=a(l,"H2",{class:!0});var lu=s(Co);Cn=a(lu,"A",{id:!0,class:!0,href:!0});var P0=s(Cn);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),Ca=a(yo,"P",{});var iu=s(Ca);Zg=n(iu,"RoBERTa-PreLayerNorm Model with a "),ic=a(iu,"CODE",{});var L0=s(ic);Ag=n(L0,"language modeling"),L0.forEach(t),qg=n(iu," head on top for CLM fine-tuning."),iu.forEach(t),Bg=m(yo),Ja=a(yo,"P",{});var du=s(Ja);Vg=n(du,"This model inherits from "),xi=a(du,"A",{href:!0});var C0=s(xi);Gg=n(C0,"PreTrainedModel"),C0.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),xa=a(yo,"P",{});var cu=s(xa);Qg=n(cu,"This model is also a PyTorch "),za=a(cu,"A",{href:!0,rel:!0});var J0=s(za);Hg=n(J0,"torch.nn.Module"),J0.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),Jo=a(Dr,"P",{});var fd=s(Jo);Kg=n(fd,"The "),zi=a(fd,"A",{href:!0});var x0=s(zi);e_=n(x0,"RobertaPreLayerNormForCausalLM"),x0.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(Jn.$$.fragment,Dr),a_=m(Dr),M(xn.$$.fragment,Dr),Dr.forEach(t),yo.forEach(t),yh=m(l),xo=a(l,"H2",{class:!0});var pu=s(xo);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),qa=a(bo,"P",{});var uu=s(qa);__=n(uu,"This model is also a PyTorch "),Ba=a(uu,"A",{href:!0,rel:!0});var q0=s(Ba);y_=n(q0,"torch.nn.Module"),q0.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 B0=s(Wi);k_=n(B0,"RobertaPreLayerNormForMaskedLM"),B0.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),C_=m(vo),Sa=a(vo,"P",{});var gu=s(Sa);J_=n(gu,"This model inherits from "),Ii=a(gu,"A",{href:!0});var H0=s(Ii);x_=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),q_=m(To),Wo=a(To,"P",{});var _d=s(Wo);B_=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(qn.$$.fragment,To),To.forEach(t),vo.forEach(t),Mh=m(l),Io=a(l,"H2",{class:!0});var yu=s(Io);Bn=a(yu,"A",{id:!0,class:!0,href:!0});var K0=s(Bn);yc=a(K0,"SPAN",{});var e2=s(yc);M(Da.$$.fragment,e2),e2.forEach(t),K0.forEach(t),D_=m(yu),bc=a(yu,"SPAN",{});var t2=s(bc);Y_=n(t2,"RobertaPreLayerNormForMultipleChoice"),t2.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 o2=s(vc);ey=n(o2,`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.`),o2.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 n2=s(Ai);ny=n(n2,"PreTrainedModel"),n2.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 r2=s(ts);ly=n(r2,"torch.nn.Module"),r2.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 "),qi=a(yd,"A",{href:!0});var a2=s(qi);my=n(a2,"RobertaPreLayerNormForMultipleChoice"),a2.forEach(t),hy=n(yd," forward method, overrides the "),Tc=a(yd,"CODE",{});var s2=s(Tc);uy=n(s2,"__call__"),s2.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 l2=s(Xn);Mc=a(l2,"SPAN",{});var i2=s(Mc);M(ns.$$.fragment,i2),i2.forEach(t),l2.forEach(t),yy=m(Tu),kc=a(Tu,"SPAN",{});var d2=s(kc);by=n(d2,"RobertaPreLayerNormForTokenClassification"),d2.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 c2=s(wc);Ty=n(c2,`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.`),c2.forEach(t),My=m(ko),as=a(ko,"P",{});var Mu=s(as);ky=n(Mu,"This model inherits from "),Bi=a(Mu,"A",{href:!0});var p2=s(Bi);wy=n(p2,"PreTrainedModel"),p2.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 m2=s(ls);Ry=n(m2,"torch.nn.Module"),m2.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),qt=a(ko,"DIV",{class:!0});var ea=s(qt);M(is.$$.fragment,ea),Ey=m(ea),qo=a(ea,"P",{});var bd=s(qo);Ly=n(bd,"The "),Vi=a(bd,"A",{href:!0});var h2=s(Vi);Cy=n(h2,"RobertaPreLayerNormForTokenClassification"),h2.forEach(t),Jy=n(bd," forward method, overrides the "),Fc=a(bd,"CODE",{});var u2=s(Fc);xy=n(u2,"__call__"),u2.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),Bo=a(l,"H2",{class:!0});var wu=s(Bo);Hn=a(wu,"A",{id:!0,class:!0,href:!0});var f2=s(Hn);Nc=a(f2,"SPAN",{});var g2=s(Nc);M(ds.$$.fragment,g2),g2.forEach(t),f2.forEach(t),Iy=m(wu),$c=a(wu,"SPAN",{});var _2=s($c);Zy=n(_2,"RobertaPreLayerNormForQuestionAnswering"),_2.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);qy=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 y2=s(Rc);By=n(y2,"span start logits"),y2.forEach(t),Vy=n(vd," and "),Pc=a(vd,"CODE",{});var b2=s(Pc);Gy=n(b2,"span end logits"),b2.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 v2=s(Gi);Hy=n(v2,"PreTrainedModel"),v2.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 T2=s(hs);Ky=n(T2,"torch.nn.Module"),T2.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),Bt=a(wo,"DIV",{class:!0});var ta=s(Bt);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 M2=s(Xi);rb=n(M2,"RobertaPreLayerNormForQuestionAnswering"),M2.forEach(t),ab=n(Td," forward method, overrides the "),jc=a(Td,"CODE",{});var k2=s(jc);sb=n(k2,"__call__"),k2.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 w2=s(Yn);Ec=a(w2,"SPAN",{});var F2=s(Ec);M(fs.$$.fragment,F2),F2.forEach(t),w2.forEach(t),cb=m($u),Lc=a($u,"SPAN",{});var N2=s(Lc);pb=n(N2,"TFRobertaPreLayerNormModel"),N2.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),Cc=a(eo,"P",{});var $2=s(Cc);hb=n($2,"The bare RoBERTa-PreLayerNorm Model transformer outputting raw hidden-states without any specific head on top."),$2.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 R2=s(Si);gb=n(R2,"TFPreTrainedModel"),R2.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 P2=s(bs);vb=n(P2,"tf.keras.Model"),P2.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 j2=s(Qi);Nb=n(j2,"TFRobertaPreLayerNormModel"),j2.forEach(t),$b=n(Md," forward method, overrides the "),Jc=a(Md,"CODE",{});var E2=s(Jc);Rb=n(E2,"__call__"),E2.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 L2=s(or);xc=a(L2,"SPAN",{});var C2=s(xc);M(Ts.$$.fragment,C2),C2.forEach(t),L2.forEach(t),Lb=m(ju),zc=a(ju,"SPAN",{});var J2=s(zc);Cb=n(J2,"TFRobertaPreLayerNormForCausalLM"),J2.forEach(t),ju.forEach(t),Eh=m(l),Ho=a(l,"DIV",{class:!0});var Eu=s(Ho);M(Ms.$$.fragment,Eu),Jb=m(Eu),Gt=a(Eu,"DIV",{class:!0});var na=s(Gt);M(ks.$$.fragment,na),xb=m(na),Oo=a(na,"P",{});var kd=s(Oo);zb=n(kd,"The "),Hi=a(kd,"A",{href:!0});var x2=s(Hi);Ub=n(x2,"TFRobertaPreLayerNormForCausalLM"),x2.forEach(t),Wb=n(kd," forward method, overrides the "),Uc=a(kd,"CODE",{});var z2=s(Uc);Ib=n(z2,"__call__"),z2.forEach(t),Zb=n(kd," special method."),kd.forEach(t),Ab=m(na),M(nr.$$.fragment,na),qb=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 U2=s(ar);Wc=a(U2,"SPAN",{});var W2=s(Wc);M(ws.$$.fragment,W2),W2.forEach(t),U2.forEach(t),Bb=m(Lu),Ic=a(Lu,"SPAN",{});var I2=s(Ic);Vb=n(I2,"TFRobertaPreLayerNormForMaskedLM"),I2.forEach(t),Lu.forEach(t),Ch=m(l),dt=a(l,"DIV",{class:!0});var to=s(dt);M(Fs.$$.fragment,to),Gb=m(to),Ns=a(to,"P",{});var Cu=s(Ns);Xb=n(Cu,"RoBERTa-PreLayerNorm Model with a "),Zc=a(Cu,"CODE",{});var Z2=s(Zc);Sb=n(Z2,"language modeling"),Z2.forEach(t),Qb=n(Cu," head on top."),Cu.forEach(t),Hb=m(to),$s=a(to,"P",{});var Ju=s($s);Ob=n(Ju,"This model inherits from "),Oi=a(Ju,"A",{href:!0});var A2=s(Oi);Db=n(A2,"TFPreTrainedModel"),A2.forEach(t),Yb=n(Ju,`. 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.)`),Ju.forEach(t),Kb=m(to),Rs=a(to,"P",{});var xu=s(Rs);ev=n(xu,"This model is also a "),Ps=a(xu,"A",{href:!0,rel:!0});var q2=s(Ps);tv=n(q2,"tf.keras.Model"),q2.forEach(t),ov=n(xu,` 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.`),xu.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 B2=s(Di);lv=n(B2,"TFRobertaPreLayerNormForMaskedLM"),B2.forEach(t),iv=n(wd," forward method, overrides the "),Ac=a(wd,"CODE",{});var V2=s(Ac);dv=n(V2,"__call__"),V2.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),Jh=m(l),Ko=a(l,"H2",{class:!0});var zu=s(Ko);cr=a(zu,"A",{id:!0,class:!0,href:!0});var G2=s(cr);qc=a(G2,"SPAN",{});var X2=s(qc);M(Es.$$.fragment,X2),X2.forEach(t),G2.forEach(t),uv=m(zu),Bc=a(zu,"SPAN",{});var S2=s(Bc);fv=n(S2,"TFRobertaPreLayerNormForSequenceClassification"),S2.forEach(t),zu.forEach(t),xh=m(l),ct=a(l,"DIV",{class:!0});var oo=s(ct);M(Ls.$$.fragment,oo),gv=m(oo),Vc=a(oo,"P",{});var Q2=s(Vc);_v=n(Q2,`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.`),Q2.forEach(t),yv=m(oo),Cs=a(oo,"P",{});var Uu=s(Cs);bv=n(Uu,"This model inherits from "),Yi=a(Uu,"A",{href:!0});var H2=s(Yi);vv=n(H2,"TFPreTrainedModel"),H2.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),Js=a(oo,"P",{});var Wu=s(Js);kv=n(Wu,"This model is also a "),xs=a(Wu,"A",{href:!0,rel:!0});var O2=s(xs);wv=n(O2,"tf.keras.Model"),O2.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 D2=s(Ki);jv=n(D2,"TFRobertaPreLayerNormForSequenceClassification"),D2.forEach(t),Ev=n(Fd," forward method, overrides the "),Gc=a(Fd,"CODE",{});var Y2=s(Gc);Lv=n(Y2,"__call__"),Y2.forEach(t),Cv=n(Fd," special method."),Fd.forEach(t),Jv=m(No),M(mr.$$.fragment,No),xv=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 K2=s(fr);Xc=a(K2,"SPAN",{});var eF=s(Xc);M(Us.$$.fragment,eF),eF.forEach(t),K2.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);qv=n(Zu,"This model inherits from "),ed=a(Zu,"A",{href:!0});var nF=s(ed);Bv=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(qs.$$.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 qu=s(nn);br=a(qu,"A",{id:!0,class:!0,href:!0});var lF=s(br);Oc=a(lF,"SPAN",{});var iF=s(Oc);M(Bs.$$.fragment,iF),iF.forEach(t),lF.forEach(t),aT=m(qu),Dc=a(qu,"SPAN",{});var dF=s(Dc);sT=n(dF,"TFRobertaPreLayerNormForTokenClassification"),dF.forEach(t),qu.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 Bu=s(Gs);cT=n(Bu,"This model inherits from "),od=a(Bu,"A",{href:!0});var pF=s(od);pT=n(pF,"TFPreTrainedModel"),pF.forEach(t),mT=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),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),CT=n(Rd," and "),np=a(Rd,"CODE",{});var bF=s(np);JT=n(bF,"span end logits"),bF.forEach(t),xT=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);qT=n(TF,"tf.keras.Model"),TF.forEach(t),BT=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),qh=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),Bh=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 CF=s(cp);ll=a(CF,"A",{href:!0,rel:!0});var JF=s(ll);yM=n(JF,"Automatic Differentiation"),JF.forEach(t),CF.forEach(t),bM=m(aa),pp=a(aa,"LI",{});var xF=s(pp);il=a(xF,"A",{href:!0,rel:!0});var zF=s(il);vM=n(zF,"Vectorization"),zF.forEach(t),xF.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 qF=s(fp);M(pl.$$.fragment,qF),qF.forEach(t),AF.forEach(t),LM=m(Du),gp=a(Du,"SPAN",{});var BF=s(gp);CM=n(BF,"FlaxRobertaPreLayerNormForCausalLM"),BF.forEach(t),Du.forEach(t),Gh=m(l),tt=a(l,"DIV",{class:!0});var Et=s(tt);M(ml.$$.fragment,Et),JM=m(Et),_p=a(Et,"P",{});var VF=s(_p);xM=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);qM=n(XF,"flax.linen.Module"),XF.forEach(t),BM=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(Cr.$$.fragment,ia),ik=m(ia),M(Jr.$$.fragment,ia),ia.forEach(t),Et.forEach(t),Xh=m(l),hn=a(l,"H2",{class:!0});var ef=s(hn);xr=a(ef,"A",{id:!0,class:!0,href:!0});var rN=s(xr);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),Ck=m(Lt),Ht=a(Lt,"DIV",{class:!0});var ca=s(Ht);M(El.$$.fragment,ca),Jk=m(ca),un=a(ca,"P",{});var Ld=s(un);xk=n(Ld,"The "),Cp=a(Ld,"CODE",{});var bN=s(Cp);zk=n(bN,"FlaxRobertaPreLayerNormPreTrainedModel"),bN.forEach(t),Uk=n(Ld," forward method, overrides the "),Jp=a(Ld,"CODE",{});var vN=s(Jp);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);xp=a(TN,"SPAN",{});var MN=s(xp);M(Ll.$$.fragment,MN),MN.forEach(t),TN.forEach(t),qk=m(rf),zp=a(rf,"SPAN",{});var kN=s(zp);Bk=n(kN,"FlaxRobertaPreLayerNormForSequenceClassification"),kN.forEach(t),rf.forEach(t),Hh=m(l),nt=a(l,"DIV",{class:!0});var Ct=s(nt);M(Cl.$$.fragment,Ct),Vk=m(Ct),Up=a(Ct,"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(Ct),Jl=a(Ct,"P",{});var af=s(Jl);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(Ct),xl=a(Ct,"P",{});var sf=s(xl);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(Ct),Wp=a(Ct,"P",{});var $N=s(Wp);tw=n($N,"Finally, this model supports inherent JAX features such as:"),$N.forEach(t),ow=m(Ct),po=a(Ct,"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 CN=s(Il);lw=n(CN,"Vectorization"),CN.forEach(t),LN.forEach(t),iw=m(pa),qp=a(pa,"LI",{});var JN=s(qp);Zl=a(JN,"A",{href:!0,rel:!0});var xN=s(Zl);dw=n(xN,"Parallelization"),xN.forEach(t),JN.forEach(t),pa.forEach(t),cw=m(Ct),Ot=a(Ct,"DIV",{class:!0});var ma=s(Ot);M(Al.$$.fragment,ma),pw=m(ma),gn=a(ma,"P",{});var Cd=s(gn);mw=n(Cd,"The "),Bp=a(Cd,"CODE",{});var zN=s(Bp);hw=n(zN,"FlaxRobertaPreLayerNormPreTrainedModel"),zN.forEach(t),uw=n(Cd," forward method, overrides the "),Vp=a(Cd,"CODE",{});var UN=s(Vp);fw=n(UN,"__call__"),UN.forEach(t),gw=n(Cd," special method."),Cd.forEach(t),_w=m(ma),M(Ir.$$.fragment,ma),yw=m(ma),M(Zr.$$.fragment,ma),ma.forEach(t),Ct.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(ql.$$.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 Jt=s(rt);M(Bl.$$.fragment,Jt),Tw=m(Jt),Sp=a(Jt,"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(Jt),Vl=a(Jt,"P",{});var df=s(Vl);ww=n(df,"This model inherits from "),cd=a(df,"A",{href:!0});var qN=s(cd);Fw=n(qN,"FlaxPreTrainedModel"),qN.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(Jt),Gl=a(Jt,"P",{});var cf=s(Gl);Rw=n(cf,"This model is also a Flax Linen "),Xl=a(cf,"A",{href:!0,rel:!0});var BN=s(Xl);Pw=n(BN,"flax.linen.Module"),BN.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(Jt),Qp=a(Jt,"P",{});var VN=s(Qp);Lw=n(VN,"Finally, this model supports inherent JAX features such as:"),VN.forEach(t),Cw=m(Jt),mo=a(Jt,"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);Jw=n(XN,"Just-In-Time (JIT) compilation"),XN.forEach(t),GN.forEach(t),xw=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(Jt),Dt=a(Jt,"DIV",{class:!0});var ua=s(Dt);M(Dl.$$.fragment,ua),qw=m(ua),yn=a(ua,"P",{});var Jd=s(yn);Bw=n(Jd,"The "),Kp=a(Jd,"CODE",{});var KN=s(Kp);Vw=n(KN,"FlaxRobertaPreLayerNormPreTrainedModel"),KN.forEach(t),Gw=n(Jd," forward method, overrides the "),em=a(Jd,"CODE",{});var e$=s(em);Xw=n(e$,"__call__"),e$.forEach(t),Sw=n(Jd," special method."),Jd.forEach(t),Qw=m(ua),M(qr.$$.fragment,ua),Hw=m(ua),M(Br.$$.fragment,ua),ua.forEach(t),Jt.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 xt=s(at);M(Kl.$$.fragment,xt),Yw=m(xt),nm=a(xt,"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),e1=m(xt),ei=a(xt,"P",{});var mf=s(ei);t1=n(mf,"This model inherits from "),pd=a(mf,"A",{href:!0});var a$=s(pd);o1=n(a$,"FlaxPreTrainedModel"),a$.forEach(t),n1=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),r1=m(xt),ti=a(xt,"P",{});var hf=s(ti);a1=n(hf,"This model is also a Flax Linen "),oi=a(hf,"A",{href:!0,rel:!0});var s$=s(oi);s1=n(s$,"flax.linen.Module"),s$.forEach(t),l1=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),i1=m(xt),rm=a(xt,"P",{});var l$=s(rm);d1=n(l$,"Finally, this model supports inherent JAX features such as:"),l$.forEach(t),c1=m(xt),ho=a(xt,"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);p1=n(d$,"Just-In-Time (JIT) compilation"),d$.forEach(t),i$.forEach(t),m1=m(fa),sm=a(fa,"LI",{});var c$=s(sm);ri=a(c$,"A",{href:!0,rel:!0});var p$=s(ri);h1=n(p$,"Automatic Differentiation"),p$.forEach(t),c$.forEach(t),u1=m(fa),lm=a(fa,"LI",{});var m$=s(lm);ai=a(m$,"A",{href:!0,rel:!0});var h$=s(ai);f1=n(h$,"Vectorization"),h$.forEach(t),m$.forEach(t),g1=m(fa),im=a(fa,"LI",{});var u$=s(im);si=a(u$,"A",{href:!0,rel:!0});var f$=s(si);_1=n(f$,"Parallelization"),f$.forEach(t),u$.forEach(t),fa.forEach(t),y1=m(xt),Yt=a(xt,"DIV",{class:!0});var ga=s(Yt);M(li.$$.fragment,ga),b1=m(ga),vn=a(ga,"P",{});var xd=s(vn);v1=n(xd,"The "),dm=a(xd,"CODE",{});var g$=s(dm);T1=n(g$,"FlaxRobertaPreLayerNormPreTrainedModel"),g$.forEach(t),M1=n(xd," forward method, overrides the "),cm=a(xd,"CODE",{});var _$=s(cm);k1=n(_$,"__call__"),_$.forEach(t),w1=n(xd," special method."),xd.forEach(t),F1=m(ga),M(Gr.$$.fragment,ga),N1=m(ga),M(Xr.$$.fragment,ga),ga.forEach(t),xt.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),$1=m(uf),mm=a(uf,"SPAN",{});var v$=s(mm);R1=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),P1=m(zt),Mn=a(zt,"P",{});var zd=s(Mn);j1=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);E1=n(T$,"span start logits"),T$.forEach(t),L1=n(zd," and "),um=a(zd,"CODE",{});var M$=s(um);C1=n(M$,"span end logits"),M$.forEach(t),J1=n(zd,")."),zd.forEach(t),x1=m(zt),ci=a(zt,"P",{});var ff=s(ci);z1=n(ff,"This model inherits from "),md=a(ff,"A",{href:!0});var k$=s(md);U1=n(k$,"FlaxPreTrainedModel"),k$.forEach(t),W1=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),I1=m(zt),pi=a(zt,"P",{});var gf=s(pi);Z1=n(gf,"This model is also a Flax Linen "),mi=a(gf,"A",{href:!0,rel:!0});var w$=s(mi);A1=n(w$,"flax.linen.Module"),w$.forEach(t),q1=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),B1=m(zt),fm=a(zt,"P",{});var F$=s(fm);V1=n(F$,"Finally, this model supports inherent JAX features such as:"),F$.forEach(t),G1=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);X1=n($$,"Just-In-Time (JIT) compilation"),$$.forEach(t),N$.forEach(t),S1=m(_a),_m=a(_a,"LI",{});var R$=s(_m);ui=a(R$,"A",{href:!0,rel:!0});var P$=s(ui);Q1=n(P$,"Automatic Differentiation"),P$.forEach(t),R$.forEach(t),H1=m(_a),ym=a(_a,"LI",{});var j$=s(ym);fi=a(j$,"A",{href:!0,rel:!0});var E$=s(fi);O1=n(E$,"Vectorization"),E$.forEach(t),j$.forEach(t),D1=m(_a),bm=a(_a,"LI",{});var L$=s(bm);gi=a(L$,"A",{href:!0,rel:!0});var C$=s(gi);Y1=n(C$,"Parallelization"),C$.forEach(t),L$.forEach(t),_a.forEach(t),K1=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 J$=s(vm);o0=n(J$,"FlaxRobertaPreLayerNormPreTrainedModel"),J$.forEach(t),n0=n(Ud," forward method, overrides the "),Tm=a(Ud,"CODE",{});var x$=s(Tm);r0=n(x$,"__call__"),x$.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(qR)),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(qe,"href","https://github.com/princeton-nlp/DinkyTrain"),u(qe,"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(xe,"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.31.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormModel"),u(ji,"href","/docs/transformers/v4.31.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.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),u(Li,"href","/docs/transformers/v4.31.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(Ci,"href","/docs/transformers/v4.31.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(Ji,"href","/docs/transformers/v4.31.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(Cn,"id","transformers.RobertaPreLayerNormForCausalLM"),u(Cn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Cn,"href","#transformers.RobertaPreLayerNormForCausalLM"),u(Co,"class","relative group"),u(xi,"href","/docs/transformers/v4.31.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.31.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(xo,"class","relative group"),u(Ui,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),u(Ba,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Ba,"rel","nofollow"),u(Wi,"href","/docs/transformers/v4.31.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.31.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.31.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(Bn,"id","transformers.RobertaPreLayerNormForMultipleChoice"),u(Bn,"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(Bn,"href","#transformers.RobertaPreLayerNormForMultipleChoice"),u(Io,"class","relative group"),u(Ai,"href","/docs/transformers/v4.31.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(qi,"href","/docs/transformers/v4.31.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(Bi,"href","/docs/transformers/v4.31.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.31.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormForTokenClassification"),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(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(Bo,"class","relative group"),u(Gi,"href","/docs/transformers/v4.31.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.31.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormForQuestionAnswering"),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(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.31.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.31.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.31.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.31.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.31.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.31.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(xs,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(xs,"rel","nofollow"),u(Ki,"href","/docs/transformers/v4.31.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.31.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.31.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.31.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.31.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.31.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.31.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.31.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.31.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(xr,"id","transformers.FlaxRobertaPreLayerNormForMaskedLM"),u(xr,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(xr,"href","#transformers.FlaxRobertaPreLayerNormForMaskedLM"),u(hn,"class","relative group"),u(id,"href","/docs/transformers/v4.31.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.31.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.31.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.31.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.31.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,J,b),g(l,ie,b),e(ie,G),e(G,Fe),g(l,ge,b),g(l,B,b),e(B,Ne),g(l,_e,b),g(l,C,b),e(C,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,x),e(X,je),e(X,z),e(z,Ee),e(X,Le),e(X,v),e(v,j),e(X,Ve),e(C,re),e(C,Ce),e(Ce,Ge),e(Ce,E),e(E,Xe),e(Ce,Se),e(Ce,Ze),e(Ze,Qe),e(Ce,He),g(l,W,b),g(l,I,b),e(I,Oe),e(I,Ae),e(Ae,K),e(I,De),e(I,qe),e(qe,Je),e(I,Ye),g(l,ne,b),g(l,xe,b),e(xe,Nn),e(Nn,Wd),k(ba,Wd,null),e(xe,_f),e(xe,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,qd),e(qd,Fi),e(Fi,kf),e(ft,wf),e(ft,Bd),e(Bd,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,Cf),e(so,Pi),e(Pi,Jf),e(so,xf),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,qf),e(jo,Bf),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,Ci),e(Ci,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,Ji),e(Ji,Eg),e(Lo,Lg),e(Lo,ac),e(ac,Cg),e(Lo,Jg),e(Wt,xg),k(En,Wt,null),e(Wt,zg),k(Ln,Wt,null),g(l,gh,b),g(l,Co,b),e(Co,Cn),e(Cn,sc),k(Ea,sc,null),e(Co,Ug),e(Co,lc),e(lc,Wg),g(l,_h,b),g(l,_t,b),k(La,_t,null),e(_t,Ig),e(_t,Ca),e(Ca,Zg),e(Ca,ic),e(ic,Ag),e(Ca,qg),e(_t,Bg),e(_t,Ja),e(Ja,Vg),e(Ja,xi),e(xi,Gg),e(Ja,Xg),e(_t,Sg),e(_t,xa),e(xa,Qg),e(xa,za),e(za,Hg),e(xa,Og),e(_t,Dg),e(_t,It),k(Ua,It,null),e(It,Yg),e(It,Jo),e(Jo,Kg),e(Jo,zi),e(zi,e_),e(Jo,t_),e(Jo,dc),e(dc,o_),e(Jo,n_),e(It,r_),k(Jn,It,null),e(It,a_),k(xn,It,null),g(l,yh,b),g(l,xo,b),e(xo,zn),e(zn,cc),k(Wa,cc,null),e(xo,s_),e(xo,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,qa),e(qa,__),e(qa,Ba),e(Ba,y_),e(qa,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,C_),e(bt,Sa),e(Sa,J_),e(Sa,Ii),e(Ii,x_),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,q_),e(wt,Wo),e(Wo,B_),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(qn,wt,null),g(l,Mh,b),g(l,Io,b),e(Io,Bn),e(Bn,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,qi),e(qi,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,Bi),e(Bi,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,qt),k(is,qt,null),e(qt,Ey),e(qt,qo),e(qo,Ly),e(qo,Vi),e(Vi,Cy),e(qo,Jy),e(qo,Fc),e(Fc,xy),e(qo,zy),e(qt,Uy),k(Sn,qt,null),e(qt,Wy),k(Qn,qt,null),g(l,Nh,b),g(l,Bo,b),e(Bo,Hn),e(Hn,Nc),k(ds,Nc,null),e(Bo,Iy),e(Bo,$c),e($c,Zy),g(l,$h,b),g(l,Mt,b),k(cs,Mt,null),e(Mt,Ay),e(Mt,Vo),e(Vo,qy),e(Vo,Rc),e(Rc,By),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,Bt),k(us,Bt,null),e(Bt,ob),e(Bt,Go),e(Go,nb),e(Go,Xi),e(Xi,rb),e(Go,ab),e(Go,jc),e(jc,sb),e(Go,lb),e(Bt,ib),k(On,Bt,null),e(Bt,db),k(Dn,Bt,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,Cc),e(Cc,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,Jc),e(Jc,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,xc),k(Ts,xc,null),e(Qo,Lb),e(Qo,zc),e(zc,Cb),g(l,Eh,b),g(l,Ho,b),k(Ms,Ho,null),e(Ho,Jb),e(Ho,Gt),k(ks,Gt,null),e(Gt,xb),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,qb),k(rr,Gt,null),g(l,Lh,b),g(l,Do,b),e(Do,ar),e(ar,Wc),k(ws,Wc,null),e(Do,Bb),e(Do,Ic),e(Ic,Vb),g(l,Ch,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,Jh,b),g(l,Ko,b),e(Ko,cr),e(cr,qc),k(Es,qc,null),e(Ko,uv),e(Ko,Bc),e(Bc,fv),g(l,xh,b),g(l,ct,b),k(Ls,ct,null),e(ct,gv),e(ct,Vc),e(Vc,_v),e(ct,yv),e(ct,Cs),e(Cs,bv),e(Cs,Yi),e(Yi,vv),e(Cs,Tv),e(ct,Mv),e(ct,Js),e(Js,kv),e(Js,xs),e(xs,wv),e(Js,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,Cv),e(Nt,Jv),k(mr,Nt,null),e(Nt,xv),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,qv),e(Is,ed),e(ed,Bv),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(qs,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(Bs,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,CT),e(sn,np),e(np,JT),e(sn,xT),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,qT),e(Ys,BT),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,qh,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,Bh,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,CM),g(l,Gh,b),g(l,tt,b),k(ml,tt,null),e(tt,JM),e(tt,_p),e(_p,xM),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,qM),e(ul,BM),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(Cr,Qt,null),e(Qt,ik),k(Jr,Qt,null),g(l,Xh,b),g(l,hn,b),e(hn,xr),e(xr,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,Ck),e(ot,Ht),k(El,Ht,null),e(Ht,Jk),e(Ht,un),e(un,xk),e(un,Cp),e(Cp,zk),e(un,Uk),e(un,Jp),e(Jp,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,xp),k(Ll,xp,null),e(fn,qk),e(fn,zp),e(zp,Bk),g(l,Hh,b),g(l,nt,b),k(Cl,nt,null),e(nt,Vk),e(nt,Up),e(Up,Gk),e(nt,Xk),e(nt,Jl),e(Jl,Sk),e(Jl,dd),e(dd,Qk),e(Jl,Hk),e(nt,Ok),e(nt,xl),e(xl,Dk),e(xl,zl),e(zl,Yk),e(xl,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,qp),e(qp,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,Bp),e(Bp,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(ql,Gp,null),e(_n,bw),e(_n,Xp),e(Xp,vw),g(l,Dh,b),g(l,rt,b),k(Bl,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,Cw),e(rt,mo),e(mo,Hp),e(Hp,Sl),e(Sl,Jw),e(mo,xw),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,qw),e(Dt,yn),e(yn,Bw),e(yn,Kp),e(Kp,Vw),e(yn,Gw),e(yn,em),e(em,Xw),e(yn,Sw),e(Dt,Qw),k(qr,Dt,null),e(Dt,Hw),k(Br,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,e1),e(at,ei),e(ei,t1),e(ei,pd),e(pd,o1),e(ei,n1),e(at,r1),e(at,ti),e(ti,a1),e(ti,oi),e(oi,s1),e(ti,l1),e(at,i1),e(at,rm),e(rm,d1),e(at,c1),e(at,ho),e(ho,am),e(am,ni),e(ni,p1),e(ho,m1),e(ho,sm),e(sm,ri),e(ri,h1),e(ho,u1),e(ho,lm),e(lm,ai),e(ai,f1),e(ho,g1),e(ho,im),e(im,si),e(si,_1),e(at,y1),e(at,Yt),k(li,Yt,null),e(Yt,b1),e(Yt,vn),e(vn,v1),e(vn,dm),e(dm,T1),e(vn,M1),e(vn,cm),e(cm,k1),e(vn,w1),e(Yt,F1),k(Gr,Yt,null),e(Yt,N1),k(Xr,Yt,null),g(l,eu,b),g(l,Tn,b),e(Tn,Sr),e(Sr,pm),k(ii,pm,null),e(Tn,$1),e(Tn,mm),e(mm,R1),g(l,tu,b),g(l,st,b),k(di,st,null),e(st,P1),e(st,Mn),e(Mn,j1),e(Mn,hm),e(hm,E1),e(Mn,L1),e(Mn,um),e(um,C1),e(Mn,J1),e(st,x1),e(st,ci),e(ci,z1),e(ci,md),e(md,U1),e(ci,W1),e(st,I1),e(st,pi),e(pi,Z1),e(pi,mi),e(mi,A1),e(pi,q1),e(st,B1),e(st,fm),e(fm,V1),e(st,G1),e(st,uo),e(uo,gm),e(gm,hi),e(hi,X1),e(uo,S1),e(uo,_m),e(_m,ui),e(ui,Q1),e(uo,H1),e(uo,ym),e(ym,fi),e(fi,O1),e(uo,D1),e(uo,bm),e(bm,gi),e(gi,Y1),e(st,K1),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}),Jn.$set(wm);const bi={};b&2&&(bi.$$scope={dirty:b,ctx:l}),xn.$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}),qn.$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 Cm={};b&2&&(Cm.$$scope={dirty:b,ctx:l}),On.$set(Cm);const Jm={};b&2&&(Jm.$$scope={dirty:b,ctx:l}),Dn.$set(Jm);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 xm={};b&2&&(xm.$$scope={dirty:b,ctx:l}),tr.$set(xm);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 qm={};b&2&&(qm.$$scope={dirty:b,ctx:l}),mr.$set(qm);const Fn={};b&2&&(Fn.$$scope={dirty:b,ctx:l}),hr.$set(Fn);const Bm={};b&2&&(Bm.$$scope={dirty:b,ctx:l}),ur.$set(Bm);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}),Cr.$set(th);const oh={};b&2&&(oh.$$scope={dirty:b,ctx:l}),Jr.$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}),qr.$set(sh);const lh={};b&2&&(lh.$$scope={dirty:b,ctx:l}),Br.$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(Jn.$$.fragment,l),w(xn.$$.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(qn.$$.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(qs.$$.fragment,l),w(_r.$$.fragment,l),w(yr.$$.fragment,l),w(Bs.$$.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(Cr.$$.fragment,l),w(Jr.$$.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(Cl.$$.fragment,l),w(Al.$$.fragment,l),w(Ir.$$.fragment,l),w(Zr.$$.fragment,l),w(ql.$$.fragment,l),w(Bl.$$.fragment,l),w(Dl.$$.fragment,l),w(qr.$$.fragment,l),w(Br.$$.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(Jn.$$.fragment,l),F(xn.$$.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(qn.$$.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(qs.$$.fragment,l),F(_r.$$.fragment,l),F(yr.$$.fragment,l),F(Bs.$$.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(Cr.$$.fragment,l),F(Jr.$$.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(Cl.$$.fragment,l),F(Al.$$.fragment,l),F(Ir.$$.fragment,l),F(Zr.$$.fragment,l),F(ql.$$.fragment,l),F(Bl.$$.fragment,l),F(Dl.$$.fragment,l),F(qr.$$.fragment,l),F(Br.$$.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(J),l&&t(ie),l&&t(ge),l&&t(B),l&&t(_e),l&&t(C),l&&t(W),l&&t(I),l&&t(ne),l&&t(xe),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(Co),N(Ea),l&&t(_h),l&&t(_t),N(La),N(Ua),N(Jn),N(xn),l&&t(yh),l&&t(xo),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(qn),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(Bo),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(Ch),l&&t(dt),N(Fs),N(sr),N(js),N(lr),N(ir),N(dr),l&&t(Jh),l&&t(Ko),N(Es),l&&t(xh),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(qs),N(_r),N(yr),l&&t(Wh),l&&t(nn),N(Bs),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(qh),l&&t(dn),N(tl),l&&t(Bh),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(Cr),N(Jr),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(Cl),N(Al),N(Ir),N(Zr),l&&t(Oh),l&&t(_n),N(ql),l&&t(Dh),l&&t(rt),N(Bl),N(Dl),N(qr),N(Br),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 qR={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 BR($){return Z$(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class OR extends z${constructor(d){super();U$(this,d,BR,AR,W$,{})}}export{OR as default,qR as metadata};
