import{s as Un,o as Wn,n as z}from"../chunks/scheduler.25b97de1.js";import{S as Zn,i as In,g as d,s as r,r as b,A as qn,h as c,f as l,c as i,j as U,u as y,x as u,k as W,y as a,a as m,v as T,d as M,t as k,w as v}from"../chunks/index.d9030fc9.js";import{T as ye}from"../chunks/Tip.baa67368.js";import{D as Z}from"../chunks/Docstring.ffac8efa.js";import{C as Me}from"../chunks/CodeBlock.e6cd0d95.js";import{F as Bn,M as zn}from"../chunks/Markdown.7217f838.js";import{E as Te}from"../chunks/ExampleCodeBlock.22dfe688.js";import{H as Le,E as Hn}from"../chunks/EditOnGithub.91d95064.js";function Vn($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-kvfsh7"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function Gn($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function Xn($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function An($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function Qn($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function En($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function Sn($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function Yn($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function On($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-ykxpe4"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function Dn($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-1l8e32d"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function Kn($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function es($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function ts($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function os($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function ns($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function ss($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function as($){let e,p,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/v4.41.0/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.`,pt,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>',ze,ke,Pe,rt,pe,ht='The <a href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormModel">RobertaPreLayerNormModel</a> forward method, overrides the <code>__call__</code> special method.',je,ve,Be,te,P,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/v4.41.0/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,we,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/v4.41.0/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,bt="RoBERTa-PreLayerNorm Model with a <code>language modeling</code> head on top.",Yo,Qe,_n=`This model inherits from <a href="/docs/transformers/v4.41.0/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,Po=`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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormForMaskedLM">RobertaPreLayerNormForMaskedLM</a> forward method, overrides the <code>__call__</code> special method.',Do,Ee,bn,eo,Ze,xt,Xo,oe,yo,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.`,yt,To,Mo=`This model inherits from <a href="/docs/transformers/v4.41.0/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,mo,Lt,Ve='The <a href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormForSequenceClassification">RobertaPreLayerNormForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',po,Mt,Uo,uo,ko,Rt,en,jt,vo,Ye,Ie,dt,wo,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/v4.41.0/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.)`,mn,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,vt,fo,_e='The <a href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormForMultipleChoice">RobertaPreLayerNormForMultipleChoice</a> forward method, overrides the <code>__call__</code> special method.',No,oo,Gt,xo,Ao,tt,pn,Ge,ot,yn,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/v4.41.0/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,wt,so='The <a href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormForTokenClassification">RobertaPreLayerNormForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',ao,nt,he,A,ro,zt,Ro,De,Pt,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/v4.41.0/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,mt,be,Jo,zo,Ut='The <a href="/docs/transformers/v4.41.0/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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L669"}}),Pe=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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaPreLayerNormModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaPreLayerNormModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaPreLayerNormModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaPreLayerNormModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaPreLayerNormModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaPreLayerNormModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.RobertaPreLayerNormModel.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.RobertaPreLayerNormModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.RobertaPreLayerNormModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/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/v4.41.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — 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/v4.41.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ve=new ye({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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the left-to-right language modeling loss (next word prediction). Indices should be in
<code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are
ignored (masked), the loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.</p>
<p>If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.RobertaPreLayerNormForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/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/v4.41.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — 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/v4.41.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$t=new ye({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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.RobertaPreLayerNormForMaskedLM.forward.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, any]</code>, optional, defaults to <em>{}</em>) &#x2014;
Used to hide legacy arguments that have been deprecated.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/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/v4.41.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — 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/v4.41.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ee=new ye({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"}}),yo=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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaPreLayerNormForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/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/v4.41.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — 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/v4.41.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Mt=new ye({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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaPreLayerNormForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/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/v4.41.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) — 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/v4.41.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),oo=new ye({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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/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/v4.41.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  — 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/v4.41.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),nt=new ye({props:{$$slots:{default:[ts]},$$scope:{ctx:$}}}),A=new Te({props:{anchor:"transformers.RobertaPreLayerNormForTokenClassification.forward.example",$$slots:{default:[os]},$$scope:{ctx:$}}}),zt=new Le({props:{title:"RobertaPreLayerNormForQuestionAnswering",local:"transformers.RobertaPreLayerNormForQuestionAnswering",headingTag:"h2"}}),Pt=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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_roberta_prelayernorm.py#L1450"}}),be=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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0,1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
This parameter can only be used when the model is initialized with <code>type_vocab_size</code> parameter with value<blockquote>
<p>= 2. All the value in this tensor should be always &lt; type_vocab_size.</p>
</blockquote></li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/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/v4.41.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) — 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/v4.41.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),st=new ye({props:{$$slots:{default:[ns]},$$scope:{ctx:$}}}),at=new Te({props:{anchor:"transformers.RobertaPreLayerNormForQuestionAnswering.forward.example",$$slots:{default:[ss]},$$scope:{ctx:$}}}),{c(){b(e.$$.fragment),p=r(),t=d("div"),b(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,pt=r(),ae=d("p"),ae.innerHTML=ut,ze=r(),ke=d("div"),b(Pe.$$.fragment),rt=r(),pe=d("p"),pe.innerHTML=ht,je=r(),b(ve.$$.fragment),Be=r(),b(te.$$.fragment),P=r(),b(ge.$$.fragment),ft=r(),S=d("div"),b(Zt.$$.fragment),it=r(),Ue=d("p"),Ue.innerHTML=It,Dt=r(),re=d("p"),re.innerHTML=lo,X=r(),we=d("p"),we.innerHTML=qt,gt=r(),ue=d("div"),b(_t.$$.fragment),F=r(),L=d("p"),L.innerHTML=$e,Bt=r(),b($t.$$.fragment),dn=r(),b(Ke.$$.fragment),Ht=r(),b(Fe.$$.fragment),et=r(),We=d("div"),b(Ae.$$.fragment),So=r(),ie=d("p"),ie.innerHTML=bt,Yo=r(),Qe=d("p"),Qe.innerHTML=_n,Kt=r(),Ft=d("p"),Ft.innerHTML=Po,Go=r(),q=d("div"),b(Nt.$$.fragment),Oo=r(),lt=d("p"),lt.innerHTML=kn,Do=r(),b(Ee.$$.fragment),bn=r(),b(eo.$$.fragment),Ze=r(),b(xt.$$.fragment),Xo=r(),oe=d("div"),b(yo.$$.fragment),Se=r(),He=d("p"),He.textContent=cn,yt=r(),To=d("p"),To.innerHTML=Mo,Vt=r(),le=d("p"),le.innerHTML=Tt,Ko=r(),de=d("div"),b(co.$$.fragment),mo=r(),Lt=d("p"),Lt.innerHTML=Ve,po=r(),b(Mt.$$.fragment),Uo=r(),b(uo.$$.fragment),ko=r(),b(Rt.$$.fragment),en=r(),b(jt.$$.fragment),vo=r(),Ye=d("div"),b(Ie.$$.fragment),dt=r(),wo=d("p"),wo.textContent=Oe,$o=r(),Fo=d("p"),Fo.innerHTML=Ct,mn=r(),kt=d("p"),kt.innerHTML=to,ho=r(),Ne=d("div"),b(Y.$$.fragment),vt=r(),fo=d("p"),fo.innerHTML=_e,No=r(),b(oo.$$.fragment),Gt=r(),b(xo.$$.fragment),Ao=r(),b(tt.$$.fragment),pn=r(),Ge=d("div"),b(ot.$$.fragment),yn=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"),b(ct.$$.fragment),no=r(),wt=d("p"),wt.innerHTML=so,ao=r(),b(nt.$$.fragment),he=r(),b(A.$$.fragment),ro=r(),b(zt.$$.fragment),Ro=r(),De=d("div"),b(Pt.$$.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(),mt=d("div"),b(be.$$.fragment),Jo=r(),zo=d("p"),zo.innerHTML=Ut,fn=r(),b(st.$$.fragment),io=r(),b(at.$$.fragment),this.h()},l(n){y(e.$$.fragment,n),p=i(n),t=c(n,"DIV",{class:!0});var h=U(t);y(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-x59fzs"&&(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),pt=i(h),ae=c(h,"P",{"data-svelte-h":!0}),u(ae)!=="svelte-p9qvd1"&&(ae.innerHTML=ut),ze=i(h),ke=c(h,"DIV",{class:!0});var fe=U(ke);y(Pe.$$.fragment,fe),rt=i(fe),pe=c(fe,"P",{"data-svelte-h":!0}),u(pe)!=="svelte-193clx3"&&(pe.innerHTML=ht),je=i(fe),y(ve.$$.fragment,fe),Be=i(fe),y(te.$$.fragment,fe),fe.forEach(l),h.forEach(l),P=i(n),y(ge.$$.fragment,n),ft=i(n),S=c(n,"DIV",{class:!0});var I=U(S);y(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-x59fzs"&&(re.innerHTML=lo),X=i(I),we=c(I,"P",{"data-svelte-h":!0}),u(we)!=="svelte-hswkmf"&&(we.innerHTML=qt),gt=i(I),ue=c(I,"DIV",{class:!0});var ne=U(ue);y(_t.$$.fragment,ne),F=i(ne),L=c(ne,"P",{"data-svelte-h":!0}),u(L)!=="svelte-bcsqtj"&&(L.innerHTML=$e),Bt=i(ne),y($t.$$.fragment,ne),dn=i(ne),y(Ke.$$.fragment,ne),ne.forEach(l),I.forEach(l),Ht=i(n),y(Fe.$$.fragment,n),et=i(n),We=c(n,"DIV",{class:!0});var Q=U(We);y(Ae.$$.fragment,Q),So=i(Q),ie=c(Q,"P",{"data-svelte-h":!0}),u(ie)!=="svelte-8dtlt4"&&(ie.innerHTML=bt),Yo=i(Q),Qe=c(Q,"P",{"data-svelte-h":!0}),u(Qe)!=="svelte-x59fzs"&&(Qe.innerHTML=_n),Kt=i(Q),Ft=c(Q,"P",{"data-svelte-h":!0}),u(Ft)!=="svelte-hswkmf"&&(Ft.innerHTML=Po),Go=i(Q),q=c(Q,"DIV",{class:!0});var O=U(q);y(Nt.$$.fragment,O),Oo=i(O),lt=c(O,"P",{"data-svelte-h":!0}),u(lt)!=="svelte-1b4arev"&&(lt.innerHTML=kn),Do=i(O),y(Ee.$$.fragment,O),bn=i(O),y(eo.$$.fragment,O),O.forEach(l),Q.forEach(l),Ze=i(n),y(xt.$$.fragment,n),Xo=i(n),oe=c(n,"DIV",{class:!0});var D=U(oe);y(yo.$$.fragment,D),Se=i(D),He=c(D,"P",{"data-svelte-h":!0}),u(He)!=="svelte-1bv1on4"&&(He.textContent=cn),yt=i(D),To=c(D,"P",{"data-svelte-h":!0}),u(To)!=="svelte-x59fzs"&&(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);y(co.$$.fragment,se),mo=i(se),Lt=c(se,"P",{"data-svelte-h":!0}),u(Lt)!=="svelte-17su90t"&&(Lt.innerHTML=Ve),po=i(se),y(Mt.$$.fragment,se),Uo=i(se),y(uo.$$.fragment,se),ko=i(se),y(Rt.$$.fragment,se),se.forEach(l),D.forEach(l),en=i(n),y(jt.$$.fragment,n),vo=i(n),Ye=c(n,"DIV",{class:!0});var B=U(Ye);y(Ie.$$.fragment,B),dt=i(B),wo=c(B,"P",{"data-svelte-h":!0}),u(wo)!=="svelte-1t8wc3p"&&(wo.textContent=Oe),$o=i(B),Fo=c(B,"P",{"data-svelte-h":!0}),u(Fo)!=="svelte-x59fzs"&&(Fo.innerHTML=Ct),mn=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);y(Y.$$.fragment,xe),vt=i(xe),fo=c(xe,"P",{"data-svelte-h":!0}),u(fo)!=="svelte-18fzh3t"&&(fo.innerHTML=_e),No=i(xe),y(oo.$$.fragment,xe),Gt=i(xe),y(xo.$$.fragment,xe),xe.forEach(l),B.forEach(l),Ao=i(n),y(tt.$$.fragment,n),pn=i(n),Ge=c(n,"DIV",{class:!0});var E=U(Ge);y(ot.$$.fragment,E),yn=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-x59fzs"&&(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);y(ct.$$.fragment,K),no=i(K),wt=c(K,"P",{"data-svelte-h":!0}),u(wt)!=="svelte-1hn2lln"&&(wt.innerHTML=so),ao=i(K),y(nt.$$.fragment,K),he=i(K),y(A.$$.fragment,K),K.forEach(l),E.forEach(l),ro=i(n),y(zt.$$.fragment,n),Ro=i(n),De=c(n,"DIV",{class:!0});var ee=U(De);y(Pt.$$.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-x59fzs"&&(Bo.innerHTML=Ho),_o=i(ee),jo=c(ee,"P",{"data-svelte-h":!0}),u(jo)!=="svelte-hswkmf"&&(jo.innerHTML=qe),Co=i(ee),mt=c(ee,"DIV",{class:!0});var me=U(mt);y(be.$$.fragment,me),Jo=i(me),zo=c(me,"P",{"data-svelte-h":!0}),u(zo)!=="svelte-e2t7g3"&&(zo.innerHTML=Ut),fn=i(me),y(st.$$.fragment,me),io=i(me),y(at.$$.fragment,me),me.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(mt,"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),m(n,p,h),m(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,pt),a(t,ae),a(t,ze),a(t,ke),T(Pe,ke,null),a(ke,rt),a(ke,pe),a(ke,je),T(ve,ke,null),a(ke,Be),T(te,ke,null),m(n,P,h),T(ge,n,h),m(n,ft,h),m(n,S,h),T(Zt,S,null),a(S,it),a(S,Ue),a(S,Dt),a(S,re),a(S,X),a(S,we),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),m(n,Ht,h),T(Fe,n,h),m(n,et,h),m(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,bn),T(eo,q,null),m(n,Ze,h),T(xt,n,h),m(n,Xo,h),m(n,oe,h),T(yo,oe,null),a(oe,Se),a(oe,He),a(oe,yt),a(oe,To),a(oe,Vt),a(oe,le),a(oe,Ko),a(oe,de),T(co,de,null),a(de,mo),a(de,Lt),a(de,po),T(Mt,de,null),a(de,Uo),T(uo,de,null),a(de,ko),T(Rt,de,null),m(n,en,h),T(jt,n,h),m(n,vo,h),m(n,Ye,h),T(Ie,Ye,null),a(Ye,dt),a(Ye,wo),a(Ye,$o),a(Ye,Fo),a(Ye,mn),a(Ye,kt),a(Ye,ho),a(Ye,Ne),T(Y,Ne,null),a(Ne,vt),a(Ne,fo),a(Ne,No),T(oo,Ne,null),a(Ne,Gt),T(xo,Ne,null),m(n,Ao,h),T(tt,n,h),m(n,pn,h),m(n,Ge,h),T(ot,Ge,null),a(Ge,yn),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,wt),a(Je,ao),T(nt,Je,null),a(Je,he),T(A,Je,null),m(n,ro,h),T(zt,n,h),m(n,Ro,h),m(n,De,h),T(Pt,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,mt),T(be,mt,null),a(mt,Jo),a(mt,zo),a(mt,fn),T(st,mt,null),a(mt,io),T(at,mt,null),Wt=!0},p(n,h){const fe={};h&2&&(fe.$$scope={dirty:h,ctx:n}),ve.$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 me={};h&2&&(me.$$scope={dirty:h,ctx:n}),A.$set(me);const Eo={};h&2&&(Eo.$$scope={dirty:h,ctx:n}),st.$set(Eo);const vn={};h&2&&(vn.$$scope={dirty:h,ctx:n}),at.$set(vn)},i(n){Wt||(M(e.$$.fragment,n),M(s.$$.fragment,n),M(Pe.$$.fragment,n),M(ve.$$.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(yo.$$.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(zt.$$.fragment,n),M(Pt.$$.fragment,n),M(be.$$.fragment,n),M(st.$$.fragment,n),M(at.$$.fragment,n),Wt=!0)},o(n){k(e.$$.fragment,n),k(s.$$.fragment,n),k(Pe.$$.fragment,n),k(ve.$$.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(yo.$$.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(zt.$$.fragment,n),k(Pt.$$.fragment,n),k(be.$$.fragment,n),k(st.$$.fragment,n),k(at.$$.fragment,n),Wt=!1},d(n){n&&(l(p),l(t),l(P),l(ft),l(S),l(Ht),l(et),l(We),l(Ze),l(Xo),l(oe),l(en),l(vo),l(Ye),l(Ao),l(pn),l(Ge),l(ro),l(Ro),l(De)),v(e,n),v(s),v(Pe),v(ve),v(te),v(ge,n),v(Zt),v(_t),v($t),v(Ke),v(Fe,n),v(Ae),v(Nt),v(Ee),v(eo),v(xt,n),v(yo),v(co),v(Mt),v(uo),v(Rt),v(jt,n),v(Ie),v(Y),v(oo),v(xo),v(tt,n),v(ot),v(ct),v(nt),v(A),v(zt,n),v(Pt),v(be),v(st),v(at)}}}function rs($){let e,p;return e=new zn({props:{$$slots:{default:[as]},$$scope:{ctx:$}}}),{c(){b(e.$$.fragment)},l(t){y(e.$$.fragment,t)},m(t,s){T(e,t,s),p=!0},p(t,s){const g={};s&2&&(g.$$scope={dirty:s,ctx:t}),e.$set(g)},i(t){p||(M(e.$$.fragment,t),p=!0)},o(t){k(e.$$.fragment,t),p=!1},d(t){v(e,t)}}}function is($){let e,p="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=p,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=p),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){m(f,e,N),m(f,t,N),m(f,s,N),m(f,o,N),m(f,_,N),m(f,C,N),m(f,R,N),m(f,J,N),m(f,j,N)},p:z,d(f){f&&(l(e),l(t),l(s),l(o),l(_),l(C),l(R),l(J),l(j))}}}function ls($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function ds($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function cs($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function ms($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function ps($){let e,p="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=p,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=p),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){m(f,e,N),m(f,t,N),m(f,s,N),m(f,o,N),m(f,_,N),m(f,C,N),m(f,R,N),m(f,J,N),m(f,j,N)},p:z,d(f){f&&(l(e),l(t),l(s),l(o),l(_),l(C),l(R),l(J),l(j))}}}function us($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function hs($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function fs($){let e,p;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(){b(e.$$.fragment)},l(t){y(e.$$.fragment,t)},m(t,s){T(e,t,s),p=!0},p:z,i(t){p||(M(e.$$.fragment,t),p=!0)},o(t){k(e.$$.fragment,t),p=!1},d(t){v(e,t)}}}function gs($){let e,p="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=p,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=p),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){m(f,e,N),m(f,t,N),m(f,s,N),m(f,o,N),m(f,_,N),m(f,C,N),m(f,R,N),m(f,J,N),m(f,j,N)},p:z,d(f){f&&(l(e),l(t),l(s),l(o),l(_),l(C),l(R),l(J),l(j))}}}function _s($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function bs($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function ys($){let e,p;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(){b(e.$$.fragment)},l(t){y(e.$$.fragment,t)},m(t,s){T(e,t,s),p=!0},p:z,i(t){p||(M(e.$$.fragment,t),p=!0)},o(t){k(e.$$.fragment,t),p=!1},d(t){v(e,t)}}}function Ts($){let e,p="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=p,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=p),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){m(f,e,N),m(f,t,N),m(f,s,N),m(f,o,N),m(f,_,N),m(f,C,N),m(f,R,N),m(f,J,N),m(f,j,N)},p:z,d(f){f&&(l(e),l(t),l(s),l(o),l(_),l(C),l(R),l(J),l(j))}}}function Ms($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function ks($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function vs($){let e,p="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=p,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=p),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){m(f,e,N),m(f,t,N),m(f,s,N),m(f,o,N),m(f,_,N),m(f,C,N),m(f,R,N),m(f,J,N),m(f,j,N)},p:z,d(f){f&&(l(e),l(t),l(s),l(o),l(_),l(C),l(R),l(J),l(j))}}}function ws($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function $s($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function Fs($){let e,p;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(){b(e.$$.fragment)},l(t){y(e.$$.fragment,t)},m(t,s){T(e,t,s),p=!0},p:z,i(t){p||(M(e.$$.fragment,t),p=!0)},o(t){k(e.$$.fragment,t),p=!1},d(t){v(e,t)}}}function Ns($){let e,p="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=p,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=p),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){m(f,e,N),m(f,t,N),m(f,s,N),m(f,o,N),m(f,_,N),m(f,C,N),m(f,R,N),m(f,J,N),m(f,j,N)},p:z,d(f){f&&(l(e),l(t),l(s),l(o),l(_),l(C),l(R),l(J),l(j))}}}function xs($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function Ls($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function Rs($){let e,p;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(){b(e.$$.fragment)},l(t){y(e.$$.fragment,t)},m(t,s){T(e,t,s),p=!0},p:z,i(t){p||(M(e.$$.fragment,t),p=!0)},o(t){k(e.$$.fragment,t),p=!1},d(t){v(e,t)}}}function js($){let e,p,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/v4.41.0/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,pt,ae='The <a href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormModel">TFRobertaPreLayerNormModel</a> forward method, overrides the <code>__call__</code> special method.',ut,ze,ke,Pe,rt,pe,ht,je,ve,Be,te,P,ge,ft,S='The <a href="/docs/transformers/v4.41.0/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,we,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/v4.41.0/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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormForMaskedLM">TFRobertaPreLayerNormForMaskedLM</a> forward method, overrides the <code>__call__</code> special method.',ie,bt,Yo,Qe,_n,Kt,Ft,Po,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,bn=`This model inherits from <a href="/docs/transformers/v4.41.0/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,yo,Se,He,cn,yt,To='The <a href="/docs/transformers/v4.41.0/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,mo,Lt,Ve,po,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/v4.41.0/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,vo,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,wo,Oe,$o,Fo,Ct,mn='The <a href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormForMultipleChoice">TFRobertaPreLayerNormForMultipleChoice</a> forward method, overrides the <code>__call__</code> special method.',kt,to,ho,Ne,Y,vt,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,pn=`This model inherits from <a href="/docs/transformers/v4.41.0/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,yn=`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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormForTokenClassification">TFRobertaPreLayerNormForTokenClassification</a> forward method, overrides the <code>__call__</code> special method.',hn,Je,ct,no,wt,so,ao,nt,he,A,ro,zt,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>).`,Pt,Wo,Zo=`This model inherits from <a href="/docs/transformers/v4.41.0/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,mt,be,Jo='The <a href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormForQuestionAnswering">TFRobertaPreLayerNormForQuestionAnswering</a> forward method, overrides the <code>__call__</code> special method.',zo,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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L984"}}),f=new ye({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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFRobertaPreLayerNormModel.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L994",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — 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/v4.41.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ze=new ye({props:{$$slots:{default:[ls]},$$scope:{ctx:$}}}),Pe=new Te({props:{anchor:"transformers.TFRobertaPreLayerNormModel.call.example",$$slots:{default:[ds]},$$scope:{ctx:$}}}),pe=new Le({props:{title:"TFRobertaPreLayerNormForCausalLM",local:"transformers.TFRobertaPreLayerNormForCausalLM",headingTag:"h2"}}),ve=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/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1223"}}),P=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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.past_key_values",description:`<strong>past_key_values</strong> (<code>Tuple[Tuple[tf.Tensor]]</code> of length <code>config.n_layers</code>) &#x2014;
contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>). Set to <code>False</code> during training, <code>True</code> during generation`,name:"use_cache"},{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> or <code>np.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the cross entropy classification loss. Indices should be in <code>[0, ..., config.vocab_size - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1262",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) — 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/v4.41.0/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),it=new ye({props:{$$slots:{default:[cs]},$$scope:{ctx:$}}}),It=new Te({props:{anchor:"transformers.TFRobertaPreLayerNormForCausalLM.call.example",$$slots:{default:[ms]},$$scope:{ctx:$}}}),re=new Le({props:{title:"TFRobertaPreLayerNormForMaskedLM",local:"transformers.TFRobertaPreLayerNormForMaskedLM",headingTag:"h2"}}),we=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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1127"}}),Ke=new ye({props:{$$slots:{default:[ps]},$$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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaPreLayerNormForMaskedLM.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked), the
loss is only computed for the tokens with labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1150",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) — 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/v4.41.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),bt=new ye({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:$}}}),Po=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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1403"}}),oe=new ye({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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1425",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) — 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/v4.41.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Vt=new ye({props:{$$slots:{default:[_s]},$$scope:{ctx:$}}}),Tt=new Te({props:{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.example",$$slots:{default:[bs]},$$scope:{ctx:$}}}),de=new Te({props:{anchor:"transformers.TFRobertaPreLayerNormForSequenceClassification.call.example-2",$$slots:{default:[ys]},$$scope:{ctx:$}}}),mo=new Le({props:{title:"TFRobertaPreLayerNormForMultipleChoice",local:"transformers.TFRobertaPreLayerNormForMultipleChoice",headingTag:"h2"}}),po=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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1493"}}),dt=new ye({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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1516",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) — 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/v4.41.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),to=new ye({props:{$$slots:{default:[Ms]},$$scope:{ctx:$}}}),Ne=new Te({props:{anchor:"transformers.TFRobertaPreLayerNormForMultipleChoice.call.example",$$slots:{default:[ks]},$$scope:{ctx:$}}}),vt=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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1598"}}),Jt=new ye({props:{$$slots:{default:[vs]},$$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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaPreLayerNormForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1626",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  — 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/v4.41.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Je=new ye({props:{$$slots:{default:[ws]},$$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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1694"}}),_o=new ye({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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.TFRobertaPreLayerNormForQuestionAnswering.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_tf_roberta_prelayernorm.py#L1717",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) — 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/v4.41.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ut=new ye({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(){b(e.$$.fragment),p=r(),t=d("div"),b(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(),b(f.$$.fragment),N=r(),Re=d("div"),b(ce.$$.fragment),Vo=r(),pt=d("p"),pt.innerHTML=ae,ut=r(),b(ze.$$.fragment),ke=r(),b(Pe.$$.fragment),rt=r(),b(pe.$$.fragment),ht=r(),je=d("div"),b(ve.$$.fragment),Be=r(),te=d("div"),b(P.$$.fragment),ge=r(),ft=d("p"),ft.innerHTML=S,Zt=r(),b(it.$$.fragment),Ue=r(),b(It.$$.fragment),Dt=r(),b(re.$$.fragment),lo=r(),X=d("div"),b(we.$$.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(),b(Ke.$$.fragment),Ht=r(),Fe=d("div"),b(et.$$.fragment),We=r(),Ae=d("p"),Ae.innerHTML=So,ie=r(),b(bt.$$.fragment),Yo=r(),b(Qe.$$.fragment),_n=r(),b(Kt.$$.fragment),Ft=r(),b(Po.$$.fragment),Go=r(),q=d("div"),b(Nt.$$.fragment),Oo=r(),lt=d("p"),lt.textContent=kn,Do=r(),Ee=d("p"),Ee.innerHTML=bn,eo=r(),Ze=d("p"),Ze.innerHTML=xt,Xo=r(),b(oe.$$.fragment),yo=r(),Se=d("div"),b(He.$$.fragment),cn=r(),yt=d("p"),yt.innerHTML=To,Mo=r(),b(Vt.$$.fragment),le=r(),b(Tt.$$.fragment),Ko=r(),b(de.$$.fragment),co=r(),b(mo.$$.fragment),Lt=r(),Ve=d("div"),b(po.$$.fragment),Mt=r(),Uo=d("p"),Uo.textContent=uo,ko=r(),Rt=d("p"),Rt.innerHTML=en,jt=r(),vo=d("p"),vo.innerHTML=Ye,Ie=r(),b(dt.$$.fragment),wo=r(),Oe=d("div"),b($o.$$.fragment),Fo=r(),Ct=d("p"),Ct.innerHTML=mn,kt=r(),b(to.$$.fragment),ho=r(),b(Ne.$$.fragment),Y=r(),b(vt.$$.fragment),fo=r(),_e=d("div"),b(No.$$.fragment),oo=r(),Gt=d("p"),Gt.textContent=xo,Ao=r(),tt=d("p"),tt.innerHTML=pn,Ge=r(),ot=d("p"),ot.innerHTML=yn,Lo=r(),b(Jt.$$.fragment),un=r(),Ce=d("div"),b(Xe.$$.fragment),go=r(),Xt=d("p"),Xt.innerHTML=Qo,hn=r(),b(Je.$$.fragment),ct=r(),b(no.$$.fragment),wt=r(),b(so.$$.fragment),ao=r(),b(nt.$$.fragment),he=r(),A=d("div"),b(ro.$$.fragment),zt=r(),Ro=d("p"),Ro.innerHTML=De,Pt=r(),Wo=d("p"),Wo.innerHTML=Zo,Io=r(),qo=d("p"),qo.innerHTML=Bo,Ho=r(),b(_o.$$.fragment),jo=r(),qe=d("div"),b(Co.$$.fragment),mt=r(),be=d("p"),be.innerHTML=Jo,zo=r(),b(Ut.$$.fragment),fn=r(),b(st.$$.fragment),io=r(),b(at.$$.fragment),this.h()},l(n){y(e.$$.fragment,n),p=i(n),t=c(n,"DIV",{class:!0});var h=U(t);y(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-1lrnopk"&&(C.innerHTML=R),V=i(h),J=c(h,"P",{"data-svelte-h":!0}),u(J)!=="svelte-1be7e3c"&&(J.innerHTML=j),G=i(h),y(f.$$.fragment,h),N=i(h),Re=c(h,"DIV",{class:!0});var fe=U(Re);y(ce.$$.fragment,fe),Vo=i(fe),pt=c(fe,"P",{"data-svelte-h":!0}),u(pt)!=="svelte-uq0fmn"&&(pt.innerHTML=ae),ut=i(fe),y(ze.$$.fragment,fe),ke=i(fe),y(Pe.$$.fragment,fe),fe.forEach(l),h.forEach(l),rt=i(n),y(pe.$$.fragment,n),ht=i(n),je=c(n,"DIV",{class:!0});var I=U(je);y(ve.$$.fragment,I),Be=i(I),te=c(I,"DIV",{class:!0});var ne=U(te);y(P.$$.fragment,ne),ge=i(ne),ft=c(ne,"P",{"data-svelte-h":!0}),u(ft)!=="svelte-4r0olz"&&(ft.innerHTML=S),Zt=i(ne),y(it.$$.fragment,ne),Ue=i(ne),y(It.$$.fragment,ne),ne.forEach(l),I.forEach(l),Dt=i(n),y(re.$$.fragment,n),lo=i(n),X=c(n,"DIV",{class:!0});var Q=U(X);y(we.$$.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-1lrnopk"&&(F.innerHTML=L),$e=i(Q),Bt=c(Q,"P",{"data-svelte-h":!0}),u(Bt)!=="svelte-1be7e3c"&&(Bt.innerHTML=$t),dn=i(Q),y(Ke.$$.fragment,Q),Ht=i(Q),Fe=c(Q,"DIV",{class:!0});var O=U(Fe);y(et.$$.fragment,O),We=i(O),Ae=c(O,"P",{"data-svelte-h":!0}),u(Ae)!=="svelte-dhd04f"&&(Ae.innerHTML=So),ie=i(O),y(bt.$$.fragment,O),Yo=i(O),y(Qe.$$.fragment,O),_n=i(O),y(Kt.$$.fragment,O),O.forEach(l),Q.forEach(l),Ft=i(n),y(Po.$$.fragment,n),Go=i(n),q=c(n,"DIV",{class:!0});var D=U(q);y(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-1lrnopk"&&(Ee.innerHTML=bn),eo=i(D),Ze=c(D,"P",{"data-svelte-h":!0}),u(Ze)!=="svelte-1be7e3c"&&(Ze.innerHTML=xt),Xo=i(D),y(oe.$$.fragment,D),yo=i(D),Se=c(D,"DIV",{class:!0});var se=U(Se);y(He.$$.fragment,se),cn=i(se),yt=c(se,"P",{"data-svelte-h":!0}),u(yt)!=="svelte-o46y29"&&(yt.innerHTML=To),Mo=i(se),y(Vt.$$.fragment,se),le=i(se),y(Tt.$$.fragment,se),Ko=i(se),y(de.$$.fragment,se),se.forEach(l),D.forEach(l),co=i(n),y(mo.$$.fragment,n),Lt=i(n),Ve=c(n,"DIV",{class:!0});var B=U(Ve);y(po.$$.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-1lrnopk"&&(Rt.innerHTML=en),jt=i(B),vo=c(B,"P",{"data-svelte-h":!0}),u(vo)!=="svelte-1be7e3c"&&(vo.innerHTML=Ye),Ie=i(B),y(dt.$$.fragment,B),wo=i(B),Oe=c(B,"DIV",{class:!0});var xe=U(Oe);y($o.$$.fragment,xe),Fo=i(xe),Ct=c(xe,"P",{"data-svelte-h":!0}),u(Ct)!=="svelte-1doznhx"&&(Ct.innerHTML=mn),kt=i(xe),y(to.$$.fragment,xe),ho=i(xe),y(Ne.$$.fragment,xe),xe.forEach(l),B.forEach(l),Y=i(n),y(vt.$$.fragment,n),fo=i(n),_e=c(n,"DIV",{class:!0});var E=U(_e);y(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-1lrnopk"&&(tt.innerHTML=pn),Ge=i(E),ot=c(E,"P",{"data-svelte-h":!0}),u(ot)!=="svelte-1be7e3c"&&(ot.innerHTML=yn),Lo=i(E),y(Jt.$$.fragment,E),un=i(E),Ce=c(E,"DIV",{class:!0});var K=U(Ce);y(Xe.$$.fragment,K),go=i(K),Xt=c(K,"P",{"data-svelte-h":!0}),u(Xt)!=="svelte-1vi2lj3"&&(Xt.innerHTML=Qo),hn=i(K),y(Je.$$.fragment,K),ct=i(K),y(no.$$.fragment,K),wt=i(K),y(so.$$.fragment,K),K.forEach(l),E.forEach(l),ao=i(n),y(nt.$$.fragment,n),he=i(n),A=c(n,"DIV",{class:!0});var ee=U(A);y(ro.$$.fragment,ee),zt=i(ee),Ro=c(ee,"P",{"data-svelte-h":!0}),u(Ro)!=="svelte-4mgyt1"&&(Ro.innerHTML=De),Pt=i(ee),Wo=c(ee,"P",{"data-svelte-h":!0}),u(Wo)!=="svelte-1lrnopk"&&(Wo.innerHTML=Zo),Io=i(ee),qo=c(ee,"P",{"data-svelte-h":!0}),u(qo)!=="svelte-1be7e3c"&&(qo.innerHTML=Bo),Ho=i(ee),y(_o.$$.fragment,ee),jo=i(ee),qe=c(ee,"DIV",{class:!0});var me=U(qe);y(Co.$$.fragment,me),mt=i(me),be=c(me,"P",{"data-svelte-h":!0}),u(be)!=="svelte-1t01hy7"&&(be.innerHTML=Jo),zo=i(me),y(Ut.$$.fragment,me),fn=i(me),y(st.$$.fragment,me),io=i(me),y(at.$$.fragment,me),me.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),m(n,p,h),m(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,pt),a(Re,ut),T(ze,Re,null),a(Re,ke),T(Pe,Re,null),m(n,rt,h),T(pe,n,h),m(n,ht,h),m(n,je,h),T(ve,je,null),a(je,Be),a(je,te),T(P,te,null),a(te,ge),a(te,ft),a(te,Zt),T(it,te,null),a(te,Ue),T(It,te,null),m(n,Dt,h),T(re,n,h),m(n,lo,h),m(n,X,h),T(we,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(bt,Fe,null),a(Fe,Yo),T(Qe,Fe,null),a(Fe,_n),T(Kt,Fe,null),m(n,Ft,h),T(Po,n,h),m(n,Go,h),m(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,yo),a(q,Se),T(He,Se,null),a(Se,cn),a(Se,yt),a(Se,Mo),T(Vt,Se,null),a(Se,le),T(Tt,Se,null),a(Se,Ko),T(de,Se,null),m(n,co,h),T(mo,n,h),m(n,Lt,h),m(n,Ve,h),T(po,Ve,null),a(Ve,Mt),a(Ve,Uo),a(Ve,ko),a(Ve,Rt),a(Ve,jt),a(Ve,vo),a(Ve,Ie),T(dt,Ve,null),a(Ve,wo),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),m(n,Y,h),T(vt,n,h),m(n,fo,h),m(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,wt),T(so,Ce,null),m(n,ao,h),T(nt,n,h),m(n,he,h),m(n,A,h),T(ro,A,null),a(A,zt),a(A,Ro),a(A,Pt),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,mt),a(qe,be),a(qe,zo),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}),ze.$set(I);const ne={};h&2&&(ne.$$scope={dirty:h,ctx:n}),Pe.$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}),bt.$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 me={};h&2&&(me.$$scope={dirty:h,ctx:n}),de.$set(me);const Eo={};h&2&&(Eo.$$scope={dirty:h,ctx:n}),dt.$set(Eo);const vn={};h&2&&(vn.$$scope={dirty:h,ctx:n}),to.$set(vn);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 bo={};h&2&&(bo.$$scope={dirty:h,ctx:n}),so.$set(bo);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(ze.$$.fragment,n),M(Pe.$$.fragment,n),M(pe.$$.fragment,n),M(ve.$$.fragment,n),M(P.$$.fragment,n),M(it.$$.fragment,n),M(It.$$.fragment,n),M(re.$$.fragment,n),M(we.$$.fragment,n),M(Ke.$$.fragment,n),M(et.$$.fragment,n),M(bt.$$.fragment,n),M(Qe.$$.fragment,n),M(Kt.$$.fragment,n),M(Po.$$.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(mo.$$.fragment,n),M(po.$$.fragment,n),M(dt.$$.fragment,n),M($o.$$.fragment,n),M(to.$$.fragment,n),M(Ne.$$.fragment,n),M(vt.$$.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(ze.$$.fragment,n),k(Pe.$$.fragment,n),k(pe.$$.fragment,n),k(ve.$$.fragment,n),k(P.$$.fragment,n),k(it.$$.fragment,n),k(It.$$.fragment,n),k(re.$$.fragment,n),k(we.$$.fragment,n),k(Ke.$$.fragment,n),k(et.$$.fragment,n),k(bt.$$.fragment,n),k(Qe.$$.fragment,n),k(Kt.$$.fragment,n),k(Po.$$.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(mo.$$.fragment,n),k(po.$$.fragment,n),k(dt.$$.fragment,n),k($o.$$.fragment,n),k(to.$$.fragment,n),k(Ne.$$.fragment,n),k(vt.$$.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(p),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)),v(e,n),v(s),v(f),v(ce),v(ze),v(Pe),v(pe,n),v(ve),v(P),v(it),v(It),v(re,n),v(we),v(Ke),v(et),v(bt),v(Qe),v(Kt),v(Po,n),v(Nt),v(oe),v(He),v(Vt),v(Tt),v(de),v(mo,n),v(po),v(dt),v($o),v(to),v(Ne),v(vt,n),v(No),v(Jt),v(Xe),v(Je),v(no),v(so),v(nt,n),v(ro),v(_o),v(Co),v(Ut),v(st),v(at)}}}function Cs($){let e,p;return e=new zn({props:{$$slots:{default:[js]},$$scope:{ctx:$}}}),{c(){b(e.$$.fragment)},l(t){y(e.$$.fragment,t)},m(t,s){T(e,t,s),p=!0},p(t,s){const g={};s&2&&(g.$$scope={dirty:s,ctx:t}),e.$set(g)},i(t){p||(M(e.$$.fragment,t),p=!0)},o(t){k(e.$$.fragment,t),p=!1},d(t){v(e,t)}}}function Js($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function zs($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function Ps($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function Us($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function Ws($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function Zs($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function Is($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function qs($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function Bs($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function Hs($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function Vs($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function Gs($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function Xs($){let e,p=`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=p},l(t){e=c(t,"P",{"data-svelte-h":!0}),u(e)!=="svelte-fincs2"&&(e.innerHTML=p)},m(t,s){m(t,e,s)},p:z,d(t){t&&l(e)}}}function As($){let e,p="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=p,t=r(),b(s.$$.fragment)},l(o){e=c(o,"P",{"data-svelte-h":!0}),u(e)!=="svelte-11lpom8"&&(e.textContent=p),t=i(o),y(s.$$.fragment,o)},m(o,_){m(o,e,_),m(o,t,_),T(s,o,_),g=!0},p:z,i(o){g||(M(s.$$.fragment,o),g=!0)},o(o){k(s.$$.fragment,o),g=!1},d(o){o&&(l(e),l(t)),v(s,o)}}}function Qs($){let e,p,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/v4.41.0/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>',pt,ae,ut,ze,ke,Pe="The <code>FlaxRobertaPreLayerNormPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",rt,pe,ht,je,ve,Be,te,P,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/v4.41.0/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,we,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,bt,Yo,Qe,_n="RoBERTa-PreLayerNorm Model with a <code>language modeling</code> head on top.",Kt,Ft,Po=`This model inherits from <a href="/docs/transformers/v4.41.0/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,bn='<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,yo="The <code>FlaxRobertaPreLayerNormPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",Se,He,cn,yt,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.`,mo,Lt,Ve=`This model inherits from <a href="/docs/transformers/v4.41.0/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)`,po,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,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>',Ye,Ie,dt,wo,Oe,$o="The <code>FlaxRobertaPreLayerNormPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",Fo,Ct,mn,kt,to,ho,Ne,Y,vt,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/v4.41.0/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,pn=`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,yn="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,wt,so,ao,nt,he,A,ro,zt,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,Pt,Wo=`This model inherits from <a href="/docs/transformers/v4.41.0/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>',mt,be,Jo,zo,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/v4.41.0/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.`,me,Eo,vn="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,bo,gn,xn,Mn,Rn="The <code>FlaxRobertaPreLayerNormPreTrainedModel</code> forward method, overrides the <code>__call__</code> special method.",Cn,wn,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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L991"}}),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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L820",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — 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/v4.41.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),pe=new ye({props:{$$slots:{default:[Js]},$$scope:{ctx:$}}}),je=new Te({props:{anchor:"transformers.FlaxRobertaPreLayerNormModel.__call__.example",$$slots:{default:[zs]},$$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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1471"}}),$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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForCausalLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L820",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — 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/v4.41.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ht=new ye({props:{$$slots:{default:[Ps]},$$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"}}),bt=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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1069"}}),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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForMaskedLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L820",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — 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/v4.41.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),He=new ye({props:{$$slots:{default:[Ws]},$$scope:{ctx:$}}}),yt=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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1139"}}),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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForSequenceClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L820",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, config.num_labels)</code>) — 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/v4.41.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ct=new ye({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"}}),vt=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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1221"}}),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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForMultipleChoice.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L820",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, num_choices)</code>) — <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/v4.41.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ct=new ye({props:{$$slots:{default:[Bs]},$$scope:{ctx:$}}}),wt=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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1305"}}),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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForTokenClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L820",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) — 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/v4.41.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),io=new ye({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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig">RobertaPreLayerNormConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.41.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L1383"}}),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/v4.41.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.41.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.`,name:"position_ids"},{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/modeling_flax_roberta_prelayernorm.py#L820",returnDescription:`<script context="module">export const metadata = 'undefined';<\/script>


<p>A <a
  href="/docs/transformers/v4.41.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormConfig"
>RobertaPreLayerNormConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) — 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/v4.41.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),wn=new ye({props:{$$slots:{default:[Xs]},$$scope:{ctx:$}}}),$n=new Te({props:{anchor:"transformers.FlaxRobertaPreLayerNormForQuestionAnswering.__call__.example",$$slots:{default:[As]},$$scope:{ctx:$}}}),{c(){b(e.$$.fragment),p=r(),t=d("div"),b(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,pt=r(),ae=d("div"),b(ut.$$.fragment),ze=r(),ke=d("p"),ke.innerHTML=Pe,rt=r(),b(pe.$$.fragment),ht=r(),b(je.$$.fragment),ve=r(),b(Be.$$.fragment),te=r(),P=d("div"),b(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(),we=d("p"),we.textContent=qt,gt=r(),ue=d("ul"),ue.innerHTML=_t,F=r(),L=d("div"),b($e.$$.fragment),Bt=r(),$t=d("p"),$t.innerHTML=dn,Ke=r(),b(Ht.$$.fragment),Fe=r(),b(et.$$.fragment),We=r(),b(Ae.$$.fragment),So=r(),ie=d("div"),b(bt.$$.fragment),Yo=r(),Qe=d("p"),Qe.innerHTML=_n,Kt=r(),Ft=d("p"),Ft.innerHTML=Po,Go=r(),q=d("p"),q.innerHTML=Nt,Oo=r(),lt=d("p"),lt.textContent=kn,Do=r(),Ee=d("ul"),Ee.innerHTML=bn,eo=r(),Ze=d("div"),b(xt.$$.fragment),Xo=r(),oe=d("p"),oe.innerHTML=yo,Se=r(),b(He.$$.fragment),cn=r(),b(yt.$$.fragment),To=r(),b(Mo.$$.fragment),Vt=r(),le=d("div"),b(Tt.$$.fragment),Ko=r(),de=d("p"),de.textContent=co,mo=r(),Lt=d("p"),Lt.innerHTML=Ve,po=r(),Mt=d("p"),Mt.innerHTML=Uo,uo=r(),ko=d("p"),ko.textContent=Rt,en=r(),jt=d("ul"),jt.innerHTML=vo,Ye=r(),Ie=d("div"),b(dt.$$.fragment),wo=r(),Oe=d("p"),Oe.innerHTML=$o,Fo=r(),b(Ct.$$.fragment),mn=r(),b(kt.$$.fragment),to=r(),b(ho.$$.fragment),Ne=r(),Y=d("div"),b(vt.$$.fragment),fo=r(),_e=d("p"),_e.textContent=No,oo=r(),Gt=d("p"),Gt.innerHTML=xo,Ao=r(),tt=d("p"),tt.innerHTML=pn,Ge=r(),ot=d("p"),ot.textContent=yn,Lo=r(),Jt=d("ul"),Jt.innerHTML=un,Ce=r(),Xe=d("div"),b(go.$$.fragment),Xt=r(),Qo=d("p"),Qo.innerHTML=hn,Je=r(),b(ct.$$.fragment),no=r(),b(wt.$$.fragment),so=r(),b(ao.$$.fragment),nt=r(),he=d("div"),b(A.$$.fragment),ro=r(),zt=d("p"),zt.textContent=Ro,De=r(),Pt=d("p"),Pt.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,mt=r(),be=d("div"),b(Jo.$$.fragment),zo=r(),Ut=d("p"),Ut.innerHTML=fn,st=r(),b(io.$$.fragment),at=r(),b(Wt.$$.fragment),n=r(),b(h.$$.fragment),fe=r(),I=d("div"),b(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,me=r(),Eo=d("p"),Eo.textContent=vn,Fn=r(),Tn=d("ul"),Tn.innerHTML=Ln,Nn=r(),bo=d("div"),b(gn.$$.fragment),xn=r(),Mn=d("p"),Mn.innerHTML=Rn,Cn=r(),b(wn.$$.fragment),Jn=r(),b($n.$$.fragment),this.h()},l(w){y(e.$$.fragment,w),p=i(w),t=c(w,"DIV",{class:!0});var x=U(t);y(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-1rwf53j"&&(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),pt=i(x),ae=c(x,"DIV",{class:!0});var tn=U(ae);y(ut.$$.fragment,tn),ze=i(tn),ke=c(tn,"P",{"data-svelte-h":!0}),u(ke)!=="svelte-1hfv2ik"&&(ke.innerHTML=Pe),rt=i(tn),y(pe.$$.fragment,tn),ht=i(tn),y(je.$$.fragment,tn),tn.forEach(l),x.forEach(l),ve=i(w),y(Be.$$.fragment,w),te=i(w),P=c(w,"DIV",{class:!0});var At=U(P);y(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-1rwf53j"&&(Ue.innerHTML=It),Dt=i(At),re=c(At,"P",{"data-svelte-h":!0}),u(re)!=="svelte-10nfsf3"&&(re.innerHTML=lo),X=i(At),we=c(At,"P",{"data-svelte-h":!0}),u(we)!=="svelte-1pplc4a"&&(we.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);y($e.$$.fragment,on),Bt=i(on),$t=c(on,"P",{"data-svelte-h":!0}),u($t)!=="svelte-1hfv2ik"&&($t.innerHTML=dn),Ke=i(on),y(Ht.$$.fragment,on),Fe=i(on),y(et.$$.fragment,on),on.forEach(l),At.forEach(l),We=i(w),y(Ae.$$.fragment,w),So=i(w),ie=c(w,"DIV",{class:!0});var Qt=U(ie);y(bt.$$.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-1rwf53j"&&(Ft.innerHTML=Po),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=bn),eo=i(Qt),Ze=c(Qt,"DIV",{class:!0});var nn=U(Ze);y(xt.$$.fragment,nn),Xo=i(nn),oe=c(nn,"P",{"data-svelte-h":!0}),u(oe)!=="svelte-1hfv2ik"&&(oe.innerHTML=yo),Se=i(nn),y(He.$$.fragment,nn),cn=i(nn),y(yt.$$.fragment,nn),nn.forEach(l),Qt.forEach(l),To=i(w),y(Mo.$$.fragment,w),Vt=i(w),le=c(w,"DIV",{class:!0});var Et=U(le);y(Tt.$$.fragment,Et),Ko=i(Et),de=c(Et,"P",{"data-svelte-h":!0}),u(de)!=="svelte-1xx59cl"&&(de.textContent=co),mo=i(Et),Lt=c(Et,"P",{"data-svelte-h":!0}),u(Lt)!=="svelte-1rwf53j"&&(Lt.innerHTML=Ve),po=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=vo),Ye=i(Et),Ie=c(Et,"DIV",{class:!0});var sn=U(Ie);y(dt.$$.fragment,sn),wo=i(sn),Oe=c(sn,"P",{"data-svelte-h":!0}),u(Oe)!=="svelte-1hfv2ik"&&(Oe.innerHTML=$o),Fo=i(sn),y(Ct.$$.fragment,sn),mn=i(sn),y(kt.$$.fragment,sn),sn.forEach(l),Et.forEach(l),to=i(w),y(ho.$$.fragment,w),Ne=i(w),Y=c(w,"DIV",{class:!0});var St=U(Y);y(vt.$$.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-1rwf53j"&&(Gt.innerHTML=xo),Ao=i(St),tt=c(St,"P",{"data-svelte-h":!0}),u(tt)!=="svelte-10nfsf3"&&(tt.innerHTML=pn),Ge=i(St),ot=c(St,"P",{"data-svelte-h":!0}),u(ot)!=="svelte-1pplc4a"&&(ot.textContent=yn),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);y(go.$$.fragment,an),Xt=i(an),Qo=c(an,"P",{"data-svelte-h":!0}),u(Qo)!=="svelte-1hfv2ik"&&(Qo.innerHTML=hn),Je=i(an),y(ct.$$.fragment,an),no=i(an),y(wt.$$.fragment,an),an.forEach(l),St.forEach(l),so=i(w),y(ao.$$.fragment,w),nt=i(w),he=c(w,"DIV",{class:!0});var Yt=U(he);y(A.$$.fragment,Yt),ro=i(Yt),zt=c(Yt,"P",{"data-svelte-h":!0}),u(zt)!=="svelte-kne6bs"&&(zt.textContent=Ro),De=i(Yt),Pt=c(Yt,"P",{"data-svelte-h":!0}),u(Pt)!=="svelte-1rwf53j"&&(Pt.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),mt=i(Yt),be=c(Yt,"DIV",{class:!0});var rn=U(be);y(Jo.$$.fragment,rn),zo=i(rn),Ut=c(rn,"P",{"data-svelte-h":!0}),u(Ut)!=="svelte-1hfv2ik"&&(Ut.innerHTML=fn),st=i(rn),y(io.$$.fragment,rn),at=i(rn),y(Wt.$$.fragment,rn),rn.forEach(l),Yt.forEach(l),n=i(w),y(h.$$.fragment,w),fe=i(w),I=c(w,"DIV",{class:!0});var Ot=U(I);y(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-1rwf53j"&&(B.innerHTML=xe),E=i(Ot),K=c(Ot,"P",{"data-svelte-h":!0}),u(K)!=="svelte-10nfsf3"&&(K.innerHTML=ee),me=i(Ot),Eo=c(Ot,"P",{"data-svelte-h":!0}),u(Eo)!=="svelte-1pplc4a"&&(Eo.textContent=vn),Fn=i(Ot),Tn=c(Ot,"UL",{"data-svelte-h":!0}),u(Tn)!=="svelte-1w7z84m"&&(Tn.innerHTML=Ln),Nn=i(Ot),bo=c(Ot,"DIV",{class:!0});var ln=U(bo);y(gn.$$.fragment,ln),xn=i(ln),Mn=c(ln,"P",{"data-svelte-h":!0}),u(Mn)!=="svelte-1hfv2ik"&&(Mn.innerHTML=Rn),Cn=i(ln),y(wn.$$.fragment,ln),Jn=i(ln),y($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(P,"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(be,"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(bo,"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(w,x){T(e,w,x),m(w,p,x),m(w,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,pt),a(t,ae),T(ut,ae,null),a(ae,ze),a(ae,ke),a(ae,rt),T(pe,ae,null),a(ae,ht),T(je,ae,null),m(w,ve,x),T(Be,w,x),m(w,te,x),m(w,P,x),T(ge,P,null),a(P,ft),a(P,S),a(P,it),a(P,Ue),a(P,Dt),a(P,re),a(P,X),a(P,we),a(P,gt),a(P,ue),a(P,F),a(P,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),m(w,We,x),T(Ae,w,x),m(w,So,x),m(w,ie,x),T(bt,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(yt,Ze,null),m(w,To,x),T(Mo,w,x),m(w,Vt,x),m(w,le,x),T(Tt,le,null),a(le,Ko),a(le,de),a(le,mo),a(le,Lt),a(le,po),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,wo),a(Ie,Oe),a(Ie,Fo),T(Ct,Ie,null),a(Ie,mn),T(kt,Ie,null),m(w,to,x),T(ho,w,x),m(w,Ne,x),m(w,Y,x),T(vt,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(wt,Xe,null),m(w,so,x),T(ao,w,x),m(w,nt,x),m(w,he,x),T(A,he,null),a(he,ro),a(he,zt),a(he,De),a(he,Pt),a(he,Zo),a(he,Io),a(he,Bo),a(he,Ho),a(he,jo),a(he,qe),a(he,mt),a(he,be),T(Jo,be,null),a(be,zo),a(be,Ut),a(be,st),T(io,be,null),a(be,at),T(Wt,be,null),m(w,n,x),T(h,w,x),m(w,fe,x),m(w,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,me),a(I,Eo),a(I,Fn),a(I,Tn),a(I,Nn),a(I,bo),T(gn,bo,null),a(bo,xn),a(bo,Mn),a(bo,Cn),T(wn,bo,null),a(bo,Jn),T($n,bo,null),jn=!0},p(w,x){const tn={};x&2&&(tn.$$scope={dirty:x,ctx:w}),pe.$set(tn);const At={};x&2&&(At.$$scope={dirty:x,ctx:w}),je.$set(At);const on={};x&2&&(on.$$scope={dirty:x,ctx:w}),Ht.$set(on);const Qt={};x&2&&(Qt.$$scope={dirty:x,ctx:w}),et.$set(Qt);const nn={};x&2&&(nn.$$scope={dirty:x,ctx:w}),He.$set(nn);const Et={};x&2&&(Et.$$scope={dirty:x,ctx:w}),yt.$set(Et);const sn={};x&2&&(sn.$$scope={dirty:x,ctx:w}),Ct.$set(sn);const St={};x&2&&(St.$$scope={dirty:x,ctx:w}),kt.$set(St);const an={};x&2&&(an.$$scope={dirty:x,ctx:w}),ct.$set(an);const Yt={};x&2&&(Yt.$$scope={dirty:x,ctx:w}),wt.$set(Yt);const rn={};x&2&&(rn.$$scope={dirty:x,ctx:w}),io.$set(rn);const Ot={};x&2&&(Ot.$$scope={dirty:x,ctx:w}),Wt.$set(Ot);const ln={};x&2&&(ln.$$scope={dirty:x,ctx:w}),wn.$set(ln);const Pn={};x&2&&(Pn.$$scope={dirty:x,ctx:w}),$n.$set(Pn)},i(w){jn||(M(e.$$.fragment,w),M(s.$$.fragment,w),M(ut.$$.fragment,w),M(pe.$$.fragment,w),M(je.$$.fragment,w),M(Be.$$.fragment,w),M(ge.$$.fragment,w),M($e.$$.fragment,w),M(Ht.$$.fragment,w),M(et.$$.fragment,w),M(Ae.$$.fragment,w),M(bt.$$.fragment,w),M(xt.$$.fragment,w),M(He.$$.fragment,w),M(yt.$$.fragment,w),M(Mo.$$.fragment,w),M(Tt.$$.fragment,w),M(dt.$$.fragment,w),M(Ct.$$.fragment,w),M(kt.$$.fragment,w),M(ho.$$.fragment,w),M(vt.$$.fragment,w),M(go.$$.fragment,w),M(ct.$$.fragment,w),M(wt.$$.fragment,w),M(ao.$$.fragment,w),M(A.$$.fragment,w),M(Jo.$$.fragment,w),M(io.$$.fragment,w),M(Wt.$$.fragment,w),M(h.$$.fragment,w),M(ne.$$.fragment,w),M(gn.$$.fragment,w),M(wn.$$.fragment,w),M($n.$$.fragment,w),jn=!0)},o(w){k(e.$$.fragment,w),k(s.$$.fragment,w),k(ut.$$.fragment,w),k(pe.$$.fragment,w),k(je.$$.fragment,w),k(Be.$$.fragment,w),k(ge.$$.fragment,w),k($e.$$.fragment,w),k(Ht.$$.fragment,w),k(et.$$.fragment,w),k(Ae.$$.fragment,w),k(bt.$$.fragment,w),k(xt.$$.fragment,w),k(He.$$.fragment,w),k(yt.$$.fragment,w),k(Mo.$$.fragment,w),k(Tt.$$.fragment,w),k(dt.$$.fragment,w),k(Ct.$$.fragment,w),k(kt.$$.fragment,w),k(ho.$$.fragment,w),k(vt.$$.fragment,w),k(go.$$.fragment,w),k(ct.$$.fragment,w),k(wt.$$.fragment,w),k(ao.$$.fragment,w),k(A.$$.fragment,w),k(Jo.$$.fragment,w),k(io.$$.fragment,w),k(Wt.$$.fragment,w),k(h.$$.fragment,w),k(ne.$$.fragment,w),k(gn.$$.fragment,w),k(wn.$$.fragment,w),k($n.$$.fragment,w),jn=!1},d(w){w&&(l(p),l(t),l(ve),l(te),l(P),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)),v(e,w),v(s),v(ut),v(pe),v(je),v(Be,w),v(ge),v($e),v(Ht),v(et),v(Ae,w),v(bt),v(xt),v(He),v(yt),v(Mo,w),v(Tt),v(dt),v(Ct),v(kt),v(ho,w),v(vt),v(go),v(ct),v(wt),v(ao,w),v(A),v(Jo),v(io),v(Wt),v(h,w),v(ne),v(gn),v(wn),v($n)}}}function Es($){let e,p;return e=new zn({props:{$$slots:{default:[Qs]},$$scope:{ctx:$}}}),{c(){b(e.$$.fragment)},l(t){y(e.$$.fragment,t)},m(t,s){T(e,t,s),p=!0},p(t,s){const g={};s&2&&(g.$$scope={dirty:s,ctx:t}),e.$set(g)},i(t){p||(M(e.$$.fragment,t),p=!0)},o(t){k(e.$$.fragment,t),p=!1},d(t){v(e,t)}}}function Ss($){let e,p,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>.`,pt,ae,ut,ze,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>',Pe,rt,pe,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>',ve,Be,te,P,ge,ft,S,Zt=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormModel">RobertaPreLayerNormModel</a> or a <a href="/docs/transformers/v4.41.0/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/v4.41.0/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/v4.41.0/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,Dt,re,lo,X,we,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/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormModel">RobertaPreLayerNormModel</a> or <a href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormModel">TFRobertaPreLayerNormModel</a>.`,name:"vocab_size"},{anchor:"transformers.RobertaPreLayerNormConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.RobertaPreLayerNormConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.RobertaPreLayerNormConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.RobertaPreLayerNormConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.RobertaPreLayerNormConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.RobertaPreLayerNormConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.RobertaPreLayerNormConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.RobertaPreLayerNormConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.RobertaPreLayerNormConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.RobertaPreLayerNormModel">RobertaPreLayerNormModel</a> or <a href="/docs/transformers/v4.41.0/en/model_doc/roberta-prelayernorm#transformers.TFRobertaPreLayerNormModel">TFRobertaPreLayerNormModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.RobertaPreLayerNormConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.RobertaPreLayerNormConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.RobertaPreLayerNormConfig.position_embedding_type",description:`<strong>position_embedding_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;absolute&quot;</code>) &#x2014;
Type of position embedding. Choose one of <code>&quot;absolute&quot;</code>, <code>&quot;relative_key&quot;</code>, <code>&quot;relative_key_query&quot;</code>. For
positional embeddings use <code>&quot;absolute&quot;</code>. For more information on <code>&quot;relative_key&quot;</code>, please refer to
<a href="https://arxiv.org/abs/1803.02155" rel="nofollow">Self-Attention with Relative Position Representations (Shaw et al.)</a>.
For more information on <code>&quot;relative_key_query&quot;</code>, please refer to <em>Method 4</em> in <a href="https://arxiv.org/abs/2009.13658" rel="nofollow">Improve Transformer Models
with Better Relative Position Embeddings (Huang et al.)</a>.`,name:"position_embedding_type"},{anchor:"transformers.RobertaPreLayerNormConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model is used as a decoder or not. If <code>False</code>, the model is used as an encoder.`,name:"is_decoder"},{anchor:"transformers.RobertaPreLayerNormConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.RobertaPreLayerNormConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"}],source:"https://github.com/huggingface/transformers/blob/v4.41.0/src/transformers/models/roberta_prelayernorm/configuration_roberta_prelayernorm.py#L29"}}),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"),p=r(),t=d("p"),s=r(),b(g.$$.fragment),o=r(),b(_.$$.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,pt=r(),b(ae.$$.fragment),ut=r(),ze=d("ul"),ze.innerHTML=ke,Pe=r(),b(rt.$$.fragment),pe=r(),ht=d("ul"),ht.innerHTML=je,ve=r(),b(Be.$$.fragment),te=r(),P=d("div"),b(ge.$$.fragment),ft=r(),S=d("p"),S.innerHTML=Zt,it=r(),Ue=d("p"),Ue.innerHTML=It,Dt=r(),b(re.$$.fragment),lo=r(),b(X.$$.fragment),we=r(),b(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),p=i(F),t=c(F,"P",{}),U(t).forEach(l),s=i(F),y(g.$$.fragment,F),o=i(F),y(_.$$.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),pt=i(F),y(ae.$$.fragment,F),ut=i(F),ze=c(F,"UL",{"data-svelte-h":!0}),u(ze)!=="svelte-1xkplwx"&&(ze.innerHTML=ke),Pe=i(F),y(rt.$$.fragment,F),pe=i(F),ht=c(F,"UL",{"data-svelte-h":!0}),u(ht)!=="svelte-p1b16m"&&(ht.innerHTML=je),ve=i(F),y(Be.$$.fragment,F),te=i(F),P=c(F,"DIV",{class:!0});var $e=U(P);y(ge.$$.fragment,$e),ft=i($e),S=c($e,"P",{"data-svelte-h":!0}),u(S)!=="svelte-1b91zcm"&&(S.innerHTML=Zt),it=i($e),Ue=c($e,"P",{"data-svelte-h":!0}),u(Ue)!=="svelte-1j16s4x"&&(Ue.innerHTML=It),Dt=i($e),y(re.$$.fragment,$e),$e.forEach(l),lo=i(F),y(X.$$.fragment,F),we=i(F),y(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(P,"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),m(F,p,L),m(F,t,L),m(F,s,L),T(g,F,L),m(F,o,L),T(_,F,L),m(F,H,L),m(F,C,L),m(F,V,L),m(F,J,L),m(F,G,L),m(F,f,L),m(F,Re,L),m(F,ce,L),m(F,pt,L),T(ae,F,L),m(F,ut,L),m(F,ze,L),m(F,Pe,L),T(rt,F,L),m(F,pe,L),m(F,ht,L),m(F,ve,L),T(Be,F,L),m(F,te,L),m(F,P,L),T(ge,P,null),a(P,ft),a(P,S),a(P,it),a(P,Ue),a(P,Dt),T(re,P,null),m(F,lo,L),T(X,F,L),m(F,we,L),T(qt,F,L),m(F,gt,L),m(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(p),l(t),l(s),l(o),l(H),l(C),l(V),l(J),l(G),l(f),l(Re),l(ce),l(pt),l(ut),l(ze),l(Pe),l(pe),l(ht),l(ve),l(te),l(P),l(lo),l(we),l(gt),l(ue)),l(e),v(g,F),v(_,F),v(ae,F),v(rt,F),v(Be,F),v(ge),v(re),v(X,F),v(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};
