import{S as LJ,i as XJ,s as EJ,e as s,k as p,w as v,t as o,M as jJ,c as a,d as t,m as h,a as r,x as T,h as n,b as c,N as xJ,G as e,g,y as k,q as w,o as F,B as $,v as CJ,L as We}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ue}from"../../chunks/Tip-hf-doc-builder.js";import{D as W}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ze}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ne}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as qe}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";import{P as bg}from"../../chunks/PipelineTag-hf-doc-builder.js";function JJ(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFhMTVJvYmVydGFDb25maWclMkMlMjBYTE1Sb2JlcnRhTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwWExNLVJvQkVSVGElMjB4bG0tcm9iZXJ0YS1iYXNlJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMFhMTVJvYmVydGFDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIweGxtLXJvYmVydGEtYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwWExNUm9iZXJ0YU1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> XLMRobertaConfig, XLMRobertaModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a XLM-RoBERTa xlm-roberta-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = XLMRobertaConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the xlm-roberta-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMRobertaModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=s("p"),M=o("Examples:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Examples:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function zJ(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function UJ(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBYTE1Sb2JlcnRhTW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbS1yb2JlcnRhLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBYTE1Sb2JlcnRhTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbS1yb2JlcnRhLWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, XLMRobertaModel
<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;xlm-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMRobertaModel.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function IJ(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function NJ(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBYTE1Sb2JlcnRhRm9yQ2F1c2FsTE0lMkMlMjBBdXRvQ29uZmlnJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJyb2JlcnRhLWJhc2UlMjIpJTBBY29uZmlnJTIwJTNEJTIwQXV0b0NvbmZpZy5mcm9tX3ByZXRyYWluZWQoJTIycm9iZXJ0YS1iYXNlJTIyKSUwQWNvbmZpZy5pc19kZWNvZGVyJTIwJTNEJTIwVHJ1ZSUwQW1vZGVsJTIwJTNEJTIwWExNUm9iZXJ0YUZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJyb2JlcnRhLWJhc2UlMjIlMkMlMjBjb25maWclM0Rjb25maWcpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFwcmVkaWN0aW9uX2xvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, XLMRobertaForCausalLM, 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;roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>config = AutoConfig.from_pretrained(<span class="hljs-string">&quot;roberta-base&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 = XLMRobertaForCausalLM.from_pretrained(<span class="hljs-string">&quot;roberta-base&quot;</span>, config=config)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>prediction_logits = outputs.logits`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function qJ(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function WJ(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBYTE1Sb2JlcnRhRm9yTWFza2VkTE0lMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbS1yb2JlcnRhLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBYTE1Sb2JlcnRhRm9yTWFza2VkTE0uZnJvbV9wcmV0cmFpbmVkKCUyMnhsbS1yb2JlcnRhLWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwJTNDbWFzayUzRS4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwcmV0cmlldmUlMjBpbmRleCUyMG9mJTIwJTNDbWFzayUzRSUwQW1hc2tfdG9rZW5faW5kZXglMjAlM0QlMjAoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkKSU1QjAlNUQubm9uemVybyhhc190dXBsZSUzRFRydWUpJTVCMCU1RCUwQSUwQXByZWRpY3RlZF90b2tlbl9pZCUyMCUzRCUyMGxvZ2l0cyU1QjAlMkMlMjBtYXNrX3Rva2VuX2luZGV4JTVELmFyZ21heChheGlzJTNELTEpJTBBdG9rZW5pemVyLmRlY29kZShwcmVkaWN0ZWRfdG9rZW5faWQpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwUGFyaXMuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMjMlMjBtYXNrJTIwbGFiZWxzJTIwb2YlMjBub24tJTNDbWFzayUzRSUyMHRva2VucyUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLndoZXJlKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCUyQyUyMGxhYmVscyUyQyUyMC0xMDApJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKSUwQXJvdW5kKG91dHB1dHMubG9zcy5pdGVtKCklMkMlMjAyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, XLMRobertaForMaskedLM
<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;xlm-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMRobertaForMaskedLM.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&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.1</span>`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function ZJ(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function AJ(L){let d,M,u,f,b;return f=new Ze({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFhMTVJvYmVydGFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyY2FyZGlmZm5scCUyRnR3aXR0ZXItcm9iZXJ0YS1iYXNlLWVtb3Rpb24lMjIpJTBBbW9kZWwlMjAlM0QlMjBYTE1Sb2JlcnRhRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyY2FyZGlmZm5scCUyRnR3aXR0ZXItcm9iZXJ0YS1iYXNlLWVtb3Rpb24lMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwbG9naXRzLmFyZ21heCgpLml0ZW0oKSUwQW1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9jbGFzc19pZCU1RCUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMFhMTVJvYmVydGFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJjYXJkaWZmbmxwJTJGdHdpdHRlci1yb2JlcnRhLWJhc2UtZW1vdGlvbiUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcyUwQXJvdW5kKGxvc3MuaXRlbSgpJTJDJTIwMik=",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, XLMRobertaForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMRobertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&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>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;optimism&#x27;</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 = XLMRobertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&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
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.08</span>`}}),{c(){d=s("p"),M=o("Example of single-label classification:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example of single-label classification:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function BJ(L){let d,M,u,f,b;return f=new Ze({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFhMTVJvYmVydGFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyY2FyZGlmZm5scCUyRnR3aXR0ZXItcm9iZXJ0YS1iYXNlLWVtb3Rpb24lMjIpJTBBbW9kZWwlMjAlM0QlMjBYTE1Sb2JlcnRhRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyY2FyZGlmZm5scCUyRnR3aXR0ZXItcm9iZXJ0YS1iYXNlLWVtb3Rpb24lMjIlMkMlMjBwcm9ibGVtX3R5cGUlM0QlMjJtdWx0aV9sYWJlbF9jbGFzc2lmaWNhdGlvbiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWRzJTIwJTNEJTIwdG9yY2guYXJhbmdlKDAlMkMlMjBsb2dpdHMuc2hhcGUlNUItMSU1RCklNUJ0b3JjaC5zaWdtb2lkKGxvZ2l0cykuc3F1ZWV6ZShkaW0lM0QwKSUyMCUzRSUyMDAuNSU1RCUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMFhMTVJvYmVydGFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJjYXJkaWZmbmxwJTJGdHdpdHRlci1yb2JlcnRhLWJhc2UtZW1vdGlvbiUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, XLMRobertaForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMRobertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&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 = XLMRobertaForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.<span class="hljs-built_in">sum</span>(
<span class="hljs-meta">... </span>    torch.nn.functional.one_hot(predicted_class_ids[<span class="hljs-literal">None</span>, :].clone(), num_classes=num_labels), dim=<span class="hljs-number">1</span>
<span class="hljs-meta">... </span>).to(torch.<span class="hljs-built_in">float</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=s("p"),M=o("Example of multi-label classification:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example of multi-label classification:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function GJ(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function SJ(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBYTE1Sb2JlcnRhRm9yTXVsdGlwbGVDaG9pY2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbS1yb2JlcnRhLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBYTE1Sb2JlcnRhRm9yTXVsdGlwbGVDaG9pY2UuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbS1yb2JlcnRhLWJhc2UlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIySW4lMjBJdGFseSUyQyUyMHBpenphJTIwc2VydmVkJTIwaW4lMjBmb3JtYWwlMjBzZXR0aW5ncyUyQyUyMHN1Y2glMjBhcyUyMGF0JTIwYSUyMHJlc3RhdXJhbnQlMkMlMjBpcyUyMHByZXNlbnRlZCUyMHVuc2xpY2VkLiUyMiUwQWNob2ljZTAlMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aXRoJTIwYSUyMGZvcmslMjBhbmQlMjBhJTIwa25pZmUuJTIyJTBBY2hvaWNlMSUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdoaWxlJTIwaGVsZCUyMGluJTIwdGhlJTIwaGFuZC4lMjIlMEFsYWJlbHMlMjAlM0QlMjB0b3JjaC50ZW5zb3IoMCkudW5zcXVlZXplKDApJTIwJTIwJTIzJTIwY2hvaWNlMCUyMGlzJTIwY29ycmVjdCUyMChhY2NvcmRpbmclMjB0byUyMFdpa2lwZWRpYSUyMCUzQikpJTJDJTIwYmF0Y2glMjBzaXplJTIwMSUwQSUwQWVuY29kaW5nJTIwJTNEJTIwdG9rZW5pemVyKCU1QnByb21wdCUyQyUyMHByb21wdCU1RCUyQyUyMCU1QmNob2ljZTAlMkMlMjBjaG9pY2UxJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUyQyUyMHBhZGRpbmclM0RUcnVlKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKiU3QmslM0ElMjB2LnVuc3F1ZWV6ZSgwKSUyMGZvciUyMGslMkMlMjB2JTIwaW4lMjBlbmNvZGluZy5pdGVtcygpJTdEJTJDJTIwbGFiZWxzJTNEbGFiZWxzKSUyMCUyMCUyMyUyMGJhdGNoJTIwc2l6ZSUyMGlzJTIwMSUwQSUwQSUyMyUyMHRoZSUyMGxpbmVhciUyMGNsYXNzaWZpZXIlMjBzdGlsbCUyMG5lZWRzJTIwdG8lMjBiZSUyMHRyYWluZWQlMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3NzJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, XLMRobertaForMultipleChoice
<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;xlm-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMRobertaForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice0 = <span class="hljs-string">&quot;It is eaten with a fork and a knife.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice1 = <span class="hljs-string">&quot;It is eaten while held in the hand.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor(<span class="hljs-number">0</span>).unsqueeze(<span class="hljs-number">0</span>)  <span class="hljs-comment"># choice0 is correct (according to Wikipedia ;)), batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**{k: v.unsqueeze(<span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()}, labels=labels)  <span class="hljs-comment"># batch size is 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function VJ(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function PJ(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBYTE1Sb2JlcnRhRm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIySmVhbi1CYXB0aXN0ZSUyRnJvYmVydGEtbGFyZ2UtbmVyLWVuZ2xpc2glMjIpJTBBbW9kZWwlMjAlM0QlMjBYTE1Sb2JlcnRhRm9yVG9rZW5DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIySmVhbi1CYXB0aXN0ZSUyRnJvYmVydGEtbGFyZ2UtbmVyLWVuZ2xpc2glMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUwQSUyMCUyMCUyMCUyMCUyMkh1Z2dpbmdGYWNlJTIwaXMlMjBhJTIwY29tcGFueSUyMGJhc2VkJTIwaW4lMjBQYXJpcyUyMGFuZCUyME5ldyUyMFlvcmslMjIlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RGYWxzZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMEEpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSklMEElMEElMjMlMjBOb3RlJTIwdGhhdCUyMHRva2VucyUyMGFyZSUyMGNsYXNzaWZpZWQlMjByYXRoZXIlMjB0aGVuJTIwaW5wdXQlMjB3b3JkcyUyMHdoaWNoJTIwbWVhbnMlMjB0aGF0JTBBJTIzJTIwdGhlcmUlMjBtaWdodCUyMGJlJTIwbW9yZSUyMHByZWRpY3RlZCUyMHRva2VuJTIwY2xhc3NlcyUyMHRoYW4lMjB3b3Jkcy4lMEElMjMlMjBNdWx0aXBsZSUyMHRva2VuJTIwY2xhc3NlcyUyMG1pZ2h0JTIwYWNjb3VudCUyMGZvciUyMHRoZSUyMHNhbWUlMjB3b3JkJTBBcHJlZGljdGVkX3Rva2Vuc19jbGFzc2VzJTIwJTNEJTIwJTVCbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCdC5pdGVtKCklNUQlMjBmb3IlMjB0JTIwaW4lMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTVCMCU1RCU1RCUwQXByZWRpY3RlZF90b2tlbnNfY2xhc3NlcyUwQSUwQWxhYmVscyUyMCUzRCUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlMEFsb3NzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpLmxvc3MlMEFyb3VuZChsb3NzLml0ZW0oKSUyQyUyMDIp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, XLMRobertaForTokenClassification
<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;Jean-Baptiste/roberta-large-ner-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMRobertaForTokenClassification.from_pretrained(<span class="hljs-string">&quot;Jean-Baptiste/roberta-large-ner-english&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>predicted_tokens_classes
[<span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;ORG&#x27;</span>, <span class="hljs-string">&#x27;ORG&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;LOC&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;LOC&#x27;</span>, <span class="hljs-string">&#x27;LOC&#x27;</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
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.01</span>`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function OJ(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function DJ(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBYTE1Sb2JlcnRhRm9yUXVlc3Rpb25BbnN3ZXJpbmclMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmRlZXBzZXQlMkZyb2JlcnRhLWJhc2Utc3F1YWQyJTIyKSUwQW1vZGVsJTIwJTNEJTIwWExNUm9iZXJ0YUZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJkZWVwc2V0JTJGcm9iZXJ0YS1iYXNlLXNxdWFkMiUyMiklMEElMEFxdWVzdGlvbiUyQyUyMHRleHQlMjAlM0QlMjAlMjJXaG8lMjB3YXMlMjBKaW0lMjBIZW5zb24lM0YlMjIlMkMlMjAlMjJKaW0lMjBIZW5zb24lMjB3YXMlMjBhJTIwbmljZSUyMHB1cHBldCUyMiUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihxdWVzdGlvbiUyQyUyMHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNEJTIwb3V0cHV0cy5zdGFydF9sb2dpdHMuYXJnbWF4KCklMEFhbnN3ZXJfZW5kX2luZGV4JTIwJTNEJTIwb3V0cHV0cy5lbmRfbG9naXRzLmFyZ21heCgpJTBBJTBBcHJlZGljdF9hbnN3ZXJfdG9rZW5zJTIwJTNEJTIwaW5wdXRzLmlucHV0X2lkcyU1QjAlMkMlMjBhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0ElMjBhbnN3ZXJfZW5kX2luZGV4JTIwJTJCJTIwMSU1RCUwQXRva2VuaXplci5kZWNvZGUocHJlZGljdF9hbnN3ZXJfdG9rZW5zJTJDJTIwc2tpcF9zcGVjaWFsX3Rva2VucyUzRFRydWUpJTBBJTBBJTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QjE0JTVEKSUwQXRhcmdldF9lbmRfaW5kZXglMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCMTUlNUQpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwc3RhcnRfcG9zaXRpb25zJTNEdGFyZ2V0X3N0YXJ0X2luZGV4JTJDJTIwZW5kX3Bvc2l0aW9ucyUzRHRhcmdldF9lbmRfaW5kZXgpJTBBbG9zcyUyMCUzRCUyMG91dHB1dHMubG9zcyUwQXJvdW5kKGxvc3MuaXRlbSgpJTJDJTIwMik=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, XLMRobertaForQuestionAnswering
<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;deepset/roberta-base-squad2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMRobertaForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;deepset/roberta-base-squad2&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>tokenizer.decode(predict_answer_tokens, skip_special_tokens=<span class="hljs-literal">True</span>)
<span class="hljs-string">&#x27; puppet&#x27;</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
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">0.86</span>`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function QJ(L){let d,M,u,f,b,i,m,X,Me,fe,q,ce,te,R,ye,B,pe,Ce,O,ae,re,G,le,ve,S,Te,ge,Z,ke,ie,oe,j,z,he,Q,_e,me,V,we,be,J,Fe,D,ne,de,Y,ue,$e,N,Re,P,xe,se,C,Le,U,Xe,Ee;return{c(){d=s("p"),M=o("TensorFlow models and layers in "),u=s("code"),f=o("transformers"),b=o(" accept two formats as input:"),i=p(),m=s("ul"),X=s("li"),Me=o("having all inputs as keyword arguments (like PyTorch models), or"),fe=p(),q=s("li"),ce=o("having all inputs as a list, tuple or dict in the first positional argument."),te=p(),R=s("p"),ye=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),B=s("code"),pe=o("model.fit()"),Ce=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=s("code"),ae=o("model.fit()"),re=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=s("code"),le=o("fit()"),ve=o(" and "),S=s("code"),Te=o("predict()"),ge=o(`, such as when creating your own layers or models with
the Keras `),Z=s("code"),ke=o("Functional"),ie=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),j=s("ul"),z=s("li"),he=o("a single Tensor with "),Q=s("code"),_e=o("input_ids"),me=o(" only and nothing else: "),V=s("code"),we=o("model(input_ids)"),be=p(),J=s("li"),Fe=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),ne=o("model([input_ids, attention_mask])"),de=o(" or "),Y=s("code"),ue=o("model([input_ids, attention_mask, token_type_ids])"),$e=p(),N=s("li"),Re=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=s("code"),xe=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),se=p(),C=s("p"),Le=o(`Note that when creating models and layers with
`),U=s("a"),Xe=o("subclassing"),Ee=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=a(y,"P",{});var x=r(d);M=n(x,"TensorFlow models and layers in "),u=a(x,"CODE",{});var Pe=r(u);f=n(Pe,"transformers"),Pe.forEach(t),b=n(x," accept two formats as input:"),x.forEach(t),i=h(y),m=a(y,"UL",{});var K=r(m);X=a(K,"LI",{});var Oe=r(X);Me=n(Oe,"having all inputs as keyword arguments (like PyTorch models), or"),Oe.forEach(t),fe=h(K),q=a(K,"LI",{});var De=r(q);ce=n(De,"having all inputs as a list, tuple or dict in the first positional argument."),De.forEach(t),K.forEach(t),te=h(y),R=a(y,"P",{});var E=r(R);ye=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),B=a(E,"CODE",{});var Qe=r(B);pe=n(Qe,"model.fit()"),Qe.forEach(t),Ce=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=a(E,"CODE",{});var Ye=r(O);ae=n(Ye,"model.fit()"),Ye.forEach(t),re=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a(E,"CODE",{});var Be=r(G);le=n(Be,"fit()"),Be.forEach(t),ve=n(E," and "),S=a(E,"CODE",{});var Je=r(S);Te=n(Je,"predict()"),Je.forEach(t),ge=n(E,`, such as when creating your own layers or models with
the Keras `),Z=a(E,"CODE",{});var ze=r(Z);ke=n(ze,"Functional"),ze.forEach(t),ie=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),oe=h(y),j=a(y,"UL",{});var I=r(j);z=a(I,"LI",{});var A=r(z);he=n(A,"a single Tensor with "),Q=a(A,"CODE",{});var He=r(Q);_e=n(He,"input_ids"),He.forEach(t),me=n(A," only and nothing else: "),V=a(A,"CODE",{});var Ae=r(V);we=n(Ae,"model(input_ids)"),Ae.forEach(t),A.forEach(t),be=h(I),J=a(I,"LI",{});var H=r(J);Fe=n(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=a(H,"CODE",{});var Ge=r(D);ne=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),de=n(H," or "),Y=a(H,"CODE",{});var Ie=r(Y);ue=n(Ie,"model([input_ids, attention_mask, token_type_ids])"),Ie.forEach(t),H.forEach(t),$e=h(I),N=a(I,"LI",{});var je=r(N);Re=n(je,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=a(je,"CODE",{});var Se=r(P);xe=n(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.forEach(t),je.forEach(t),I.forEach(t),se=h(y),C=a(y,"P",{});var ee=r(C);Le=n(ee,`Note that when creating models and layers with
`),U=a(ee,"A",{href:!0,rel:!0});var Ve=r(U);Xe=n(Ve,"subclassing"),Ve.forEach(t),Ee=n(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){c(U,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),c(U,"rel","nofollow")},m(y,x){g(y,d,x),e(d,M),e(d,u),e(u,f),e(d,b),g(y,i,x),g(y,m,x),e(m,X),e(X,Me),e(m,fe),e(m,q),e(q,ce),g(y,te,x),g(y,R,x),e(R,ye),e(R,B),e(B,pe),e(R,Ce),e(R,O),e(O,ae),e(R,re),e(R,G),e(G,le),e(R,ve),e(R,S),e(S,Te),e(R,ge),e(R,Z),e(Z,ke),e(R,ie),g(y,oe,x),g(y,j,x),e(j,z),e(z,he),e(z,Q),e(Q,_e),e(z,me),e(z,V),e(V,we),e(j,be),e(j,J),e(J,Fe),e(J,D),e(D,ne),e(J,de),e(J,Y),e(Y,ue),e(j,$e),e(j,N),e(N,Re),e(N,P),e(P,xe),g(y,se,x),g(y,C,x),e(C,Le),e(C,U),e(U,Xe),e(C,Ee)},d(y){y&&t(d),y&&t(i),y&&t(m),y&&t(te),y&&t(R),y&&t(oe),y&&t(j),y&&t(se),y&&t(C)}}}function YJ(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function HJ(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlhMTVJvYmVydGFNb2RlbCUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeGxtLXJvYmVydGEtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGWExNUm9iZXJ0YU1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJ4bG0tcm9iZXJ0YS1iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFXLMRobertaModel
<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;xlm-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLMRobertaModel.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function KJ(L){let d,M,u,f,b,i,m,X,Me,fe,q,ce,te,R,ye,B,pe,Ce,O,ae,re,G,le,ve,S,Te,ge,Z,ke,ie,oe,j,z,he,Q,_e,me,V,we,be,J,Fe,D,ne,de,Y,ue,$e,N,Re,P,xe,se,C,Le,U,Xe,Ee;return{c(){d=s("p"),M=o("TensorFlow models and layers in "),u=s("code"),f=o("transformers"),b=o(" accept two formats as input:"),i=p(),m=s("ul"),X=s("li"),Me=o("having all inputs as keyword arguments (like PyTorch models), or"),fe=p(),q=s("li"),ce=o("having all inputs as a list, tuple or dict in the first positional argument."),te=p(),R=s("p"),ye=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),B=s("code"),pe=o("model.fit()"),Ce=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=s("code"),ae=o("model.fit()"),re=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=s("code"),le=o("fit()"),ve=o(" and "),S=s("code"),Te=o("predict()"),ge=o(`, such as when creating your own layers or models with
the Keras `),Z=s("code"),ke=o("Functional"),ie=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),j=s("ul"),z=s("li"),he=o("a single Tensor with "),Q=s("code"),_e=o("input_ids"),me=o(" only and nothing else: "),V=s("code"),we=o("model(input_ids)"),be=p(),J=s("li"),Fe=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),ne=o("model([input_ids, attention_mask])"),de=o(" or "),Y=s("code"),ue=o("model([input_ids, attention_mask, token_type_ids])"),$e=p(),N=s("li"),Re=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=s("code"),xe=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),se=p(),C=s("p"),Le=o(`Note that when creating models and layers with
`),U=s("a"),Xe=o("subclassing"),Ee=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=a(y,"P",{});var x=r(d);M=n(x,"TensorFlow models and layers in "),u=a(x,"CODE",{});var Pe=r(u);f=n(Pe,"transformers"),Pe.forEach(t),b=n(x," accept two formats as input:"),x.forEach(t),i=h(y),m=a(y,"UL",{});var K=r(m);X=a(K,"LI",{});var Oe=r(X);Me=n(Oe,"having all inputs as keyword arguments (like PyTorch models), or"),Oe.forEach(t),fe=h(K),q=a(K,"LI",{});var De=r(q);ce=n(De,"having all inputs as a list, tuple or dict in the first positional argument."),De.forEach(t),K.forEach(t),te=h(y),R=a(y,"P",{});var E=r(R);ye=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),B=a(E,"CODE",{});var Qe=r(B);pe=n(Qe,"model.fit()"),Qe.forEach(t),Ce=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=a(E,"CODE",{});var Ye=r(O);ae=n(Ye,"model.fit()"),Ye.forEach(t),re=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a(E,"CODE",{});var Be=r(G);le=n(Be,"fit()"),Be.forEach(t),ve=n(E," and "),S=a(E,"CODE",{});var Je=r(S);Te=n(Je,"predict()"),Je.forEach(t),ge=n(E,`, such as when creating your own layers or models with
the Keras `),Z=a(E,"CODE",{});var ze=r(Z);ke=n(ze,"Functional"),ze.forEach(t),ie=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),oe=h(y),j=a(y,"UL",{});var I=r(j);z=a(I,"LI",{});var A=r(z);he=n(A,"a single Tensor with "),Q=a(A,"CODE",{});var He=r(Q);_e=n(He,"input_ids"),He.forEach(t),me=n(A," only and nothing else: "),V=a(A,"CODE",{});var Ae=r(V);we=n(Ae,"model(input_ids)"),Ae.forEach(t),A.forEach(t),be=h(I),J=a(I,"LI",{});var H=r(J);Fe=n(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=a(H,"CODE",{});var Ge=r(D);ne=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),de=n(H," or "),Y=a(H,"CODE",{});var Ie=r(Y);ue=n(Ie,"model([input_ids, attention_mask, token_type_ids])"),Ie.forEach(t),H.forEach(t),$e=h(I),N=a(I,"LI",{});var je=r(N);Re=n(je,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=a(je,"CODE",{});var Se=r(P);xe=n(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.forEach(t),je.forEach(t),I.forEach(t),se=h(y),C=a(y,"P",{});var ee=r(C);Le=n(ee,`Note that when creating models and layers with
`),U=a(ee,"A",{href:!0,rel:!0});var Ve=r(U);Xe=n(Ve,"subclassing"),Ve.forEach(t),Ee=n(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){c(U,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),c(U,"rel","nofollow")},m(y,x){g(y,d,x),e(d,M),e(d,u),e(u,f),e(d,b),g(y,i,x),g(y,m,x),e(m,X),e(X,Me),e(m,fe),e(m,q),e(q,ce),g(y,te,x),g(y,R,x),e(R,ye),e(R,B),e(B,pe),e(R,Ce),e(R,O),e(O,ae),e(R,re),e(R,G),e(G,le),e(R,ve),e(R,S),e(S,Te),e(R,ge),e(R,Z),e(Z,ke),e(R,ie),g(y,oe,x),g(y,j,x),e(j,z),e(z,he),e(z,Q),e(Q,_e),e(z,me),e(z,V),e(V,we),e(j,be),e(j,J),e(J,Fe),e(J,D),e(D,ne),e(J,de),e(J,Y),e(Y,ue),e(j,$e),e(j,N),e(N,Re),e(N,P),e(P,xe),g(y,se,x),g(y,C,x),e(C,Le),e(C,U),e(U,Xe),e(C,Ee)},d(y){y&&t(d),y&&t(i),y&&t(m),y&&t(te),y&&t(R),y&&t(oe),y&&t(j),y&&t(se),y&&t(C)}}}function ez(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function tz(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlhMTVJvYmVydGFGb3JDYXVzYWxMTSUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeGxtLXJvYmVydGEtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGWExNUm9iZXJ0YUZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJ4bG0tcm9iZXJ0YS1iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFXLMRobertaForCausalLM
<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;xlm-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLMRobertaForCausalLM.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function oz(L){let d,M,u,f,b,i,m,X,Me,fe,q,ce,te,R,ye,B,pe,Ce,O,ae,re,G,le,ve,S,Te,ge,Z,ke,ie,oe,j,z,he,Q,_e,me,V,we,be,J,Fe,D,ne,de,Y,ue,$e,N,Re,P,xe,se,C,Le,U,Xe,Ee;return{c(){d=s("p"),M=o("TensorFlow models and layers in "),u=s("code"),f=o("transformers"),b=o(" accept two formats as input:"),i=p(),m=s("ul"),X=s("li"),Me=o("having all inputs as keyword arguments (like PyTorch models), or"),fe=p(),q=s("li"),ce=o("having all inputs as a list, tuple or dict in the first positional argument."),te=p(),R=s("p"),ye=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),B=s("code"),pe=o("model.fit()"),Ce=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=s("code"),ae=o("model.fit()"),re=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=s("code"),le=o("fit()"),ve=o(" and "),S=s("code"),Te=o("predict()"),ge=o(`, such as when creating your own layers or models with
the Keras `),Z=s("code"),ke=o("Functional"),ie=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),j=s("ul"),z=s("li"),he=o("a single Tensor with "),Q=s("code"),_e=o("input_ids"),me=o(" only and nothing else: "),V=s("code"),we=o("model(input_ids)"),be=p(),J=s("li"),Fe=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),ne=o("model([input_ids, attention_mask])"),de=o(" or "),Y=s("code"),ue=o("model([input_ids, attention_mask, token_type_ids])"),$e=p(),N=s("li"),Re=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=s("code"),xe=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),se=p(),C=s("p"),Le=o(`Note that when creating models and layers with
`),U=s("a"),Xe=o("subclassing"),Ee=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=a(y,"P",{});var x=r(d);M=n(x,"TensorFlow models and layers in "),u=a(x,"CODE",{});var Pe=r(u);f=n(Pe,"transformers"),Pe.forEach(t),b=n(x," accept two formats as input:"),x.forEach(t),i=h(y),m=a(y,"UL",{});var K=r(m);X=a(K,"LI",{});var Oe=r(X);Me=n(Oe,"having all inputs as keyword arguments (like PyTorch models), or"),Oe.forEach(t),fe=h(K),q=a(K,"LI",{});var De=r(q);ce=n(De,"having all inputs as a list, tuple or dict in the first positional argument."),De.forEach(t),K.forEach(t),te=h(y),R=a(y,"P",{});var E=r(R);ye=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),B=a(E,"CODE",{});var Qe=r(B);pe=n(Qe,"model.fit()"),Qe.forEach(t),Ce=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=a(E,"CODE",{});var Ye=r(O);ae=n(Ye,"model.fit()"),Ye.forEach(t),re=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a(E,"CODE",{});var Be=r(G);le=n(Be,"fit()"),Be.forEach(t),ve=n(E," and "),S=a(E,"CODE",{});var Je=r(S);Te=n(Je,"predict()"),Je.forEach(t),ge=n(E,`, such as when creating your own layers or models with
the Keras `),Z=a(E,"CODE",{});var ze=r(Z);ke=n(ze,"Functional"),ze.forEach(t),ie=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),oe=h(y),j=a(y,"UL",{});var I=r(j);z=a(I,"LI",{});var A=r(z);he=n(A,"a single Tensor with "),Q=a(A,"CODE",{});var He=r(Q);_e=n(He,"input_ids"),He.forEach(t),me=n(A," only and nothing else: "),V=a(A,"CODE",{});var Ae=r(V);we=n(Ae,"model(input_ids)"),Ae.forEach(t),A.forEach(t),be=h(I),J=a(I,"LI",{});var H=r(J);Fe=n(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=a(H,"CODE",{});var Ge=r(D);ne=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),de=n(H," or "),Y=a(H,"CODE",{});var Ie=r(Y);ue=n(Ie,"model([input_ids, attention_mask, token_type_ids])"),Ie.forEach(t),H.forEach(t),$e=h(I),N=a(I,"LI",{});var je=r(N);Re=n(je,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=a(je,"CODE",{});var Se=r(P);xe=n(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.forEach(t),je.forEach(t),I.forEach(t),se=h(y),C=a(y,"P",{});var ee=r(C);Le=n(ee,`Note that when creating models and layers with
`),U=a(ee,"A",{href:!0,rel:!0});var Ve=r(U);Xe=n(Ve,"subclassing"),Ve.forEach(t),Ee=n(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){c(U,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),c(U,"rel","nofollow")},m(y,x){g(y,d,x),e(d,M),e(d,u),e(u,f),e(d,b),g(y,i,x),g(y,m,x),e(m,X),e(X,Me),e(m,fe),e(m,q),e(q,ce),g(y,te,x),g(y,R,x),e(R,ye),e(R,B),e(B,pe),e(R,Ce),e(R,O),e(O,ae),e(R,re),e(R,G),e(G,le),e(R,ve),e(R,S),e(S,Te),e(R,ge),e(R,Z),e(Z,ke),e(R,ie),g(y,oe,x),g(y,j,x),e(j,z),e(z,he),e(z,Q),e(Q,_e),e(z,me),e(z,V),e(V,we),e(j,be),e(j,J),e(J,Fe),e(J,D),e(D,ne),e(J,de),e(J,Y),e(Y,ue),e(j,$e),e(j,N),e(N,Re),e(N,P),e(P,xe),g(y,se,x),g(y,C,x),e(C,Le),e(C,U),e(U,Xe),e(C,Ee)},d(y){y&&t(d),y&&t(i),y&&t(m),y&&t(te),y&&t(R),y&&t(oe),y&&t(j),y&&t(se),y&&t(C)}}}function nz(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function sz(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlhMTVJvYmVydGFGb3JNYXNrZWRMTSUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeGxtLXJvYmVydGEtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGWExNUm9iZXJ0YUZvck1hc2tlZExNLmZyb21fcHJldHJhaW5lZCglMjJ4bG0tcm9iZXJ0YS1iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJUaGUlMjBjYXBpdGFsJTIwb2YlMjBGcmFuY2UlMjBpcyUyMCUzQ21hc2slM0UuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBJTIzJTIwcmV0cmlldmUlMjBpbmRleCUyMG9mJTIwJTNDbWFzayUzRSUwQW1hc2tfdG9rZW5faW5kZXglMjAlM0QlMjB0Zi53aGVyZSgoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkKSU1QjAlNUQpJTBBc2VsZWN0ZWRfbG9naXRzJTIwJTNEJTIwdGYuZ2F0aGVyX25kKGxvZ2l0cyU1QjAlNUQlMkMlMjBpbmRpY2VzJTNEbWFza190b2tlbl9pbmRleCklMEElMEFwcmVkaWN0ZWRfdG9rZW5faWQlMjAlM0QlMjB0Zi5tYXRoLmFyZ21heChzZWxlY3RlZF9sb2dpdHMlMkMlMjBheGlzJTNELTEpJTBBdG9rZW5pemVyLmRlY29kZShwcmVkaWN0ZWRfdG9rZW5faWQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFXLMRobertaForMaskedLM
<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;xlm-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLMRobertaForMaskedLM.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is &lt;mask&gt;.&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve index of &lt;mask&gt;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = tf.where((inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>selected_logits = tf.gather_nd(logits[<span class="hljs-number">0</span>], indices=mask_token_index)

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = tf.math.argmax(selected_logits, axis=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predicted_token_id)
<span class="hljs-string">&#x27; Paris&#x27;</span>`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function az(L){let d,M;return d=new Ze({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.1</span>`}}),{c(){v(d.$$.fragment)},l(u){T(d.$$.fragment,u)},m(u,f){k(d,u,f),M=!0},p:We,i(u){M||(w(d.$$.fragment,u),M=!0)},o(u){F(d.$$.fragment,u),M=!1},d(u){$(d,u)}}}function rz(L){let d,M,u,f,b,i,m,X,Me,fe,q,ce,te,R,ye,B,pe,Ce,O,ae,re,G,le,ve,S,Te,ge,Z,ke,ie,oe,j,z,he,Q,_e,me,V,we,be,J,Fe,D,ne,de,Y,ue,$e,N,Re,P,xe,se,C,Le,U,Xe,Ee;return{c(){d=s("p"),M=o("TensorFlow models and layers in "),u=s("code"),f=o("transformers"),b=o(" accept two formats as input:"),i=p(),m=s("ul"),X=s("li"),Me=o("having all inputs as keyword arguments (like PyTorch models), or"),fe=p(),q=s("li"),ce=o("having all inputs as a list, tuple or dict in the first positional argument."),te=p(),R=s("p"),ye=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),B=s("code"),pe=o("model.fit()"),Ce=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=s("code"),ae=o("model.fit()"),re=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=s("code"),le=o("fit()"),ve=o(" and "),S=s("code"),Te=o("predict()"),ge=o(`, such as when creating your own layers or models with
the Keras `),Z=s("code"),ke=o("Functional"),ie=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),j=s("ul"),z=s("li"),he=o("a single Tensor with "),Q=s("code"),_e=o("input_ids"),me=o(" only and nothing else: "),V=s("code"),we=o("model(input_ids)"),be=p(),J=s("li"),Fe=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),ne=o("model([input_ids, attention_mask])"),de=o(" or "),Y=s("code"),ue=o("model([input_ids, attention_mask, token_type_ids])"),$e=p(),N=s("li"),Re=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=s("code"),xe=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),se=p(),C=s("p"),Le=o(`Note that when creating models and layers with
`),U=s("a"),Xe=o("subclassing"),Ee=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=a(y,"P",{});var x=r(d);M=n(x,"TensorFlow models and layers in "),u=a(x,"CODE",{});var Pe=r(u);f=n(Pe,"transformers"),Pe.forEach(t),b=n(x," accept two formats as input:"),x.forEach(t),i=h(y),m=a(y,"UL",{});var K=r(m);X=a(K,"LI",{});var Oe=r(X);Me=n(Oe,"having all inputs as keyword arguments (like PyTorch models), or"),Oe.forEach(t),fe=h(K),q=a(K,"LI",{});var De=r(q);ce=n(De,"having all inputs as a list, tuple or dict in the first positional argument."),De.forEach(t),K.forEach(t),te=h(y),R=a(y,"P",{});var E=r(R);ye=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),B=a(E,"CODE",{});var Qe=r(B);pe=n(Qe,"model.fit()"),Qe.forEach(t),Ce=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=a(E,"CODE",{});var Ye=r(O);ae=n(Ye,"model.fit()"),Ye.forEach(t),re=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a(E,"CODE",{});var Be=r(G);le=n(Be,"fit()"),Be.forEach(t),ve=n(E," and "),S=a(E,"CODE",{});var Je=r(S);Te=n(Je,"predict()"),Je.forEach(t),ge=n(E,`, such as when creating your own layers or models with
the Keras `),Z=a(E,"CODE",{});var ze=r(Z);ke=n(ze,"Functional"),ze.forEach(t),ie=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),oe=h(y),j=a(y,"UL",{});var I=r(j);z=a(I,"LI",{});var A=r(z);he=n(A,"a single Tensor with "),Q=a(A,"CODE",{});var He=r(Q);_e=n(He,"input_ids"),He.forEach(t),me=n(A," only and nothing else: "),V=a(A,"CODE",{});var Ae=r(V);we=n(Ae,"model(input_ids)"),Ae.forEach(t),A.forEach(t),be=h(I),J=a(I,"LI",{});var H=r(J);Fe=n(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=a(H,"CODE",{});var Ge=r(D);ne=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),de=n(H," or "),Y=a(H,"CODE",{});var Ie=r(Y);ue=n(Ie,"model([input_ids, attention_mask, token_type_ids])"),Ie.forEach(t),H.forEach(t),$e=h(I),N=a(I,"LI",{});var je=r(N);Re=n(je,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=a(je,"CODE",{});var Se=r(P);xe=n(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.forEach(t),je.forEach(t),I.forEach(t),se=h(y),C=a(y,"P",{});var ee=r(C);Le=n(ee,`Note that when creating models and layers with
`),U=a(ee,"A",{href:!0,rel:!0});var Ve=r(U);Xe=n(Ve,"subclassing"),Ve.forEach(t),Ee=n(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){c(U,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),c(U,"rel","nofollow")},m(y,x){g(y,d,x),e(d,M),e(d,u),e(u,f),e(d,b),g(y,i,x),g(y,m,x),e(m,X),e(X,Me),e(m,fe),e(m,q),e(q,ce),g(y,te,x),g(y,R,x),e(R,ye),e(R,B),e(B,pe),e(R,Ce),e(R,O),e(O,ae),e(R,re),e(R,G),e(G,le),e(R,ve),e(R,S),e(S,Te),e(R,ge),e(R,Z),e(Z,ke),e(R,ie),g(y,oe,x),g(y,j,x),e(j,z),e(z,he),e(z,Q),e(Q,_e),e(z,me),e(z,V),e(V,we),e(j,be),e(j,J),e(J,Fe),e(J,D),e(D,ne),e(J,de),e(J,Y),e(Y,ue),e(j,$e),e(j,N),e(N,Re),e(N,P),e(P,xe),g(y,se,x),g(y,C,x),e(C,Le),e(C,U),e(U,Xe),e(C,Ee)},d(y){y&&t(d),y&&t(i),y&&t(m),y&&t(te),y&&t(R),y&&t(oe),y&&t(j),y&&t(se),y&&t(C)}}}function lz(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function iz(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlhMTVJvYmVydGFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJjYXJkaWZmbmxwJTJGdHdpdHRlci1yb2JlcnRhLWJhc2UtZW1vdGlvbiUyMiklMEFtb2RlbCUyMCUzRCUyMFRGWExNUm9iZXJ0YUZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmNhcmRpZmZubHAlMkZ0d2l0dGVyLXJvYmVydGEtYmFzZS1lbW90aW9uJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEElMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwaW50KHRmLm1hdGguYXJnbWF4KGxvZ2l0cyUyQyUyMGF4aXMlM0QtMSklNUIwJTVEKSUwQW1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9jbGFzc19pZCU1RA==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFXLMRobertaForSequenceClassification
<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;cardiffnlp/twitter-roberta-base-emotion&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLMRobertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&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>])
<span class="hljs-meta">&gt;&gt;&gt; </span>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;optimism&#x27;</span>`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function dz(L){let d,M;return d=new Ze({props:{code:"JTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwVEZYTE1Sb2JlcnRhRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyY2FyZGlmZm5scCUyRnR3aXR0ZXItcm9iZXJ0YS1iYXNlLWVtb3Rpb24lMjIlMkMlMjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyklMEElMEFsYWJlbHMlMjAlM0QlMjB0Zi5jb25zdGFudCgxKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcyUwQXJvdW5kKGZsb2F0KGxvc3MpJTJDJTIwMik=",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>
<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 = TFXLMRobertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;cardiffnlp/twitter-roberta-base-emotion&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.constant(<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(loss), <span class="hljs-number">2</span>)
<span class="hljs-number">0.08</span>`}}),{c(){v(d.$$.fragment)},l(u){T(d.$$.fragment,u)},m(u,f){k(d,u,f),M=!0},p:We,i(u){M||(w(d.$$.fragment,u),M=!0)},o(u){F(d.$$.fragment,u),M=!1},d(u){$(d,u)}}}function cz(L){let d,M,u,f,b,i,m,X,Me,fe,q,ce,te,R,ye,B,pe,Ce,O,ae,re,G,le,ve,S,Te,ge,Z,ke,ie,oe,j,z,he,Q,_e,me,V,we,be,J,Fe,D,ne,de,Y,ue,$e,N,Re,P,xe,se,C,Le,U,Xe,Ee;return{c(){d=s("p"),M=o("TensorFlow models and layers in "),u=s("code"),f=o("transformers"),b=o(" accept two formats as input:"),i=p(),m=s("ul"),X=s("li"),Me=o("having all inputs as keyword arguments (like PyTorch models), or"),fe=p(),q=s("li"),ce=o("having all inputs as a list, tuple or dict in the first positional argument."),te=p(),R=s("p"),ye=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),B=s("code"),pe=o("model.fit()"),Ce=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=s("code"),ae=o("model.fit()"),re=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=s("code"),le=o("fit()"),ve=o(" and "),S=s("code"),Te=o("predict()"),ge=o(`, such as when creating your own layers or models with
the Keras `),Z=s("code"),ke=o("Functional"),ie=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),j=s("ul"),z=s("li"),he=o("a single Tensor with "),Q=s("code"),_e=o("input_ids"),me=o(" only and nothing else: "),V=s("code"),we=o("model(input_ids)"),be=p(),J=s("li"),Fe=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),ne=o("model([input_ids, attention_mask])"),de=o(" or "),Y=s("code"),ue=o("model([input_ids, attention_mask, token_type_ids])"),$e=p(),N=s("li"),Re=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=s("code"),xe=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),se=p(),C=s("p"),Le=o(`Note that when creating models and layers with
`),U=s("a"),Xe=o("subclassing"),Ee=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=a(y,"P",{});var x=r(d);M=n(x,"TensorFlow models and layers in "),u=a(x,"CODE",{});var Pe=r(u);f=n(Pe,"transformers"),Pe.forEach(t),b=n(x," accept two formats as input:"),x.forEach(t),i=h(y),m=a(y,"UL",{});var K=r(m);X=a(K,"LI",{});var Oe=r(X);Me=n(Oe,"having all inputs as keyword arguments (like PyTorch models), or"),Oe.forEach(t),fe=h(K),q=a(K,"LI",{});var De=r(q);ce=n(De,"having all inputs as a list, tuple or dict in the first positional argument."),De.forEach(t),K.forEach(t),te=h(y),R=a(y,"P",{});var E=r(R);ye=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),B=a(E,"CODE",{});var Qe=r(B);pe=n(Qe,"model.fit()"),Qe.forEach(t),Ce=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=a(E,"CODE",{});var Ye=r(O);ae=n(Ye,"model.fit()"),Ye.forEach(t),re=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a(E,"CODE",{});var Be=r(G);le=n(Be,"fit()"),Be.forEach(t),ve=n(E," and "),S=a(E,"CODE",{});var Je=r(S);Te=n(Je,"predict()"),Je.forEach(t),ge=n(E,`, such as when creating your own layers or models with
the Keras `),Z=a(E,"CODE",{});var ze=r(Z);ke=n(ze,"Functional"),ze.forEach(t),ie=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),oe=h(y),j=a(y,"UL",{});var I=r(j);z=a(I,"LI",{});var A=r(z);he=n(A,"a single Tensor with "),Q=a(A,"CODE",{});var He=r(Q);_e=n(He,"input_ids"),He.forEach(t),me=n(A," only and nothing else: "),V=a(A,"CODE",{});var Ae=r(V);we=n(Ae,"model(input_ids)"),Ae.forEach(t),A.forEach(t),be=h(I),J=a(I,"LI",{});var H=r(J);Fe=n(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=a(H,"CODE",{});var Ge=r(D);ne=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),de=n(H," or "),Y=a(H,"CODE",{});var Ie=r(Y);ue=n(Ie,"model([input_ids, attention_mask, token_type_ids])"),Ie.forEach(t),H.forEach(t),$e=h(I),N=a(I,"LI",{});var je=r(N);Re=n(je,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=a(je,"CODE",{});var Se=r(P);xe=n(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.forEach(t),je.forEach(t),I.forEach(t),se=h(y),C=a(y,"P",{});var ee=r(C);Le=n(ee,`Note that when creating models and layers with
`),U=a(ee,"A",{href:!0,rel:!0});var Ve=r(U);Xe=n(Ve,"subclassing"),Ve.forEach(t),Ee=n(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){c(U,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),c(U,"rel","nofollow")},m(y,x){g(y,d,x),e(d,M),e(d,u),e(u,f),e(d,b),g(y,i,x),g(y,m,x),e(m,X),e(X,Me),e(m,fe),e(m,q),e(q,ce),g(y,te,x),g(y,R,x),e(R,ye),e(R,B),e(B,pe),e(R,Ce),e(R,O),e(O,ae),e(R,re),e(R,G),e(G,le),e(R,ve),e(R,S),e(S,Te),e(R,ge),e(R,Z),e(Z,ke),e(R,ie),g(y,oe,x),g(y,j,x),e(j,z),e(z,he),e(z,Q),e(Q,_e),e(z,me),e(z,V),e(V,we),e(j,be),e(j,J),e(J,Fe),e(J,D),e(D,ne),e(J,de),e(J,Y),e(Y,ue),e(j,$e),e(j,N),e(N,Re),e(N,P),e(P,xe),g(y,se,x),g(y,C,x),e(C,Le),e(C,U),e(U,Xe),e(C,Ee)},d(y){y&&t(d),y&&t(i),y&&t(m),y&&t(te),y&&t(R),y&&t(oe),y&&t(j),y&&t(se),y&&t(C)}}}function pz(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function hz(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlhMTVJvYmVydGFGb3JNdWx0aXBsZUNob2ljZSUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeGxtLXJvYmVydGEtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMFRGWExNUm9iZXJ0YUZvck11bHRpcGxlQ2hvaWNlLmZyb21fcHJldHJhaW5lZCglMjJ4bG0tcm9iZXJ0YS1iYXNlJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkluJTIwSXRhbHklMkMlMjBwaXp6YSUyMHNlcnZlZCUyMGluJTIwZm9ybWFsJTIwc2V0dGluZ3MlMkMlMjBzdWNoJTIwYXMlMjBhdCUyMGElMjByZXN0YXVyYW50JTJDJTIwaXMlMjBwcmVzZW50ZWQlMjB1bnNsaWNlZC4lMjIlMEFjaG9pY2UwJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2l0aCUyMGElMjBmb3JrJTIwYW5kJTIwYSUyMGtuaWZlLiUyMiUwQWNob2ljZTElMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aGlsZSUyMGhlbGQlMjBpbiUyMHRoZSUyMGhhbmQuJTIyJTBBJTBBZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIoJTVCcHJvbXB0JTJDJTIwcHJvbXB0JTVEJTJDJTIwJTVCY2hvaWNlMCUyQyUyMGNob2ljZTElNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyJTJDJTIwcGFkZGluZyUzRFRydWUpJTBBaW5wdXRzJTIwJTNEJTIwJTdCayUzQSUyMHRmLmV4cGFuZF9kaW1zKHYlMkMlMjAwKSUyMGZvciUyMGslMkMlMjB2JTIwaW4lMjBlbmNvZGluZy5pdGVtcygpJTdEJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0cyklMjAlMjAlMjMlMjBiYXRjaCUyMHNpemUlMjBpcyUyMDElMEElMEElMjMlMjB0aGUlMjBsaW5lYXIlMjBjbGFzc2lmaWVyJTIwc3RpbGwlMjBuZWVkcyUyMHRvJTIwYmUlMjB0cmFpbmVkJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFXLMRobertaForMultipleChoice
<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;xlm-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLMRobertaForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;tf&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = {k: tf.expand_dims(v, <span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()}
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)  <span class="hljs-comment"># batch size is 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function mz(L){let d,M,u,f,b,i,m,X,Me,fe,q,ce,te,R,ye,B,pe,Ce,O,ae,re,G,le,ve,S,Te,ge,Z,ke,ie,oe,j,z,he,Q,_e,me,V,we,be,J,Fe,D,ne,de,Y,ue,$e,N,Re,P,xe,se,C,Le,U,Xe,Ee;return{c(){d=s("p"),M=o("TensorFlow models and layers in "),u=s("code"),f=o("transformers"),b=o(" accept two formats as input:"),i=p(),m=s("ul"),X=s("li"),Me=o("having all inputs as keyword arguments (like PyTorch models), or"),fe=p(),q=s("li"),ce=o("having all inputs as a list, tuple or dict in the first positional argument."),te=p(),R=s("p"),ye=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),B=s("code"),pe=o("model.fit()"),Ce=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=s("code"),ae=o("model.fit()"),re=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=s("code"),le=o("fit()"),ve=o(" and "),S=s("code"),Te=o("predict()"),ge=o(`, such as when creating your own layers or models with
the Keras `),Z=s("code"),ke=o("Functional"),ie=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),j=s("ul"),z=s("li"),he=o("a single Tensor with "),Q=s("code"),_e=o("input_ids"),me=o(" only and nothing else: "),V=s("code"),we=o("model(input_ids)"),be=p(),J=s("li"),Fe=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),ne=o("model([input_ids, attention_mask])"),de=o(" or "),Y=s("code"),ue=o("model([input_ids, attention_mask, token_type_ids])"),$e=p(),N=s("li"),Re=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=s("code"),xe=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),se=p(),C=s("p"),Le=o(`Note that when creating models and layers with
`),U=s("a"),Xe=o("subclassing"),Ee=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=a(y,"P",{});var x=r(d);M=n(x,"TensorFlow models and layers in "),u=a(x,"CODE",{});var Pe=r(u);f=n(Pe,"transformers"),Pe.forEach(t),b=n(x," accept two formats as input:"),x.forEach(t),i=h(y),m=a(y,"UL",{});var K=r(m);X=a(K,"LI",{});var Oe=r(X);Me=n(Oe,"having all inputs as keyword arguments (like PyTorch models), or"),Oe.forEach(t),fe=h(K),q=a(K,"LI",{});var De=r(q);ce=n(De,"having all inputs as a list, tuple or dict in the first positional argument."),De.forEach(t),K.forEach(t),te=h(y),R=a(y,"P",{});var E=r(R);ye=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),B=a(E,"CODE",{});var Qe=r(B);pe=n(Qe,"model.fit()"),Qe.forEach(t),Ce=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=a(E,"CODE",{});var Ye=r(O);ae=n(Ye,"model.fit()"),Ye.forEach(t),re=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a(E,"CODE",{});var Be=r(G);le=n(Be,"fit()"),Be.forEach(t),ve=n(E," and "),S=a(E,"CODE",{});var Je=r(S);Te=n(Je,"predict()"),Je.forEach(t),ge=n(E,`, such as when creating your own layers or models with
the Keras `),Z=a(E,"CODE",{});var ze=r(Z);ke=n(ze,"Functional"),ze.forEach(t),ie=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),oe=h(y),j=a(y,"UL",{});var I=r(j);z=a(I,"LI",{});var A=r(z);he=n(A,"a single Tensor with "),Q=a(A,"CODE",{});var He=r(Q);_e=n(He,"input_ids"),He.forEach(t),me=n(A," only and nothing else: "),V=a(A,"CODE",{});var Ae=r(V);we=n(Ae,"model(input_ids)"),Ae.forEach(t),A.forEach(t),be=h(I),J=a(I,"LI",{});var H=r(J);Fe=n(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=a(H,"CODE",{});var Ge=r(D);ne=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),de=n(H," or "),Y=a(H,"CODE",{});var Ie=r(Y);ue=n(Ie,"model([input_ids, attention_mask, token_type_ids])"),Ie.forEach(t),H.forEach(t),$e=h(I),N=a(I,"LI",{});var je=r(N);Re=n(je,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=a(je,"CODE",{});var Se=r(P);xe=n(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.forEach(t),je.forEach(t),I.forEach(t),se=h(y),C=a(y,"P",{});var ee=r(C);Le=n(ee,`Note that when creating models and layers with
`),U=a(ee,"A",{href:!0,rel:!0});var Ve=r(U);Xe=n(Ve,"subclassing"),Ve.forEach(t),Ee=n(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){c(U,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),c(U,"rel","nofollow")},m(y,x){g(y,d,x),e(d,M),e(d,u),e(u,f),e(d,b),g(y,i,x),g(y,m,x),e(m,X),e(X,Me),e(m,fe),e(m,q),e(q,ce),g(y,te,x),g(y,R,x),e(R,ye),e(R,B),e(B,pe),e(R,Ce),e(R,O),e(O,ae),e(R,re),e(R,G),e(G,le),e(R,ve),e(R,S),e(S,Te),e(R,ge),e(R,Z),e(Z,ke),e(R,ie),g(y,oe,x),g(y,j,x),e(j,z),e(z,he),e(z,Q),e(Q,_e),e(z,me),e(z,V),e(V,we),e(j,be),e(j,J),e(J,Fe),e(J,D),e(D,ne),e(J,de),e(J,Y),e(Y,ue),e(j,$e),e(j,N),e(N,Re),e(N,P),e(P,xe),g(y,se,x),g(y,C,x),e(C,Le),e(C,U),e(U,Xe),e(C,Ee)},d(y){y&&t(d),y&&t(i),y&&t(m),y&&t(te),y&&t(R),y&&t(oe),y&&t(j),y&&t(se),y&&t(C)}}}function uz(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function fz(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlhMTVJvYmVydGFGb3JUb2tlbkNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ5ZHNoaWVoJTJGcm9iZXJ0YS1sYXJnZS1uZXItZW5nbGlzaCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGWExNUm9iZXJ0YUZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMnlkc2hpZWglMkZyb2JlcnRhLWxhcmdlLW5lci1lbmdsaXNoJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjAlMjJIdWdnaW5nRmFjZSUyMGlzJTIwYSUyMGNvbXBhbnklMjBiYXNlZCUyMGluJTIwUGFyaXMlMjBhbmQlMjBOZXclMjBZb3JrJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyJTBBKSUwQSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEFwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTIwJTNEJTIwdGYubWF0aC5hcmdtYXgobG9naXRzJTJDJTIwYXhpcyUzRC0xKSUwQSUwQSUyMyUyME5vdGUlMjB0aGF0JTIwdG9rZW5zJTIwYXJlJTIwY2xhc3NpZmllZCUyMHJhdGhlciUyMHRoZW4lMjBpbnB1dCUyMHdvcmRzJTIwd2hpY2glMjBtZWFucyUyMHRoYXQlMEElMjMlMjB0aGVyZSUyMG1pZ2h0JTIwYmUlMjBtb3JlJTIwcHJlZGljdGVkJTIwdG9rZW4lMjBjbGFzc2VzJTIwdGhhbiUyMHdvcmRzLiUwQSUyMyUyME11bHRpcGxlJTIwdG9rZW4lMjBjbGFzc2VzJTIwbWlnaHQlMjBhY2NvdW50JTIwZm9yJTIwdGhlJTIwc2FtZSUyMHdvcmQlMEFwcmVkaWN0ZWRfdG9rZW5zX2NsYXNzZXMlMjAlM0QlMjAlNUJtb2RlbC5jb25maWcuaWQybGFiZWwlNUJ0JTVEJTIwZm9yJTIwdCUyMGluJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyU1QjAlNUQubnVtcHkoKS50b2xpc3QoKSU1RCUwQXByZWRpY3RlZF90b2tlbnNfY2xhc3Nlcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFXLMRobertaForTokenClassification
<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;ydshieh/roberta-large-ner-english&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLMRobertaForTokenClassification.from_pretrained(<span class="hljs-string">&quot;ydshieh/roberta-large-ner-english&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()]
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes
[<span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;ORG&#x27;</span>, <span class="hljs-string">&#x27;ORG&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;LOC&#x27;</span>, <span class="hljs-string">&#x27;O&#x27;</span>, <span class="hljs-string">&#x27;LOC&#x27;</span>, <span class="hljs-string">&#x27;LOC&#x27;</span>]`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function gz(L){let d,M;return d=new Ze({props:{code:"bGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3NzKSUwQXJvdW5kKGZsb2F0KGxvc3MpJTJDJTIwMik=",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)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(loss), <span class="hljs-number">2</span>)
<span class="hljs-number">0.01</span>`}}),{c(){v(d.$$.fragment)},l(u){T(d.$$.fragment,u)},m(u,f){k(d,u,f),M=!0},p:We,i(u){M||(w(d.$$.fragment,u),M=!0)},o(u){F(d.$$.fragment,u),M=!1},d(u){$(d,u)}}}function _z(L){let d,M,u,f,b,i,m,X,Me,fe,q,ce,te,R,ye,B,pe,Ce,O,ae,re,G,le,ve,S,Te,ge,Z,ke,ie,oe,j,z,he,Q,_e,me,V,we,be,J,Fe,D,ne,de,Y,ue,$e,N,Re,P,xe,se,C,Le,U,Xe,Ee;return{c(){d=s("p"),M=o("TensorFlow models and layers in "),u=s("code"),f=o("transformers"),b=o(" accept two formats as input:"),i=p(),m=s("ul"),X=s("li"),Me=o("having all inputs as keyword arguments (like PyTorch models), or"),fe=p(),q=s("li"),ce=o("having all inputs as a list, tuple or dict in the first positional argument."),te=p(),R=s("p"),ye=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),B=s("code"),pe=o("model.fit()"),Ce=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=s("code"),ae=o("model.fit()"),re=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=s("code"),le=o("fit()"),ve=o(" and "),S=s("code"),Te=o("predict()"),ge=o(`, such as when creating your own layers or models with
the Keras `),Z=s("code"),ke=o("Functional"),ie=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),j=s("ul"),z=s("li"),he=o("a single Tensor with "),Q=s("code"),_e=o("input_ids"),me=o(" only and nothing else: "),V=s("code"),we=o("model(input_ids)"),be=p(),J=s("li"),Fe=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=s("code"),ne=o("model([input_ids, attention_mask])"),de=o(" or "),Y=s("code"),ue=o("model([input_ids, attention_mask, token_type_ids])"),$e=p(),N=s("li"),Re=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=s("code"),xe=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),se=p(),C=s("p"),Le=o(`Note that when creating models and layers with
`),U=s("a"),Xe=o("subclassing"),Ee=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(y){d=a(y,"P",{});var x=r(d);M=n(x,"TensorFlow models and layers in "),u=a(x,"CODE",{});var Pe=r(u);f=n(Pe,"transformers"),Pe.forEach(t),b=n(x," accept two formats as input:"),x.forEach(t),i=h(y),m=a(y,"UL",{});var K=r(m);X=a(K,"LI",{});var Oe=r(X);Me=n(Oe,"having all inputs as keyword arguments (like PyTorch models), or"),Oe.forEach(t),fe=h(K),q=a(K,"LI",{});var De=r(q);ce=n(De,"having all inputs as a list, tuple or dict in the first positional argument."),De.forEach(t),K.forEach(t),te=h(y),R=a(y,"P",{});var E=r(R);ye=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),B=a(E,"CODE",{});var Qe=r(B);pe=n(Qe,"model.fit()"),Qe.forEach(t),Ce=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),O=a(E,"CODE",{});var Ye=r(O);ae=n(Ye,"model.fit()"),Ye.forEach(t),re=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a(E,"CODE",{});var Be=r(G);le=n(Be,"fit()"),Be.forEach(t),ve=n(E," and "),S=a(E,"CODE",{});var Je=r(S);Te=n(Je,"predict()"),Je.forEach(t),ge=n(E,`, such as when creating your own layers or models with
the Keras `),Z=a(E,"CODE",{});var ze=r(Z);ke=n(ze,"Functional"),ze.forEach(t),ie=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),oe=h(y),j=a(y,"UL",{});var I=r(j);z=a(I,"LI",{});var A=r(z);he=n(A,"a single Tensor with "),Q=a(A,"CODE",{});var He=r(Q);_e=n(He,"input_ids"),He.forEach(t),me=n(A," only and nothing else: "),V=a(A,"CODE",{});var Ae=r(V);we=n(Ae,"model(input_ids)"),Ae.forEach(t),A.forEach(t),be=h(I),J=a(I,"LI",{});var H=r(J);Fe=n(H,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),D=a(H,"CODE",{});var Ge=r(D);ne=n(Ge,"model([input_ids, attention_mask])"),Ge.forEach(t),de=n(H," or "),Y=a(H,"CODE",{});var Ie=r(Y);ue=n(Ie,"model([input_ids, attention_mask, token_type_ids])"),Ie.forEach(t),H.forEach(t),$e=h(I),N=a(I,"LI",{});var je=r(N);Re=n(je,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),P=a(je,"CODE",{});var Se=r(P);xe=n(Se,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Se.forEach(t),je.forEach(t),I.forEach(t),se=h(y),C=a(y,"P",{});var ee=r(C);Le=n(ee,`Note that when creating models and layers with
`),U=a(ee,"A",{href:!0,rel:!0});var Ve=r(U);Xe=n(Ve,"subclassing"),Ve.forEach(t),Ee=n(ee,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),ee.forEach(t),this.h()},h(){c(U,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),c(U,"rel","nofollow")},m(y,x){g(y,d,x),e(d,M),e(d,u),e(u,f),e(d,b),g(y,i,x),g(y,m,x),e(m,X),e(X,Me),e(m,fe),e(m,q),e(q,ce),g(y,te,x),g(y,R,x),e(R,ye),e(R,B),e(B,pe),e(R,Ce),e(R,O),e(O,ae),e(R,re),e(R,G),e(G,le),e(R,ve),e(R,S),e(S,Te),e(R,ge),e(R,Z),e(Z,ke),e(R,ie),g(y,oe,x),g(y,j,x),e(j,z),e(z,he),e(z,Q),e(Q,_e),e(z,me),e(z,V),e(V,we),e(j,be),e(j,J),e(J,Fe),e(J,D),e(D,ne),e(J,de),e(J,Y),e(Y,ue),e(j,$e),e(j,N),e(N,Re),e(N,P),e(P,xe),g(y,se,x),g(y,C,x),e(C,Le),e(C,U),e(U,Xe),e(C,Ee)},d(y){y&&t(d),y&&t(i),y&&t(m),y&&t(te),y&&t(R),y&&t(oe),y&&t(j),y&&t(se),y&&t(C)}}}function bz(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function Mz(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlhMTVJvYmVydGFGb3JRdWVzdGlvbkFuc3dlcmluZyUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeWRzaGllaCUyRnJvYmVydGEtYmFzZS1zcXVhZDIlMjIpJTBBbW9kZWwlMjAlM0QlMjBURlhMTVJvYmVydGFGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyeWRzaGllaCUyRnJvYmVydGEtYmFzZS1zcXVhZDIlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNEJTIwaW50KHRmLm1hdGguYXJnbWF4KG91dHB1dHMuc3RhcnRfbG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChvdXRwdXRzLmVuZF9sb2dpdHMlMkMlMjBheGlzJTNELTEpJTVCMCU1RCklMEElMEFwcmVkaWN0X2Fuc3dlcl90b2tlbnMlMjAlM0QlMjBpbnB1dHMuaW5wdXRfaWRzJTVCMCUyQyUyMGFuc3dlcl9zdGFydF9pbmRleCUyMCUzQSUyMGFuc3dlcl9lbmRfaW5kZXglMjAlMkIlMjAxJTVEJTBBdG9rZW5pemVyLmRlY29kZShwcmVkaWN0X2Fuc3dlcl90b2tlbnMp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFXLMRobertaForQuestionAnswering
<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;ydshieh/roberta-base-squad2&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLMRobertaForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;ydshieh/roberta-base-squad2&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>]
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.decode(predict_answer_tokens)
<span class="hljs-string">&#x27; puppet&#x27;</span>`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function yz(L){let d,M;return d=new Ze({props:{code:"JTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdGYuY29uc3RhbnQoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRmLmNvbnN0YW50KCU1QjE1JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG91dHB1dHMubG9zcyklMEFyb3VuZChmbG9hdChsb3NzKSUyQyUyMDIp",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)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(<span class="hljs-built_in">float</span>(loss), <span class="hljs-number">2</span>)
<span class="hljs-number">0.86</span>`}}),{c(){v(d.$$.fragment)},l(u){T(d.$$.fragment,u)},m(u,f){k(d,u,f),M=!0},p:We,i(u){M||(w(d.$$.fragment,u),M=!0)},o(u){F(d.$$.fragment,u),M=!1},d(u){$(d,u)}}}function vz(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function Tz(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4WExNUm9iZXJ0YU1vZGVsJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeGxtLXJvYmVydGEtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhYTE1Sb2JlcnRhTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbS1yb2JlcnRhLWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxXLMRobertaModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxXLMRobertaModel.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function kz(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function wz(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4WExNUm9iZXJ0YUZvckNhdXNhbExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeGxtLXJvYmVydGEtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhYTE1Sb2JlcnRhRm9yQ2F1c2FsTE0uZnJvbV9wcmV0cmFpbmVkKCUyMnhsbS1yb2JlcnRhLWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMm5wJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEElMjMlMjByZXRyaWV2ZSUyMGxvZ3RzJTIwZm9yJTIwbmV4dCUyMHRva2VuJTBBbmV4dF90b2tlbl9sb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cyU1QiUzQSUyQyUyMC0xJTVE",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxXLMRobertaForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxXLMRobertaForCausalLM.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve logts for next token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>next_token_logits = outputs.logits[:, -<span class="hljs-number">1</span>]`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function Fz(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function $z(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4WExNUm9iZXJ0YUZvck1hc2tlZExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeGxtLXJvYmVydGEtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhYTE1Sb2JlcnRhRm9yTWFza2VkTE0uZnJvbV9wcmV0cmFpbmVkKCUyMnhsbS1yb2JlcnRhLWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwJTVCTUFTSyU1RC4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxXLMRobertaForMaskedLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxXLMRobertaForMaskedLM.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function Rz(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function xz(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4WExNUm9iZXJ0YUZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ4bG0tcm9iZXJ0YS1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheFhMTVJvYmVydGFGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJ4bG0tcm9iZXJ0YS1iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxXLMRobertaForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxXLMRobertaForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function Lz(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function Xz(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4WExNUm9iZXJ0YUZvck11bHRpcGxlQ2hvaWNlJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeGxtLXJvYmVydGEtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhYTE1Sb2JlcnRhRm9yTXVsdGlwbGVDaG9pY2UuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbS1yb2JlcnRhLWJhc2UlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIySW4lMjBJdGFseSUyQyUyMHBpenphJTIwc2VydmVkJTIwaW4lMjBmb3JtYWwlMjBzZXR0aW5ncyUyQyUyMHN1Y2glMjBhcyUyMGF0JTIwYSUyMHJlc3RhdXJhbnQlMkMlMjBpcyUyMHByZXNlbnRlZCUyMHVuc2xpY2VkLiUyMiUwQWNob2ljZTAlMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aXRoJTIwYSUyMGZvcmslMjBhbmQlMjBhJTIwa25pZmUuJTIyJTBBY2hvaWNlMSUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdoaWxlJTIwaGVsZCUyMGluJTIwdGhlJTIwaGFuZC4lMjIlMEElMEFlbmNvZGluZyUyMCUzRCUyMHRva2VuaXplciglNUJwcm9tcHQlMkMlMjBwcm9tcHQlNUQlMkMlMjAlNUJjaG9pY2UwJTJDJTIwY2hvaWNlMSU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyJTJDJTIwcGFkZGluZyUzRFRydWUpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqJTdCayUzQSUyMHYlNUJOb25lJTJDJTIwJTNBJTVEJTIwZm9yJTIwayUyQyUyMHYlMjBpbiUyMGVuY29kaW5nLml0ZW1zKCklN0QpJTBBJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxXLMRobertaForMultipleChoice

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxXLMRobertaForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function Ez(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function jz(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4WExNUm9iZXJ0YUZvclRva2VuQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ4bG0tcm9iZXJ0YS1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwRmxheFhMTVJvYmVydGFGb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJ4bG0tcm9iZXJ0YS1iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxXLMRobertaForTokenClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxXLMRobertaForTokenClassification.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function Cz(L){let d,M,u,f,b;return{c(){d=s("p"),M=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),f=o("Module"),b=o(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=a(m,"CODE",{});var X=r(u);f=n(X,"Module"),X.forEach(t),b=n(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(i,m){g(i,d,m),e(d,M),e(d,u),e(u,f),e(d,b)},d(i){i&&t(d)}}}function Jz(L){let d,M,u,f,b;return f=new Ze({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4WExNUm9iZXJ0YUZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeGxtLXJvYmVydGEtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhYTE1Sb2JlcnRhRm9yUXVlc3Rpb25BbnN3ZXJpbmcuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbS1yb2JlcnRhLWJhc2UlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQXN0YXJ0X3Njb3JlcyUyMCUzRCUyMG91dHB1dHMuc3RhcnRfbG9naXRzJTBBZW5kX3Njb3JlcyUyMCUzRCUyMG91dHB1dHMuZW5kX2xvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxXLMRobertaForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxXLMRobertaForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits`}}),{c(){d=s("p"),M=o("Example:"),u=p(),v(f.$$.fragment)},l(i){d=a(i,"P",{});var m=r(d);M=n(m,"Example:"),m.forEach(t),u=h(i),T(f.$$.fragment,i)},m(i,m){g(i,d,m),e(d,M),g(i,u,m),k(f,i,m),b=!0},p:We,i(i){b||(w(f.$$.fragment,i),b=!0)},o(i){F(f.$$.fragment,i),b=!1},d(i){i&&t(d),i&&t(u),$(f,i)}}}function zz(L){let d,M,u,f,b,i,m,X,Me,fe,q,ce,te,R,ye,B,pe,Ce,O,ae,re,G,le,ve,S,Te,ge,Z,ke,ie,oe,j,z,he,Q,_e,me,V,we,be,J,Fe,D,ne,de,Y,ue,$e,N,Re,P,xe,se,C,Le,U,Xe,Ee,y,x,Pe,K,Oe,De,E,Qe,Ye,Be,Je,ze,I,A,He,Ae,H,Ge,Ie,je,Se,ee,Ve,gt,Lc,Kb,ir,eM,tM,Fo,Xc,oM,nM,dr,sM,aM,cr,rM,lM,iM,$o,Ec,dM,cM,pr,pM,hM,hr,mM,uM,fM,Ro,jc,gM,_M,mr,bM,MM,ur,yM,vM,TM,Cc,fr,kM,wM,FM,jh,Jc,$M,Mg,gr,yg,$t,xo,zc,RM,xM,_r,LM,XM,br,EM,jM,CM,Lo,Uc,JM,zM,Mr,UM,IM,yr,NM,qM,WM,as,Ic,ZM,AM,vr,BM,GM,SM,Nc,Tr,VM,PM,OM,Ch,qc,DM,vg,kr,Tg,Xo,Eo,Wc,QM,YM,wr,HM,KM,Fr,ey,ty,oy,Zc,$r,ny,sy,ay,Jh,Ac,ry,kg,Rr,wg,Rt,jo,Bc,ly,iy,xr,dy,cy,Lr,py,hy,my,Co,Gc,uy,fy,Xr,gy,_y,Er,by,My,yy,Jo,Sc,vy,Ty,jr,ky,wy,Cr,Fy,$y,Ry,Vc,Jr,xy,Ly,Xy,zh,Pc,Ey,Fg,zr,$g,xt,zo,Oc,jy,Cy,Ur,Jy,zy,Ir,Uy,Iy,Ny,Uo,Dc,qy,Wy,Nr,Zy,Ay,qr,By,Gy,Sy,rs,Qc,Vy,Py,Wr,Oy,Dy,Qy,Yc,Zr,Yy,Hy,Ky,Uh,Hc,ev,Rg,Kc,Ih,tv,xg,Io,No,ep,ov,nv,Ar,sv,av,Br,rv,lv,iv,qo,tp,dv,cv,Gr,pv,hv,Sr,mv,uv,fv,Nh,op,gv,Lg,np,_v,Xg,sp,Vr,bv,Pr,Mv,yv,Eg,ln,ls,qh,Or,vv,Wh,Tv,jg,Bt,Dr,kv,go,wv,ap,Fv,$v,rp,Rv,xv,Qr,Lv,Xv,Ev,dn,jv,lp,Cv,Jv,ip,zv,Uv,Iv,is,Cg,cn,ds,Zh,Yr,Nv,Ah,qv,Jg,et,Hr,Wv,_o,Zv,dp,Av,Bv,cp,Gv,Sv,Kr,Vv,Pv,Ov,el,Dv,pp,Qv,Yv,Hv,Wo,tl,Kv,Bh,eT,tT,ol,hp,oT,Gh,nT,sT,mp,aT,Sh,rT,lT,cs,nl,iT,sl,dT,Vh,cT,pT,hT,ps,al,mT,Ph,uT,fT,up,rl,zg,pn,hs,Oh,ll,gT,Dh,_T,Ug,bt,il,bT,Gt,MT,Qh,yT,vT,fp,TT,kT,gp,wT,FT,dl,$T,RT,xT,cl,LT,_p,XT,ET,jT,Zo,pl,CT,Yh,JT,zT,hl,bp,UT,Hh,IT,NT,Mp,qT,Kh,WT,ZT,ms,ml,AT,em,BT,Ig,hn,us,tm,ul,GT,om,ST,Ng,Ke,fl,VT,nm,PT,OT,gl,DT,yp,QT,YT,HT,_l,KT,bl,ek,tk,ok,Ml,nk,sm,sk,ak,rk,it,lk,am,ik,dk,rm,ck,pk,lm,hk,mk,im,uk,fk,dm,gk,_k,cm,bk,Mk,yk,fs,vk,pm,Tk,kk,yl,wk,Fk,Vt,vl,$k,mn,Rk,vp,xk,Lk,hm,Xk,Ek,jk,gs,Ck,_s,qg,un,bs,mm,Tl,Jk,um,zk,Wg,Mt,kl,Uk,wl,Ik,fm,Nk,qk,Wk,Fl,Zk,Tp,Ak,Bk,Gk,$l,Sk,Rl,Vk,Pk,Ok,Pt,xl,Dk,fn,Qk,kp,Yk,Hk,gm,Kk,ew,tw,Ms,ow,ys,Zg,gn,vs,_m,Ll,nw,bm,sw,Ag,yt,Xl,aw,El,rw,Mm,lw,iw,dw,jl,cw,wp,pw,hw,mw,Cl,uw,Jl,fw,gw,_w,Ot,zl,bw,_n,Mw,Fp,yw,vw,ym,Tw,kw,ww,Ts,Fw,ks,Bg,bn,ws,vm,Ul,$w,Tm,Rw,Gg,vt,Il,xw,km,Lw,Xw,Nl,Ew,$p,jw,Cw,Jw,ql,zw,Wl,Uw,Iw,Nw,Lt,Zl,qw,Mn,Ww,Rp,Zw,Aw,wm,Bw,Gw,Sw,Fs,Vw,$s,Pw,Rs,Sg,yn,xs,Fm,Al,Ow,$m,Dw,Vg,Tt,Bl,Qw,Rm,Yw,Hw,Gl,Kw,xp,e0,t0,o0,Sl,n0,Vl,s0,a0,r0,Dt,Pl,l0,vn,i0,Lp,d0,c0,xm,p0,h0,m0,Ls,u0,Xs,Pg,Tn,Es,Lm,Ol,f0,Xm,g0,Og,kt,Dl,_0,Em,b0,M0,Ql,y0,Xp,v0,T0,k0,Yl,w0,Hl,F0,$0,R0,Qt,Kl,x0,kn,L0,Ep,X0,E0,jm,j0,C0,J0,js,z0,Cs,Dg,wn,Js,Cm,ei,U0,Jm,I0,Qg,wt,ti,N0,Fn,q0,zm,W0,Z0,Um,A0,B0,G0,oi,S0,jp,V0,P0,O0,ni,D0,si,Q0,Y0,H0,Yt,ai,K0,$n,e1,Cp,t1,o1,Im,n1,s1,a1,zs,r1,Us,Yg,Rn,Is,Nm,ri,l1,qm,i1,Hg,dt,li,d1,Wm,c1,p1,ii,h1,Jp,m1,u1,f1,di,g1,ci,_1,b1,M1,Ns,y1,Ht,pi,v1,xn,T1,zp,k1,w1,Zm,F1,$1,R1,qs,x1,Ws,Kg,Ln,Zs,Am,hi,L1,Bm,X1,e_,ct,mi,E1,ui,j1,Gm,C1,J1,z1,fi,U1,Up,I1,N1,q1,gi,W1,_i,Z1,A1,B1,As,G1,Kt,bi,S1,Xn,V1,Ip,P1,O1,Sm,D1,Q1,Y1,Bs,H1,Gs,t_,En,Ss,Vm,Mi,K1,Pm,e2,o_,pt,yi,t2,vi,o2,Om,n2,s2,a2,Ti,r2,Np,l2,i2,d2,ki,c2,wi,p2,h2,m2,Vs,u2,Xt,Fi,f2,jn,g2,qp,_2,b2,Dm,M2,y2,v2,Ps,T2,Os,k2,Ds,n_,Cn,Qs,Qm,$i,w2,Ym,F2,s_,ht,Ri,$2,Hm,R2,x2,xi,L2,Wp,X2,E2,j2,Li,C2,Xi,J2,z2,U2,Ys,I2,Et,Ei,N2,Jn,q2,Zp,W2,Z2,Km,A2,B2,G2,Hs,S2,Ks,V2,ea,a_,zn,ta,eu,ji,P2,tu,O2,r_,mt,Ci,D2,ou,Q2,Y2,Ji,H2,Ap,K2,eF,tF,zi,oF,Ui,nF,sF,aF,oa,rF,eo,Ii,lF,Un,iF,Bp,dF,cF,nu,pF,hF,mF,na,uF,sa,l_,In,aa,su,Ni,fF,au,gF,i_,ut,qi,_F,ru,bF,MF,Wi,yF,Gp,vF,TF,kF,Zi,wF,Ai,FF,$F,RF,ra,xF,jt,Bi,LF,Nn,XF,Sp,EF,jF,lu,CF,JF,zF,la,UF,ia,IF,da,d_,qn,ca,iu,Gi,NF,du,qF,c_,ft,Si,WF,Wn,ZF,cu,AF,BF,pu,GF,SF,VF,Vi,PF,Vp,OF,DF,QF,Pi,YF,Oi,HF,KF,e$,pa,t$,Ct,Di,o$,Zn,n$,Pp,s$,a$,hu,r$,l$,i$,ha,d$,ma,c$,ua,p_,An,fa,mu,Qi,p$,uu,h$,h_,tt,Yi,m$,fu,u$,f$,Hi,g$,Op,_$,b$,M$,Ki,y$,ed,v$,T$,k$,gu,w$,F$,bo,_u,td,$$,R$,bu,od,x$,L$,Mu,nd,X$,E$,yu,sd,j$,C$,to,ad,J$,Bn,z$,vu,U$,I$,Tu,N$,q$,W$,ga,Z$,_a,m_,Gn,ba,ku,rd,A$,wu,B$,u_,ot,ld,G$,Fu,S$,V$,id,P$,Dp,O$,D$,Q$,dd,Y$,cd,H$,K$,eR,$u,tR,oR,Mo,Ru,pd,nR,sR,xu,hd,aR,rR,Lu,md,lR,iR,Xu,ud,dR,cR,oo,fd,pR,Sn,hR,Eu,mR,uR,ju,fR,gR,_R,Ma,bR,ya,f_,Vn,va,Cu,gd,MR,Ju,yR,g_,nt,_d,vR,bd,TR,zu,kR,wR,FR,Md,$R,Qp,RR,xR,LR,yd,XR,vd,ER,jR,CR,Uu,JR,zR,yo,Iu,Td,UR,IR,Nu,kd,NR,qR,qu,wd,WR,ZR,Wu,Fd,AR,BR,no,$d,GR,Pn,SR,Zu,VR,PR,Au,OR,DR,QR,Ta,YR,ka,__,On,wa,Bu,Rd,HR,Gu,KR,b_,st,xd,ex,Su,tx,ox,Ld,nx,Yp,sx,ax,rx,Xd,lx,Ed,ix,dx,cx,Vu,px,hx,vo,Pu,jd,mx,ux,Ou,Cd,fx,gx,Du,Jd,_x,bx,Qu,zd,Mx,yx,so,Ud,vx,Dn,Tx,Yu,kx,wx,Hu,Fx,$x,Rx,Fa,xx,$a,M_,Qn,Ra,Ku,Id,Lx,ef,Xx,y_,at,Nd,Ex,tf,jx,Cx,qd,Jx,Hp,zx,Ux,Ix,Wd,Nx,Zd,qx,Wx,Zx,of,Ax,Bx,To,nf,Ad,Gx,Sx,sf,Bd,Vx,Px,af,Gd,Ox,Dx,rf,Sd,Qx,Yx,ao,Vd,Hx,Yn,Kx,lf,eL,tL,df,oL,nL,sL,xa,aL,La,v_,Hn,Xa,cf,Pd,rL,pf,lL,T_,rt,Od,iL,hf,dL,cL,Dd,pL,Kp,hL,mL,uL,Qd,fL,Yd,gL,_L,bL,mf,ML,yL,ko,uf,Hd,vL,TL,ff,Kd,kL,wL,gf,ec,FL,$L,_f,tc,RL,xL,ro,oc,LL,Kn,XL,bf,EL,jL,Mf,CL,JL,zL,Ea,UL,ja,k_,es,Ca,yf,nc,IL,vf,NL,w_,lt,sc,qL,ts,WL,Tf,ZL,AL,kf,BL,GL,SL,ac,VL,eh,PL,OL,DL,rc,QL,lc,YL,HL,KL,wf,eX,tX,wo,Ff,ic,oX,nX,$f,dc,sX,aX,Rf,cc,rX,lX,xf,pc,iX,dX,lo,hc,cX,os,pX,Lf,hX,mX,Xf,uX,fX,gX,Ja,_X,za,F_;return i=new Ne({}),le=new Ne({}),A=new Ne({}),ee=new bg({props:{pipeline:"text-classification"}}),gr=new bg({props:{pipeline:"token-classification"}}),kr=new bg({props:{pipeline:"text-generation"}}),Rr=new bg({props:{pipeline:"fill-mask"}}),zr=new bg({props:{pipeline:"question-answering"}}),Or=new Ne({}),Dr=new W({props:{name:"class transformers.XLMRobertaConfig",anchor:"transformers.XLMRobertaConfig",parameters:[{name:"vocab_size",val:" = 30522"},{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.XLMRobertaConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30522) &#x2014;
Vocabulary size of the XLM-RoBERTa 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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaModel">XLMRobertaModel</a> or <a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.TFXLMRobertaModel">TFXLMRobertaModel</a>.`,name:"vocab_size"},{anchor:"transformers.XLMRobertaConfig.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.XLMRobertaConfig.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.XLMRobertaConfig.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.XLMRobertaConfig.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.XLMRobertaConfig.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.XLMRobertaConfig.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.XLMRobertaConfig.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.XLMRobertaConfig.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.XLMRobertaConfig.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaModel">XLMRobertaModel</a> or
<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.TFXLMRobertaModel">TFXLMRobertaModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.XLMRobertaConfig.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.XLMRobertaConfig.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.XLMRobertaConfig.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.XLMRobertaConfig.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.XLMRobertaConfig.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.XLMRobertaConfig.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.30.0/src/transformers/models/xlm_roberta/configuration_xlm_roberta.py#L45"}}),is=new qe({props:{anchor:"transformers.XLMRobertaConfig.example",$$slots:{default:[JJ]},$$scope:{ctx:L}}}),Yr=new Ne({}),Hr=new W({props:{name:"class transformers.XLMRobertaTokenizer",anchor:"transformers.XLMRobertaTokenizer",parameters:[{name:"vocab_file",val:""},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XLMRobertaTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.XLMRobertaTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.XLMRobertaTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.XLMRobertaTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.XLMRobertaTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.XLMRobertaTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.XLMRobertaTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.XLMRobertaTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.XLMRobertaTokenizer.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;&lt;s&gt;NOTUSED&quot;, &quot;&lt;/s&gt;NOTUSED&quot;]</code>) &#x2014;
Additional special tokens used by the tokenizer.`,name:"additional_special_tokens"},{anchor:"transformers.XLMRobertaTokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"},{anchor:"transformers.XLMRobertaTokenizer.sp_model",description:`<strong>sp_model</strong> (<code>SentencePieceProcessor</code>) &#x2014;
The <em>SentencePiece</em> processor that is used for every conversion (string, tokens and IDs).`,name:"sp_model"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xlm_roberta/tokenization_xlm_roberta.py#L63"}}),tl=new W({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.XLMRobertaTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.XLMRobertaTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.XLMRobertaTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xlm_roberta/tokenization_xlm_roberta.py#L202",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),nl=new W({props:{name:"get_special_tokens_mask",anchor:"transformers.XLMRobertaTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.XLMRobertaTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.XLMRobertaTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.XLMRobertaTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xlm_roberta/tokenization_xlm_roberta.py#L228",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),al=new W({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.XLMRobertaTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.XLMRobertaTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.XLMRobertaTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xlm_roberta/tokenization_xlm_roberta.py#L256",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),rl=new W({props:{name:"save_vocabulary",anchor:"transformers.XLMRobertaTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xlm_roberta/tokenization_xlm_roberta.py#L313"}}),ll=new Ne({}),il=new W({props:{name:"class transformers.XLMRobertaTokenizerFast",anchor:"transformers.XLMRobertaTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"sep_token",val:" = '</s>'"},{name:"cls_token",val:" = '<s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"pad_token",val:" = '<pad>'"},{name:"mask_token",val:" = '<mask>'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XLMRobertaTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Path to the vocabulary file.`,name:"vocab_file"},{anchor:"transformers.XLMRobertaTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.XLMRobertaTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.XLMRobertaTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.XLMRobertaTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.XLMRobertaTokenizerFast.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.XLMRobertaTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.XLMRobertaTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.XLMRobertaTokenizerFast.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;&lt;s&gt;NOTUSED&quot;, &quot;&lt;/s&gt;NOTUSED&quot;]</code>) &#x2014;
Additional special tokens used by the tokenizer.`,name:"additional_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xlm_roberta/tokenization_xlm_roberta_fast.py#L82"}}),pl=new W({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.XLMRobertaTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.XLMRobertaTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.XLMRobertaTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xlm_roberta/tokenization_xlm_roberta_fast.py#L171",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),ml=new W({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.XLMRobertaTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.XLMRobertaTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.XLMRobertaTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/xlm_roberta/tokenization_xlm_roberta_fast.py#L197",returnDescription:`
<p>List of zeros.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),ul=new Ne({}),fl=new W({props:{name:"class transformers.XLMRobertaModel",anchor:"transformers.XLMRobertaModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.XLMRobertaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_xlm_roberta.py#L700"}}),vl=new W({props:{name:"forward",anchor:"transformers.XLMRobertaModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.Tensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.XLMRobertaModel.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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.XLMRobertaModel.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.XLMRobertaModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaModel.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.XLMRobertaModel.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.XLMRobertaModel.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.XLMRobertaModel.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.XLMRobertaModel.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.XLMRobertaModel.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.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMRobertaModel.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.XLMRobertaModel.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.XLMRobertaModel.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.XLMRobertaModel.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.30.0/src/transformers/models/xlm_roberta/modeling_xlm_roberta.py#L745",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),gs=new Ue({props:{$$slots:{default:[zJ]},$$scope:{ctx:L}}}),_s=new qe({props:{anchor:"transformers.XLMRobertaModel.forward.example",$$slots:{default:[UJ]},$$scope:{ctx:L}}}),Tl=new Ne({}),kl=new W({props:{name:"class transformers.XLMRobertaForCausalLM",anchor:"transformers.XLMRobertaForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLMRobertaForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_xlm_roberta.py#L887"}}),xl=new W({props:{name:"forward",anchor:"transformers.XLMRobertaForCausalLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"past_key_values",val:": typing.Tuple[typing.Tuple[torch.FloatTensor]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.XLMRobertaForCausalLM.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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.XLMRobertaForCausalLM.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.XLMRobertaForCausalLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaForCausalLM.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.XLMRobertaForCausalLM.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.XLMRobertaForCausalLM.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.XLMRobertaForCausalLM.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.XLMRobertaForCausalLM.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.XLMRobertaForCausalLM.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.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMRobertaForCausalLM.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.XLMRobertaForCausalLM.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.XLMRobertaForCausalLM.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.XLMRobertaForCausalLM.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.XLMRobertaForCausalLM.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.30.0/src/transformers/models/xlm_roberta/modeling_xlm_roberta.py#L913",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ms=new Ue({props:{$$slots:{default:[IJ]},$$scope:{ctx:L}}}),ys=new qe({props:{anchor:"transformers.XLMRobertaForCausalLM.forward.example",$$slots:{default:[NJ]},$$scope:{ctx:L}}}),Ll=new Ne({}),Xl=new W({props:{name:"class transformers.XLMRobertaForMaskedLM",anchor:"transformers.XLMRobertaForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLMRobertaForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_xlm_roberta.py#L1045"}}),zl=new W({props:{name:"forward",anchor:"transformers.XLMRobertaForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.XLMRobertaForMaskedLM.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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.XLMRobertaForMaskedLM.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.XLMRobertaForMaskedLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaForMaskedLM.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.XLMRobertaForMaskedLM.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.XLMRobertaForMaskedLM.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.XLMRobertaForMaskedLM.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.XLMRobertaForMaskedLM.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.XLMRobertaForMaskedLM.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.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMRobertaForMaskedLM.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.XLMRobertaForMaskedLM.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.30.0/src/transformers/models/xlm_roberta/modeling_xlm_roberta.py#L1074",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ts=new Ue({props:{$$slots:{default:[qJ]},$$scope:{ctx:L}}}),ks=new qe({props:{anchor:"transformers.XLMRobertaForMaskedLM.forward.example",$$slots:{default:[WJ]},$$scope:{ctx:L}}}),Ul=new Ne({}),Il=new W({props:{name:"class transformers.XLMRobertaForSequenceClassification",anchor:"transformers.XLMRobertaForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLMRobertaForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_xlm_roberta.py#L1183"}}),Zl=new W({props:{name:"forward",anchor:"transformers.XLMRobertaForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.XLMRobertaForSequenceClassification.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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.XLMRobertaForSequenceClassification.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.XLMRobertaForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaForSequenceClassification.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.XLMRobertaForSequenceClassification.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.XLMRobertaForSequenceClassification.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.XLMRobertaForSequenceClassification.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.XLMRobertaForSequenceClassification.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.XLMRobertaForSequenceClassification.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.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMRobertaForSequenceClassification.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.30.0/src/transformers/models/xlm_roberta/modeling_xlm_roberta.py#L1197",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Fs=new Ue({props:{$$slots:{default:[ZJ]},$$scope:{ctx:L}}}),$s=new qe({props:{anchor:"transformers.XLMRobertaForSequenceClassification.forward.example",$$slots:{default:[AJ]},$$scope:{ctx:L}}}),Rs=new qe({props:{anchor:"transformers.XLMRobertaForSequenceClassification.forward.example-2",$$slots:{default:[BJ]},$$scope:{ctx:L}}}),Al=new Ne({}),Bl=new W({props:{name:"class transformers.XLMRobertaForMultipleChoice",anchor:"transformers.XLMRobertaForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLMRobertaForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_xlm_roberta.py#L1285"}}),Pl=new W({props:{name:"forward",anchor:"transformers.XLMRobertaForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.XLMRobertaForMultipleChoice.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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.XLMRobertaForMultipleChoice.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.XLMRobertaForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaForMultipleChoice.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.XLMRobertaForMultipleChoice.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.XLMRobertaForMultipleChoice.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.XLMRobertaForMultipleChoice.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.XLMRobertaForMultipleChoice.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.XLMRobertaForMultipleChoice.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.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMRobertaForMultipleChoice.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.30.0/src/transformers/models/xlm_roberta/modeling_xlm_roberta.py#L1298",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ls=new Ue({props:{$$slots:{default:[GJ]},$$scope:{ctx:L}}}),Xs=new qe({props:{anchor:"transformers.XLMRobertaForMultipleChoice.forward.example",$$slots:{default:[SJ]},$$scope:{ctx:L}}}),Ol=new Ne({}),Dl=new W({props:{name:"class transformers.XLMRobertaForTokenClassification",anchor:"transformers.XLMRobertaForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLMRobertaForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_xlm_roberta.py#L1382"}}),Kl=new W({props:{name:"forward",anchor:"transformers.XLMRobertaForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.XLMRobertaForTokenClassification.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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.XLMRobertaForTokenClassification.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.XLMRobertaForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaForTokenClassification.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.XLMRobertaForTokenClassification.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.XLMRobertaForTokenClassification.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.XLMRobertaForTokenClassification.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.XLMRobertaForTokenClassification.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.XLMRobertaForTokenClassification.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.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMRobertaForTokenClassification.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.30.0/src/transformers/models/xlm_roberta/modeling_xlm_roberta.py#L1400",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),js=new Ue({props:{$$slots:{default:[VJ]},$$scope:{ctx:L}}}),Cs=new qe({props:{anchor:"transformers.XLMRobertaForTokenClassification.forward.example",$$slots:{default:[PJ]},$$scope:{ctx:L}}}),ei=new Ne({}),ti=new W({props:{name:"class transformers.XLMRobertaForQuestionAnswering",anchor:"transformers.XLMRobertaForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLMRobertaForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_xlm_roberta.py#L1494"}}),ai=new W({props:{name:"forward",anchor:"transformers.XLMRobertaForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.XLMRobertaForQuestionAnswering.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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.XLMRobertaForQuestionAnswering.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.XLMRobertaForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaForQuestionAnswering.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.XLMRobertaForQuestionAnswering.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.XLMRobertaForQuestionAnswering.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.XLMRobertaForQuestionAnswering.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.XLMRobertaForQuestionAnswering.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.XLMRobertaForQuestionAnswering.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.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMRobertaForQuestionAnswering.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.XLMRobertaForQuestionAnswering.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.30.0/src/transformers/models/xlm_roberta/modeling_xlm_roberta.py#L1508",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),zs=new Ue({props:{$$slots:{default:[OJ]},$$scope:{ctx:L}}}),Us=new qe({props:{anchor:"transformers.XLMRobertaForQuestionAnswering.forward.example",$$slots:{default:[DJ]},$$scope:{ctx:L}}}),ri=new Ne({}),li=new W({props:{name:"class transformers.TFXLMRobertaModel",anchor:"transformers.TFXLMRobertaModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLMRobertaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_tf_xlm_roberta.py#L875"}}),Ns=new Ue({props:{$$slots:{default:[QJ]},$$scope:{ctx:L}}}),pi=new W({props:{name:"call",anchor:"transformers.TFXLMRobertaModel.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.TFXLMRobertaModel.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. Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLMRobertaModel.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>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.TFXLMRobertaModel.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.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.TFXLMRobertaModel.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>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFXLMRobertaModel.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.TFXLMRobertaModel.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.TFXLMRobertaModel.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.TFXLMRobertaModel.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.TFXLMRobertaModel.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.30.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.TFXLMRobertaModel.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.TFXLMRobertaModel.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.TFXLMRobertaModel.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.TFXLMRobertaModel.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.TFXLMRobertaModel.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.30.0/src/transformers/models/xlm_roberta/modeling_tf_xlm_roberta.py#L880",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
<p>This output is usually <em>not</em> a good summary of the semantic content of the input, you\u2019re often better with
averaging or pooling the sequence of hidden-states for the whole input sequence.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_tf_outputs.TFBaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),qs=new Ue({props:{$$slots:{default:[YJ]},$$scope:{ctx:L}}}),Ws=new qe({props:{anchor:"transformers.TFXLMRobertaModel.call.example",$$slots:{default:[HJ]},$$scope:{ctx:L}}}),hi=new Ne({}),mi=new W({props:{name:"class transformers.TFXLMRobertaForCausalLM",anchor:"transformers.TFXLMRobertaForCausalLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLMRobertaForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_tf_xlm_roberta.py#L1081"}}),As=new Ue({props:{$$slots:{default:[KJ]},$$scope:{ctx:L}}}),bi=new W({props:{name:"call",anchor:"transformers.TFXLMRobertaForCausalLM.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.TFXLMRobertaForCausalLM.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. Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLMRobertaForCausalLM.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>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.TFXLMRobertaForCausalLM.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.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.TFXLMRobertaForCausalLM.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>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFXLMRobertaForCausalLM.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.TFXLMRobertaForCausalLM.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.TFXLMRobertaForCausalLM.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.TFXLMRobertaForCausalLM.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.TFXLMRobertaForCausalLM.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.30.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.TFXLMRobertaForCausalLM.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.TFXLMRobertaForCausalLM.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.TFXLMRobertaForCausalLM.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.TFXLMRobertaForCausalLM.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.TFXLMRobertaForCausalLM.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.TFXLMRobertaForCausalLM.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.30.0/src/transformers/models/xlm_roberta/modeling_tf_xlm_roberta.py#L1114",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>List[tf.Tensor]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>tf.Tensor</code> of length <code>config.n_layers</code>, with each tensor of shape <code>(2, batch_size, num_heads, sequence_length, embed_size_per_head)</code>).</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions"
>transformers.modeling_tf_outputs.TFCausalLMOutputWithCrossAttentions</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Bs=new Ue({props:{$$slots:{default:[ez]},$$scope:{ctx:L}}}),Gs=new qe({props:{anchor:"transformers.TFXLMRobertaForCausalLM.call.example",$$slots:{default:[tz]},$$scope:{ctx:L}}}),Mi=new Ne({}),yi=new W({props:{name:"class transformers.TFXLMRobertaForMaskedLM",anchor:"transformers.TFXLMRobertaForMaskedLM",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLMRobertaForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_tf_xlm_roberta.py#L999"}}),Vs=new Ue({props:{$$slots:{default:[oz]},$$scope:{ctx:L}}}),Fi=new W({props:{name:"call",anchor:"transformers.TFXLMRobertaForMaskedLM.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.TFXLMRobertaForMaskedLM.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. Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLMRobertaForMaskedLM.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>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.TFXLMRobertaForMaskedLM.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.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.TFXLMRobertaForMaskedLM.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>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFXLMRobertaForMaskedLM.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.TFXLMRobertaForMaskedLM.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.TFXLMRobertaForMaskedLM.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.TFXLMRobertaForMaskedLM.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.TFXLMRobertaForMaskedLM.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.30.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.TFXLMRobertaForMaskedLM.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.TFXLMRobertaForMaskedLM.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.30.0/src/transformers/models/xlm_roberta/modeling_tf_xlm_roberta.py#L1016",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of non-masked labels, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMaskedLMOutput"
>transformers.modeling_tf_outputs.TFMaskedLMOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ps=new Ue({props:{$$slots:{default:[nz]},$$scope:{ctx:L}}}),Os=new qe({props:{anchor:"transformers.TFXLMRobertaForMaskedLM.call.example",$$slots:{default:[sz]},$$scope:{ctx:L}}}),Ds=new qe({props:{anchor:"transformers.TFXLMRobertaForMaskedLM.call.example-2",$$slots:{default:[az]},$$scope:{ctx:L}}}),$i=new Ne({}),Ri=new W({props:{name:"class transformers.TFXLMRobertaForSequenceClassification",anchor:"transformers.TFXLMRobertaForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLMRobertaForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_tf_xlm_roberta.py#L1240"}}),Ys=new Ue({props:{$$slots:{default:[rz]},$$scope:{ctx:L}}}),Ei=new W({props:{name:"call",anchor:"transformers.TFXLMRobertaForSequenceClassification.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.TFXLMRobertaForSequenceClassification.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. Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLMRobertaForSequenceClassification.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>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.TFXLMRobertaForSequenceClassification.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.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.TFXLMRobertaForSequenceClassification.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>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFXLMRobertaForSequenceClassification.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.TFXLMRobertaForSequenceClassification.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.TFXLMRobertaForSequenceClassification.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.TFXLMRobertaForSequenceClassification.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.TFXLMRobertaForSequenceClassification.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.30.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.TFXLMRobertaForSequenceClassification.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.TFXLMRobertaForSequenceClassification.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.30.0/src/transformers/models/xlm_roberta/modeling_tf_xlm_roberta.py#L1251",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Hs=new Ue({props:{$$slots:{default:[lz]},$$scope:{ctx:L}}}),Ks=new qe({props:{anchor:"transformers.TFXLMRobertaForSequenceClassification.call.example",$$slots:{default:[iz]},$$scope:{ctx:L}}}),ea=new qe({props:{anchor:"transformers.TFXLMRobertaForSequenceClassification.call.example-2",$$slots:{default:[dz]},$$scope:{ctx:L}}}),ji=new Ne({}),Ci=new W({props:{name:"class transformers.TFXLMRobertaForMultipleChoice",anchor:"transformers.TFXLMRobertaForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLMRobertaForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_tf_xlm_roberta.py#L1317"}}),oa=new Ue({props:{$$slots:{default:[cz]},$$scope:{ctx:L}}}),Ii=new W({props:{name:"call",anchor:"transformers.TFXLMRobertaForMultipleChoice.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.TFXLMRobertaForMultipleChoice.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. Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLMRobertaForMultipleChoice.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>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.TFXLMRobertaForMultipleChoice.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.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.TFXLMRobertaForMultipleChoice.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>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFXLMRobertaForMultipleChoice.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.TFXLMRobertaForMultipleChoice.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.TFXLMRobertaForMultipleChoice.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.TFXLMRobertaForMultipleChoice.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.TFXLMRobertaForMultipleChoice.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.30.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.TFXLMRobertaForMultipleChoice.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.TFXLMRobertaForMultipleChoice.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.30.0/src/transformers/models/xlm_roberta/modeling_tf_xlm_roberta.py#L1331",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),na=new Ue({props:{$$slots:{default:[pz]},$$scope:{ctx:L}}}),sa=new qe({props:{anchor:"transformers.TFXLMRobertaForMultipleChoice.call.example",$$slots:{default:[hz]},$$scope:{ctx:L}}}),Ni=new Ne({}),qi=new W({props:{name:"class transformers.TFXLMRobertaForTokenClassification",anchor:"transformers.TFXLMRobertaForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLMRobertaForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_tf_xlm_roberta.py#L1410"}}),ra=new Ue({props:{$$slots:{default:[mz]},$$scope:{ctx:L}}}),Bi=new W({props:{name:"call",anchor:"transformers.TFXLMRobertaForTokenClassification.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.TFXLMRobertaForTokenClassification.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. Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLMRobertaForTokenClassification.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>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.TFXLMRobertaForTokenClassification.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.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.TFXLMRobertaForTokenClassification.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>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFXLMRobertaForTokenClassification.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.TFXLMRobertaForTokenClassification.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.TFXLMRobertaForTokenClassification.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.TFXLMRobertaForTokenClassification.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.TFXLMRobertaForTokenClassification.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.30.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.TFXLMRobertaForTokenClassification.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.TFXLMRobertaForTokenClassification.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.30.0/src/transformers/models/xlm_roberta/modeling_tf_xlm_roberta.py#L1428",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),la=new Ue({props:{$$slots:{default:[uz]},$$scope:{ctx:L}}}),ia=new qe({props:{anchor:"transformers.TFXLMRobertaForTokenClassification.call.example",$$slots:{default:[fz]},$$scope:{ctx:L}}}),da=new qe({props:{anchor:"transformers.TFXLMRobertaForTokenClassification.call.example-2",$$slots:{default:[gz]},$$scope:{ctx:L}}}),Gi=new Ne({}),Si=new W({props:{name:"class transformers.TFXLMRobertaForQuestionAnswering",anchor:"transformers.TFXLMRobertaForQuestionAnswering",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLMRobertaForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_tf_xlm_roberta.py#L1494"}}),pa=new Ue({props:{$$slots:{default:[_z]},$$scope:{ctx:L}}}),Di=new W({props:{name:"call",anchor:"transformers.TFXLMRobertaForQuestionAnswering.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.TFXLMRobertaForQuestionAnswering.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. Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLMRobertaForQuestionAnswering.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>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.TFXLMRobertaForQuestionAnswering.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.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.TFXLMRobertaForQuestionAnswering.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>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFXLMRobertaForQuestionAnswering.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.TFXLMRobertaForQuestionAnswering.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.TFXLMRobertaForQuestionAnswering.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.TFXLMRobertaForQuestionAnswering.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.TFXLMRobertaForQuestionAnswering.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.30.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.TFXLMRobertaForQuestionAnswering.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.TFXLMRobertaForQuestionAnswering.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.TFXLMRobertaForQuestionAnswering.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.30.0/src/transformers/models/xlm_roberta/modeling_tf_xlm_roberta.py#L1507",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ha=new Ue({props:{$$slots:{default:[bz]},$$scope:{ctx:L}}}),ma=new qe({props:{anchor:"transformers.TFXLMRobertaForQuestionAnswering.call.example",$$slots:{default:[Mz]},$$scope:{ctx:L}}}),ua=new qe({props:{anchor:"transformers.TFXLMRobertaForQuestionAnswering.call.example-2",$$slots:{default:[yz]},$$scope:{ctx:L}}}),Qi=new Ne({}),Yi=new W({props:{name:"class transformers.FlaxXLMRobertaModel",anchor:"transformers.FlaxXLMRobertaModel",parameters:[{name:"config",val:": XLMRobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxXLMRobertaModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py#L1003"}}),ad=new W({props:{name:"__call__",anchor:"transformers.FlaxXLMRobertaModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxXLMRobertaModel.__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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxXLMRobertaModel.__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.FlaxXLMRobertaModel.__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.FlaxXLMRobertaModel.__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.FlaxXLMRobertaModel.__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.FlaxXLMRobertaModel.__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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py#L829",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ga=new Ue({props:{$$slots:{default:[vz]},$$scope:{ctx:L}}}),_a=new qe({props:{anchor:"transformers.FlaxXLMRobertaModel.__call__.example",$$slots:{default:[Tz]},$$scope:{ctx:L}}}),rd=new Ne({}),ld=new W({props:{name:"class transformers.FlaxXLMRobertaForCausalLM",anchor:"transformers.FlaxXLMRobertaForCausalLM",parameters:[{name:"config",val:": XLMRobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxXLMRobertaForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py#L1469"}}),fd=new W({props:{name:"__call__",anchor:"transformers.FlaxXLMRobertaForCausalLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxXLMRobertaForCausalLM.__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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxXLMRobertaForCausalLM.__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.FlaxXLMRobertaForCausalLM.__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.FlaxXLMRobertaForCausalLM.__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.FlaxXLMRobertaForCausalLM.__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.FlaxXLMRobertaForCausalLM.__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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py#L829",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key, value
states of the self-attention and the cross-attention layers if model is used in encoder-decoder setting.
Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ma=new Ue({props:{$$slots:{default:[kz]},$$scope:{ctx:L}}}),ya=new qe({props:{anchor:"transformers.FlaxXLMRobertaForCausalLM.__call__.example",$$slots:{default:[wz]},$$scope:{ctx:L}}}),gd=new Ne({}),_d=new W({props:{name:"class transformers.FlaxXLMRobertaForMaskedLM",anchor:"transformers.FlaxXLMRobertaForMaskedLM",parameters:[{name:"config",val:": XLMRobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxXLMRobertaForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py#L1070"}}),$d=new W({props:{name:"__call__",anchor:"transformers.FlaxXLMRobertaForMaskedLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxXLMRobertaForMaskedLM.__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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxXLMRobertaForMaskedLM.__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.FlaxXLMRobertaForMaskedLM.__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.FlaxXLMRobertaForMaskedLM.__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.FlaxXLMRobertaForMaskedLM.__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.FlaxXLMRobertaForMaskedLM.__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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py#L829",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ta=new Ue({props:{$$slots:{default:[Fz]},$$scope:{ctx:L}}}),ka=new qe({props:{anchor:"transformers.FlaxXLMRobertaForMaskedLM.__call__.example",$$slots:{default:[$z]},$$scope:{ctx:L}}}),Rd=new Ne({}),xd=new W({props:{name:"class transformers.FlaxXLMRobertaForSequenceClassification",anchor:"transformers.FlaxXLMRobertaForSequenceClassification",parameters:[{name:"config",val:": XLMRobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxXLMRobertaForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py#L1143"}}),Ud=new W({props:{name:"__call__",anchor:"transformers.FlaxXLMRobertaForSequenceClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxXLMRobertaForSequenceClassification.__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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxXLMRobertaForSequenceClassification.__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.FlaxXLMRobertaForSequenceClassification.__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.FlaxXLMRobertaForSequenceClassification.__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.FlaxXLMRobertaForSequenceClassification.__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.FlaxXLMRobertaForSequenceClassification.__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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py#L829",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Fa=new Ue({props:{$$slots:{default:[Rz]},$$scope:{ctx:L}}}),$a=new qe({props:{anchor:"transformers.FlaxXLMRobertaForSequenceClassification.__call__.example",$$slots:{default:[xz]},$$scope:{ctx:L}}}),Id=new Ne({}),Nd=new W({props:{name:"class transformers.FlaxXLMRobertaForMultipleChoice",anchor:"transformers.FlaxXLMRobertaForMultipleChoice",parameters:[{name:"config",val:": XLMRobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxXLMRobertaForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py#L1224"}}),Vd=new W({props:{name:"__call__",anchor:"transformers.FlaxXLMRobertaForMultipleChoice.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxXLMRobertaForMultipleChoice.__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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxXLMRobertaForMultipleChoice.__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.FlaxXLMRobertaForMultipleChoice.__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.FlaxXLMRobertaForMultipleChoice.__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.FlaxXLMRobertaForMultipleChoice.__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.FlaxXLMRobertaForMultipleChoice.__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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py#L829",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),xa=new Ue({props:{$$slots:{default:[Lz]},$$scope:{ctx:L}}}),La=new qe({props:{anchor:"transformers.FlaxXLMRobertaForMultipleChoice.__call__.example",$$slots:{default:[Xz]},$$scope:{ctx:L}}}),Pd=new Ne({}),Od=new W({props:{name:"class transformers.FlaxXLMRobertaForTokenClassification",anchor:"transformers.FlaxXLMRobertaForTokenClassification",parameters:[{name:"config",val:": XLMRobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxXLMRobertaForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py#L1306"}}),oc=new W({props:{name:"__call__",anchor:"transformers.FlaxXLMRobertaForTokenClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxXLMRobertaForTokenClassification.__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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxXLMRobertaForTokenClassification.__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.FlaxXLMRobertaForTokenClassification.__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.FlaxXLMRobertaForTokenClassification.__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.FlaxXLMRobertaForTokenClassification.__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.FlaxXLMRobertaForTokenClassification.__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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py#L829",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ea=new Ue({props:{$$slots:{default:[Ez]},$$scope:{ctx:L}}}),ja=new qe({props:{anchor:"transformers.FlaxXLMRobertaForTokenClassification.__call__.example",$$slots:{default:[jz]},$$scope:{ctx:L}}}),nc=new Ne({}),sc=new W({props:{name:"class transformers.FlaxXLMRobertaForQuestionAnswering",anchor:"transformers.FlaxXLMRobertaForQuestionAnswering",parameters:[{name:"config",val:": XLMRobertaConfig"},{name:"input_shape",val:": typing.Tuple = (1, 1)"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxXLMRobertaForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig">XLMRobertaConfig</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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py#L1383"}}),hc=new W({props:{name:"__call__",anchor:"transformers.FlaxXLMRobertaForQuestionAnswering.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": PRNGKey = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxXLMRobertaForQuestionAnswering.__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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.FlaxXLMRobertaForQuestionAnswering.__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.FlaxXLMRobertaForQuestionAnswering.__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.FlaxXLMRobertaForQuestionAnswering.__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.FlaxXLMRobertaForQuestionAnswering.__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.FlaxXLMRobertaForQuestionAnswering.__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.30.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.30.0/src/transformers/models/xlm_roberta/modeling_flax_xlm_roberta.py#L829",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaConfig"
>XLMRobertaConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput"
>transformers.modeling_flax_outputs.FlaxQuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ja=new Ue({props:{$$slots:{default:[Cz]},$$scope:{ctx:L}}}),za=new qe({props:{anchor:"transformers.FlaxXLMRobertaForQuestionAnswering.__call__.example",$$slots:{default:[Jz]},$$scope:{ctx:L}}}),{c(){d=s("meta"),M=p(),u=s("h1"),f=s("a"),b=s("span"),v(i.$$.fragment),m=p(),X=s("span"),Me=o("XLM-RoBERTa"),fe=p(),q=s("div"),ce=s("a"),te=s("img"),ye=p(),B=s("a"),pe=s("img"),O=p(),ae=s("h2"),re=s("a"),G=s("span"),v(le.$$.fragment),ve=p(),S=s("span"),Te=o("Overview"),ge=p(),Z=s("p"),ke=o("The XLM-RoBERTa model was proposed in "),ie=s("a"),oe=o("Unsupervised Cross-lingual Representation Learning at Scale"),j=o(` by Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume
Wenzek, Francisco Guzm\xE1n, Edouard Grave, Myle Ott, Luke Zettlemoyer and Veselin Stoyanov. It is based on Facebook\u2019s
RoBERTa model released in 2019. It is a large multi-lingual language model, trained on 2.5TB of filtered CommonCrawl
data.`),z=p(),he=s("p"),Q=o("The abstract from the paper is the following:"),_e=p(),me=s("p"),V=s("em"),we=o(`This paper shows that pretraining multilingual language models at scale leads to significant performance gains for a
wide range of cross-lingual transfer tasks. We train a Transformer-based masked language model on one hundred
languages, using more than two terabytes of filtered CommonCrawl data. Our model, dubbed XLM-R, significantly
outperforms multilingual BERT (mBERT) on a variety of cross-lingual benchmarks, including +13.8% average accuracy on
XNLI, +12.3% average F1 score on MLQA, and +2.1% average F1 score on NER. XLM-R performs particularly well on
low-resource languages, improving 11.8% in XNLI accuracy for Swahili and 9.2% for Urdu over the previous XLM model. We
also present a detailed empirical evaluation of the key factors that are required to achieve these gains, including the
trade-offs between (1) positive transfer and capacity dilution and (2) the performance of high and low resource
languages at scale. Finally, we show, for the first time, the possibility of multilingual modeling without sacrificing
per-language performance; XLM-Ris very competitive with strong monolingual models on the GLUE and XNLI benchmarks. We
will make XLM-R code, data, and models publicly available.`),be=p(),J=s("p"),Fe=o("Tips:"),D=p(),ne=s("ul"),de=s("li"),Y=o(`XLM-RoBERTa is a multilingual model trained on 100 different languages. Unlike some XLM multilingual models, it does
not require `),ue=s("code"),$e=o("lang"),N=o(` tensors to understand which language is used, and should be able to determine the correct
language from the input ids.`),Re=p(),P=s("li"),xe=o("Uses RoBERTa tricks on the XLM approach, but does not use the translation language modeling objective. It only uses masked language modeling on sentences coming from one language."),se=p(),C=s("li"),Le=o("This implementation is the same as RoBERTa. Refer to the "),U=s("a"),Xe=o("documentation of RoBERTa"),Ee=o(` for usage examples
as well as the information relative to the inputs and outputs.`),y=p(),x=s("p"),Pe=o("This model was contributed by "),K=s("a"),Oe=o("stefan-it"),De=o(". The original code can be found "),E=s("a"),Qe=o("here"),Ye=o("."),Be=p(),Je=s("h2"),ze=s("a"),I=s("span"),v(A.$$.fragment),He=p(),Ae=s("span"),H=o("Resources"),Ge=p(),Ie=s("p"),je=o("A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with XLM-RoBERTa. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),Se=p(),v(ee.$$.fragment),Ve=p(),gt=s("ul"),Lc=s("li"),Kb=o("A blog post on how to "),ir=s("a"),eM=o("finetune XLM RoBERTa for multiclass classification with Habana Gaudi on AWS"),tM=p(),Fo=s("li"),Xc=s("a"),oM=o("XLMRobertaForSequenceClassification"),nM=o(" is supported by this "),dr=s("a"),sM=o("example script"),aM=o(" and "),cr=s("a"),rM=o("notebook"),lM=o("."),iM=p(),$o=s("li"),Ec=s("a"),dM=o("TFXLMRobertaForSequenceClassification"),cM=o(" is supported by this "),pr=s("a"),pM=o("example script"),hM=o(" and "),hr=s("a"),mM=o("notebook"),uM=o("."),fM=p(),Ro=s("li"),jc=s("a"),gM=o("FlaxXLMRobertaForSequenceClassification"),_M=o(" is supported by this "),mr=s("a"),bM=o("example script"),MM=o(" and "),ur=s("a"),yM=o("notebook"),vM=o("."),TM=p(),Cc=s("li"),fr=s("a"),kM=o("Text classification"),wM=o(" chapter of the \u{1F917} Hugging Face Task Guides."),FM=p(),jh=s("li"),Jc=s("a"),$M=o("Text classification task guide"),Mg=p(),v(gr.$$.fragment),yg=p(),$t=s("ul"),xo=s("li"),zc=s("a"),RM=o("XLMRobertaForTokenClassification"),xM=o(" is supported by this "),_r=s("a"),LM=o("example script"),XM=o(" and "),br=s("a"),EM=o("notebook"),jM=o("."),CM=p(),Lo=s("li"),Uc=s("a"),JM=o("TFXLMRobertaForTokenClassification"),zM=o(" is supported by this "),Mr=s("a"),UM=o("example script"),IM=o(" and "),yr=s("a"),NM=o("notebook"),qM=o("."),WM=p(),as=s("li"),Ic=s("a"),ZM=o("FlaxXLMRobertaForTokenClassification"),AM=o(" is supported by this "),vr=s("a"),BM=o("example script"),GM=o("."),SM=p(),Nc=s("li"),Tr=s("a"),VM=o("Token classification"),PM=o(" chapter of the \u{1F917} Hugging Face Course."),OM=p(),Ch=s("li"),qc=s("a"),DM=o("Token classification task guide"),vg=p(),v(kr.$$.fragment),Tg=p(),Xo=s("ul"),Eo=s("li"),Wc=s("a"),QM=o("XLMRobertaForCausalLM"),YM=o(" is supported by this "),wr=s("a"),HM=o("example script"),KM=o(" and "),Fr=s("a"),ey=o("notebook"),ty=o("."),oy=p(),Zc=s("li"),$r=s("a"),ny=o("Causal language modeling"),sy=o(" chapter of the \u{1F917} Hugging Face Task Guides."),ay=p(),Jh=s("li"),Ac=s("a"),ry=o("Causal language modeling task guide"),kg=p(),v(Rr.$$.fragment),wg=p(),Rt=s("ul"),jo=s("li"),Bc=s("a"),ly=o("XLMRobertaForMaskedLM"),iy=o(" is supported by this "),xr=s("a"),dy=o("example script"),cy=o(" and "),Lr=s("a"),py=o("notebook"),hy=o("."),my=p(),Co=s("li"),Gc=s("a"),uy=o("TFXLMRobertaForMaskedLM"),fy=o(" is supported by this "),Xr=s("a"),gy=o("example script"),_y=o(" and "),Er=s("a"),by=o("notebook"),My=o("."),yy=p(),Jo=s("li"),Sc=s("a"),vy=o("FlaxXLMRobertaForMaskedLM"),Ty=o(" is supported by this "),jr=s("a"),ky=o("example script"),wy=o(" and "),Cr=s("a"),Fy=o("notebook"),$y=o("."),Ry=p(),Vc=s("li"),Jr=s("a"),xy=o("Masked language modeling"),Ly=o(" chapter of the \u{1F917} Hugging Face Course."),Xy=p(),zh=s("li"),Pc=s("a"),Ey=o("Masked language modeling"),Fg=p(),v(zr.$$.fragment),$g=p(),xt=s("ul"),zo=s("li"),Oc=s("a"),jy=o("XLMRobertaForQuestionAnswering"),Cy=o(" is supported by this "),Ur=s("a"),Jy=o("example script"),zy=o(" and "),Ir=s("a"),Uy=o("notebook"),Iy=o("."),Ny=p(),Uo=s("li"),Dc=s("a"),qy=o("TFXLMRobertaForQuestionAnswering"),Wy=o(" is supported by this "),Nr=s("a"),Zy=o("example script"),Ay=o(" and "),qr=s("a"),By=o("notebook"),Gy=o("."),Sy=p(),rs=s("li"),Qc=s("a"),Vy=o("FlaxXLMRobertaForQuestionAnswering"),Py=o(" is supported by this "),Wr=s("a"),Oy=o("example script"),Dy=o("."),Qy=p(),Yc=s("li"),Zr=s("a"),Yy=o("Question answering"),Hy=o(" chapter of the \u{1F917} Hugging Face Course."),Ky=p(),Uh=s("li"),Hc=s("a"),ev=o("Question answering task guide"),Rg=p(),Kc=s("p"),Ih=s("strong"),tv=o("Multiple choice"),xg=p(),Io=s("ul"),No=s("li"),ep=s("a"),ov=o("XLMRobertaForMultipleChoice"),nv=o(" is supported by this "),Ar=s("a"),sv=o("example script"),av=o(" and "),Br=s("a"),rv=o("notebook"),lv=o("."),iv=p(),qo=s("li"),tp=s("a"),dv=o("TFXLMRobertaForMultipleChoice"),cv=o(" is supported by this "),Gr=s("a"),pv=o("example script"),hv=o(" and "),Sr=s("a"),mv=o("notebook"),uv=o("."),fv=p(),Nh=s("li"),op=s("a"),gv=o("Multiple choice task guide"),Lg=p(),np=s("p"),_v=o("\u{1F680} Deploy"),Xg=p(),sp=s("ul"),Vr=s("li"),bv=o("A blog post on how to "),Pr=s("a"),Mv=o("Deploy Serverless XLM RoBERTa on AWS Lambda"),yv=o("."),Eg=p(),ln=s("h2"),ls=s("a"),qh=s("span"),v(Or.$$.fragment),vv=p(),Wh=s("span"),Tv=o("XLMRobertaConfig"),jg=p(),Bt=s("div"),v(Dr.$$.fragment),kv=p(),go=s("p"),wv=o("This is the configuration class to store the configuration of a "),ap=s("a"),Fv=o("XLMRobertaModel"),$v=o(" or a "),rp=s("a"),Rv=o("TFXLMRobertaModel"),xv=o(`. It
is used to instantiate a XLM-RoBERTa 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 XLMRoBERTa
`),Qr=s("a"),Lv=o("xlm-roberta-base"),Xv=o(" architecture."),Ev=p(),dn=s("p"),jv=o("Configuration objects inherit from "),lp=s("a"),Cv=o("PretrainedConfig"),Jv=o(` and can be used to control the model outputs. Read the
documentation from `),ip=s("a"),zv=o("PretrainedConfig"),Uv=o(" for more information."),Iv=p(),v(is.$$.fragment),Cg=p(),cn=s("h2"),ds=s("a"),Zh=s("span"),v(Yr.$$.fragment),Nv=p(),Ah=s("span"),qv=o("XLMRobertaTokenizer"),Jg=p(),et=s("div"),v(Hr.$$.fragment),Wv=p(),_o=s("p"),Zv=o("Adapted from "),dp=s("a"),Av=o("RobertaTokenizer"),Bv=o(" and "),cp=s("a"),Gv=o("XLNetTokenizer"),Sv=o(`. Based on
`),Kr=s("a"),Vv=o("SentencePiece"),Pv=o("."),Ov=p(),el=s("p"),Dv=o("This tokenizer inherits from "),pp=s("a"),Qv=o("PreTrainedTokenizer"),Yv=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Hv=p(),Wo=s("div"),v(tl.$$.fragment),Kv=p(),Bh=s("p"),eT=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLM-RoBERTa sequence has the following format:`),tT=p(),ol=s("ul"),hp=s("li"),oT=o("single sequence: "),Gh=s("code"),nT=o("<s> X </s>"),sT=p(),mp=s("li"),aT=o("pair of sequences: "),Sh=s("code"),rT=o("<s> A </s></s> B </s>"),lT=p(),cs=s("div"),v(nl.$$.fragment),iT=p(),sl=s("p"),dT=o(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Vh=s("code"),cT=o("prepare_for_model"),pT=o(" method."),hT=p(),ps=s("div"),v(al.$$.fragment),mT=p(),Ph=s("p"),uT=o(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. XLM-RoBERTa does
not make use of token type ids, therefore a list of zeros is returned.`),fT=p(),up=s("div"),v(rl.$$.fragment),zg=p(),pn=s("h2"),hs=s("a"),Oh=s("span"),v(ll.$$.fragment),gT=p(),Dh=s("span"),_T=o("XLMRobertaTokenizerFast"),Ug=p(),bt=s("div"),v(il.$$.fragment),bT=p(),Gt=s("p"),MT=o("Construct a \u201Cfast\u201D XLM-RoBERTa tokenizer (backed by HuggingFace\u2019s "),Qh=s("em"),yT=o("tokenizers"),vT=o(` library). Adapted from
`),fp=s("a"),TT=o("RobertaTokenizer"),kT=o(" and "),gp=s("a"),wT=o("XLNetTokenizer"),FT=o(`. Based on
`),dl=s("a"),$T=o("BPE"),RT=o("."),xT=p(),cl=s("p"),LT=o("This tokenizer inherits from "),_p=s("a"),XT=o("PreTrainedTokenizerFast"),ET=o(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),jT=p(),Zo=s("div"),v(pl.$$.fragment),CT=p(),Yh=s("p"),JT=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLM-RoBERTa sequence has the following format:`),zT=p(),hl=s("ul"),bp=s("li"),UT=o("single sequence: "),Hh=s("code"),IT=o("<s> X </s>"),NT=p(),Mp=s("li"),qT=o("pair of sequences: "),Kh=s("code"),WT=o("<s> A </s></s> B </s>"),ZT=p(),ms=s("div"),v(ml.$$.fragment),AT=p(),em=s("p"),BT=o(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. XLM-RoBERTa does
not make use of token type ids, therefore a list of zeros is returned.`),Ig=p(),hn=s("h2"),us=s("a"),tm=s("span"),v(ul.$$.fragment),GT=p(),om=s("span"),ST=o("XLMRobertaModel"),Ng=p(),Ke=s("div"),v(fl.$$.fragment),VT=p(),nm=s("p"),PT=o("The bare XLM-RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),OT=p(),gl=s("p"),DT=o("This model inherits from "),yp=s("a"),QT=o("PreTrainedModel"),YT=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),HT=p(),_l=s("p"),KT=o("This model is also a PyTorch "),bl=s("a"),ek=o("torch.nn.Module"),tk=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ok=p(),Ml=s("p"),nk=o(`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),sm=s("em"),sk=o(`Attention is
all you need`),ak=o(`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),rk=p(),it=s("p"),lk=o("To behave as an decoder the model needs to be initialized with the "),am=s("code"),ik=o("is_decoder"),dk=o(` argument of the configuration set
to `),rm=s("code"),ck=o("True"),pk=o(". To be used in a Seq2Seq model, the model needs to initialized with both "),lm=s("code"),hk=o("is_decoder"),mk=o(` argument and
`),im=s("code"),uk=o("add_cross_attention"),fk=o(" set to "),dm=s("code"),gk=o("True"),_k=o("; an "),cm=s("code"),bk=o("encoder_hidden_states"),Mk=o(" is then expected as an input to the forward pass."),yk=p(),fs=s("p"),vk=o(".. _"),pm=s("em"),Tk=o("Attention is all you need"),kk=o(": "),yl=s("a"),wk=o("https://arxiv.org/abs/1706.03762"),Fk=p(),Vt=s("div"),v(vl.$$.fragment),$k=p(),mn=s("p"),Rk=o("The "),vp=s("a"),xk=o("XLMRobertaModel"),Lk=o(" forward method, overrides the "),hm=s("code"),Xk=o("__call__"),Ek=o(" special method."),jk=p(),v(gs.$$.fragment),Ck=p(),v(_s.$$.fragment),qg=p(),un=s("h2"),bs=s("a"),mm=s("span"),v(Tl.$$.fragment),Jk=p(),um=s("span"),zk=o("XLMRobertaForCausalLM"),Wg=p(),Mt=s("div"),v(kl.$$.fragment),Uk=p(),wl=s("p"),Ik=o("XLM-RoBERTa Model with a "),fm=s("code"),Nk=o("language modeling"),qk=o(" head on top for CLM fine-tuning."),Wk=p(),Fl=s("p"),Zk=o("This model inherits from "),Tp=s("a"),Ak=o("PreTrainedModel"),Bk=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Gk=p(),$l=s("p"),Sk=o("This model is also a PyTorch "),Rl=s("a"),Vk=o("torch.nn.Module"),Pk=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ok=p(),Pt=s("div"),v(xl.$$.fragment),Dk=p(),fn=s("p"),Qk=o("The "),kp=s("a"),Yk=o("XLMRobertaForCausalLM"),Hk=o(" forward method, overrides the "),gm=s("code"),Kk=o("__call__"),ew=o(" special method."),tw=p(),v(Ms.$$.fragment),ow=p(),v(ys.$$.fragment),Zg=p(),gn=s("h2"),vs=s("a"),_m=s("span"),v(Ll.$$.fragment),nw=p(),bm=s("span"),sw=o("XLMRobertaForMaskedLM"),Ag=p(),yt=s("div"),v(Xl.$$.fragment),aw=p(),El=s("p"),rw=o("XLM-RoBERTa Model with a "),Mm=s("code"),lw=o("language modeling"),iw=o(" head on top."),dw=p(),jl=s("p"),cw=o("This model inherits from "),wp=s("a"),pw=o("PreTrainedModel"),hw=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),mw=p(),Cl=s("p"),uw=o("This model is also a PyTorch "),Jl=s("a"),fw=o("torch.nn.Module"),gw=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),_w=p(),Ot=s("div"),v(zl.$$.fragment),bw=p(),_n=s("p"),Mw=o("The "),Fp=s("a"),yw=o("XLMRobertaForMaskedLM"),vw=o(" forward method, overrides the "),ym=s("code"),Tw=o("__call__"),kw=o(" special method."),ww=p(),v(Ts.$$.fragment),Fw=p(),v(ks.$$.fragment),Bg=p(),bn=s("h2"),ws=s("a"),vm=s("span"),v(Ul.$$.fragment),$w=p(),Tm=s("span"),Rw=o("XLMRobertaForSequenceClassification"),Gg=p(),vt=s("div"),v(Il.$$.fragment),xw=p(),km=s("p"),Lw=o(`XLM-RoBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Xw=p(),Nl=s("p"),Ew=o("This model inherits from "),$p=s("a"),jw=o("PreTrainedModel"),Cw=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Jw=p(),ql=s("p"),zw=o("This model is also a PyTorch "),Wl=s("a"),Uw=o("torch.nn.Module"),Iw=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Nw=p(),Lt=s("div"),v(Zl.$$.fragment),qw=p(),Mn=s("p"),Ww=o("The "),Rp=s("a"),Zw=o("XLMRobertaForSequenceClassification"),Aw=o(" forward method, overrides the "),wm=s("code"),Bw=o("__call__"),Gw=o(" special method."),Sw=p(),v(Fs.$$.fragment),Vw=p(),v($s.$$.fragment),Pw=p(),v(Rs.$$.fragment),Sg=p(),yn=s("h2"),xs=s("a"),Fm=s("span"),v(Al.$$.fragment),Ow=p(),$m=s("span"),Dw=o("XLMRobertaForMultipleChoice"),Vg=p(),Tt=s("div"),v(Bl.$$.fragment),Qw=p(),Rm=s("p"),Yw=o(`XLM-RoBERTa 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.`),Hw=p(),Gl=s("p"),Kw=o("This model inherits from "),xp=s("a"),e0=o("PreTrainedModel"),t0=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),o0=p(),Sl=s("p"),n0=o("This model is also a PyTorch "),Vl=s("a"),s0=o("torch.nn.Module"),a0=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),r0=p(),Dt=s("div"),v(Pl.$$.fragment),l0=p(),vn=s("p"),i0=o("The "),Lp=s("a"),d0=o("XLMRobertaForMultipleChoice"),c0=o(" forward method, overrides the "),xm=s("code"),p0=o("__call__"),h0=o(" special method."),m0=p(),v(Ls.$$.fragment),u0=p(),v(Xs.$$.fragment),Pg=p(),Tn=s("h2"),Es=s("a"),Lm=s("span"),v(Ol.$$.fragment),f0=p(),Xm=s("span"),g0=o("XLMRobertaForTokenClassification"),Og=p(),kt=s("div"),v(Dl.$$.fragment),_0=p(),Em=s("p"),b0=o(`XLM-RoBERTa 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.`),M0=p(),Ql=s("p"),y0=o("This model inherits from "),Xp=s("a"),v0=o("PreTrainedModel"),T0=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),k0=p(),Yl=s("p"),w0=o("This model is also a PyTorch "),Hl=s("a"),F0=o("torch.nn.Module"),$0=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),R0=p(),Qt=s("div"),v(Kl.$$.fragment),x0=p(),kn=s("p"),L0=o("The "),Ep=s("a"),X0=o("XLMRobertaForTokenClassification"),E0=o(" forward method, overrides the "),jm=s("code"),j0=o("__call__"),C0=o(" special method."),J0=p(),v(js.$$.fragment),z0=p(),v(Cs.$$.fragment),Dg=p(),wn=s("h2"),Js=s("a"),Cm=s("span"),v(ei.$$.fragment),U0=p(),Jm=s("span"),I0=o("XLMRobertaForQuestionAnswering"),Qg=p(),wt=s("div"),v(ti.$$.fragment),N0=p(),Fn=s("p"),q0=o(`XLM-RoBERTa 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 `),zm=s("code"),W0=o("span start logits"),Z0=o(" and "),Um=s("code"),A0=o("span end logits"),B0=o(")."),G0=p(),oi=s("p"),S0=o("This model inherits from "),jp=s("a"),V0=o("PreTrainedModel"),P0=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),O0=p(),ni=s("p"),D0=o("This model is also a PyTorch "),si=s("a"),Q0=o("torch.nn.Module"),Y0=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),H0=p(),Yt=s("div"),v(ai.$$.fragment),K0=p(),$n=s("p"),e1=o("The "),Cp=s("a"),t1=o("XLMRobertaForQuestionAnswering"),o1=o(" forward method, overrides the "),Im=s("code"),n1=o("__call__"),s1=o(" special method."),a1=p(),v(zs.$$.fragment),r1=p(),v(Us.$$.fragment),Yg=p(),Rn=s("h2"),Is=s("a"),Nm=s("span"),v(ri.$$.fragment),l1=p(),qm=s("span"),i1=o("TFXLMRobertaModel"),Hg=p(),dt=s("div"),v(li.$$.fragment),d1=p(),Wm=s("p"),c1=o("The bare XLM RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),p1=p(),ii=s("p"),h1=o("This model inherits from "),Jp=s("a"),m1=o("TFPreTrainedModel"),u1=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),f1=p(),di=s("p"),g1=o("This model is also a "),ci=s("a"),_1=o("tf.keras.Model"),b1=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),M1=p(),v(Ns.$$.fragment),y1=p(),Ht=s("div"),v(pi.$$.fragment),v1=p(),xn=s("p"),T1=o("The "),zp=s("a"),k1=o("TFXLMRobertaModel"),w1=o(" forward method, overrides the "),Zm=s("code"),F1=o("__call__"),$1=o(" special method."),R1=p(),v(qs.$$.fragment),x1=p(),v(Ws.$$.fragment),Kg=p(),Ln=s("h2"),Zs=s("a"),Am=s("span"),v(hi.$$.fragment),L1=p(),Bm=s("span"),X1=o("TFXLMRobertaForCausalLM"),e_=p(),ct=s("div"),v(mi.$$.fragment),E1=p(),ui=s("p"),j1=o("XLM-RoBERTa Model with a "),Gm=s("code"),C1=o("language modeling"),J1=o(" head on top for CLM fine-tuning."),z1=p(),fi=s("p"),U1=o("This model inherits from "),Up=s("a"),I1=o("TFPreTrainedModel"),N1=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),q1=p(),gi=s("p"),W1=o("This model is also a "),_i=s("a"),Z1=o("tf.keras.Model"),A1=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),B1=p(),v(As.$$.fragment),G1=p(),Kt=s("div"),v(bi.$$.fragment),S1=p(),Xn=s("p"),V1=o("The "),Ip=s("a"),P1=o("TFXLMRobertaForCausalLM"),O1=o(" forward method, overrides the "),Sm=s("code"),D1=o("__call__"),Q1=o(" special method."),Y1=p(),v(Bs.$$.fragment),H1=p(),v(Gs.$$.fragment),t_=p(),En=s("h2"),Ss=s("a"),Vm=s("span"),v(Mi.$$.fragment),K1=p(),Pm=s("span"),e2=o("TFXLMRobertaForMaskedLM"),o_=p(),pt=s("div"),v(yi.$$.fragment),t2=p(),vi=s("p"),o2=o("XLM RoBERTa Model with a "),Om=s("code"),n2=o("language modeling"),s2=o(" head on top."),a2=p(),Ti=s("p"),r2=o("This model inherits from "),Np=s("a"),l2=o("TFPreTrainedModel"),i2=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),d2=p(),ki=s("p"),c2=o("This model is also a "),wi=s("a"),p2=o("tf.keras.Model"),h2=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),m2=p(),v(Vs.$$.fragment),u2=p(),Xt=s("div"),v(Fi.$$.fragment),f2=p(),jn=s("p"),g2=o("The "),qp=s("a"),_2=o("TFXLMRobertaForMaskedLM"),b2=o(" forward method, overrides the "),Dm=s("code"),M2=o("__call__"),y2=o(" special method."),v2=p(),v(Ps.$$.fragment),T2=p(),v(Os.$$.fragment),k2=p(),v(Ds.$$.fragment),n_=p(),Cn=s("h2"),Qs=s("a"),Qm=s("span"),v($i.$$.fragment),w2=p(),Ym=s("span"),F2=o("TFXLMRobertaForSequenceClassification"),s_=p(),ht=s("div"),v(Ri.$$.fragment),$2=p(),Hm=s("p"),R2=o(`XLM RoBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),x2=p(),xi=s("p"),L2=o("This model inherits from "),Wp=s("a"),X2=o("TFPreTrainedModel"),E2=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),j2=p(),Li=s("p"),C2=o("This model is also a "),Xi=s("a"),J2=o("tf.keras.Model"),z2=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),U2=p(),v(Ys.$$.fragment),I2=p(),Et=s("div"),v(Ei.$$.fragment),N2=p(),Jn=s("p"),q2=o("The "),Zp=s("a"),W2=o("TFXLMRobertaForSequenceClassification"),Z2=o(" forward method, overrides the "),Km=s("code"),A2=o("__call__"),B2=o(" special method."),G2=p(),v(Hs.$$.fragment),S2=p(),v(Ks.$$.fragment),V2=p(),v(ea.$$.fragment),a_=p(),zn=s("h2"),ta=s("a"),eu=s("span"),v(ji.$$.fragment),P2=p(),tu=s("span"),O2=o("TFXLMRobertaForMultipleChoice"),r_=p(),mt=s("div"),v(Ci.$$.fragment),D2=p(),ou=s("p"),Q2=o(`XLM Roberta 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.`),Y2=p(),Ji=s("p"),H2=o("This model inherits from "),Ap=s("a"),K2=o("TFPreTrainedModel"),eF=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),tF=p(),zi=s("p"),oF=o("This model is also a "),Ui=s("a"),nF=o("tf.keras.Model"),sF=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),aF=p(),v(oa.$$.fragment),rF=p(),eo=s("div"),v(Ii.$$.fragment),lF=p(),Un=s("p"),iF=o("The "),Bp=s("a"),dF=o("TFXLMRobertaForMultipleChoice"),cF=o(" forward method, overrides the "),nu=s("code"),pF=o("__call__"),hF=o(" special method."),mF=p(),v(na.$$.fragment),uF=p(),v(sa.$$.fragment),l_=p(),In=s("h2"),aa=s("a"),su=s("span"),v(Ni.$$.fragment),fF=p(),au=s("span"),gF=o("TFXLMRobertaForTokenClassification"),i_=p(),ut=s("div"),v(qi.$$.fragment),_F=p(),ru=s("p"),bF=o(`XLM RoBERTa 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.`),MF=p(),Wi=s("p"),yF=o("This model inherits from "),Gp=s("a"),vF=o("TFPreTrainedModel"),TF=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),kF=p(),Zi=s("p"),wF=o("This model is also a "),Ai=s("a"),FF=o("tf.keras.Model"),$F=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),RF=p(),v(ra.$$.fragment),xF=p(),jt=s("div"),v(Bi.$$.fragment),LF=p(),Nn=s("p"),XF=o("The "),Sp=s("a"),EF=o("TFXLMRobertaForTokenClassification"),jF=o(" forward method, overrides the "),lu=s("code"),CF=o("__call__"),JF=o(" special method."),zF=p(),v(la.$$.fragment),UF=p(),v(ia.$$.fragment),IF=p(),v(da.$$.fragment),d_=p(),qn=s("h2"),ca=s("a"),iu=s("span"),v(Gi.$$.fragment),NF=p(),du=s("span"),qF=o("TFXLMRobertaForQuestionAnswering"),c_=p(),ft=s("div"),v(Si.$$.fragment),WF=p(),Wn=s("p"),ZF=o(`XLM RoBERTa 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 `),cu=s("code"),AF=o("span start logits"),BF=o(" and "),pu=s("code"),GF=o("span end logits"),SF=o(")."),VF=p(),Vi=s("p"),PF=o("This model inherits from "),Vp=s("a"),OF=o("TFPreTrainedModel"),DF=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),QF=p(),Pi=s("p"),YF=o("This model is also a "),Oi=s("a"),HF=o("tf.keras.Model"),KF=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),e$=p(),v(pa.$$.fragment),t$=p(),Ct=s("div"),v(Di.$$.fragment),o$=p(),Zn=s("p"),n$=o("The "),Pp=s("a"),s$=o("TFXLMRobertaForQuestionAnswering"),a$=o(" forward method, overrides the "),hu=s("code"),r$=o("__call__"),l$=o(" special method."),i$=p(),v(ha.$$.fragment),d$=p(),v(ma.$$.fragment),c$=p(),v(ua.$$.fragment),p_=p(),An=s("h2"),fa=s("a"),mu=s("span"),v(Qi.$$.fragment),p$=p(),uu=s("span"),h$=o("FlaxXLMRobertaModel"),h_=p(),tt=s("div"),v(Yi.$$.fragment),m$=p(),fu=s("p"),u$=o("The bare XLM RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),f$=p(),Hi=s("p"),g$=o("This model inherits from "),Op=s("a"),_$=o("FlaxPreTrainedModel"),b$=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),M$=p(),Ki=s("p"),y$=o("This model is also a Flax Linen "),ed=s("a"),v$=o("flax.linen.Module"),T$=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),k$=p(),gu=s("p"),w$=o("Finally, this model supports inherent JAX features such as:"),F$=p(),bo=s("ul"),_u=s("li"),td=s("a"),$$=o("Just-In-Time (JIT) compilation"),R$=p(),bu=s("li"),od=s("a"),x$=o("Automatic Differentiation"),L$=p(),Mu=s("li"),nd=s("a"),X$=o("Vectorization"),E$=p(),yu=s("li"),sd=s("a"),j$=o("Parallelization"),C$=p(),to=s("div"),v(ad.$$.fragment),J$=p(),Bn=s("p"),z$=o("The "),vu=s("code"),U$=o("FlaxXLMRobertaPreTrainedModel"),I$=o(" forward method, overrides the "),Tu=s("code"),N$=o("__call__"),q$=o(" special method."),W$=p(),v(ga.$$.fragment),Z$=p(),v(_a.$$.fragment),m_=p(),Gn=s("h2"),ba=s("a"),ku=s("span"),v(rd.$$.fragment),A$=p(),wu=s("span"),B$=o("FlaxXLMRobertaForCausalLM"),u_=p(),ot=s("div"),v(ld.$$.fragment),G$=p(),Fu=s("p"),S$=o(`XLM Roberta Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),V$=p(),id=s("p"),P$=o("This model inherits from "),Dp=s("a"),O$=o("FlaxPreTrainedModel"),D$=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Q$=p(),dd=s("p"),Y$=o("This model is also a Flax Linen "),cd=s("a"),H$=o("flax.linen.Module"),K$=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),eR=p(),$u=s("p"),tR=o("Finally, this model supports inherent JAX features such as:"),oR=p(),Mo=s("ul"),Ru=s("li"),pd=s("a"),nR=o("Just-In-Time (JIT) compilation"),sR=p(),xu=s("li"),hd=s("a"),aR=o("Automatic Differentiation"),rR=p(),Lu=s("li"),md=s("a"),lR=o("Vectorization"),iR=p(),Xu=s("li"),ud=s("a"),dR=o("Parallelization"),cR=p(),oo=s("div"),v(fd.$$.fragment),pR=p(),Sn=s("p"),hR=o("The "),Eu=s("code"),mR=o("FlaxXLMRobertaPreTrainedModel"),uR=o(" forward method, overrides the "),ju=s("code"),fR=o("__call__"),gR=o(" special method."),_R=p(),v(Ma.$$.fragment),bR=p(),v(ya.$$.fragment),f_=p(),Vn=s("h2"),va=s("a"),Cu=s("span"),v(gd.$$.fragment),MR=p(),Ju=s("span"),yR=o("FlaxXLMRobertaForMaskedLM"),g_=p(),nt=s("div"),v(_d.$$.fragment),vR=p(),bd=s("p"),TR=o("XLM RoBERTa Model with a "),zu=s("code"),kR=o("language modeling"),wR=o(" head on top."),FR=p(),Md=s("p"),$R=o("This model inherits from "),Qp=s("a"),RR=o("FlaxPreTrainedModel"),xR=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),LR=p(),yd=s("p"),XR=o("This model is also a Flax Linen "),vd=s("a"),ER=o("flax.linen.Module"),jR=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),CR=p(),Uu=s("p"),JR=o("Finally, this model supports inherent JAX features such as:"),zR=p(),yo=s("ul"),Iu=s("li"),Td=s("a"),UR=o("Just-In-Time (JIT) compilation"),IR=p(),Nu=s("li"),kd=s("a"),NR=o("Automatic Differentiation"),qR=p(),qu=s("li"),wd=s("a"),WR=o("Vectorization"),ZR=p(),Wu=s("li"),Fd=s("a"),AR=o("Parallelization"),BR=p(),no=s("div"),v($d.$$.fragment),GR=p(),Pn=s("p"),SR=o("The "),Zu=s("code"),VR=o("FlaxXLMRobertaPreTrainedModel"),PR=o(" forward method, overrides the "),Au=s("code"),OR=o("__call__"),DR=o(" special method."),QR=p(),v(Ta.$$.fragment),YR=p(),v(ka.$$.fragment),__=p(),On=s("h2"),wa=s("a"),Bu=s("span"),v(Rd.$$.fragment),HR=p(),Gu=s("span"),KR=o("FlaxXLMRobertaForSequenceClassification"),b_=p(),st=s("div"),v(xd.$$.fragment),ex=p(),Su=s("p"),tx=o(`XLM Roberta Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),ox=p(),Ld=s("p"),nx=o("This model inherits from "),Yp=s("a"),sx=o("FlaxPreTrainedModel"),ax=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),rx=p(),Xd=s("p"),lx=o("This model is also a Flax Linen "),Ed=s("a"),ix=o("flax.linen.Module"),dx=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),cx=p(),Vu=s("p"),px=o("Finally, this model supports inherent JAX features such as:"),hx=p(),vo=s("ul"),Pu=s("li"),jd=s("a"),mx=o("Just-In-Time (JIT) compilation"),ux=p(),Ou=s("li"),Cd=s("a"),fx=o("Automatic Differentiation"),gx=p(),Du=s("li"),Jd=s("a"),_x=o("Vectorization"),bx=p(),Qu=s("li"),zd=s("a"),Mx=o("Parallelization"),yx=p(),so=s("div"),v(Ud.$$.fragment),vx=p(),Dn=s("p"),Tx=o("The "),Yu=s("code"),kx=o("FlaxXLMRobertaPreTrainedModel"),wx=o(" forward method, overrides the "),Hu=s("code"),Fx=o("__call__"),$x=o(" special method."),Rx=p(),v(Fa.$$.fragment),xx=p(),v($a.$$.fragment),M_=p(),Qn=s("h2"),Ra=s("a"),Ku=s("span"),v(Id.$$.fragment),Lx=p(),ef=s("span"),Xx=o("FlaxXLMRobertaForMultipleChoice"),y_=p(),at=s("div"),v(Nd.$$.fragment),Ex=p(),tf=s("p"),jx=o(`XLM Roberta 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.`),Cx=p(),qd=s("p"),Jx=o("This model inherits from "),Hp=s("a"),zx=o("FlaxPreTrainedModel"),Ux=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Ix=p(),Wd=s("p"),Nx=o("This model is also a Flax Linen "),Zd=s("a"),qx=o("flax.linen.Module"),Wx=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Zx=p(),of=s("p"),Ax=o("Finally, this model supports inherent JAX features such as:"),Bx=p(),To=s("ul"),nf=s("li"),Ad=s("a"),Gx=o("Just-In-Time (JIT) compilation"),Sx=p(),sf=s("li"),Bd=s("a"),Vx=o("Automatic Differentiation"),Px=p(),af=s("li"),Gd=s("a"),Ox=o("Vectorization"),Dx=p(),rf=s("li"),Sd=s("a"),Qx=o("Parallelization"),Yx=p(),ao=s("div"),v(Vd.$$.fragment),Hx=p(),Yn=s("p"),Kx=o("The "),lf=s("code"),eL=o("FlaxXLMRobertaPreTrainedModel"),tL=o(" forward method, overrides the "),df=s("code"),oL=o("__call__"),nL=o(" special method."),sL=p(),v(xa.$$.fragment),aL=p(),v(La.$$.fragment),v_=p(),Hn=s("h2"),Xa=s("a"),cf=s("span"),v(Pd.$$.fragment),rL=p(),pf=s("span"),lL=o("FlaxXLMRobertaForTokenClassification"),T_=p(),rt=s("div"),v(Od.$$.fragment),iL=p(),hf=s("p"),dL=o(`XLM Roberta 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.`),cL=p(),Dd=s("p"),pL=o("This model inherits from "),Kp=s("a"),hL=o("FlaxPreTrainedModel"),mL=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),uL=p(),Qd=s("p"),fL=o("This model is also a Flax Linen "),Yd=s("a"),gL=o("flax.linen.Module"),_L=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),bL=p(),mf=s("p"),ML=o("Finally, this model supports inherent JAX features such as:"),yL=p(),ko=s("ul"),uf=s("li"),Hd=s("a"),vL=o("Just-In-Time (JIT) compilation"),TL=p(),ff=s("li"),Kd=s("a"),kL=o("Automatic Differentiation"),wL=p(),gf=s("li"),ec=s("a"),FL=o("Vectorization"),$L=p(),_f=s("li"),tc=s("a"),RL=o("Parallelization"),xL=p(),ro=s("div"),v(oc.$$.fragment),LL=p(),Kn=s("p"),XL=o("The "),bf=s("code"),EL=o("FlaxXLMRobertaPreTrainedModel"),jL=o(" forward method, overrides the "),Mf=s("code"),CL=o("__call__"),JL=o(" special method."),zL=p(),v(Ea.$$.fragment),UL=p(),v(ja.$$.fragment),k_=p(),es=s("h2"),Ca=s("a"),yf=s("span"),v(nc.$$.fragment),IL=p(),vf=s("span"),NL=o("FlaxXLMRobertaForQuestionAnswering"),w_=p(),lt=s("div"),v(sc.$$.fragment),qL=p(),ts=s("p"),WL=o(`XLM Roberta 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 `),Tf=s("code"),ZL=o("span start logits"),AL=o(" and "),kf=s("code"),BL=o("span end logits"),GL=o(")."),SL=p(),ac=s("p"),VL=o("This model inherits from "),eh=s("a"),PL=o("FlaxPreTrainedModel"),OL=o(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),DL=p(),rc=s("p"),QL=o("This model is also a Flax Linen "),lc=s("a"),YL=o("flax.linen.Module"),HL=o(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),KL=p(),wf=s("p"),eX=o("Finally, this model supports inherent JAX features such as:"),tX=p(),wo=s("ul"),Ff=s("li"),ic=s("a"),oX=o("Just-In-Time (JIT) compilation"),nX=p(),$f=s("li"),dc=s("a"),sX=o("Automatic Differentiation"),aX=p(),Rf=s("li"),cc=s("a"),rX=o("Vectorization"),lX=p(),xf=s("li"),pc=s("a"),iX=o("Parallelization"),dX=p(),lo=s("div"),v(hc.$$.fragment),cX=p(),os=s("p"),pX=o("The "),Lf=s("code"),hX=o("FlaxXLMRobertaPreTrainedModel"),mX=o(" forward method, overrides the "),Xf=s("code"),uX=o("__call__"),fX=o(" special method."),gX=p(),v(Ja.$$.fragment),_X=p(),v(za.$$.fragment),this.h()},l(l){const _=jJ('[data-svelte="svelte-1phssyn"]',document.head);d=a(_,"META",{name:!0,content:!0}),_.forEach(t),M=h(l),u=a(l,"H1",{class:!0});var mc=r(u);f=a(mc,"A",{id:!0,class:!0,href:!0});var Ef=r(f);b=a(Ef,"SPAN",{});var jf=r(b);T(i.$$.fragment,jf),jf.forEach(t),Ef.forEach(t),m=h(mc),X=a(mc,"SPAN",{});var Cf=r(X);Me=n(Cf,"XLM-RoBERTa"),Cf.forEach(t),mc.forEach(t),fe=h(l),q=a(l,"DIV",{class:!0});var uc=r(q);ce=a(uc,"A",{href:!0});var Jf=r(ce);te=a(Jf,"IMG",{alt:!0,src:!0}),Jf.forEach(t),ye=h(uc),B=a(uc,"A",{href:!0});var zf=r(B);pe=a(zf,"IMG",{alt:!0,src:!0}),zf.forEach(t),uc.forEach(t),O=h(l),ae=a(l,"H2",{class:!0});var fc=r(ae);re=a(fc,"A",{id:!0,class:!0,href:!0});var Uf=r(re);G=a(Uf,"SPAN",{});var If=r(G);T(le.$$.fragment,If),If.forEach(t),Uf.forEach(t),ve=h(fc),S=a(fc,"SPAN",{});var Nf=r(S);Te=n(Nf,"Overview"),Nf.forEach(t),fc.forEach(t),ge=h(l),Z=a(l,"P",{});var gc=r(Z);ke=n(gc,"The XLM-RoBERTa model was proposed in "),ie=a(gc,"A",{href:!0,rel:!0});var qf=r(ie);oe=n(qf,"Unsupervised Cross-lingual Representation Learning at Scale"),qf.forEach(t),j=n(gc,` by Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume
Wenzek, Francisco Guzm\xE1n, Edouard Grave, Myle Ott, Luke Zettlemoyer and Veselin Stoyanov. It is based on Facebook\u2019s
RoBERTa model released in 2019. It is a large multi-lingual language model, trained on 2.5TB of filtered CommonCrawl
data.`),gc.forEach(t),z=h(l),he=a(l,"P",{});var Wf=r(he);Q=n(Wf,"The abstract from the paper is the following:"),Wf.forEach(t),_e=h(l),me=a(l,"P",{});var Zf=r(me);V=a(Zf,"EM",{});var Af=r(V);we=n(Af,`This paper shows that pretraining multilingual language models at scale leads to significant performance gains for a
wide range of cross-lingual transfer tasks. We train a Transformer-based masked language model on one hundred
languages, using more than two terabytes of filtered CommonCrawl data. Our model, dubbed XLM-R, significantly
outperforms multilingual BERT (mBERT) on a variety of cross-lingual benchmarks, including +13.8% average accuracy on
XNLI, +12.3% average F1 score on MLQA, and +2.1% average F1 score on NER. XLM-R performs particularly well on
low-resource languages, improving 11.8% in XNLI accuracy for Swahili and 9.2% for Urdu over the previous XLM model. We
also present a detailed empirical evaluation of the key factors that are required to achieve these gains, including the
trade-offs between (1) positive transfer and capacity dilution and (2) the performance of high and low resource
languages at scale. Finally, we show, for the first time, the possibility of multilingual modeling without sacrificing
per-language performance; XLM-Ris very competitive with strong monolingual models on the GLUE and XNLI benchmarks. We
will make XLM-R code, data, and models publicly available.`),Af.forEach(t),Zf.forEach(t),be=h(l),J=a(l,"P",{});var Bf=r(J);Fe=n(Bf,"Tips:"),Bf.forEach(t),D=h(l),ne=a(l,"UL",{});var ns=r(ne);de=a(ns,"LI",{});var _c=r(de);Y=n(_c,`XLM-RoBERTa is a multilingual model trained on 100 different languages. Unlike some XLM multilingual models, it does
not require `),ue=a(_c,"CODE",{});var Gf=r(ue);$e=n(Gf,"lang"),Gf.forEach(t),N=n(_c,` tensors to understand which language is used, and should be able to determine the correct
language from the input ids.`),_c.forEach(t),Re=h(ns),P=a(ns,"LI",{});var Sf=r(P);xe=n(Sf,"Uses RoBERTa tricks on the XLM approach, but does not use the translation language modeling objective. It only uses masked language modeling on sentences coming from one language."),Sf.forEach(t),se=h(ns),C=a(ns,"LI",{});var bc=r(C);Le=n(bc,"This implementation is the same as RoBERTa. Refer to the "),U=a(bc,"A",{href:!0});var Vf=r(U);Xe=n(Vf,"documentation of RoBERTa"),Vf.forEach(t),Ee=n(bc,` for usage examples
as well as the information relative to the inputs and outputs.`),bc.forEach(t),ns.forEach(t),y=h(l),x=a(l,"P",{});var ss=r(x);Pe=n(ss,"This model was contributed by "),K=a(ss,"A",{href:!0,rel:!0});var Pf=r(K);Oe=n(Pf,"stefan-it"),Pf.forEach(t),De=n(ss,". The original code can be found "),E=a(ss,"A",{href:!0,rel:!0});var Of=r(E);Qe=n(Of,"here"),Of.forEach(t),Ye=n(ss,"."),ss.forEach(t),Be=h(l),Je=a(l,"H2",{class:!0});var Mc=r(Je);ze=a(Mc,"A",{id:!0,class:!0,href:!0});var Df=r(ze);I=a(Df,"SPAN",{});var Qf=r(I);T(A.$$.fragment,Qf),Qf.forEach(t),Df.forEach(t),He=h(Mc),Ae=a(Mc,"SPAN",{});var Yf=r(Ae);H=n(Yf,"Resources"),Yf.forEach(t),Mc.forEach(t),Ge=h(l),Ie=a(l,"P",{});var Hf=r(Ie);je=n(Hf,"A list of official Hugging Face and community (indicated by \u{1F30E}) resources to help you get started with XLM-RoBERTa. If you\u2019re interested in submitting a resource to be included here, please feel free to open a Pull Request and we\u2019ll review it! The resource should ideally demonstrate something new instead of duplicating an existing resource."),Hf.forEach(t),Se=h(l),T(ee.$$.fragment,l),Ve=h(l),gt=a(l,"UL",{});var Ft=r(gt);Lc=a(Ft,"LI",{});var th=r(Lc);Kb=n(th,"A blog post on how to "),ir=a(th,"A",{href:!0,rel:!0});var Kf=r(ir);eM=n(Kf,"finetune XLM RoBERTa for multiclass classification with Habana Gaudi on AWS"),Kf.forEach(t),th.forEach(t),tM=h(Ft),Fo=a(Ft,"LI",{});var Ao=r(Fo);Xc=a(Ao,"A",{href:!0});var eg=r(Xc);oM=n(eg,"XLMRobertaForSequenceClassification"),eg.forEach(t),nM=n(Ao," is supported by this "),dr=a(Ao,"A",{href:!0,rel:!0});var tg=r(dr);sM=n(tg,"example script"),tg.forEach(t),aM=n(Ao," and "),cr=a(Ao,"A",{href:!0,rel:!0});var og=r(cr);rM=n(og,"notebook"),og.forEach(t),lM=n(Ao,"."),Ao.forEach(t),iM=h(Ft),$o=a(Ft,"LI",{});var Bo=r($o);Ec=a(Bo,"A",{href:!0});var ng=r(Ec);dM=n(ng,"TFXLMRobertaForSequenceClassification"),ng.forEach(t),cM=n(Bo," is supported by this "),pr=a(Bo,"A",{href:!0,rel:!0});var sg=r(pr);pM=n(sg,"example script"),sg.forEach(t),hM=n(Bo," and "),hr=a(Bo,"A",{href:!0,rel:!0});var ag=r(hr);mM=n(ag,"notebook"),ag.forEach(t),uM=n(Bo,"."),Bo.forEach(t),fM=h(Ft),Ro=a(Ft,"LI",{});var Go=r(Ro);jc=a(Go,"A",{href:!0});var rg=r(jc);gM=n(rg,"FlaxXLMRobertaForSequenceClassification"),rg.forEach(t),_M=n(Go," is supported by this "),mr=a(Go,"A",{href:!0,rel:!0});var lg=r(mr);bM=n(lg,"example script"),lg.forEach(t),MM=n(Go," and "),ur=a(Go,"A",{href:!0,rel:!0});var ig=r(ur);yM=n(ig,"notebook"),ig.forEach(t),vM=n(Go,"."),Go.forEach(t),TM=h(Ft),Cc=a(Ft,"LI",{});var oh=r(Cc);fr=a(oh,"A",{href:!0,rel:!0});var dg=r(fr);kM=n(dg,"Text classification"),dg.forEach(t),wM=n(oh," chapter of the \u{1F917} Hugging Face Task Guides."),oh.forEach(t),FM=h(Ft),jh=a(Ft,"LI",{});var cg=r(jh);Jc=a(cg,"A",{href:!0});var pg=r(Jc);$M=n(pg,"Text classification task guide"),pg.forEach(t),cg.forEach(t),Ft.forEach(t),Mg=h(l),T(gr.$$.fragment,l),yg=h(l),$t=a(l,"UL",{});var St=r($t);xo=a(St,"LI",{});var So=r(xo);zc=a(So,"A",{href:!0});var hg=r(zc);RM=n(hg,"XLMRobertaForTokenClassification"),hg.forEach(t),xM=n(So," is supported by this "),_r=a(So,"A",{href:!0,rel:!0});var mg=r(_r);LM=n(mg,"example script"),mg.forEach(t),XM=n(So," and "),br=a(So,"A",{href:!0,rel:!0});var ug=r(br);EM=n(ug,"notebook"),ug.forEach(t),jM=n(So,"."),So.forEach(t),CM=h(St),Lo=a(St,"LI",{});var yc=r(Lo);Uc=a(yc,"A",{href:!0});var $X=r(Uc);JM=n($X,"TFXLMRobertaForTokenClassification"),$X.forEach(t),zM=n(yc," is supported by this "),Mr=a(yc,"A",{href:!0,rel:!0});var RX=r(Mr);UM=n(RX,"example script"),RX.forEach(t),IM=n(yc," and "),yr=a(yc,"A",{href:!0,rel:!0});var xX=r(yr);NM=n(xX,"notebook"),xX.forEach(t),qM=n(yc,"."),yc.forEach(t),WM=h(St),as=a(St,"LI",{});var fg=r(as);Ic=a(fg,"A",{href:!0});var LX=r(Ic);ZM=n(LX,"FlaxXLMRobertaForTokenClassification"),LX.forEach(t),AM=n(fg," is supported by this "),vr=a(fg,"A",{href:!0,rel:!0});var XX=r(vr);BM=n(XX,"example script"),XX.forEach(t),GM=n(fg,"."),fg.forEach(t),SM=h(St),Nc=a(St,"LI",{});var bX=r(Nc);Tr=a(bX,"A",{href:!0,rel:!0});var EX=r(Tr);VM=n(EX,"Token classification"),EX.forEach(t),PM=n(bX," chapter of the \u{1F917} Hugging Face Course."),bX.forEach(t),OM=h(St),Ch=a(St,"LI",{});var jX=r(Ch);qc=a(jX,"A",{href:!0});var CX=r(qc);DM=n(CX,"Token classification task guide"),CX.forEach(t),jX.forEach(t),St.forEach(t),vg=h(l),T(kr.$$.fragment,l),Tg=h(l),Xo=a(l,"UL",{});var nh=r(Xo);Eo=a(nh,"LI",{});var vc=r(Eo);Wc=a(vc,"A",{href:!0});var JX=r(Wc);QM=n(JX,"XLMRobertaForCausalLM"),JX.forEach(t),YM=n(vc," is supported by this "),wr=a(vc,"A",{href:!0,rel:!0});var zX=r(wr);HM=n(zX,"example script"),zX.forEach(t),KM=n(vc," and "),Fr=a(vc,"A",{href:!0,rel:!0});var UX=r(Fr);ey=n(UX,"notebook"),UX.forEach(t),ty=n(vc,"."),vc.forEach(t),oy=h(nh),Zc=a(nh,"LI",{});var MX=r(Zc);$r=a(MX,"A",{href:!0,rel:!0});var IX=r($r);ny=n(IX,"Causal language modeling"),IX.forEach(t),sy=n(MX," chapter of the \u{1F917} Hugging Face Task Guides."),MX.forEach(t),ay=h(nh),Jh=a(nh,"LI",{});var NX=r(Jh);Ac=a(NX,"A",{href:!0});var qX=r(Ac);ry=n(qX,"Causal language modeling task guide"),qX.forEach(t),NX.forEach(t),nh.forEach(t),kg=h(l),T(Rr.$$.fragment,l),wg=h(l),Rt=a(l,"UL",{});var Vo=r(Rt);jo=a(Vo,"LI",{});var Tc=r(jo);Bc=a(Tc,"A",{href:!0});var WX=r(Bc);ly=n(WX,"XLMRobertaForMaskedLM"),WX.forEach(t),iy=n(Tc," is supported by this "),xr=a(Tc,"A",{href:!0,rel:!0});var ZX=r(xr);dy=n(ZX,"example script"),ZX.forEach(t),cy=n(Tc," and "),Lr=a(Tc,"A",{href:!0,rel:!0});var AX=r(Lr);py=n(AX,"notebook"),AX.forEach(t),hy=n(Tc,"."),Tc.forEach(t),my=h(Vo),Co=a(Vo,"LI",{});var kc=r(Co);Gc=a(kc,"A",{href:!0});var BX=r(Gc);uy=n(BX,"TFXLMRobertaForMaskedLM"),BX.forEach(t),fy=n(kc," is supported by this "),Xr=a(kc,"A",{href:!0,rel:!0});var GX=r(Xr);gy=n(GX,"example script"),GX.forEach(t),_y=n(kc," and "),Er=a(kc,"A",{href:!0,rel:!0});var SX=r(Er);by=n(SX,"notebook"),SX.forEach(t),My=n(kc,"."),kc.forEach(t),yy=h(Vo),Jo=a(Vo,"LI",{});var wc=r(Jo);Sc=a(wc,"A",{href:!0});var VX=r(Sc);vy=n(VX,"FlaxXLMRobertaForMaskedLM"),VX.forEach(t),Ty=n(wc," is supported by this "),jr=a(wc,"A",{href:!0,rel:!0});var PX=r(jr);ky=n(PX,"example script"),PX.forEach(t),wy=n(wc," and "),Cr=a(wc,"A",{href:!0,rel:!0});var OX=r(Cr);Fy=n(OX,"notebook"),OX.forEach(t),$y=n(wc,"."),wc.forEach(t),Ry=h(Vo),Vc=a(Vo,"LI",{});var yX=r(Vc);Jr=a(yX,"A",{href:!0,rel:!0});var DX=r(Jr);xy=n(DX,"Masked language modeling"),DX.forEach(t),Ly=n(yX," chapter of the \u{1F917} Hugging Face Course."),yX.forEach(t),Xy=h(Vo),zh=a(Vo,"LI",{});var QX=r(zh);Pc=a(QX,"A",{href:!0});var YX=r(Pc);Ey=n(YX,"Masked language modeling"),YX.forEach(t),QX.forEach(t),Vo.forEach(t),Fg=h(l),T(zr.$$.fragment,l),$g=h(l),xt=a(l,"UL",{});var Po=r(xt);zo=a(Po,"LI",{});var Fc=r(zo);Oc=a(Fc,"A",{href:!0});var HX=r(Oc);jy=n(HX,"XLMRobertaForQuestionAnswering"),HX.forEach(t),Cy=n(Fc," is supported by this "),Ur=a(Fc,"A",{href:!0,rel:!0});var KX=r(Ur);Jy=n(KX,"example script"),KX.forEach(t),zy=n(Fc," and "),Ir=a(Fc,"A",{href:!0,rel:!0});var eE=r(Ir);Uy=n(eE,"notebook"),eE.forEach(t),Iy=n(Fc,"."),Fc.forEach(t),Ny=h(Po),Uo=a(Po,"LI",{});var $c=r(Uo);Dc=a($c,"A",{href:!0});var tE=r(Dc);qy=n(tE,"TFXLMRobertaForQuestionAnswering"),tE.forEach(t),Wy=n($c," is supported by this "),Nr=a($c,"A",{href:!0,rel:!0});var oE=r(Nr);Zy=n(oE,"example script"),oE.forEach(t),Ay=n($c," and "),qr=a($c,"A",{href:!0,rel:!0});var nE=r(qr);By=n(nE,"notebook"),nE.forEach(t),Gy=n($c,"."),$c.forEach(t),Sy=h(Po),rs=a(Po,"LI",{});var gg=r(rs);Qc=a(gg,"A",{href:!0});var sE=r(Qc);Vy=n(sE,"FlaxXLMRobertaForQuestionAnswering"),sE.forEach(t),Py=n(gg," is supported by this "),Wr=a(gg,"A",{href:!0,rel:!0});var aE=r(Wr);Oy=n(aE,"example script"),aE.forEach(t),Dy=n(gg,"."),gg.forEach(t),Qy=h(Po),Yc=a(Po,"LI",{});var vX=r(Yc);Zr=a(vX,"A",{href:!0,rel:!0});var rE=r(Zr);Yy=n(rE,"Question answering"),rE.forEach(t),Hy=n(vX," chapter of the \u{1F917} Hugging Face Course."),vX.forEach(t),Ky=h(Po),Uh=a(Po,"LI",{});var lE=r(Uh);Hc=a(lE,"A",{href:!0});var iE=r(Hc);ev=n(iE,"Question answering task guide"),iE.forEach(t),lE.forEach(t),Po.forEach(t),Rg=h(l),Kc=a(l,"P",{});var dE=r(Kc);Ih=a(dE,"STRONG",{});var cE=r(Ih);tv=n(cE,"Multiple choice"),cE.forEach(t),dE.forEach(t),xg=h(l),Io=a(l,"UL",{});var sh=r(Io);No=a(sh,"LI",{});var Rc=r(No);ep=a(Rc,"A",{href:!0});var pE=r(ep);ov=n(pE,"XLMRobertaForMultipleChoice"),pE.forEach(t),nv=n(Rc," is supported by this "),Ar=a(Rc,"A",{href:!0,rel:!0});var hE=r(Ar);sv=n(hE,"example script"),hE.forEach(t),av=n(Rc," and "),Br=a(Rc,"A",{href:!0,rel:!0});var mE=r(Br);rv=n(mE,"notebook"),mE.forEach(t),lv=n(Rc,"."),Rc.forEach(t),iv=h(sh),qo=a(sh,"LI",{});var xc=r(qo);tp=a(xc,"A",{href:!0});var uE=r(tp);dv=n(uE,"TFXLMRobertaForMultipleChoice"),uE.forEach(t),cv=n(xc," is supported by this "),Gr=a(xc,"A",{href:!0,rel:!0});var fE=r(Gr);pv=n(fE,"example script"),fE.forEach(t),hv=n(xc," and "),Sr=a(xc,"A",{href:!0,rel:!0});var gE=r(Sr);mv=n(gE,"notebook"),gE.forEach(t),uv=n(xc,"."),xc.forEach(t),fv=h(sh),Nh=a(sh,"LI",{});var _E=r(Nh);op=a(_E,"A",{href:!0});var bE=r(op);gv=n(bE,"Multiple choice task guide"),bE.forEach(t),_E.forEach(t),sh.forEach(t),Lg=h(l),np=a(l,"P",{});var ME=r(np);_v=n(ME,"\u{1F680} Deploy"),ME.forEach(t),Xg=h(l),sp=a(l,"UL",{});var yE=r(sp);Vr=a(yE,"LI",{});var $_=r(Vr);bv=n($_,"A blog post on how to "),Pr=a($_,"A",{href:!0,rel:!0});var vE=r(Pr);Mv=n(vE,"Deploy Serverless XLM RoBERTa on AWS Lambda"),vE.forEach(t),yv=n($_,"."),$_.forEach(t),yE.forEach(t),Eg=h(l),ln=a(l,"H2",{class:!0});var R_=r(ln);ls=a(R_,"A",{id:!0,class:!0,href:!0});var TE=r(ls);qh=a(TE,"SPAN",{});var kE=r(qh);T(Or.$$.fragment,kE),kE.forEach(t),TE.forEach(t),vv=h(R_),Wh=a(R_,"SPAN",{});var wE=r(Wh);Tv=n(wE,"XLMRobertaConfig"),wE.forEach(t),R_.forEach(t),jg=h(l),Bt=a(l,"DIV",{class:!0});var Ua=r(Bt);T(Dr.$$.fragment,Ua),kv=h(Ua),go=a(Ua,"P",{});var Ia=r(go);wv=n(Ia,"This is the configuration class to store the configuration of a "),ap=a(Ia,"A",{href:!0});var FE=r(ap);Fv=n(FE,"XLMRobertaModel"),FE.forEach(t),$v=n(Ia," or a "),rp=a(Ia,"A",{href:!0});var $E=r(rp);Rv=n($E,"TFXLMRobertaModel"),$E.forEach(t),xv=n(Ia,`. It
is used to instantiate a XLM-RoBERTa 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 XLMRoBERTa
`),Qr=a(Ia,"A",{href:!0,rel:!0});var RE=r(Qr);Lv=n(RE,"xlm-roberta-base"),RE.forEach(t),Xv=n(Ia," architecture."),Ia.forEach(t),Ev=h(Ua),dn=a(Ua,"P",{});var ah=r(dn);jv=n(ah,"Configuration objects inherit from "),lp=a(ah,"A",{href:!0});var xE=r(lp);Cv=n(xE,"PretrainedConfig"),xE.forEach(t),Jv=n(ah,` and can be used to control the model outputs. Read the
documentation from `),ip=a(ah,"A",{href:!0});var LE=r(ip);zv=n(LE,"PretrainedConfig"),LE.forEach(t),Uv=n(ah," for more information."),ah.forEach(t),Iv=h(Ua),T(is.$$.fragment,Ua),Ua.forEach(t),Cg=h(l),cn=a(l,"H2",{class:!0});var x_=r(cn);ds=a(x_,"A",{id:!0,class:!0,href:!0});var XE=r(ds);Zh=a(XE,"SPAN",{});var EE=r(Zh);T(Yr.$$.fragment,EE),EE.forEach(t),XE.forEach(t),Nv=h(x_),Ah=a(x_,"SPAN",{});var jE=r(Ah);qv=n(jE,"XLMRobertaTokenizer"),jE.forEach(t),x_.forEach(t),Jg=h(l),et=a(l,"DIV",{class:!0});var Jt=r(et);T(Hr.$$.fragment,Jt),Wv=h(Jt),_o=a(Jt,"P",{});var Na=r(_o);Zv=n(Na,"Adapted from "),dp=a(Na,"A",{href:!0});var CE=r(dp);Av=n(CE,"RobertaTokenizer"),CE.forEach(t),Bv=n(Na," and "),cp=a(Na,"A",{href:!0});var JE=r(cp);Gv=n(JE,"XLNetTokenizer"),JE.forEach(t),Sv=n(Na,`. Based on
`),Kr=a(Na,"A",{href:!0,rel:!0});var zE=r(Kr);Vv=n(zE,"SentencePiece"),zE.forEach(t),Pv=n(Na,"."),Na.forEach(t),Ov=h(Jt),el=a(Jt,"P",{});var L_=r(el);Dv=n(L_,"This tokenizer inherits from "),pp=a(L_,"A",{href:!0});var UE=r(pp);Qv=n(UE,"PreTrainedTokenizer"),UE.forEach(t),Yv=n(L_,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),L_.forEach(t),Hv=h(Jt),Wo=a(Jt,"DIV",{class:!0});var rh=r(Wo);T(tl.$$.fragment,rh),Kv=h(rh),Bh=a(rh,"P",{});var IE=r(Bh);eT=n(IE,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLM-RoBERTa sequence has the following format:`),IE.forEach(t),tT=h(rh),ol=a(rh,"UL",{});var X_=r(ol);hp=a(X_,"LI",{});var TX=r(hp);oT=n(TX,"single sequence: "),Gh=a(TX,"CODE",{});var NE=r(Gh);nT=n(NE,"<s> X </s>"),NE.forEach(t),TX.forEach(t),sT=h(X_),mp=a(X_,"LI",{});var kX=r(mp);aT=n(kX,"pair of sequences: "),Sh=a(kX,"CODE",{});var qE=r(Sh);rT=n(qE,"<s> A </s></s> B </s>"),qE.forEach(t),kX.forEach(t),X_.forEach(t),rh.forEach(t),lT=h(Jt),cs=a(Jt,"DIV",{class:!0});var E_=r(cs);T(nl.$$.fragment,E_),iT=h(E_),sl=a(E_,"P",{});var j_=r(sl);dT=n(j_,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Vh=a(j_,"CODE",{});var WE=r(Vh);cT=n(WE,"prepare_for_model"),WE.forEach(t),pT=n(j_," method."),j_.forEach(t),E_.forEach(t),hT=h(Jt),ps=a(Jt,"DIV",{class:!0});var C_=r(ps);T(al.$$.fragment,C_),mT=h(C_),Ph=a(C_,"P",{});var ZE=r(Ph);uT=n(ZE,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. XLM-RoBERTa does
not make use of token type ids, therefore a list of zeros is returned.`),ZE.forEach(t),C_.forEach(t),fT=h(Jt),up=a(Jt,"DIV",{class:!0});var AE=r(up);T(rl.$$.fragment,AE),AE.forEach(t),Jt.forEach(t),zg=h(l),pn=a(l,"H2",{class:!0});var J_=r(pn);hs=a(J_,"A",{id:!0,class:!0,href:!0});var BE=r(hs);Oh=a(BE,"SPAN",{});var GE=r(Oh);T(ll.$$.fragment,GE),GE.forEach(t),BE.forEach(t),gT=h(J_),Dh=a(J_,"SPAN",{});var SE=r(Dh);_T=n(SE,"XLMRobertaTokenizerFast"),SE.forEach(t),J_.forEach(t),Ug=h(l),bt=a(l,"DIV",{class:!0});var Oo=r(bt);T(il.$$.fragment,Oo),bT=h(Oo),Gt=a(Oo,"P",{});var Do=r(Gt);MT=n(Do,"Construct a \u201Cfast\u201D XLM-RoBERTa tokenizer (backed by HuggingFace\u2019s "),Qh=a(Do,"EM",{});var VE=r(Qh);yT=n(VE,"tokenizers"),VE.forEach(t),vT=n(Do,` library). Adapted from
`),fp=a(Do,"A",{href:!0});var PE=r(fp);TT=n(PE,"RobertaTokenizer"),PE.forEach(t),kT=n(Do," and "),gp=a(Do,"A",{href:!0});var OE=r(gp);wT=n(OE,"XLNetTokenizer"),OE.forEach(t),FT=n(Do,`. Based on
`),dl=a(Do,"A",{href:!0,rel:!0});var DE=r(dl);$T=n(DE,"BPE"),DE.forEach(t),RT=n(Do,"."),Do.forEach(t),xT=h(Oo),cl=a(Oo,"P",{});var z_=r(cl);LT=n(z_,"This tokenizer inherits from "),_p=a(z_,"A",{href:!0});var QE=r(_p);XT=n(QE,"PreTrainedTokenizerFast"),QE.forEach(t),ET=n(z_,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),z_.forEach(t),jT=h(Oo),Zo=a(Oo,"DIV",{class:!0});var lh=r(Zo);T(pl.$$.fragment,lh),CT=h(lh),Yh=a(lh,"P",{});var YE=r(Yh);JT=n(YE,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLM-RoBERTa sequence has the following format:`),YE.forEach(t),zT=h(lh),hl=a(lh,"UL",{});var U_=r(hl);bp=a(U_,"LI",{});var wX=r(bp);UT=n(wX,"single sequence: "),Hh=a(wX,"CODE",{});var HE=r(Hh);IT=n(HE,"<s> X </s>"),HE.forEach(t),wX.forEach(t),NT=h(U_),Mp=a(U_,"LI",{});var FX=r(Mp);qT=n(FX,"pair of sequences: "),Kh=a(FX,"CODE",{});var KE=r(Kh);WT=n(KE,"<s> A </s></s> B </s>"),KE.forEach(t),FX.forEach(t),U_.forEach(t),lh.forEach(t),ZT=h(Oo),ms=a(Oo,"DIV",{class:!0});var I_=r(ms);T(ml.$$.fragment,I_),AT=h(I_),em=a(I_,"P",{});var e4=r(em);BT=n(e4,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. XLM-RoBERTa does
not make use of token type ids, therefore a list of zeros is returned.`),e4.forEach(t),I_.forEach(t),Oo.forEach(t),Ig=h(l),hn=a(l,"H2",{class:!0});var N_=r(hn);us=a(N_,"A",{id:!0,class:!0,href:!0});var t4=r(us);tm=a(t4,"SPAN",{});var o4=r(tm);T(ul.$$.fragment,o4),o4.forEach(t),t4.forEach(t),GT=h(N_),om=a(N_,"SPAN",{});var n4=r(om);ST=n(n4,"XLMRobertaModel"),n4.forEach(t),N_.forEach(t),Ng=h(l),Ke=a(l,"DIV",{class:!0});var _t=r(Ke);T(fl.$$.fragment,_t),VT=h(_t),nm=a(_t,"P",{});var s4=r(nm);PT=n(s4,"The bare XLM-RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),s4.forEach(t),OT=h(_t),gl=a(_t,"P",{});var q_=r(gl);DT=n(q_,"This model inherits from "),yp=a(q_,"A",{href:!0});var a4=r(yp);QT=n(a4,"PreTrainedModel"),a4.forEach(t),YT=n(q_,`. 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.)`),q_.forEach(t),HT=h(_t),_l=a(_t,"P",{});var W_=r(_l);KT=n(W_,"This model is also a PyTorch "),bl=a(W_,"A",{href:!0,rel:!0});var r4=r(bl);ek=n(r4,"torch.nn.Module"),r4.forEach(t),tk=n(W_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),W_.forEach(t),ok=h(_t),Ml=a(_t,"P",{});var Z_=r(Ml);nk=n(Z_,`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 `),sm=a(Z_,"EM",{});var l4=r(sm);sk=n(l4,`Attention is
all you need`),l4.forEach(t),ak=n(Z_,`_ by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin.`),Z_.forEach(t),rk=h(_t),it=a(_t,"P",{});var zt=r(it);lk=n(zt,"To behave as an decoder the model needs to be initialized with the "),am=a(zt,"CODE",{});var i4=r(am);ik=n(i4,"is_decoder"),i4.forEach(t),dk=n(zt,` argument of the configuration set
to `),rm=a(zt,"CODE",{});var d4=r(rm);ck=n(d4,"True"),d4.forEach(t),pk=n(zt,". To be used in a Seq2Seq model, the model needs to initialized with both "),lm=a(zt,"CODE",{});var c4=r(lm);hk=n(c4,"is_decoder"),c4.forEach(t),mk=n(zt,` argument and
`),im=a(zt,"CODE",{});var p4=r(im);uk=n(p4,"add_cross_attention"),p4.forEach(t),fk=n(zt," set to "),dm=a(zt,"CODE",{});var h4=r(dm);gk=n(h4,"True"),h4.forEach(t),_k=n(zt,"; an "),cm=a(zt,"CODE",{});var m4=r(cm);bk=n(m4,"encoder_hidden_states"),m4.forEach(t),Mk=n(zt," is then expected as an input to the forward pass."),zt.forEach(t),yk=h(_t),fs=a(_t,"P",{});var _g=r(fs);vk=n(_g,".. _"),pm=a(_g,"EM",{});var u4=r(pm);Tk=n(u4,"Attention is all you need"),u4.forEach(t),kk=n(_g,": "),yl=a(_g,"A",{href:!0,rel:!0});var f4=r(yl);wk=n(f4,"https://arxiv.org/abs/1706.03762"),f4.forEach(t),_g.forEach(t),Fk=h(_t),Vt=a(_t,"DIV",{class:!0});var qa=r(Vt);T(vl.$$.fragment,qa),$k=h(qa),mn=a(qa,"P",{});var ih=r(mn);Rk=n(ih,"The "),vp=a(ih,"A",{href:!0});var g4=r(vp);xk=n(g4,"XLMRobertaModel"),g4.forEach(t),Lk=n(ih," forward method, overrides the "),hm=a(ih,"CODE",{});var _4=r(hm);Xk=n(_4,"__call__"),_4.forEach(t),Ek=n(ih," special method."),ih.forEach(t),jk=h(qa),T(gs.$$.fragment,qa),Ck=h(qa),T(_s.$$.fragment,qa),qa.forEach(t),_t.forEach(t),qg=h(l),un=a(l,"H2",{class:!0});var A_=r(un);bs=a(A_,"A",{id:!0,class:!0,href:!0});var b4=r(bs);mm=a(b4,"SPAN",{});var M4=r(mm);T(Tl.$$.fragment,M4),M4.forEach(t),b4.forEach(t),Jk=h(A_),um=a(A_,"SPAN",{});var y4=r(um);zk=n(y4,"XLMRobertaForCausalLM"),y4.forEach(t),A_.forEach(t),Wg=h(l),Mt=a(l,"DIV",{class:!0});var Qo=r(Mt);T(kl.$$.fragment,Qo),Uk=h(Qo),wl=a(Qo,"P",{});var B_=r(wl);Ik=n(B_,"XLM-RoBERTa Model with a "),fm=a(B_,"CODE",{});var v4=r(fm);Nk=n(v4,"language modeling"),v4.forEach(t),qk=n(B_," head on top for CLM fine-tuning."),B_.forEach(t),Wk=h(Qo),Fl=a(Qo,"P",{});var G_=r(Fl);Zk=n(G_,"This model inherits from "),Tp=a(G_,"A",{href:!0});var T4=r(Tp);Ak=n(T4,"PreTrainedModel"),T4.forEach(t),Bk=n(G_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),G_.forEach(t),Gk=h(Qo),$l=a(Qo,"P",{});var S_=r($l);Sk=n(S_,"This model is also a PyTorch "),Rl=a(S_,"A",{href:!0,rel:!0});var k4=r(Rl);Vk=n(k4,"torch.nn.Module"),k4.forEach(t),Pk=n(S_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),S_.forEach(t),Ok=h(Qo),Pt=a(Qo,"DIV",{class:!0});var Wa=r(Pt);T(xl.$$.fragment,Wa),Dk=h(Wa),fn=a(Wa,"P",{});var dh=r(fn);Qk=n(dh,"The "),kp=a(dh,"A",{href:!0});var w4=r(kp);Yk=n(w4,"XLMRobertaForCausalLM"),w4.forEach(t),Hk=n(dh," forward method, overrides the "),gm=a(dh,"CODE",{});var F4=r(gm);Kk=n(F4,"__call__"),F4.forEach(t),ew=n(dh," special method."),dh.forEach(t),tw=h(Wa),T(Ms.$$.fragment,Wa),ow=h(Wa),T(ys.$$.fragment,Wa),Wa.forEach(t),Qo.forEach(t),Zg=h(l),gn=a(l,"H2",{class:!0});var V_=r(gn);vs=a(V_,"A",{id:!0,class:!0,href:!0});var $4=r(vs);_m=a($4,"SPAN",{});var R4=r(_m);T(Ll.$$.fragment,R4),R4.forEach(t),$4.forEach(t),nw=h(V_),bm=a(V_,"SPAN",{});var x4=r(bm);sw=n(x4,"XLMRobertaForMaskedLM"),x4.forEach(t),V_.forEach(t),Ag=h(l),yt=a(l,"DIV",{class:!0});var Yo=r(yt);T(Xl.$$.fragment,Yo),aw=h(Yo),El=a(Yo,"P",{});var P_=r(El);rw=n(P_,"XLM-RoBERTa Model with a "),Mm=a(P_,"CODE",{});var L4=r(Mm);lw=n(L4,"language modeling"),L4.forEach(t),iw=n(P_," head on top."),P_.forEach(t),dw=h(Yo),jl=a(Yo,"P",{});var O_=r(jl);cw=n(O_,"This model inherits from "),wp=a(O_,"A",{href:!0});var X4=r(wp);pw=n(X4,"PreTrainedModel"),X4.forEach(t),hw=n(O_,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),O_.forEach(t),mw=h(Yo),Cl=a(Yo,"P",{});var D_=r(Cl);uw=n(D_,"This model is also a PyTorch "),Jl=a(D_,"A",{href:!0,rel:!0});var E4=r(Jl);fw=n(E4,"torch.nn.Module"),E4.forEach(t),gw=n(D_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),D_.forEach(t),_w=h(Yo),Ot=a(Yo,"DIV",{class:!0});var Za=r(Ot);T(zl.$$.fragment,Za),bw=h(Za),_n=a(Za,"P",{});var ch=r(_n);Mw=n(ch,"The "),Fp=a(ch,"A",{href:!0});var j4=r(Fp);yw=n(j4,"XLMRobertaForMaskedLM"),j4.forEach(t),vw=n(ch," forward method, overrides the "),ym=a(ch,"CODE",{});var C4=r(ym);Tw=n(C4,"__call__"),C4.forEach(t),kw=n(ch," special method."),ch.forEach(t),ww=h(Za),T(Ts.$$.fragment,Za),Fw=h(Za),T(ks.$$.fragment,Za),Za.forEach(t),Yo.forEach(t),Bg=h(l),bn=a(l,"H2",{class:!0});var Q_=r(bn);ws=a(Q_,"A",{id:!0,class:!0,href:!0});var J4=r(ws);vm=a(J4,"SPAN",{});var z4=r(vm);T(Ul.$$.fragment,z4),z4.forEach(t),J4.forEach(t),$w=h(Q_),Tm=a(Q_,"SPAN",{});var U4=r(Tm);Rw=n(U4,"XLMRobertaForSequenceClassification"),U4.forEach(t),Q_.forEach(t),Gg=h(l),vt=a(l,"DIV",{class:!0});var Ho=r(vt);T(Il.$$.fragment,Ho),xw=h(Ho),km=a(Ho,"P",{});var I4=r(km);Lw=n(I4,`XLM-RoBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),I4.forEach(t),Xw=h(Ho),Nl=a(Ho,"P",{});var Y_=r(Nl);Ew=n(Y_,"This model inherits from "),$p=a(Y_,"A",{href:!0});var N4=r($p);jw=n(N4,"PreTrainedModel"),N4.forEach(t),Cw=n(Y_,`. 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.)`),Y_.forEach(t),Jw=h(Ho),ql=a(Ho,"P",{});var H_=r(ql);zw=n(H_,"This model is also a PyTorch "),Wl=a(H_,"A",{href:!0,rel:!0});var q4=r(Wl);Uw=n(q4,"torch.nn.Module"),q4.forEach(t),Iw=n(H_,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),H_.forEach(t),Nw=h(Ho),Lt=a(Ho,"DIV",{class:!0});var Ko=r(Lt);T(Zl.$$.fragment,Ko),qw=h(Ko),Mn=a(Ko,"P",{});var ph=r(Mn);Ww=n(ph,"The "),Rp=a(ph,"A",{href:!0});var W4=r(Rp);Zw=n(W4,"XLMRobertaForSequenceClassification"),W4.forEach(t),Aw=n(ph," forward method, overrides the "),wm=a(ph,"CODE",{});var Z4=r(wm);Bw=n(Z4,"__call__"),Z4.forEach(t),Gw=n(ph," special method."),ph.forEach(t),Sw=h(Ko),T(Fs.$$.fragment,Ko),Vw=h(Ko),T($s.$$.fragment,Ko),Pw=h(Ko),T(Rs.$$.fragment,Ko),Ko.forEach(t),Ho.forEach(t),Sg=h(l),yn=a(l,"H2",{class:!0});var K_=r(yn);xs=a(K_,"A",{id:!0,class:!0,href:!0});var A4=r(xs);Fm=a(A4,"SPAN",{});var B4=r(Fm);T(Al.$$.fragment,B4),B4.forEach(t),A4.forEach(t),Ow=h(K_),$m=a(K_,"SPAN",{});var G4=r($m);Dw=n(G4,"XLMRobertaForMultipleChoice"),G4.forEach(t),K_.forEach(t),Vg=h(l),Tt=a(l,"DIV",{class:!0});var en=r(Tt);T(Bl.$$.fragment,en),Qw=h(en),Rm=a(en,"P",{});var S4=r(Rm);Yw=n(S4,`XLM-RoBERTa 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.`),S4.forEach(t),Hw=h(en),Gl=a(en,"P",{});var eb=r(Gl);Kw=n(eb,"This model inherits from "),xp=a(eb,"A",{href:!0});var V4=r(xp);e0=n(V4,"PreTrainedModel"),V4.forEach(t),t0=n(eb,`. 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.)`),eb.forEach(t),o0=h(en),Sl=a(en,"P",{});var tb=r(Sl);n0=n(tb,"This model is also a PyTorch "),Vl=a(tb,"A",{href:!0,rel:!0});var P4=r(Vl);s0=n(P4,"torch.nn.Module"),P4.forEach(t),a0=n(tb,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),tb.forEach(t),r0=h(en),Dt=a(en,"DIV",{class:!0});var Aa=r(Dt);T(Pl.$$.fragment,Aa),l0=h(Aa),vn=a(Aa,"P",{});var hh=r(vn);i0=n(hh,"The "),Lp=a(hh,"A",{href:!0});var O4=r(Lp);d0=n(O4,"XLMRobertaForMultipleChoice"),O4.forEach(t),c0=n(hh," forward method, overrides the "),xm=a(hh,"CODE",{});var D4=r(xm);p0=n(D4,"__call__"),D4.forEach(t),h0=n(hh," special method."),hh.forEach(t),m0=h(Aa),T(Ls.$$.fragment,Aa),u0=h(Aa),T(Xs.$$.fragment,Aa),Aa.forEach(t),en.forEach(t),Pg=h(l),Tn=a(l,"H2",{class:!0});var ob=r(Tn);Es=a(ob,"A",{id:!0,class:!0,href:!0});var Q4=r(Es);Lm=a(Q4,"SPAN",{});var Y4=r(Lm);T(Ol.$$.fragment,Y4),Y4.forEach(t),Q4.forEach(t),f0=h(ob),Xm=a(ob,"SPAN",{});var H4=r(Xm);g0=n(H4,"XLMRobertaForTokenClassification"),H4.forEach(t),ob.forEach(t),Og=h(l),kt=a(l,"DIV",{class:!0});var tn=r(kt);T(Dl.$$.fragment,tn),_0=h(tn),Em=a(tn,"P",{});var K4=r(Em);b0=n(K4,`XLM-RoBERTa 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.`),K4.forEach(t),M0=h(tn),Ql=a(tn,"P",{});var nb=r(Ql);y0=n(nb,"This model inherits from "),Xp=a(nb,"A",{href:!0});var e3=r(Xp);v0=n(e3,"PreTrainedModel"),e3.forEach(t),T0=n(nb,`. 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.)`),nb.forEach(t),k0=h(tn),Yl=a(tn,"P",{});var sb=r(Yl);w0=n(sb,"This model is also a PyTorch "),Hl=a(sb,"A",{href:!0,rel:!0});var t3=r(Hl);F0=n(t3,"torch.nn.Module"),t3.forEach(t),$0=n(sb,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),sb.forEach(t),R0=h(tn),Qt=a(tn,"DIV",{class:!0});var Ba=r(Qt);T(Kl.$$.fragment,Ba),x0=h(Ba),kn=a(Ba,"P",{});var mh=r(kn);L0=n(mh,"The "),Ep=a(mh,"A",{href:!0});var o3=r(Ep);X0=n(o3,"XLMRobertaForTokenClassification"),o3.forEach(t),E0=n(mh," forward method, overrides the "),jm=a(mh,"CODE",{});var n3=r(jm);j0=n(n3,"__call__"),n3.forEach(t),C0=n(mh," special method."),mh.forEach(t),J0=h(Ba),T(js.$$.fragment,Ba),z0=h(Ba),T(Cs.$$.fragment,Ba),Ba.forEach(t),tn.forEach(t),Dg=h(l),wn=a(l,"H2",{class:!0});var ab=r(wn);Js=a(ab,"A",{id:!0,class:!0,href:!0});var s3=r(Js);Cm=a(s3,"SPAN",{});var a3=r(Cm);T(ei.$$.fragment,a3),a3.forEach(t),s3.forEach(t),U0=h(ab),Jm=a(ab,"SPAN",{});var r3=r(Jm);I0=n(r3,"XLMRobertaForQuestionAnswering"),r3.forEach(t),ab.forEach(t),Qg=h(l),wt=a(l,"DIV",{class:!0});var on=r(wt);T(ti.$$.fragment,on),N0=h(on),Fn=a(on,"P",{});var uh=r(Fn);q0=n(uh,`XLM-RoBERTa 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 `),zm=a(uh,"CODE",{});var l3=r(zm);W0=n(l3,"span start logits"),l3.forEach(t),Z0=n(uh," and "),Um=a(uh,"CODE",{});var i3=r(Um);A0=n(i3,"span end logits"),i3.forEach(t),B0=n(uh,")."),uh.forEach(t),G0=h(on),oi=a(on,"P",{});var rb=r(oi);S0=n(rb,"This model inherits from "),jp=a(rb,"A",{href:!0});var d3=r(jp);V0=n(d3,"PreTrainedModel"),d3.forEach(t),P0=n(rb,`. 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.)`),rb.forEach(t),O0=h(on),ni=a(on,"P",{});var lb=r(ni);D0=n(lb,"This model is also a PyTorch "),si=a(lb,"A",{href:!0,rel:!0});var c3=r(si);Q0=n(c3,"torch.nn.Module"),c3.forEach(t),Y0=n(lb,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),lb.forEach(t),H0=h(on),Yt=a(on,"DIV",{class:!0});var Ga=r(Yt);T(ai.$$.fragment,Ga),K0=h(Ga),$n=a(Ga,"P",{});var fh=r($n);e1=n(fh,"The "),Cp=a(fh,"A",{href:!0});var p3=r(Cp);t1=n(p3,"XLMRobertaForQuestionAnswering"),p3.forEach(t),o1=n(fh," forward method, overrides the "),Im=a(fh,"CODE",{});var h3=r(Im);n1=n(h3,"__call__"),h3.forEach(t),s1=n(fh," special method."),fh.forEach(t),a1=h(Ga),T(zs.$$.fragment,Ga),r1=h(Ga),T(Us.$$.fragment,Ga),Ga.forEach(t),on.forEach(t),Yg=h(l),Rn=a(l,"H2",{class:!0});var ib=r(Rn);Is=a(ib,"A",{id:!0,class:!0,href:!0});var m3=r(Is);Nm=a(m3,"SPAN",{});var u3=r(Nm);T(ri.$$.fragment,u3),u3.forEach(t),m3.forEach(t),l1=h(ib),qm=a(ib,"SPAN",{});var f3=r(qm);i1=n(f3,"TFXLMRobertaModel"),f3.forEach(t),ib.forEach(t),Hg=h(l),dt=a(l,"DIV",{class:!0});var io=r(dt);T(li.$$.fragment,io),d1=h(io),Wm=a(io,"P",{});var g3=r(Wm);c1=n(g3,"The bare XLM RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),g3.forEach(t),p1=h(io),ii=a(io,"P",{});var db=r(ii);h1=n(db,"This model inherits from "),Jp=a(db,"A",{href:!0});var _3=r(Jp);m1=n(_3,"TFPreTrainedModel"),_3.forEach(t),u1=n(db,`. 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.)`),db.forEach(t),f1=h(io),di=a(io,"P",{});var cb=r(di);g1=n(cb,"This model is also a "),ci=a(cb,"A",{href:!0,rel:!0});var b3=r(ci);_1=n(b3,"tf.keras.Model"),b3.forEach(t),b1=n(cb,` 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.`),cb.forEach(t),M1=h(io),T(Ns.$$.fragment,io),y1=h(io),Ht=a(io,"DIV",{class:!0});var Sa=r(Ht);T(pi.$$.fragment,Sa),v1=h(Sa),xn=a(Sa,"P",{});var gh=r(xn);T1=n(gh,"The "),zp=a(gh,"A",{href:!0});var M3=r(zp);k1=n(M3,"TFXLMRobertaModel"),M3.forEach(t),w1=n(gh," forward method, overrides the "),Zm=a(gh,"CODE",{});var y3=r(Zm);F1=n(y3,"__call__"),y3.forEach(t),$1=n(gh," special method."),gh.forEach(t),R1=h(Sa),T(qs.$$.fragment,Sa),x1=h(Sa),T(Ws.$$.fragment,Sa),Sa.forEach(t),io.forEach(t),Kg=h(l),Ln=a(l,"H2",{class:!0});var pb=r(Ln);Zs=a(pb,"A",{id:!0,class:!0,href:!0});var v3=r(Zs);Am=a(v3,"SPAN",{});var T3=r(Am);T(hi.$$.fragment,T3),T3.forEach(t),v3.forEach(t),L1=h(pb),Bm=a(pb,"SPAN",{});var k3=r(Bm);X1=n(k3,"TFXLMRobertaForCausalLM"),k3.forEach(t),pb.forEach(t),e_=h(l),ct=a(l,"DIV",{class:!0});var co=r(ct);T(mi.$$.fragment,co),E1=h(co),ui=a(co,"P",{});var hb=r(ui);j1=n(hb,"XLM-RoBERTa Model with a "),Gm=a(hb,"CODE",{});var w3=r(Gm);C1=n(w3,"language modeling"),w3.forEach(t),J1=n(hb," head on top for CLM fine-tuning."),hb.forEach(t),z1=h(co),fi=a(co,"P",{});var mb=r(fi);U1=n(mb,"This model inherits from "),Up=a(mb,"A",{href:!0});var F3=r(Up);I1=n(F3,"TFPreTrainedModel"),F3.forEach(t),N1=n(mb,`. 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.)`),mb.forEach(t),q1=h(co),gi=a(co,"P",{});var ub=r(gi);W1=n(ub,"This model is also a "),_i=a(ub,"A",{href:!0,rel:!0});var $3=r(_i);Z1=n($3,"tf.keras.Model"),$3.forEach(t),A1=n(ub,` 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.`),ub.forEach(t),B1=h(co),T(As.$$.fragment,co),G1=h(co),Kt=a(co,"DIV",{class:!0});var Va=r(Kt);T(bi.$$.fragment,Va),S1=h(Va),Xn=a(Va,"P",{});var _h=r(Xn);V1=n(_h,"The "),Ip=a(_h,"A",{href:!0});var R3=r(Ip);P1=n(R3,"TFXLMRobertaForCausalLM"),R3.forEach(t),O1=n(_h," forward method, overrides the "),Sm=a(_h,"CODE",{});var x3=r(Sm);D1=n(x3,"__call__"),x3.forEach(t),Q1=n(_h," special method."),_h.forEach(t),Y1=h(Va),T(Bs.$$.fragment,Va),H1=h(Va),T(Gs.$$.fragment,Va),Va.forEach(t),co.forEach(t),t_=h(l),En=a(l,"H2",{class:!0});var fb=r(En);Ss=a(fb,"A",{id:!0,class:!0,href:!0});var L3=r(Ss);Vm=a(L3,"SPAN",{});var X3=r(Vm);T(Mi.$$.fragment,X3),X3.forEach(t),L3.forEach(t),K1=h(fb),Pm=a(fb,"SPAN",{});var E3=r(Pm);e2=n(E3,"TFXLMRobertaForMaskedLM"),E3.forEach(t),fb.forEach(t),o_=h(l),pt=a(l,"DIV",{class:!0});var po=r(pt);T(yi.$$.fragment,po),t2=h(po),vi=a(po,"P",{});var gb=r(vi);o2=n(gb,"XLM RoBERTa Model with a "),Om=a(gb,"CODE",{});var j3=r(Om);n2=n(j3,"language modeling"),j3.forEach(t),s2=n(gb," head on top."),gb.forEach(t),a2=h(po),Ti=a(po,"P",{});var _b=r(Ti);r2=n(_b,"This model inherits from "),Np=a(_b,"A",{href:!0});var C3=r(Np);l2=n(C3,"TFPreTrainedModel"),C3.forEach(t),i2=n(_b,`. 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.)`),_b.forEach(t),d2=h(po),ki=a(po,"P",{});var bb=r(ki);c2=n(bb,"This model is also a "),wi=a(bb,"A",{href:!0,rel:!0});var J3=r(wi);p2=n(J3,"tf.keras.Model"),J3.forEach(t),h2=n(bb,` 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.`),bb.forEach(t),m2=h(po),T(Vs.$$.fragment,po),u2=h(po),Xt=a(po,"DIV",{class:!0});var nn=r(Xt);T(Fi.$$.fragment,nn),f2=h(nn),jn=a(nn,"P",{});var bh=r(jn);g2=n(bh,"The "),qp=a(bh,"A",{href:!0});var z3=r(qp);_2=n(z3,"TFXLMRobertaForMaskedLM"),z3.forEach(t),b2=n(bh," forward method, overrides the "),Dm=a(bh,"CODE",{});var U3=r(Dm);M2=n(U3,"__call__"),U3.forEach(t),y2=n(bh," special method."),bh.forEach(t),v2=h(nn),T(Ps.$$.fragment,nn),T2=h(nn),T(Os.$$.fragment,nn),k2=h(nn),T(Ds.$$.fragment,nn),nn.forEach(t),po.forEach(t),n_=h(l),Cn=a(l,"H2",{class:!0});var Mb=r(Cn);Qs=a(Mb,"A",{id:!0,class:!0,href:!0});var I3=r(Qs);Qm=a(I3,"SPAN",{});var N3=r(Qm);T($i.$$.fragment,N3),N3.forEach(t),I3.forEach(t),w2=h(Mb),Ym=a(Mb,"SPAN",{});var q3=r(Ym);F2=n(q3,"TFXLMRobertaForSequenceClassification"),q3.forEach(t),Mb.forEach(t),s_=h(l),ht=a(l,"DIV",{class:!0});var ho=r(ht);T(Ri.$$.fragment,ho),$2=h(ho),Hm=a(ho,"P",{});var W3=r(Hm);R2=n(W3,`XLM RoBERTa Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),W3.forEach(t),x2=h(ho),xi=a(ho,"P",{});var yb=r(xi);L2=n(yb,"This model inherits from "),Wp=a(yb,"A",{href:!0});var Z3=r(Wp);X2=n(Z3,"TFPreTrainedModel"),Z3.forEach(t),E2=n(yb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),yb.forEach(t),j2=h(ho),Li=a(ho,"P",{});var vb=r(Li);C2=n(vb,"This model is also a "),Xi=a(vb,"A",{href:!0,rel:!0});var A3=r(Xi);J2=n(A3,"tf.keras.Model"),A3.forEach(t),z2=n(vb,` 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.`),vb.forEach(t),U2=h(ho),T(Ys.$$.fragment,ho),I2=h(ho),Et=a(ho,"DIV",{class:!0});var sn=r(Et);T(Ei.$$.fragment,sn),N2=h(sn),Jn=a(sn,"P",{});var Mh=r(Jn);q2=n(Mh,"The "),Zp=a(Mh,"A",{href:!0});var B3=r(Zp);W2=n(B3,"TFXLMRobertaForSequenceClassification"),B3.forEach(t),Z2=n(Mh," forward method, overrides the "),Km=a(Mh,"CODE",{});var G3=r(Km);A2=n(G3,"__call__"),G3.forEach(t),B2=n(Mh," special method."),Mh.forEach(t),G2=h(sn),T(Hs.$$.fragment,sn),S2=h(sn),T(Ks.$$.fragment,sn),V2=h(sn),T(ea.$$.fragment,sn),sn.forEach(t),ho.forEach(t),a_=h(l),zn=a(l,"H2",{class:!0});var Tb=r(zn);ta=a(Tb,"A",{id:!0,class:!0,href:!0});var S3=r(ta);eu=a(S3,"SPAN",{});var V3=r(eu);T(ji.$$.fragment,V3),V3.forEach(t),S3.forEach(t),P2=h(Tb),tu=a(Tb,"SPAN",{});var P3=r(tu);O2=n(P3,"TFXLMRobertaForMultipleChoice"),P3.forEach(t),Tb.forEach(t),r_=h(l),mt=a(l,"DIV",{class:!0});var mo=r(mt);T(Ci.$$.fragment,mo),D2=h(mo),ou=a(mo,"P",{});var O3=r(ou);Q2=n(O3,`XLM Roberta 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.`),O3.forEach(t),Y2=h(mo),Ji=a(mo,"P",{});var kb=r(Ji);H2=n(kb,"This model inherits from "),Ap=a(kb,"A",{href:!0});var D3=r(Ap);K2=n(D3,"TFPreTrainedModel"),D3.forEach(t),eF=n(kb,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),kb.forEach(t),tF=h(mo),zi=a(mo,"P",{});var wb=r(zi);oF=n(wb,"This model is also a "),Ui=a(wb,"A",{href:!0,rel:!0});var Q3=r(Ui);nF=n(Q3,"tf.keras.Model"),Q3.forEach(t),sF=n(wb,` 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.`),wb.forEach(t),aF=h(mo),T(oa.$$.fragment,mo),rF=h(mo),eo=a(mo,"DIV",{class:!0});var Pa=r(eo);T(Ii.$$.fragment,Pa),lF=h(Pa),Un=a(Pa,"P",{});var yh=r(Un);iF=n(yh,"The "),Bp=a(yh,"A",{href:!0});var Y3=r(Bp);dF=n(Y3,"TFXLMRobertaForMultipleChoice"),Y3.forEach(t),cF=n(yh," forward method, overrides the "),nu=a(yh,"CODE",{});var H3=r(nu);pF=n(H3,"__call__"),H3.forEach(t),hF=n(yh," special method."),yh.forEach(t),mF=h(Pa),T(na.$$.fragment,Pa),uF=h(Pa),T(sa.$$.fragment,Pa),Pa.forEach(t),mo.forEach(t),l_=h(l),In=a(l,"H2",{class:!0});var Fb=r(In);aa=a(Fb,"A",{id:!0,class:!0,href:!0});var K3=r(aa);su=a(K3,"SPAN",{});var ej=r(su);T(Ni.$$.fragment,ej),ej.forEach(t),K3.forEach(t),fF=h(Fb),au=a(Fb,"SPAN",{});var tj=r(au);gF=n(tj,"TFXLMRobertaForTokenClassification"),tj.forEach(t),Fb.forEach(t),i_=h(l),ut=a(l,"DIV",{class:!0});var uo=r(ut);T(qi.$$.fragment,uo),_F=h(uo),ru=a(uo,"P",{});var oj=r(ru);bF=n(oj,`XLM RoBERTa 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.`),oj.forEach(t),MF=h(uo),Wi=a(uo,"P",{});var $b=r(Wi);yF=n($b,"This model inherits from "),Gp=a($b,"A",{href:!0});var nj=r(Gp);vF=n(nj,"TFPreTrainedModel"),nj.forEach(t),TF=n($b,`. 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.)`),$b.forEach(t),kF=h(uo),Zi=a(uo,"P",{});var Rb=r(Zi);wF=n(Rb,"This model is also a "),Ai=a(Rb,"A",{href:!0,rel:!0});var sj=r(Ai);FF=n(sj,"tf.keras.Model"),sj.forEach(t),$F=n(Rb,` 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.`),Rb.forEach(t),RF=h(uo),T(ra.$$.fragment,uo),xF=h(uo),jt=a(uo,"DIV",{class:!0});var an=r(jt);T(Bi.$$.fragment,an),LF=h(an),Nn=a(an,"P",{});var vh=r(Nn);XF=n(vh,"The "),Sp=a(vh,"A",{href:!0});var aj=r(Sp);EF=n(aj,"TFXLMRobertaForTokenClassification"),aj.forEach(t),jF=n(vh," forward method, overrides the "),lu=a(vh,"CODE",{});var rj=r(lu);CF=n(rj,"__call__"),rj.forEach(t),JF=n(vh," special method."),vh.forEach(t),zF=h(an),T(la.$$.fragment,an),UF=h(an),T(ia.$$.fragment,an),IF=h(an),T(da.$$.fragment,an),an.forEach(t),uo.forEach(t),d_=h(l),qn=a(l,"H2",{class:!0});var xb=r(qn);ca=a(xb,"A",{id:!0,class:!0,href:!0});var lj=r(ca);iu=a(lj,"SPAN",{});var ij=r(iu);T(Gi.$$.fragment,ij),ij.forEach(t),lj.forEach(t),NF=h(xb),du=a(xb,"SPAN",{});var dj=r(du);qF=n(dj,"TFXLMRobertaForQuestionAnswering"),dj.forEach(t),xb.forEach(t),c_=h(l),ft=a(l,"DIV",{class:!0});var fo=r(ft);T(Si.$$.fragment,fo),WF=h(fo),Wn=a(fo,"P",{});var Th=r(Wn);ZF=n(Th,`XLM RoBERTa 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 `),cu=a(Th,"CODE",{});var cj=r(cu);AF=n(cj,"span start logits"),cj.forEach(t),BF=n(Th," and "),pu=a(Th,"CODE",{});var pj=r(pu);GF=n(pj,"span end logits"),pj.forEach(t),SF=n(Th,")."),Th.forEach(t),VF=h(fo),Vi=a(fo,"P",{});var Lb=r(Vi);PF=n(Lb,"This model inherits from "),Vp=a(Lb,"A",{href:!0});var hj=r(Vp);OF=n(hj,"TFPreTrainedModel"),hj.forEach(t),DF=n(Lb,`. 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.)`),Lb.forEach(t),QF=h(fo),Pi=a(fo,"P",{});var Xb=r(Pi);YF=n(Xb,"This model is also a "),Oi=a(Xb,"A",{href:!0,rel:!0});var mj=r(Oi);HF=n(mj,"tf.keras.Model"),mj.forEach(t),KF=n(Xb,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Xb.forEach(t),e$=h(fo),T(pa.$$.fragment,fo),t$=h(fo),Ct=a(fo,"DIV",{class:!0});var rn=r(Ct);T(Di.$$.fragment,rn),o$=h(rn),Zn=a(rn,"P",{});var kh=r(Zn);n$=n(kh,"The "),Pp=a(kh,"A",{href:!0});var uj=r(Pp);s$=n(uj,"TFXLMRobertaForQuestionAnswering"),uj.forEach(t),a$=n(kh," forward method, overrides the "),hu=a(kh,"CODE",{});var fj=r(hu);r$=n(fj,"__call__"),fj.forEach(t),l$=n(kh," special method."),kh.forEach(t),i$=h(rn),T(ha.$$.fragment,rn),d$=h(rn),T(ma.$$.fragment,rn),c$=h(rn),T(ua.$$.fragment,rn),rn.forEach(t),fo.forEach(t),p_=h(l),An=a(l,"H2",{class:!0});var Eb=r(An);fa=a(Eb,"A",{id:!0,class:!0,href:!0});var gj=r(fa);mu=a(gj,"SPAN",{});var _j=r(mu);T(Qi.$$.fragment,_j),_j.forEach(t),gj.forEach(t),p$=h(Eb),uu=a(Eb,"SPAN",{});var bj=r(uu);h$=n(bj,"FlaxXLMRobertaModel"),bj.forEach(t),Eb.forEach(t),h_=h(l),tt=a(l,"DIV",{class:!0});var Ut=r(tt);T(Yi.$$.fragment,Ut),m$=h(Ut),fu=a(Ut,"P",{});var Mj=r(fu);u$=n(Mj,"The bare XLM RoBERTa Model transformer outputting raw hidden-states without any specific head on top."),Mj.forEach(t),f$=h(Ut),Hi=a(Ut,"P",{});var jb=r(Hi);g$=n(jb,"This model inherits from "),Op=a(jb,"A",{href:!0});var yj=r(Op);_$=n(yj,"FlaxPreTrainedModel"),yj.forEach(t),b$=n(jb,`. 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)`),jb.forEach(t),M$=h(Ut),Ki=a(Ut,"P",{});var Cb=r(Ki);y$=n(Cb,"This model is also a Flax Linen "),ed=a(Cb,"A",{href:!0,rel:!0});var vj=r(ed);v$=n(vj,"flax.linen.Module"),vj.forEach(t),T$=n(Cb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Cb.forEach(t),k$=h(Ut),gu=a(Ut,"P",{});var Tj=r(gu);w$=n(Tj,"Finally, this model supports inherent JAX features such as:"),Tj.forEach(t),F$=h(Ut),bo=a(Ut,"UL",{});var Oa=r(bo);_u=a(Oa,"LI",{});var kj=r(_u);td=a(kj,"A",{href:!0,rel:!0});var wj=r(td);$$=n(wj,"Just-In-Time (JIT) compilation"),wj.forEach(t),kj.forEach(t),R$=h(Oa),bu=a(Oa,"LI",{});var Fj=r(bu);od=a(Fj,"A",{href:!0,rel:!0});var $j=r(od);x$=n($j,"Automatic Differentiation"),$j.forEach(t),Fj.forEach(t),L$=h(Oa),Mu=a(Oa,"LI",{});var Rj=r(Mu);nd=a(Rj,"A",{href:!0,rel:!0});var xj=r(nd);X$=n(xj,"Vectorization"),xj.forEach(t),Rj.forEach(t),E$=h(Oa),yu=a(Oa,"LI",{});var Lj=r(yu);sd=a(Lj,"A",{href:!0,rel:!0});var Xj=r(sd);j$=n(Xj,"Parallelization"),Xj.forEach(t),Lj.forEach(t),Oa.forEach(t),C$=h(Ut),to=a(Ut,"DIV",{class:!0});var Da=r(to);T(ad.$$.fragment,Da),J$=h(Da),Bn=a(Da,"P",{});var wh=r(Bn);z$=n(wh,"The "),vu=a(wh,"CODE",{});var Ej=r(vu);U$=n(Ej,"FlaxXLMRobertaPreTrainedModel"),Ej.forEach(t),I$=n(wh," forward method, overrides the "),Tu=a(wh,"CODE",{});var jj=r(Tu);N$=n(jj,"__call__"),jj.forEach(t),q$=n(wh," special method."),wh.forEach(t),W$=h(Da),T(ga.$$.fragment,Da),Z$=h(Da),T(_a.$$.fragment,Da),Da.forEach(t),Ut.forEach(t),m_=h(l),Gn=a(l,"H2",{class:!0});var Jb=r(Gn);ba=a(Jb,"A",{id:!0,class:!0,href:!0});var Cj=r(ba);ku=a(Cj,"SPAN",{});var Jj=r(ku);T(rd.$$.fragment,Jj),Jj.forEach(t),Cj.forEach(t),A$=h(Jb),wu=a(Jb,"SPAN",{});var zj=r(wu);B$=n(zj,"FlaxXLMRobertaForCausalLM"),zj.forEach(t),Jb.forEach(t),u_=h(l),ot=a(l,"DIV",{class:!0});var It=r(ot);T(ld.$$.fragment,It),G$=h(It),Fu=a(It,"P",{});var Uj=r(Fu);S$=n(Uj,`XLM Roberta Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),Uj.forEach(t),V$=h(It),id=a(It,"P",{});var zb=r(id);P$=n(zb,"This model inherits from "),Dp=a(zb,"A",{href:!0});var Ij=r(Dp);O$=n(Ij,"FlaxPreTrainedModel"),Ij.forEach(t),D$=n(zb,`. 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)`),zb.forEach(t),Q$=h(It),dd=a(It,"P",{});var Ub=r(dd);Y$=n(Ub,"This model is also a Flax Linen "),cd=a(Ub,"A",{href:!0,rel:!0});var Nj=r(cd);H$=n(Nj,"flax.linen.Module"),Nj.forEach(t),K$=n(Ub,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Ub.forEach(t),eR=h(It),$u=a(It,"P",{});var qj=r($u);tR=n(qj,"Finally, this model supports inherent JAX features such as:"),qj.forEach(t),oR=h(It),Mo=a(It,"UL",{});var Qa=r(Mo);Ru=a(Qa,"LI",{});var Wj=r(Ru);pd=a(Wj,"A",{href:!0,rel:!0});var Zj=r(pd);nR=n(Zj,"Just-In-Time (JIT) compilation"),Zj.forEach(t),Wj.forEach(t),sR=h(Qa),xu=a(Qa,"LI",{});var Aj=r(xu);hd=a(Aj,"A",{href:!0,rel:!0});var Bj=r(hd);aR=n(Bj,"Automatic Differentiation"),Bj.forEach(t),Aj.forEach(t),rR=h(Qa),Lu=a(Qa,"LI",{});var Gj=r(Lu);md=a(Gj,"A",{href:!0,rel:!0});var Sj=r(md);lR=n(Sj,"Vectorization"),Sj.forEach(t),Gj.forEach(t),iR=h(Qa),Xu=a(Qa,"LI",{});var Vj=r(Xu);ud=a(Vj,"A",{href:!0,rel:!0});var Pj=r(ud);dR=n(Pj,"Parallelization"),Pj.forEach(t),Vj.forEach(t),Qa.forEach(t),cR=h(It),oo=a(It,"DIV",{class:!0});var Ya=r(oo);T(fd.$$.fragment,Ya),pR=h(Ya),Sn=a(Ya,"P",{});var Fh=r(Sn);hR=n(Fh,"The "),Eu=a(Fh,"CODE",{});var Oj=r(Eu);mR=n(Oj,"FlaxXLMRobertaPreTrainedModel"),Oj.forEach(t),uR=n(Fh," forward method, overrides the "),ju=a(Fh,"CODE",{});var Dj=r(ju);fR=n(Dj,"__call__"),Dj.forEach(t),gR=n(Fh," special method."),Fh.forEach(t),_R=h(Ya),T(Ma.$$.fragment,Ya),bR=h(Ya),T(ya.$$.fragment,Ya),Ya.forEach(t),It.forEach(t),f_=h(l),Vn=a(l,"H2",{class:!0});var Ib=r(Vn);va=a(Ib,"A",{id:!0,class:!0,href:!0});var Qj=r(va);Cu=a(Qj,"SPAN",{});var Yj=r(Cu);T(gd.$$.fragment,Yj),Yj.forEach(t),Qj.forEach(t),MR=h(Ib),Ju=a(Ib,"SPAN",{});var Hj=r(Ju);yR=n(Hj,"FlaxXLMRobertaForMaskedLM"),Hj.forEach(t),Ib.forEach(t),g_=h(l),nt=a(l,"DIV",{class:!0});var Nt=r(nt);T(_d.$$.fragment,Nt),vR=h(Nt),bd=a(Nt,"P",{});var Nb=r(bd);TR=n(Nb,"XLM RoBERTa Model with a "),zu=a(Nb,"CODE",{});var Kj=r(zu);kR=n(Kj,"language modeling"),Kj.forEach(t),wR=n(Nb," head on top."),Nb.forEach(t),FR=h(Nt),Md=a(Nt,"P",{});var qb=r(Md);$R=n(qb,"This model inherits from "),Qp=a(qb,"A",{href:!0});var eC=r(Qp);RR=n(eC,"FlaxPreTrainedModel"),eC.forEach(t),xR=n(qb,`. 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)`),qb.forEach(t),LR=h(Nt),yd=a(Nt,"P",{});var Wb=r(yd);XR=n(Wb,"This model is also a Flax Linen "),vd=a(Wb,"A",{href:!0,rel:!0});var tC=r(vd);ER=n(tC,"flax.linen.Module"),tC.forEach(t),jR=n(Wb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Wb.forEach(t),CR=h(Nt),Uu=a(Nt,"P",{});var oC=r(Uu);JR=n(oC,"Finally, this model supports inherent JAX features such as:"),oC.forEach(t),zR=h(Nt),yo=a(Nt,"UL",{});var Ha=r(yo);Iu=a(Ha,"LI",{});var nC=r(Iu);Td=a(nC,"A",{href:!0,rel:!0});var sC=r(Td);UR=n(sC,"Just-In-Time (JIT) compilation"),sC.forEach(t),nC.forEach(t),IR=h(Ha),Nu=a(Ha,"LI",{});var aC=r(Nu);kd=a(aC,"A",{href:!0,rel:!0});var rC=r(kd);NR=n(rC,"Automatic Differentiation"),rC.forEach(t),aC.forEach(t),qR=h(Ha),qu=a(Ha,"LI",{});var lC=r(qu);wd=a(lC,"A",{href:!0,rel:!0});var iC=r(wd);WR=n(iC,"Vectorization"),iC.forEach(t),lC.forEach(t),ZR=h(Ha),Wu=a(Ha,"LI",{});var dC=r(Wu);Fd=a(dC,"A",{href:!0,rel:!0});var cC=r(Fd);AR=n(cC,"Parallelization"),cC.forEach(t),dC.forEach(t),Ha.forEach(t),BR=h(Nt),no=a(Nt,"DIV",{class:!0});var Ka=r(no);T($d.$$.fragment,Ka),GR=h(Ka),Pn=a(Ka,"P",{});var $h=r(Pn);SR=n($h,"The "),Zu=a($h,"CODE",{});var pC=r(Zu);VR=n(pC,"FlaxXLMRobertaPreTrainedModel"),pC.forEach(t),PR=n($h," forward method, overrides the "),Au=a($h,"CODE",{});var hC=r(Au);OR=n(hC,"__call__"),hC.forEach(t),DR=n($h," special method."),$h.forEach(t),QR=h(Ka),T(Ta.$$.fragment,Ka),YR=h(Ka),T(ka.$$.fragment,Ka),Ka.forEach(t),Nt.forEach(t),__=h(l),On=a(l,"H2",{class:!0});var Zb=r(On);wa=a(Zb,"A",{id:!0,class:!0,href:!0});var mC=r(wa);Bu=a(mC,"SPAN",{});var uC=r(Bu);T(Rd.$$.fragment,uC),uC.forEach(t),mC.forEach(t),HR=h(Zb),Gu=a(Zb,"SPAN",{});var fC=r(Gu);KR=n(fC,"FlaxXLMRobertaForSequenceClassification"),fC.forEach(t),Zb.forEach(t),b_=h(l),st=a(l,"DIV",{class:!0});var qt=r(st);T(xd.$$.fragment,qt),ex=h(qt),Su=a(qt,"P",{});var gC=r(Su);tx=n(gC,`XLM Roberta Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),gC.forEach(t),ox=h(qt),Ld=a(qt,"P",{});var Ab=r(Ld);nx=n(Ab,"This model inherits from "),Yp=a(Ab,"A",{href:!0});var _C=r(Yp);sx=n(_C,"FlaxPreTrainedModel"),_C.forEach(t),ax=n(Ab,`. 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)`),Ab.forEach(t),rx=h(qt),Xd=a(qt,"P",{});var Bb=r(Xd);lx=n(Bb,"This model is also a Flax Linen "),Ed=a(Bb,"A",{href:!0,rel:!0});var bC=r(Ed);ix=n(bC,"flax.linen.Module"),bC.forEach(t),dx=n(Bb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Bb.forEach(t),cx=h(qt),Vu=a(qt,"P",{});var MC=r(Vu);px=n(MC,"Finally, this model supports inherent JAX features such as:"),MC.forEach(t),hx=h(qt),vo=a(qt,"UL",{});var er=r(vo);Pu=a(er,"LI",{});var yC=r(Pu);jd=a(yC,"A",{href:!0,rel:!0});var vC=r(jd);mx=n(vC,"Just-In-Time (JIT) compilation"),vC.forEach(t),yC.forEach(t),ux=h(er),Ou=a(er,"LI",{});var TC=r(Ou);Cd=a(TC,"A",{href:!0,rel:!0});var kC=r(Cd);fx=n(kC,"Automatic Differentiation"),kC.forEach(t),TC.forEach(t),gx=h(er),Du=a(er,"LI",{});var wC=r(Du);Jd=a(wC,"A",{href:!0,rel:!0});var FC=r(Jd);_x=n(FC,"Vectorization"),FC.forEach(t),wC.forEach(t),bx=h(er),Qu=a(er,"LI",{});var $C=r(Qu);zd=a($C,"A",{href:!0,rel:!0});var RC=r(zd);Mx=n(RC,"Parallelization"),RC.forEach(t),$C.forEach(t),er.forEach(t),yx=h(qt),so=a(qt,"DIV",{class:!0});var tr=r(so);T(Ud.$$.fragment,tr),vx=h(tr),Dn=a(tr,"P",{});var Rh=r(Dn);Tx=n(Rh,"The "),Yu=a(Rh,"CODE",{});var xC=r(Yu);kx=n(xC,"FlaxXLMRobertaPreTrainedModel"),xC.forEach(t),wx=n(Rh," forward method, overrides the "),Hu=a(Rh,"CODE",{});var LC=r(Hu);Fx=n(LC,"__call__"),LC.forEach(t),$x=n(Rh," special method."),Rh.forEach(t),Rx=h(tr),T(Fa.$$.fragment,tr),xx=h(tr),T($a.$$.fragment,tr),tr.forEach(t),qt.forEach(t),M_=h(l),Qn=a(l,"H2",{class:!0});var Gb=r(Qn);Ra=a(Gb,"A",{id:!0,class:!0,href:!0});var XC=r(Ra);Ku=a(XC,"SPAN",{});var EC=r(Ku);T(Id.$$.fragment,EC),EC.forEach(t),XC.forEach(t),Lx=h(Gb),ef=a(Gb,"SPAN",{});var jC=r(ef);Xx=n(jC,"FlaxXLMRobertaForMultipleChoice"),jC.forEach(t),Gb.forEach(t),y_=h(l),at=a(l,"DIV",{class:!0});var Wt=r(at);T(Nd.$$.fragment,Wt),Ex=h(Wt),tf=a(Wt,"P",{});var CC=r(tf);jx=n(CC,`XLM Roberta 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.`),CC.forEach(t),Cx=h(Wt),qd=a(Wt,"P",{});var Sb=r(qd);Jx=n(Sb,"This model inherits from "),Hp=a(Sb,"A",{href:!0});var JC=r(Hp);zx=n(JC,"FlaxPreTrainedModel"),JC.forEach(t),Ux=n(Sb,`. 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)`),Sb.forEach(t),Ix=h(Wt),Wd=a(Wt,"P",{});var Vb=r(Wd);Nx=n(Vb,"This model is also a Flax Linen "),Zd=a(Vb,"A",{href:!0,rel:!0});var zC=r(Zd);qx=n(zC,"flax.linen.Module"),zC.forEach(t),Wx=n(Vb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Vb.forEach(t),Zx=h(Wt),of=a(Wt,"P",{});var UC=r(of);Ax=n(UC,"Finally, this model supports inherent JAX features such as:"),UC.forEach(t),Bx=h(Wt),To=a(Wt,"UL",{});var or=r(To);nf=a(or,"LI",{});var IC=r(nf);Ad=a(IC,"A",{href:!0,rel:!0});var NC=r(Ad);Gx=n(NC,"Just-In-Time (JIT) compilation"),NC.forEach(t),IC.forEach(t),Sx=h(or),sf=a(or,"LI",{});var qC=r(sf);Bd=a(qC,"A",{href:!0,rel:!0});var WC=r(Bd);Vx=n(WC,"Automatic Differentiation"),WC.forEach(t),qC.forEach(t),Px=h(or),af=a(or,"LI",{});var ZC=r(af);Gd=a(ZC,"A",{href:!0,rel:!0});var AC=r(Gd);Ox=n(AC,"Vectorization"),AC.forEach(t),ZC.forEach(t),Dx=h(or),rf=a(or,"LI",{});var BC=r(rf);Sd=a(BC,"A",{href:!0,rel:!0});var GC=r(Sd);Qx=n(GC,"Parallelization"),GC.forEach(t),BC.forEach(t),or.forEach(t),Yx=h(Wt),ao=a(Wt,"DIV",{class:!0});var nr=r(ao);T(Vd.$$.fragment,nr),Hx=h(nr),Yn=a(nr,"P",{});var xh=r(Yn);Kx=n(xh,"The "),lf=a(xh,"CODE",{});var SC=r(lf);eL=n(SC,"FlaxXLMRobertaPreTrainedModel"),SC.forEach(t),tL=n(xh," forward method, overrides the "),df=a(xh,"CODE",{});var VC=r(df);oL=n(VC,"__call__"),VC.forEach(t),nL=n(xh," special method."),xh.forEach(t),sL=h(nr),T(xa.$$.fragment,nr),aL=h(nr),T(La.$$.fragment,nr),nr.forEach(t),Wt.forEach(t),v_=h(l),Hn=a(l,"H2",{class:!0});var Pb=r(Hn);Xa=a(Pb,"A",{id:!0,class:!0,href:!0});var PC=r(Xa);cf=a(PC,"SPAN",{});var OC=r(cf);T(Pd.$$.fragment,OC),OC.forEach(t),PC.forEach(t),rL=h(Pb),pf=a(Pb,"SPAN",{});var DC=r(pf);lL=n(DC,"FlaxXLMRobertaForTokenClassification"),DC.forEach(t),Pb.forEach(t),T_=h(l),rt=a(l,"DIV",{class:!0});var Zt=r(rt);T(Od.$$.fragment,Zt),iL=h(Zt),hf=a(Zt,"P",{});var QC=r(hf);dL=n(QC,`XLM Roberta 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.`),QC.forEach(t),cL=h(Zt),Dd=a(Zt,"P",{});var Ob=r(Dd);pL=n(Ob,"This model inherits from "),Kp=a(Ob,"A",{href:!0});var YC=r(Kp);hL=n(YC,"FlaxPreTrainedModel"),YC.forEach(t),mL=n(Ob,`. 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)`),Ob.forEach(t),uL=h(Zt),Qd=a(Zt,"P",{});var Db=r(Qd);fL=n(Db,"This model is also a Flax Linen "),Yd=a(Db,"A",{href:!0,rel:!0});var HC=r(Yd);gL=n(HC,"flax.linen.Module"),HC.forEach(t),_L=n(Db,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Db.forEach(t),bL=h(Zt),mf=a(Zt,"P",{});var KC=r(mf);ML=n(KC,"Finally, this model supports inherent JAX features such as:"),KC.forEach(t),yL=h(Zt),ko=a(Zt,"UL",{});var sr=r(ko);uf=a(sr,"LI",{});var eJ=r(uf);Hd=a(eJ,"A",{href:!0,rel:!0});var tJ=r(Hd);vL=n(tJ,"Just-In-Time (JIT) compilation"),tJ.forEach(t),eJ.forEach(t),TL=h(sr),ff=a(sr,"LI",{});var oJ=r(ff);Kd=a(oJ,"A",{href:!0,rel:!0});var nJ=r(Kd);kL=n(nJ,"Automatic Differentiation"),nJ.forEach(t),oJ.forEach(t),wL=h(sr),gf=a(sr,"LI",{});var sJ=r(gf);ec=a(sJ,"A",{href:!0,rel:!0});var aJ=r(ec);FL=n(aJ,"Vectorization"),aJ.forEach(t),sJ.forEach(t),$L=h(sr),_f=a(sr,"LI",{});var rJ=r(_f);tc=a(rJ,"A",{href:!0,rel:!0});var lJ=r(tc);RL=n(lJ,"Parallelization"),lJ.forEach(t),rJ.forEach(t),sr.forEach(t),xL=h(Zt),ro=a(Zt,"DIV",{class:!0});var ar=r(ro);T(oc.$$.fragment,ar),LL=h(ar),Kn=a(ar,"P",{});var Lh=r(Kn);XL=n(Lh,"The "),bf=a(Lh,"CODE",{});var iJ=r(bf);EL=n(iJ,"FlaxXLMRobertaPreTrainedModel"),iJ.forEach(t),jL=n(Lh," forward method, overrides the "),Mf=a(Lh,"CODE",{});var dJ=r(Mf);CL=n(dJ,"__call__"),dJ.forEach(t),JL=n(Lh," special method."),Lh.forEach(t),zL=h(ar),T(Ea.$$.fragment,ar),UL=h(ar),T(ja.$$.fragment,ar),ar.forEach(t),Zt.forEach(t),k_=h(l),es=a(l,"H2",{class:!0});var Qb=r(es);Ca=a(Qb,"A",{id:!0,class:!0,href:!0});var cJ=r(Ca);yf=a(cJ,"SPAN",{});var pJ=r(yf);T(nc.$$.fragment,pJ),pJ.forEach(t),cJ.forEach(t),IL=h(Qb),vf=a(Qb,"SPAN",{});var hJ=r(vf);NL=n(hJ,"FlaxXLMRobertaForQuestionAnswering"),hJ.forEach(t),Qb.forEach(t),w_=h(l),lt=a(l,"DIV",{class:!0});var At=r(lt);T(sc.$$.fragment,At),qL=h(At),ts=a(At,"P",{});var Xh=r(ts);WL=n(Xh,`XLM Roberta 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 `),Tf=a(Xh,"CODE",{});var mJ=r(Tf);ZL=n(mJ,"span start logits"),mJ.forEach(t),AL=n(Xh," and "),kf=a(Xh,"CODE",{});var uJ=r(kf);BL=n(uJ,"span end logits"),uJ.forEach(t),GL=n(Xh,")."),Xh.forEach(t),SL=h(At),ac=a(At,"P",{});var Yb=r(ac);VL=n(Yb,"This model inherits from "),eh=a(Yb,"A",{href:!0});var fJ=r(eh);PL=n(fJ,"FlaxPreTrainedModel"),fJ.forEach(t),OL=n(Yb,`. 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)`),Yb.forEach(t),DL=h(At),rc=a(At,"P",{});var Hb=r(rc);QL=n(Hb,"This model is also a Flax Linen "),lc=a(Hb,"A",{href:!0,rel:!0});var gJ=r(lc);YL=n(gJ,"flax.linen.Module"),gJ.forEach(t),HL=n(Hb,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Hb.forEach(t),KL=h(At),wf=a(At,"P",{});var _J=r(wf);eX=n(_J,"Finally, this model supports inherent JAX features such as:"),_J.forEach(t),tX=h(At),wo=a(At,"UL",{});var rr=r(wo);Ff=a(rr,"LI",{});var bJ=r(Ff);ic=a(bJ,"A",{href:!0,rel:!0});var MJ=r(ic);oX=n(MJ,"Just-In-Time (JIT) compilation"),MJ.forEach(t),bJ.forEach(t),nX=h(rr),$f=a(rr,"LI",{});var yJ=r($f);dc=a(yJ,"A",{href:!0,rel:!0});var vJ=r(dc);sX=n(vJ,"Automatic Differentiation"),vJ.forEach(t),yJ.forEach(t),aX=h(rr),Rf=a(rr,"LI",{});var TJ=r(Rf);cc=a(TJ,"A",{href:!0,rel:!0});var kJ=r(cc);rX=n(kJ,"Vectorization"),kJ.forEach(t),TJ.forEach(t),lX=h(rr),xf=a(rr,"LI",{});var wJ=r(xf);pc=a(wJ,"A",{href:!0,rel:!0});var FJ=r(pc);iX=n(FJ,"Parallelization"),FJ.forEach(t),wJ.forEach(t),rr.forEach(t),dX=h(At),lo=a(At,"DIV",{class:!0});var lr=r(lo);T(hc.$$.fragment,lr),cX=h(lr),os=a(lr,"P",{});var Eh=r(os);pX=n(Eh,"The "),Lf=a(Eh,"CODE",{});var $J=r(Lf);hX=n($J,"FlaxXLMRobertaPreTrainedModel"),$J.forEach(t),mX=n(Eh," forward method, overrides the "),Xf=a(Eh,"CODE",{});var RJ=r(Xf);uX=n(RJ,"__call__"),RJ.forEach(t),fX=n(Eh," special method."),Eh.forEach(t),gX=h(lr),T(Ja.$$.fragment,lr),_X=h(lr),T(za.$$.fragment,lr),lr.forEach(t),At.forEach(t),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(Uz)),c(f,"id","xlmroberta"),c(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(f,"href","#xlmroberta"),c(u,"class","relative group"),c(te,"alt","Models"),xJ(te.src,R="https://img.shields.io/badge/All_model_pages-xlm--roberta-blueviolet")||c(te,"src",R),c(ce,"href","https://huggingface.co/models?filter=xlm-roberta"),c(pe,"alt","Spaces"),xJ(pe.src,Ce="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||c(pe,"src",Ce),c(B,"href","https://huggingface.co/spaces/docs-demos/xlm-roberta-base"),c(q,"class","flex flex-wrap space-x-1"),c(re,"id","overview"),c(re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(re,"href","#overview"),c(ae,"class","relative group"),c(ie,"href","https://arxiv.org/abs/1911.02116"),c(ie,"rel","nofollow"),c(U,"href","roberta"),c(K,"href","https://huggingface.co/stefan-it"),c(K,"rel","nofollow"),c(E,"href","https://github.com/pytorch/fairseq/tree/master/examples/xlmr"),c(E,"rel","nofollow"),c(ze,"id","resources"),c(ze,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ze,"href","#resources"),c(Je,"class","relative group"),c(ir,"href","https://www.philschmid.de/habana-distributed-training"),c(ir,"rel","nofollow"),c(Xc,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaForSequenceClassification"),c(dr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/text-classification"),c(dr,"rel","nofollow"),c(cr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification.ipynb"),c(cr,"rel","nofollow"),c(Ec,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.TFXLMRobertaForSequenceClassification"),c(pr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/text-classification"),c(pr,"rel","nofollow"),c(hr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification-tf.ipynb"),c(hr,"rel","nofollow"),c(jc,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.FlaxXLMRobertaForSequenceClassification"),c(mr,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/text-classification"),c(mr,"rel","nofollow"),c(ur,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/text_classification_flax.ipynb"),c(ur,"rel","nofollow"),c(fr,"href","https://huggingface.co/docs/transformers/tasks/sequence_classification"),c(fr,"rel","nofollow"),c(Jc,"href","../tasks/sequence_classification"),c(zc,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaForTokenClassification"),c(_r,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/token-classification"),c(_r,"rel","nofollow"),c(br,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification.ipynb"),c(br,"rel","nofollow"),c(Uc,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.TFXLMRobertaForTokenClassification"),c(Mr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/token-classification"),c(Mr,"rel","nofollow"),c(yr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/token_classification-tf.ipynb"),c(yr,"rel","nofollow"),c(Ic,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.FlaxXLMRobertaForTokenClassification"),c(vr,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/token-classification"),c(vr,"rel","nofollow"),c(Tr,"href","https://huggingface.co/course/chapter7/2?fw=pt"),c(Tr,"rel","nofollow"),c(qc,"href","../tasks/token_classification"),c(Wc,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaForCausalLM"),c(wr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling"),c(wr,"rel","nofollow"),c(Fr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb"),c(Fr,"rel","nofollow"),c($r,"href","https://huggingface.co/docs/transformers/tasks/language_modeling"),c($r,"rel","nofollow"),c(Ac,"href","../tasks/language_modeling"),c(Bc,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaForMaskedLM"),c(xr,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/language-modeling#robertabertdistilbert-and-masked-language-modeling"),c(xr,"rel","nofollow"),c(Lr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling.ipynb"),c(Lr,"rel","nofollow"),c(Gc,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.TFXLMRobertaForMaskedLM"),c(Xr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/language-modeling#run_mlmpy"),c(Xr,"rel","nofollow"),c(Er,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/language_modeling-tf.ipynb"),c(Er,"rel","nofollow"),c(Sc,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.FlaxXLMRobertaForMaskedLM"),c(jr,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/language-modeling#masked-language-modeling"),c(jr,"rel","nofollow"),c(Cr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/masked_language_modeling_flax.ipynb"),c(Cr,"rel","nofollow"),c(Jr,"href","https://huggingface.co/course/chapter7/3?fw=pt"),c(Jr,"rel","nofollow"),c(Pc,"href","../tasks/masked_language_modeling"),c(Oc,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaForQuestionAnswering"),c(Ur,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/question-answering"),c(Ur,"rel","nofollow"),c(Ir,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering.ipynb"),c(Ir,"rel","nofollow"),c(Dc,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.TFXLMRobertaForQuestionAnswering"),c(Nr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/question-answering"),c(Nr,"rel","nofollow"),c(qr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/question_answering-tf.ipynb"),c(qr,"rel","nofollow"),c(Qc,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.FlaxXLMRobertaForQuestionAnswering"),c(Wr,"href","https://github.com/huggingface/transformers/tree/main/examples/flax/question-answering"),c(Wr,"rel","nofollow"),c(Zr,"href","https://huggingface.co/course/chapter7/7?fw=pt"),c(Zr,"rel","nofollow"),c(Hc,"href","../tasks/question_answering"),c(ep,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaForMultipleChoice"),c(Ar,"href","https://github.com/huggingface/transformers/tree/main/examples/pytorch/multiple-choice"),c(Ar,"rel","nofollow"),c(Br,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice.ipynb"),c(Br,"rel","nofollow"),c(tp,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.TFXLMRobertaForMultipleChoice"),c(Gr,"href","https://github.com/huggingface/transformers/tree/main/examples/tensorflow/multiple-choice"),c(Gr,"rel","nofollow"),c(Sr,"href","https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/multiple_choice-tf.ipynb"),c(Sr,"rel","nofollow"),c(op,"href","../tasks/multiple_choice"),c(Pr,"href","https://www.philschmid.de/multilingual-serverless-xlm-roberta-with-huggingface"),c(Pr,"rel","nofollow"),c(ls,"id","transformers.XLMRobertaConfig"),c(ls,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ls,"href","#transformers.XLMRobertaConfig"),c(ln,"class","relative group"),c(ap,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaModel"),c(rp,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.TFXLMRobertaModel"),c(Qr,"href","https://huggingface.co/xlm-roberta-base"),c(Qr,"rel","nofollow"),c(lp,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(ip,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ds,"id","transformers.XLMRobertaTokenizer"),c(ds,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ds,"href","#transformers.XLMRobertaTokenizer"),c(cn,"class","relative group"),c(dp,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaTokenizer"),c(cp,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.XLNetTokenizer"),c(Kr,"href","https://github.com/google/sentencepiece"),c(Kr,"rel","nofollow"),c(pp,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),c(Wo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(cs,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ps,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(up,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(hs,"id","transformers.XLMRobertaTokenizerFast"),c(hs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(hs,"href","#transformers.XLMRobertaTokenizerFast"),c(pn,"class","relative group"),c(fp,"href","/docs/transformers/v4.30.0/en/model_doc/roberta#transformers.RobertaTokenizer"),c(gp,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.XLNetTokenizer"),c(dl,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=BPE#models"),c(dl,"rel","nofollow"),c(_p,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),c(Zo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ms,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(us,"id","transformers.XLMRobertaModel"),c(us,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(us,"href","#transformers.XLMRobertaModel"),c(hn,"class","relative group"),c(yp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),c(bl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(bl,"rel","nofollow"),c(yl,"href","https://arxiv.org/abs/1706.03762"),c(yl,"rel","nofollow"),c(vp,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaModel"),c(Vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(bs,"id","transformers.XLMRobertaForCausalLM"),c(bs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(bs,"href","#transformers.XLMRobertaForCausalLM"),c(un,"class","relative group"),c(Tp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),c(Rl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Rl,"rel","nofollow"),c(kp,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaForCausalLM"),c(Pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(vs,"id","transformers.XLMRobertaForMaskedLM"),c(vs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(vs,"href","#transformers.XLMRobertaForMaskedLM"),c(gn,"class","relative group"),c(wp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),c(Jl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Jl,"rel","nofollow"),c(Fp,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaForMaskedLM"),c(Ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ws,"id","transformers.XLMRobertaForSequenceClassification"),c(ws,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ws,"href","#transformers.XLMRobertaForSequenceClassification"),c(bn,"class","relative group"),c($p,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),c(Wl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Wl,"rel","nofollow"),c(Rp,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaForSequenceClassification"),c(Lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(xs,"id","transformers.XLMRobertaForMultipleChoice"),c(xs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(xs,"href","#transformers.XLMRobertaForMultipleChoice"),c(yn,"class","relative group"),c(xp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),c(Vl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Vl,"rel","nofollow"),c(Lp,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaForMultipleChoice"),c(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Es,"id","transformers.XLMRobertaForTokenClassification"),c(Es,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Es,"href","#transformers.XLMRobertaForTokenClassification"),c(Tn,"class","relative group"),c(Xp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),c(Hl,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Hl,"rel","nofollow"),c(Ep,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaForTokenClassification"),c(Qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Js,"id","transformers.XLMRobertaForQuestionAnswering"),c(Js,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Js,"href","#transformers.XLMRobertaForQuestionAnswering"),c(wn,"class","relative group"),c(jp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),c(si,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(si,"rel","nofollow"),c(Cp,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.XLMRobertaForQuestionAnswering"),c(Yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Is,"id","transformers.TFXLMRobertaModel"),c(Is,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Is,"href","#transformers.TFXLMRobertaModel"),c(Rn,"class","relative group"),c(Jp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(ci,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(ci,"rel","nofollow"),c(zp,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.TFXLMRobertaModel"),c(Ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Zs,"id","transformers.TFXLMRobertaForCausalLM"),c(Zs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Zs,"href","#transformers.TFXLMRobertaForCausalLM"),c(Ln,"class","relative group"),c(Up,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(_i,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(_i,"rel","nofollow"),c(Ip,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.TFXLMRobertaForCausalLM"),c(Kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ss,"id","transformers.TFXLMRobertaForMaskedLM"),c(Ss,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ss,"href","#transformers.TFXLMRobertaForMaskedLM"),c(En,"class","relative group"),c(Np,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(wi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(wi,"rel","nofollow"),c(qp,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.TFXLMRobertaForMaskedLM"),c(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Qs,"id","transformers.TFXLMRobertaForSequenceClassification"),c(Qs,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Qs,"href","#transformers.TFXLMRobertaForSequenceClassification"),c(Cn,"class","relative group"),c(Wp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(Xi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Xi,"rel","nofollow"),c(Zp,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.TFXLMRobertaForSequenceClassification"),c(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ta,"id","transformers.TFXLMRobertaForMultipleChoice"),c(ta,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ta,"href","#transformers.TFXLMRobertaForMultipleChoice"),c(zn,"class","relative group"),c(Ap,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(Ui,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Ui,"rel","nofollow"),c(Bp,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.TFXLMRobertaForMultipleChoice"),c(eo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(aa,"id","transformers.TFXLMRobertaForTokenClassification"),c(aa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(aa,"href","#transformers.TFXLMRobertaForTokenClassification"),c(In,"class","relative group"),c(Gp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(Ai,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Ai,"rel","nofollow"),c(Sp,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.TFXLMRobertaForTokenClassification"),c(jt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ca,"id","transformers.TFXLMRobertaForQuestionAnswering"),c(ca,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ca,"href","#transformers.TFXLMRobertaForQuestionAnswering"),c(qn,"class","relative group"),c(Vp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),c(Oi,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),c(Oi,"rel","nofollow"),c(Pp,"href","/docs/transformers/v4.30.0/en/model_doc/xlm-roberta#transformers.TFXLMRobertaForQuestionAnswering"),c(Ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(fa,"id","transformers.FlaxXLMRobertaModel"),c(fa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(fa,"href","#transformers.FlaxXLMRobertaModel"),c(An,"class","relative group"),c(Op,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(ed,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(ed,"rel","nofollow"),c(td,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(td,"rel","nofollow"),c(od,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(od,"rel","nofollow"),c(nd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(nd,"rel","nofollow"),c(sd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(sd,"rel","nofollow"),c(to,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ba,"id","transformers.FlaxXLMRobertaForCausalLM"),c(ba,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ba,"href","#transformers.FlaxXLMRobertaForCausalLM"),c(Gn,"class","relative group"),c(Dp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(cd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(cd,"rel","nofollow"),c(pd,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(pd,"rel","nofollow"),c(hd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(hd,"rel","nofollow"),c(md,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(md,"rel","nofollow"),c(ud,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(ud,"rel","nofollow"),c(oo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(va,"id","transformers.FlaxXLMRobertaForMaskedLM"),c(va,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(va,"href","#transformers.FlaxXLMRobertaForMaskedLM"),c(Vn,"class","relative group"),c(Qp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(vd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(vd,"rel","nofollow"),c(Td,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Td,"rel","nofollow"),c(kd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(kd,"rel","nofollow"),c(wd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(wd,"rel","nofollow"),c(Fd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(Fd,"rel","nofollow"),c(no,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(wa,"id","transformers.FlaxXLMRobertaForSequenceClassification"),c(wa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(wa,"href","#transformers.FlaxXLMRobertaForSequenceClassification"),c(On,"class","relative group"),c(Yp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Ed,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(Ed,"rel","nofollow"),c(jd,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(jd,"rel","nofollow"),c(Cd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Cd,"rel","nofollow"),c(Jd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Jd,"rel","nofollow"),c(zd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(zd,"rel","nofollow"),c(so,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ra,"id","transformers.FlaxXLMRobertaForMultipleChoice"),c(Ra,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ra,"href","#transformers.FlaxXLMRobertaForMultipleChoice"),c(Qn,"class","relative group"),c(Hp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Zd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(Zd,"rel","nofollow"),c(Ad,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Ad,"rel","nofollow"),c(Bd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Bd,"rel","nofollow"),c(Gd,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Gd,"rel","nofollow"),c(Sd,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(Sd,"rel","nofollow"),c(ao,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Xa,"id","transformers.FlaxXLMRobertaForTokenClassification"),c(Xa,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Xa,"href","#transformers.FlaxXLMRobertaForTokenClassification"),c(Hn,"class","relative group"),c(Kp,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Yd,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(Yd,"rel","nofollow"),c(Hd,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Hd,"rel","nofollow"),c(Kd,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Kd,"rel","nofollow"),c(ec,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(ec,"rel","nofollow"),c(tc,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(tc,"rel","nofollow"),c(ro,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ca,"id","transformers.FlaxXLMRobertaForQuestionAnswering"),c(Ca,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ca,"href","#transformers.FlaxXLMRobertaForQuestionAnswering"),c(es,"class","relative group"),c(eh,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(lc,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(lc,"rel","nofollow"),c(ic,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(ic,"rel","nofollow"),c(dc,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(dc,"rel","nofollow"),c(cc,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(cc,"rel","nofollow"),c(pc,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(pc,"rel","nofollow"),c(lo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(l,_){e(document.head,d),g(l,M,_),g(l,u,_),e(u,f),e(f,b),k(i,b,null),e(u,m),e(u,X),e(X,Me),g(l,fe,_),g(l,q,_),e(q,ce),e(ce,te),e(q,ye),e(q,B),e(B,pe),g(l,O,_),g(l,ae,_),e(ae,re),e(re,G),k(le,G,null),e(ae,ve),e(ae,S),e(S,Te),g(l,ge,_),g(l,Z,_),e(Z,ke),e(Z,ie),e(ie,oe),e(Z,j),g(l,z,_),g(l,he,_),e(he,Q),g(l,_e,_),g(l,me,_),e(me,V),e(V,we),g(l,be,_),g(l,J,_),e(J,Fe),g(l,D,_),g(l,ne,_),e(ne,de),e(de,Y),e(de,ue),e(ue,$e),e(de,N),e(ne,Re),e(ne,P),e(P,xe),e(ne,se),e(ne,C),e(C,Le),e(C,U),e(U,Xe),e(C,Ee),g(l,y,_),g(l,x,_),e(x,Pe),e(x,K),e(K,Oe),e(x,De),e(x,E),e(E,Qe),e(x,Ye),g(l,Be,_),g(l,Je,_),e(Je,ze),e(ze,I),k(A,I,null),e(Je,He),e(Je,Ae),e(Ae,H),g(l,Ge,_),g(l,Ie,_),e(Ie,je),g(l,Se,_),k(ee,l,_),g(l,Ve,_),g(l,gt,_),e(gt,Lc),e(Lc,Kb),e(Lc,ir),e(ir,eM),e(gt,tM),e(gt,Fo),e(Fo,Xc),e(Xc,oM),e(Fo,nM),e(Fo,dr),e(dr,sM),e(Fo,aM),e(Fo,cr),e(cr,rM),e(Fo,lM),e(gt,iM),e(gt,$o),e($o,Ec),e(Ec,dM),e($o,cM),e($o,pr),e(pr,pM),e($o,hM),e($o,hr),e(hr,mM),e($o,uM),e(gt,fM),e(gt,Ro),e(Ro,jc),e(jc,gM),e(Ro,_M),e(Ro,mr),e(mr,bM),e(Ro,MM),e(Ro,ur),e(ur,yM),e(Ro,vM),e(gt,TM),e(gt,Cc),e(Cc,fr),e(fr,kM),e(Cc,wM),e(gt,FM),e(gt,jh),e(jh,Jc),e(Jc,$M),g(l,Mg,_),k(gr,l,_),g(l,yg,_),g(l,$t,_),e($t,xo),e(xo,zc),e(zc,RM),e(xo,xM),e(xo,_r),e(_r,LM),e(xo,XM),e(xo,br),e(br,EM),e(xo,jM),e($t,CM),e($t,Lo),e(Lo,Uc),e(Uc,JM),e(Lo,zM),e(Lo,Mr),e(Mr,UM),e(Lo,IM),e(Lo,yr),e(yr,NM),e(Lo,qM),e($t,WM),e($t,as),e(as,Ic),e(Ic,ZM),e(as,AM),e(as,vr),e(vr,BM),e(as,GM),e($t,SM),e($t,Nc),e(Nc,Tr),e(Tr,VM),e(Nc,PM),e($t,OM),e($t,Ch),e(Ch,qc),e(qc,DM),g(l,vg,_),k(kr,l,_),g(l,Tg,_),g(l,Xo,_),e(Xo,Eo),e(Eo,Wc),e(Wc,QM),e(Eo,YM),e(Eo,wr),e(wr,HM),e(Eo,KM),e(Eo,Fr),e(Fr,ey),e(Eo,ty),e(Xo,oy),e(Xo,Zc),e(Zc,$r),e($r,ny),e(Zc,sy),e(Xo,ay),e(Xo,Jh),e(Jh,Ac),e(Ac,ry),g(l,kg,_),k(Rr,l,_),g(l,wg,_),g(l,Rt,_),e(Rt,jo),e(jo,Bc),e(Bc,ly),e(jo,iy),e(jo,xr),e(xr,dy),e(jo,cy),e(jo,Lr),e(Lr,py),e(jo,hy),e(Rt,my),e(Rt,Co),e(Co,Gc),e(Gc,uy),e(Co,fy),e(Co,Xr),e(Xr,gy),e(Co,_y),e(Co,Er),e(Er,by),e(Co,My),e(Rt,yy),e(Rt,Jo),e(Jo,Sc),e(Sc,vy),e(Jo,Ty),e(Jo,jr),e(jr,ky),e(Jo,wy),e(Jo,Cr),e(Cr,Fy),e(Jo,$y),e(Rt,Ry),e(Rt,Vc),e(Vc,Jr),e(Jr,xy),e(Vc,Ly),e(Rt,Xy),e(Rt,zh),e(zh,Pc),e(Pc,Ey),g(l,Fg,_),k(zr,l,_),g(l,$g,_),g(l,xt,_),e(xt,zo),e(zo,Oc),e(Oc,jy),e(zo,Cy),e(zo,Ur),e(Ur,Jy),e(zo,zy),e(zo,Ir),e(Ir,Uy),e(zo,Iy),e(xt,Ny),e(xt,Uo),e(Uo,Dc),e(Dc,qy),e(Uo,Wy),e(Uo,Nr),e(Nr,Zy),e(Uo,Ay),e(Uo,qr),e(qr,By),e(Uo,Gy),e(xt,Sy),e(xt,rs),e(rs,Qc),e(Qc,Vy),e(rs,Py),e(rs,Wr),e(Wr,Oy),e(rs,Dy),e(xt,Qy),e(xt,Yc),e(Yc,Zr),e(Zr,Yy),e(Yc,Hy),e(xt,Ky),e(xt,Uh),e(Uh,Hc),e(Hc,ev),g(l,Rg,_),g(l,Kc,_),e(Kc,Ih),e(Ih,tv),g(l,xg,_),g(l,Io,_),e(Io,No),e(No,ep),e(ep,ov),e(No,nv),e(No,Ar),e(Ar,sv),e(No,av),e(No,Br),e(Br,rv),e(No,lv),e(Io,iv),e(Io,qo),e(qo,tp),e(tp,dv),e(qo,cv),e(qo,Gr),e(Gr,pv),e(qo,hv),e(qo,Sr),e(Sr,mv),e(qo,uv),e(Io,fv),e(Io,Nh),e(Nh,op),e(op,gv),g(l,Lg,_),g(l,np,_),e(np,_v),g(l,Xg,_),g(l,sp,_),e(sp,Vr),e(Vr,bv),e(Vr,Pr),e(Pr,Mv),e(Vr,yv),g(l,Eg,_),g(l,ln,_),e(ln,ls),e(ls,qh),k(Or,qh,null),e(ln,vv),e(ln,Wh),e(Wh,Tv),g(l,jg,_),g(l,Bt,_),k(Dr,Bt,null),e(Bt,kv),e(Bt,go),e(go,wv),e(go,ap),e(ap,Fv),e(go,$v),e(go,rp),e(rp,Rv),e(go,xv),e(go,Qr),e(Qr,Lv),e(go,Xv),e(Bt,Ev),e(Bt,dn),e(dn,jv),e(dn,lp),e(lp,Cv),e(dn,Jv),e(dn,ip),e(ip,zv),e(dn,Uv),e(Bt,Iv),k(is,Bt,null),g(l,Cg,_),g(l,cn,_),e(cn,ds),e(ds,Zh),k(Yr,Zh,null),e(cn,Nv),e(cn,Ah),e(Ah,qv),g(l,Jg,_),g(l,et,_),k(Hr,et,null),e(et,Wv),e(et,_o),e(_o,Zv),e(_o,dp),e(dp,Av),e(_o,Bv),e(_o,cp),e(cp,Gv),e(_o,Sv),e(_o,Kr),e(Kr,Vv),e(_o,Pv),e(et,Ov),e(et,el),e(el,Dv),e(el,pp),e(pp,Qv),e(el,Yv),e(et,Hv),e(et,Wo),k(tl,Wo,null),e(Wo,Kv),e(Wo,Bh),e(Bh,eT),e(Wo,tT),e(Wo,ol),e(ol,hp),e(hp,oT),e(hp,Gh),e(Gh,nT),e(ol,sT),e(ol,mp),e(mp,aT),e(mp,Sh),e(Sh,rT),e(et,lT),e(et,cs),k(nl,cs,null),e(cs,iT),e(cs,sl),e(sl,dT),e(sl,Vh),e(Vh,cT),e(sl,pT),e(et,hT),e(et,ps),k(al,ps,null),e(ps,mT),e(ps,Ph),e(Ph,uT),e(et,fT),e(et,up),k(rl,up,null),g(l,zg,_),g(l,pn,_),e(pn,hs),e(hs,Oh),k(ll,Oh,null),e(pn,gT),e(pn,Dh),e(Dh,_T),g(l,Ug,_),g(l,bt,_),k(il,bt,null),e(bt,bT),e(bt,Gt),e(Gt,MT),e(Gt,Qh),e(Qh,yT),e(Gt,vT),e(Gt,fp),e(fp,TT),e(Gt,kT),e(Gt,gp),e(gp,wT),e(Gt,FT),e(Gt,dl),e(dl,$T),e(Gt,RT),e(bt,xT),e(bt,cl),e(cl,LT),e(cl,_p),e(_p,XT),e(cl,ET),e(bt,jT),e(bt,Zo),k(pl,Zo,null),e(Zo,CT),e(Zo,Yh),e(Yh,JT),e(Zo,zT),e(Zo,hl),e(hl,bp),e(bp,UT),e(bp,Hh),e(Hh,IT),e(hl,NT),e(hl,Mp),e(Mp,qT),e(Mp,Kh),e(Kh,WT),e(bt,ZT),e(bt,ms),k(ml,ms,null),e(ms,AT),e(ms,em),e(em,BT),g(l,Ig,_),g(l,hn,_),e(hn,us),e(us,tm),k(ul,tm,null),e(hn,GT),e(hn,om),e(om,ST),g(l,Ng,_),g(l,Ke,_),k(fl,Ke,null),e(Ke,VT),e(Ke,nm),e(nm,PT),e(Ke,OT),e(Ke,gl),e(gl,DT),e(gl,yp),e(yp,QT),e(gl,YT),e(Ke,HT),e(Ke,_l),e(_l,KT),e(_l,bl),e(bl,ek),e(_l,tk),e(Ke,ok),e(Ke,Ml),e(Ml,nk),e(Ml,sm),e(sm,sk),e(Ml,ak),e(Ke,rk),e(Ke,it),e(it,lk),e(it,am),e(am,ik),e(it,dk),e(it,rm),e(rm,ck),e(it,pk),e(it,lm),e(lm,hk),e(it,mk),e(it,im),e(im,uk),e(it,fk),e(it,dm),e(dm,gk),e(it,_k),e(it,cm),e(cm,bk),e(it,Mk),e(Ke,yk),e(Ke,fs),e(fs,vk),e(fs,pm),e(pm,Tk),e(fs,kk),e(fs,yl),e(yl,wk),e(Ke,Fk),e(Ke,Vt),k(vl,Vt,null),e(Vt,$k),e(Vt,mn),e(mn,Rk),e(mn,vp),e(vp,xk),e(mn,Lk),e(mn,hm),e(hm,Xk),e(mn,Ek),e(Vt,jk),k(gs,Vt,null),e(Vt,Ck),k(_s,Vt,null),g(l,qg,_),g(l,un,_),e(un,bs),e(bs,mm),k(Tl,mm,null),e(un,Jk),e(un,um),e(um,zk),g(l,Wg,_),g(l,Mt,_),k(kl,Mt,null),e(Mt,Uk),e(Mt,wl),e(wl,Ik),e(wl,fm),e(fm,Nk),e(wl,qk),e(Mt,Wk),e(Mt,Fl),e(Fl,Zk),e(Fl,Tp),e(Tp,Ak),e(Fl,Bk),e(Mt,Gk),e(Mt,$l),e($l,Sk),e($l,Rl),e(Rl,Vk),e($l,Pk),e(Mt,Ok),e(Mt,Pt),k(xl,Pt,null),e(Pt,Dk),e(Pt,fn),e(fn,Qk),e(fn,kp),e(kp,Yk),e(fn,Hk),e(fn,gm),e(gm,Kk),e(fn,ew),e(Pt,tw),k(Ms,Pt,null),e(Pt,ow),k(ys,Pt,null),g(l,Zg,_),g(l,gn,_),e(gn,vs),e(vs,_m),k(Ll,_m,null),e(gn,nw),e(gn,bm),e(bm,sw),g(l,Ag,_),g(l,yt,_),k(Xl,yt,null),e(yt,aw),e(yt,El),e(El,rw),e(El,Mm),e(Mm,lw),e(El,iw),e(yt,dw),e(yt,jl),e(jl,cw),e(jl,wp),e(wp,pw),e(jl,hw),e(yt,mw),e(yt,Cl),e(Cl,uw),e(Cl,Jl),e(Jl,fw),e(Cl,gw),e(yt,_w),e(yt,Ot),k(zl,Ot,null),e(Ot,bw),e(Ot,_n),e(_n,Mw),e(_n,Fp),e(Fp,yw),e(_n,vw),e(_n,ym),e(ym,Tw),e(_n,kw),e(Ot,ww),k(Ts,Ot,null),e(Ot,Fw),k(ks,Ot,null),g(l,Bg,_),g(l,bn,_),e(bn,ws),e(ws,vm),k(Ul,vm,null),e(bn,$w),e(bn,Tm),e(Tm,Rw),g(l,Gg,_),g(l,vt,_),k(Il,vt,null),e(vt,xw),e(vt,km),e(km,Lw),e(vt,Xw),e(vt,Nl),e(Nl,Ew),e(Nl,$p),e($p,jw),e(Nl,Cw),e(vt,Jw),e(vt,ql),e(ql,zw),e(ql,Wl),e(Wl,Uw),e(ql,Iw),e(vt,Nw),e(vt,Lt),k(Zl,Lt,null),e(Lt,qw),e(Lt,Mn),e(Mn,Ww),e(Mn,Rp),e(Rp,Zw),e(Mn,Aw),e(Mn,wm),e(wm,Bw),e(Mn,Gw),e(Lt,Sw),k(Fs,Lt,null),e(Lt,Vw),k($s,Lt,null),e(Lt,Pw),k(Rs,Lt,null),g(l,Sg,_),g(l,yn,_),e(yn,xs),e(xs,Fm),k(Al,Fm,null),e(yn,Ow),e(yn,$m),e($m,Dw),g(l,Vg,_),g(l,Tt,_),k(Bl,Tt,null),e(Tt,Qw),e(Tt,Rm),e(Rm,Yw),e(Tt,Hw),e(Tt,Gl),e(Gl,Kw),e(Gl,xp),e(xp,e0),e(Gl,t0),e(Tt,o0),e(Tt,Sl),e(Sl,n0),e(Sl,Vl),e(Vl,s0),e(Sl,a0),e(Tt,r0),e(Tt,Dt),k(Pl,Dt,null),e(Dt,l0),e(Dt,vn),e(vn,i0),e(vn,Lp),e(Lp,d0),e(vn,c0),e(vn,xm),e(xm,p0),e(vn,h0),e(Dt,m0),k(Ls,Dt,null),e(Dt,u0),k(Xs,Dt,null),g(l,Pg,_),g(l,Tn,_),e(Tn,Es),e(Es,Lm),k(Ol,Lm,null),e(Tn,f0),e(Tn,Xm),e(Xm,g0),g(l,Og,_),g(l,kt,_),k(Dl,kt,null),e(kt,_0),e(kt,Em),e(Em,b0),e(kt,M0),e(kt,Ql),e(Ql,y0),e(Ql,Xp),e(Xp,v0),e(Ql,T0),e(kt,k0),e(kt,Yl),e(Yl,w0),e(Yl,Hl),e(Hl,F0),e(Yl,$0),e(kt,R0),e(kt,Qt),k(Kl,Qt,null),e(Qt,x0),e(Qt,kn),e(kn,L0),e(kn,Ep),e(Ep,X0),e(kn,E0),e(kn,jm),e(jm,j0),e(kn,C0),e(Qt,J0),k(js,Qt,null),e(Qt,z0),k(Cs,Qt,null),g(l,Dg,_),g(l,wn,_),e(wn,Js),e(Js,Cm),k(ei,Cm,null),e(wn,U0),e(wn,Jm),e(Jm,I0),g(l,Qg,_),g(l,wt,_),k(ti,wt,null),e(wt,N0),e(wt,Fn),e(Fn,q0),e(Fn,zm),e(zm,W0),e(Fn,Z0),e(Fn,Um),e(Um,A0),e(Fn,B0),e(wt,G0),e(wt,oi),e(oi,S0),e(oi,jp),e(jp,V0),e(oi,P0),e(wt,O0),e(wt,ni),e(ni,D0),e(ni,si),e(si,Q0),e(ni,Y0),e(wt,H0),e(wt,Yt),k(ai,Yt,null),e(Yt,K0),e(Yt,$n),e($n,e1),e($n,Cp),e(Cp,t1),e($n,o1),e($n,Im),e(Im,n1),e($n,s1),e(Yt,a1),k(zs,Yt,null),e(Yt,r1),k(Us,Yt,null),g(l,Yg,_),g(l,Rn,_),e(Rn,Is),e(Is,Nm),k(ri,Nm,null),e(Rn,l1),e(Rn,qm),e(qm,i1),g(l,Hg,_),g(l,dt,_),k(li,dt,null),e(dt,d1),e(dt,Wm),e(Wm,c1),e(dt,p1),e(dt,ii),e(ii,h1),e(ii,Jp),e(Jp,m1),e(ii,u1),e(dt,f1),e(dt,di),e(di,g1),e(di,ci),e(ci,_1),e(di,b1),e(dt,M1),k(Ns,dt,null),e(dt,y1),e(dt,Ht),k(pi,Ht,null),e(Ht,v1),e(Ht,xn),e(xn,T1),e(xn,zp),e(zp,k1),e(xn,w1),e(xn,Zm),e(Zm,F1),e(xn,$1),e(Ht,R1),k(qs,Ht,null),e(Ht,x1),k(Ws,Ht,null),g(l,Kg,_),g(l,Ln,_),e(Ln,Zs),e(Zs,Am),k(hi,Am,null),e(Ln,L1),e(Ln,Bm),e(Bm,X1),g(l,e_,_),g(l,ct,_),k(mi,ct,null),e(ct,E1),e(ct,ui),e(ui,j1),e(ui,Gm),e(Gm,C1),e(ui,J1),e(ct,z1),e(ct,fi),e(fi,U1),e(fi,Up),e(Up,I1),e(fi,N1),e(ct,q1),e(ct,gi),e(gi,W1),e(gi,_i),e(_i,Z1),e(gi,A1),e(ct,B1),k(As,ct,null),e(ct,G1),e(ct,Kt),k(bi,Kt,null),e(Kt,S1),e(Kt,Xn),e(Xn,V1),e(Xn,Ip),e(Ip,P1),e(Xn,O1),e(Xn,Sm),e(Sm,D1),e(Xn,Q1),e(Kt,Y1),k(Bs,Kt,null),e(Kt,H1),k(Gs,Kt,null),g(l,t_,_),g(l,En,_),e(En,Ss),e(Ss,Vm),k(Mi,Vm,null),e(En,K1),e(En,Pm),e(Pm,e2),g(l,o_,_),g(l,pt,_),k(yi,pt,null),e(pt,t2),e(pt,vi),e(vi,o2),e(vi,Om),e(Om,n2),e(vi,s2),e(pt,a2),e(pt,Ti),e(Ti,r2),e(Ti,Np),e(Np,l2),e(Ti,i2),e(pt,d2),e(pt,ki),e(ki,c2),e(ki,wi),e(wi,p2),e(ki,h2),e(pt,m2),k(Vs,pt,null),e(pt,u2),e(pt,Xt),k(Fi,Xt,null),e(Xt,f2),e(Xt,jn),e(jn,g2),e(jn,qp),e(qp,_2),e(jn,b2),e(jn,Dm),e(Dm,M2),e(jn,y2),e(Xt,v2),k(Ps,Xt,null),e(Xt,T2),k(Os,Xt,null),e(Xt,k2),k(Ds,Xt,null),g(l,n_,_),g(l,Cn,_),e(Cn,Qs),e(Qs,Qm),k($i,Qm,null),e(Cn,w2),e(Cn,Ym),e(Ym,F2),g(l,s_,_),g(l,ht,_),k(Ri,ht,null),e(ht,$2),e(ht,Hm),e(Hm,R2),e(ht,x2),e(ht,xi),e(xi,L2),e(xi,Wp),e(Wp,X2),e(xi,E2),e(ht,j2),e(ht,Li),e(Li,C2),e(Li,Xi),e(Xi,J2),e(Li,z2),e(ht,U2),k(Ys,ht,null),e(ht,I2),e(ht,Et),k(Ei,Et,null),e(Et,N2),e(Et,Jn),e(Jn,q2),e(Jn,Zp),e(Zp,W2),e(Jn,Z2),e(Jn,Km),e(Km,A2),e(Jn,B2),e(Et,G2),k(Hs,Et,null),e(Et,S2),k(Ks,Et,null),e(Et,V2),k(ea,Et,null),g(l,a_,_),g(l,zn,_),e(zn,ta),e(ta,eu),k(ji,eu,null),e(zn,P2),e(zn,tu),e(tu,O2),g(l,r_,_),g(l,mt,_),k(Ci,mt,null),e(mt,D2),e(mt,ou),e(ou,Q2),e(mt,Y2),e(mt,Ji),e(Ji,H2),e(Ji,Ap),e(Ap,K2),e(Ji,eF),e(mt,tF),e(mt,zi),e(zi,oF),e(zi,Ui),e(Ui,nF),e(zi,sF),e(mt,aF),k(oa,mt,null),e(mt,rF),e(mt,eo),k(Ii,eo,null),e(eo,lF),e(eo,Un),e(Un,iF),e(Un,Bp),e(Bp,dF),e(Un,cF),e(Un,nu),e(nu,pF),e(Un,hF),e(eo,mF),k(na,eo,null),e(eo,uF),k(sa,eo,null),g(l,l_,_),g(l,In,_),e(In,aa),e(aa,su),k(Ni,su,null),e(In,fF),e(In,au),e(au,gF),g(l,i_,_),g(l,ut,_),k(qi,ut,null),e(ut,_F),e(ut,ru),e(ru,bF),e(ut,MF),e(ut,Wi),e(Wi,yF),e(Wi,Gp),e(Gp,vF),e(Wi,TF),e(ut,kF),e(ut,Zi),e(Zi,wF),e(Zi,Ai),e(Ai,FF),e(Zi,$F),e(ut,RF),k(ra,ut,null),e(ut,xF),e(ut,jt),k(Bi,jt,null),e(jt,LF),e(jt,Nn),e(Nn,XF),e(Nn,Sp),e(Sp,EF),e(Nn,jF),e(Nn,lu),e(lu,CF),e(Nn,JF),e(jt,zF),k(la,jt,null),e(jt,UF),k(ia,jt,null),e(jt,IF),k(da,jt,null),g(l,d_,_),g(l,qn,_),e(qn,ca),e(ca,iu),k(Gi,iu,null),e(qn,NF),e(qn,du),e(du,qF),g(l,c_,_),g(l,ft,_),k(Si,ft,null),e(ft,WF),e(ft,Wn),e(Wn,ZF),e(Wn,cu),e(cu,AF),e(Wn,BF),e(Wn,pu),e(pu,GF),e(Wn,SF),e(ft,VF),e(ft,Vi),e(Vi,PF),e(Vi,Vp),e(Vp,OF),e(Vi,DF),e(ft,QF),e(ft,Pi),e(Pi,YF),e(Pi,Oi),e(Oi,HF),e(Pi,KF),e(ft,e$),k(pa,ft,null),e(ft,t$),e(ft,Ct),k(Di,Ct,null),e(Ct,o$),e(Ct,Zn),e(Zn,n$),e(Zn,Pp),e(Pp,s$),e(Zn,a$),e(Zn,hu),e(hu,r$),e(Zn,l$),e(Ct,i$),k(ha,Ct,null),e(Ct,d$),k(ma,Ct,null),e(Ct,c$),k(ua,Ct,null),g(l,p_,_),g(l,An,_),e(An,fa),e(fa,mu),k(Qi,mu,null),e(An,p$),e(An,uu),e(uu,h$),g(l,h_,_),g(l,tt,_),k(Yi,tt,null),e(tt,m$),e(tt,fu),e(fu,u$),e(tt,f$),e(tt,Hi),e(Hi,g$),e(Hi,Op),e(Op,_$),e(Hi,b$),e(tt,M$),e(tt,Ki),e(Ki,y$),e(Ki,ed),e(ed,v$),e(Ki,T$),e(tt,k$),e(tt,gu),e(gu,w$),e(tt,F$),e(tt,bo),e(bo,_u),e(_u,td),e(td,$$),e(bo,R$),e(bo,bu),e(bu,od),e(od,x$),e(bo,L$),e(bo,Mu),e(Mu,nd),e(nd,X$),e(bo,E$),e(bo,yu),e(yu,sd),e(sd,j$),e(tt,C$),e(tt,to),k(ad,to,null),e(to,J$),e(to,Bn),e(Bn,z$),e(Bn,vu),e(vu,U$),e(Bn,I$),e(Bn,Tu),e(Tu,N$),e(Bn,q$),e(to,W$),k(ga,to,null),e(to,Z$),k(_a,to,null),g(l,m_,_),g(l,Gn,_),e(Gn,ba),e(ba,ku),k(rd,ku,null),e(Gn,A$),e(Gn,wu),e(wu,B$),g(l,u_,_),g(l,ot,_),k(ld,ot,null),e(ot,G$),e(ot,Fu),e(Fu,S$),e(ot,V$),e(ot,id),e(id,P$),e(id,Dp),e(Dp,O$),e(id,D$),e(ot,Q$),e(ot,dd),e(dd,Y$),e(dd,cd),e(cd,H$),e(dd,K$),e(ot,eR),e(ot,$u),e($u,tR),e(ot,oR),e(ot,Mo),e(Mo,Ru),e(Ru,pd),e(pd,nR),e(Mo,sR),e(Mo,xu),e(xu,hd),e(hd,aR),e(Mo,rR),e(Mo,Lu),e(Lu,md),e(md,lR),e(Mo,iR),e(Mo,Xu),e(Xu,ud),e(ud,dR),e(ot,cR),e(ot,oo),k(fd,oo,null),e(oo,pR),e(oo,Sn),e(Sn,hR),e(Sn,Eu),e(Eu,mR),e(Sn,uR),e(Sn,ju),e(ju,fR),e(Sn,gR),e(oo,_R),k(Ma,oo,null),e(oo,bR),k(ya,oo,null),g(l,f_,_),g(l,Vn,_),e(Vn,va),e(va,Cu),k(gd,Cu,null),e(Vn,MR),e(Vn,Ju),e(Ju,yR),g(l,g_,_),g(l,nt,_),k(_d,nt,null),e(nt,vR),e(nt,bd),e(bd,TR),e(bd,zu),e(zu,kR),e(bd,wR),e(nt,FR),e(nt,Md),e(Md,$R),e(Md,Qp),e(Qp,RR),e(Md,xR),e(nt,LR),e(nt,yd),e(yd,XR),e(yd,vd),e(vd,ER),e(yd,jR),e(nt,CR),e(nt,Uu),e(Uu,JR),e(nt,zR),e(nt,yo),e(yo,Iu),e(Iu,Td),e(Td,UR),e(yo,IR),e(yo,Nu),e(Nu,kd),e(kd,NR),e(yo,qR),e(yo,qu),e(qu,wd),e(wd,WR),e(yo,ZR),e(yo,Wu),e(Wu,Fd),e(Fd,AR),e(nt,BR),e(nt,no),k($d,no,null),e(no,GR),e(no,Pn),e(Pn,SR),e(Pn,Zu),e(Zu,VR),e(Pn,PR),e(Pn,Au),e(Au,OR),e(Pn,DR),e(no,QR),k(Ta,no,null),e(no,YR),k(ka,no,null),g(l,__,_),g(l,On,_),e(On,wa),e(wa,Bu),k(Rd,Bu,null),e(On,HR),e(On,Gu),e(Gu,KR),g(l,b_,_),g(l,st,_),k(xd,st,null),e(st,ex),e(st,Su),e(Su,tx),e(st,ox),e(st,Ld),e(Ld,nx),e(Ld,Yp),e(Yp,sx),e(Ld,ax),e(st,rx),e(st,Xd),e(Xd,lx),e(Xd,Ed),e(Ed,ix),e(Xd,dx),e(st,cx),e(st,Vu),e(Vu,px),e(st,hx),e(st,vo),e(vo,Pu),e(Pu,jd),e(jd,mx),e(vo,ux),e(vo,Ou),e(Ou,Cd),e(Cd,fx),e(vo,gx),e(vo,Du),e(Du,Jd),e(Jd,_x),e(vo,bx),e(vo,Qu),e(Qu,zd),e(zd,Mx),e(st,yx),e(st,so),k(Ud,so,null),e(so,vx),e(so,Dn),e(Dn,Tx),e(Dn,Yu),e(Yu,kx),e(Dn,wx),e(Dn,Hu),e(Hu,Fx),e(Dn,$x),e(so,Rx),k(Fa,so,null),e(so,xx),k($a,so,null),g(l,M_,_),g(l,Qn,_),e(Qn,Ra),e(Ra,Ku),k(Id,Ku,null),e(Qn,Lx),e(Qn,ef),e(ef,Xx),g(l,y_,_),g(l,at,_),k(Nd,at,null),e(at,Ex),e(at,tf),e(tf,jx),e(at,Cx),e(at,qd),e(qd,Jx),e(qd,Hp),e(Hp,zx),e(qd,Ux),e(at,Ix),e(at,Wd),e(Wd,Nx),e(Wd,Zd),e(Zd,qx),e(Wd,Wx),e(at,Zx),e(at,of),e(of,Ax),e(at,Bx),e(at,To),e(To,nf),e(nf,Ad),e(Ad,Gx),e(To,Sx),e(To,sf),e(sf,Bd),e(Bd,Vx),e(To,Px),e(To,af),e(af,Gd),e(Gd,Ox),e(To,Dx),e(To,rf),e(rf,Sd),e(Sd,Qx),e(at,Yx),e(at,ao),k(Vd,ao,null),e(ao,Hx),e(ao,Yn),e(Yn,Kx),e(Yn,lf),e(lf,eL),e(Yn,tL),e(Yn,df),e(df,oL),e(Yn,nL),e(ao,sL),k(xa,ao,null),e(ao,aL),k(La,ao,null),g(l,v_,_),g(l,Hn,_),e(Hn,Xa),e(Xa,cf),k(Pd,cf,null),e(Hn,rL),e(Hn,pf),e(pf,lL),g(l,T_,_),g(l,rt,_),k(Od,rt,null),e(rt,iL),e(rt,hf),e(hf,dL),e(rt,cL),e(rt,Dd),e(Dd,pL),e(Dd,Kp),e(Kp,hL),e(Dd,mL),e(rt,uL),e(rt,Qd),e(Qd,fL),e(Qd,Yd),e(Yd,gL),e(Qd,_L),e(rt,bL),e(rt,mf),e(mf,ML),e(rt,yL),e(rt,ko),e(ko,uf),e(uf,Hd),e(Hd,vL),e(ko,TL),e(ko,ff),e(ff,Kd),e(Kd,kL),e(ko,wL),e(ko,gf),e(gf,ec),e(ec,FL),e(ko,$L),e(ko,_f),e(_f,tc),e(tc,RL),e(rt,xL),e(rt,ro),k(oc,ro,null),e(ro,LL),e(ro,Kn),e(Kn,XL),e(Kn,bf),e(bf,EL),e(Kn,jL),e(Kn,Mf),e(Mf,CL),e(Kn,JL),e(ro,zL),k(Ea,ro,null),e(ro,UL),k(ja,ro,null),g(l,k_,_),g(l,es,_),e(es,Ca),e(Ca,yf),k(nc,yf,null),e(es,IL),e(es,vf),e(vf,NL),g(l,w_,_),g(l,lt,_),k(sc,lt,null),e(lt,qL),e(lt,ts),e(ts,WL),e(ts,Tf),e(Tf,ZL),e(ts,AL),e(ts,kf),e(kf,BL),e(ts,GL),e(lt,SL),e(lt,ac),e(ac,VL),e(ac,eh),e(eh,PL),e(ac,OL),e(lt,DL),e(lt,rc),e(rc,QL),e(rc,lc),e(lc,YL),e(rc,HL),e(lt,KL),e(lt,wf),e(wf,eX),e(lt,tX),e(lt,wo),e(wo,Ff),e(Ff,ic),e(ic,oX),e(wo,nX),e(wo,$f),e($f,dc),e(dc,sX),e(wo,aX),e(wo,Rf),e(Rf,cc),e(cc,rX),e(wo,lX),e(wo,xf),e(xf,pc),e(pc,iX),e(lt,dX),e(lt,lo),k(hc,lo,null),e(lo,cX),e(lo,os),e(os,pX),e(os,Lf),e(Lf,hX),e(os,mX),e(os,Xf),e(Xf,uX),e(os,fX),e(lo,gX),k(Ja,lo,null),e(lo,_X),k(za,lo,null),F_=!0},p(l,[_]){const mc={};_&2&&(mc.$$scope={dirty:_,ctx:l}),is.$set(mc);const Ef={};_&2&&(Ef.$$scope={dirty:_,ctx:l}),gs.$set(Ef);const jf={};_&2&&(jf.$$scope={dirty:_,ctx:l}),_s.$set(jf);const Cf={};_&2&&(Cf.$$scope={dirty:_,ctx:l}),Ms.$set(Cf);const uc={};_&2&&(uc.$$scope={dirty:_,ctx:l}),ys.$set(uc);const Jf={};_&2&&(Jf.$$scope={dirty:_,ctx:l}),Ts.$set(Jf);const zf={};_&2&&(zf.$$scope={dirty:_,ctx:l}),ks.$set(zf);const fc={};_&2&&(fc.$$scope={dirty:_,ctx:l}),Fs.$set(fc);const Uf={};_&2&&(Uf.$$scope={dirty:_,ctx:l}),$s.$set(Uf);const If={};_&2&&(If.$$scope={dirty:_,ctx:l}),Rs.$set(If);const Nf={};_&2&&(Nf.$$scope={dirty:_,ctx:l}),Ls.$set(Nf);const gc={};_&2&&(gc.$$scope={dirty:_,ctx:l}),Xs.$set(gc);const qf={};_&2&&(qf.$$scope={dirty:_,ctx:l}),js.$set(qf);const Wf={};_&2&&(Wf.$$scope={dirty:_,ctx:l}),Cs.$set(Wf);const Zf={};_&2&&(Zf.$$scope={dirty:_,ctx:l}),zs.$set(Zf);const Af={};_&2&&(Af.$$scope={dirty:_,ctx:l}),Us.$set(Af);const Bf={};_&2&&(Bf.$$scope={dirty:_,ctx:l}),Ns.$set(Bf);const ns={};_&2&&(ns.$$scope={dirty:_,ctx:l}),qs.$set(ns);const _c={};_&2&&(_c.$$scope={dirty:_,ctx:l}),Ws.$set(_c);const Gf={};_&2&&(Gf.$$scope={dirty:_,ctx:l}),As.$set(Gf);const Sf={};_&2&&(Sf.$$scope={dirty:_,ctx:l}),Bs.$set(Sf);const bc={};_&2&&(bc.$$scope={dirty:_,ctx:l}),Gs.$set(bc);const Vf={};_&2&&(Vf.$$scope={dirty:_,ctx:l}),Vs.$set(Vf);const ss={};_&2&&(ss.$$scope={dirty:_,ctx:l}),Ps.$set(ss);const Pf={};_&2&&(Pf.$$scope={dirty:_,ctx:l}),Os.$set(Pf);const Of={};_&2&&(Of.$$scope={dirty:_,ctx:l}),Ds.$set(Of);const Mc={};_&2&&(Mc.$$scope={dirty:_,ctx:l}),Ys.$set(Mc);const Df={};_&2&&(Df.$$scope={dirty:_,ctx:l}),Hs.$set(Df);const Qf={};_&2&&(Qf.$$scope={dirty:_,ctx:l}),Ks.$set(Qf);const Yf={};_&2&&(Yf.$$scope={dirty:_,ctx:l}),ea.$set(Yf);const Hf={};_&2&&(Hf.$$scope={dirty:_,ctx:l}),oa.$set(Hf);const Ft={};_&2&&(Ft.$$scope={dirty:_,ctx:l}),na.$set(Ft);const th={};_&2&&(th.$$scope={dirty:_,ctx:l}),sa.$set(th);const Kf={};_&2&&(Kf.$$scope={dirty:_,ctx:l}),ra.$set(Kf);const Ao={};_&2&&(Ao.$$scope={dirty:_,ctx:l}),la.$set(Ao);const eg={};_&2&&(eg.$$scope={dirty:_,ctx:l}),ia.$set(eg);const tg={};_&2&&(tg.$$scope={dirty:_,ctx:l}),da.$set(tg);const og={};_&2&&(og.$$scope={dirty:_,ctx:l}),pa.$set(og);const Bo={};_&2&&(Bo.$$scope={dirty:_,ctx:l}),ha.$set(Bo);const ng={};_&2&&(ng.$$scope={dirty:_,ctx:l}),ma.$set(ng);const sg={};_&2&&(sg.$$scope={dirty:_,ctx:l}),ua.$set(sg);const ag={};_&2&&(ag.$$scope={dirty:_,ctx:l}),ga.$set(ag);const Go={};_&2&&(Go.$$scope={dirty:_,ctx:l}),_a.$set(Go);const rg={};_&2&&(rg.$$scope={dirty:_,ctx:l}),Ma.$set(rg);const lg={};_&2&&(lg.$$scope={dirty:_,ctx:l}),ya.$set(lg);const ig={};_&2&&(ig.$$scope={dirty:_,ctx:l}),Ta.$set(ig);const oh={};_&2&&(oh.$$scope={dirty:_,ctx:l}),ka.$set(oh);const dg={};_&2&&(dg.$$scope={dirty:_,ctx:l}),Fa.$set(dg);const cg={};_&2&&(cg.$$scope={dirty:_,ctx:l}),$a.$set(cg);const pg={};_&2&&(pg.$$scope={dirty:_,ctx:l}),xa.$set(pg);const St={};_&2&&(St.$$scope={dirty:_,ctx:l}),La.$set(St);const So={};_&2&&(So.$$scope={dirty:_,ctx:l}),Ea.$set(So);const hg={};_&2&&(hg.$$scope={dirty:_,ctx:l}),ja.$set(hg);const mg={};_&2&&(mg.$$scope={dirty:_,ctx:l}),Ja.$set(mg);const ug={};_&2&&(ug.$$scope={dirty:_,ctx:l}),za.$set(ug)},i(l){F_||(w(i.$$.fragment,l),w(le.$$.fragment,l),w(A.$$.fragment,l),w(ee.$$.fragment,l),w(gr.$$.fragment,l),w(kr.$$.fragment,l),w(Rr.$$.fragment,l),w(zr.$$.fragment,l),w(Or.$$.fragment,l),w(Dr.$$.fragment,l),w(is.$$.fragment,l),w(Yr.$$.fragment,l),w(Hr.$$.fragment,l),w(tl.$$.fragment,l),w(nl.$$.fragment,l),w(al.$$.fragment,l),w(rl.$$.fragment,l),w(ll.$$.fragment,l),w(il.$$.fragment,l),w(pl.$$.fragment,l),w(ml.$$.fragment,l),w(ul.$$.fragment,l),w(fl.$$.fragment,l),w(vl.$$.fragment,l),w(gs.$$.fragment,l),w(_s.$$.fragment,l),w(Tl.$$.fragment,l),w(kl.$$.fragment,l),w(xl.$$.fragment,l),w(Ms.$$.fragment,l),w(ys.$$.fragment,l),w(Ll.$$.fragment,l),w(Xl.$$.fragment,l),w(zl.$$.fragment,l),w(Ts.$$.fragment,l),w(ks.$$.fragment,l),w(Ul.$$.fragment,l),w(Il.$$.fragment,l),w(Zl.$$.fragment,l),w(Fs.$$.fragment,l),w($s.$$.fragment,l),w(Rs.$$.fragment,l),w(Al.$$.fragment,l),w(Bl.$$.fragment,l),w(Pl.$$.fragment,l),w(Ls.$$.fragment,l),w(Xs.$$.fragment,l),w(Ol.$$.fragment,l),w(Dl.$$.fragment,l),w(Kl.$$.fragment,l),w(js.$$.fragment,l),w(Cs.$$.fragment,l),w(ei.$$.fragment,l),w(ti.$$.fragment,l),w(ai.$$.fragment,l),w(zs.$$.fragment,l),w(Us.$$.fragment,l),w(ri.$$.fragment,l),w(li.$$.fragment,l),w(Ns.$$.fragment,l),w(pi.$$.fragment,l),w(qs.$$.fragment,l),w(Ws.$$.fragment,l),w(hi.$$.fragment,l),w(mi.$$.fragment,l),w(As.$$.fragment,l),w(bi.$$.fragment,l),w(Bs.$$.fragment,l),w(Gs.$$.fragment,l),w(Mi.$$.fragment,l),w(yi.$$.fragment,l),w(Vs.$$.fragment,l),w(Fi.$$.fragment,l),w(Ps.$$.fragment,l),w(Os.$$.fragment,l),w(Ds.$$.fragment,l),w($i.$$.fragment,l),w(Ri.$$.fragment,l),w(Ys.$$.fragment,l),w(Ei.$$.fragment,l),w(Hs.$$.fragment,l),w(Ks.$$.fragment,l),w(ea.$$.fragment,l),w(ji.$$.fragment,l),w(Ci.$$.fragment,l),w(oa.$$.fragment,l),w(Ii.$$.fragment,l),w(na.$$.fragment,l),w(sa.$$.fragment,l),w(Ni.$$.fragment,l),w(qi.$$.fragment,l),w(ra.$$.fragment,l),w(Bi.$$.fragment,l),w(la.$$.fragment,l),w(ia.$$.fragment,l),w(da.$$.fragment,l),w(Gi.$$.fragment,l),w(Si.$$.fragment,l),w(pa.$$.fragment,l),w(Di.$$.fragment,l),w(ha.$$.fragment,l),w(ma.$$.fragment,l),w(ua.$$.fragment,l),w(Qi.$$.fragment,l),w(Yi.$$.fragment,l),w(ad.$$.fragment,l),w(ga.$$.fragment,l),w(_a.$$.fragment,l),w(rd.$$.fragment,l),w(ld.$$.fragment,l),w(fd.$$.fragment,l),w(Ma.$$.fragment,l),w(ya.$$.fragment,l),w(gd.$$.fragment,l),w(_d.$$.fragment,l),w($d.$$.fragment,l),w(Ta.$$.fragment,l),w(ka.$$.fragment,l),w(Rd.$$.fragment,l),w(xd.$$.fragment,l),w(Ud.$$.fragment,l),w(Fa.$$.fragment,l),w($a.$$.fragment,l),w(Id.$$.fragment,l),w(Nd.$$.fragment,l),w(Vd.$$.fragment,l),w(xa.$$.fragment,l),w(La.$$.fragment,l),w(Pd.$$.fragment,l),w(Od.$$.fragment,l),w(oc.$$.fragment,l),w(Ea.$$.fragment,l),w(ja.$$.fragment,l),w(nc.$$.fragment,l),w(sc.$$.fragment,l),w(hc.$$.fragment,l),w(Ja.$$.fragment,l),w(za.$$.fragment,l),F_=!0)},o(l){F(i.$$.fragment,l),F(le.$$.fragment,l),F(A.$$.fragment,l),F(ee.$$.fragment,l),F(gr.$$.fragment,l),F(kr.$$.fragment,l),F(Rr.$$.fragment,l),F(zr.$$.fragment,l),F(Or.$$.fragment,l),F(Dr.$$.fragment,l),F(is.$$.fragment,l),F(Yr.$$.fragment,l),F(Hr.$$.fragment,l),F(tl.$$.fragment,l),F(nl.$$.fragment,l),F(al.$$.fragment,l),F(rl.$$.fragment,l),F(ll.$$.fragment,l),F(il.$$.fragment,l),F(pl.$$.fragment,l),F(ml.$$.fragment,l),F(ul.$$.fragment,l),F(fl.$$.fragment,l),F(vl.$$.fragment,l),F(gs.$$.fragment,l),F(_s.$$.fragment,l),F(Tl.$$.fragment,l),F(kl.$$.fragment,l),F(xl.$$.fragment,l),F(Ms.$$.fragment,l),F(ys.$$.fragment,l),F(Ll.$$.fragment,l),F(Xl.$$.fragment,l),F(zl.$$.fragment,l),F(Ts.$$.fragment,l),F(ks.$$.fragment,l),F(Ul.$$.fragment,l),F(Il.$$.fragment,l),F(Zl.$$.fragment,l),F(Fs.$$.fragment,l),F($s.$$.fragment,l),F(Rs.$$.fragment,l),F(Al.$$.fragment,l),F(Bl.$$.fragment,l),F(Pl.$$.fragment,l),F(Ls.$$.fragment,l),F(Xs.$$.fragment,l),F(Ol.$$.fragment,l),F(Dl.$$.fragment,l),F(Kl.$$.fragment,l),F(js.$$.fragment,l),F(Cs.$$.fragment,l),F(ei.$$.fragment,l),F(ti.$$.fragment,l),F(ai.$$.fragment,l),F(zs.$$.fragment,l),F(Us.$$.fragment,l),F(ri.$$.fragment,l),F(li.$$.fragment,l),F(Ns.$$.fragment,l),F(pi.$$.fragment,l),F(qs.$$.fragment,l),F(Ws.$$.fragment,l),F(hi.$$.fragment,l),F(mi.$$.fragment,l),F(As.$$.fragment,l),F(bi.$$.fragment,l),F(Bs.$$.fragment,l),F(Gs.$$.fragment,l),F(Mi.$$.fragment,l),F(yi.$$.fragment,l),F(Vs.$$.fragment,l),F(Fi.$$.fragment,l),F(Ps.$$.fragment,l),F(Os.$$.fragment,l),F(Ds.$$.fragment,l),F($i.$$.fragment,l),F(Ri.$$.fragment,l),F(Ys.$$.fragment,l),F(Ei.$$.fragment,l),F(Hs.$$.fragment,l),F(Ks.$$.fragment,l),F(ea.$$.fragment,l),F(ji.$$.fragment,l),F(Ci.$$.fragment,l),F(oa.$$.fragment,l),F(Ii.$$.fragment,l),F(na.$$.fragment,l),F(sa.$$.fragment,l),F(Ni.$$.fragment,l),F(qi.$$.fragment,l),F(ra.$$.fragment,l),F(Bi.$$.fragment,l),F(la.$$.fragment,l),F(ia.$$.fragment,l),F(da.$$.fragment,l),F(Gi.$$.fragment,l),F(Si.$$.fragment,l),F(pa.$$.fragment,l),F(Di.$$.fragment,l),F(ha.$$.fragment,l),F(ma.$$.fragment,l),F(ua.$$.fragment,l),F(Qi.$$.fragment,l),F(Yi.$$.fragment,l),F(ad.$$.fragment,l),F(ga.$$.fragment,l),F(_a.$$.fragment,l),F(rd.$$.fragment,l),F(ld.$$.fragment,l),F(fd.$$.fragment,l),F(Ma.$$.fragment,l),F(ya.$$.fragment,l),F(gd.$$.fragment,l),F(_d.$$.fragment,l),F($d.$$.fragment,l),F(Ta.$$.fragment,l),F(ka.$$.fragment,l),F(Rd.$$.fragment,l),F(xd.$$.fragment,l),F(Ud.$$.fragment,l),F(Fa.$$.fragment,l),F($a.$$.fragment,l),F(Id.$$.fragment,l),F(Nd.$$.fragment,l),F(Vd.$$.fragment,l),F(xa.$$.fragment,l),F(La.$$.fragment,l),F(Pd.$$.fragment,l),F(Od.$$.fragment,l),F(oc.$$.fragment,l),F(Ea.$$.fragment,l),F(ja.$$.fragment,l),F(nc.$$.fragment,l),F(sc.$$.fragment,l),F(hc.$$.fragment,l),F(Ja.$$.fragment,l),F(za.$$.fragment,l),F_=!1},d(l){t(d),l&&t(M),l&&t(u),$(i),l&&t(fe),l&&t(q),l&&t(O),l&&t(ae),$(le),l&&t(ge),l&&t(Z),l&&t(z),l&&t(he),l&&t(_e),l&&t(me),l&&t(be),l&&t(J),l&&t(D),l&&t(ne),l&&t(y),l&&t(x),l&&t(Be),l&&t(Je),$(A),l&&t(Ge),l&&t(Ie),l&&t(Se),$(ee,l),l&&t(Ve),l&&t(gt),l&&t(Mg),$(gr,l),l&&t(yg),l&&t($t),l&&t(vg),$(kr,l),l&&t(Tg),l&&t(Xo),l&&t(kg),$(Rr,l),l&&t(wg),l&&t(Rt),l&&t(Fg),$(zr,l),l&&t($g),l&&t(xt),l&&t(Rg),l&&t(Kc),l&&t(xg),l&&t(Io),l&&t(Lg),l&&t(np),l&&t(Xg),l&&t(sp),l&&t(Eg),l&&t(ln),$(Or),l&&t(jg),l&&t(Bt),$(Dr),$(is),l&&t(Cg),l&&t(cn),$(Yr),l&&t(Jg),l&&t(et),$(Hr),$(tl),$(nl),$(al),$(rl),l&&t(zg),l&&t(pn),$(ll),l&&t(Ug),l&&t(bt),$(il),$(pl),$(ml),l&&t(Ig),l&&t(hn),$(ul),l&&t(Ng),l&&t(Ke),$(fl),$(vl),$(gs),$(_s),l&&t(qg),l&&t(un),$(Tl),l&&t(Wg),l&&t(Mt),$(kl),$(xl),$(Ms),$(ys),l&&t(Zg),l&&t(gn),$(Ll),l&&t(Ag),l&&t(yt),$(Xl),$(zl),$(Ts),$(ks),l&&t(Bg),l&&t(bn),$(Ul),l&&t(Gg),l&&t(vt),$(Il),$(Zl),$(Fs),$($s),$(Rs),l&&t(Sg),l&&t(yn),$(Al),l&&t(Vg),l&&t(Tt),$(Bl),$(Pl),$(Ls),$(Xs),l&&t(Pg),l&&t(Tn),$(Ol),l&&t(Og),l&&t(kt),$(Dl),$(Kl),$(js),$(Cs),l&&t(Dg),l&&t(wn),$(ei),l&&t(Qg),l&&t(wt),$(ti),$(ai),$(zs),$(Us),l&&t(Yg),l&&t(Rn),$(ri),l&&t(Hg),l&&t(dt),$(li),$(Ns),$(pi),$(qs),$(Ws),l&&t(Kg),l&&t(Ln),$(hi),l&&t(e_),l&&t(ct),$(mi),$(As),$(bi),$(Bs),$(Gs),l&&t(t_),l&&t(En),$(Mi),l&&t(o_),l&&t(pt),$(yi),$(Vs),$(Fi),$(Ps),$(Os),$(Ds),l&&t(n_),l&&t(Cn),$($i),l&&t(s_),l&&t(ht),$(Ri),$(Ys),$(Ei),$(Hs),$(Ks),$(ea),l&&t(a_),l&&t(zn),$(ji),l&&t(r_),l&&t(mt),$(Ci),$(oa),$(Ii),$(na),$(sa),l&&t(l_),l&&t(In),$(Ni),l&&t(i_),l&&t(ut),$(qi),$(ra),$(Bi),$(la),$(ia),$(da),l&&t(d_),l&&t(qn),$(Gi),l&&t(c_),l&&t(ft),$(Si),$(pa),$(Di),$(ha),$(ma),$(ua),l&&t(p_),l&&t(An),$(Qi),l&&t(h_),l&&t(tt),$(Yi),$(ad),$(ga),$(_a),l&&t(m_),l&&t(Gn),$(rd),l&&t(u_),l&&t(ot),$(ld),$(fd),$(Ma),$(ya),l&&t(f_),l&&t(Vn),$(gd),l&&t(g_),l&&t(nt),$(_d),$($d),$(Ta),$(ka),l&&t(__),l&&t(On),$(Rd),l&&t(b_),l&&t(st),$(xd),$(Ud),$(Fa),$($a),l&&t(M_),l&&t(Qn),$(Id),l&&t(y_),l&&t(at),$(Nd),$(Vd),$(xa),$(La),l&&t(v_),l&&t(Hn),$(Pd),l&&t(T_),l&&t(rt),$(Od),$(oc),$(Ea),$(ja),l&&t(k_),l&&t(es),$(nc),l&&t(w_),l&&t(lt),$(sc),$(hc),$(Ja),$(za)}}}const Uz={local:"xlmroberta",sections:[{local:"overview",title:"Overview"},{local:"resources",title:"Resources"},{local:"transformers.XLMRobertaConfig",title:"XLMRobertaConfig"},{local:"transformers.XLMRobertaTokenizer",title:"XLMRobertaTokenizer"},{local:"transformers.XLMRobertaTokenizerFast",title:"XLMRobertaTokenizerFast"},{local:"transformers.XLMRobertaModel",title:"XLMRobertaModel"},{local:"transformers.XLMRobertaForCausalLM",title:"XLMRobertaForCausalLM"},{local:"transformers.XLMRobertaForMaskedLM",title:"XLMRobertaForMaskedLM"},{local:"transformers.XLMRobertaForSequenceClassification",title:"XLMRobertaForSequenceClassification"},{local:"transformers.XLMRobertaForMultipleChoice",title:"XLMRobertaForMultipleChoice"},{local:"transformers.XLMRobertaForTokenClassification",title:"XLMRobertaForTokenClassification"},{local:"transformers.XLMRobertaForQuestionAnswering",title:"XLMRobertaForQuestionAnswering"},{local:"transformers.TFXLMRobertaModel",title:"TFXLMRobertaModel"},{local:"transformers.TFXLMRobertaForCausalLM",title:"TFXLMRobertaForCausalLM"},{local:"transformers.TFXLMRobertaForMaskedLM",title:"TFXLMRobertaForMaskedLM"},{local:"transformers.TFXLMRobertaForSequenceClassification",title:"TFXLMRobertaForSequenceClassification"},{local:"transformers.TFXLMRobertaForMultipleChoice",title:"TFXLMRobertaForMultipleChoice"},{local:"transformers.TFXLMRobertaForTokenClassification",title:"TFXLMRobertaForTokenClassification"},{local:"transformers.TFXLMRobertaForQuestionAnswering",title:"TFXLMRobertaForQuestionAnswering"},{local:"transformers.FlaxXLMRobertaModel",title:"FlaxXLMRobertaModel"},{local:"transformers.FlaxXLMRobertaForCausalLM",title:"FlaxXLMRobertaForCausalLM"},{local:"transformers.FlaxXLMRobertaForMaskedLM",title:"FlaxXLMRobertaForMaskedLM"},{local:"transformers.FlaxXLMRobertaForSequenceClassification",title:"FlaxXLMRobertaForSequenceClassification"},{local:"transformers.FlaxXLMRobertaForMultipleChoice",title:"FlaxXLMRobertaForMultipleChoice"},{local:"transformers.FlaxXLMRobertaForTokenClassification",title:"FlaxXLMRobertaForTokenClassification"},{local:"transformers.FlaxXLMRobertaForQuestionAnswering",title:"FlaxXLMRobertaForQuestionAnswering"}],title:"XLM-RoBERTa"};function Iz(L){return CJ(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Sz extends LJ{constructor(d){super();XJ(this,d,Iz,zz,EJ,{})}}export{Sz as default,Uz as metadata};
