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 w,q as k,o as X,B as L,v as Mc,L as ve}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 Le}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function yc(v){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),w(p,n,c),_=!0},p:ve,i(n){_||(k(p.$$.fragment,n),_=!0)},o(n){X(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(m),L(p,n)}}}function Tc(v){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 wc(v){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),w(p,n,c),_=!0},p:ve,i(n){_||(k(p.$$.fragment,n),_=!0)},o(n){X(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(m),L(p,n)}}}function kc(v){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 Xc(v){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),w(p,n,c),_=!0},p:ve,i(n){_||(k(p.$$.fragment,n),_=!0)},o(n){X(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(m),L(p,n)}}}function Lc(v){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(v){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),w(p,n,c),_=!0},p:ve,i(n){_||(k(p.$$.fragment,n),_=!0)},o(n){X(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(m),L(p,n)}}}function Rc(v){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(v){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),w(p,n,c),_=!0},p:ve,i(n){_||(k(p.$$.fragment,n),_=!0)},o(n){X(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(m),L(p,n)}}}function Jc(v){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),w(p,n,c),_=!0},p:ve,i(n){_||(k(p.$$.fragment,n),_=!0)},o(n){X(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(m),L(p,n)}}}function xc(v){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 jc(v){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),w(p,n,c),_=!0},p:ve,i(n){_||(k(p.$$.fragment,n),_=!0)},o(n){X(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(m),L(p,n)}}}function Fc(v){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(v){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),w(p,n,c),_=!0},p:ve,i(n){_||(k(p.$$.fragment,n),_=!0)},o(n){X(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(m),L(p,n)}}}function Ec(v){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 zc(v){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),w(p,n,c),_=!0},p:ve,i(n){_||(k(p.$$.fragment,n),_=!0)},o(n){X(p.$$.fragment,n),_=!1},d(n){n&&o(d),n&&o(m),L(p,n)}}}function Uc(v){let d,M,m,p,_,n,c,R,Bs,is,te,$e,Do,_t,Ss,Ko,As,ds,Je,Vs,bt,Ps,Ys,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,wt,ra,la,fs,oe,xe,on,kt,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,je,hn,Xt,Ta,pn,wa,bs,C,Lt,ka,P,Xa,Mo,La,va,mn,Ra,$a,vt,Ja,xa,ja,se,Fa,yo,Ca,Ea,To,za,Ua,Wa,Fe,Ms,ae,Ce,un,Rt,Ia,fn,Za,ys,E,$t,Na,re,qa,wo,Ga,Ba,Jt,Sa,Aa,Va,K,Pa,gn,Ya,$,Qa,_n,Ha,Oa,bn,Da,Ka,Mn,er,tr,yn,or,nr,Tn,sr,ar,wn,rr,lr,kn,ir,dr,xt,cr,hr,N,jt,pr,le,mr,ko,ur,fr,Xn,gr,_r,br,Ee,Mr,ze,Ts,ie,Ue,Ln,Ft,yr,vn,Tr,ws,Y,Ct,wr,Q,kr,Rn,Xr,Lr,Xo,vr,Rr,Et,$r,Jr,xr,q,zt,jr,de,Fr,Lo,Cr,Er,$n,zr,Ur,Wr,We,Ir,Ie,ks,ce,Ze,Jn,Ut,Zr,xn,Nr,Xs,H,Wt,qr,O,Gr,jn,Br,Sr,vo,Ar,Vr,It,Pr,Yr,Qr,G,Zt,Hr,he,Or,Ro,Dr,Kr,Fn,el,tl,ol,Ne,nl,qe,Ls,pe,Ge,Cn,Nt,sl,En,al,vs,z,qt,rl,zn,ll,il,me,dl,$o,cl,hl,Gt,pl,ml,ul,j,Bt,fl,ue,gl,Jo,_l,bl,Un,Ml,yl,Tl,Be,wl,Se,kl,Ae,Rs,fe,Ve,Wn,St,Xl,In,Ll,$s,U,At,vl,Zn,Rl,$l,ge,Jl,xo,xl,jl,Vt,Fl,Cl,El,B,Pt,zl,_e,Ul,jo,Wl,Il,Nn,Zl,Nl,ql,Pe,Gl,Ye,Js,be,Qe,qn,Yt,Bl,Gn,Sl,xs,W,Qt,Al,Bn,Vl,Pl,Me,Yl,Fo,Ql,Hl,Ht,Ol,Dl,Kl,S,Ot,ei,ye,ti,Co,oi,ni,Sn,si,ai,ri,He,li,Oe,js,Te,De,An,Dt,ii,Vn,di,Fs,I,Kt,ci,we,hi,Pn,pi,mi,Yn,ui,fi,gi,ke,_i,Eo,bi,Mi,eo,yi,Ti,wi,A,to,ki,Xe,Xi,zo,Li,vi,Qn,Ri,$i,Ji,Ke,xi,et,Cs;return n=new D({}),_t=new D({}),kt=new D({}),Xt=new D({}),Lt=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/main/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/main/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/main/src/transformers/models/xlm_roberta_xl/configuration_xlm_roberta_xl.py#L34"}}),Fe=new Le({props:{anchor:"transformers.XLMRobertaXLConfig.example",$$slots:{default:[yc]},$$scope:{ctx:v}}}),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/main/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/main/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/main/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L664"}}),jt=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/main/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/main/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L702",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/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:v}}}),ze=new Le({props:{anchor:"transformers.XLMRobertaXLModel.forward.example",$$slots:{default:[wc]},$$scope:{ctx:v}}}),Ft=new D({}),Ct=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/main/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/main/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/main/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L844"}}),zt=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/main/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/main/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L864",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/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:[kc]},$$scope:{ctx:v}}}),Ie=new Le({props:{anchor:"transformers.XLMRobertaXLForCausalLM.forward.example",$$slots:{default:[Xc]},$$scope:{ctx:v}}}),Ut=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/main/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/main/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/main/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L991"}}),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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/main/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/main/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1014",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/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:[Lc]},$$scope:{ctx:v}}}),qe=new Le({props:{anchor:"transformers.XLMRobertaXLForMaskedLM.forward.example",$$slots:{default:[vc]},$$scope:{ctx:v}}}),Nt=new D({}),qt=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/main/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/main/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/main/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1113"}}),Bt=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/main/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/main/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1124",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Be=new lo({props:{$$slots:{default:[Rc]},$$scope:{ctx:v}}}),Se=new Le({props:{anchor:"transformers.XLMRobertaXLForSequenceClassification.forward.example",$$slots:{default:[$c]},$$scope:{ctx:v}}}),Ae=new Le({props:{anchor:"transformers.XLMRobertaXLForSequenceClassification.forward.example-2",$$slots:{default:[Jc]},$$scope:{ctx:v}}}),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/main/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/main/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/main/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1207"}}),Pt=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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/main/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/main/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1217",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Pe=new lo({props:{$$slots:{default:[xc]},$$scope:{ctx:v}}}),Ye=new Le({props:{anchor:"transformers.XLMRobertaXLForMultipleChoice.forward.example",$$slots:{default:[jc]},$$scope:{ctx:v}}}),Yt=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/main/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/main/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/main/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1298"}}),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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/main/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/main/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1312",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/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:[Fc]},$$scope:{ctx:v}}}),Oe=new Le({props:{anchor:"transformers.XLMRobertaXLForTokenClassification.forward.example",$$slots:{default:[Cc]},$$scope:{ctx:v}}}),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/main/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/main/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/main/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1409"}}),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/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__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/main/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/main/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1419",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/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/main/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:v}}}),et=new Le({props:{anchor:"transformers.XLMRobertaXLForQuestionAnswering.forward.example",$$slots:{default:[zc]},$$scope:{ctx:v}}}),{c(){d=s("meta"),M=u(),m=s("h1"),p=s("a"),_=s("span"),y(n.$$.fragment),c=u(),R=s("span"),Bs=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"),Ps=l("Larger-Scale Transformers for Multilingual Masked Language Modeling"),Ys=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 "),wt=s("a"),ra=l("here"),la=l("."),fs=u(),oe=s("h2"),xe=s("a"),on=s("span"),y(kt.$$.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"),je=s("a"),hn=s("span"),y(Xt.$$.fragment),Ta=u(),pn=s("span"),wa=l("XLMRobertaXLConfig"),bs=u(),C=s("div"),y(Lt.$$.fragment),ka=u(),P=s("p"),Xa=l("This is the configuration class to store the configuration of a "),Mo=s("a"),La=l("XLMRobertaXLModel"),va=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 `),vt=s("a"),Ja=l("facebook/xlm-roberta-xl"),xa=l(" architecture."),ja=u(),se=s("p"),Fa=l("Configuration objects inherit from "),yo=s("a"),Ca=l("PretrainedConfig"),Ea=l(` and can be used to control the model outputs. Read the
documentation from `),To=s("a"),za=l("PretrainedConfig"),Ua=l(" for more information."),Wa=u(),y(Fe.$$.fragment),Ms=u(),ae=s("h2"),Ce=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"),qa=l(`The bare XLM-RoBERTa-xlarge Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),wo=s("a"),Ga=l("PreTrainedModel"),Ba=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"),Pa=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"),Ya=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 "),wn=s("code"),rr=l("encoder_hidden_states"),lr=l(` is then expected as
an input to the forward pass. .. `),kn=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(jt.$$.fragment),pr=u(),le=s("p"),mr=l("The "),ko=s("a"),ur=l("XLMRobertaXLModel"),fr=l(" forward method, overrides the "),Xn=s("code"),gr=l("__call__"),_r=l(" special method."),br=u(),y(Ee.$$.fragment),Mr=u(),y(ze.$$.fragment),Ts=u(),ie=s("h2"),Ue=s("a"),Ln=s("span"),y(Ft.$$.fragment),yr=u(),vn=s("span"),Tr=l("XLMRobertaXLForCausalLM"),ws=u(),Y=s("div"),y(Ct.$$.fragment),wr=u(),Q=s("p"),kr=l("XLM-RoBERTa-xlarge Model with a "),Rn=s("code"),Xr=l("language modeling"),Lr=l(` head on top for CLM fine-tuning.
This model inherits from `),Xo=s("a"),vr=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(),q=s("div"),y(zt.$$.fragment),jr=u(),de=s("p"),Fr=l("The "),Lo=s("a"),Cr=l("XLMRobertaXLForCausalLM"),Er=l(" forward method, overrides the "),$n=s("code"),zr=l("__call__"),Ur=l(" special method."),Wr=u(),y(We.$$.fragment),Ir=u(),y(Ie.$$.fragment),ks=u(),ce=s("h2"),Ze=s("a"),Jn=s("span"),y(Ut.$$.fragment),Zr=u(),xn=s("span"),Nr=l("XLMRobertaXLForMaskedLM"),Xs=u(),H=s("div"),y(Wt.$$.fragment),qr=u(),O=s("p"),Gr=l("XLM-RoBERTa-xlarge Model with a "),jn=s("code"),Br=l("language modeling"),Sr=l(` head on top.
This model inherits from `),vo=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"),Pr=l("torch.nn.Module"),Yr=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(),G=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 "),Fn=s("code"),el=l("__call__"),tl=l(" special method."),ol=u(),y(Ne.$$.fragment),nl=u(),y(qe.$$.fragment),Ls=u(),pe=s("h2"),Ge=s("a"),Cn=s("span"),y(Nt.$$.fragment),sl=u(),En=s("span"),al=l("XLMRobertaXLForSequenceClassification"),vs=u(),z=s("div"),y(qt.$$.fragment),rl=u(),zn=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 `),Gt=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(),j=s("div"),y(Bt.$$.fragment),fl=u(),ue=s("p"),gl=l("The "),Jo=s("a"),_l=l("XLMRobertaXLForSequenceClassification"),bl=l(" forward method, overrides the "),Un=s("code"),Ml=l("__call__"),yl=l(" special method."),Tl=u(),y(Be.$$.fragment),wl=u(),y(Se.$$.fragment),kl=u(),y(Ae.$$.fragment),Rs=u(),fe=s("h2"),Ve=s("a"),Wn=s("span"),y(St.$$.fragment),Xl=u(),In=s("span"),Ll=l("XLMRobertaXLForMultipleChoice"),$s=u(),U=s("div"),y(At.$$.fragment),vl=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"),jl=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"),Fl=l("torch.nn.Module"),Cl=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(),B=s("div"),y(Pt.$$.fragment),zl=u(),_e=s("p"),Ul=l("The "),jo=s("a"),Wl=l("XLMRobertaXLForMultipleChoice"),Il=l(" forward method, overrides the "),Nn=s("code"),Zl=l("__call__"),Nl=l(" special method."),ql=u(),y(Pe.$$.fragment),Gl=u(),y(Ye.$$.fragment),Js=u(),be=s("h2"),Qe=s("a"),qn=s("span"),y(Yt.$$.fragment),Bl=u(),Gn=s("span"),Sl=l("XLMRobertaXLForTokenClassification"),xs=u(),W=s("div"),y(Qt.$$.fragment),Al=u(),Bn=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.`),Pl=u(),Me=s("p"),Yl=l("This model inherits from "),Fo=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 "),Co=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),js=u(),Te=s("h2"),De=s("a"),An=s("span"),y(Dt.$$.fragment),ii=u(),Vn=s("span"),di=l("XLMRobertaXLForQuestionAnswering"),Fs=u(),I=s("div"),y(Kt.$$.fragment),ci=u(),we=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 `),Pn=s("code"),pi=l("span start logits"),mi=l(" and "),Yn=s("code"),ui=l("span end logits"),fi=l(")."),gi=u(),ke=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.`),wi=u(),A=s("div"),y(to.$$.fragment),ki=u(),Xe=s("p"),Xi=l("The "),zo=s("a"),Li=l("XLMRobertaXLForQuestionAnswering"),vi=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);Bs=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);Ps=i(os,"Larger-Scale Transformers for Multilingual Masked Language Modeling"),os.forEach(o),Ys=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 ji=r(tn);Ks=i(ji,"lang"),ji.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 Fi=r(yt);oa=i(Fi,"Soonhwan-Kwon"),Fi.forEach(o),na=i(tt," and "),Tt=a(tt,"A",{href:!0,rel:!0});var Ci=r(Tt);sa=i(Ci,"stefan-it"),Ci.forEach(o),aa=i(tt,". The original code can be found "),wt=a(tt,"A",{href:!0,rel:!0});var Ei=r(wt);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 zi=r(xe);on=a(zi,"SPAN",{});var Ui=r(on);T(kt.$$.fragment,Ui),Ui.forEach(o),zi.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 qi=r(uo);pa=i(qi,"Token classification task guide"),qi.forEach(o),Ni.forEach(o),ma=f(V),rn=a(V,"LI",{});var Gi=r(rn);fo=a(Gi,"A",{href:!0});var Bi=r(fo);ua=i(Bi,"Question answering task guide"),Bi.forEach(o),Gi.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 Pi=r(_o);ba=i(Pi,"Masked language modeling task guide"),Pi.forEach(o),Vi.forEach(o),Ma=f(V),cn=a(V,"LI",{});var Yi=r(cn);bo=a(Yi,"A",{href:!0});var Qi=r(bo);ya=i(Qi,"Multiple choice task guide"),Qi.forEach(o),Yi.forEach(o),V.forEach(o),_s=f(t),ne=a(t,"H2",{class:!0});var zs=r(ne);je=a(zs,"A",{id:!0,class:!0,href:!0});var Hi=r(je);hn=a(Hi,"SPAN",{});var Oi=r(hn);T(Xt.$$.fragment,Oi),Oi.forEach(o),Hi.forEach(o),Ta=f(zs),pn=a(zs,"SPAN",{});var Di=r(pn);wa=i(Di,"XLMRobertaXLConfig"),Di.forEach(o),zs.forEach(o),bs=f(t),C=a(t,"DIV",{class:!0});var ot=r(C);T(Lt.$$.fragment,ot),ka=f(ot),P=a(ot,"P",{});var nt=r(P);Xa=i(nt,"This is the configuration class to store the configuration of a "),Mo=a(nt,"A",{href:!0});var Ki=r(Mo);La=i(Ki,"XLMRobertaXLModel"),Ki.forEach(o),va=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 `),vt=a(nt,"A",{href:!0,rel:!0});var td=r(vt);Ja=i(td,"facebook/xlm-roberta-xl"),td.forEach(o),xa=i(nt," architecture."),nt.forEach(o),ja=f(ot),se=a(ot,"P",{});var Uo=r(se);Fa=i(Uo,"Configuration objects inherit from "),yo=a(Uo,"A",{href:!0});var od=r(yo);Ca=i(od,"PretrainedConfig"),od.forEach(o),Ea=i(Uo,` and can be used to control the model outputs. Read the
documentation from `),To=a(Uo,"A",{href:!0});var nd=r(To);za=i(nd,"PretrainedConfig"),nd.forEach(o),Ua=i(Uo," for more information."),Uo.forEach(o),Wa=f(ot),T(Fe.$$.fragment,ot),ot.forEach(o),Ms=f(t),ae=a(t,"H2",{class:!0});var Us=r(ae);Ce=a(Us,"A",{id:!0,class:!0,href:!0});var sd=r(Ce);un=a(sd,"SPAN",{});var ad=r(un);T(Rt.$$.fragment,ad),ad.forEach(o),sd.forEach(o),Ia=f(Us),fn=a(Us,"SPAN",{});var rd=r(fn);Za=i(rd,"XLMRobertaXLModel"),rd.forEach(o),Us.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);qa=i(Wo,`The bare XLM-RoBERTa-xlarge Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),wo=a(Wo,"A",{href:!0});var ld=r(wo);Ga=i(ld,"PreTrainedModel"),ld.forEach(o),Ba=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);Pa=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);Ya=i(dd,`Attention is
all you need`),dd.forEach(o),$=a(ro,"EM",{});var F=r($);Qa=i(F,`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(F,"CODE",{});var cd=r(_n);Ha=i(cd,"is_decoder"),cd.forEach(o),Oa=i(F,`
argument of the configuration set to `),bn=a(F,"CODE",{});var hd=r(bn);Da=i(hd,"True"),hd.forEach(o),Ka=i(F,`. To be used in a Seq2Seq model, the model needs to initialized with
both `),Mn=a(F,"CODE",{});var pd=r(Mn);er=i(pd,"is_decoder"),pd.forEach(o),tr=i(F," argument and "),yn=a(F,"CODE",{});var md=r(yn);or=i(md,"add_cross_attention"),md.forEach(o),nr=i(F," set to "),Tn=a(F,"CODE",{});var ud=r(Tn);sr=i(ud,"True"),ud.forEach(o),ar=i(F,"; an "),wn=a(F,"CODE",{});var fd=r(wn);rr=i(fd,"encoder_hidden_states"),fd.forEach(o),lr=i(F,` is then expected as
an input to the forward pass. .. `),F.forEach(o),kn=a(ro,"EM",{});var gd=r(kn);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(jt.$$.fragment,at),pr=f(at),le=a(at,"P",{});var Io=r(le);mr=i(Io,"The "),ko=a(Io,"A",{href:!0});var bd=r(ko);ur=i(bd,"XLMRobertaXLModel"),bd.forEach(o),fr=i(Io," forward method, overrides the "),Xn=a(Io,"CODE",{});var Md=r(Xn);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(ze.$$.fragment,at),at.forEach(o),st.forEach(o),Ts=f(t),ie=a(t,"H2",{class:!0});var Ws=r(ie);Ue=a(Ws,"A",{id:!0,class:!0,href:!0});var yd=r(Ue);Ln=a(yd,"SPAN",{});var Td=r(Ln);T(Ft.$$.fragment,Td),Td.forEach(o),yd.forEach(o),yr=f(Ws),vn=a(Ws,"SPAN",{});var wd=r(vn);Tr=i(wd,"XLMRobertaXLForCausalLM"),wd.forEach(o),Ws.forEach(o),ws=f(t),Y=a(t,"DIV",{class:!0});var Zo=r(Y);T(Ct.$$.fragment,Zo),wr=f(Zo),Q=a(Zo,"P",{});var rt=r(Q);kr=i(rt,"XLM-RoBERTa-xlarge Model with a "),Rn=a(rt,"CODE",{});var kd=r(Rn);Xr=i(kd,"language modeling"),kd.forEach(o),Lr=i(rt,` head on top for CLM fine-tuning.
This model inherits from `),Xo=a(rt,"A",{href:!0});var Xd=r(Xo);vr=i(Xd,"PreTrainedModel"),Xd.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 Ld=r(Et);$r=i(Ld,"torch.nn.Module"),Ld.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),q=a(Zo,"DIV",{class:!0});var lt=r(q);T(zt.$$.fragment,lt),jr=f(lt),de=a(lt,"P",{});var No=r(de);Fr=i(No,"The "),Lo=a(No,"A",{href:!0});var vd=r(Lo);Cr=i(vd,"XLMRobertaXLForCausalLM"),vd.forEach(o),Er=i(No," forward method, overrides the "),$n=a(No,"CODE",{});var Rd=r($n);zr=i(Rd,"__call__"),Rd.forEach(o),Ur=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),ks=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(Ut.$$.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),Xs=f(t),H=a(t,"DIV",{class:!0});var qo=r(H);T(Wt.$$.fragment,qo),qr=f(qo),O=a(qo,"P",{});var it=r(O);Gr=i(it,"XLM-RoBERTa-xlarge Model with a "),jn=a(it,"CODE",{});var jd=r(jn);Br=i(jd,"language modeling"),jd.forEach(o),Sr=i(it,` head on top.
This model inherits from `),vo=a(it,"A",{href:!0});var Fd=r(vo);Ar=i(Fd,"PreTrainedModel"),Fd.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 Cd=r(It);Pr=i(Cd,"torch.nn.Module"),Cd.forEach(o),Yr=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(qo),G=a(qo,"DIV",{class:!0});var dt=r(G);T(Zt.$$.fragment,dt),Hr=f(dt),he=a(dt,"P",{});var Go=r(he);Or=i(Go,"The "),Ro=a(Go,"A",{href:!0});var Ed=r(Ro);Dr=i(Ed,"XLMRobertaXLForMaskedLM"),Ed.forEach(o),Kr=i(Go," forward method, overrides the "),Fn=a(Go,"CODE",{});var zd=r(Fn);el=i(zd,"__call__"),zd.forEach(o),tl=i(Go," special method."),Go.forEach(o),ol=f(dt),T(Ne.$$.fragment,dt),nl=f(dt),T(qe.$$.fragment,dt),dt.forEach(o),qo.forEach(o),Ls=f(t),pe=a(t,"H2",{class:!0});var Zs=r(pe);Ge=a(Zs,"A",{id:!0,class:!0,href:!0});var Ud=r(Ge);Cn=a(Ud,"SPAN",{});var Wd=r(Cn);T(Nt.$$.fragment,Wd),Wd.forEach(o),Ud.forEach(o),sl=f(Zs),En=a(Zs,"SPAN",{});var Id=r(En);al=i(Id,"XLMRobertaXLForSequenceClassification"),Id.forEach(o),Zs.forEach(o),vs=f(t),z=a(t,"DIV",{class:!0});var ct=r(z);T(qt.$$.fragment,ct),rl=f(ct),zn=a(ct,"P",{});var Zd=r(zn);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 Bo=r(me);dl=i(Bo,"This model inherits from "),$o=a(Bo,"A",{href:!0});var Nd=r($o);cl=i(Nd,"PreTrainedModel"),Nd.forEach(o),hl=i(Bo,`. 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 `),Gt=a(Bo,"A",{href:!0,rel:!0});var qd=r(Gt);pl=i(qd,"torch.nn.Module"),qd.forEach(o),ml=i(Bo,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Bo.forEach(o),ul=f(ct),j=a(ct,"DIV",{class:!0});var ee=r(j);T(Bt.$$.fragment,ee),fl=f(ee),ue=a(ee,"P",{});var So=r(ue);gl=i(So,"The "),Jo=a(So,"A",{href:!0});var Gd=r(Jo);_l=i(Gd,"XLMRobertaXLForSequenceClassification"),Gd.forEach(o),bl=i(So," forward method, overrides the "),Un=a(So,"CODE",{});var Bd=r(Un);Ml=i(Bd,"__call__"),Bd.forEach(o),yl=i(So," special method."),So.forEach(o),Tl=f(ee),T(Be.$$.fragment,ee),wl=f(ee),T(Se.$$.fragment,ee),kl=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),Xl=f(Ns),In=a(Ns,"SPAN",{});var Vd=r(In);Ll=i(Vd,"XLMRobertaXLForMultipleChoice"),Vd.forEach(o),Ns.forEach(o),$s=f(t),U=a(t,"DIV",{class:!0});var ht=r(U);T(At.$$.fragment,ht),vl=f(ht),Zn=a(ht,"P",{});var Pd=r(Zn);Rl=i(Pd,`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.`),Pd.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 Yd=r(xo);xl=i(Yd,"PreTrainedModel"),Yd.forEach(o),jl=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);Fl=i(Qd,"torch.nn.Module"),Qd.forEach(o),Cl=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),B=a(ht,"DIV",{class:!0});var pt=r(B);T(Pt.$$.fragment,pt),zl=f(pt),_e=a(pt,"P",{});var Vo=r(_e);Ul=i(Vo,"The "),jo=a(Vo,"A",{href:!0});var Hd=r(jo);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),ql=f(pt),T(Pe.$$.fragment,pt),Gl=f(pt),T(Ye.$$.fragment,pt),pt.forEach(o),ht.forEach(o),Js=f(t),be=a(t,"H2",{class:!0});var qs=r(be);Qe=a(qs,"A",{id:!0,class:!0,href:!0});var Dd=r(Qe);qn=a(Dd,"SPAN",{});var Kd=r(qn);T(Yt.$$.fragment,Kd),Kd.forEach(o),Dd.forEach(o),Bl=f(qs),Gn=a(qs,"SPAN",{});var ec=r(Gn);Sl=i(ec,"XLMRobertaXLForTokenClassification"),ec.forEach(o),qs.forEach(o),xs=f(t),W=a(t,"DIV",{class:!0});var mt=r(W);T(Qt.$$.fragment,mt),Al=f(mt),Bn=a(mt,"P",{});var tc=r(Bn);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),Pl=f(mt),Me=a(mt,"P",{});var Po=r(Me);Yl=i(Po,"This model inherits from "),Fo=a(Po,"A",{href:!0});var oc=r(Fo);Ql=i(oc,"PreTrainedModel"),oc.forEach(o),Hl=i(Po,`. 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(Po,"A",{href:!0,rel:!0});var nc=r(Ht);Ol=i(nc,"torch.nn.Module"),nc.forEach(o),Dl=i(Po,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Po.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 Yo=r(ye);ti=i(Yo,"The "),Co=a(Yo,"A",{href:!0});var sc=r(Co);oi=i(sc,"XLMRobertaXLForTokenClassification"),sc.forEach(o),ni=i(Yo," forward method, overrides the "),Sn=a(Yo,"CODE",{});var ac=r(Sn);si=i(ac,"__call__"),ac.forEach(o),ai=i(Yo," special method."),Yo.forEach(o),ri=f(ut),T(He.$$.fragment,ut),li=f(ut),T(Oe.$$.fragment,ut),ut.forEach(o),mt.forEach(o),js=f(t),Te=a(t,"H2",{class:!0});var Gs=r(Te);De=a(Gs,"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(Gs),Vn=a(Gs,"SPAN",{});var ic=r(Vn);di=i(ic,"XLMRobertaXLForQuestionAnswering"),ic.forEach(o),Gs.forEach(o),Fs=f(t),I=a(t,"DIV",{class:!0});var ft=r(I);T(Kt.$$.fragment,ft),ci=f(ft),we=a(ft,"P",{});var Qo=r(we);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 `),Pn=a(Qo,"CODE",{});var dc=r(Pn);pi=i(dc,"span start logits"),dc.forEach(o),mi=i(Qo," and "),Yn=a(Qo,"CODE",{});var cc=r(Yn);ui=i(cc,"span end logits"),cc.forEach(o),fi=i(Qo,")."),Qo.forEach(o),gi=f(ft),ke=a(ft,"P",{});var Ho=r(ke);_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),wi=f(ft),A=a(ft,"DIV",{class:!0});var gt=r(A);T(to.$$.fragment,gt),ki=f(gt),Xe=a(gt,"P",{});var Oo=r(Xe);Xi=i(Oo,"The "),zo=a(Oo,"A",{href:!0});var mc=r(zo);Li=i(mc,"XLMRobertaXLForQuestionAnswering"),mc.forEach(o),vi=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(wt,"href","https://github.com/pytorch/fairseq/tree/master/examples/xlmr"),h(wt,"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(je,"id","transformers.XLMRobertaXLConfig"),h(je,"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(je,"href","#transformers.XLMRobertaXLConfig"),h(ne,"class","relative group"),h(Mo,"href","/docs/transformers/main/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLModel"),h(vt,"href","https://huggingface.co/facebook/xlm-roberta-xl"),h(vt,"rel","nofollow"),h(yo,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),h(To,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),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(Ce,"id","transformers.XLMRobertaXLModel"),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.XLMRobertaXLModel"),h(ae,"class","relative group"),h(wo,"href","/docs/transformers/main/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(ko,"href","/docs/transformers/main/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(Ue,"id","transformers.XLMRobertaXLForCausalLM"),h(Ue,"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(Ue,"href","#transformers.XLMRobertaXLForCausalLM"),h(ie,"class","relative group"),h(Xo,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(Et,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Et,"rel","nofollow"),h(Lo,"href","/docs/transformers/main/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLForCausalLM"),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(Y,"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(vo,"href","/docs/transformers/main/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/main/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLForMaskedLM"),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(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(Ge,"id","transformers.XLMRobertaXLForSequenceClassification"),h(Ge,"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(Ge,"href","#transformers.XLMRobertaXLForSequenceClassification"),h(pe,"class","relative group"),h($o,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(Gt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Gt,"rel","nofollow"),h(Jo,"href","/docs/transformers/main/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLForSequenceClassification"),h(j,"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(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/main/en/main_classes/model#transformers.PreTrainedModel"),h(Vt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Vt,"rel","nofollow"),h(jo,"href","/docs/transformers/main/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLForMultipleChoice"),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(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(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(Fo,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(Ht,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Ht,"rel","nofollow"),h(Co,"href","/docs/transformers/main/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/main/en/main_classes/model#transformers.PreTrainedModel"),h(eo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(eo,"rel","nofollow"),h(zo,"href","/docs/transformers/main/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,_),w(n,_,null),e(m,c),e(m,R),e(R,Bs),b(t,is,g),b(t,te,g),e(te,$e),e($e,Do),w(_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,Ps),e(Je,Ys),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,wt),e(wt,ra),e(Z,la),b(t,fs,g),b(t,oe,g),e(oe,xe),e(xe,on),w(kt,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,je),e(je,hn),w(Xt,hn,null),e(ne,Ta),e(ne,pn),e(pn,wa),b(t,bs,g),b(t,C,g),w(Lt,C,null),e(C,ka),e(C,P),e(P,Xa),e(P,Mo),e(Mo,La),e(P,va),e(P,mn),e(mn,Ra),e(P,$a),e(P,vt),e(vt,Ja),e(P,xa),e(C,ja),e(C,se),e(se,Fa),e(se,yo),e(yo,Ca),e(se,Ea),e(se,To),e(To,za),e(se,Ua),e(C,Wa),w(Fe,C,null),b(t,Ms,g),b(t,ae,g),e(ae,Ce),e(Ce,un),w(Rt,un,null),e(ae,Ia),e(ae,fn),e(fn,Za),b(t,ys,g),b(t,E,g),w($t,E,null),e(E,Na),e(E,re),e(re,qa),e(re,wo),e(wo,Ga),e(re,Ba),e(re,Jt),e(Jt,Sa),e(re,Aa),e(E,Va),e(E,K),e(K,Pa),e(K,gn),e(gn,Ya),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($,wn),e(wn,rr),e($,lr),e(K,kn),e(kn,ir),e(K,dr),e(K,xt),e(xt,cr),e(E,hr),e(E,N),w(jt,N,null),e(N,pr),e(N,le),e(le,mr),e(le,ko),e(ko,ur),e(le,fr),e(le,Xn),e(Xn,gr),e(le,_r),e(N,br),w(Ee,N,null),e(N,Mr),w(ze,N,null),b(t,Ts,g),b(t,ie,g),e(ie,Ue),e(Ue,Ln),w(Ft,Ln,null),e(ie,yr),e(ie,vn),e(vn,Tr),b(t,ws,g),b(t,Y,g),w(Ct,Y,null),e(Y,wr),e(Y,Q),e(Q,kr),e(Q,Rn),e(Rn,Xr),e(Q,Lr),e(Q,Xo),e(Xo,vr),e(Q,Rr),e(Q,Et),e(Et,$r),e(Q,Jr),e(Y,xr),e(Y,q),w(zt,q,null),e(q,jr),e(q,de),e(de,Fr),e(de,Lo),e(Lo,Cr),e(de,Er),e(de,$n),e($n,zr),e(de,Ur),e(q,Wr),w(We,q,null),e(q,Ir),w(Ie,q,null),b(t,ks,g),b(t,ce,g),e(ce,Ze),e(Ze,Jn),w(Ut,Jn,null),e(ce,Zr),e(ce,xn),e(xn,Nr),b(t,Xs,g),b(t,H,g),w(Wt,H,null),e(H,qr),e(H,O),e(O,Gr),e(O,jn),e(jn,Br),e(O,Sr),e(O,vo),e(vo,Ar),e(O,Vr),e(O,It),e(It,Pr),e(O,Yr),e(H,Qr),e(H,G),w(Zt,G,null),e(G,Hr),e(G,he),e(he,Or),e(he,Ro),e(Ro,Dr),e(he,Kr),e(he,Fn),e(Fn,el),e(he,tl),e(G,ol),w(Ne,G,null),e(G,nl),w(qe,G,null),b(t,Ls,g),b(t,pe,g),e(pe,Ge),e(Ge,Cn),w(Nt,Cn,null),e(pe,sl),e(pe,En),e(En,al),b(t,vs,g),b(t,z,g),w(qt,z,null),e(z,rl),e(z,zn),e(zn,ll),e(z,il),e(z,me),e(me,dl),e(me,$o),e($o,cl),e(me,hl),e(me,Gt),e(Gt,pl),e(me,ml),e(z,ul),e(z,j),w(Bt,j,null),e(j,fl),e(j,ue),e(ue,gl),e(ue,Jo),e(Jo,_l),e(ue,bl),e(ue,Un),e(Un,Ml),e(ue,yl),e(j,Tl),w(Be,j,null),e(j,wl),w(Se,j,null),e(j,kl),w(Ae,j,null),b(t,Rs,g),b(t,fe,g),e(fe,Ve),e(Ve,Wn),w(St,Wn,null),e(fe,Xl),e(fe,In),e(In,Ll),b(t,$s,g),b(t,U,g),w(At,U,null),e(U,vl),e(U,Zn),e(Zn,Rl),e(U,$l),e(U,ge),e(ge,Jl),e(ge,xo),e(xo,xl),e(ge,jl),e(ge,Vt),e(Vt,Fl),e(ge,Cl),e(U,El),e(U,B),w(Pt,B,null),e(B,zl),e(B,_e),e(_e,Ul),e(_e,jo),e(jo,Wl),e(_e,Il),e(_e,Nn),e(Nn,Zl),e(_e,Nl),e(B,ql),w(Pe,B,null),e(B,Gl),w(Ye,B,null),b(t,Js,g),b(t,be,g),e(be,Qe),e(Qe,qn),w(Yt,qn,null),e(be,Bl),e(be,Gn),e(Gn,Sl),b(t,xs,g),b(t,W,g),w(Qt,W,null),e(W,Al),e(W,Bn),e(Bn,Vl),e(W,Pl),e(W,Me),e(Me,Yl),e(Me,Fo),e(Fo,Ql),e(Me,Hl),e(Me,Ht),e(Ht,Ol),e(Me,Dl),e(W,Kl),e(W,S),w(Ot,S,null),e(S,ei),e(S,ye),e(ye,ti),e(ye,Co),e(Co,oi),e(ye,ni),e(ye,Sn),e(Sn,si),e(ye,ai),e(S,ri),w(He,S,null),e(S,li),w(Oe,S,null),b(t,js,g),b(t,Te,g),e(Te,De),e(De,An),w(Dt,An,null),e(Te,ii),e(Te,Vn),e(Vn,di),b(t,Fs,g),b(t,I,g),w(Kt,I,null),e(I,ci),e(I,we),e(we,hi),e(we,Pn),e(Pn,pi),e(we,mi),e(we,Yn),e(Yn,ui),e(we,fi),e(I,gi),e(I,ke),e(ke,_i),e(ke,Eo),e(Eo,bi),e(ke,Mi),e(ke,eo),e(eo,yi),e(ke,Ti),e(I,wi),e(I,A),w(to,A,null),e(A,ki),e(A,Xe),e(Xe,Xi),e(Xe,zo),e(zo,Li),e(Xe,vi),e(Xe,Qn),e(Qn,Ri),e(Xe,$i),e(A,Ji),w(Ke,A,null),e(A,xi),w(et,A,null),Cs=!0},p(t,[g]){const oo={};g&2&&(oo.$$scope={dirty:g,ctx:t}),Fe.$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}),ze.$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}),qe.$set(es);const ts={};g&2&&(ts.$$scope={dirty:g,ctx:t}),Be.$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}),Pe.$set(ns);const ss={};g&2&&(ss.$$scope={dirty:g,ctx:t}),Ye.$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){Cs||(k(n.$$.fragment,t),k(_t.$$.fragment,t),k(kt.$$.fragment,t),k(Xt.$$.fragment,t),k(Lt.$$.fragment,t),k(Fe.$$.fragment,t),k(Rt.$$.fragment,t),k($t.$$.fragment,t),k(jt.$$.fragment,t),k(Ee.$$.fragment,t),k(ze.$$.fragment,t),k(Ft.$$.fragment,t),k(Ct.$$.fragment,t),k(zt.$$.fragment,t),k(We.$$.fragment,t),k(Ie.$$.fragment,t),k(Ut.$$.fragment,t),k(Wt.$$.fragment,t),k(Zt.$$.fragment,t),k(Ne.$$.fragment,t),k(qe.$$.fragment,t),k(Nt.$$.fragment,t),k(qt.$$.fragment,t),k(Bt.$$.fragment,t),k(Be.$$.fragment,t),k(Se.$$.fragment,t),k(Ae.$$.fragment,t),k(St.$$.fragment,t),k(At.$$.fragment,t),k(Pt.$$.fragment,t),k(Pe.$$.fragment,t),k(Ye.$$.fragment,t),k(Yt.$$.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),Cs=!0)},o(t){X(n.$$.fragment,t),X(_t.$$.fragment,t),X(kt.$$.fragment,t),X(Xt.$$.fragment,t),X(Lt.$$.fragment,t),X(Fe.$$.fragment,t),X(Rt.$$.fragment,t),X($t.$$.fragment,t),X(jt.$$.fragment,t),X(Ee.$$.fragment,t),X(ze.$$.fragment,t),X(Ft.$$.fragment,t),X(Ct.$$.fragment,t),X(zt.$$.fragment,t),X(We.$$.fragment,t),X(Ie.$$.fragment,t),X(Ut.$$.fragment,t),X(Wt.$$.fragment,t),X(Zt.$$.fragment,t),X(Ne.$$.fragment,t),X(qe.$$.fragment,t),X(Nt.$$.fragment,t),X(qt.$$.fragment,t),X(Bt.$$.fragment,t),X(Be.$$.fragment,t),X(Se.$$.fragment,t),X(Ae.$$.fragment,t),X(St.$$.fragment,t),X(At.$$.fragment,t),X(Pt.$$.fragment,t),X(Pe.$$.fragment,t),X(Ye.$$.fragment,t),X(Yt.$$.fragment,t),X(Qt.$$.fragment,t),X(Ot.$$.fragment,t),X(He.$$.fragment,t),X(Oe.$$.fragment,t),X(Dt.$$.fragment,t),X(Kt.$$.fragment,t),X(to.$$.fragment,t),X(Ke.$$.fragment,t),X(et.$$.fragment,t),Cs=!1},d(t){o(d),t&&o(M),t&&o(m),L(n),t&&o(is),t&&o(te),L(_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),L(kt),t&&o(gs),t&&o(J),t&&o(_s),t&&o(ne),L(Xt),t&&o(bs),t&&o(C),L(Lt),L(Fe),t&&o(Ms),t&&o(ae),L(Rt),t&&o(ys),t&&o(E),L($t),L(jt),L(Ee),L(ze),t&&o(Ts),t&&o(ie),L(Ft),t&&o(ws),t&&o(Y),L(Ct),L(zt),L(We),L(Ie),t&&o(ks),t&&o(ce),L(Ut),t&&o(Xs),t&&o(H),L(Wt),L(Zt),L(Ne),L(qe),t&&o(Ls),t&&o(pe),L(Nt),t&&o(vs),t&&o(z),L(qt),L(Bt),L(Be),L(Se),L(Ae),t&&o(Rs),t&&o(fe),L(St),t&&o($s),t&&o(U),L(At),L(Pt),L(Pe),L(Ye),t&&o(Js),t&&o(be),L(Yt),t&&o(xs),t&&o(W),L(Qt),L(Ot),L(He),L(Oe),t&&o(js),t&&o(Te),L(Dt),t&&o(Fs),t&&o(I),L(Kt),L(to),L(Ke),L(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(v){return Mc(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Ac extends fc{constructor(d){super();gc(this,d,Ic,Uc,_c,{})}}export{Ac as default,Wc as metadata};
