import{s as Un,o as Wn,n as P}from"../chunks/scheduler.25b97de1.js";import{S as Zn,i as In,g as d,s as r,r as y,A as qn,h as c,f as l,c as i,j as U,u as b,x as u,k as W,y as a,a as p,v as T,d as M,t as k,w}from"../chunks/index.d9030fc9.js";import{T as be}from"../chunks/Tip.baa67368.js";import{D as Z}from"../chunks/Docstring.e257edda.js";import{C as Me}from"../chunks/CodeBlock.e6cd0d95.js";import{F as Bn,M as Pn}from"../chunks/Markdown.7217f838.js";import{E as Te}from"../chunks/ExampleCodeBlock.20db4b6e.js";import{H as Le,E as Hn}from"../chunks/EditOnGithub.91d95064.js";function Vn($){let e,m="Examples:",t,s,g;return s=new Me({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`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-kvfsh7"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function Gn($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function Xn($){let e,m="Example:",t,s,g;return s=new Me({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`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function An($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function Qn($){let e,m="Example:",t,s,g;return s=new Me({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`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function En($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function Sn($){let e,m="Example:",t,s,g;return s=new Me({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>`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function Yn($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function On($){let e,m="Example of single-label classification:",t,s,g;return s=new Me({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`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-ykxpe4"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function Dn($){let e,m="Example of multi-label classification:",t,s,g;return s=new Me({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`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-1l8e32d"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function Kn($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function es($){let e,m="Example:",t,s,g;return s=new Me({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`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function ts($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function os($){let e,m="Example:",t,s,g;return s=new Me({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`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function ns($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function ss($){let e,m="Example:",t,s,g;return s=new Me({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`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function as($){let e,m,t,s,g,o,_="The bare RoBERTa-PreLayerNorm Model transformer outputting raw hidden-states without any specific head on top.",H,C,R=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,V,J,j=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,G,f,N=`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 <em>Attention is
all you need</em>_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`,Re,ce,Vo=`To behave as an decoder the model needs to be initialized with the <code>is_decoder</code> argument of the configuration set
to <code>True</code>. To be used in a Seq2Seq model, the model needs to initialized with both <code>is_decoder</code> argument and
<code>add_cross_attention</code> set to <code>True</code>; an <code>encoder_hidden_states</code> is then expected as an input to the forward pass.`,mt,ae,ut='.. _<em>Attention is all you need</em>: <a href="https://arxiv.org/abs/1706.03762" rel="nofollow">https://arxiv.org/abs/1706.03762</a>',Pe,ke,ze,rt,me,ht='The <a href="/docs/transformers/pr_31198/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormModel">RobertaPreLayerNormModel</a> forward method, overrides the <code>__call__</code> special method.',je,we,Be,te,z,ge,ft,S,Zt,it,Ue,It="RoBERTa-PreLayerNorm Model with a <code>language modeling</code> head on top for CLM fine-tuning.",Dt,re,lo=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,X,ve,qt=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,gt,ue,_t,F,L,$e='The <a href="/docs/transformers/pr_31198/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormForCausalLM">RobertaPreLayerNormForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',Bt,$t,dn,Ke,Ht,Fe,et,We,Ae,So,ie,yt="RoBERTa-PreLayerNorm Model with a <code>language modeling</code> head on top.",Yo,Qe,_n=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Kt,Ft,zo=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Go,q,Nt,Oo,lt,kn='The <a href="/docs/transformers/pr_31198/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormForMaskedLM">RobertaPreLayerNormForMaskedLM</a> forward method, overrides the <code>__call__</code> special method.',Do,Ee,yn,eo,Ze,xt,Xo,oe,bo,Se,He,cn=`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.`,bt,To,Mo=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Vt,le,Tt=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Ko,de,co,po,Lt,Ve='The <a href="/docs/transformers/pr_31198/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormForSequenceClassification">RobertaPreLayerNormForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',mo,Mt,Uo,uo,ko,Rt,en,jt,wo,Ye,Ie,dt,vo,Oe=`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.`,$o,Fo,Ct=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,pn,kt,to=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,ho,Ne,Y,wt,fo,_e='The <a href="/docs/transformers/pr_31198/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormForMultipleChoice">RobertaPreLayerNormForMultipleChoice</a> forward method, overrides the <code>__call__</code> special method.',No,oo,Gt,xo,Ao,tt,mn,Ge,ot,bn,Lo,Jt=`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.`,un,Ce,Xe=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,go,Xt,Qo=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,hn,Je,ct,no,vt,so='The <a href="/docs/transformers/pr_31198/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormForTokenClassification">RobertaPreLayerNormForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',ao,nt,he,A,ro,Pt,Ro,De,zt,Wo,Zo,Io=`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 <code>span start logits</code> and <code>span end logits</code>).`,qo,Bo,Ho=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,_o,jo,qe=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Co,pt,ye,Jo,Po,Ut='The <a href="/docs/transformers/pr_31198/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormForQuestionAnswering">RobertaPreLayerNormForQuestionAnswering</a> forward method, overrides the <code>__call__</code> special method.',fn,st,io,at,Wt;return e=new Le({props:{title:"RobertaPreLayerNormModel",local:"transformers.RobertaPreLayerNormModel",headingTag:"h2"}}),s=new Z({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/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L669"}}),ze=new Z({props:{name:"forward",anchor:"transformers.RobertaPreLayerNormModel.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"encoder_hidden_states",val:": Optional = None"},{name:"encoder_attention_mask",val:": Optional = None"},{name:"past_key_values",val:": Optional = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaPreLayerNormModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaPreLayerNormModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaPreLayerNormModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaPreLayerNormModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaPreLayerNormModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L716",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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>) — 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>) — 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>) — 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>) — 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>) — 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’s 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),we=new be({props:{$$slots:{default:[Gn]},$$scope:{ctx:$}}}),te=new Te({props:{anchor:"transformers.RobertaPreLayerNormModel.forward.example",$$slots:{default:[Xn]},$$scope:{ctx:$}}}),ge=new Le({props:{title:"RobertaPreLayerNormForCausalLM",local:"transformers.RobertaPreLayerNormForCausalLM",headingTag:"h2"}}),Zt=new Z({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/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L854"}}),_t=new Z({props:{name:"forward",anchor:"transformers.RobertaPreLayerNormForCausalLM.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"encoder_hidden_states",val:": Optional = None"},{name:"encoder_attention_mask",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"past_key_values",val:": Tuple = None"},{name:"use_cache",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L882",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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) — 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>) — 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>) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$t=new be({props:{$$slots:{default:[An]},$$scope:{ctx:$}}}),Ke=new Te({props:{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.example",$$slots:{default:[Qn]},$$scope:{ctx:$}}}),Fe=new Le({props:{title:"RobertaPreLayerNormForMaskedLM",local:"transformers.RobertaPreLayerNormForMaskedLM",headingTag:"h2"}}),Ae=new Z({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/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1020"}}),Nt=new Z({props:{name:"forward",anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"encoder_hidden_states",val:": Optional = None"},{name:"encoder_attention_mask",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1048",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ee=new be({props:{$$slots:{default:[En]},$$scope:{ctx:$}}}),eo=new Te({props:{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.example",$$slots:{default:[Sn]},$$scope:{ctx:$}}}),xt=new Le({props:{title:"RobertaPreLayerNormForSequenceClassification",local:"transformers.RobertaPreLayerNormForSequenceClassification",headingTag:"h2"}}),bo=new Z({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/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1150"}}),co=new Z({props:{name:"forward",anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1169",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Mt=new be({props:{$$slots:{default:[Yn]},$$scope:{ctx:$}}}),uo=new Te({props:{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.example",$$slots:{default:[On]},$$scope:{ctx:$}}}),Rt=new Te({props:{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.example-2",$$slots:{default:[Dn]},$$scope:{ctx:$}}}),jt=new Le({props:{title:"RobertaPreLayerNormForMultipleChoice",local:"transformers.RobertaPreLayerNormForMultipleChoice",headingTag:"h2"}}),Ie=new Z({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/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1248"}}),Y=new Z({props:{name:"forward",anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1267",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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) — Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) — <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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),oo=new be({props:{$$slots:{default:[Kn]},$$scope:{ctx:$}}}),xo=new Te({props:{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.example",$$slots:{default:[es]},$$scope:{ctx:$}}}),tt=new Le({props:{title:"RobertaPreLayerNormForTokenClassification",local:"transformers.RobertaPreLayerNormForTokenClassification",headingTag:"h2"}}),ot=new Z({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/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1343"}}),ct=new Z({props:{name:"forward",anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"labels",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1365",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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)  — Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),nt=new be({props:{$$slots:{default:[ts]},$$scope:{ctx:$}}}),A=new Te({props:{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.example",$$slots:{default:[os]},$$scope:{ctx:$}}}),Pt=new Le({props:{title:"RobertaPreLayerNormForQuestionAnswering",local:"transformers.RobertaPreLayerNormForQuestionAnswering",headingTag:"h2"}}),zt=new Z({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/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1450"}}),ye=new Z({props:{name:"forward",anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": Optional = None"},{name:"attention_mask",val:": Optional = None"},{name:"token_type_ids",val:": Optional = None"},{name:"position_ids",val:": Optional = None"},{name:"head_mask",val:": Optional = None"},{name:"inputs_embeds",val:": Optional = None"},{name:"start_positions",val:": Optional = None"},{name:"end_positions",val:": Optional = None"},{name:"output_attentions",val:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1468",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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) — 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>) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),st=new be({props:{$$slots:{default:[ns]},$$scope:{ctx:$}}}),at=new Te({props:{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.example",$$slots:{default:[ss]},$$scope:{ctx:$}}}),{c(){y(e.$$.fragment),m=r(),t=d("div"),y(s.$$.fragment),g=r(),o=d("p"),o.textContent=_,H=r(),C=d("p"),C.innerHTML=R,V=r(),J=d("p"),J.innerHTML=j,G=r(),f=d("p"),f.innerHTML=N,Re=r(),ce=d("p"),ce.innerHTML=Vo,mt=r(),ae=d("p"),ae.innerHTML=ut,Pe=r(),ke=d("div"),y(ze.$$.fragment),rt=r(),me=d("p"),me.innerHTML=ht,je=r(),y(we.$$.fragment),Be=r(),y(te.$$.fragment),z=r(),y(ge.$$.fragment),ft=r(),S=d("div"),y(Zt.$$.fragment),it=r(),Ue=d("p"),Ue.innerHTML=It,Dt=r(),re=d("p"),re.innerHTML=lo,X=r(),ve=d("p"),ve.innerHTML=qt,gt=r(),ue=d("div"),y(_t.$$.fragment),F=r(),L=d("p"),L.innerHTML=$e,Bt=r(),y($t.$$.fragment),dn=r(),y(Ke.$$.fragment),Ht=r(),y(Fe.$$.fragment),et=r(),We=d("div"),y(Ae.$$.fragment),So=r(),ie=d("p"),ie.innerHTML=yt,Yo=r(),Qe=d("p"),Qe.innerHTML=_n,Kt=r(),Ft=d("p"),Ft.innerHTML=zo,Go=r(),q=d("div"),y(Nt.$$.fragment),Oo=r(),lt=d("p"),lt.innerHTML=kn,Do=r(),y(Ee.$$.fragment),yn=r(),y(eo.$$.fragment),Ze=r(),y(xt.$$.fragment),Xo=r(),oe=d("div"),y(bo.$$.fragment),Se=r(),He=d("p"),He.textContent=cn,bt=r(),To=d("p"),To.innerHTML=Mo,Vt=r(),le=d("p"),le.innerHTML=Tt,Ko=r(),de=d("div"),y(co.$$.fragment),po=r(),Lt=d("p"),Lt.innerHTML=Ve,mo=r(),y(Mt.$$.fragment),Uo=r(),y(uo.$$.fragment),ko=r(),y(Rt.$$.fragment),en=r(),y(jt.$$.fragment),wo=r(),Ye=d("div"),y(Ie.$$.fragment),dt=r(),vo=d("p"),vo.textContent=Oe,$o=r(),Fo=d("p"),Fo.innerHTML=Ct,pn=r(),kt=d("p"),kt.innerHTML=to,ho=r(),Ne=d("div"),y(Y.$$.fragment),wt=r(),fo=d("p"),fo.innerHTML=_e,No=r(),y(oo.$$.fragment),Gt=r(),y(xo.$$.fragment),Ao=r(),y(tt.$$.fragment),mn=r(),Ge=d("div"),y(ot.$$.fragment),bn=r(),Lo=d("p"),Lo.textContent=Jt,un=r(),Ce=d("p"),Ce.innerHTML=Xe,go=r(),Xt=d("p"),Xt.innerHTML=Qo,hn=r(),Je=d("div"),y(ct.$$.fragment),no=r(),vt=d("p"),vt.innerHTML=so,ao=r(),y(nt.$$.fragment),he=r(),y(A.$$.fragment),ro=r(),y(Pt.$$.fragment),Ro=r(),De=d("div"),y(zt.$$.fragment),Wo=r(),Zo=d("p"),Zo.innerHTML=Io,qo=r(),Bo=d("p"),Bo.innerHTML=Ho,_o=r(),jo=d("p"),jo.innerHTML=qe,Co=r(),pt=d("div"),y(ye.$$.fragment),Jo=r(),Po=d("p"),Po.innerHTML=Ut,fn=r(),y(st.$$.fragment),io=r(),y(at.$$.fragment),this.h()},l(n){b(e.$$.fragment,n),m=i(n),t=c(n,"DIV",{class:!0});var h=U(t);b(s.$$.fragment,h),g=i(h),o=c(h,"P",{"data-svelte-h":!0}),u(o)!=="svelte-33ezil"&&(o.textContent=_),H=i(h),C=c(h,"P",{"data-svelte-h":!0}),u(C)!=="svelte-yiieny"&&(C.innerHTML=R),V=i(h),J=c(h,"P",{"data-svelte-h":!0}),u(J)!=="svelte-hswkmf"&&(J.innerHTML=j),G=i(h),f=c(h,"P",{"data-svelte-h":!0}),u(f)!=="svelte-rehfhh"&&(f.innerHTML=N),Re=i(h),ce=c(h,"P",{"data-svelte-h":!0}),u(ce)!=="svelte-174erte"&&(ce.innerHTML=Vo),mt=i(h),ae=c(h,"P",{"data-svelte-h":!0}),u(ae)!=="svelte-p9qvd1"&&(ae.innerHTML=ut),Pe=i(h),ke=c(h,"DIV",{class:!0});var fe=U(ke);b(ze.$$.fragment,fe),rt=i(fe),me=c(fe,"P",{"data-svelte-h":!0}),u(me)!=="svelte-3vcmdb"&&(me.innerHTML=ht),je=i(fe),b(we.$$.fragment,fe),Be=i(fe),b(te.$$.fragment,fe),fe.forEach(l),h.forEach(l),z=i(n),b(ge.$$.fragment,n),ft=i(n),S=c(n,"DIV",{class:!0});var I=U(S);b(Zt.$$.fragment,I),it=i(I),Ue=c(I,"P",{"data-svelte-h":!0}),u(Ue)!=="svelte-1dggich"&&(Ue.innerHTML=It),Dt=i(I),re=c(I,"P",{"data-svelte-h":!0}),u(re)!=="svelte-yiieny"&&(re.innerHTML=lo),X=i(I),ve=c(I,"P",{"data-svelte-h":!0}),u(ve)!=="svelte-hswkmf"&&(ve.innerHTML=qt),gt=i(I),ue=c(I,"DIV",{class:!0});var ne=U(ue);b(_t.$$.fragment,ne),F=i(ne),L=c(ne,"P",{"data-svelte-h":!0}),u(L)!=="svelte-bbco7j"&&(L.innerHTML=$e),Bt=i(ne),b($t.$$.fragment,ne),dn=i(ne),b(Ke.$$.fragment,ne),ne.forEach(l),I.forEach(l),Ht=i(n),b(Fe.$$.fragment,n),et=i(n),We=c(n,"DIV",{class:!0});var Q=U(We);b(Ae.$$.fragment,Q),So=i(Q),ie=c(Q,"P",{"data-svelte-h":!0}),u(ie)!=="svelte-8dtlt4"&&(ie.innerHTML=yt),Yo=i(Q),Qe=c(Q,"P",{"data-svelte-h":!0}),u(Qe)!=="svelte-yiieny"&&(Qe.innerHTML=_n),Kt=i(Q),Ft=c(Q,"P",{"data-svelte-h":!0}),u(Ft)!=="svelte-hswkmf"&&(Ft.innerHTML=zo),Go=i(Q),q=c(Q,"DIV",{class:!0});var O=U(q);b(Nt.$$.fragment,O),Oo=i(O),lt=c(O,"P",{"data-svelte-h":!0}),u(lt)!=="svelte-1ij6cy7"&&(lt.innerHTML=kn),Do=i(O),b(Ee.$$.fragment,O),yn=i(O),b(eo.$$.fragment,O),O.forEach(l),Q.forEach(l),Ze=i(n),b(xt.$$.fragment,n),Xo=i(n),oe=c(n,"DIV",{class:!0});var D=U(oe);b(bo.$$.fragment,D),Se=i(D),He=c(D,"P",{"data-svelte-h":!0}),u(He)!=="svelte-1bv1on4"&&(He.textContent=cn),bt=i(D),To=c(D,"P",{"data-svelte-h":!0}),u(To)!=="svelte-yiieny"&&(To.innerHTML=Mo),Vt=i(D),le=c(D,"P",{"data-svelte-h":!0}),u(le)!=="svelte-hswkmf"&&(le.innerHTML=Tt),Ko=i(D),de=c(D,"DIV",{class:!0});var se=U(de);b(co.$$.fragment,se),po=i(se),Lt=c(se,"P",{"data-svelte-h":!0}),u(Lt)!=="svelte-ef1sh"&&(Lt.innerHTML=Ve),mo=i(se),b(Mt.$$.fragment,se),Uo=i(se),b(uo.$$.fragment,se),ko=i(se),b(Rt.$$.fragment,se),se.forEach(l),D.forEach(l),en=i(n),b(jt.$$.fragment,n),wo=i(n),Ye=c(n,"DIV",{class:!0});var B=U(Ye);b(Ie.$$.fragment,B),dt=i(B),vo=c(B,"P",{"data-svelte-h":!0}),u(vo)!=="svelte-1t8wc3p"&&(vo.textContent=Oe),$o=i(B),Fo=c(B,"P",{"data-svelte-h":!0}),u(Fo)!=="svelte-yiieny"&&(Fo.innerHTML=Ct),pn=i(B),kt=c(B,"P",{"data-svelte-h":!0}),u(kt)!=="svelte-hswkmf"&&(kt.innerHTML=to),ho=i(B),Ne=c(B,"DIV",{class:!0});var xe=U(Ne);b(Y.$$.fragment,xe),wt=i(xe),fo=c(xe,"P",{"data-svelte-h":!0}),u(fo)!=="svelte-1u7w2p1"&&(fo.innerHTML=_e),No=i(xe),b(oo.$$.fragment,xe),Gt=i(xe),b(xo.$$.fragment,xe),xe.forEach(l),B.forEach(l),Ao=i(n),b(tt.$$.fragment,n),mn=i(n),Ge=c(n,"DIV",{class:!0});var E=U(Ge);b(ot.$$.fragment,E),bn=i(E),Lo=c(E,"P",{"data-svelte-h":!0}),u(Lo)!=="svelte-kne6bs"&&(Lo.textContent=Jt),un=i(E),Ce=c(E,"P",{"data-svelte-h":!0}),u(Ce)!=="svelte-yiieny"&&(Ce.innerHTML=Xe),go=i(E),Xt=c(E,"P",{"data-svelte-h":!0}),u(Xt)!=="svelte-hswkmf"&&(Xt.innerHTML=Qo),hn=i(E),Je=c(E,"DIV",{class:!0});var K=U(Je);b(ct.$$.fragment,K),no=i(K),vt=c(K,"P",{"data-svelte-h":!0}),u(vt)!=="svelte-19qtzzv"&&(vt.innerHTML=so),ao=i(K),b(nt.$$.fragment,K),he=i(K),b(A.$$.fragment,K),K.forEach(l),E.forEach(l),ro=i(n),b(Pt.$$.fragment,n),Ro=i(n),De=c(n,"DIV",{class:!0});var ee=U(De);b(zt.$$.fragment,ee),Wo=i(ee),Zo=c(ee,"P",{"data-svelte-h":!0}),u(Zo)!=="svelte-1xkbi4i"&&(Zo.innerHTML=Io),qo=i(ee),Bo=c(ee,"P",{"data-svelte-h":!0}),u(Bo)!=="svelte-yiieny"&&(Bo.innerHTML=Ho),_o=i(ee),jo=c(ee,"P",{"data-svelte-h":!0}),u(jo)!=="svelte-hswkmf"&&(jo.innerHTML=qe),Co=i(ee),pt=c(ee,"DIV",{class:!0});var pe=U(pt);b(ye.$$.fragment,pe),Jo=i(pe),Po=c(pe,"P",{"data-svelte-h":!0}),u(Po)!=="svelte-13eiaib"&&(Po.innerHTML=Ut),fn=i(pe),b(st.$$.fragment,pe),io=i(pe),b(at.$$.fragment,pe),pe.forEach(l),ee.forEach(l),this.h()},h(){W(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(We,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(de,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(Ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(Ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(De,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(n,h){T(e,n,h),p(n,m,h),p(n,t,h),T(s,t,null),a(t,g),a(t,o),a(t,H),a(t,C),a(t,V),a(t,J),a(t,G),a(t,f),a(t,Re),a(t,ce),a(t,mt),a(t,ae),a(t,Pe),a(t,ke),T(ze,ke,null),a(ke,rt),a(ke,me),a(ke,je),T(we,ke,null),a(ke,Be),T(te,ke,null),p(n,z,h),T(ge,n,h),p(n,ft,h),p(n,S,h),T(Zt,S,null),a(S,it),a(S,Ue),a(S,Dt),a(S,re),a(S,X),a(S,ve),a(S,gt),a(S,ue),T(_t,ue,null),a(ue,F),a(ue,L),a(ue,Bt),T($t,ue,null),a(ue,dn),T(Ke,ue,null),p(n,Ht,h),T(Fe,n,h),p(n,et,h),p(n,We,h),T(Ae,We,null),a(We,So),a(We,ie),a(We,Yo),a(We,Qe),a(We,Kt),a(We,Ft),a(We,Go),a(We,q),T(Nt,q,null),a(q,Oo),a(q,lt),a(q,Do),T(Ee,q,null),a(q,yn),T(eo,q,null),p(n,Ze,h),T(xt,n,h),p(n,Xo,h),p(n,oe,h),T(bo,oe,null),a(oe,Se),a(oe,He),a(oe,bt),a(oe,To),a(oe,Vt),a(oe,le),a(oe,Ko),a(oe,de),T(co,de,null),a(de,po),a(de,Lt),a(de,mo),T(Mt,de,null),a(de,Uo),T(uo,de,null),a(de,ko),T(Rt,de,null),p(n,en,h),T(jt,n,h),p(n,wo,h),p(n,Ye,h),T(Ie,Ye,null),a(Ye,dt),a(Ye,vo),a(Ye,$o),a(Ye,Fo),a(Ye,pn),a(Ye,kt),a(Ye,ho),a(Ye,Ne),T(Y,Ne,null),a(Ne,wt),a(Ne,fo),a(Ne,No),T(oo,Ne,null),a(Ne,Gt),T(xo,Ne,null),p(n,Ao,h),T(tt,n,h),p(n,mn,h),p(n,Ge,h),T(ot,Ge,null),a(Ge,bn),a(Ge,Lo),a(Ge,un),a(Ge,Ce),a(Ge,go),a(Ge,Xt),a(Ge,hn),a(Ge,Je),T(ct,Je,null),a(Je,no),a(Je,vt),a(Je,ao),T(nt,Je,null),a(Je,he),T(A,Je,null),p(n,ro,h),T(Pt,n,h),p(n,Ro,h),p(n,De,h),T(zt,De,null),a(De,Wo),a(De,Zo),a(De,qo),a(De,Bo),a(De,_o),a(De,jo),a(De,Co),a(De,pt),T(ye,pt,null),a(pt,Jo),a(pt,Po),a(pt,fn),T(st,pt,null),a(pt,io),T(at,pt,null),Wt=!0},p(n,h){const fe={};h&2&&(fe.$$scope={dirty:h,ctx:n}),we.$set(fe);const I={};h&2&&(I.$$scope={dirty:h,ctx:n}),te.$set(I);const ne={};h&2&&(ne.$$scope={dirty:h,ctx:n}),$t.$set(ne);const Q={};h&2&&(Q.$$scope={dirty:h,ctx:n}),Ke.$set(Q);const O={};h&2&&(O.$$scope={dirty:h,ctx:n}),Ee.$set(O);const D={};h&2&&(D.$$scope={dirty:h,ctx:n}),eo.$set(D);const se={};h&2&&(se.$$scope={dirty:h,ctx:n}),Mt.$set(se);const B={};h&2&&(B.$$scope={dirty:h,ctx:n}),uo.$set(B);const xe={};h&2&&(xe.$$scope={dirty:h,ctx:n}),Rt.$set(xe);const E={};h&2&&(E.$$scope={dirty:h,ctx:n}),oo.$set(E);const K={};h&2&&(K.$$scope={dirty:h,ctx:n}),xo.$set(K);const ee={};h&2&&(ee.$$scope={dirty:h,ctx:n}),nt.$set(ee);const pe={};h&2&&(pe.$$scope={dirty:h,ctx:n}),A.$set(pe);const Eo={};h&2&&(Eo.$$scope={dirty:h,ctx:n}),st.$set(Eo);const wn={};h&2&&(wn.$$scope={dirty:h,ctx:n}),at.$set(wn)},i(n){Wt||(M(e.$$.fragment,n),M(s.$$.fragment,n),M(ze.$$.fragment,n),M(we.$$.fragment,n),M(te.$$.fragment,n),M(ge.$$.fragment,n),M(Zt.$$.fragment,n),M(_t.$$.fragment,n),M($t.$$.fragment,n),M(Ke.$$.fragment,n),M(Fe.$$.fragment,n),M(Ae.$$.fragment,n),M(Nt.$$.fragment,n),M(Ee.$$.fragment,n),M(eo.$$.fragment,n),M(xt.$$.fragment,n),M(bo.$$.fragment,n),M(co.$$.fragment,n),M(Mt.$$.fragment,n),M(uo.$$.fragment,n),M(Rt.$$.fragment,n),M(jt.$$.fragment,n),M(Ie.$$.fragment,n),M(Y.$$.fragment,n),M(oo.$$.fragment,n),M(xo.$$.fragment,n),M(tt.$$.fragment,n),M(ot.$$.fragment,n),M(ct.$$.fragment,n),M(nt.$$.fragment,n),M(A.$$.fragment,n),M(Pt.$$.fragment,n),M(zt.$$.fragment,n),M(ye.$$.fragment,n),M(st.$$.fragment,n),M(at.$$.fragment,n),Wt=!0)},o(n){k(e.$$.fragment,n),k(s.$$.fragment,n),k(ze.$$.fragment,n),k(we.$$.fragment,n),k(te.$$.fragment,n),k(ge.$$.fragment,n),k(Zt.$$.fragment,n),k(_t.$$.fragment,n),k($t.$$.fragment,n),k(Ke.$$.fragment,n),k(Fe.$$.fragment,n),k(Ae.$$.fragment,n),k(Nt.$$.fragment,n),k(Ee.$$.fragment,n),k(eo.$$.fragment,n),k(xt.$$.fragment,n),k(bo.$$.fragment,n),k(co.$$.fragment,n),k(Mt.$$.fragment,n),k(uo.$$.fragment,n),k(Rt.$$.fragment,n),k(jt.$$.fragment,n),k(Ie.$$.fragment,n),k(Y.$$.fragment,n),k(oo.$$.fragment,n),k(xo.$$.fragment,n),k(tt.$$.fragment,n),k(ot.$$.fragment,n),k(ct.$$.fragment,n),k(nt.$$.fragment,n),k(A.$$.fragment,n),k(Pt.$$.fragment,n),k(zt.$$.fragment,n),k(ye.$$.fragment,n),k(st.$$.fragment,n),k(at.$$.fragment,n),Wt=!1},d(n){n&&(l(m),l(t),l(z),l(ft),l(S),l(Ht),l(et),l(We),l(Ze),l(Xo),l(oe),l(en),l(wo),l(Ye),l(Ao),l(mn),l(Ge),l(ro),l(Ro),l(De)),w(e,n),w(s),w(ze),w(we),w(te),w(ge,n),w(Zt),w(_t),w($t),w(Ke),w(Fe,n),w(Ae),w(Nt),w(Ee),w(eo),w(xt,n),w(bo),w(co),w(Mt),w(uo),w(Rt),w(jt,n),w(Ie),w(Y),w(oo),w(xo),w(tt,n),w(ot),w(ct),w(nt),w(A),w(Pt,n),w(zt),w(ye),w(st),w(at)}}}function rs($){let e,m;return e=new Pn({props:{$$slots:{default:[as]},$$scope:{ctx:$}}}),{c(){y(e.$$.fragment)},l(t){b(e.$$.fragment,t)},m(t,s){T(e,t,s),m=!0},p(t,s){const g={};s&2&&(g.$$scope={dirty:s,ctx:t}),e.$set(g)},i(t){m||(M(e.$$.fragment,t),m=!0)},o(t){k(e.$$.fragment,t),m=!1},d(t){w(e,t)}}}function is($){let e,m="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",t,s,g="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",o,_,H=`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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,C,R,V=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,J,j,G=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){e=d("p"),e.innerHTML=m,t=r(),s=d("ul"),s.innerHTML=g,o=r(),_=d("p"),_.innerHTML=H,C=r(),R=d("ul"),R.innerHTML=V,J=r(),j=d("p"),j.innerHTML=G},l(f){e=c(f,"P",{"data-svelte-h":!0}),u(e)!=="svelte-1ajbfxg"&&(e.innerHTML=m),t=i(f),s=c(f,"UL",{"data-svelte-h":!0}),u(s)!=="svelte-qm1t26"&&(s.innerHTML=g),o=i(f),_=c(f,"P",{"data-svelte-h":!0}),u(_)!=="svelte-1v9qsc5"&&(_.innerHTML=H),C=i(f),R=c(f,"UL",{"data-svelte-h":!0}),u(R)!=="svelte-15scerc"&&(R.innerHTML=V),J=i(f),j=c(f,"P",{"data-svelte-h":!0}),u(j)!=="svelte-1an3odd"&&(j.innerHTML=G)},m(f,N){p(f,e,N),p(f,t,N),p(f,s,N),p(f,o,N),p(f,_,N),p(f,C,N),p(f,R,N),p(f,J,N),p(f,j,N)},p:P,d(f){f&&(l(e),l(t),l(s),l(o),l(_),l(C),l(R),l(J),l(j))}}}function ls($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function ds($){let e,m="Example:",t,s,g;return s=new Me({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`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function cs($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function ps($){let e,m="Example:",t,s,g;return s=new Me({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`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function ms($){let e,m="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",t,s,g="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",o,_,H=`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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,C,R,V=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,J,j,G=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){e=d("p"),e.innerHTML=m,t=r(),s=d("ul"),s.innerHTML=g,o=r(),_=d("p"),_.innerHTML=H,C=r(),R=d("ul"),R.innerHTML=V,J=r(),j=d("p"),j.innerHTML=G},l(f){e=c(f,"P",{"data-svelte-h":!0}),u(e)!=="svelte-1ajbfxg"&&(e.innerHTML=m),t=i(f),s=c(f,"UL",{"data-svelte-h":!0}),u(s)!=="svelte-qm1t26"&&(s.innerHTML=g),o=i(f),_=c(f,"P",{"data-svelte-h":!0}),u(_)!=="svelte-1v9qsc5"&&(_.innerHTML=H),C=i(f),R=c(f,"UL",{"data-svelte-h":!0}),u(R)!=="svelte-15scerc"&&(R.innerHTML=V),J=i(f),j=c(f,"P",{"data-svelte-h":!0}),u(j)!=="svelte-1an3odd"&&(j.innerHTML=G)},m(f,N){p(f,e,N),p(f,t,N),p(f,s,N),p(f,o,N),p(f,_,N),p(f,C,N),p(f,R,N),p(f,J,N),p(f,j,N)},p:P,d(f){f&&(l(e),l(t),l(s),l(o),l(_),l(C),l(R),l(J),l(j))}}}function us($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function hs($){let e,m="Example:",t,s,g;return s=new Me({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>`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function fs($){let e,m;return e=new Me({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>`,wrap:!1}}),{c(){y(e.$$.fragment)},l(t){b(e.$$.fragment,t)},m(t,s){T(e,t,s),m=!0},p:P,i(t){m||(M(e.$$.fragment,t),m=!0)},o(t){k(e.$$.fragment,t),m=!1},d(t){w(e,t)}}}function gs($){let e,m="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",t,s,g="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",o,_,H=`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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,C,R,V=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,J,j,G=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){e=d("p"),e.innerHTML=m,t=r(),s=d("ul"),s.innerHTML=g,o=r(),_=d("p"),_.innerHTML=H,C=r(),R=d("ul"),R.innerHTML=V,J=r(),j=d("p"),j.innerHTML=G},l(f){e=c(f,"P",{"data-svelte-h":!0}),u(e)!=="svelte-1ajbfxg"&&(e.innerHTML=m),t=i(f),s=c(f,"UL",{"data-svelte-h":!0}),u(s)!=="svelte-qm1t26"&&(s.innerHTML=g),o=i(f),_=c(f,"P",{"data-svelte-h":!0}),u(_)!=="svelte-1v9qsc5"&&(_.innerHTML=H),C=i(f),R=c(f,"UL",{"data-svelte-h":!0}),u(R)!=="svelte-15scerc"&&(R.innerHTML=V),J=i(f),j=c(f,"P",{"data-svelte-h":!0}),u(j)!=="svelte-1an3odd"&&(j.innerHTML=G)},m(f,N){p(f,e,N),p(f,t,N),p(f,s,N),p(f,o,N),p(f,_,N),p(f,C,N),p(f,R,N),p(f,J,N),p(f,j,N)},p:P,d(f){f&&(l(e),l(t),l(s),l(o),l(_),l(C),l(R),l(J),l(j))}}}function _s($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function ys($){let e,m="Example:",t,s,g;return s=new Me({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>])`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function bs($){let e,m;return e=new Me({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',wrap:!1}}),{c(){y(e.$$.fragment)},l(t){b(e.$$.fragment,t)},m(t,s){T(e,t,s),m=!0},p:P,i(t){m||(M(e.$$.fragment,t),m=!0)},o(t){k(e.$$.fragment,t),m=!1},d(t){w(e,t)}}}function Ts($){let e,m="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",t,s,g="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",o,_,H=`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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,C,R,V=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,J,j,G=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){e=d("p"),e.innerHTML=m,t=r(),s=d("ul"),s.innerHTML=g,o=r(),_=d("p"),_.innerHTML=H,C=r(),R=d("ul"),R.innerHTML=V,J=r(),j=d("p"),j.innerHTML=G},l(f){e=c(f,"P",{"data-svelte-h":!0}),u(e)!=="svelte-1ajbfxg"&&(e.innerHTML=m),t=i(f),s=c(f,"UL",{"data-svelte-h":!0}),u(s)!=="svelte-qm1t26"&&(s.innerHTML=g),o=i(f),_=c(f,"P",{"data-svelte-h":!0}),u(_)!=="svelte-1v9qsc5"&&(_.innerHTML=H),C=i(f),R=c(f,"UL",{"data-svelte-h":!0}),u(R)!=="svelte-15scerc"&&(R.innerHTML=V),J=i(f),j=c(f,"P",{"data-svelte-h":!0}),u(j)!=="svelte-1an3odd"&&(j.innerHTML=G)},m(f,N){p(f,e,N),p(f,t,N),p(f,s,N),p(f,o,N),p(f,_,N),p(f,C,N),p(f,R,N),p(f,J,N),p(f,j,N)},p:P,d(f){f&&(l(e),l(t),l(s),l(o),l(_),l(C),l(R),l(J),l(j))}}}function Ms($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function ks($){let e,m="Example:",t,s,g;return s=new Me({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`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function ws($){let e,m="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",t,s,g="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",o,_,H=`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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,C,R,V=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,J,j,G=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){e=d("p"),e.innerHTML=m,t=r(),s=d("ul"),s.innerHTML=g,o=r(),_=d("p"),_.innerHTML=H,C=r(),R=d("ul"),R.innerHTML=V,J=r(),j=d("p"),j.innerHTML=G},l(f){e=c(f,"P",{"data-svelte-h":!0}),u(e)!=="svelte-1ajbfxg"&&(e.innerHTML=m),t=i(f),s=c(f,"UL",{"data-svelte-h":!0}),u(s)!=="svelte-qm1t26"&&(s.innerHTML=g),o=i(f),_=c(f,"P",{"data-svelte-h":!0}),u(_)!=="svelte-1v9qsc5"&&(_.innerHTML=H),C=i(f),R=c(f,"UL",{"data-svelte-h":!0}),u(R)!=="svelte-15scerc"&&(R.innerHTML=V),J=i(f),j=c(f,"P",{"data-svelte-h":!0}),u(j)!=="svelte-1an3odd"&&(j.innerHTML=G)},m(f,N){p(f,e,N),p(f,t,N),p(f,s,N),p(f,o,N),p(f,_,N),p(f,C,N),p(f,R,N),p(f,J,N),p(f,j,N)},p:P,d(f){f&&(l(e),l(t),l(s),l(o),l(_),l(C),l(R),l(J),l(j))}}}function vs($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function $s($){let e,m="Example:",t,s,g;return s=new Me({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()]`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function Fs($){let e,m;return e=new Me({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)`,wrap:!1}}),{c(){y(e.$$.fragment)},l(t){b(e.$$.fragment,t)},m(t,s){T(e,t,s),m=!0},p:P,i(t){m||(M(e.$$.fragment,t),m=!0)},o(t){k(e.$$.fragment,t),m=!1},d(t){w(e,t)}}}function Ns($){let e,m="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",t,s,g="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",o,_,H=`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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,C,R,V=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,J,j,G=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){e=d("p"),e.innerHTML=m,t=r(),s=d("ul"),s.innerHTML=g,o=r(),_=d("p"),_.innerHTML=H,C=r(),R=d("ul"),R.innerHTML=V,J=r(),j=d("p"),j.innerHTML=G},l(f){e=c(f,"P",{"data-svelte-h":!0}),u(e)!=="svelte-1ajbfxg"&&(e.innerHTML=m),t=i(f),s=c(f,"UL",{"data-svelte-h":!0}),u(s)!=="svelte-qm1t26"&&(s.innerHTML=g),o=i(f),_=c(f,"P",{"data-svelte-h":!0}),u(_)!=="svelte-1v9qsc5"&&(_.innerHTML=H),C=i(f),R=c(f,"UL",{"data-svelte-h":!0}),u(R)!=="svelte-15scerc"&&(R.innerHTML=V),J=i(f),j=c(f,"P",{"data-svelte-h":!0}),u(j)!=="svelte-1an3odd"&&(j.innerHTML=G)},m(f,N){p(f,e,N),p(f,t,N),p(f,s,N),p(f,o,N),p(f,_,N),p(f,C,N),p(f,R,N),p(f,J,N),p(f,j,N)},p:P,d(f){f&&(l(e),l(t),l(s),l(o),l(_),l(C),l(R),l(J),l(j))}}}function xs($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function Ls($){let e,m="Example:",t,s,g;return s=new Me({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>]`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function Rs($){let e,m;return e=new Me({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)`,wrap:!1}}),{c(){y(e.$$.fragment)},l(t){b(e.$$.fragment,t)},m(t,s){T(e,t,s),m=!0},p:P,i(t){m||(M(e.$$.fragment,t),m=!0)},o(t){k(e.$$.fragment,t),m=!1},d(t){w(e,t)}}}function js($){let e,m,t,s,g,o,_="The bare RoBERTa-PreLayerNorm Model transformer outputting raw hidden-states without any specific head on top.",H,C,R=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,V,J,j=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,G,f,N,Re,ce,Vo,mt,ae='The <a href="/docs/transformers/pr_31198/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormModel">TFRobertaPreLayerNormModel</a> forward method, overrides the <code>__call__</code> special method.',ut,Pe,ke,ze,rt,me,ht,je,we,Be,te,z,ge,ft,S='The <a href="/docs/transformers/pr_31198/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormForCausalLM">TFRobertaPreLayerNormForCausalLM</a> forward method, overrides the <code>__call__</code> special method.',Zt,it,Ue,It,Dt,re,lo,X,ve,qt,gt,ue="RoBERTa-PreLayerNorm Model with a <code>language modeling</code> head on top.",_t,F,L=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,$e,Bt,$t=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,dn,Ke,Ht,Fe,et,We,Ae,So='The <a href="/docs/transformers/pr_31198/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormForMaskedLM">TFRobertaPreLayerNormForMaskedLM</a> forward method, overrides the <code>__call__</code> special method.',ie,yt,Yo,Qe,_n,Kt,Ft,zo,Go,q,Nt,Oo,lt,kn=`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.`,Do,Ee,yn=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,eo,Ze,xt=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,Xo,oe,bo,Se,He,cn,bt,To='The <a href="/docs/transformers/pr_31198/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormForSequenceClassification">TFRobertaPreLayerNormForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',Mo,Vt,le,Tt,Ko,de,co,po,Lt,Ve,mo,Mt,Uo,uo=`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.`,ko,Rt,en=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,jt,wo,Ye=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,Ie,dt,vo,Oe,$o,Fo,Ct,pn='The <a href="/docs/transformers/pr_31198/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormForMultipleChoice">TFRobertaPreLayerNormForMultipleChoice</a> forward method, overrides the <code>__call__</code> special method.',kt,to,ho,Ne,Y,wt,fo,_e,No,oo,Gt,xo=`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.`,Ao,tt,mn=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Ge,ot,bn=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,Lo,Jt,un,Ce,Xe,go,Xt,Qo='The <a href="/docs/transformers/pr_31198/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormForTokenClassification">TFRobertaPreLayerNormForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',hn,Je,ct,no,vt,so,ao,nt,he,A,ro,Pt,Ro,De=`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 <code>span start logits</code> and <code>span end logits</code>).`,zt,Wo,Zo=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`,Io,qo,Bo=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">keras.Model</a> subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`,Ho,_o,jo,qe,Co,pt,ye,Jo='The <a href="/docs/transformers/pr_31198/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormForQuestionAnswering">TFRobertaPreLayerNormForQuestionAnswering</a> forward method, overrides the <code>__call__</code> special method.',Po,Ut,fn,st,io,at,Wt;return e=new Le({props:{title:"TFRobertaPreLayerNormModel",local:"transformers.TFRobertaPreLayerNormModel",headingTag:"h2"}}),s=new Z({props:{name:"class transformers.TFRobertaPreLayerNormModel",anchor:"transformers.TFRobertaPreLayerNormModel",parameters:[{name:"config",val:""},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaPreLayerNormModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L983"}}),f=new be({props:{$$slots:{default:[is]},$$scope:{ctx:$}}}),ce=new Z({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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L993",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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>) — 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>) — 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’re 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>) — 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>) — 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>) — 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>) — 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’s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Pe=new be({props:{$$slots:{default:[ls]},$$scope:{ctx:$}}}),ze=new Te({props:{anchor:"transformers.TFRobertaPreLayerNormModel.call.example",$$slots:{default:[ds]},$$scope:{ctx:$}}}),me=new Le({props:{title:"TFRobertaPreLayerNormForCausalLM",local:"transformers.TFRobertaPreLayerNormForCausalLM",headingTag:"h2"}}),we=new Z({props:{name:"class transformers.TFRobertaPreLayerNormForCausalLM",anchor:"transformers.TFRobertaPreLayerNormForCausalLM",parameters:[{name:"config",val:": RobertaPreLayerNormConfig"},{name:"*inputs",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1222"}}),z=new Z({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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1261",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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) — 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>) — 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>) — 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>) — 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>) — 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’s 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),it=new be({props:{$$slots:{default:[cs]},$$scope:{ctx:$}}}),It=new Te({props:{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.example",$$slots:{default:[ps]},$$scope:{ctx:$}}}),re=new Le({props:{title:"TFRobertaPreLayerNormForMaskedLM",local:"transformers.TFRobertaPreLayerNormForMaskedLM",headingTag:"h2"}}),ve=new Z({props:{name:"class transformers.TFRobertaPreLayerNormForMaskedLM",anchor:"transformers.TFRobertaPreLayerNormForMaskedLM",parameters:[{name:"config",val:""},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1126"}}),Ke=new be({props:{$$slots:{default:[ms]},$$scope:{ctx:$}}}),et=new Z({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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1149",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),yt=new be({props:{$$slots:{default:[us]},$$scope:{ctx:$}}}),Qe=new Te({props:{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.example",$$slots:{default:[hs]},$$scope:{ctx:$}}}),Kt=new Te({props:{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.example-2",$$slots:{default:[fs]},$$scope:{ctx:$}}}),zo=new Le({props:{title:"TFRobertaPreLayerNormForSequenceClassification",local:"transformers.TFRobertaPreLayerNormForSequenceClassification",headingTag:"h2"}}),Nt=new Z({props:{name:"class transformers.TFRobertaPreLayerNormForSequenceClassification",anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification",parameters:[{name:"config",val:""},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1402"}}),oe=new be({props:{$$slots:{default:[gs]},$$scope:{ctx:$}}}),He=new Z({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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1424",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Vt=new be({props:{$$slots:{default:[_s]},$$scope:{ctx:$}}}),Tt=new Te({props:{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.example",$$slots:{default:[ys]},$$scope:{ctx:$}}}),de=new Te({props:{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.example-2",$$slots:{default:[bs]},$$scope:{ctx:$}}}),po=new Le({props:{title:"TFRobertaPreLayerNormForMultipleChoice",local:"transformers.TFRobertaPreLayerNormForMultipleChoice",headingTag:"h2"}}),mo=new Z({props:{name:"class transformers.TFRobertaPreLayerNormForMultipleChoice",anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice",parameters:[{name:"config",val:""},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1492"}}),dt=new be({props:{$$slots:{default:[Ts]},$$scope:{ctx:$}}}),$o=new Z({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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1515",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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) — Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) — <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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),to=new be({props:{$$slots:{default:[Ms]},$$scope:{ctx:$}}}),Ne=new Te({props:{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.example",$$slots:{default:[ks]},$$scope:{ctx:$}}}),wt=new Le({props:{title:"TFRobertaPreLayerNormForTokenClassification",local:"transformers.TFRobertaPreLayerNormForTokenClassification",headingTag:"h2"}}),No=new Z({props:{name:"class transformers.TFRobertaPreLayerNormForTokenClassification",anchor:"transformers.TFRobertaPreLayerNormForTokenClassification",parameters:[{name:"config",val:""},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1597"}}),Jt=new be({props:{$$slots:{default:[ws]},$$scope:{ctx:$}}}),Xe=new Z({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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1625",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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)  — Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Je=new be({props:{$$slots:{default:[vs]},$$scope:{ctx:$}}}),no=new Te({props:{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.example",$$slots:{default:[$s]},$$scope:{ctx:$}}}),so=new Te({props:{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.example-2",$$slots:{default:[Fs]},$$scope:{ctx:$}}}),nt=new Le({props:{title:"TFRobertaPreLayerNormForQuestionAnswering",local:"transformers.TFRobertaPreLayerNormForQuestionAnswering",headingTag:"h2"}}),ro=new Z({props:{name:"class transformers.TFRobertaPreLayerNormForQuestionAnswering",anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering",parameters:[{name:"config",val:""},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1693"}}),_o=new be({props:{$$slots:{default:[Ns]},$$scope:{ctx:$}}}),Co=new Z({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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1716",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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) — 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>) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ut=new be({props:{$$slots:{default:[xs]},$$scope:{ctx:$}}}),st=new Te({props:{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.example",$$slots:{default:[Ls]},$$scope:{ctx:$}}}),at=new Te({props:{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.example-2",$$slots:{default:[Rs]},$$scope:{ctx:$}}}),{c(){y(e.$$.fragment),m=r(),t=d("div"),y(s.$$.fragment),g=r(),o=d("p"),o.textContent=_,H=r(),C=d("p"),C.innerHTML=R,V=r(),J=d("p"),J.innerHTML=j,G=r(),y(f.$$.fragment),N=r(),Re=d("div"),y(ce.$$.fragment),Vo=r(),mt=d("p"),mt.innerHTML=ae,ut=r(),y(Pe.$$.fragment),ke=r(),y(ze.$$.fragment),rt=r(),y(me.$$.fragment),ht=r(),je=d("div"),y(we.$$.fragment),Be=r(),te=d("div"),y(z.$$.fragment),ge=r(),ft=d("p"),ft.innerHTML=S,Zt=r(),y(it.$$.fragment),Ue=r(),y(It.$$.fragment),Dt=r(),y(re.$$.fragment),lo=r(),X=d("div"),y(ve.$$.fragment),qt=r(),gt=d("p"),gt.innerHTML=ue,_t=r(),F=d("p"),F.innerHTML=L,$e=r(),Bt=d("p"),Bt.innerHTML=$t,dn=r(),y(Ke.$$.fragment),Ht=r(),Fe=d("div"),y(et.$$.fragment),We=r(),Ae=d("p"),Ae.innerHTML=So,ie=r(),y(yt.$$.fragment),Yo=r(),y(Qe.$$.fragment),_n=r(),y(Kt.$$.fragment),Ft=r(),y(zo.$$.fragment),Go=r(),q=d("div"),y(Nt.$$.fragment),Oo=r(),lt=d("p"),lt.textContent=kn,Do=r(),Ee=d("p"),Ee.innerHTML=yn,eo=r(),Ze=d("p"),Ze.innerHTML=xt,Xo=r(),y(oe.$$.fragment),bo=r(),Se=d("div"),y(He.$$.fragment),cn=r(),bt=d("p"),bt.innerHTML=To,Mo=r(),y(Vt.$$.fragment),le=r(),y(Tt.$$.fragment),Ko=r(),y(de.$$.fragment),co=r(),y(po.$$.fragment),Lt=r(),Ve=d("div"),y(mo.$$.fragment),Mt=r(),Uo=d("p"),Uo.textContent=uo,ko=r(),Rt=d("p"),Rt.innerHTML=en,jt=r(),wo=d("p"),wo.innerHTML=Ye,Ie=r(),y(dt.$$.fragment),vo=r(),Oe=d("div"),y($o.$$.fragment),Fo=r(),Ct=d("p"),Ct.innerHTML=pn,kt=r(),y(to.$$.fragment),ho=r(),y(Ne.$$.fragment),Y=r(),y(wt.$$.fragment),fo=r(),_e=d("div"),y(No.$$.fragment),oo=r(),Gt=d("p"),Gt.textContent=xo,Ao=r(),tt=d("p"),tt.innerHTML=mn,Ge=r(),ot=d("p"),ot.innerHTML=bn,Lo=r(),y(Jt.$$.fragment),un=r(),Ce=d("div"),y(Xe.$$.fragment),go=r(),Xt=d("p"),Xt.innerHTML=Qo,hn=r(),y(Je.$$.fragment),ct=r(),y(no.$$.fragment),vt=r(),y(so.$$.fragment),ao=r(),y(nt.$$.fragment),he=r(),A=d("div"),y(ro.$$.fragment),Pt=r(),Ro=d("p"),Ro.innerHTML=De,zt=r(),Wo=d("p"),Wo.innerHTML=Zo,Io=r(),qo=d("p"),qo.innerHTML=Bo,Ho=r(),y(_o.$$.fragment),jo=r(),qe=d("div"),y(Co.$$.fragment),pt=r(),ye=d("p"),ye.innerHTML=Jo,Po=r(),y(Ut.$$.fragment),fn=r(),y(st.$$.fragment),io=r(),y(at.$$.fragment),this.h()},l(n){b(e.$$.fragment,n),m=i(n),t=c(n,"DIV",{class:!0});var h=U(t);b(s.$$.fragment,h),g=i(h),o=c(h,"P",{"data-svelte-h":!0}),u(o)!=="svelte-33ezil"&&(o.textContent=_),H=i(h),C=c(h,"P",{"data-svelte-h":!0}),u(C)!=="svelte-4cmyou"&&(C.innerHTML=R),V=i(h),J=c(h,"P",{"data-svelte-h":!0}),u(J)!=="svelte-1be7e3c"&&(J.innerHTML=j),G=i(h),b(f.$$.fragment,h),N=i(h),Re=c(h,"DIV",{class:!0});var fe=U(Re);b(ce.$$.fragment,fe),Vo=i(fe),mt=c(fe,"P",{"data-svelte-h":!0}),u(mt)!=="svelte-zf98yv"&&(mt.innerHTML=ae),ut=i(fe),b(Pe.$$.fragment,fe),ke=i(fe),b(ze.$$.fragment,fe),fe.forEach(l),h.forEach(l),rt=i(n),b(me.$$.fragment,n),ht=i(n),je=c(n,"DIV",{class:!0});var I=U(je);b(we.$$.fragment,I),Be=i(I),te=c(I,"DIV",{class:!0});var ne=U(te);b(z.$$.fragment,ne),ge=i(ne),ft=c(ne,"P",{"data-svelte-h":!0}),u(ft)!=="svelte-15bg2n"&&(ft.innerHTML=S),Zt=i(ne),b(it.$$.fragment,ne),Ue=i(ne),b(It.$$.fragment,ne),ne.forEach(l),I.forEach(l),Dt=i(n),b(re.$$.fragment,n),lo=i(n),X=c(n,"DIV",{class:!0});var Q=U(X);b(ve.$$.fragment,Q),qt=i(Q),gt=c(Q,"P",{"data-svelte-h":!0}),u(gt)!=="svelte-8dtlt4"&&(gt.innerHTML=ue),_t=i(Q),F=c(Q,"P",{"data-svelte-h":!0}),u(F)!=="svelte-4cmyou"&&(F.innerHTML=L),$e=i(Q),Bt=c(Q,"P",{"data-svelte-h":!0}),u(Bt)!=="svelte-1be7e3c"&&(Bt.innerHTML=$t),dn=i(Q),b(Ke.$$.fragment,Q),Ht=i(Q),Fe=c(Q,"DIV",{class:!0});var O=U(Fe);b(et.$$.fragment,O),We=i(O),Ae=c(O,"P",{"data-svelte-h":!0}),u(Ae)!=="svelte-16lkb1j"&&(Ae.innerHTML=So),ie=i(O),b(yt.$$.fragment,O),Yo=i(O),b(Qe.$$.fragment,O),_n=i(O),b(Kt.$$.fragment,O),O.forEach(l),Q.forEach(l),Ft=i(n),b(zo.$$.fragment,n),Go=i(n),q=c(n,"DIV",{class:!0});var D=U(q);b(Nt.$$.fragment,D),Oo=i(D),lt=c(D,"P",{"data-svelte-h":!0}),u(lt)!=="svelte-1bv1on4"&&(lt.textContent=kn),Do=i(D),Ee=c(D,"P",{"data-svelte-h":!0}),u(Ee)!=="svelte-4cmyou"&&(Ee.innerHTML=yn),eo=i(D),Ze=c(D,"P",{"data-svelte-h":!0}),u(Ze)!=="svelte-1be7e3c"&&(Ze.innerHTML=xt),Xo=i(D),b(oe.$$.fragment,D),bo=i(D),Se=c(D,"DIV",{class:!0});var se=U(Se);b(He.$$.fragment,se),cn=i(se),bt=c(se,"P",{"data-svelte-h":!0}),u(bt)!=="svelte-djeftp"&&(bt.innerHTML=To),Mo=i(se),b(Vt.$$.fragment,se),le=i(se),b(Tt.$$.fragment,se),Ko=i(se),b(de.$$.fragment,se),se.forEach(l),D.forEach(l),co=i(n),b(po.$$.fragment,n),Lt=i(n),Ve=c(n,"DIV",{class:!0});var B=U(Ve);b(mo.$$.fragment,B),Mt=i(B),Uo=c(B,"P",{"data-svelte-h":!0}),u(Uo)!=="svelte-1t8wc3p"&&(Uo.textContent=uo),ko=i(B),Rt=c(B,"P",{"data-svelte-h":!0}),u(Rt)!=="svelte-4cmyou"&&(Rt.innerHTML=en),jt=i(B),wo=c(B,"P",{"data-svelte-h":!0}),u(wo)!=="svelte-1be7e3c"&&(wo.innerHTML=Ye),Ie=i(B),b(dt.$$.fragment,B),vo=i(B),Oe=c(B,"DIV",{class:!0});var xe=U(Oe);b($o.$$.fragment,xe),Fo=i(xe),Ct=c(xe,"P",{"data-svelte-h":!0}),u(Ct)!=="svelte-1dtw4pl"&&(Ct.innerHTML=pn),kt=i(xe),b(to.$$.fragment,xe),ho=i(xe),b(Ne.$$.fragment,xe),xe.forEach(l),B.forEach(l),Y=i(n),b(wt.$$.fragment,n),fo=i(n),_e=c(n,"DIV",{class:!0});var E=U(_e);b(No.$$.fragment,E),oo=i(E),Gt=c(E,"P",{"data-svelte-h":!0}),u(Gt)!=="svelte-1wv1kmv"&&(Gt.textContent=xo),Ao=i(E),tt=c(E,"P",{"data-svelte-h":!0}),u(tt)!=="svelte-4cmyou"&&(tt.innerHTML=mn),Ge=i(E),ot=c(E,"P",{"data-svelte-h":!0}),u(ot)!=="svelte-1be7e3c"&&(ot.innerHTML=bn),Lo=i(E),b(Jt.$$.fragment,E),un=i(E),Ce=c(E,"DIV",{class:!0});var K=U(Ce);b(Xe.$$.fragment,K),go=i(K),Xt=c(K,"P",{"data-svelte-h":!0}),u(Xt)!=="svelte-f7v4g7"&&(Xt.innerHTML=Qo),hn=i(K),b(Je.$$.fragment,K),ct=i(K),b(no.$$.fragment,K),vt=i(K),b(so.$$.fragment,K),K.forEach(l),E.forEach(l),ao=i(n),b(nt.$$.fragment,n),he=i(n),A=c(n,"DIV",{class:!0});var ee=U(A);b(ro.$$.fragment,ee),Pt=i(ee),Ro=c(ee,"P",{"data-svelte-h":!0}),u(Ro)!=="svelte-4mgyt1"&&(Ro.innerHTML=De),zt=i(ee),Wo=c(ee,"P",{"data-svelte-h":!0}),u(Wo)!=="svelte-4cmyou"&&(Wo.innerHTML=Zo),Io=i(ee),qo=c(ee,"P",{"data-svelte-h":!0}),u(qo)!=="svelte-1be7e3c"&&(qo.innerHTML=Bo),Ho=i(ee),b(_o.$$.fragment,ee),jo=i(ee),qe=c(ee,"DIV",{class:!0});var pe=U(qe);b(Co.$$.fragment,pe),pt=i(pe),ye=c(pe,"P",{"data-svelte-h":!0}),u(ye)!=="svelte-wlhfaf"&&(ye.innerHTML=Jo),Po=i(pe),b(Ut.$$.fragment,pe),fn=i(pe),b(st.$$.fragment,pe),io=i(pe),b(at.$$.fragment,pe),pe.forEach(l),ee.forEach(l),this.h()},h(){W(Re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(Se,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(Oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(Ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(Ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(qe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(n,h){T(e,n,h),p(n,m,h),p(n,t,h),T(s,t,null),a(t,g),a(t,o),a(t,H),a(t,C),a(t,V),a(t,J),a(t,G),T(f,t,null),a(t,N),a(t,Re),T(ce,Re,null),a(Re,Vo),a(Re,mt),a(Re,ut),T(Pe,Re,null),a(Re,ke),T(ze,Re,null),p(n,rt,h),T(me,n,h),p(n,ht,h),p(n,je,h),T(we,je,null),a(je,Be),a(je,te),T(z,te,null),a(te,ge),a(te,ft),a(te,Zt),T(it,te,null),a(te,Ue),T(It,te,null),p(n,Dt,h),T(re,n,h),p(n,lo,h),p(n,X,h),T(ve,X,null),a(X,qt),a(X,gt),a(X,_t),a(X,F),a(X,$e),a(X,Bt),a(X,dn),T(Ke,X,null),a(X,Ht),a(X,Fe),T(et,Fe,null),a(Fe,We),a(Fe,Ae),a(Fe,ie),T(yt,Fe,null),a(Fe,Yo),T(Qe,Fe,null),a(Fe,_n),T(Kt,Fe,null),p(n,Ft,h),T(zo,n,h),p(n,Go,h),p(n,q,h),T(Nt,q,null),a(q,Oo),a(q,lt),a(q,Do),a(q,Ee),a(q,eo),a(q,Ze),a(q,Xo),T(oe,q,null),a(q,bo),a(q,Se),T(He,Se,null),a(Se,cn),a(Se,bt),a(Se,Mo),T(Vt,Se,null),a(Se,le),T(Tt,Se,null),a(Se,Ko),T(de,Se,null),p(n,co,h),T(po,n,h),p(n,Lt,h),p(n,Ve,h),T(mo,Ve,null),a(Ve,Mt),a(Ve,Uo),a(Ve,ko),a(Ve,Rt),a(Ve,jt),a(Ve,wo),a(Ve,Ie),T(dt,Ve,null),a(Ve,vo),a(Ve,Oe),T($o,Oe,null),a(Oe,Fo),a(Oe,Ct),a(Oe,kt),T(to,Oe,null),a(Oe,ho),T(Ne,Oe,null),p(n,Y,h),T(wt,n,h),p(n,fo,h),p(n,_e,h),T(No,_e,null),a(_e,oo),a(_e,Gt),a(_e,Ao),a(_e,tt),a(_e,Ge),a(_e,ot),a(_e,Lo),T(Jt,_e,null),a(_e,un),a(_e,Ce),T(Xe,Ce,null),a(Ce,go),a(Ce,Xt),a(Ce,hn),T(Je,Ce,null),a(Ce,ct),T(no,Ce,null),a(Ce,vt),T(so,Ce,null),p(n,ao,h),T(nt,n,h),p(n,he,h),p(n,A,h),T(ro,A,null),a(A,Pt),a(A,Ro),a(A,zt),a(A,Wo),a(A,Io),a(A,qo),a(A,Ho),T(_o,A,null),a(A,jo),a(A,qe),T(Co,qe,null),a(qe,pt),a(qe,ye),a(qe,Po),T(Ut,qe,null),a(qe,fn),T(st,qe,null),a(qe,io),T(at,qe,null),Wt=!0},p(n,h){const fe={};h&2&&(fe.$$scope={dirty:h,ctx:n}),f.$set(fe);const I={};h&2&&(I.$$scope={dirty:h,ctx:n}),Pe.$set(I);const ne={};h&2&&(ne.$$scope={dirty:h,ctx:n}),ze.$set(ne);const Q={};h&2&&(Q.$$scope={dirty:h,ctx:n}),it.$set(Q);const O={};h&2&&(O.$$scope={dirty:h,ctx:n}),It.$set(O);const D={};h&2&&(D.$$scope={dirty:h,ctx:n}),Ke.$set(D);const se={};h&2&&(se.$$scope={dirty:h,ctx:n}),yt.$set(se);const B={};h&2&&(B.$$scope={dirty:h,ctx:n}),Qe.$set(B);const xe={};h&2&&(xe.$$scope={dirty:h,ctx:n}),Kt.$set(xe);const E={};h&2&&(E.$$scope={dirty:h,ctx:n}),oe.$set(E);const K={};h&2&&(K.$$scope={dirty:h,ctx:n}),Vt.$set(K);const ee={};h&2&&(ee.$$scope={dirty:h,ctx:n}),Tt.$set(ee);const pe={};h&2&&(pe.$$scope={dirty:h,ctx:n}),de.$set(pe);const Eo={};h&2&&(Eo.$$scope={dirty:h,ctx:n}),dt.$set(Eo);const wn={};h&2&&(wn.$$scope={dirty:h,ctx:n}),to.$set(wn);const Fn={};h&2&&(Fn.$$scope={dirty:h,ctx:n}),Ne.$set(Fn);const Tn={};h&2&&(Tn.$$scope={dirty:h,ctx:n}),Jt.$set(Tn);const Ln={};h&2&&(Ln.$$scope={dirty:h,ctx:n}),Je.$set(Ln);const Nn={};h&2&&(Nn.$$scope={dirty:h,ctx:n}),no.$set(Nn);const yo={};h&2&&(yo.$$scope={dirty:h,ctx:n}),so.$set(yo);const gn={};h&2&&(gn.$$scope={dirty:h,ctx:n}),_o.$set(gn);const xn={};h&2&&(xn.$$scope={dirty:h,ctx:n}),Ut.$set(xn);const Mn={};h&2&&(Mn.$$scope={dirty:h,ctx:n}),st.$set(Mn);const Rn={};h&2&&(Rn.$$scope={dirty:h,ctx:n}),at.$set(Rn)},i(n){Wt||(M(e.$$.fragment,n),M(s.$$.fragment,n),M(f.$$.fragment,n),M(ce.$$.fragment,n),M(Pe.$$.fragment,n),M(ze.$$.fragment,n),M(me.$$.fragment,n),M(we.$$.fragment,n),M(z.$$.fragment,n),M(it.$$.fragment,n),M(It.$$.fragment,n),M(re.$$.fragment,n),M(ve.$$.fragment,n),M(Ke.$$.fragment,n),M(et.$$.fragment,n),M(yt.$$.fragment,n),M(Qe.$$.fragment,n),M(Kt.$$.fragment,n),M(zo.$$.fragment,n),M(Nt.$$.fragment,n),M(oe.$$.fragment,n),M(He.$$.fragment,n),M(Vt.$$.fragment,n),M(Tt.$$.fragment,n),M(de.$$.fragment,n),M(po.$$.fragment,n),M(mo.$$.fragment,n),M(dt.$$.fragment,n),M($o.$$.fragment,n),M(to.$$.fragment,n),M(Ne.$$.fragment,n),M(wt.$$.fragment,n),M(No.$$.fragment,n),M(Jt.$$.fragment,n),M(Xe.$$.fragment,n),M(Je.$$.fragment,n),M(no.$$.fragment,n),M(so.$$.fragment,n),M(nt.$$.fragment,n),M(ro.$$.fragment,n),M(_o.$$.fragment,n),M(Co.$$.fragment,n),M(Ut.$$.fragment,n),M(st.$$.fragment,n),M(at.$$.fragment,n),Wt=!0)},o(n){k(e.$$.fragment,n),k(s.$$.fragment,n),k(f.$$.fragment,n),k(ce.$$.fragment,n),k(Pe.$$.fragment,n),k(ze.$$.fragment,n),k(me.$$.fragment,n),k(we.$$.fragment,n),k(z.$$.fragment,n),k(it.$$.fragment,n),k(It.$$.fragment,n),k(re.$$.fragment,n),k(ve.$$.fragment,n),k(Ke.$$.fragment,n),k(et.$$.fragment,n),k(yt.$$.fragment,n),k(Qe.$$.fragment,n),k(Kt.$$.fragment,n),k(zo.$$.fragment,n),k(Nt.$$.fragment,n),k(oe.$$.fragment,n),k(He.$$.fragment,n),k(Vt.$$.fragment,n),k(Tt.$$.fragment,n),k(de.$$.fragment,n),k(po.$$.fragment,n),k(mo.$$.fragment,n),k(dt.$$.fragment,n),k($o.$$.fragment,n),k(to.$$.fragment,n),k(Ne.$$.fragment,n),k(wt.$$.fragment,n),k(No.$$.fragment,n),k(Jt.$$.fragment,n),k(Xe.$$.fragment,n),k(Je.$$.fragment,n),k(no.$$.fragment,n),k(so.$$.fragment,n),k(nt.$$.fragment,n),k(ro.$$.fragment,n),k(_o.$$.fragment,n),k(Co.$$.fragment,n),k(Ut.$$.fragment,n),k(st.$$.fragment,n),k(at.$$.fragment,n),Wt=!1},d(n){n&&(l(m),l(t),l(rt),l(ht),l(je),l(Dt),l(lo),l(X),l(Ft),l(Go),l(q),l(co),l(Lt),l(Ve),l(Y),l(fo),l(_e),l(ao),l(he),l(A)),w(e,n),w(s),w(f),w(ce),w(Pe),w(ze),w(me,n),w(we),w(z),w(it),w(It),w(re,n),w(ve),w(Ke),w(et),w(yt),w(Qe),w(Kt),w(zo,n),w(Nt),w(oe),w(He),w(Vt),w(Tt),w(de),w(po,n),w(mo),w(dt),w($o),w(to),w(Ne),w(wt,n),w(No),w(Jt),w(Xe),w(Je),w(no),w(so),w(nt,n),w(ro),w(_o),w(Co),w(Ut),w(st),w(at)}}}function Cs($){let e,m;return e=new Pn({props:{$$slots:{default:[js]},$$scope:{ctx:$}}}),{c(){y(e.$$.fragment)},l(t){b(e.$$.fragment,t)},m(t,s){T(e,t,s),m=!0},p(t,s){const g={};s&2&&(g.$$scope={dirty:s,ctx:t}),e.$set(g)},i(t){m||(M(e.$$.fragment,t),m=!0)},o(t){k(e.$$.fragment,t),m=!1},d(t){w(e,t)}}}function Js($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function Ps($){let e,m="Example:",t,s,g;return s=new Me({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`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function zs($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function Us($){let e,m="Example:",t,s,g;return s=new Me({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>]`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function Ws($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function Zs($){let e,m="Example:",t,s,g;return s=new Me({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`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function Is($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function qs($){let e,m="Example:",t,s,g;return s=new Me({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`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function Bs($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function Hs($){let e,m="Example:",t,s,g;return s=new Me({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`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function Vs($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function Gs($){let e,m="Example:",t,s,g;return s=new Me({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`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function Xs($){let e,m=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){e=d("p"),e.innerHTML=m},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=m)},m(t,s){p(t,e,s)},p:P,d(t){t&&l(e)}}}function As($){let e,m="Example:",t,s,g;return s=new Me({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`,wrap:!1}}),{c(){e=d("p"),e.textContent=m,t=r(),y(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=m),t=i(o),b(s.$$.fragment,o)},m(o,_){p(o,e,_),p(o,t,_),T(s,o,_),g=!0},p:P,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),w(s,o)}}}function Qs($){let e,m,t,s,g,o,_="The bare RoBERTa-PreLayerNorm Model transformer outputting raw hidden-states without any specific head on top.",H,C,R=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`,V,J,j=`This model is also a
<a href="https://flax.readthedocs.io/en/latest/api_reference/flax.linen/module.html" rel="nofollow">flax.linen.Module</a> subclass. Use it as
a regular Flax linen Module and refer to the Flax documentation for all matter related to general usage and
behavior.`,G,f,N="Finally, this model supports inherent JAX features such as:",Re,ce,Vo='<li><a href="https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit" rel="nofollow">Just-In-Time (JIT) compilation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation" rel="nofollow">Automatic Differentiation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap" rel="nofollow">Vectorization</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap" rel="nofollow">Parallelization</a></li>',mt,ae,ut,Pe,ke,ze="The <code>FlaxRobertaPreLayerNormPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",rt,me,ht,je,we,Be,te,z,ge,ft,S,Zt=`RobertaPreLayerNorm Model with a language modeling head on top (a linear layer on top of the hidden-states output)
e.g for autoregressive tasks.`,it,Ue,It=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`,Dt,re,lo=`This model is also a
<a href="https://flax.readthedocs.io/en/latest/api_reference/flax.linen/module.html" rel="nofollow">flax.linen.Module</a> subclass. Use it as
a regular Flax linen Module and refer to the Flax documentation for all matter related to general usage and
behavior.`,X,ve,qt="Finally, this model supports inherent JAX features such as:",gt,ue,_t='<li><a href="https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit" rel="nofollow">Just-In-Time (JIT) compilation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation" rel="nofollow">Automatic Differentiation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap" rel="nofollow">Vectorization</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap" rel="nofollow">Parallelization</a></li>',F,L,$e,Bt,$t,dn="The <code>FlaxRobertaPreLayerNormPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",Ke,Ht,Fe,et,We,Ae,So,ie,yt,Yo,Qe,_n="RoBERTa-PreLayerNorm Model with a <code>language modeling</code> head on top.",Kt,Ft,zo=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`,Go,q,Nt=`This model is also a
<a href="https://flax.readthedocs.io/en/latest/api_reference/flax.linen/module.html" rel="nofollow">flax.linen.Module</a> subclass. Use it as
a regular Flax linen Module and refer to the Flax documentation for all matter related to general usage and
behavior.`,Oo,lt,kn="Finally, this model supports inherent JAX features such as:",Do,Ee,yn='<li><a href="https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit" rel="nofollow">Just-In-Time (JIT) compilation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation" rel="nofollow">Automatic Differentiation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap" rel="nofollow">Vectorization</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap" rel="nofollow">Parallelization</a></li>',eo,Ze,xt,Xo,oe,bo="The <code>FlaxRobertaPreLayerNormPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",Se,He,cn,bt,To,Mo,Vt,le,Tt,Ko,de,co=`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.`,po,Lt,Ve=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`,mo,Mt,Uo=`This model is also a
<a href="https://flax.readthedocs.io/en/latest/api_reference/flax.linen/module.html" rel="nofollow">flax.linen.Module</a> subclass. Use it as
a regular Flax linen Module and refer to the Flax documentation for all matter related to general usage and
behavior.`,uo,ko,Rt="Finally, this model supports inherent JAX features such as:",en,jt,wo='<li><a href="https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit" rel="nofollow">Just-In-Time (JIT) compilation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation" rel="nofollow">Automatic Differentiation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap" rel="nofollow">Vectorization</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap" rel="nofollow">Parallelization</a></li>',Ye,Ie,dt,vo,Oe,$o="The <code>FlaxRobertaPreLayerNormPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",Fo,Ct,pn,kt,to,ho,Ne,Y,wt,fo,_e,No=`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.`,oo,Gt,xo=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`,Ao,tt,mn=`This model is also a
<a href="https://flax.readthedocs.io/en/latest/api_reference/flax.linen/module.html" rel="nofollow">flax.linen.Module</a> subclass. Use it as
a regular Flax linen Module and refer to the Flax documentation for all matter related to general usage and
behavior.`,Ge,ot,bn="Finally, this model supports inherent JAX features such as:",Lo,Jt,un='<li><a href="https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit" rel="nofollow">Just-In-Time (JIT) compilation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation" rel="nofollow">Automatic Differentiation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap" rel="nofollow">Vectorization</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap" rel="nofollow">Parallelization</a></li>',Ce,Xe,go,Xt,Qo,hn="The <code>FlaxRobertaPreLayerNormPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",Je,ct,no,vt,so,ao,nt,he,A,ro,Pt,Ro=`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.`,De,zt,Wo=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`,Zo,Io,qo=`This model is also a
<a href="https://flax.readthedocs.io/en/latest/api_reference/flax.linen/module.html" rel="nofollow">flax.linen.Module</a> subclass. Use it as
a regular Flax linen Module and refer to the Flax documentation for all matter related to general usage and
behavior.`,Bo,Ho,_o="Finally, this model supports inherent JAX features such as:",jo,qe,Co='<li><a href="https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit" rel="nofollow">Just-In-Time (JIT) compilation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation" rel="nofollow">Automatic Differentiation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap" rel="nofollow">Vectorization</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap" rel="nofollow">Parallelization</a></li>',pt,ye,Jo,Po,Ut,fn="The <code>FlaxRobertaPreLayerNormPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",st,io,at,Wt,n,h,fe,I,ne,Q,O,D=`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 <code>span start logits</code> and <code>span end logits</code>).`,se,B,xe=`This model inherits from <a href="/docs/transformers/pr_31198/en/main_classes/model#transformers.FlaxPreTrainedModel">FlaxPreTrainedModel</a>. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`,E,K,ee=`This model is also a
<a href="https://flax.readthedocs.io/en/latest/api_reference/flax.linen/module.html" rel="nofollow">flax.linen.Module</a> subclass. Use it as
a regular Flax linen Module and refer to the Flax documentation for all matter related to general usage and
behavior.`,pe,Eo,wn="Finally, this model supports inherent JAX features such as:",Fn,Tn,Ln='<li><a href="https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit" rel="nofollow">Just-In-Time (JIT) compilation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation" rel="nofollow">Automatic Differentiation</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap" rel="nofollow">Vectorization</a></li> <li><a href="https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap" rel="nofollow">Parallelization</a></li>',Nn,yo,gn,xn,Mn,Rn="The <code>FlaxRobertaPreLayerNormPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",Cn,vn,Jn,$n,jn;return e=new Le({props:{title:"FlaxRobertaPreLayerNormModel",local:"transformers.FlaxRobertaPreLayerNormModel",headingTag:"h2"}}),s=new Z({props:{name:"class transformers.FlaxRobertaPreLayerNormModel",anchor:"transformers.FlaxRobertaPreLayerNormModel",parameters:[{name:"config",val:": RobertaPreLayerNormConfig"},{name:"input_shape",val:": 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/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L992"}}),ut=new Z({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:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31198/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L821",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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>) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),me=new be({props:{$$slots:{default:[Js]},$$scope:{ctx:$}}}),je=new Te({props:{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.example",$$slots:{default:[Ps]},$$scope:{ctx:$}}}),Be=new Le({props:{title:"FlaxRobertaPreLayerNormForCausalLM",local:"transformers.FlaxRobertaPreLayerNormForCausalLM",headingTag:"h2"}}),ge=new Z({props:{name:"class transformers.FlaxRobertaPreLayerNormForCausalLM",anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM",parameters:[{name:"config",val:": RobertaPreLayerNormConfig"},{name:"input_shape",val:": 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/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1472"}}),$e=new Z({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:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31198/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L821",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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>) — 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>) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ht=new be({props:{$$slots:{default:[zs]},$$scope:{ctx:$}}}),et=new Te({props:{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.example",$$slots:{default:[Us]},$$scope:{ctx:$}}}),Ae=new Le({props:{title:"FlaxRobertaPreLayerNormForMaskedLM",local:"transformers.FlaxRobertaPreLayerNormForMaskedLM",headingTag:"h2"}}),yt=new Z({props:{name:"class transformers.FlaxRobertaPreLayerNormForMaskedLM",anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM",parameters:[{name:"config",val:": RobertaPreLayerNormConfig"},{name:"input_shape",val:": 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/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1070"}}),xt=new Z({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:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31198/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L821",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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>) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),He=new be({props:{$$slots:{default:[Ws]},$$scope:{ctx:$}}}),bt=new Te({props:{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__.example",$$slots:{default:[Zs]},$$scope:{ctx:$}}}),Mo=new Le({props:{title:"FlaxRobertaPreLayerNormForSequenceClassification",local:"transformers.FlaxRobertaPreLayerNormForSequenceClassification",headingTag:"h2"}}),Tt=new Z({props:{name:"class transformers.FlaxRobertaPreLayerNormForSequenceClassification",anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification",parameters:[{name:"config",val:": RobertaPreLayerNormConfig"},{name:"input_shape",val:": 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/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1140"}}),dt=new Z({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:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31198/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L821",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ct=new be({props:{$$slots:{default:[Is]},$$scope:{ctx:$}}}),kt=new Te({props:{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.example",$$slots:{default:[qs]},$$scope:{ctx:$}}}),ho=new Le({props:{title:"FlaxRobertaPreLayerNormForMultipleChoice",local:"transformers.FlaxRobertaPreLayerNormForMultipleChoice",headingTag:"h2"}}),wt=new Z({props:{name:"class transformers.FlaxRobertaPreLayerNormForMultipleChoice",anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice",parameters:[{name:"config",val:": RobertaPreLayerNormConfig"},{name:"input_shape",val:": 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/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1222"}}),go=new Z({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:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31198/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L821",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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>) — <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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ct=new be({props:{$$slots:{default:[Bs]},$$scope:{ctx:$}}}),vt=new Te({props:{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.example",$$slots:{default:[Hs]},$$scope:{ctx:$}}}),ao=new Le({props:{title:"FlaxRobertaPreLayerNormForTokenClassification",local:"transformers.FlaxRobertaPreLayerNormForTokenClassification",headingTag:"h2"}}),A=new Z({props:{name:"class transformers.FlaxRobertaPreLayerNormForTokenClassification",anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification",parameters:[{name:"config",val:": RobertaPreLayerNormConfig"},{name:"input_shape",val:": 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/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1306"}}),Jo=new Z({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:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31198/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L821",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),io=new be({props:{$$slots:{default:[Vs]},$$scope:{ctx:$}}}),Wt=new Te({props:{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__.example",$$slots:{default:[Gs]},$$scope:{ctx:$}}}),h=new Le({props:{title:"FlaxRobertaPreLayerNormForQuestionAnswering",local:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering",headingTag:"h2"}}),ne=new Z({props:{name:"class transformers.FlaxRobertaPreLayerNormForQuestionAnswering",anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering",parameters:[{name:"config",val:": RobertaPreLayerNormConfig"},{name:"input_shape",val:": 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/pr_31198/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/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1384"}}),gn=new Z({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:": Optional = None"},{name:"output_hidden_states",val:": Optional = None"},{name:"return_dict",val:": Optional = 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/pr_31198/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/pr_31198/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/pr_31198/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/vr_31198/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L821",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/pr_31198/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/pr_31198/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>) — 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>) — 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>) — 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>) — 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:`<script context="module">export const metadata = 'undefined';<\/script>


<p><a
  href="/docs/transformers/pr_31198/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),vn=new be({props:{$$slots:{default:[Xs]},$$scope:{ctx:$}}}),$n=new Te({props:{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.example",$$slots:{default:[As]},$$scope:{ctx:$}}}),{c(){y(e.$$.fragment),m=r(),t=d("div"),y(s.$$.fragment),g=r(),o=d("p"),o.textContent=_,H=r(),C=d("p"),C.innerHTML=R,V=r(),J=d("p"),J.innerHTML=j,G=r(),f=d("p"),f.textContent=N,Re=r(),ce=d("ul"),ce.innerHTML=Vo,mt=r(),ae=d("div"),y(ut.$$.fragment),Pe=r(),ke=d("p"),ke.innerHTML=ze,rt=r(),y(me.$$.fragment),ht=r(),y(je.$$.fragment),we=r(),y(Be.$$.fragment),te=r(),z=d("div"),y(ge.$$.fragment),ft=r(),S=d("p"),S.textContent=Zt,it=r(),Ue=d("p"),Ue.innerHTML=It,Dt=r(),re=d("p"),re.innerHTML=lo,X=r(),ve=d("p"),ve.textContent=qt,gt=r(),ue=d("ul"),ue.innerHTML=_t,F=r(),L=d("div"),y($e.$$.fragment),Bt=r(),$t=d("p"),$t.innerHTML=dn,Ke=r(),y(Ht.$$.fragment),Fe=r(),y(et.$$.fragment),We=r(),y(Ae.$$.fragment),So=r(),ie=d("div"),y(yt.$$.fragment),Yo=r(),Qe=d("p"),Qe.innerHTML=_n,Kt=r(),Ft=d("p"),Ft.innerHTML=zo,Go=r(),q=d("p"),q.innerHTML=Nt,Oo=r(),lt=d("p"),lt.textContent=kn,Do=r(),Ee=d("ul"),Ee.innerHTML=yn,eo=r(),Ze=d("div"),y(xt.$$.fragment),Xo=r(),oe=d("p"),oe.innerHTML=bo,Se=r(),y(He.$$.fragment),cn=r(),y(bt.$$.fragment),To=r(),y(Mo.$$.fragment),Vt=r(),le=d("div"),y(Tt.$$.fragment),Ko=r(),de=d("p"),de.textContent=co,po=r(),Lt=d("p"),Lt.innerHTML=Ve,mo=r(),Mt=d("p"),Mt.innerHTML=Uo,uo=r(),ko=d("p"),ko.textContent=Rt,en=r(),jt=d("ul"),jt.innerHTML=wo,Ye=r(),Ie=d("div"),y(dt.$$.fragment),vo=r(),Oe=d("p"),Oe.innerHTML=$o,Fo=r(),y(Ct.$$.fragment),pn=r(),y(kt.$$.fragment),to=r(),y(ho.$$.fragment),Ne=r(),Y=d("div"),y(wt.$$.fragment),fo=r(),_e=d("p"),_e.textContent=No,oo=r(),Gt=d("p"),Gt.innerHTML=xo,Ao=r(),tt=d("p"),tt.innerHTML=mn,Ge=r(),ot=d("p"),ot.textContent=bn,Lo=r(),Jt=d("ul"),Jt.innerHTML=un,Ce=r(),Xe=d("div"),y(go.$$.fragment),Xt=r(),Qo=d("p"),Qo.innerHTML=hn,Je=r(),y(ct.$$.fragment),no=r(),y(vt.$$.fragment),so=r(),y(ao.$$.fragment),nt=r(),he=d("div"),y(A.$$.fragment),ro=r(),Pt=d("p"),Pt.textContent=Ro,De=r(),zt=d("p"),zt.innerHTML=Wo,Zo=r(),Io=d("p"),Io.innerHTML=qo,Bo=r(),Ho=d("p"),Ho.textContent=_o,jo=r(),qe=d("ul"),qe.innerHTML=Co,pt=r(),ye=d("div"),y(Jo.$$.fragment),Po=r(),Ut=d("p"),Ut.innerHTML=fn,st=r(),y(io.$$.fragment),at=r(),y(Wt.$$.fragment),n=r(),y(h.$$.fragment),fe=r(),I=d("div"),y(ne.$$.fragment),Q=r(),O=d("p"),O.innerHTML=D,se=r(),B=d("p"),B.innerHTML=xe,E=r(),K=d("p"),K.innerHTML=ee,pe=r(),Eo=d("p"),Eo.textContent=wn,Fn=r(),Tn=d("ul"),Tn.innerHTML=Ln,Nn=r(),yo=d("div"),y(gn.$$.fragment),xn=r(),Mn=d("p"),Mn.innerHTML=Rn,Cn=r(),y(vn.$$.fragment),Jn=r(),y($n.$$.fragment),this.h()},l(v){b(e.$$.fragment,v),m=i(v),t=c(v,"DIV",{class:!0});var x=U(t);b(s.$$.fragment,x),g=i(x),o=c(x,"P",{"data-svelte-h":!0}),u(o)!=="svelte-33ezil"&&(o.textContent=_),H=i(x),C=c(x,"P",{"data-svelte-h":!0}),u(C)!=="svelte-uacdrb"&&(C.innerHTML=R),V=i(x),J=c(x,"P",{"data-svelte-h":!0}),u(J)!=="svelte-10nfsf3"&&(J.innerHTML=j),G=i(x),f=c(x,"P",{"data-svelte-h":!0}),u(f)!=="svelte-1pplc4a"&&(f.textContent=N),Re=i(x),ce=c(x,"UL",{"data-svelte-h":!0}),u(ce)!=="svelte-1w7z84m"&&(ce.innerHTML=Vo),mt=i(x),ae=c(x,"DIV",{class:!0});var tn=U(ae);b(ut.$$.fragment,tn),Pe=i(tn),ke=c(tn,"P",{"data-svelte-h":!0}),u(ke)!=="svelte-1hfv2ik"&&(ke.innerHTML=ze),rt=i(tn),b(me.$$.fragment,tn),ht=i(tn),b(je.$$.fragment,tn),tn.forEach(l),x.forEach(l),we=i(v),b(Be.$$.fragment,v),te=i(v),z=c(v,"DIV",{class:!0});var At=U(z);b(ge.$$.fragment,At),ft=i(At),S=c(At,"P",{"data-svelte-h":!0}),u(S)!=="svelte-1fbzx51"&&(S.textContent=Zt),it=i(At),Ue=c(At,"P",{"data-svelte-h":!0}),u(Ue)!=="svelte-uacdrb"&&(Ue.innerHTML=It),Dt=i(At),re=c(At,"P",{"data-svelte-h":!0}),u(re)!=="svelte-10nfsf3"&&(re.innerHTML=lo),X=i(At),ve=c(At,"P",{"data-svelte-h":!0}),u(ve)!=="svelte-1pplc4a"&&(ve.textContent=qt),gt=i(At),ue=c(At,"UL",{"data-svelte-h":!0}),u(ue)!=="svelte-1w7z84m"&&(ue.innerHTML=_t),F=i(At),L=c(At,"DIV",{class:!0});var on=U(L);b($e.$$.fragment,on),Bt=i(on),$t=c(on,"P",{"data-svelte-h":!0}),u($t)!=="svelte-1hfv2ik"&&($t.innerHTML=dn),Ke=i(on),b(Ht.$$.fragment,on),Fe=i(on),b(et.$$.fragment,on),on.forEach(l),At.forEach(l),We=i(v),b(Ae.$$.fragment,v),So=i(v),ie=c(v,"DIV",{class:!0});var Qt=U(ie);b(yt.$$.fragment,Qt),Yo=i(Qt),Qe=c(Qt,"P",{"data-svelte-h":!0}),u(Qe)!=="svelte-8dtlt4"&&(Qe.innerHTML=_n),Kt=i(Qt),Ft=c(Qt,"P",{"data-svelte-h":!0}),u(Ft)!=="svelte-uacdrb"&&(Ft.innerHTML=zo),Go=i(Qt),q=c(Qt,"P",{"data-svelte-h":!0}),u(q)!=="svelte-10nfsf3"&&(q.innerHTML=Nt),Oo=i(Qt),lt=c(Qt,"P",{"data-svelte-h":!0}),u(lt)!=="svelte-1pplc4a"&&(lt.textContent=kn),Do=i(Qt),Ee=c(Qt,"UL",{"data-svelte-h":!0}),u(Ee)!=="svelte-1w7z84m"&&(Ee.innerHTML=yn),eo=i(Qt),Ze=c(Qt,"DIV",{class:!0});var nn=U(Ze);b(xt.$$.fragment,nn),Xo=i(nn),oe=c(nn,"P",{"data-svelte-h":!0}),u(oe)!=="svelte-1hfv2ik"&&(oe.innerHTML=bo),Se=i(nn),b(He.$$.fragment,nn),cn=i(nn),b(bt.$$.fragment,nn),nn.forEach(l),Qt.forEach(l),To=i(v),b(Mo.$$.fragment,v),Vt=i(v),le=c(v,"DIV",{class:!0});var Et=U(le);b(Tt.$$.fragment,Et),Ko=i(Et),de=c(Et,"P",{"data-svelte-h":!0}),u(de)!=="svelte-1xx59cl"&&(de.textContent=co),po=i(Et),Lt=c(Et,"P",{"data-svelte-h":!0}),u(Lt)!=="svelte-uacdrb"&&(Lt.innerHTML=Ve),mo=i(Et),Mt=c(Et,"P",{"data-svelte-h":!0}),u(Mt)!=="svelte-10nfsf3"&&(Mt.innerHTML=Uo),uo=i(Et),ko=c(Et,"P",{"data-svelte-h":!0}),u(ko)!=="svelte-1pplc4a"&&(ko.textContent=Rt),en=i(Et),jt=c(Et,"UL",{"data-svelte-h":!0}),u(jt)!=="svelte-1w7z84m"&&(jt.innerHTML=wo),Ye=i(Et),Ie=c(Et,"DIV",{class:!0});var sn=U(Ie);b(dt.$$.fragment,sn),vo=i(sn),Oe=c(sn,"P",{"data-svelte-h":!0}),u(Oe)!=="svelte-1hfv2ik"&&(Oe.innerHTML=$o),Fo=i(sn),b(Ct.$$.fragment,sn),pn=i(sn),b(kt.$$.fragment,sn),sn.forEach(l),Et.forEach(l),to=i(v),b(ho.$$.fragment,v),Ne=i(v),Y=c(v,"DIV",{class:!0});var St=U(Y);b(wt.$$.fragment,St),fo=i(St),_e=c(St,"P",{"data-svelte-h":!0}),u(_e)!=="svelte-1t8wc3p"&&(_e.textContent=No),oo=i(St),Gt=c(St,"P",{"data-svelte-h":!0}),u(Gt)!=="svelte-uacdrb"&&(Gt.innerHTML=xo),Ao=i(St),tt=c(St,"P",{"data-svelte-h":!0}),u(tt)!=="svelte-10nfsf3"&&(tt.innerHTML=mn),Ge=i(St),ot=c(St,"P",{"data-svelte-h":!0}),u(ot)!=="svelte-1pplc4a"&&(ot.textContent=bn),Lo=i(St),Jt=c(St,"UL",{"data-svelte-h":!0}),u(Jt)!=="svelte-1w7z84m"&&(Jt.innerHTML=un),Ce=i(St),Xe=c(St,"DIV",{class:!0});var an=U(Xe);b(go.$$.fragment,an),Xt=i(an),Qo=c(an,"P",{"data-svelte-h":!0}),u(Qo)!=="svelte-1hfv2ik"&&(Qo.innerHTML=hn),Je=i(an),b(ct.$$.fragment,an),no=i(an),b(vt.$$.fragment,an),an.forEach(l),St.forEach(l),so=i(v),b(ao.$$.fragment,v),nt=i(v),he=c(v,"DIV",{class:!0});var Yt=U(he);b(A.$$.fragment,Yt),ro=i(Yt),Pt=c(Yt,"P",{"data-svelte-h":!0}),u(Pt)!=="svelte-kne6bs"&&(Pt.textContent=Ro),De=i(Yt),zt=c(Yt,"P",{"data-svelte-h":!0}),u(zt)!=="svelte-uacdrb"&&(zt.innerHTML=Wo),Zo=i(Yt),Io=c(Yt,"P",{"data-svelte-h":!0}),u(Io)!=="svelte-10nfsf3"&&(Io.innerHTML=qo),Bo=i(Yt),Ho=c(Yt,"P",{"data-svelte-h":!0}),u(Ho)!=="svelte-1pplc4a"&&(Ho.textContent=_o),jo=i(Yt),qe=c(Yt,"UL",{"data-svelte-h":!0}),u(qe)!=="svelte-1w7z84m"&&(qe.innerHTML=Co),pt=i(Yt),ye=c(Yt,"DIV",{class:!0});var rn=U(ye);b(Jo.$$.fragment,rn),Po=i(rn),Ut=c(rn,"P",{"data-svelte-h":!0}),u(Ut)!=="svelte-1hfv2ik"&&(Ut.innerHTML=fn),st=i(rn),b(io.$$.fragment,rn),at=i(rn),b(Wt.$$.fragment,rn),rn.forEach(l),Yt.forEach(l),n=i(v),b(h.$$.fragment,v),fe=i(v),I=c(v,"DIV",{class:!0});var Ot=U(I);b(ne.$$.fragment,Ot),Q=i(Ot),O=c(Ot,"P",{"data-svelte-h":!0}),u(O)!=="svelte-1xkbi4i"&&(O.innerHTML=D),se=i(Ot),B=c(Ot,"P",{"data-svelte-h":!0}),u(B)!=="svelte-uacdrb"&&(B.innerHTML=xe),E=i(Ot),K=c(Ot,"P",{"data-svelte-h":!0}),u(K)!=="svelte-10nfsf3"&&(K.innerHTML=ee),pe=i(Ot),Eo=c(Ot,"P",{"data-svelte-h":!0}),u(Eo)!=="svelte-1pplc4a"&&(Eo.textContent=wn),Fn=i(Ot),Tn=c(Ot,"UL",{"data-svelte-h":!0}),u(Tn)!=="svelte-1w7z84m"&&(Tn.innerHTML=Ln),Nn=i(Ot),yo=c(Ot,"DIV",{class:!0});var ln=U(yo);b(gn.$$.fragment,ln),xn=i(ln),Mn=c(ln,"P",{"data-svelte-h":!0}),u(Mn)!=="svelte-1hfv2ik"&&(Mn.innerHTML=Rn),Cn=i(ln),b(vn.$$.fragment,ln),Jn=i(ln),b($n.$$.fragment,ln),ln.forEach(l),Ot.forEach(l),this.h()},h(){W(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(Ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(Ie,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(Xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(yo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),W(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(v,x){T(e,v,x),p(v,m,x),p(v,t,x),T(s,t,null),a(t,g),a(t,o),a(t,H),a(t,C),a(t,V),a(t,J),a(t,G),a(t,f),a(t,Re),a(t,ce),a(t,mt),a(t,ae),T(ut,ae,null),a(ae,Pe),a(ae,ke),a(ae,rt),T(me,ae,null),a(ae,ht),T(je,ae,null),p(v,we,x),T(Be,v,x),p(v,te,x),p(v,z,x),T(ge,z,null),a(z,ft),a(z,S),a(z,it),a(z,Ue),a(z,Dt),a(z,re),a(z,X),a(z,ve),a(z,gt),a(z,ue),a(z,F),a(z,L),T($e,L,null),a(L,Bt),a(L,$t),a(L,Ke),T(Ht,L,null),a(L,Fe),T(et,L,null),p(v,We,x),T(Ae,v,x),p(v,So,x),p(v,ie,x),T(yt,ie,null),a(ie,Yo),a(ie,Qe),a(ie,Kt),a(ie,Ft),a(ie,Go),a(ie,q),a(ie,Oo),a(ie,lt),a(ie,Do),a(ie,Ee),a(ie,eo),a(ie,Ze),T(xt,Ze,null),a(Ze,Xo),a(Ze,oe),a(Ze,Se),T(He,Ze,null),a(Ze,cn),T(bt,Ze,null),p(v,To,x),T(Mo,v,x),p(v,Vt,x),p(v,le,x),T(Tt,le,null),a(le,Ko),a(le,de),a(le,po),a(le,Lt),a(le,mo),a(le,Mt),a(le,uo),a(le,ko),a(le,en),a(le,jt),a(le,Ye),a(le,Ie),T(dt,Ie,null),a(Ie,vo),a(Ie,Oe),a(Ie,Fo),T(Ct,Ie,null),a(Ie,pn),T(kt,Ie,null),p(v,to,x),T(ho,v,x),p(v,Ne,x),p(v,Y,x),T(wt,Y,null),a(Y,fo),a(Y,_e),a(Y,oo),a(Y,Gt),a(Y,Ao),a(Y,tt),a(Y,Ge),a(Y,ot),a(Y,Lo),a(Y,Jt),a(Y,Ce),a(Y,Xe),T(go,Xe,null),a(Xe,Xt),a(Xe,Qo),a(Xe,Je),T(ct,Xe,null),a(Xe,no),T(vt,Xe,null),p(v,so,x),T(ao,v,x),p(v,nt,x),p(v,he,x),T(A,he,null),a(he,ro),a(he,Pt),a(he,De),a(he,zt),a(he,Zo),a(he,Io),a(he,Bo),a(he,Ho),a(he,jo),a(he,qe),a(he,pt),a(he,ye),T(Jo,ye,null),a(ye,Po),a(ye,Ut),a(ye,st),T(io,ye,null),a(ye,at),T(Wt,ye,null),p(v,n,x),T(h,v,x),p(v,fe,x),p(v,I,x),T(ne,I,null),a(I,Q),a(I,O),a(I,se),a(I,B),a(I,E),a(I,K),a(I,pe),a(I,Eo),a(I,Fn),a(I,Tn),a(I,Nn),a(I,yo),T(gn,yo,null),a(yo,xn),a(yo,Mn),a(yo,Cn),T(vn,yo,null),a(yo,Jn),T($n,yo,null),jn=!0},p(v,x){const tn={};x&2&&(tn.$$scope={dirty:x,ctx:v}),me.$set(tn);const At={};x&2&&(At.$$scope={dirty:x,ctx:v}),je.$set(At);const on={};x&2&&(on.$$scope={dirty:x,ctx:v}),Ht.$set(on);const Qt={};x&2&&(Qt.$$scope={dirty:x,ctx:v}),et.$set(Qt);const nn={};x&2&&(nn.$$scope={dirty:x,ctx:v}),He.$set(nn);const Et={};x&2&&(Et.$$scope={dirty:x,ctx:v}),bt.$set(Et);const sn={};x&2&&(sn.$$scope={dirty:x,ctx:v}),Ct.$set(sn);const St={};x&2&&(St.$$scope={dirty:x,ctx:v}),kt.$set(St);const an={};x&2&&(an.$$scope={dirty:x,ctx:v}),ct.$set(an);const Yt={};x&2&&(Yt.$$scope={dirty:x,ctx:v}),vt.$set(Yt);const rn={};x&2&&(rn.$$scope={dirty:x,ctx:v}),io.$set(rn);const Ot={};x&2&&(Ot.$$scope={dirty:x,ctx:v}),Wt.$set(Ot);const ln={};x&2&&(ln.$$scope={dirty:x,ctx:v}),vn.$set(ln);const zn={};x&2&&(zn.$$scope={dirty:x,ctx:v}),$n.$set(zn)},i(v){jn||(M(e.$$.fragment,v),M(s.$$.fragment,v),M(ut.$$.fragment,v),M(me.$$.fragment,v),M(je.$$.fragment,v),M(Be.$$.fragment,v),M(ge.$$.fragment,v),M($e.$$.fragment,v),M(Ht.$$.fragment,v),M(et.$$.fragment,v),M(Ae.$$.fragment,v),M(yt.$$.fragment,v),M(xt.$$.fragment,v),M(He.$$.fragment,v),M(bt.$$.fragment,v),M(Mo.$$.fragment,v),M(Tt.$$.fragment,v),M(dt.$$.fragment,v),M(Ct.$$.fragment,v),M(kt.$$.fragment,v),M(ho.$$.fragment,v),M(wt.$$.fragment,v),M(go.$$.fragment,v),M(ct.$$.fragment,v),M(vt.$$.fragment,v),M(ao.$$.fragment,v),M(A.$$.fragment,v),M(Jo.$$.fragment,v),M(io.$$.fragment,v),M(Wt.$$.fragment,v),M(h.$$.fragment,v),M(ne.$$.fragment,v),M(gn.$$.fragment,v),M(vn.$$.fragment,v),M($n.$$.fragment,v),jn=!0)},o(v){k(e.$$.fragment,v),k(s.$$.fragment,v),k(ut.$$.fragment,v),k(me.$$.fragment,v),k(je.$$.fragment,v),k(Be.$$.fragment,v),k(ge.$$.fragment,v),k($e.$$.fragment,v),k(Ht.$$.fragment,v),k(et.$$.fragment,v),k(Ae.$$.fragment,v),k(yt.$$.fragment,v),k(xt.$$.fragment,v),k(He.$$.fragment,v),k(bt.$$.fragment,v),k(Mo.$$.fragment,v),k(Tt.$$.fragment,v),k(dt.$$.fragment,v),k(Ct.$$.fragment,v),k(kt.$$.fragment,v),k(ho.$$.fragment,v),k(wt.$$.fragment,v),k(go.$$.fragment,v),k(ct.$$.fragment,v),k(vt.$$.fragment,v),k(ao.$$.fragment,v),k(A.$$.fragment,v),k(Jo.$$.fragment,v),k(io.$$.fragment,v),k(Wt.$$.fragment,v),k(h.$$.fragment,v),k(ne.$$.fragment,v),k(gn.$$.fragment,v),k(vn.$$.fragment,v),k($n.$$.fragment,v),jn=!1},d(v){v&&(l(m),l(t),l(we),l(te),l(z),l(We),l(So),l(ie),l(To),l(Vt),l(le),l(to),l(Ne),l(Y),l(so),l(nt),l(he),l(n),l(fe),l(I)),w(e,v),w(s),w(ut),w(me),w(je),w(Be,v),w(ge),w($e),w(Ht),w(et),w(Ae,v),w(yt),w(xt),w(He),w(bt),w(Mo,v),w(Tt),w(dt),w(Ct),w(kt),w(ho,v),w(wt),w(go),w(ct),w(vt),w(ao,v),w(A),w(Jo),w(io),w(Wt),w(h,v),w(ne),w(gn),w(vn),w($n)}}}function Es($){let e,m;return e=new Pn({props:{$$slots:{default:[Qs]},$$scope:{ctx:$}}}),{c(){y(e.$$.fragment)},l(t){b(e.$$.fragment,t)},m(t,s){T(e,t,s),m=!0},p(t,s){const g={};s&2&&(g.$$scope={dirty:s,ctx:t}),e.$set(g)},i(t){m||(M(e.$$.fragment,t),m=!0)},o(t){k(e.$$.fragment,t),m=!1},d(t){w(e,t)}}}function Ss($){let e,m,t,s,g,o,_,H,C,R=`The RoBERTa-PreLayerNorm model was proposed in <a href="https://arxiv.org/abs/1904.01038" rel="nofollow">fairseq: A Fast, Extensible Toolkit for Sequence Modeling</a> by Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan Ng, David Grangier, Michael Auli.
It is identical to using the <code>--encoder-normalize-before</code> flag in <a href="https://fairseq.readthedocs.io/" rel="nofollow">fairseq</a>.`,V,J,j="The abstract from the paper is the following:",G,f,N="<em>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.</em>",Re,ce,Vo=`This model was contributed by <a href="https://huggingface.co/andreasmadsen" rel="nofollow">andreasmaden</a>.
The original code can be found <a href="https://github.com/princeton-nlp/DinkyTrain" rel="nofollow">here</a>.`,mt,ae,ut,Pe,ke='<li>The implementation is the same as <a href="roberta">Roberta</a> except instead of using <em>Add and Norm</em> it does <em>Norm and Add</em>. <em>Add</em> and <em>Norm</em> refers to the Addition and LayerNormalization as described in <a href="https://arxiv.org/abs/1706.03762" rel="nofollow">Attention Is All You Need</a>.</li> <li>This is identical to using the <code>--encoder-normalize-before</code> flag in <a href="https://fairseq.readthedocs.io/" rel="nofollow">fairseq</a>.</li>',ze,rt,me,ht,je='<li><a href="../tasks/sequence_classification">Text classification task guide</a></li> <li><a href="../tasks/token_classification">Token classification task guide</a></li> <li><a href="../tasks/question_answering">Question answering task guide</a></li> <li><a href="../tasks/language_modeling">Causal language modeling task guide</a></li> <li><a href="../tasks/masked_language_modeling">Masked language modeling task guide</a></li> <li><a href="../tasks/multiple_choice">Multiple choice task guide</a></li>',we,Be,te,z,ge,ft,S,Zt=`This is the configuration class to store the configuration of a <a href="/docs/transformers/pr_31198/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormModel">RobertaPreLayerNormModel</a> or a <a href="/docs/transformers/pr_31198/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormModel">TFRobertaPreLayerNormModel</a>. 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
<a href="https://huggingface.co/andreasmadsen/efficient_mlm_m0.40" rel="nofollow">andreasmadsen/efficient_mlm_m0.40</a> architecture.`,it,Ue,It=`Configuration objects inherit from <a href="/docs/transformers/pr_31198/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/pr_31198/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Dt,re,lo,X,ve,qt,gt,ue,_t;return g=new Le({props:{title:"RoBERTa-PreLayerNorm",local:"roberta-prelayernorm",headingTag:"h1"}}),_=new Le({props:{title:"Overview",local:"overview",headingTag:"h2"}}),ae=new Le({props:{title:"Usage tips",local:"usage-tips",headingTag:"h2"}}),rt=new Le({props:{title:"Resources",local:"resources",headingTag:"h2"}}),Be=new Le({props:{title:"RobertaPreLayerNormConfig",local:"transformers.RobertaPreLayerNormConfig",headingTag:"h2"}}),ge=new Z({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/pr_31198/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormModel">RobertaPreLayerNormModel</a> or <a href="/docs/transformers/pr_31198/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/pr_31198/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormModel">RobertaPreLayerNormModel</a> or <a href="/docs/transformers/pr_31198/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/vr_31198/src/transformers/models/roberta_prelayernorm/configuration_roberta_prelayernorm.py#L30"}}),re=new Te({props:{anchor:"transformers.RobertaPreLayerNormConfig.example",$$slots:{default:[Vn]},$$scope:{ctx:$}}}),X=new Bn({props:{pytorch:!0,tensorflow:!0,jax:!0,$$slots:{jax:[Es],tensorflow:[Cs],pytorch:[rs]},$$scope:{ctx:$}}}),qt=new Hn({props:{source:"https://github.com/huggingface/transformers/blob/main/docs/source/en/model_doc/roberta-prelayernorm.md"}}),{c(){e=d("meta"),m=r(),t=d("p"),s=r(),y(g.$$.fragment),o=r(),y(_.$$.fragment),H=r(),C=d("p"),C.innerHTML=R,V=r(),J=d("p"),J.textContent=j,G=r(),f=d("p"),f.innerHTML=N,Re=r(),ce=d("p"),ce.innerHTML=Vo,mt=r(),y(ae.$$.fragment),ut=r(),Pe=d("ul"),Pe.innerHTML=ke,ze=r(),y(rt.$$.fragment),me=r(),ht=d("ul"),ht.innerHTML=je,we=r(),y(Be.$$.fragment),te=r(),z=d("div"),y(ge.$$.fragment),ft=r(),S=d("p"),S.innerHTML=Zt,it=r(),Ue=d("p"),Ue.innerHTML=It,Dt=r(),y(re.$$.fragment),lo=r(),y(X.$$.fragment),ve=r(),y(qt.$$.fragment),gt=r(),ue=d("p"),this.h()},l(F){const L=qn("svelte-u9bgzb",document.head);e=c(L,"META",{name:!0,content:!0}),L.forEach(l),m=i(F),t=c(F,"P",{}),U(t).forEach(l),s=i(F),b(g.$$.fragment,F),o=i(F),b(_.$$.fragment,F),H=i(F),C=c(F,"P",{"data-svelte-h":!0}),u(C)!=="svelte-16zivdh"&&(C.innerHTML=R),V=i(F),J=c(F,"P",{"data-svelte-h":!0}),u(J)!=="svelte-vfdo9a"&&(J.textContent=j),G=i(F),f=c(F,"P",{"data-svelte-h":!0}),u(f)!=="svelte-b3c4v1"&&(f.innerHTML=N),Re=i(F),ce=c(F,"P",{"data-svelte-h":!0}),u(ce)!=="svelte-3d0kzc"&&(ce.innerHTML=Vo),mt=i(F),b(ae.$$.fragment,F),ut=i(F),Pe=c(F,"UL",{"data-svelte-h":!0}),u(Pe)!=="svelte-1xkplwx"&&(Pe.innerHTML=ke),ze=i(F),b(rt.$$.fragment,F),me=i(F),ht=c(F,"UL",{"data-svelte-h":!0}),u(ht)!=="svelte-p1b16m"&&(ht.innerHTML=je),we=i(F),b(Be.$$.fragment,F),te=i(F),z=c(F,"DIV",{class:!0});var $e=U(z);b(ge.$$.fragment,$e),ft=i($e),S=c($e,"P",{"data-svelte-h":!0}),u(S)!=="svelte-lqk34g"&&(S.innerHTML=Zt),it=i($e),Ue=c($e,"P",{"data-svelte-h":!0}),u(Ue)!=="svelte-1oimro3"&&(Ue.innerHTML=It),Dt=i($e),b(re.$$.fragment,$e),$e.forEach(l),lo=i(F),b(X.$$.fragment,F),ve=i(F),b(qt.$$.fragment,F),gt=i(F),ue=c(F,"P",{}),U(ue).forEach(l),this.h()},h(){W(e,"name","hf:doc:metadata"),W(e,"content",Ys),W(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(F,L){a(document.head,e),p(F,m,L),p(F,t,L),p(F,s,L),T(g,F,L),p(F,o,L),T(_,F,L),p(F,H,L),p(F,C,L),p(F,V,L),p(F,J,L),p(F,G,L),p(F,f,L),p(F,Re,L),p(F,ce,L),p(F,mt,L),T(ae,F,L),p(F,ut,L),p(F,Pe,L),p(F,ze,L),T(rt,F,L),p(F,me,L),p(F,ht,L),p(F,we,L),T(Be,F,L),p(F,te,L),p(F,z,L),T(ge,z,null),a(z,ft),a(z,S),a(z,it),a(z,Ue),a(z,Dt),T(re,z,null),p(F,lo,L),T(X,F,L),p(F,ve,L),T(qt,F,L),p(F,gt,L),p(F,ue,L),_t=!0},p(F,[L]){const $e={};L&2&&($e.$$scope={dirty:L,ctx:F}),re.$set($e);const Bt={};L&2&&(Bt.$$scope={dirty:L,ctx:F}),X.$set(Bt)},i(F){_t||(M(g.$$.fragment,F),M(_.$$.fragment,F),M(ae.$$.fragment,F),M(rt.$$.fragment,F),M(Be.$$.fragment,F),M(ge.$$.fragment,F),M(re.$$.fragment,F),M(X.$$.fragment,F),M(qt.$$.fragment,F),_t=!0)},o(F){k(g.$$.fragment,F),k(_.$$.fragment,F),k(ae.$$.fragment,F),k(rt.$$.fragment,F),k(Be.$$.fragment,F),k(ge.$$.fragment,F),k(re.$$.fragment,F),k(X.$$.fragment,F),k(qt.$$.fragment,F),_t=!1},d(F){F&&(l(m),l(t),l(s),l(o),l(H),l(C),l(V),l(J),l(G),l(f),l(Re),l(ce),l(mt),l(ut),l(Pe),l(ze),l(me),l(ht),l(we),l(te),l(z),l(lo),l(ve),l(gt),l(ue)),l(e),w(g,F),w(_,F),w(ae,F),w(rt,F),w(Be,F),w(ge),w(re),w(X,F),w(qt,F)}}}const Ys='{"title":"RoBERTa-PreLayerNorm","local":"roberta-prelayernorm","sections":[{"title":"Overview","local":"overview","sections":[],"depth":2},{"title":"Usage tips","local":"usage-tips","sections":[],"depth":2},{"title":"Resources","local":"resources","sections":[],"depth":2},{"title":"RobertaPreLayerNormConfig","local":"transformers.RobertaPreLayerNormConfig","sections":[],"depth":2},{"title":"RobertaPreLayerNormModel","local":"transformers.RobertaPreLayerNormModel","sections":[],"depth":2},{"title":"RobertaPreLayerNormForCausalLM","local":"transformers.RobertaPreLayerNormForCausalLM","sections":[],"depth":2},{"title":"RobertaPreLayerNormForMaskedLM","local":"transformers.RobertaPreLayerNormForMaskedLM","sections":[],"depth":2},{"title":"RobertaPreLayerNormForSequenceClassification","local":"transformers.RobertaPreLayerNormForSequenceClassification","sections":[],"depth":2},{"title":"RobertaPreLayerNormForMultipleChoice","local":"transformers.RobertaPreLayerNormForMultipleChoice","sections":[],"depth":2},{"title":"RobertaPreLayerNormForTokenClassification","local":"transformers.RobertaPreLayerNormForTokenClassification","sections":[],"depth":2},{"title":"RobertaPreLayerNormForQuestionAnswering","local":"transformers.RobertaPreLayerNormForQuestionAnswering","sections":[],"depth":2},{"title":"TFRobertaPreLayerNormModel","local":"transformers.TFRobertaPreLayerNormModel","sections":[],"depth":2},{"title":"TFRobertaPreLayerNormForCausalLM","local":"transformers.TFRobertaPreLayerNormForCausalLM","sections":[],"depth":2},{"title":"TFRobertaPreLayerNormForMaskedLM","local":"transformers.TFRobertaPreLayerNormForMaskedLM","sections":[],"depth":2},{"title":"TFRobertaPreLayerNormForSequenceClassification","local":"transformers.TFRobertaPreLayerNormForSequenceClassification","sections":[],"depth":2},{"title":"TFRobertaPreLayerNormForMultipleChoice","local":"transformers.TFRobertaPreLayerNormForMultipleChoice","sections":[],"depth":2},{"title":"TFRobertaPreLayerNormForTokenClassification","local":"transformers.TFRobertaPreLayerNormForTokenClassification","sections":[],"depth":2},{"title":"TFRobertaPreLayerNormForQuestionAnswering","local":"transformers.TFRobertaPreLayerNormForQuestionAnswering","sections":[],"depth":2},{"title":"FlaxRobertaPreLayerNormModel","local":"transformers.FlaxRobertaPreLayerNormModel","sections":[],"depth":2},{"title":"FlaxRobertaPreLayerNormForCausalLM","local":"transformers.FlaxRobertaPreLayerNormForCausalLM","sections":[],"depth":2},{"title":"FlaxRobertaPreLayerNormForMaskedLM","local":"transformers.FlaxRobertaPreLayerNormForMaskedLM","sections":[],"depth":2},{"title":"FlaxRobertaPreLayerNormForSequenceClassification","local":"transformers.FlaxRobertaPreLayerNormForSequenceClassification","sections":[],"depth":2},{"title":"FlaxRobertaPreLayerNormForMultipleChoice","local":"transformers.FlaxRobertaPreLayerNormForMultipleChoice","sections":[],"depth":2},{"title":"FlaxRobertaPreLayerNormForTokenClassification","local":"transformers.FlaxRobertaPreLayerNormForTokenClassification","sections":[],"depth":2},{"title":"FlaxRobertaPreLayerNormForQuestionAnswering","local":"transformers.FlaxRobertaPreLayerNormForQuestionAnswering","sections":[],"depth":2}],"depth":1}';function Os($){return Wn(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ra extends Zn{constructor(e){super(),In(this,e,Os,Ss,Un,{})}}export{ra as component};
