import{S as fc,i as gc,s as _c,e as s,k as u,w as y,t as l,M as bc,c as a,d as o,m as f,a as r,x as T,h as i,b as h,G as e,g as b,y as v,q as w,o as k,B as X,v as Mc,L as Le}from"../../chunks/vendor-hf-doc-builder.js";import{T as lo}from"../../chunks/Tip-hf-doc-builder.js";import{D as x}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Re}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as D}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Xe}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function yc(L){let d,M,m,p,_;return p=new Re({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFhMTVJvYmVydGFYTENvbmZpZyUyQyUyMFhMTVJvYmVydGFYTE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFhMTV9ST0JFUlRBX1hMJTIwYmVydC1iYXNlLXVuY2FzZWQlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwWExNUm9iZXJ0YVhMQ29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMGJlcnQtYmFzZS11bmNhc2VkJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBYTE1Sb2JlcnRhWExNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> XLMRobertaXLConfig, XLMRobertaXLModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a XLM_ROBERTA_XL bert-base-uncased style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = XLMRobertaXLConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the bert-base-uncased style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMRobertaXLModel(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=l("Examples:"),m=u(),y(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);M=i(c,"Examples:"),c.forEach(o),m=f(n),T(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,M),b(n,m,c),v(p,n,c),_=!0},p:Le,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){k(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(m),X(p,n)}}}function Tc(L){let d,M,m,p,_;return{c(){d=s("p"),M=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s("code"),p=l("Module"),_=l(`
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(n){d=a(n,"P",{});var c=r(d);M=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(c,"CODE",{});var R=r(m);p=i(R,"Module"),R.forEach(o),_=i(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,M),e(d,m),e(m,p),e(d,_)},d(n){n&&o(d)}}}function vc(L){let d,M,m,p,_;return p=new Re({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBYTE1Sb2JlcnRhWExNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeGxtLXJvYmVydGEteGxhcmdlJTIyKSUwQW1vZGVsJTIwJTNEJTIwWExNUm9iZXJ0YVhMTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbS1yb2JlcnRhLXhsYXJnZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, XLMRobertaXLModel
<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-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMRobertaXLModel.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-xlarge&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=l("Example:"),m=u(),y(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);M=i(c,"Example:"),c.forEach(o),m=f(n),T(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,M),b(n,m,c),v(p,n,c),_=!0},p:Le,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){k(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(m),X(p,n)}}}function wc(L){let d,M,m,p,_;return{c(){d=s("p"),M=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s("code"),p=l("Module"),_=l(`
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(n){d=a(n,"P",{});var c=r(d);M=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(c,"CODE",{});var R=r(m);p=i(R,"Module"),R.forEach(o),_=i(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,M),e(d,m),e(m,p),e(d,_)},d(n){n&&o(d)}}}function kc(L){let d,M,m,p,_;return p=new Re({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSb2JlcnRhRm9yQ2F1c2FsTE0lMkMlMjBSb2JlcnRhQ29uZmlnJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJyb2JlcnRhLWJhc2UlMjIpJTBBY29uZmlnJTIwJTNEJTIwUm9iZXJ0YUNvbmZpZy5mcm9tX3ByZXRyYWluZWQoJTIycm9iZXJ0YS1iYXNlJTIyKSUwQWNvbmZpZy5pc19kZWNvZGVyJTIwJTNEJTIwVHJ1ZSUwQW1vZGVsJTIwJTNEJTIwUm9iZXJ0YUZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJyb2JlcnRhLWJhc2UlMjIlMkMlMjBjb25maWclM0Rjb25maWcpJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFwcmVkaWN0aW9uX2xvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, RobertaForCausalLM, RobertaConfig
<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 = RobertaConfig.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 = RobertaForCausalLM.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=l("Example:"),m=u(),y(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);M=i(c,"Example:"),c.forEach(o),m=f(n),T(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,M),b(n,m,c),v(p,n,c),_=!0},p:Le,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){k(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(m),X(p,n)}}}function Xc(L){let d,M,m,p,_;return{c(){d=s("p"),M=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s("code"),p=l("Module"),_=l(`
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(n){d=a(n,"P",{});var c=r(d);M=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(c,"CODE",{});var R=r(m);p=i(R,"Module"),R.forEach(o),_=i(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,M),e(d,m),e(m,p),e(d,_)},d(n){n&&o(d)}}}function Lc(L){let d,M,m,p,_;return p=new Re({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBYTE1Sb2JlcnRhWExGb3JNYXNrZWRMTSUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeGxtLXJvYmVydGEteGxhcmdlJTIyKSUwQW1vZGVsJTIwJTNEJTIwWExNUm9iZXJ0YVhMRm9yTWFza2VkTE0uZnJvbV9wcmV0cmFpbmVkKCUyMnhsbS1yb2JlcnRhLXhsYXJnZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjAlM0NtYXNrJTNFLiUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEElMjMlMjByZXRyaWV2ZSUyMGluZGV4JTIwb2YlMjAlM0NtYXNrJTNFJTBBbWFza190b2tlbl9pbmRleCUyMCUzRCUyMChpbnB1dHMuaW5wdXRfaWRzJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQpJTVCMCU1RC5ub256ZXJvKGFzX3R1cGxlJTNEVHJ1ZSklNUIwJTVEJTBBJTBBcHJlZGljdGVkX3Rva2VuX2lkJTIwJTNEJTIwbG9naXRzJTVCMCUyQyUyMG1hc2tfdG9rZW5faW5kZXglNUQuYXJnbWF4KGF4aXMlM0QtMSklMEElMEFsYWJlbHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjBQYXJpcy4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSU1QiUyMmlucHV0X2lkcyUyMiU1RCUwQSUyMyUyMG1hc2slMjBsYWJlbHMlMjBvZiUyMG5vbi0lM0NtYXNrJTNFJTIwdG9rZW5zJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2gud2hlcmUoaW5wdXRzLmlucHV0X2lkcyUyMCUzRCUzRCUyMHRva2VuaXplci5tYXNrX3Rva2VuX2lkJTJDJTIwbGFiZWxzJTJDJTIwLTEwMCklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, XLMRobertaXLForMaskedLM
<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-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMRobertaXLForMaskedLM.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-xlarge&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>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)`}}),{c(){d=s("p"),M=l("Example:"),m=u(),y(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);M=i(c,"Example:"),c.forEach(o),m=f(n),T(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,M),b(n,m,c),v(p,n,c),_=!0},p:Le,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){k(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(m),X(p,n)}}}function Rc(L){let d,M,m,p,_;return{c(){d=s("p"),M=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s("code"),p=l("Module"),_=l(`
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(n){d=a(n,"P",{});var c=r(d);M=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(c,"CODE",{});var R=r(m);p=i(R,"Module"),R.forEach(o),_=i(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,M),e(d,m),e(m,p),e(d,_)},d(n){n&&o(d)}}}function $c(L){let d,M,m,p,_;return p=new Re({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFhMTVJvYmVydGFYTEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ4bG0tcm9iZXJ0YS14bGFyZ2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBYTE1Sb2JlcnRhWExGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJ4bG0tcm9iZXJ0YS14bGFyZ2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwbG9naXRzLmFyZ21heCgpLml0ZW0oKSUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMFhMTVJvYmVydGFYTEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMnhsbS1yb2JlcnRhLXhsYXJnZSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, XLMRobertaXLForSequenceClassification

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

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = logits.argmax().item()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMRobertaXLForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-xlarge&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=s("p"),M=l("Example of single-label classification:"),m=u(),y(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);M=i(c,"Example of single-label classification:"),c.forEach(o),m=f(n),T(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,M),b(n,m,c),v(p,n,c),_=!0},p:Le,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){k(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(m),X(p,n)}}}function Jc(L){let d,M,m,p,_;return p=new Re({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFhMTVJvYmVydGFYTEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ4bG0tcm9iZXJ0YS14bGFyZ2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBYTE1Sb2JlcnRhWExGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJ4bG0tcm9iZXJ0YS14bGFyZ2UlMjIlMkMlMjBwcm9ibGVtX3R5cGUlM0QlMjJtdWx0aV9sYWJlbF9jbGFzc2lmaWNhdGlvbiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWRzJTIwJTNEJTIwdG9yY2guYXJhbmdlKDAlMkMlMjBsb2dpdHMuc2hhcGUlNUItMSU1RCklNUJ0b3JjaC5zaWdtb2lkKGxvZ2l0cykuc3F1ZWV6ZShkaW0lM0QwKSUyMCUzRSUyMDAuNSU1RCUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMFhMTVJvYmVydGFYTEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMnhsbS1yb2JlcnRhLXhsYXJnZSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, XLMRobertaXLForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMRobertaXLForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-xlarge&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 = XLMRobertaXLForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;xlm-roberta-xlarge&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=l("Example of multi-label classification:"),m=u(),y(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);M=i(c,"Example of multi-label classification:"),c.forEach(o),m=f(n),T(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,M),b(n,m,c),v(p,n,c),_=!0},p:Le,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){k(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(m),X(p,n)}}}function xc(L){let d,M,m,p,_;return{c(){d=s("p"),M=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s("code"),p=l("Module"),_=l(`
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(n){d=a(n,"P",{});var c=r(d);M=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(c,"CODE",{});var R=r(m);p=i(R,"Module"),R.forEach(o),_=i(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,M),e(d,m),e(m,p),e(d,_)},d(n){n&&o(d)}}}function Cc(L){let d,M,m,p,_;return p=new Re({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBYTE1Sb2JlcnRhWExGb3JNdWx0aXBsZUNob2ljZSUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeGxtLXJvYmVydGEteGxhcmdlJTIyKSUwQW1vZGVsJTIwJTNEJTIwWExNUm9iZXJ0YVhMRm9yTXVsdGlwbGVDaG9pY2UuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbS1yb2JlcnRhLXhsYXJnZSUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJJbiUyMEl0YWx5JTJDJTIwcGl6emElMjBzZXJ2ZWQlMjBpbiUyMGZvcm1hbCUyMHNldHRpbmdzJTJDJTIwc3VjaCUyMGFzJTIwYXQlMjBhJTIwcmVzdGF1cmFudCUyQyUyMGlzJTIwcHJlc2VudGVkJTIwdW5zbGljZWQuJTIyJTBBY2hvaWNlMCUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdpdGglMjBhJTIwZm9yayUyMGFuZCUyMGElMjBrbmlmZS4lMjIlMEFjaG9pY2UxJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2hpbGUlMjBoZWxkJTIwaW4lMjB0aGUlMjBoYW5kLiUyMiUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvcigwKS51bnNxdWVlemUoMCklMjAlMjAlMjMlMjBjaG9pY2UwJTIwaXMlMjBjb3JyZWN0JTIwKGFjY29yZGluZyUyMHRvJTIwV2lraXBlZGlhJTIwJTNCKSklMkMlMjBiYXRjaCUyMHNpemUlMjAxJTBBJTBBZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIoJTVCcHJvbXB0JTJDJTIwcHJvbXB0JTVEJTJDJTIwJTVCY2hvaWNlMCUyQyUyMGNob2ljZTElNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTJDJTIwcGFkZGluZyUzRFRydWUpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqJTdCayUzQSUyMHYudW5zcXVlZXplKDApJTIwZm9yJTIwayUyQyUyMHYlMjBpbiUyMGVuY29kaW5nLml0ZW1zKCklN0QlMkMlMjBsYWJlbHMlM0RsYWJlbHMpJTIwJTIwJTIzJTIwYmF0Y2glMjBzaXplJTIwaXMlMjAxJTBBJTBBJTIzJTIwdGhlJTIwbGluZWFyJTIwY2xhc3NpZmllciUyMHN0aWxsJTIwbmVlZHMlMjB0byUyMGJlJTIwdHJhaW5lZCUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3MlMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, XLMRobertaXLForMultipleChoice
<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-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMRobertaXLForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-xlarge&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=l("Example:"),m=u(),y(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);M=i(c,"Example:"),c.forEach(o),m=f(n),T(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,M),b(n,m,c),v(p,n,c),_=!0},p:Le,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){k(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(m),X(p,n)}}}function jc(L){let d,M,m,p,_;return{c(){d=s("p"),M=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s("code"),p=l("Module"),_=l(`
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(n){d=a(n,"P",{});var c=r(d);M=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(c,"CODE",{});var R=r(m);p=i(R,"Module"),R.forEach(o),_=i(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,M),e(d,m),e(m,p),e(d,_)},d(n){n&&o(d)}}}function Fc(L){let d,M,m,p,_;return p=new Re({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBYTE1Sb2JlcnRhWExGb3JUb2tlbkNsYXNzaWZpY2F0aW9uJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ4bG0tcm9iZXJ0YS14bGFyZ2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBYTE1Sb2JlcnRhWExGb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJ4bG0tcm9iZXJ0YS14bGFyZ2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUwQSUyMCUyMCUyMCUyMCUyMkh1Z2dpbmdGYWNlJTIwaXMlMjBhJTIwY29tcGFueSUyMGJhc2VkJTIwaW4lMjBQYXJpcyUyMGFuZCUyME5ldyUyMFlvcmslMjIlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RGYWxzZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMEEpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSklMEElMEElMjMlMjBOb3RlJTIwdGhhdCUyMHRva2VucyUyMGFyZSUyMGNsYXNzaWZpZWQlMjByYXRoZXIlMjB0aGVuJTIwaW5wdXQlMjB3b3JkcyUyMHdoaWNoJTIwbWVhbnMlMjB0aGF0JTBBJTIzJTIwdGhlcmUlMjBtaWdodCUyMGJlJTIwbW9yZSUyMHByZWRpY3RlZCUyMHRva2VuJTIwY2xhc3NlcyUyMHRoYW4lMjB3b3Jkcy4lMEElMjMlMjBNdWx0aXBsZSUyMHRva2VuJTIwY2xhc3NlcyUyMG1pZ2h0JTIwYWNjb3VudCUyMGZvciUyMHRoZSUyMHNhbWUlMjB3b3JkJTBBcHJlZGljdGVkX3Rva2Vuc19jbGFzc2VzJTIwJTNEJTIwJTVCbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCdC5pdGVtKCklNUQlMjBmb3IlMjB0JTIwaW4lMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTVCMCU1RCU1RCUwQSUwQWxhYmVscyUyMCUzRCUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlMEFsb3NzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpLmxvc3M=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, XLMRobertaXLForTokenClassification
<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-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMRobertaXLForTokenClassification.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-xlarge&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;HuggingFace is a company based in Paris and New York&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = logits.argmax(-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t.item()] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>]]

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){d=s("p"),M=l("Example:"),m=u(),y(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);M=i(c,"Example:"),c.forEach(o),m=f(n),T(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,M),b(n,m,c),v(p,n,c),_=!0},p:Le,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){k(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(m),X(p,n)}}}function Ec(L){let d,M,m,p,_;return{c(){d=s("p"),M=l("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=s("code"),p=l("Module"),_=l(`
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(n){d=a(n,"P",{});var c=r(d);M=i(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=a(c,"CODE",{});var R=r(m);p=i(R,"Module"),R.forEach(o),_=i(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(o)},m(n,c){b(n,d,c),e(d,M),e(d,m),e(m,p),e(d,_)},d(n){n&&o(d)}}}function Uc(L){let d,M,m,p,_;return p=new Re({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBYTE1Sb2JlcnRhWExGb3JRdWVzdGlvbkFuc3dlcmluZyUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeGxtLXJvYmVydGEteGxhcmdlJTIyKSUwQW1vZGVsJTIwJTNEJTIwWExNUm9iZXJ0YVhMRm9yUXVlc3Rpb25BbnN3ZXJpbmcuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbS1yb2JlcnRhLXhsYXJnZSUyMiklMEElMEFxdWVzdGlvbiUyQyUyMHRleHQlMjAlM0QlMjAlMjJXaG8lMjB3YXMlMjBKaW0lMjBIZW5zb24lM0YlMjIlMkMlMjAlMjJKaW0lMjBIZW5zb24lMjB3YXMlMjBhJTIwbmljZSUyMHB1cHBldCUyMiUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihxdWVzdGlvbiUyQyUyMHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNEJTIwb3V0cHV0cy5zdGFydF9sb2dpdHMuYXJnbWF4KCklMEFhbnN3ZXJfZW5kX2luZGV4JTIwJTNEJTIwb3V0cHV0cy5lbmRfbG9naXRzLmFyZ21heCgpJTBBJTBBcHJlZGljdF9hbnN3ZXJfdG9rZW5zJTIwJTNEJTIwaW5wdXRzLmlucHV0X2lkcyU1QjAlMkMlMjBhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0ElMjBhbnN3ZXJfZW5kX2luZGV4JTIwJTJCJTIwMSU1RCUwQSUwQSUyMyUyMHRhcmdldCUyMGlzJTIwJTIybmljZSUyMHB1cHBldCUyMiUwQXRhcmdldF9zdGFydF9pbmRleCUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxNCU1RCklMEF0YXJnZXRfZW5kX2luZGV4JTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QjE1JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3M=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, XLMRobertaXLForQuestionAnswering
<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-xlarge&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMRobertaXLForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;xlm-roberta-xlarge&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = outputs.start_logits.argmax()
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = outputs.end_logits.argmax()

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = torch.tensor([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss`}}),{c(){d=s("p"),M=l("Example:"),m=u(),y(p.$$.fragment)},l(n){d=a(n,"P",{});var c=r(d);M=i(c,"Example:"),c.forEach(o),m=f(n),T(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,M),b(n,m,c),v(p,n,c),_=!0},p:Le,i(n){_||(w(p.$$.fragment,n),_=!0)},o(n){k(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(m),X(p,n)}}}function zc(L){let d,M,m,p,_,n,c,R,Gs,is,te,$e,Do,_t,Ss,Ko,As,ds,Je,Vs,bt,Ys,Ps,cs,io,Qs,hs,co,en,Hs,ps,ho,Os,ms,po,Mt,Ds,tn,Ks,ea,us,Z,ta,yt,oa,na,Tt,sa,aa,vt,ra,la,fs,oe,xe,on,wt,ia,nn,da,gs,J,sn,mo,ca,ha,an,uo,pa,ma,rn,fo,ua,fa,ln,go,ga,_a,dn,_o,ba,Ma,cn,bo,ya,_s,ne,Ce,hn,kt,Ta,pn,va,bs,F,Xt,wa,Y,ka,Mo,Xa,La,mn,Ra,$a,Lt,Ja,xa,Ca,se,ja,yo,Fa,Ea,To,Ua,za,Wa,je,Ms,ae,Fe,un,Rt,Ia,fn,Za,ys,E,$t,Na,re,Ba,vo,qa,Ga,Jt,Sa,Aa,Va,K,Ya,gn,Pa,$,Qa,_n,Ha,Oa,bn,Da,Ka,Mn,er,tr,yn,or,nr,Tn,sr,ar,vn,rr,lr,wn,ir,dr,xt,cr,hr,N,Ct,pr,le,mr,wo,ur,fr,kn,gr,_r,br,Ee,Mr,Ue,Ts,ie,ze,Xn,jt,yr,Ln,Tr,vs,P,Ft,vr,Q,wr,Rn,kr,Xr,ko,Lr,Rr,Et,$r,Jr,xr,B,Ut,Cr,de,jr,Xo,Fr,Er,$n,Ur,zr,Wr,We,Ir,Ie,ws,ce,Ze,Jn,zt,Zr,xn,Nr,ks,H,Wt,Br,O,qr,Cn,Gr,Sr,Lo,Ar,Vr,It,Yr,Pr,Qr,q,Zt,Hr,he,Or,Ro,Dr,Kr,jn,el,tl,ol,Ne,nl,Be,Xs,pe,qe,Fn,Nt,sl,En,al,Ls,U,Bt,rl,Un,ll,il,me,dl,$o,cl,hl,qt,pl,ml,ul,C,Gt,fl,ue,gl,Jo,_l,bl,zn,Ml,yl,Tl,Ge,vl,Se,wl,Ae,Rs,fe,Ve,Wn,St,kl,In,Xl,$s,z,At,Ll,Zn,Rl,$l,ge,Jl,xo,xl,Cl,Vt,jl,Fl,El,G,Yt,Ul,_e,zl,Co,Wl,Il,Nn,Zl,Nl,Bl,Ye,ql,Pe,Js,be,Qe,Bn,Pt,Gl,qn,Sl,xs,W,Qt,Al,Gn,Vl,Yl,Me,Pl,jo,Ql,Hl,Ht,Ol,Dl,Kl,S,Ot,ei,ye,ti,Fo,oi,ni,Sn,si,ai,ri,He,li,Oe,Cs,Te,De,An,Dt,ii,Vn,di,js,I,Kt,ci,ve,hi,Yn,pi,mi,Pn,ui,fi,gi,we,_i,Eo,bi,Mi,eo,yi,Ti,vi,A,to,wi,ke,ki,Uo,Xi,Li,Qn,Ri,$i,Ji,Ke,xi,et,Fs;return n=new D({}),_t=new D({}),wt=new D({}),kt=new D({}),Xt=new x({props:{name:"class transformers.XLMRobertaXLConfig",anchor:"transformers.XLMRobertaXLConfig",parameters:[{name:"vocab_size",val:" = 250880"},{name:"hidden_size",val:" = 2560"},{name:"num_hidden_layers",val:" = 36"},{name:"num_attention_heads",val:" = 32"},{name:"intermediate_size",val:" = 10240"},{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:" = 514"},{name:"type_vocab_size",val:" = 1"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-05"},{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.XLMRobertaXLConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 250880) &#x2014;
Vocabulary size of the XLM_ROBERTA_XL model. Defines the number of different tokens that can be represented
by the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLModel">XLMRobertaXLModel</a>.`,name:"vocab_size"},{anchor:"transformers.XLMRobertaXLConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2560) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.XLMRobertaXLConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 36) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.XLMRobertaXLConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 32) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.XLMRobertaXLConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 10240) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.XLMRobertaXLConfig.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.XLMRobertaXLConfig.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.XLMRobertaXLConfig.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.XLMRobertaXLConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 514) &#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.XLMRobertaXLConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLModel">XLMRobertaXLModel</a> or
<code>TFXLMRobertaXLModel</code>.`,name:"type_vocab_size"},{anchor:"transformers.XLMRobertaXLConfig.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.XLMRobertaXLConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.XLMRobertaXLConfig.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.XLMRobertaXLConfig.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.XLMRobertaXLConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/xlm_roberta_xl/configuration_xlm_roberta_xl.py#L34"}}),je=new Xe({props:{anchor:"transformers.XLMRobertaXLConfig.example",$$slots:{default:[yc]},$$scope:{ctx:L}}}),Rt=new D({}),$t=new x({props:{name:"class transformers.XLMRobertaXLModel",anchor:"transformers.XLMRobertaXLModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.XLMRobertaXLModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLConfig">XLMRobertaXLConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L664"}}),Ct=new x({props:{name:"forward",anchor:"transformers.XLMRobertaXLModel.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.XLMRobertaXLModel.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. Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMRobertaXLModel.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>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.XLMRobertaXLModel.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.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaXLModel.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>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMRobertaXLModel.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.XLMRobertaXLModel.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.XLMRobertaXLModel.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.XLMRobertaXLModel.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.XLMRobertaXLModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMRobertaXLModel.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.XLMRobertaXLModel.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.XLMRobertaXLModel.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.XLMRobertaXLModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L702",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLConfig"
>XLMRobertaXLConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ee=new lo({props:{$$slots:{default:[Tc]},$$scope:{ctx:L}}}),Ue=new Xe({props:{anchor:"transformers.XLMRobertaXLModel.forward.example",$$slots:{default:[vc]},$$scope:{ctx:L}}}),jt=new D({}),Ft=new x({props:{name:"class transformers.XLMRobertaXLForCausalLM",anchor:"transformers.XLMRobertaXLForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLMRobertaXLForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLConfig">XLMRobertaXLConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L844"}}),Ut=new x({props:{name:"forward",anchor:"transformers.XLMRobertaXLForCausalLM.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.Optional[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.XLMRobertaXLForCausalLM.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. Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMRobertaXLForCausalLM.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>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.XLMRobertaXLForCausalLM.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.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaXLForCausalLM.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>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMRobertaXLForCausalLM.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.XLMRobertaXLForCausalLM.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.XLMRobertaXLForCausalLM.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.XLMRobertaXLForCausalLM.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.XLMRobertaXLForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMRobertaXLForCausalLM.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.XLMRobertaXLForCausalLM.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.XLMRobertaXLForCausalLM.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.XLMRobertaXLForCausalLM.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.
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.XLMRobertaXLForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L864",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLConfig"
>XLMRobertaXLConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),We=new lo({props:{$$slots:{default:[wc]},$$scope:{ctx:L}}}),Ie=new Xe({props:{anchor:"transformers.XLMRobertaXLForCausalLM.forward.example",$$slots:{default:[kc]},$$scope:{ctx:L}}}),zt=new D({}),Wt=new x({props:{name:"class transformers.XLMRobertaXLForMaskedLM",anchor:"transformers.XLMRobertaXLForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLMRobertaXLForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLConfig">XLMRobertaXLConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L989"}}),Zt=new x({props:{name:"forward",anchor:"transformers.XLMRobertaXLForMaskedLM.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.Tensor] = 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.XLMRobertaXLForMaskedLM.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. Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMRobertaXLForMaskedLM.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>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.XLMRobertaXLForMaskedLM.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.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaXLForMaskedLM.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>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMRobertaXLForMaskedLM.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.XLMRobertaXLForMaskedLM.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.XLMRobertaXLForMaskedLM.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.XLMRobertaXLForMaskedLM.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.XLMRobertaXLForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMRobertaXLForMaskedLM.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.XLMRobertaXLForMaskedLM.forward.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, any]</code>, optional, defaults to <em>{}</em>) &#x2014;
Used to hide legacy arguments that have been deprecated.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1012",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLConfig"
>XLMRobertaXLConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ne=new lo({props:{$$slots:{default:[Xc]},$$scope:{ctx:L}}}),Be=new Xe({props:{anchor:"transformers.XLMRobertaXLForMaskedLM.forward.example",$$slots:{default:[Lc]},$$scope:{ctx:L}}}),Nt=new D({}),Bt=new x({props:{name:"class transformers.XLMRobertaXLForSequenceClassification",anchor:"transformers.XLMRobertaXLForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLMRobertaXLForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLConfig">XLMRobertaXLConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1111"}}),Gt=new x({props:{name:"forward",anchor:"transformers.XLMRobertaXLForSequenceClassification.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.XLMRobertaXLForSequenceClassification.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. Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMRobertaXLForSequenceClassification.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>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.XLMRobertaXLForSequenceClassification.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.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaXLForSequenceClassification.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>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMRobertaXLForSequenceClassification.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.XLMRobertaXLForSequenceClassification.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.XLMRobertaXLForSequenceClassification.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.XLMRobertaXLForSequenceClassification.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.XLMRobertaXLForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMRobertaXLForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1122",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLConfig"
>XLMRobertaXLConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ge=new lo({props:{$$slots:{default:[Rc]},$$scope:{ctx:L}}}),Se=new Xe({props:{anchor:"transformers.XLMRobertaXLForSequenceClassification.forward.example",$$slots:{default:[$c]},$$scope:{ctx:L}}}),Ae=new Xe({props:{anchor:"transformers.XLMRobertaXLForSequenceClassification.forward.example-2",$$slots:{default:[Jc]},$$scope:{ctx:L}}}),St=new D({}),At=new x({props:{name:"class transformers.XLMRobertaXLForMultipleChoice",anchor:"transformers.XLMRobertaXLForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLMRobertaXLForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLConfig">XLMRobertaXLConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1205"}}),Yt=new x({props:{name:"forward",anchor:"transformers.XLMRobertaXLForMultipleChoice.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.XLMRobertaXLForMultipleChoice.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. Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMRobertaXLForMultipleChoice.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>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.XLMRobertaXLForMultipleChoice.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.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaXLForMultipleChoice.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>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMRobertaXLForMultipleChoice.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.XLMRobertaXLForMultipleChoice.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.XLMRobertaXLForMultipleChoice.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.XLMRobertaXLForMultipleChoice.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.XLMRobertaXLForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMRobertaXLForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1215",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLConfig"
>XLMRobertaXLConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ye=new lo({props:{$$slots:{default:[xc]},$$scope:{ctx:L}}}),Pe=new Xe({props:{anchor:"transformers.XLMRobertaXLForMultipleChoice.forward.example",$$slots:{default:[Cc]},$$scope:{ctx:L}}}),Pt=new D({}),Qt=new x({props:{name:"class transformers.XLMRobertaXLForTokenClassification",anchor:"transformers.XLMRobertaXLForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLMRobertaXLForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLConfig">XLMRobertaXLConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1296"}}),Ot=new x({props:{name:"forward",anchor:"transformers.XLMRobertaXLForTokenClassification.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.XLMRobertaXLForTokenClassification.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. Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMRobertaXLForTokenClassification.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>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.XLMRobertaXLForTokenClassification.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.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaXLForTokenClassification.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>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMRobertaXLForTokenClassification.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.XLMRobertaXLForTokenClassification.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.XLMRobertaXLForTokenClassification.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.XLMRobertaXLForTokenClassification.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.XLMRobertaXLForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMRobertaXLForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1310",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLConfig"
>XLMRobertaXLConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),He=new lo({props:{$$slots:{default:[jc]},$$scope:{ctx:L}}}),Oe=new Xe({props:{anchor:"transformers.XLMRobertaXLForTokenClassification.forward.example",$$slots:{default:[Fc]},$$scope:{ctx:L}}}),Dt=new D({}),Kt=new x({props:{name:"class transformers.XLMRobertaXLForQuestionAnswering",anchor:"transformers.XLMRobertaXLForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLMRobertaXLForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLConfig">XLMRobertaXLConfig</a>) &#x2014; Model configuration class with all the parameters of the
model. Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1407"}}),to=new x({props:{name:"forward",anchor:"transformers.XLMRobertaXLForQuestionAnswering.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.XLMRobertaXLForQuestionAnswering.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. Indices can be obtained using <a href="/docs/transformers/v4.31.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.31.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.31.0/en/model_doc/wav2vec2#transformers.Wav2Vec2CTCTokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMRobertaXLForQuestionAnswering.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>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.XLMRobertaXLForQuestionAnswering.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.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaXLForQuestionAnswering.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>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMRobertaXLForQuestionAnswering.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.XLMRobertaXLForQuestionAnswering.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.XLMRobertaXLForQuestionAnswering.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.XLMRobertaXLForQuestionAnswering.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.XLMRobertaXLForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMRobertaXLForQuestionAnswering.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.XLMRobertaXLForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.31.0/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1417",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLConfig"
>XLMRobertaXLConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.31.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ke=new lo({props:{$$slots:{default:[Ec]},$$scope:{ctx:L}}}),et=new Xe({props:{anchor:"transformers.XLMRobertaXLForQuestionAnswering.forward.example",$$slots:{default:[Uc]},$$scope:{ctx:L}}}),{c(){d=s("meta"),M=u(),m=s("h1"),p=s("a"),_=s("span"),y(n.$$.fragment),c=u(),R=s("span"),Gs=l("XLM-RoBERTa-XL"),is=u(),te=s("h2"),$e=s("a"),Do=s("span"),y(_t.$$.fragment),Ss=u(),Ko=s("span"),As=l("Overview"),ds=u(),Je=s("p"),Vs=l("The XLM-RoBERTa-XL model was proposed in "),bt=s("a"),Ys=l("Larger-Scale Transformers for Multilingual Masked Language Modeling"),Ps=l(" by Naman Goyal, Jingfei Du, Myle Ott, Giri Anantharaman, Alexis Conneau."),cs=u(),io=s("p"),Qs=l("The abstract from the paper is the following:"),hs=u(),co=s("p"),en=s("em"),Hs=l("Recent work has demonstrated the effectiveness of cross-lingual language model pretraining for cross-lingual understanding. In this study, we present the results of two larger multilingual masked language models, with 3.5B and 10.7B parameters. Our two new models dubbed XLM-R XL and XLM-R XXL outperform XLM-R by 1.8% and 2.4% average accuracy on XNLI. Our model also outperforms the RoBERTa-Large model on several English tasks of the GLUE benchmark by 0.3% on average while handling 99 more languages. This suggests pretrained models with larger capacity may obtain both strong performance on high-resource languages while greatly improving low-resource languages. We make our code and models publicly available."),ps=u(),ho=s("p"),Os=l("Tips:"),ms=u(),po=s("ul"),Mt=s("li"),Ds=l(`XLM-RoBERTa-XL is a multilingual model trained on 100 different languages. Unlike some XLM multilingual models, it does
not require `),tn=s("code"),Ks=l("lang"),ea=l(` tensors to understand which language is used, and should be able to determine the correct
language from the input ids.`),us=u(),Z=s("p"),ta=l("This model was contributed by "),yt=s("a"),oa=l("Soonhwan-Kwon"),na=l(" and "),Tt=s("a"),sa=l("stefan-it"),aa=l(". The original code can be found "),vt=s("a"),ra=l("here"),la=l("."),fs=u(),oe=s("h2"),xe=s("a"),on=s("span"),y(wt.$$.fragment),ia=u(),nn=s("span"),da=l("Documentation resources"),gs=u(),J=s("ul"),sn=s("li"),mo=s("a"),ca=l("Text classification task guide"),ha=u(),an=s("li"),uo=s("a"),pa=l("Token classification task guide"),ma=u(),rn=s("li"),fo=s("a"),ua=l("Question answering task guide"),fa=u(),ln=s("li"),go=s("a"),ga=l("Causal language modeling task guide"),_a=u(),dn=s("li"),_o=s("a"),ba=l("Masked language modeling task guide"),Ma=u(),cn=s("li"),bo=s("a"),ya=l("Multiple choice task guide"),_s=u(),ne=s("h2"),Ce=s("a"),hn=s("span"),y(kt.$$.fragment),Ta=u(),pn=s("span"),va=l("XLMRobertaXLConfig"),bs=u(),F=s("div"),y(Xt.$$.fragment),wa=u(),Y=s("p"),ka=l("This is the configuration class to store the configuration of a "),Mo=s("a"),Xa=l("XLMRobertaXLModel"),La=l(" or a "),mn=s("code"),Ra=l("TFXLMRobertaXLModel"),$a=l(`.
It is used to instantiate a XLM_ROBERTA_XL 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
XLM_ROBERTA_XL `),Lt=s("a"),Ja=l("facebook/xlm-roberta-xl"),xa=l(" architecture."),Ca=u(),se=s("p"),ja=l("Configuration objects inherit from "),yo=s("a"),Fa=l("PretrainedConfig"),Ea=l(` and can be used to control the model outputs. Read the
documentation from `),To=s("a"),Ua=l("PretrainedConfig"),za=l(" for more information."),Wa=u(),y(je.$$.fragment),Ms=u(),ae=s("h2"),Fe=s("a"),un=s("span"),y(Rt.$$.fragment),Ia=u(),fn=s("span"),Za=l("XLMRobertaXLModel"),ys=u(),E=s("div"),y($t.$$.fragment),Na=u(),re=s("p"),Ba=l(`The bare XLM-RoBERTa-xlarge Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),vo=s("a"),qa=l("PreTrainedModel"),Ga=l(`. 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.) This model is also a PyTorch `),Jt=s("a"),Sa=l("torch.nn.Module"),Aa=l(`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Va=u(),K=s("p"),Ya=l(`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 `),gn=s("em"),Pa=l(`Attention is
all you need`),$=s("em"),Qa=l(`by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin. To behave as an decoder the model needs to be initialized with the `),_n=s("code"),Ha=l("is_decoder"),Oa=l(`
argument of the configuration set to `),bn=s("code"),Da=l("True"),Ka=l(`. To be used in a Seq2Seq model, the model needs to initialized with
both `),Mn=s("code"),er=l("is_decoder"),tr=l(" argument and "),yn=s("code"),or=l("add_cross_attention"),nr=l(" set to "),Tn=s("code"),sr=l("True"),ar=l("; an "),vn=s("code"),rr=l("encoder_hidden_states"),lr=l(` is then expected as
an input to the forward pass. .. `),wn=s("em"),ir=l("Attention is all you need"),dr=l(": "),xt=s("a"),cr=l("https://arxiv.org/abs/1706.03762"),hr=u(),N=s("div"),y(Ct.$$.fragment),pr=u(),le=s("p"),mr=l("The "),wo=s("a"),ur=l("XLMRobertaXLModel"),fr=l(" forward method, overrides the "),kn=s("code"),gr=l("__call__"),_r=l(" special method."),br=u(),y(Ee.$$.fragment),Mr=u(),y(Ue.$$.fragment),Ts=u(),ie=s("h2"),ze=s("a"),Xn=s("span"),y(jt.$$.fragment),yr=u(),Ln=s("span"),Tr=l("XLMRobertaXLForCausalLM"),vs=u(),P=s("div"),y(Ft.$$.fragment),vr=u(),Q=s("p"),wr=l("XLM-RoBERTa-xlarge Model with a "),Rn=s("code"),kr=l("language modeling"),Xr=l(` head on top for CLM fine-tuning.
This model inherits from `),ko=s("a"),Lr=l("PreTrainedModel"),Rr=l(`. 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.) This model is also a PyTorch `),Et=s("a"),$r=l("torch.nn.Module"),Jr=l(`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),xr=u(),B=s("div"),y(Ut.$$.fragment),Cr=u(),de=s("p"),jr=l("The "),Xo=s("a"),Fr=l("XLMRobertaXLForCausalLM"),Er=l(" forward method, overrides the "),$n=s("code"),Ur=l("__call__"),zr=l(" special method."),Wr=u(),y(We.$$.fragment),Ir=u(),y(Ie.$$.fragment),ws=u(),ce=s("h2"),Ze=s("a"),Jn=s("span"),y(zt.$$.fragment),Zr=u(),xn=s("span"),Nr=l("XLMRobertaXLForMaskedLM"),ks=u(),H=s("div"),y(Wt.$$.fragment),Br=u(),O=s("p"),qr=l("XLM-RoBERTa-xlarge Model with a "),Cn=s("code"),Gr=l("language modeling"),Sr=l(` head on top.
This model inherits from `),Lo=s("a"),Ar=l("PreTrainedModel"),Vr=l(`. 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.) This model is also a PyTorch `),It=s("a"),Yr=l("torch.nn.Module"),Pr=l(`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Qr=u(),q=s("div"),y(Zt.$$.fragment),Hr=u(),he=s("p"),Or=l("The "),Ro=s("a"),Dr=l("XLMRobertaXLForMaskedLM"),Kr=l(" forward method, overrides the "),jn=s("code"),el=l("__call__"),tl=l(" special method."),ol=u(),y(Ne.$$.fragment),nl=u(),y(Be.$$.fragment),Xs=u(),pe=s("h2"),qe=s("a"),Fn=s("span"),y(Nt.$$.fragment),sl=u(),En=s("span"),al=l("XLMRobertaXLForSequenceClassification"),Ls=u(),U=s("div"),y(Bt.$$.fragment),rl=u(),Un=s("p"),ll=l(`XLM-RoBERTa-xlarge Model transformer with a sequence classification/regression head on top (a linear layer on top
of the pooled output) e.g. for GLUE tasks.`),il=u(),me=s("p"),dl=l("This model inherits from "),$o=s("a"),cl=l("PreTrainedModel"),hl=l(`. 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.) This model is also a PyTorch `),qt=s("a"),pl=l("torch.nn.Module"),ml=l(`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),ul=u(),C=s("div"),y(Gt.$$.fragment),fl=u(),ue=s("p"),gl=l("The "),Jo=s("a"),_l=l("XLMRobertaXLForSequenceClassification"),bl=l(" forward method, overrides the "),zn=s("code"),Ml=l("__call__"),yl=l(" special method."),Tl=u(),y(Ge.$$.fragment),vl=u(),y(Se.$$.fragment),wl=u(),y(Ae.$$.fragment),Rs=u(),fe=s("h2"),Ve=s("a"),Wn=s("span"),y(St.$$.fragment),kl=u(),In=s("span"),Xl=l("XLMRobertaXLForMultipleChoice"),$s=u(),z=s("div"),y(At.$$.fragment),Ll=u(),Zn=s("p"),Rl=l(`XLM-Roberta-xlarge 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.`),$l=u(),ge=s("p"),Jl=l("This model inherits from "),xo=s("a"),xl=l("PreTrainedModel"),Cl=l(`. 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.) This model is also a PyTorch `),Vt=s("a"),jl=l("torch.nn.Module"),Fl=l(`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),El=u(),G=s("div"),y(Yt.$$.fragment),Ul=u(),_e=s("p"),zl=l("The "),Co=s("a"),Wl=l("XLMRobertaXLForMultipleChoice"),Il=l(" forward method, overrides the "),Nn=s("code"),Zl=l("__call__"),Nl=l(" special method."),Bl=u(),y(Ye.$$.fragment),ql=u(),y(Pe.$$.fragment),Js=u(),be=s("h2"),Qe=s("a"),Bn=s("span"),y(Pt.$$.fragment),Gl=u(),qn=s("span"),Sl=l("XLMRobertaXLForTokenClassification"),xs=u(),W=s("div"),y(Qt.$$.fragment),Al=u(),Gn=s("p"),Vl=l(`XLM-Roberta-xlarge 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.`),Yl=u(),Me=s("p"),Pl=l("This model inherits from "),jo=s("a"),Ql=l("PreTrainedModel"),Hl=l(`. 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.) This model is also a PyTorch `),Ht=s("a"),Ol=l("torch.nn.Module"),Dl=l(`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Kl=u(),S=s("div"),y(Ot.$$.fragment),ei=u(),ye=s("p"),ti=l("The "),Fo=s("a"),oi=l("XLMRobertaXLForTokenClassification"),ni=l(" forward method, overrides the "),Sn=s("code"),si=l("__call__"),ai=l(" special method."),ri=u(),y(He.$$.fragment),li=u(),y(Oe.$$.fragment),Cs=u(),Te=s("h2"),De=s("a"),An=s("span"),y(Dt.$$.fragment),ii=u(),Vn=s("span"),di=l("XLMRobertaXLForQuestionAnswering"),js=u(),I=s("div"),y(Kt.$$.fragment),ci=u(),ve=s("p"),hi=l(`XLM-Roberta-xlarge 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 `),Yn=s("code"),pi=l("span start logits"),mi=l(" and "),Pn=s("code"),ui=l("span end logits"),fi=l(")."),gi=u(),we=s("p"),_i=l("This model inherits from "),Eo=s("a"),bi=l("PreTrainedModel"),Mi=l(`. 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.) This model is also a PyTorch `),eo=s("a"),yi=l("torch.nn.Module"),Ti=l(`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),vi=u(),A=s("div"),y(to.$$.fragment),wi=u(),ke=s("p"),ki=l("The "),Uo=s("a"),Xi=l("XLMRobertaXLForQuestionAnswering"),Li=l(" forward method, overrides the "),Qn=s("code"),Ri=l("__call__"),$i=l(" special method."),Ji=u(),y(Ke.$$.fragment),xi=u(),y(et.$$.fragment),this.h()},l(t){const g=bc('[data-svelte="svelte-1phssyn"]',document.head);d=a(g,"META",{name:!0,content:!0}),g.forEach(o),M=f(t),m=a(t,"H1",{class:!0});var oo=r(m);p=a(oo,"A",{id:!0,class:!0,href:!0});var Hn=r(p);_=a(Hn,"SPAN",{});var On=r(_);T(n.$$.fragment,On),On.forEach(o),Hn.forEach(o),c=f(oo),R=a(oo,"SPAN",{});var Dn=r(R);Gs=i(Dn,"XLM-RoBERTa-XL"),Dn.forEach(o),oo.forEach(o),is=f(t),te=a(t,"H2",{class:!0});var no=r(te);$e=a(no,"A",{id:!0,class:!0,href:!0});var Kn=r($e);Do=a(Kn,"SPAN",{});var es=r(Do);T(_t.$$.fragment,es),es.forEach(o),Kn.forEach(o),Ss=f(no),Ko=a(no,"SPAN",{});var ts=r(Ko);As=i(ts,"Overview"),ts.forEach(o),no.forEach(o),ds=f(t),Je=a(t,"P",{});var so=r(Je);Vs=i(so,"The XLM-RoBERTa-XL model was proposed in "),bt=a(so,"A",{href:!0,rel:!0});var os=r(bt);Ys=i(os,"Larger-Scale Transformers for Multilingual Masked Language Modeling"),os.forEach(o),Ps=i(so," by Naman Goyal, Jingfei Du, Myle Ott, Giri Anantharaman, Alexis Conneau."),so.forEach(o),cs=f(t),io=a(t,"P",{});var ns=r(io);Qs=i(ns,"The abstract from the paper is the following:"),ns.forEach(o),hs=f(t),co=a(t,"P",{});var ss=r(co);en=a(ss,"EM",{});var as=r(en);Hs=i(as,"Recent work has demonstrated the effectiveness of cross-lingual language model pretraining for cross-lingual understanding. In this study, we present the results of two larger multilingual masked language models, with 3.5B and 10.7B parameters. Our two new models dubbed XLM-R XL and XLM-R XXL outperform XLM-R by 1.8% and 2.4% average accuracy on XNLI. Our model also outperforms the RoBERTa-Large model on several English tasks of the GLUE benchmark by 0.3% on average while handling 99 more languages. This suggests pretrained models with larger capacity may obtain both strong performance on high-resource languages while greatly improving low-resource languages. We make our code and models publicly available."),as.forEach(o),ss.forEach(o),ps=f(t),ho=a(t,"P",{});var rs=r(ho);Os=i(rs,"Tips:"),rs.forEach(o),ms=f(t),po=a(t,"UL",{});var ls=r(po);Mt=a(ls,"LI",{});var ao=r(Mt);Ds=i(ao,`XLM-RoBERTa-XL is a multilingual model trained on 100 different languages. Unlike some XLM multilingual models, it does
not require `),tn=a(ao,"CODE",{});var Ci=r(tn);Ks=i(Ci,"lang"),Ci.forEach(o),ea=i(ao,` tensors to understand which language is used, and should be able to determine the correct
language from the input ids.`),ao.forEach(o),ls.forEach(o),us=f(t),Z=a(t,"P",{});var tt=r(Z);ta=i(tt,"This model was contributed by "),yt=a(tt,"A",{href:!0,rel:!0});var ji=r(yt);oa=i(ji,"Soonhwan-Kwon"),ji.forEach(o),na=i(tt," and "),Tt=a(tt,"A",{href:!0,rel:!0});var Fi=r(Tt);sa=i(Fi,"stefan-it"),Fi.forEach(o),aa=i(tt,". The original code can be found "),vt=a(tt,"A",{href:!0,rel:!0});var Ei=r(vt);ra=i(Ei,"here"),Ei.forEach(o),la=i(tt,"."),tt.forEach(o),fs=f(t),oe=a(t,"H2",{class:!0});var Es=r(oe);xe=a(Es,"A",{id:!0,class:!0,href:!0});var Ui=r(xe);on=a(Ui,"SPAN",{});var zi=r(on);T(wt.$$.fragment,zi),zi.forEach(o),Ui.forEach(o),ia=f(Es),nn=a(Es,"SPAN",{});var Wi=r(nn);da=i(Wi,"Documentation resources"),Wi.forEach(o),Es.forEach(o),gs=f(t),J=a(t,"UL",{});var V=r(J);sn=a(V,"LI",{});var Ii=r(sn);mo=a(Ii,"A",{href:!0});var Zi=r(mo);ca=i(Zi,"Text classification task guide"),Zi.forEach(o),Ii.forEach(o),ha=f(V),an=a(V,"LI",{});var Ni=r(an);uo=a(Ni,"A",{href:!0});var Bi=r(uo);pa=i(Bi,"Token classification task guide"),Bi.forEach(o),Ni.forEach(o),ma=f(V),rn=a(V,"LI",{});var qi=r(rn);fo=a(qi,"A",{href:!0});var Gi=r(fo);ua=i(Gi,"Question answering task guide"),Gi.forEach(o),qi.forEach(o),fa=f(V),ln=a(V,"LI",{});var Si=r(ln);go=a(Si,"A",{href:!0});var Ai=r(go);ga=i(Ai,"Causal language modeling task guide"),Ai.forEach(o),Si.forEach(o),_a=f(V),dn=a(V,"LI",{});var Vi=r(dn);_o=a(Vi,"A",{href:!0});var Yi=r(_o);ba=i(Yi,"Masked language modeling task guide"),Yi.forEach(o),Vi.forEach(o),Ma=f(V),cn=a(V,"LI",{});var Pi=r(cn);bo=a(Pi,"A",{href:!0});var Qi=r(bo);ya=i(Qi,"Multiple choice task guide"),Qi.forEach(o),Pi.forEach(o),V.forEach(o),_s=f(t),ne=a(t,"H2",{class:!0});var Us=r(ne);Ce=a(Us,"A",{id:!0,class:!0,href:!0});var Hi=r(Ce);hn=a(Hi,"SPAN",{});var Oi=r(hn);T(kt.$$.fragment,Oi),Oi.forEach(o),Hi.forEach(o),Ta=f(Us),pn=a(Us,"SPAN",{});var Di=r(pn);va=i(Di,"XLMRobertaXLConfig"),Di.forEach(o),Us.forEach(o),bs=f(t),F=a(t,"DIV",{class:!0});var ot=r(F);T(Xt.$$.fragment,ot),wa=f(ot),Y=a(ot,"P",{});var nt=r(Y);ka=i(nt,"This is the configuration class to store the configuration of a "),Mo=a(nt,"A",{href:!0});var Ki=r(Mo);Xa=i(Ki,"XLMRobertaXLModel"),Ki.forEach(o),La=i(nt," or a "),mn=a(nt,"CODE",{});var ed=r(mn);Ra=i(ed,"TFXLMRobertaXLModel"),ed.forEach(o),$a=i(nt,`.
It is used to instantiate a XLM_ROBERTA_XL 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
XLM_ROBERTA_XL `),Lt=a(nt,"A",{href:!0,rel:!0});var td=r(Lt);Ja=i(td,"facebook/xlm-roberta-xl"),td.forEach(o),xa=i(nt," architecture."),nt.forEach(o),Ca=f(ot),se=a(ot,"P",{});var zo=r(se);ja=i(zo,"Configuration objects inherit from "),yo=a(zo,"A",{href:!0});var od=r(yo);Fa=i(od,"PretrainedConfig"),od.forEach(o),Ea=i(zo,` and can be used to control the model outputs. Read the
documentation from `),To=a(zo,"A",{href:!0});var nd=r(To);Ua=i(nd,"PretrainedConfig"),nd.forEach(o),za=i(zo," for more information."),zo.forEach(o),Wa=f(ot),T(je.$$.fragment,ot),ot.forEach(o),Ms=f(t),ae=a(t,"H2",{class:!0});var zs=r(ae);Fe=a(zs,"A",{id:!0,class:!0,href:!0});var sd=r(Fe);un=a(sd,"SPAN",{});var ad=r(un);T(Rt.$$.fragment,ad),ad.forEach(o),sd.forEach(o),Ia=f(zs),fn=a(zs,"SPAN",{});var rd=r(fn);Za=i(rd,"XLMRobertaXLModel"),rd.forEach(o),zs.forEach(o),ys=f(t),E=a(t,"DIV",{class:!0});var st=r(E);T($t.$$.fragment,st),Na=f(st),re=a(st,"P",{});var Wo=r(re);Ba=i(Wo,`The bare XLM-RoBERTa-xlarge Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),vo=a(Wo,"A",{href:!0});var ld=r(vo);qa=i(ld,"PreTrainedModel"),ld.forEach(o),Ga=i(Wo,`. 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.) This model is also a PyTorch `),Jt=a(Wo,"A",{href:!0,rel:!0});var id=r(Jt);Sa=i(id,"torch.nn.Module"),id.forEach(o),Aa=i(Wo,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Wo.forEach(o),Va=f(st),K=a(st,"P",{});var ro=r(K);Ya=i(ro,`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 `),gn=a(ro,"EM",{});var dd=r(gn);Pa=i(dd,`Attention is
all you need`),dd.forEach(o),$=a(ro,"EM",{});var j=r($);Qa=i(j,`by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz
Kaiser and Illia Polosukhin. To behave as an decoder the model needs to be initialized with the `),_n=a(j,"CODE",{});var cd=r(_n);Ha=i(cd,"is_decoder"),cd.forEach(o),Oa=i(j,`
argument of the configuration set to `),bn=a(j,"CODE",{});var hd=r(bn);Da=i(hd,"True"),hd.forEach(o),Ka=i(j,`. To be used in a Seq2Seq model, the model needs to initialized with
both `),Mn=a(j,"CODE",{});var pd=r(Mn);er=i(pd,"is_decoder"),pd.forEach(o),tr=i(j," argument and "),yn=a(j,"CODE",{});var md=r(yn);or=i(md,"add_cross_attention"),md.forEach(o),nr=i(j," set to "),Tn=a(j,"CODE",{});var ud=r(Tn);sr=i(ud,"True"),ud.forEach(o),ar=i(j,"; an "),vn=a(j,"CODE",{});var fd=r(vn);rr=i(fd,"encoder_hidden_states"),fd.forEach(o),lr=i(j,` is then expected as
an input to the forward pass. .. `),j.forEach(o),wn=a(ro,"EM",{});var gd=r(wn);ir=i(gd,"Attention is all you need"),gd.forEach(o),dr=i(ro,": "),xt=a(ro,"A",{href:!0,rel:!0});var _d=r(xt);cr=i(_d,"https://arxiv.org/abs/1706.03762"),_d.forEach(o),ro.forEach(o),hr=f(st),N=a(st,"DIV",{class:!0});var at=r(N);T(Ct.$$.fragment,at),pr=f(at),le=a(at,"P",{});var Io=r(le);mr=i(Io,"The "),wo=a(Io,"A",{href:!0});var bd=r(wo);ur=i(bd,"XLMRobertaXLModel"),bd.forEach(o),fr=i(Io," forward method, overrides the "),kn=a(Io,"CODE",{});var Md=r(kn);gr=i(Md,"__call__"),Md.forEach(o),_r=i(Io," special method."),Io.forEach(o),br=f(at),T(Ee.$$.fragment,at),Mr=f(at),T(Ue.$$.fragment,at),at.forEach(o),st.forEach(o),Ts=f(t),ie=a(t,"H2",{class:!0});var Ws=r(ie);ze=a(Ws,"A",{id:!0,class:!0,href:!0});var yd=r(ze);Xn=a(yd,"SPAN",{});var Td=r(Xn);T(jt.$$.fragment,Td),Td.forEach(o),yd.forEach(o),yr=f(Ws),Ln=a(Ws,"SPAN",{});var vd=r(Ln);Tr=i(vd,"XLMRobertaXLForCausalLM"),vd.forEach(o),Ws.forEach(o),vs=f(t),P=a(t,"DIV",{class:!0});var Zo=r(P);T(Ft.$$.fragment,Zo),vr=f(Zo),Q=a(Zo,"P",{});var rt=r(Q);wr=i(rt,"XLM-RoBERTa-xlarge Model with a "),Rn=a(rt,"CODE",{});var wd=r(Rn);kr=i(wd,"language modeling"),wd.forEach(o),Xr=i(rt,` head on top for CLM fine-tuning.
This model inherits from `),ko=a(rt,"A",{href:!0});var kd=r(ko);Lr=i(kd,"PreTrainedModel"),kd.forEach(o),Rr=i(rt,`. 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.) This model is also a PyTorch `),Et=a(rt,"A",{href:!0,rel:!0});var Xd=r(Et);$r=i(Xd,"torch.nn.Module"),Xd.forEach(o),Jr=i(rt,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),rt.forEach(o),xr=f(Zo),B=a(Zo,"DIV",{class:!0});var lt=r(B);T(Ut.$$.fragment,lt),Cr=f(lt),de=a(lt,"P",{});var No=r(de);jr=i(No,"The "),Xo=a(No,"A",{href:!0});var Ld=r(Xo);Fr=i(Ld,"XLMRobertaXLForCausalLM"),Ld.forEach(o),Er=i(No," forward method, overrides the "),$n=a(No,"CODE",{});var Rd=r($n);Ur=i(Rd,"__call__"),Rd.forEach(o),zr=i(No," special method."),No.forEach(o),Wr=f(lt),T(We.$$.fragment,lt),Ir=f(lt),T(Ie.$$.fragment,lt),lt.forEach(o),Zo.forEach(o),ws=f(t),ce=a(t,"H2",{class:!0});var Is=r(ce);Ze=a(Is,"A",{id:!0,class:!0,href:!0});var $d=r(Ze);Jn=a($d,"SPAN",{});var Jd=r(Jn);T(zt.$$.fragment,Jd),Jd.forEach(o),$d.forEach(o),Zr=f(Is),xn=a(Is,"SPAN",{});var xd=r(xn);Nr=i(xd,"XLMRobertaXLForMaskedLM"),xd.forEach(o),Is.forEach(o),ks=f(t),H=a(t,"DIV",{class:!0});var Bo=r(H);T(Wt.$$.fragment,Bo),Br=f(Bo),O=a(Bo,"P",{});var it=r(O);qr=i(it,"XLM-RoBERTa-xlarge Model with a "),Cn=a(it,"CODE",{});var Cd=r(Cn);Gr=i(Cd,"language modeling"),Cd.forEach(o),Sr=i(it,` head on top.
This model inherits from `),Lo=a(it,"A",{href:!0});var jd=r(Lo);Ar=i(jd,"PreTrainedModel"),jd.forEach(o),Vr=i(it,`. 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.) This model is also a PyTorch `),It=a(it,"A",{href:!0,rel:!0});var Fd=r(It);Yr=i(Fd,"torch.nn.Module"),Fd.forEach(o),Pr=i(it,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),it.forEach(o),Qr=f(Bo),q=a(Bo,"DIV",{class:!0});var dt=r(q);T(Zt.$$.fragment,dt),Hr=f(dt),he=a(dt,"P",{});var qo=r(he);Or=i(qo,"The "),Ro=a(qo,"A",{href:!0});var Ed=r(Ro);Dr=i(Ed,"XLMRobertaXLForMaskedLM"),Ed.forEach(o),Kr=i(qo," forward method, overrides the "),jn=a(qo,"CODE",{});var Ud=r(jn);el=i(Ud,"__call__"),Ud.forEach(o),tl=i(qo," special method."),qo.forEach(o),ol=f(dt),T(Ne.$$.fragment,dt),nl=f(dt),T(Be.$$.fragment,dt),dt.forEach(o),Bo.forEach(o),Xs=f(t),pe=a(t,"H2",{class:!0});var Zs=r(pe);qe=a(Zs,"A",{id:!0,class:!0,href:!0});var zd=r(qe);Fn=a(zd,"SPAN",{});var Wd=r(Fn);T(Nt.$$.fragment,Wd),Wd.forEach(o),zd.forEach(o),sl=f(Zs),En=a(Zs,"SPAN",{});var Id=r(En);al=i(Id,"XLMRobertaXLForSequenceClassification"),Id.forEach(o),Zs.forEach(o),Ls=f(t),U=a(t,"DIV",{class:!0});var ct=r(U);T(Bt.$$.fragment,ct),rl=f(ct),Un=a(ct,"P",{});var Zd=r(Un);ll=i(Zd,`XLM-RoBERTa-xlarge Model transformer with a sequence classification/regression head on top (a linear layer on top
of the pooled output) e.g. for GLUE tasks.`),Zd.forEach(o),il=f(ct),me=a(ct,"P",{});var Go=r(me);dl=i(Go,"This model inherits from "),$o=a(Go,"A",{href:!0});var Nd=r($o);cl=i(Nd,"PreTrainedModel"),Nd.forEach(o),hl=i(Go,`. 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.) This model is also a PyTorch `),qt=a(Go,"A",{href:!0,rel:!0});var Bd=r(qt);pl=i(Bd,"torch.nn.Module"),Bd.forEach(o),ml=i(Go,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Go.forEach(o),ul=f(ct),C=a(ct,"DIV",{class:!0});var ee=r(C);T(Gt.$$.fragment,ee),fl=f(ee),ue=a(ee,"P",{});var So=r(ue);gl=i(So,"The "),Jo=a(So,"A",{href:!0});var qd=r(Jo);_l=i(qd,"XLMRobertaXLForSequenceClassification"),qd.forEach(o),bl=i(So," forward method, overrides the "),zn=a(So,"CODE",{});var Gd=r(zn);Ml=i(Gd,"__call__"),Gd.forEach(o),yl=i(So," special method."),So.forEach(o),Tl=f(ee),T(Ge.$$.fragment,ee),vl=f(ee),T(Se.$$.fragment,ee),wl=f(ee),T(Ae.$$.fragment,ee),ee.forEach(o),ct.forEach(o),Rs=f(t),fe=a(t,"H2",{class:!0});var Ns=r(fe);Ve=a(Ns,"A",{id:!0,class:!0,href:!0});var Sd=r(Ve);Wn=a(Sd,"SPAN",{});var Ad=r(Wn);T(St.$$.fragment,Ad),Ad.forEach(o),Sd.forEach(o),kl=f(Ns),In=a(Ns,"SPAN",{});var Vd=r(In);Xl=i(Vd,"XLMRobertaXLForMultipleChoice"),Vd.forEach(o),Ns.forEach(o),$s=f(t),z=a(t,"DIV",{class:!0});var ht=r(z);T(At.$$.fragment,ht),Ll=f(ht),Zn=a(ht,"P",{});var Yd=r(Zn);Rl=i(Yd,`XLM-Roberta-xlarge 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.`),Yd.forEach(o),$l=f(ht),ge=a(ht,"P",{});var Ao=r(ge);Jl=i(Ao,"This model inherits from "),xo=a(Ao,"A",{href:!0});var Pd=r(xo);xl=i(Pd,"PreTrainedModel"),Pd.forEach(o),Cl=i(Ao,`. 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.) This model is also a PyTorch `),Vt=a(Ao,"A",{href:!0,rel:!0});var Qd=r(Vt);jl=i(Qd,"torch.nn.Module"),Qd.forEach(o),Fl=i(Ao,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Ao.forEach(o),El=f(ht),G=a(ht,"DIV",{class:!0});var pt=r(G);T(Yt.$$.fragment,pt),Ul=f(pt),_e=a(pt,"P",{});var Vo=r(_e);zl=i(Vo,"The "),Co=a(Vo,"A",{href:!0});var Hd=r(Co);Wl=i(Hd,"XLMRobertaXLForMultipleChoice"),Hd.forEach(o),Il=i(Vo," forward method, overrides the "),Nn=a(Vo,"CODE",{});var Od=r(Nn);Zl=i(Od,"__call__"),Od.forEach(o),Nl=i(Vo," special method."),Vo.forEach(o),Bl=f(pt),T(Ye.$$.fragment,pt),ql=f(pt),T(Pe.$$.fragment,pt),pt.forEach(o),ht.forEach(o),Js=f(t),be=a(t,"H2",{class:!0});var Bs=r(be);Qe=a(Bs,"A",{id:!0,class:!0,href:!0});var Dd=r(Qe);Bn=a(Dd,"SPAN",{});var Kd=r(Bn);T(Pt.$$.fragment,Kd),Kd.forEach(o),Dd.forEach(o),Gl=f(Bs),qn=a(Bs,"SPAN",{});var ec=r(qn);Sl=i(ec,"XLMRobertaXLForTokenClassification"),ec.forEach(o),Bs.forEach(o),xs=f(t),W=a(t,"DIV",{class:!0});var mt=r(W);T(Qt.$$.fragment,mt),Al=f(mt),Gn=a(mt,"P",{});var tc=r(Gn);Vl=i(tc,`XLM-Roberta-xlarge 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.`),tc.forEach(o),Yl=f(mt),Me=a(mt,"P",{});var Yo=r(Me);Pl=i(Yo,"This model inherits from "),jo=a(Yo,"A",{href:!0});var oc=r(jo);Ql=i(oc,"PreTrainedModel"),oc.forEach(o),Hl=i(Yo,`. 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.) This model is also a PyTorch `),Ht=a(Yo,"A",{href:!0,rel:!0});var nc=r(Ht);Ol=i(nc,"torch.nn.Module"),nc.forEach(o),Dl=i(Yo,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Yo.forEach(o),Kl=f(mt),S=a(mt,"DIV",{class:!0});var ut=r(S);T(Ot.$$.fragment,ut),ei=f(ut),ye=a(ut,"P",{});var Po=r(ye);ti=i(Po,"The "),Fo=a(Po,"A",{href:!0});var sc=r(Fo);oi=i(sc,"XLMRobertaXLForTokenClassification"),sc.forEach(o),ni=i(Po," forward method, overrides the "),Sn=a(Po,"CODE",{});var ac=r(Sn);si=i(ac,"__call__"),ac.forEach(o),ai=i(Po," special method."),Po.forEach(o),ri=f(ut),T(He.$$.fragment,ut),li=f(ut),T(Oe.$$.fragment,ut),ut.forEach(o),mt.forEach(o),Cs=f(t),Te=a(t,"H2",{class:!0});var qs=r(Te);De=a(qs,"A",{id:!0,class:!0,href:!0});var rc=r(De);An=a(rc,"SPAN",{});var lc=r(An);T(Dt.$$.fragment,lc),lc.forEach(o),rc.forEach(o),ii=f(qs),Vn=a(qs,"SPAN",{});var ic=r(Vn);di=i(ic,"XLMRobertaXLForQuestionAnswering"),ic.forEach(o),qs.forEach(o),js=f(t),I=a(t,"DIV",{class:!0});var ft=r(I);T(Kt.$$.fragment,ft),ci=f(ft),ve=a(ft,"P",{});var Qo=r(ve);hi=i(Qo,`XLM-Roberta-xlarge 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 `),Yn=a(Qo,"CODE",{});var dc=r(Yn);pi=i(dc,"span start logits"),dc.forEach(o),mi=i(Qo," and "),Pn=a(Qo,"CODE",{});var cc=r(Pn);ui=i(cc,"span end logits"),cc.forEach(o),fi=i(Qo,")."),Qo.forEach(o),gi=f(ft),we=a(ft,"P",{});var Ho=r(we);_i=i(Ho,"This model inherits from "),Eo=a(Ho,"A",{href:!0});var hc=r(Eo);bi=i(hc,"PreTrainedModel"),hc.forEach(o),Mi=i(Ho,`. 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.) This model is also a PyTorch `),eo=a(Ho,"A",{href:!0,rel:!0});var pc=r(eo);yi=i(pc,"torch.nn.Module"),pc.forEach(o),Ti=i(Ho,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Ho.forEach(o),vi=f(ft),A=a(ft,"DIV",{class:!0});var gt=r(A);T(to.$$.fragment,gt),wi=f(gt),ke=a(gt,"P",{});var Oo=r(ke);ki=i(Oo,"The "),Uo=a(Oo,"A",{href:!0});var mc=r(Uo);Xi=i(mc,"XLMRobertaXLForQuestionAnswering"),mc.forEach(o),Li=i(Oo," forward method, overrides the "),Qn=a(Oo,"CODE",{});var uc=r(Qn);Ri=i(uc,"__call__"),uc.forEach(o),$i=i(Oo," special method."),Oo.forEach(o),Ji=f(gt),T(Ke.$$.fragment,gt),xi=f(gt),T(et.$$.fragment,gt),gt.forEach(o),ft.forEach(o),this.h()},h(){h(d,"name","hf:doc:metadata"),h(d,"content",JSON.stringify(Wc)),h(p,"id","xlmrobertaxl"),h(p,"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"),h(p,"href","#xlmrobertaxl"),h(m,"class","relative group"),h($e,"id","overview"),h($e,"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"),h($e,"href","#overview"),h(te,"class","relative group"),h(bt,"href","https://arxiv.org/abs/2105.00572"),h(bt,"rel","nofollow"),h(yt,"href","https://github.com/Soonhwan-Kwon"),h(yt,"rel","nofollow"),h(Tt,"href","https://huggingface.co/stefan-it"),h(Tt,"rel","nofollow"),h(vt,"href","https://github.com/pytorch/fairseq/tree/master/examples/xlmr"),h(vt,"rel","nofollow"),h(xe,"id","documentation-resources"),h(xe,"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"),h(xe,"href","#documentation-resources"),h(oe,"class","relative group"),h(mo,"href","../tasks/sequence_classification"),h(uo,"href","../tasks/token_classification"),h(fo,"href","../tasks/question_answering"),h(go,"href","../tasks/language_modeling"),h(_o,"href","../tasks/masked_language_modeling"),h(bo,"href","../tasks/multiple_choice"),h(Ce,"id","transformers.XLMRobertaXLConfig"),h(Ce,"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"),h(Ce,"href","#transformers.XLMRobertaXLConfig"),h(ne,"class","relative group"),h(Mo,"href","/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLModel"),h(Lt,"href","https://huggingface.co/facebook/xlm-roberta-xl"),h(Lt,"rel","nofollow"),h(yo,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),h(To,"href","/docs/transformers/v4.31.0/en/main_classes/configuration#transformers.PretrainedConfig"),h(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Fe,"id","transformers.XLMRobertaXLModel"),h(Fe,"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"),h(Fe,"href","#transformers.XLMRobertaXLModel"),h(ae,"class","relative group"),h(vo,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),h(Jt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Jt,"rel","nofollow"),h(xt,"href","https://arxiv.org/abs/1706.03762"),h(xt,"rel","nofollow"),h(wo,"href","/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLModel"),h(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ze,"id","transformers.XLMRobertaXLForCausalLM"),h(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"),h(ze,"href","#transformers.XLMRobertaXLForCausalLM"),h(ie,"class","relative group"),h(ko,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),h(Et,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Et,"rel","nofollow"),h(Xo,"href","/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLForCausalLM"),h(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ze,"id","transformers.XLMRobertaXLForMaskedLM"),h(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"),h(Ze,"href","#transformers.XLMRobertaXLForMaskedLM"),h(ce,"class","relative group"),h(Lo,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),h(It,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(It,"rel","nofollow"),h(Ro,"href","/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLForMaskedLM"),h(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(qe,"id","transformers.XLMRobertaXLForSequenceClassification"),h(qe,"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"),h(qe,"href","#transformers.XLMRobertaXLForSequenceClassification"),h(pe,"class","relative group"),h($o,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),h(qt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(qt,"rel","nofollow"),h(Jo,"href","/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLForSequenceClassification"),h(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ve,"id","transformers.XLMRobertaXLForMultipleChoice"),h(Ve,"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"),h(Ve,"href","#transformers.XLMRobertaXLForMultipleChoice"),h(fe,"class","relative group"),h(xo,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),h(Vt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Vt,"rel","nofollow"),h(Co,"href","/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLForMultipleChoice"),h(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Qe,"id","transformers.XLMRobertaXLForTokenClassification"),h(Qe,"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"),h(Qe,"href","#transformers.XLMRobertaXLForTokenClassification"),h(be,"class","relative group"),h(jo,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),h(Ht,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Ht,"rel","nofollow"),h(Fo,"href","/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLForTokenClassification"),h(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(W,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(De,"id","transformers.XLMRobertaXLForQuestionAnswering"),h(De,"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"),h(De,"href","#transformers.XLMRobertaXLForQuestionAnswering"),h(Te,"class","relative group"),h(Eo,"href","/docs/transformers/v4.31.0/en/main_classes/model#transformers.PreTrainedModel"),h(eo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(eo,"rel","nofollow"),h(Uo,"href","/docs/transformers/v4.31.0/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLForQuestionAnswering"),h(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,g){e(document.head,d),b(t,M,g),b(t,m,g),e(m,p),e(p,_),v(n,_,null),e(m,c),e(m,R),e(R,Gs),b(t,is,g),b(t,te,g),e(te,$e),e($e,Do),v(_t,Do,null),e(te,Ss),e(te,Ko),e(Ko,As),b(t,ds,g),b(t,Je,g),e(Je,Vs),e(Je,bt),e(bt,Ys),e(Je,Ps),b(t,cs,g),b(t,io,g),e(io,Qs),b(t,hs,g),b(t,co,g),e(co,en),e(en,Hs),b(t,ps,g),b(t,ho,g),e(ho,Os),b(t,ms,g),b(t,po,g),e(po,Mt),e(Mt,Ds),e(Mt,tn),e(tn,Ks),e(Mt,ea),b(t,us,g),b(t,Z,g),e(Z,ta),e(Z,yt),e(yt,oa),e(Z,na),e(Z,Tt),e(Tt,sa),e(Z,aa),e(Z,vt),e(vt,ra),e(Z,la),b(t,fs,g),b(t,oe,g),e(oe,xe),e(xe,on),v(wt,on,null),e(oe,ia),e(oe,nn),e(nn,da),b(t,gs,g),b(t,J,g),e(J,sn),e(sn,mo),e(mo,ca),e(J,ha),e(J,an),e(an,uo),e(uo,pa),e(J,ma),e(J,rn),e(rn,fo),e(fo,ua),e(J,fa),e(J,ln),e(ln,go),e(go,ga),e(J,_a),e(J,dn),e(dn,_o),e(_o,ba),e(J,Ma),e(J,cn),e(cn,bo),e(bo,ya),b(t,_s,g),b(t,ne,g),e(ne,Ce),e(Ce,hn),v(kt,hn,null),e(ne,Ta),e(ne,pn),e(pn,va),b(t,bs,g),b(t,F,g),v(Xt,F,null),e(F,wa),e(F,Y),e(Y,ka),e(Y,Mo),e(Mo,Xa),e(Y,La),e(Y,mn),e(mn,Ra),e(Y,$a),e(Y,Lt),e(Lt,Ja),e(Y,xa),e(F,Ca),e(F,se),e(se,ja),e(se,yo),e(yo,Fa),e(se,Ea),e(se,To),e(To,Ua),e(se,za),e(F,Wa),v(je,F,null),b(t,Ms,g),b(t,ae,g),e(ae,Fe),e(Fe,un),v(Rt,un,null),e(ae,Ia),e(ae,fn),e(fn,Za),b(t,ys,g),b(t,E,g),v($t,E,null),e(E,Na),e(E,re),e(re,Ba),e(re,vo),e(vo,qa),e(re,Ga),e(re,Jt),e(Jt,Sa),e(re,Aa),e(E,Va),e(E,K),e(K,Ya),e(K,gn),e(gn,Pa),e(K,$),e($,Qa),e($,_n),e(_n,Ha),e($,Oa),e($,bn),e(bn,Da),e($,Ka),e($,Mn),e(Mn,er),e($,tr),e($,yn),e(yn,or),e($,nr),e($,Tn),e(Tn,sr),e($,ar),e($,vn),e(vn,rr),e($,lr),e(K,wn),e(wn,ir),e(K,dr),e(K,xt),e(xt,cr),e(E,hr),e(E,N),v(Ct,N,null),e(N,pr),e(N,le),e(le,mr),e(le,wo),e(wo,ur),e(le,fr),e(le,kn),e(kn,gr),e(le,_r),e(N,br),v(Ee,N,null),e(N,Mr),v(Ue,N,null),b(t,Ts,g),b(t,ie,g),e(ie,ze),e(ze,Xn),v(jt,Xn,null),e(ie,yr),e(ie,Ln),e(Ln,Tr),b(t,vs,g),b(t,P,g),v(Ft,P,null),e(P,vr),e(P,Q),e(Q,wr),e(Q,Rn),e(Rn,kr),e(Q,Xr),e(Q,ko),e(ko,Lr),e(Q,Rr),e(Q,Et),e(Et,$r),e(Q,Jr),e(P,xr),e(P,B),v(Ut,B,null),e(B,Cr),e(B,de),e(de,jr),e(de,Xo),e(Xo,Fr),e(de,Er),e(de,$n),e($n,Ur),e(de,zr),e(B,Wr),v(We,B,null),e(B,Ir),v(Ie,B,null),b(t,ws,g),b(t,ce,g),e(ce,Ze),e(Ze,Jn),v(zt,Jn,null),e(ce,Zr),e(ce,xn),e(xn,Nr),b(t,ks,g),b(t,H,g),v(Wt,H,null),e(H,Br),e(H,O),e(O,qr),e(O,Cn),e(Cn,Gr),e(O,Sr),e(O,Lo),e(Lo,Ar),e(O,Vr),e(O,It),e(It,Yr),e(O,Pr),e(H,Qr),e(H,q),v(Zt,q,null),e(q,Hr),e(q,he),e(he,Or),e(he,Ro),e(Ro,Dr),e(he,Kr),e(he,jn),e(jn,el),e(he,tl),e(q,ol),v(Ne,q,null),e(q,nl),v(Be,q,null),b(t,Xs,g),b(t,pe,g),e(pe,qe),e(qe,Fn),v(Nt,Fn,null),e(pe,sl),e(pe,En),e(En,al),b(t,Ls,g),b(t,U,g),v(Bt,U,null),e(U,rl),e(U,Un),e(Un,ll),e(U,il),e(U,me),e(me,dl),e(me,$o),e($o,cl),e(me,hl),e(me,qt),e(qt,pl),e(me,ml),e(U,ul),e(U,C),v(Gt,C,null),e(C,fl),e(C,ue),e(ue,gl),e(ue,Jo),e(Jo,_l),e(ue,bl),e(ue,zn),e(zn,Ml),e(ue,yl),e(C,Tl),v(Ge,C,null),e(C,vl),v(Se,C,null),e(C,wl),v(Ae,C,null),b(t,Rs,g),b(t,fe,g),e(fe,Ve),e(Ve,Wn),v(St,Wn,null),e(fe,kl),e(fe,In),e(In,Xl),b(t,$s,g),b(t,z,g),v(At,z,null),e(z,Ll),e(z,Zn),e(Zn,Rl),e(z,$l),e(z,ge),e(ge,Jl),e(ge,xo),e(xo,xl),e(ge,Cl),e(ge,Vt),e(Vt,jl),e(ge,Fl),e(z,El),e(z,G),v(Yt,G,null),e(G,Ul),e(G,_e),e(_e,zl),e(_e,Co),e(Co,Wl),e(_e,Il),e(_e,Nn),e(Nn,Zl),e(_e,Nl),e(G,Bl),v(Ye,G,null),e(G,ql),v(Pe,G,null),b(t,Js,g),b(t,be,g),e(be,Qe),e(Qe,Bn),v(Pt,Bn,null),e(be,Gl),e(be,qn),e(qn,Sl),b(t,xs,g),b(t,W,g),v(Qt,W,null),e(W,Al),e(W,Gn),e(Gn,Vl),e(W,Yl),e(W,Me),e(Me,Pl),e(Me,jo),e(jo,Ql),e(Me,Hl),e(Me,Ht),e(Ht,Ol),e(Me,Dl),e(W,Kl),e(W,S),v(Ot,S,null),e(S,ei),e(S,ye),e(ye,ti),e(ye,Fo),e(Fo,oi),e(ye,ni),e(ye,Sn),e(Sn,si),e(ye,ai),e(S,ri),v(He,S,null),e(S,li),v(Oe,S,null),b(t,Cs,g),b(t,Te,g),e(Te,De),e(De,An),v(Dt,An,null),e(Te,ii),e(Te,Vn),e(Vn,di),b(t,js,g),b(t,I,g),v(Kt,I,null),e(I,ci),e(I,ve),e(ve,hi),e(ve,Yn),e(Yn,pi),e(ve,mi),e(ve,Pn),e(Pn,ui),e(ve,fi),e(I,gi),e(I,we),e(we,_i),e(we,Eo),e(Eo,bi),e(we,Mi),e(we,eo),e(eo,yi),e(we,Ti),e(I,vi),e(I,A),v(to,A,null),e(A,wi),e(A,ke),e(ke,ki),e(ke,Uo),e(Uo,Xi),e(ke,Li),e(ke,Qn),e(Qn,Ri),e(ke,$i),e(A,Ji),v(Ke,A,null),e(A,xi),v(et,A,null),Fs=!0},p(t,[g]){const oo={};g&2&&(oo.$$scope={dirty:g,ctx:t}),je.$set(oo);const Hn={};g&2&&(Hn.$$scope={dirty:g,ctx:t}),Ee.$set(Hn);const On={};g&2&&(On.$$scope={dirty:g,ctx:t}),Ue.$set(On);const Dn={};g&2&&(Dn.$$scope={dirty:g,ctx:t}),We.$set(Dn);const no={};g&2&&(no.$$scope={dirty:g,ctx:t}),Ie.$set(no);const Kn={};g&2&&(Kn.$$scope={dirty:g,ctx:t}),Ne.$set(Kn);const es={};g&2&&(es.$$scope={dirty:g,ctx:t}),Be.$set(es);const ts={};g&2&&(ts.$$scope={dirty:g,ctx:t}),Ge.$set(ts);const so={};g&2&&(so.$$scope={dirty:g,ctx:t}),Se.$set(so);const os={};g&2&&(os.$$scope={dirty:g,ctx:t}),Ae.$set(os);const ns={};g&2&&(ns.$$scope={dirty:g,ctx:t}),Ye.$set(ns);const ss={};g&2&&(ss.$$scope={dirty:g,ctx:t}),Pe.$set(ss);const as={};g&2&&(as.$$scope={dirty:g,ctx:t}),He.$set(as);const rs={};g&2&&(rs.$$scope={dirty:g,ctx:t}),Oe.$set(rs);const ls={};g&2&&(ls.$$scope={dirty:g,ctx:t}),Ke.$set(ls);const ao={};g&2&&(ao.$$scope={dirty:g,ctx:t}),et.$set(ao)},i(t){Fs||(w(n.$$.fragment,t),w(_t.$$.fragment,t),w(wt.$$.fragment,t),w(kt.$$.fragment,t),w(Xt.$$.fragment,t),w(je.$$.fragment,t),w(Rt.$$.fragment,t),w($t.$$.fragment,t),w(Ct.$$.fragment,t),w(Ee.$$.fragment,t),w(Ue.$$.fragment,t),w(jt.$$.fragment,t),w(Ft.$$.fragment,t),w(Ut.$$.fragment,t),w(We.$$.fragment,t),w(Ie.$$.fragment,t),w(zt.$$.fragment,t),w(Wt.$$.fragment,t),w(Zt.$$.fragment,t),w(Ne.$$.fragment,t),w(Be.$$.fragment,t),w(Nt.$$.fragment,t),w(Bt.$$.fragment,t),w(Gt.$$.fragment,t),w(Ge.$$.fragment,t),w(Se.$$.fragment,t),w(Ae.$$.fragment,t),w(St.$$.fragment,t),w(At.$$.fragment,t),w(Yt.$$.fragment,t),w(Ye.$$.fragment,t),w(Pe.$$.fragment,t),w(Pt.$$.fragment,t),w(Qt.$$.fragment,t),w(Ot.$$.fragment,t),w(He.$$.fragment,t),w(Oe.$$.fragment,t),w(Dt.$$.fragment,t),w(Kt.$$.fragment,t),w(to.$$.fragment,t),w(Ke.$$.fragment,t),w(et.$$.fragment,t),Fs=!0)},o(t){k(n.$$.fragment,t),k(_t.$$.fragment,t),k(wt.$$.fragment,t),k(kt.$$.fragment,t),k(Xt.$$.fragment,t),k(je.$$.fragment,t),k(Rt.$$.fragment,t),k($t.$$.fragment,t),k(Ct.$$.fragment,t),k(Ee.$$.fragment,t),k(Ue.$$.fragment,t),k(jt.$$.fragment,t),k(Ft.$$.fragment,t),k(Ut.$$.fragment,t),k(We.$$.fragment,t),k(Ie.$$.fragment,t),k(zt.$$.fragment,t),k(Wt.$$.fragment,t),k(Zt.$$.fragment,t),k(Ne.$$.fragment,t),k(Be.$$.fragment,t),k(Nt.$$.fragment,t),k(Bt.$$.fragment,t),k(Gt.$$.fragment,t),k(Ge.$$.fragment,t),k(Se.$$.fragment,t),k(Ae.$$.fragment,t),k(St.$$.fragment,t),k(At.$$.fragment,t),k(Yt.$$.fragment,t),k(Ye.$$.fragment,t),k(Pe.$$.fragment,t),k(Pt.$$.fragment,t),k(Qt.$$.fragment,t),k(Ot.$$.fragment,t),k(He.$$.fragment,t),k(Oe.$$.fragment,t),k(Dt.$$.fragment,t),k(Kt.$$.fragment,t),k(to.$$.fragment,t),k(Ke.$$.fragment,t),k(et.$$.fragment,t),Fs=!1},d(t){o(d),t&&o(M),t&&o(m),X(n),t&&o(is),t&&o(te),X(_t),t&&o(ds),t&&o(Je),t&&o(cs),t&&o(io),t&&o(hs),t&&o(co),t&&o(ps),t&&o(ho),t&&o(ms),t&&o(po),t&&o(us),t&&o(Z),t&&o(fs),t&&o(oe),X(wt),t&&o(gs),t&&o(J),t&&o(_s),t&&o(ne),X(kt),t&&o(bs),t&&o(F),X(Xt),X(je),t&&o(Ms),t&&o(ae),X(Rt),t&&o(ys),t&&o(E),X($t),X(Ct),X(Ee),X(Ue),t&&o(Ts),t&&o(ie),X(jt),t&&o(vs),t&&o(P),X(Ft),X(Ut),X(We),X(Ie),t&&o(ws),t&&o(ce),X(zt),t&&o(ks),t&&o(H),X(Wt),X(Zt),X(Ne),X(Be),t&&o(Xs),t&&o(pe),X(Nt),t&&o(Ls),t&&o(U),X(Bt),X(Gt),X(Ge),X(Se),X(Ae),t&&o(Rs),t&&o(fe),X(St),t&&o($s),t&&o(z),X(At),X(Yt),X(Ye),X(Pe),t&&o(Js),t&&o(be),X(Pt),t&&o(xs),t&&o(W),X(Qt),X(Ot),X(He),X(Oe),t&&o(Cs),t&&o(Te),X(Dt),t&&o(js),t&&o(I),X(Kt),X(to),X(Ke),X(et)}}}const Wc={local:"xlmrobertaxl",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.XLMRobertaXLConfig",title:"XLMRobertaXLConfig"},{local:"transformers.XLMRobertaXLModel",title:"XLMRobertaXLModel"},{local:"transformers.XLMRobertaXLForCausalLM",title:"XLMRobertaXLForCausalLM"},{local:"transformers.XLMRobertaXLForMaskedLM",title:"XLMRobertaXLForMaskedLM"},{local:"transformers.XLMRobertaXLForSequenceClassification",title:"XLMRobertaXLForSequenceClassification"},{local:"transformers.XLMRobertaXLForMultipleChoice",title:"XLMRobertaXLForMultipleChoice"},{local:"transformers.XLMRobertaXLForTokenClassification",title:"XLMRobertaXLForTokenClassification"},{local:"transformers.XLMRobertaXLForQuestionAnswering",title:"XLMRobertaXLForQuestionAnswering"}],title:"XLM-RoBERTa-XL"};function Ic(L){return Mc(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ac extends fc{constructor(d){super();gc(this,d,Ic,zc,_c,{})}}export{Ac as default,Wc as metadata};
