import{S as Ld,i as kd,s as Md,e as r,k as u,w as k,t as s,M as wd,c as i,d as t,m as f,a as l,x as M,h as a,b as h,G as e,g as b,y as w,q as v,o as X,B as T,v as vd,L as ve}from"../../chunks/vendor-hf-doc-builder.js";import{T as nt}from"../../chunks/Tip-hf-doc-builder.js";import{D as R}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Xe}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Y}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as we}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Xd(y){let d,L,m,p,_;return p=new Xe({props:{code:`from transformers import XLMRobertaXLConfig, XLMRobertaXLModel

# Initializing a XLM_ROBERTA_XL bert-base-uncased style configuration
configuration = XLMRobertaXLConfig()

# Initializing a model (with random weights) from the bert-base-uncased style configuration
model = XLMRobertaXLModel(configuration)

# Accessing the model configuration
configuration = model.config`,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=r("p"),L=s("Examples:"),m=u(),k(p.$$.fragment)},l(n){d=i(n,"P",{});var c=l(d);L=a(c,"Examples:"),c.forEach(t),m=f(n),M(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,L),b(n,m,c),w(p,n,c),_=!0},p:ve,i(n){_||(v(p.$$.fragment,n),_=!0)},o(n){X(p.$$.fragment,n),_=!1},d(n){n&&t(d),n&&t(m),T(p,n)}}}function Td(y){let d,L,m,p,_;return{c(){d=r("p"),L=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),p=s("Module"),_=s(`
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=i(n,"P",{});var c=l(d);L=a(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=i(c,"CODE",{});var $=l(m);p=a($,"Module"),$.forEach(t),_=a(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(t)},m(n,c){b(n,d,c),e(d,L),e(d,m),e(m,p),e(d,_)},d(n){n&&t(d)}}}function yd(y){let d,L,m,p,_;return p=new Xe({props:{code:`from transformers import AutoTokenizer, XLMRobertaXLModel
import torch

tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-xlarge")
model = XLMRobertaXLModel.from_pretrained("xlm-roberta-xlarge")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)

last_hidden_states = outputs.last_hidden_state`,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=r("p"),L=s("Example:"),m=u(),k(p.$$.fragment)},l(n){d=i(n,"P",{});var c=l(d);L=a(c,"Example:"),c.forEach(t),m=f(n),M(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,L),b(n,m,c),w(p,n,c),_=!0},p:ve,i(n){_||(v(p.$$.fragment,n),_=!0)},o(n){X(p.$$.fragment,n),_=!1},d(n){n&&t(d),n&&t(m),T(p,n)}}}function $d(y){let d,L,m,p,_;return{c(){d=r("p"),L=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),p=s("Module"),_=s(`
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=i(n,"P",{});var c=l(d);L=a(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=i(c,"CODE",{});var $=l(m);p=a($,"Module"),$.forEach(t),_=a(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(t)},m(n,c){b(n,d,c),e(d,L),e(d,m),e(m,p),e(d,_)},d(n){n&&t(d)}}}function xd(y){let d,L,m,p,_;return p=new Xe({props:{code:`from transformers import AutoTokenizer, RobertaForCausalLM, RobertaConfig
import torch

tokenizer = AutoTokenizer.from_pretrained("roberta-base")
config = RobertaConfig.from_pretrained("roberta-base")
config.is_decoder = True
model = RobertaForCausalLM.from_pretrained("roberta-base", config=config)
inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
outputs = model(**inputs)
prediction_logits = outputs.logits`,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=r("p"),L=s("Example:"),m=u(),k(p.$$.fragment)},l(n){d=i(n,"P",{});var c=l(d);L=a(c,"Example:"),c.forEach(t),m=f(n),M(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,L),b(n,m,c),w(p,n,c),_=!0},p:ve,i(n){_||(v(p.$$.fragment,n),_=!0)},o(n){X(p.$$.fragment,n),_=!1},d(n){n&&t(d),n&&t(m),T(p,n)}}}function Rd(y){let d,L,m,p,_;return{c(){d=r("p"),L=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),p=s("Module"),_=s(`
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=i(n,"P",{});var c=l(d);L=a(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=i(c,"CODE",{});var $=l(m);p=a($,"Module"),$.forEach(t),_=a(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(t)},m(n,c){b(n,d,c),e(d,L),e(d,m),e(m,p),e(d,_)},d(n){n&&t(d)}}}function Fd(y){let d,L,m,p,_;return p=new Xe({props:{code:`from transformers import AutoTokenizer, XLMRobertaXLForMaskedLM
import torch

tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-xlarge")
model = XLMRobertaXLForMaskedLM.from_pretrained("xlm-roberta-xlarge")

inputs = tokenizer("The capital of France is <mask>.", return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

# retrieve index of <mask>
mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[0].nonzero(as_tuple=True)[0]

predicted_token_id = logits[0, mask_token_index].argmax(axis=-1)

labels = tokenizer("The capital of France is Paris.", return_tensors="pt")["input_ids"]
# mask labels of non-<mask> tokens
labels = torch.where(inputs.input_ids == tokenizer.mask_token_id, labels, -100)

outputs = model(**inputs, labels=labels)`,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=r("p"),L=s("Example:"),m=u(),k(p.$$.fragment)},l(n){d=i(n,"P",{});var c=l(d);L=a(c,"Example:"),c.forEach(t),m=f(n),M(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,L),b(n,m,c),w(p,n,c),_=!0},p:ve,i(n){_||(v(p.$$.fragment,n),_=!0)},o(n){X(p.$$.fragment,n),_=!1},d(n){n&&t(d),n&&t(m),T(p,n)}}}function zd(y){let d,L,m,p,_;return{c(){d=r("p"),L=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),p=s("Module"),_=s(`
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=i(n,"P",{});var c=l(d);L=a(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=i(c,"CODE",{});var $=l(m);p=a($,"Module"),$.forEach(t),_=a(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(t)},m(n,c){b(n,d,c),e(d,L),e(d,m),e(m,p),e(d,_)},d(n){n&&t(d)}}}function Cd(y){let d,L,m,p,_;return p=new Xe({props:{code:`import torch
from transformers import AutoTokenizer, XLMRobertaXLForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-xlarge")
model = XLMRobertaXLForSequenceClassification.from_pretrained("xlm-roberta-xlarge")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_id = logits.argmax().item()

# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = XLMRobertaXLForSequenceClassification.from_pretrained("xlm-roberta-xlarge", num_labels=num_labels)

labels = torch.tensor([1])
loss = model(**inputs, labels=labels).loss`,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=r("p"),L=s("Example of single-label classification:"),m=u(),k(p.$$.fragment)},l(n){d=i(n,"P",{});var c=l(d);L=a(c,"Example of single-label classification:"),c.forEach(t),m=f(n),M(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,L),b(n,m,c),w(p,n,c),_=!0},p:ve,i(n){_||(v(p.$$.fragment,n),_=!0)},o(n){X(p.$$.fragment,n),_=!1},d(n){n&&t(d),n&&t(m),T(p,n)}}}function qd(y){let d,L,m,p,_;return p=new Xe({props:{code:`import torch
from transformers import AutoTokenizer, XLMRobertaXLForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-xlarge")
model = XLMRobertaXLForSequenceClassification.from_pretrained("xlm-roberta-xlarge", problem_type="multi_label_classification")

inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")

with torch.no_grad():
    logits = model(**inputs).logits

predicted_class_ids = torch.arange(0, logits.shape[-1])[torch.sigmoid(logits).squeeze(dim=0) > 0.5]

# To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`
num_labels = len(model.config.id2label)
model = XLMRobertaXLForSequenceClassification.from_pretrained(
    "xlm-roberta-xlarge", num_labels=num_labels, problem_type="multi_label_classification"
)

labels = torch.sum(
    torch.nn.functional.one_hot(predicted_class_ids[None, :].clone(), num_classes=num_labels), dim=1
).to(torch.float)
loss = model(**inputs, labels=labels).loss`,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=r("p"),L=s("Example of multi-label classification:"),m=u(),k(p.$$.fragment)},l(n){d=i(n,"P",{});var c=l(d);L=a(c,"Example of multi-label classification:"),c.forEach(t),m=f(n),M(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,L),b(n,m,c),w(p,n,c),_=!0},p:ve,i(n){_||(v(p.$$.fragment,n),_=!0)},o(n){X(p.$$.fragment,n),_=!1},d(n){n&&t(d),n&&t(m),T(p,n)}}}function Ed(y){let d,L,m,p,_;return{c(){d=r("p"),L=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),p=s("Module"),_=s(`
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=i(n,"P",{});var c=l(d);L=a(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=i(c,"CODE",{});var $=l(m);p=a($,"Module"),$.forEach(t),_=a(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(t)},m(n,c){b(n,d,c),e(d,L),e(d,m),e(m,p),e(d,_)},d(n){n&&t(d)}}}function jd(y){let d,L,m,p,_;return p=new Xe({props:{code:`from transformers import AutoTokenizer, XLMRobertaXLForMultipleChoice
import torch

tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-xlarge")
model = XLMRobertaXLForMultipleChoice.from_pretrained("xlm-roberta-xlarge")

prompt = "In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced."
choice0 = "It is eaten with a fork and a knife."
choice1 = "It is eaten while held in the hand."
labels = torch.tensor(0).unsqueeze(0)  # choice0 is correct (according to Wikipedia ;)), batch size 1

encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors="pt", padding=True)
outputs = model(**{k: v.unsqueeze(0) for k, v in encoding.items()}, labels=labels)  # batch size is 1

# the linear classifier still needs to be trained
loss = outputs.loss
logits = outputs.logits`,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=r("p"),L=s("Example:"),m=u(),k(p.$$.fragment)},l(n){d=i(n,"P",{});var c=l(d);L=a(c,"Example:"),c.forEach(t),m=f(n),M(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,L),b(n,m,c),w(p,n,c),_=!0},p:ve,i(n){_||(v(p.$$.fragment,n),_=!0)},o(n){X(p.$$.fragment,n),_=!1},d(n){n&&t(d),n&&t(m),T(p,n)}}}function Ad(y){let d,L,m,p,_;return{c(){d=r("p"),L=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),p=s("Module"),_=s(`
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=i(n,"P",{});var c=l(d);L=a(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=i(c,"CODE",{});var $=l(m);p=a($,"Module"),$.forEach(t),_=a(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(t)},m(n,c){b(n,d,c),e(d,L),e(d,m),e(m,p),e(d,_)},d(n){n&&t(d)}}}function Pd(y){let d,L,m,p,_;return p=new Xe({props:{code:`from transformers import AutoTokenizer, XLMRobertaXLForTokenClassification
import torch

tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-xlarge")
model = XLMRobertaXLForTokenClassification.from_pretrained("xlm-roberta-xlarge")

inputs = tokenizer(
    "HuggingFace is a company based in Paris and New York", add_special_tokens=False, return_tensors="pt"
)

with torch.no_grad():
    logits = model(**inputs).logits

predicted_token_class_ids = logits.argmax(-1)

# Note that tokens are classified rather then input words which means that
# there might be more predicted token classes than words.
# Multiple token classes might account for the same word
predicted_tokens_classes = [model.config.id2label[t.item()] for t in predicted_token_class_ids[0]]

labels = predicted_token_class_ids
loss = model(**inputs, labels=labels).loss`,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=r("p"),L=s("Example:"),m=u(),k(p.$$.fragment)},l(n){d=i(n,"P",{});var c=l(d);L=a(c,"Example:"),c.forEach(t),m=f(n),M(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,L),b(n,m,c),w(p,n,c),_=!0},p:ve,i(n){_||(v(p.$$.fragment,n),_=!0)},o(n){X(p.$$.fragment,n),_=!1},d(n){n&&t(d),n&&t(m),T(p,n)}}}function Od(y){let d,L,m,p,_;return{c(){d=r("p"),L=s("Although the recipe for forward pass needs to be defined within this function, one should call the "),m=r("code"),p=s("Module"),_=s(`
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=i(n,"P",{});var c=l(d);L=a(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),m=i(c,"CODE",{});var $=l(m);p=a($,"Module"),$.forEach(t),_=a(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(t)},m(n,c){b(n,d,c),e(d,L),e(d,m),e(m,p),e(d,_)},d(n){n&&t(d)}}}function Sd(y){let d,L,m,p,_;return p=new Xe({props:{code:`from transformers import AutoTokenizer, XLMRobertaXLForQuestionAnswering
import torch

tokenizer = AutoTokenizer.from_pretrained("xlm-roberta-xlarge")
model = XLMRobertaXLForQuestionAnswering.from_pretrained("xlm-roberta-xlarge")

question, text = "Who was Jim Henson?", "Jim Henson was a nice puppet"

inputs = tokenizer(question, text, return_tensors="pt")
with torch.no_grad():
    outputs = model(**inputs)

answer_start_index = outputs.start_logits.argmax()
answer_end_index = outputs.end_logits.argmax()

predict_answer_tokens = inputs.input_ids[0, answer_start_index : answer_end_index + 1]

# target is "nice puppet"
target_start_index = torch.tensor([14])
target_end_index = torch.tensor([15])

outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
loss = outputs.loss`,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=r("p"),L=s("Example:"),m=u(),k(p.$$.fragment)},l(n){d=i(n,"P",{});var c=l(d);L=a(c,"Example:"),c.forEach(t),m=f(n),M(p.$$.fragment,n)},m(n,c){b(n,d,c),e(d,L),b(n,m,c),w(p,n,c),_=!0},p:ve,i(n){_||(v(p.$$.fragment,n),_=!0)},o(n){X(p.$$.fragment,n),_=!1},d(n){n&&t(d),n&&t(m),T(p,n)}}}function Nd(y){let d,L,m,p,_,n,c,$,Ms,Wn,Z,Te,It,uo,ws,Dt,vs,Bn,ye,Xs,fo,Ts,ys,Qn,st,$s,Hn,at,Wt,xs,Un,rt,Rs,Vn,it,go,Fs,Bt,zs,Cs,Gn,O,qs,_o,Es,js,bo,As,Ps,Lo,Os,Ss,Jn,ee,$e,Qt,ko,Ns,Ht,Is,Kn,C,Mo,Ds,Q,Ws,lt,Bs,Qs,Ut,Hs,Us,wo,Vs,Gs,Js,oe,Ks,dt,Ys,Zs,ct,ea,oa,ta,xe,Yn,te,Re,Vt,vo,na,Gt,sa,Zn,q,Xo,aa,ne,ra,pt,ia,la,To,da,ca,pa,J,ha,Jt,ma,x,ua,Kt,fa,ga,Yt,_a,ba,Zt,La,ka,en,Ma,wa,on,va,Xa,tn,Ta,ya,nn,$a,xa,yo,Ra,Fa,S,$o,za,se,Ca,ht,qa,Ea,sn,ja,Aa,Pa,Fe,Oa,ze,es,ae,Ce,an,xo,Sa,rn,Na,os,H,Ro,Ia,U,Da,ln,Wa,Ba,mt,Qa,Ha,Fo,Ua,Va,Ga,N,zo,Ja,re,Ka,ut,Ya,Za,dn,er,or,tr,qe,nr,Ee,ts,ie,je,cn,Co,sr,pn,ar,ns,V,qo,rr,G,ir,hn,lr,dr,ft,cr,pr,Eo,hr,mr,ur,I,jo,fr,le,gr,gt,_r,br,mn,Lr,kr,Mr,Ae,wr,Pe,ss,de,Oe,un,Ao,vr,fn,Xr,as,E,Po,Tr,gn,yr,$r,ce,xr,_t,Rr,Fr,Oo,zr,Cr,qr,F,So,Er,pe,jr,bt,Ar,Pr,_n,Or,Sr,Nr,Se,Ir,Ne,Dr,Ie,rs,he,De,bn,No,Wr,Ln,Br,is,j,Io,Qr,kn,Hr,Ur,me,Vr,Lt,Gr,Jr,Do,Kr,Yr,Zr,D,Wo,ei,ue,oi,kt,ti,ni,Mn,si,ai,ri,We,ii,Be,ls,fe,Qe,wn,Bo,li,vn,di,ds,A,Qo,ci,Xn,pi,hi,ge,mi,Mt,ui,fi,Ho,gi,_i,bi,W,Uo,Li,_e,ki,wt,Mi,wi,Tn,vi,Xi,Ti,He,yi,Ue,cs,be,Ve,yn,Vo,$i,$n,xi,ps,P,Go,Ri,Le,Fi,xn,zi,Ci,Rn,qi,Ei,ji,ke,Ai,vt,Pi,Oi,Jo,Si,Ni,Ii,B,Ko,Di,Me,Wi,Xt,Bi,Qi,Fn,Hi,Ui,Vi,Ge,Gi,Je,hs;return n=new Y({}),uo=new Y({}),ko=new Y({}),Mo=new R({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"}}),xe=new we({props:{anchor:"transformers.XLMRobertaXLConfig.example",$$slots:{default:[Xd]},$$scope:{ctx:y}}}),vo=new Y({}),Xo=new R({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#L671"}}),$o=new R({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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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#L711",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>
`}}),Fe=new nt({props:{$$slots:{default:[Td]},$$scope:{ctx:y}}}),ze=new we({props:{anchor:"transformers.XLMRobertaXLModel.forward.example",$$slots:{default:[yd]},$$scope:{ctx:y}}}),xo=new Y({}),Ro=new R({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#L852"}}),zo=new R({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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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#L877",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>
`}}),qe=new nt({props:{$$slots:{default:[$d]},$$scope:{ctx:y}}}),Ee=new we({props:{anchor:"transformers.XLMRobertaXLForCausalLM.forward.example",$$slots:{default:[xd]},$$scope:{ctx:y}}}),Co=new Y({}),qo=new R({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#L1002"}}),jo=new R({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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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#L1030",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>
`}}),Ae=new nt({props:{$$slots:{default:[Rd]},$$scope:{ctx:y}}}),Pe=new we({props:{anchor:"transformers.XLMRobertaXLForMaskedLM.forward.example",$$slots:{default:[Fd]},$$scope:{ctx:y}}}),Ao=new Y({}),Po=new R({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#L1129"}}),So=new R({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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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#L1142",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>
`}}),Se=new nt({props:{$$slots:{default:[zd]},$$scope:{ctx:y}}}),Ne=new we({props:{anchor:"transformers.XLMRobertaXLForSequenceClassification.forward.example",$$slots:{default:[Cd]},$$scope:{ctx:y}}}),Ie=new we({props:{anchor:"transformers.XLMRobertaXLForSequenceClassification.forward.example-2",$$slots:{default:[qd]},$$scope:{ctx:y}}}),No=new Y({}),Io=new R({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#L1225"}}),Wo=new R({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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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#L1237",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>
`}}),We=new nt({props:{$$slots:{default:[Ed]},$$scope:{ctx:y}}}),Be=new we({props:{anchor:"transformers.XLMRobertaXLForMultipleChoice.forward.example",$$slots:{default:[jd]},$$scope:{ctx:y}}}),Bo=new Y({}),Qo=new R({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#L1318"}}),Uo=new R({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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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#L1335",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 nt({props:{$$slots:{default:[Ad]},$$scope:{ctx:y}}}),Ue=new we({props:{anchor:"transformers.XLMRobertaXLForTokenClassification.forward.example",$$slots:{default:[Pd]},$$scope:{ctx:y}}}),Vo=new Y({}),Go=new R({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#L1432"}}),Ko=new R({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/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__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#L1445",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>
`}}),Ge=new nt({props:{$$slots:{default:[Od]},$$scope:{ctx:y}}}),Je=new we({props:{anchor:"transformers.XLMRobertaXLForQuestionAnswering.forward.example",$$slots:{default:[Sd]},$$scope:{ctx:y}}}),{c(){d=r("meta"),L=u(),m=r("h1"),p=r("a"),_=r("span"),k(n.$$.fragment),c=u(),$=r("span"),Ms=s("XLM-RoBERTa-XL"),Wn=u(),Z=r("h2"),Te=r("a"),It=r("span"),k(uo.$$.fragment),ws=u(),Dt=r("span"),vs=s("Overview"),Bn=u(),ye=r("p"),Xs=s("The XLM-RoBERTa-XL model was proposed in "),fo=r("a"),Ts=s("Larger-Scale Transformers for Multilingual Masked Language Modeling"),ys=s(" by Naman Goyal, Jingfei Du, Myle Ott, Giri Anantharaman, Alexis Conneau."),Qn=u(),st=r("p"),$s=s("The abstract from the paper is the following:"),Hn=u(),at=r("p"),Wt=r("em"),xs=s("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."),Un=u(),rt=r("p"),Rs=s("Tips:"),Vn=u(),it=r("ul"),go=r("li"),Fs=s(`XLM-RoBERTa-XL is a multilingual model trained on 100 different languages. Unlike some XLM multilingual models, it does
not require `),Bt=r("code"),zs=s("lang"),Cs=s(` tensors to understand which language is used, and should be able to determine the correct
language from the input ids.`),Gn=u(),O=r("p"),qs=s("This model was contributed by "),_o=r("a"),Es=s("Soonhwan-Kwon"),js=s(" and "),bo=r("a"),As=s("stefan-it"),Ps=s(". The original code can be found "),Lo=r("a"),Os=s("here"),Ss=s("."),Jn=u(),ee=r("h2"),$e=r("a"),Qt=r("span"),k(ko.$$.fragment),Ns=u(),Ht=r("span"),Is=s("XLMRobertaXLConfig"),Kn=u(),C=r("div"),k(Mo.$$.fragment),Ds=u(),Q=r("p"),Ws=s("This is the configuration class to store the configuration of a "),lt=r("a"),Bs=s("XLMRobertaXLModel"),Qs=s(" or a "),Ut=r("code"),Hs=s("TFXLMRobertaXLModel"),Us=s(`.
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 `),wo=r("a"),Vs=s("facebook/xlm-roberta-xl"),Gs=s(" architecture."),Js=u(),oe=r("p"),Ks=s("Configuration objects inherit from "),dt=r("a"),Ys=s("PretrainedConfig"),Zs=s(` and can be used to control the model outputs. Read the
documentation from `),ct=r("a"),ea=s("PretrainedConfig"),oa=s(" for more information."),ta=u(),k(xe.$$.fragment),Yn=u(),te=r("h2"),Re=r("a"),Vt=r("span"),k(vo.$$.fragment),na=u(),Gt=r("span"),sa=s("XLMRobertaXLModel"),Zn=u(),q=r("div"),k(Xo.$$.fragment),aa=u(),ne=r("p"),ra=s(`The bare XLM-RoBERTa-xlarge Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),pt=r("a"),ia=s("PreTrainedModel"),la=s(`. 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 `),To=r("a"),da=s("torch.nn.Module"),ca=s(`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),pa=u(),J=r("p"),ha=s(`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 `),Jt=r("em"),ma=s(`Attention is
all you need`),x=r("em"),ua=s(`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 `),Kt=r("code"),fa=s("is_decoder"),ga=s(`
argument of the configuration set to `),Yt=r("code"),_a=s("True"),ba=s(`. To be used in a Seq2Seq model, the model needs to initialized with
both `),Zt=r("code"),La=s("is_decoder"),ka=s(" argument and "),en=r("code"),Ma=s("add_cross_attention"),wa=s(" set to "),on=r("code"),va=s("True"),Xa=s("; an "),tn=r("code"),Ta=s("encoder_hidden_states"),ya=s(` is then expected as
an input to the forward pass. .. `),nn=r("em"),$a=s("Attention is all you need"),xa=s(": "),yo=r("a"),Ra=s("https://arxiv.org/abs/1706.03762"),Fa=u(),S=r("div"),k($o.$$.fragment),za=u(),se=r("p"),Ca=s("The "),ht=r("a"),qa=s("XLMRobertaXLModel"),Ea=s(" forward method, overrides the "),sn=r("code"),ja=s("__call__"),Aa=s(" special method."),Pa=u(),k(Fe.$$.fragment),Oa=u(),k(ze.$$.fragment),es=u(),ae=r("h2"),Ce=r("a"),an=r("span"),k(xo.$$.fragment),Sa=u(),rn=r("span"),Na=s("XLMRobertaXLForCausalLM"),os=u(),H=r("div"),k(Ro.$$.fragment),Ia=u(),U=r("p"),Da=s("XLM-RoBERTa-xlarge Model with a "),ln=r("code"),Wa=s("language modeling"),Ba=s(` head on top for CLM fine-tuning.
This model inherits from `),mt=r("a"),Qa=s("PreTrainedModel"),Ha=s(`. 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 `),Fo=r("a"),Ua=s("torch.nn.Module"),Va=s(`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Ga=u(),N=r("div"),k(zo.$$.fragment),Ja=u(),re=r("p"),Ka=s("The "),ut=r("a"),Ya=s("XLMRobertaXLForCausalLM"),Za=s(" forward method, overrides the "),dn=r("code"),er=s("__call__"),or=s(" special method."),tr=u(),k(qe.$$.fragment),nr=u(),k(Ee.$$.fragment),ts=u(),ie=r("h2"),je=r("a"),cn=r("span"),k(Co.$$.fragment),sr=u(),pn=r("span"),ar=s("XLMRobertaXLForMaskedLM"),ns=u(),V=r("div"),k(qo.$$.fragment),rr=u(),G=r("p"),ir=s("XLM-RoBERTa-xlarge Model with a "),hn=r("code"),lr=s("language modeling"),dr=s(` head on top.
This model inherits from `),ft=r("a"),cr=s("PreTrainedModel"),pr=s(`. 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=r("a"),hr=s("torch.nn.Module"),mr=s(`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),ur=u(),I=r("div"),k(jo.$$.fragment),fr=u(),le=r("p"),gr=s("The "),gt=r("a"),_r=s("XLMRobertaXLForMaskedLM"),br=s(" forward method, overrides the "),mn=r("code"),Lr=s("__call__"),kr=s(" special method."),Mr=u(),k(Ae.$$.fragment),wr=u(),k(Pe.$$.fragment),ss=u(),de=r("h2"),Oe=r("a"),un=r("span"),k(Ao.$$.fragment),vr=u(),fn=r("span"),Xr=s("XLMRobertaXLForSequenceClassification"),as=u(),E=r("div"),k(Po.$$.fragment),Tr=u(),gn=r("p"),yr=s(`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.`),$r=u(),ce=r("p"),xr=s("This model inherits from "),_t=r("a"),Rr=s("PreTrainedModel"),Fr=s(`. 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 `),Oo=r("a"),zr=s("torch.nn.Module"),Cr=s(`
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(),F=r("div"),k(So.$$.fragment),Er=u(),pe=r("p"),jr=s("The "),bt=r("a"),Ar=s("XLMRobertaXLForSequenceClassification"),Pr=s(" forward method, overrides the "),_n=r("code"),Or=s("__call__"),Sr=s(" special method."),Nr=u(),k(Se.$$.fragment),Ir=u(),k(Ne.$$.fragment),Dr=u(),k(Ie.$$.fragment),rs=u(),he=r("h2"),De=r("a"),bn=r("span"),k(No.$$.fragment),Wr=u(),Ln=r("span"),Br=s("XLMRobertaXLForMultipleChoice"),is=u(),j=r("div"),k(Io.$$.fragment),Qr=u(),kn=r("p"),Hr=s(`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.`),Ur=u(),me=r("p"),Vr=s("This model inherits from "),Lt=r("a"),Gr=s("PreTrainedModel"),Jr=s(`. 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 `),Do=r("a"),Kr=s("torch.nn.Module"),Yr=s(`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Zr=u(),D=r("div"),k(Wo.$$.fragment),ei=u(),ue=r("p"),oi=s("The "),kt=r("a"),ti=s("XLMRobertaXLForMultipleChoice"),ni=s(" forward method, overrides the "),Mn=r("code"),si=s("__call__"),ai=s(" special method."),ri=u(),k(We.$$.fragment),ii=u(),k(Be.$$.fragment),ls=u(),fe=r("h2"),Qe=r("a"),wn=r("span"),k(Bo.$$.fragment),li=u(),vn=r("span"),di=s("XLMRobertaXLForTokenClassification"),ds=u(),A=r("div"),k(Qo.$$.fragment),ci=u(),Xn=r("p"),pi=s(`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.`),hi=u(),ge=r("p"),mi=s("This model inherits from "),Mt=r("a"),ui=s("PreTrainedModel"),fi=s(`. 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 `),Ho=r("a"),gi=s("torch.nn.Module"),_i=s(`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),bi=u(),W=r("div"),k(Uo.$$.fragment),Li=u(),_e=r("p"),ki=s("The "),wt=r("a"),Mi=s("XLMRobertaXLForTokenClassification"),wi=s(" forward method, overrides the "),Tn=r("code"),vi=s("__call__"),Xi=s(" special method."),Ti=u(),k(He.$$.fragment),yi=u(),k(Ue.$$.fragment),cs=u(),be=r("h2"),Ve=r("a"),yn=r("span"),k(Vo.$$.fragment),$i=u(),$n=r("span"),xi=s("XLMRobertaXLForQuestionAnswering"),ps=u(),P=r("div"),k(Go.$$.fragment),Ri=u(),Le=r("p"),Fi=s(`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 `),xn=r("code"),zi=s("span start logits"),Ci=s(" and "),Rn=r("code"),qi=s("span end logits"),Ei=s(")."),ji=u(),ke=r("p"),Ai=s("This model inherits from "),vt=r("a"),Pi=s("PreTrainedModel"),Oi=s(`. 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 `),Jo=r("a"),Si=s("torch.nn.Module"),Ni=s(`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Ii=u(),B=r("div"),k(Ko.$$.fragment),Di=u(),Me=r("p"),Wi=s("The "),Xt=r("a"),Bi=s("XLMRobertaXLForQuestionAnswering"),Qi=s(" forward method, overrides the "),Fn=r("code"),Hi=s("__call__"),Ui=s(" special method."),Vi=u(),k(Ge.$$.fragment),Gi=u(),k(Je.$$.fragment),this.h()},l(o){const g=wd('[data-svelte="svelte-1phssyn"]',document.head);d=i(g,"META",{name:!0,content:!0}),g.forEach(t),L=f(o),m=i(o,"H1",{class:!0});var Yo=l(m);p=i(Yo,"A",{id:!0,class:!0,href:!0});var zn=l(p);_=i(zn,"SPAN",{});var Cn=l(_);M(n.$$.fragment,Cn),Cn.forEach(t),zn.forEach(t),c=f(Yo),$=i(Yo,"SPAN",{});var qn=l($);Ms=a(qn,"XLM-RoBERTa-XL"),qn.forEach(t),Yo.forEach(t),Wn=f(o),Z=i(o,"H2",{class:!0});var Zo=l(Z);Te=i(Zo,"A",{id:!0,class:!0,href:!0});var En=l(Te);It=i(En,"SPAN",{});var jn=l(It);M(uo.$$.fragment,jn),jn.forEach(t),En.forEach(t),ws=f(Zo),Dt=i(Zo,"SPAN",{});var An=l(Dt);vs=a(An,"Overview"),An.forEach(t),Zo.forEach(t),Bn=f(o),ye=i(o,"P",{});var et=l(ye);Xs=a(et,"The XLM-RoBERTa-XL model was proposed in "),fo=i(et,"A",{href:!0,rel:!0});var Pn=l(fo);Ts=a(Pn,"Larger-Scale Transformers for Multilingual Masked Language Modeling"),Pn.forEach(t),ys=a(et," by Naman Goyal, Jingfei Du, Myle Ott, Giri Anantharaman, Alexis Conneau."),et.forEach(t),Qn=f(o),st=i(o,"P",{});var On=l(st);$s=a(On,"The abstract from the paper is the following:"),On.forEach(t),Hn=f(o),at=i(o,"P",{});var Sn=l(at);Wt=i(Sn,"EM",{});var Nn=l(Wt);xs=a(Nn,"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."),Nn.forEach(t),Sn.forEach(t),Un=f(o),rt=i(o,"P",{});var In=l(rt);Rs=a(In,"Tips:"),In.forEach(t),Vn=f(o),it=i(o,"UL",{});var Dn=l(it);go=i(Dn,"LI",{});var ot=l(go);Fs=a(ot,`XLM-RoBERTa-XL is a multilingual model trained on 100 different languages. Unlike some XLM multilingual models, it does
not require `),Bt=i(ot,"CODE",{});var Ji=l(Bt);zs=a(Ji,"lang"),Ji.forEach(t),Cs=a(ot,` tensors to understand which language is used, and should be able to determine the correct
language from the input ids.`),ot.forEach(t),Dn.forEach(t),Gn=f(o),O=i(o,"P",{});var Ke=l(O);qs=a(Ke,"This model was contributed by "),_o=i(Ke,"A",{href:!0,rel:!0});var Ki=l(_o);Es=a(Ki,"Soonhwan-Kwon"),Ki.forEach(t),js=a(Ke," and "),bo=i(Ke,"A",{href:!0,rel:!0});var Yi=l(bo);As=a(Yi,"stefan-it"),Yi.forEach(t),Ps=a(Ke,". The original code can be found "),Lo=i(Ke,"A",{href:!0,rel:!0});var Zi=l(Lo);Os=a(Zi,"here"),Zi.forEach(t),Ss=a(Ke,"."),Ke.forEach(t),Jn=f(o),ee=i(o,"H2",{class:!0});var ms=l(ee);$e=i(ms,"A",{id:!0,class:!0,href:!0});var el=l($e);Qt=i(el,"SPAN",{});var ol=l(Qt);M(ko.$$.fragment,ol),ol.forEach(t),el.forEach(t),Ns=f(ms),Ht=i(ms,"SPAN",{});var tl=l(Ht);Is=a(tl,"XLMRobertaXLConfig"),tl.forEach(t),ms.forEach(t),Kn=f(o),C=i(o,"DIV",{class:!0});var Ye=l(C);M(Mo.$$.fragment,Ye),Ds=f(Ye),Q=i(Ye,"P",{});var Ze=l(Q);Ws=a(Ze,"This is the configuration class to store the configuration of a "),lt=i(Ze,"A",{href:!0});var nl=l(lt);Bs=a(nl,"XLMRobertaXLModel"),nl.forEach(t),Qs=a(Ze," or a "),Ut=i(Ze,"CODE",{});var sl=l(Ut);Hs=a(sl,"TFXLMRobertaXLModel"),sl.forEach(t),Us=a(Ze,`.
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 `),wo=i(Ze,"A",{href:!0,rel:!0});var al=l(wo);Vs=a(al,"facebook/xlm-roberta-xl"),al.forEach(t),Gs=a(Ze," architecture."),Ze.forEach(t),Js=f(Ye),oe=i(Ye,"P",{});var Tt=l(oe);Ks=a(Tt,"Configuration objects inherit from "),dt=i(Tt,"A",{href:!0});var rl=l(dt);Ys=a(rl,"PretrainedConfig"),rl.forEach(t),Zs=a(Tt,` and can be used to control the model outputs. Read the
documentation from `),ct=i(Tt,"A",{href:!0});var il=l(ct);ea=a(il,"PretrainedConfig"),il.forEach(t),oa=a(Tt," for more information."),Tt.forEach(t),ta=f(Ye),M(xe.$$.fragment,Ye),Ye.forEach(t),Yn=f(o),te=i(o,"H2",{class:!0});var us=l(te);Re=i(us,"A",{id:!0,class:!0,href:!0});var ll=l(Re);Vt=i(ll,"SPAN",{});var dl=l(Vt);M(vo.$$.fragment,dl),dl.forEach(t),ll.forEach(t),na=f(us),Gt=i(us,"SPAN",{});var cl=l(Gt);sa=a(cl,"XLMRobertaXLModel"),cl.forEach(t),us.forEach(t),Zn=f(o),q=i(o,"DIV",{class:!0});var eo=l(q);M(Xo.$$.fragment,eo),aa=f(eo),ne=i(eo,"P",{});var yt=l(ne);ra=a(yt,`The bare XLM-RoBERTa-xlarge Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),pt=i(yt,"A",{href:!0});var pl=l(pt);ia=a(pl,"PreTrainedModel"),pl.forEach(t),la=a(yt,`. 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 `),To=i(yt,"A",{href:!0,rel:!0});var hl=l(To);da=a(hl,"torch.nn.Module"),hl.forEach(t),ca=a(yt,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),yt.forEach(t),pa=f(eo),J=i(eo,"P",{});var tt=l(J);ha=a(tt,`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 `),Jt=i(tt,"EM",{});var ml=l(Jt);ma=a(ml,`Attention is
all you need`),ml.forEach(t),x=i(tt,"EM",{});var z=l(x);ua=a(z,`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 `),Kt=i(z,"CODE",{});var ul=l(Kt);fa=a(ul,"is_decoder"),ul.forEach(t),ga=a(z,`
argument of the configuration set to `),Yt=i(z,"CODE",{});var fl=l(Yt);_a=a(fl,"True"),fl.forEach(t),ba=a(z,`. To be used in a Seq2Seq model, the model needs to initialized with
both `),Zt=i(z,"CODE",{});var gl=l(Zt);La=a(gl,"is_decoder"),gl.forEach(t),ka=a(z," argument and "),en=i(z,"CODE",{});var _l=l(en);Ma=a(_l,"add_cross_attention"),_l.forEach(t),wa=a(z," set to "),on=i(z,"CODE",{});var bl=l(on);va=a(bl,"True"),bl.forEach(t),Xa=a(z,"; an "),tn=i(z,"CODE",{});var Ll=l(tn);Ta=a(Ll,"encoder_hidden_states"),Ll.forEach(t),ya=a(z,` is then expected as
an input to the forward pass. .. `),z.forEach(t),nn=i(tt,"EM",{});var kl=l(nn);$a=a(kl,"Attention is all you need"),kl.forEach(t),xa=a(tt,": "),yo=i(tt,"A",{href:!0,rel:!0});var Ml=l(yo);Ra=a(Ml,"https://arxiv.org/abs/1706.03762"),Ml.forEach(t),tt.forEach(t),Fa=f(eo),S=i(eo,"DIV",{class:!0});var oo=l(S);M($o.$$.fragment,oo),za=f(oo),se=i(oo,"P",{});var $t=l(se);Ca=a($t,"The "),ht=i($t,"A",{href:!0});var wl=l(ht);qa=a(wl,"XLMRobertaXLModel"),wl.forEach(t),Ea=a($t," forward method, overrides the "),sn=i($t,"CODE",{});var vl=l(sn);ja=a(vl,"__call__"),vl.forEach(t),Aa=a($t," special method."),$t.forEach(t),Pa=f(oo),M(Fe.$$.fragment,oo),Oa=f(oo),M(ze.$$.fragment,oo),oo.forEach(t),eo.forEach(t),es=f(o),ae=i(o,"H2",{class:!0});var fs=l(ae);Ce=i(fs,"A",{id:!0,class:!0,href:!0});var Xl=l(Ce);an=i(Xl,"SPAN",{});var Tl=l(an);M(xo.$$.fragment,Tl),Tl.forEach(t),Xl.forEach(t),Sa=f(fs),rn=i(fs,"SPAN",{});var yl=l(rn);Na=a(yl,"XLMRobertaXLForCausalLM"),yl.forEach(t),fs.forEach(t),os=f(o),H=i(o,"DIV",{class:!0});var xt=l(H);M(Ro.$$.fragment,xt),Ia=f(xt),U=i(xt,"P",{});var to=l(U);Da=a(to,"XLM-RoBERTa-xlarge Model with a "),ln=i(to,"CODE",{});var $l=l(ln);Wa=a($l,"language modeling"),$l.forEach(t),Ba=a(to,` head on top for CLM fine-tuning.
This model inherits from `),mt=i(to,"A",{href:!0});var xl=l(mt);Qa=a(xl,"PreTrainedModel"),xl.forEach(t),Ha=a(to,`. 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 `),Fo=i(to,"A",{href:!0,rel:!0});var Rl=l(Fo);Ua=a(Rl,"torch.nn.Module"),Rl.forEach(t),Va=a(to,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),to.forEach(t),Ga=f(xt),N=i(xt,"DIV",{class:!0});var no=l(N);M(zo.$$.fragment,no),Ja=f(no),re=i(no,"P",{});var Rt=l(re);Ka=a(Rt,"The "),ut=i(Rt,"A",{href:!0});var Fl=l(ut);Ya=a(Fl,"XLMRobertaXLForCausalLM"),Fl.forEach(t),Za=a(Rt," forward method, overrides the "),dn=i(Rt,"CODE",{});var zl=l(dn);er=a(zl,"__call__"),zl.forEach(t),or=a(Rt," special method."),Rt.forEach(t),tr=f(no),M(qe.$$.fragment,no),nr=f(no),M(Ee.$$.fragment,no),no.forEach(t),xt.forEach(t),ts=f(o),ie=i(o,"H2",{class:!0});var gs=l(ie);je=i(gs,"A",{id:!0,class:!0,href:!0});var Cl=l(je);cn=i(Cl,"SPAN",{});var ql=l(cn);M(Co.$$.fragment,ql),ql.forEach(t),Cl.forEach(t),sr=f(gs),pn=i(gs,"SPAN",{});var El=l(pn);ar=a(El,"XLMRobertaXLForMaskedLM"),El.forEach(t),gs.forEach(t),ns=f(o),V=i(o,"DIV",{class:!0});var Ft=l(V);M(qo.$$.fragment,Ft),rr=f(Ft),G=i(Ft,"P",{});var so=l(G);ir=a(so,"XLM-RoBERTa-xlarge Model with a "),hn=i(so,"CODE",{});var jl=l(hn);lr=a(jl,"language modeling"),jl.forEach(t),dr=a(so,` head on top.
This model inherits from `),ft=i(so,"A",{href:!0});var Al=l(ft);cr=a(Al,"PreTrainedModel"),Al.forEach(t),pr=a(so,`. 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=i(so,"A",{href:!0,rel:!0});var Pl=l(Eo);hr=a(Pl,"torch.nn.Module"),Pl.forEach(t),mr=a(so,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),so.forEach(t),ur=f(Ft),I=i(Ft,"DIV",{class:!0});var ao=l(I);M(jo.$$.fragment,ao),fr=f(ao),le=i(ao,"P",{});var zt=l(le);gr=a(zt,"The "),gt=i(zt,"A",{href:!0});var Ol=l(gt);_r=a(Ol,"XLMRobertaXLForMaskedLM"),Ol.forEach(t),br=a(zt," forward method, overrides the "),mn=i(zt,"CODE",{});var Sl=l(mn);Lr=a(Sl,"__call__"),Sl.forEach(t),kr=a(zt," special method."),zt.forEach(t),Mr=f(ao),M(Ae.$$.fragment,ao),wr=f(ao),M(Pe.$$.fragment,ao),ao.forEach(t),Ft.forEach(t),ss=f(o),de=i(o,"H2",{class:!0});var _s=l(de);Oe=i(_s,"A",{id:!0,class:!0,href:!0});var Nl=l(Oe);un=i(Nl,"SPAN",{});var Il=l(un);M(Ao.$$.fragment,Il),Il.forEach(t),Nl.forEach(t),vr=f(_s),fn=i(_s,"SPAN",{});var Dl=l(fn);Xr=a(Dl,"XLMRobertaXLForSequenceClassification"),Dl.forEach(t),_s.forEach(t),as=f(o),E=i(o,"DIV",{class:!0});var ro=l(E);M(Po.$$.fragment,ro),Tr=f(ro),gn=i(ro,"P",{});var Wl=l(gn);yr=a(Wl,`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.`),Wl.forEach(t),$r=f(ro),ce=i(ro,"P",{});var Ct=l(ce);xr=a(Ct,"This model inherits from "),_t=i(Ct,"A",{href:!0});var Bl=l(_t);Rr=a(Bl,"PreTrainedModel"),Bl.forEach(t),Fr=a(Ct,`. 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 `),Oo=i(Ct,"A",{href:!0,rel:!0});var Ql=l(Oo);zr=a(Ql,"torch.nn.Module"),Ql.forEach(t),Cr=a(Ct,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Ct.forEach(t),qr=f(ro),F=i(ro,"DIV",{class:!0});var K=l(F);M(So.$$.fragment,K),Er=f(K),pe=i(K,"P",{});var qt=l(pe);jr=a(qt,"The "),bt=i(qt,"A",{href:!0});var Hl=l(bt);Ar=a(Hl,"XLMRobertaXLForSequenceClassification"),Hl.forEach(t),Pr=a(qt," forward method, overrides the "),_n=i(qt,"CODE",{});var Ul=l(_n);Or=a(Ul,"__call__"),Ul.forEach(t),Sr=a(qt," special method."),qt.forEach(t),Nr=f(K),M(Se.$$.fragment,K),Ir=f(K),M(Ne.$$.fragment,K),Dr=f(K),M(Ie.$$.fragment,K),K.forEach(t),ro.forEach(t),rs=f(o),he=i(o,"H2",{class:!0});var bs=l(he);De=i(bs,"A",{id:!0,class:!0,href:!0});var Vl=l(De);bn=i(Vl,"SPAN",{});var Gl=l(bn);M(No.$$.fragment,Gl),Gl.forEach(t),Vl.forEach(t),Wr=f(bs),Ln=i(bs,"SPAN",{});var Jl=l(Ln);Br=a(Jl,"XLMRobertaXLForMultipleChoice"),Jl.forEach(t),bs.forEach(t),is=f(o),j=i(o,"DIV",{class:!0});var io=l(j);M(Io.$$.fragment,io),Qr=f(io),kn=i(io,"P",{});var Kl=l(kn);Hr=a(Kl,`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.`),Kl.forEach(t),Ur=f(io),me=i(io,"P",{});var Et=l(me);Vr=a(Et,"This model inherits from "),Lt=i(Et,"A",{href:!0});var Yl=l(Lt);Gr=a(Yl,"PreTrainedModel"),Yl.forEach(t),Jr=a(Et,`. 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 `),Do=i(Et,"A",{href:!0,rel:!0});var Zl=l(Do);Kr=a(Zl,"torch.nn.Module"),Zl.forEach(t),Yr=a(Et,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Et.forEach(t),Zr=f(io),D=i(io,"DIV",{class:!0});var lo=l(D);M(Wo.$$.fragment,lo),ei=f(lo),ue=i(lo,"P",{});var jt=l(ue);oi=a(jt,"The "),kt=i(jt,"A",{href:!0});var ed=l(kt);ti=a(ed,"XLMRobertaXLForMultipleChoice"),ed.forEach(t),ni=a(jt," forward method, overrides the "),Mn=i(jt,"CODE",{});var od=l(Mn);si=a(od,"__call__"),od.forEach(t),ai=a(jt," special method."),jt.forEach(t),ri=f(lo),M(We.$$.fragment,lo),ii=f(lo),M(Be.$$.fragment,lo),lo.forEach(t),io.forEach(t),ls=f(o),fe=i(o,"H2",{class:!0});var Ls=l(fe);Qe=i(Ls,"A",{id:!0,class:!0,href:!0});var td=l(Qe);wn=i(td,"SPAN",{});var nd=l(wn);M(Bo.$$.fragment,nd),nd.forEach(t),td.forEach(t),li=f(Ls),vn=i(Ls,"SPAN",{});var sd=l(vn);di=a(sd,"XLMRobertaXLForTokenClassification"),sd.forEach(t),Ls.forEach(t),ds=f(o),A=i(o,"DIV",{class:!0});var co=l(A);M(Qo.$$.fragment,co),ci=f(co),Xn=i(co,"P",{});var ad=l(Xn);pi=a(ad,`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.`),ad.forEach(t),hi=f(co),ge=i(co,"P",{});var At=l(ge);mi=a(At,"This model inherits from "),Mt=i(At,"A",{href:!0});var rd=l(Mt);ui=a(rd,"PreTrainedModel"),rd.forEach(t),fi=a(At,`. 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 `),Ho=i(At,"A",{href:!0,rel:!0});var id=l(Ho);gi=a(id,"torch.nn.Module"),id.forEach(t),_i=a(At,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),At.forEach(t),bi=f(co),W=i(co,"DIV",{class:!0});var po=l(W);M(Uo.$$.fragment,po),Li=f(po),_e=i(po,"P",{});var Pt=l(_e);ki=a(Pt,"The "),wt=i(Pt,"A",{href:!0});var ld=l(wt);Mi=a(ld,"XLMRobertaXLForTokenClassification"),ld.forEach(t),wi=a(Pt," forward method, overrides the "),Tn=i(Pt,"CODE",{});var dd=l(Tn);vi=a(dd,"__call__"),dd.forEach(t),Xi=a(Pt," special method."),Pt.forEach(t),Ti=f(po),M(He.$$.fragment,po),yi=f(po),M(Ue.$$.fragment,po),po.forEach(t),co.forEach(t),cs=f(o),be=i(o,"H2",{class:!0});var ks=l(be);Ve=i(ks,"A",{id:!0,class:!0,href:!0});var cd=l(Ve);yn=i(cd,"SPAN",{});var pd=l(yn);M(Vo.$$.fragment,pd),pd.forEach(t),cd.forEach(t),$i=f(ks),$n=i(ks,"SPAN",{});var hd=l($n);xi=a(hd,"XLMRobertaXLForQuestionAnswering"),hd.forEach(t),ks.forEach(t),ps=f(o),P=i(o,"DIV",{class:!0});var ho=l(P);M(Go.$$.fragment,ho),Ri=f(ho),Le=i(ho,"P",{});var Ot=l(Le);Fi=a(Ot,`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 `),xn=i(Ot,"CODE",{});var md=l(xn);zi=a(md,"span start logits"),md.forEach(t),Ci=a(Ot," and "),Rn=i(Ot,"CODE",{});var ud=l(Rn);qi=a(ud,"span end logits"),ud.forEach(t),Ei=a(Ot,")."),Ot.forEach(t),ji=f(ho),ke=i(ho,"P",{});var St=l(ke);Ai=a(St,"This model inherits from "),vt=i(St,"A",{href:!0});var fd=l(vt);Pi=a(fd,"PreTrainedModel"),fd.forEach(t),Oi=a(St,`. 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 `),Jo=i(St,"A",{href:!0,rel:!0});var gd=l(Jo);Si=a(gd,"torch.nn.Module"),gd.forEach(t),Ni=a(St,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),St.forEach(t),Ii=f(ho),B=i(ho,"DIV",{class:!0});var mo=l(B);M(Ko.$$.fragment,mo),Di=f(mo),Me=i(mo,"P",{});var Nt=l(Me);Wi=a(Nt,"The "),Xt=i(Nt,"A",{href:!0});var _d=l(Xt);Bi=a(_d,"XLMRobertaXLForQuestionAnswering"),_d.forEach(t),Qi=a(Nt," forward method, overrides the "),Fn=i(Nt,"CODE",{});var bd=l(Fn);Hi=a(bd,"__call__"),bd.forEach(t),Ui=a(Nt," special method."),Nt.forEach(t),Vi=f(mo),M(Ge.$$.fragment,mo),Gi=f(mo),M(Je.$$.fragment,mo),mo.forEach(t),ho.forEach(t),this.h()},h(){h(d,"name","hf:doc:metadata"),h(d,"content",JSON.stringify(Id)),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(Te,"id","overview"),h(Te,"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(Te,"href","#overview"),h(Z,"class","relative group"),h(fo,"href","https://arxiv.org/abs/2105.00572"),h(fo,"rel","nofollow"),h(_o,"href","https://github.com/Soonhwan-Kwon"),h(_o,"rel","nofollow"),h(bo,"href","https://huggingface.co/stefan-it"),h(bo,"rel","nofollow"),h(Lo,"href","https://github.com/pytorch/fairseq/tree/master/examples/xlmr"),h(Lo,"rel","nofollow"),h($e,"id","transformers.XLMRobertaXLConfig"),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","#transformers.XLMRobertaXLConfig"),h(ee,"class","relative group"),h(lt,"href","/docs/transformers/main/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLModel"),h(wo,"href","https://huggingface.co/facebook/xlm-roberta-xl"),h(wo,"rel","nofollow"),h(dt,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),h(ct,"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(Re,"id","transformers.XLMRobertaXLModel"),h(Re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(Re,"href","#transformers.XLMRobertaXLModel"),h(te,"class","relative group"),h(pt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(To,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(To,"rel","nofollow"),h(yo,"href","https://arxiv.org/abs/1706.03762"),h(yo,"rel","nofollow"),h(ht,"href","/docs/transformers/main/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLModel"),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(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(Ce,"id","transformers.XLMRobertaXLForCausalLM"),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.XLMRobertaXLForCausalLM"),h(ae,"class","relative group"),h(mt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(Fo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Fo,"rel","nofollow"),h(ut,"href","/docs/transformers/main/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLForCausalLM"),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(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(je,"id","transformers.XLMRobertaXLForMaskedLM"),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.XLMRobertaXLForMaskedLM"),h(ie,"class","relative group"),h(ft,"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(gt,"href","/docs/transformers/main/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLForMaskedLM"),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"),h(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Oe,"id","transformers.XLMRobertaXLForSequenceClassification"),h(Oe,"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(Oe,"href","#transformers.XLMRobertaXLForSequenceClassification"),h(de,"class","relative group"),h(_t,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(Oo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Oo,"rel","nofollow"),h(bt,"href","/docs/transformers/main/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLForSequenceClassification"),h(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(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(De,"id","transformers.XLMRobertaXLForMultipleChoice"),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.XLMRobertaXLForMultipleChoice"),h(he,"class","relative group"),h(Lt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(Do,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Do,"rel","nofollow"),h(kt,"href","/docs/transformers/main/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLForMultipleChoice"),h(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),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(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(fe,"class","relative group"),h(Mt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(Ho,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Ho,"rel","nofollow"),h(wt,"href","/docs/transformers/main/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLForTokenClassification"),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(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(Ve,"id","transformers.XLMRobertaXLForQuestionAnswering"),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.XLMRobertaXLForQuestionAnswering"),h(be,"class","relative group"),h(vt,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),h(Jo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),h(Jo,"rel","nofollow"),h(Xt,"href","/docs/transformers/main/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLForQuestionAnswering"),h(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(o,g){e(document.head,d),b(o,L,g),b(o,m,g),e(m,p),e(p,_),w(n,_,null),e(m,c),e(m,$),e($,Ms),b(o,Wn,g),b(o,Z,g),e(Z,Te),e(Te,It),w(uo,It,null),e(Z,ws),e(Z,Dt),e(Dt,vs),b(o,Bn,g),b(o,ye,g),e(ye,Xs),e(ye,fo),e(fo,Ts),e(ye,ys),b(o,Qn,g),b(o,st,g),e(st,$s),b(o,Hn,g),b(o,at,g),e(at,Wt),e(Wt,xs),b(o,Un,g),b(o,rt,g),e(rt,Rs),b(o,Vn,g),b(o,it,g),e(it,go),e(go,Fs),e(go,Bt),e(Bt,zs),e(go,Cs),b(o,Gn,g),b(o,O,g),e(O,qs),e(O,_o),e(_o,Es),e(O,js),e(O,bo),e(bo,As),e(O,Ps),e(O,Lo),e(Lo,Os),e(O,Ss),b(o,Jn,g),b(o,ee,g),e(ee,$e),e($e,Qt),w(ko,Qt,null),e(ee,Ns),e(ee,Ht),e(Ht,Is),b(o,Kn,g),b(o,C,g),w(Mo,C,null),e(C,Ds),e(C,Q),e(Q,Ws),e(Q,lt),e(lt,Bs),e(Q,Qs),e(Q,Ut),e(Ut,Hs),e(Q,Us),e(Q,wo),e(wo,Vs),e(Q,Gs),e(C,Js),e(C,oe),e(oe,Ks),e(oe,dt),e(dt,Ys),e(oe,Zs),e(oe,ct),e(ct,ea),e(oe,oa),e(C,ta),w(xe,C,null),b(o,Yn,g),b(o,te,g),e(te,Re),e(Re,Vt),w(vo,Vt,null),e(te,na),e(te,Gt),e(Gt,sa),b(o,Zn,g),b(o,q,g),w(Xo,q,null),e(q,aa),e(q,ne),e(ne,ra),e(ne,pt),e(pt,ia),e(ne,la),e(ne,To),e(To,da),e(ne,ca),e(q,pa),e(q,J),e(J,ha),e(J,Jt),e(Jt,ma),e(J,x),e(x,ua),e(x,Kt),e(Kt,fa),e(x,ga),e(x,Yt),e(Yt,_a),e(x,ba),e(x,Zt),e(Zt,La),e(x,ka),e(x,en),e(en,Ma),e(x,wa),e(x,on),e(on,va),e(x,Xa),e(x,tn),e(tn,Ta),e(x,ya),e(J,nn),e(nn,$a),e(J,xa),e(J,yo),e(yo,Ra),e(q,Fa),e(q,S),w($o,S,null),e(S,za),e(S,se),e(se,Ca),e(se,ht),e(ht,qa),e(se,Ea),e(se,sn),e(sn,ja),e(se,Aa),e(S,Pa),w(Fe,S,null),e(S,Oa),w(ze,S,null),b(o,es,g),b(o,ae,g),e(ae,Ce),e(Ce,an),w(xo,an,null),e(ae,Sa),e(ae,rn),e(rn,Na),b(o,os,g),b(o,H,g),w(Ro,H,null),e(H,Ia),e(H,U),e(U,Da),e(U,ln),e(ln,Wa),e(U,Ba),e(U,mt),e(mt,Qa),e(U,Ha),e(U,Fo),e(Fo,Ua),e(U,Va),e(H,Ga),e(H,N),w(zo,N,null),e(N,Ja),e(N,re),e(re,Ka),e(re,ut),e(ut,Ya),e(re,Za),e(re,dn),e(dn,er),e(re,or),e(N,tr),w(qe,N,null),e(N,nr),w(Ee,N,null),b(o,ts,g),b(o,ie,g),e(ie,je),e(je,cn),w(Co,cn,null),e(ie,sr),e(ie,pn),e(pn,ar),b(o,ns,g),b(o,V,g),w(qo,V,null),e(V,rr),e(V,G),e(G,ir),e(G,hn),e(hn,lr),e(G,dr),e(G,ft),e(ft,cr),e(G,pr),e(G,Eo),e(Eo,hr),e(G,mr),e(V,ur),e(V,I),w(jo,I,null),e(I,fr),e(I,le),e(le,gr),e(le,gt),e(gt,_r),e(le,br),e(le,mn),e(mn,Lr),e(le,kr),e(I,Mr),w(Ae,I,null),e(I,wr),w(Pe,I,null),b(o,ss,g),b(o,de,g),e(de,Oe),e(Oe,un),w(Ao,un,null),e(de,vr),e(de,fn),e(fn,Xr),b(o,as,g),b(o,E,g),w(Po,E,null),e(E,Tr),e(E,gn),e(gn,yr),e(E,$r),e(E,ce),e(ce,xr),e(ce,_t),e(_t,Rr),e(ce,Fr),e(ce,Oo),e(Oo,zr),e(ce,Cr),e(E,qr),e(E,F),w(So,F,null),e(F,Er),e(F,pe),e(pe,jr),e(pe,bt),e(bt,Ar),e(pe,Pr),e(pe,_n),e(_n,Or),e(pe,Sr),e(F,Nr),w(Se,F,null),e(F,Ir),w(Ne,F,null),e(F,Dr),w(Ie,F,null),b(o,rs,g),b(o,he,g),e(he,De),e(De,bn),w(No,bn,null),e(he,Wr),e(he,Ln),e(Ln,Br),b(o,is,g),b(o,j,g),w(Io,j,null),e(j,Qr),e(j,kn),e(kn,Hr),e(j,Ur),e(j,me),e(me,Vr),e(me,Lt),e(Lt,Gr),e(me,Jr),e(me,Do),e(Do,Kr),e(me,Yr),e(j,Zr),e(j,D),w(Wo,D,null),e(D,ei),e(D,ue),e(ue,oi),e(ue,kt),e(kt,ti),e(ue,ni),e(ue,Mn),e(Mn,si),e(ue,ai),e(D,ri),w(We,D,null),e(D,ii),w(Be,D,null),b(o,ls,g),b(o,fe,g),e(fe,Qe),e(Qe,wn),w(Bo,wn,null),e(fe,li),e(fe,vn),e(vn,di),b(o,ds,g),b(o,A,g),w(Qo,A,null),e(A,ci),e(A,Xn),e(Xn,pi),e(A,hi),e(A,ge),e(ge,mi),e(ge,Mt),e(Mt,ui),e(ge,fi),e(ge,Ho),e(Ho,gi),e(ge,_i),e(A,bi),e(A,W),w(Uo,W,null),e(W,Li),e(W,_e),e(_e,ki),e(_e,wt),e(wt,Mi),e(_e,wi),e(_e,Tn),e(Tn,vi),e(_e,Xi),e(W,Ti),w(He,W,null),e(W,yi),w(Ue,W,null),b(o,cs,g),b(o,be,g),e(be,Ve),e(Ve,yn),w(Vo,yn,null),e(be,$i),e(be,$n),e($n,xi),b(o,ps,g),b(o,P,g),w(Go,P,null),e(P,Ri),e(P,Le),e(Le,Fi),e(Le,xn),e(xn,zi),e(Le,Ci),e(Le,Rn),e(Rn,qi),e(Le,Ei),e(P,ji),e(P,ke),e(ke,Ai),e(ke,vt),e(vt,Pi),e(ke,Oi),e(ke,Jo),e(Jo,Si),e(ke,Ni),e(P,Ii),e(P,B),w(Ko,B,null),e(B,Di),e(B,Me),e(Me,Wi),e(Me,Xt),e(Xt,Bi),e(Me,Qi),e(Me,Fn),e(Fn,Hi),e(Me,Ui),e(B,Vi),w(Ge,B,null),e(B,Gi),w(Je,B,null),hs=!0},p(o,[g]){const Yo={};g&2&&(Yo.$$scope={dirty:g,ctx:o}),xe.$set(Yo);const zn={};g&2&&(zn.$$scope={dirty:g,ctx:o}),Fe.$set(zn);const Cn={};g&2&&(Cn.$$scope={dirty:g,ctx:o}),ze.$set(Cn);const qn={};g&2&&(qn.$$scope={dirty:g,ctx:o}),qe.$set(qn);const Zo={};g&2&&(Zo.$$scope={dirty:g,ctx:o}),Ee.$set(Zo);const En={};g&2&&(En.$$scope={dirty:g,ctx:o}),Ae.$set(En);const jn={};g&2&&(jn.$$scope={dirty:g,ctx:o}),Pe.$set(jn);const An={};g&2&&(An.$$scope={dirty:g,ctx:o}),Se.$set(An);const et={};g&2&&(et.$$scope={dirty:g,ctx:o}),Ne.$set(et);const Pn={};g&2&&(Pn.$$scope={dirty:g,ctx:o}),Ie.$set(Pn);const On={};g&2&&(On.$$scope={dirty:g,ctx:o}),We.$set(On);const Sn={};g&2&&(Sn.$$scope={dirty:g,ctx:o}),Be.$set(Sn);const Nn={};g&2&&(Nn.$$scope={dirty:g,ctx:o}),He.$set(Nn);const In={};g&2&&(In.$$scope={dirty:g,ctx:o}),Ue.$set(In);const Dn={};g&2&&(Dn.$$scope={dirty:g,ctx:o}),Ge.$set(Dn);const ot={};g&2&&(ot.$$scope={dirty:g,ctx:o}),Je.$set(ot)},i(o){hs||(v(n.$$.fragment,o),v(uo.$$.fragment,o),v(ko.$$.fragment,o),v(Mo.$$.fragment,o),v(xe.$$.fragment,o),v(vo.$$.fragment,o),v(Xo.$$.fragment,o),v($o.$$.fragment,o),v(Fe.$$.fragment,o),v(ze.$$.fragment,o),v(xo.$$.fragment,o),v(Ro.$$.fragment,o),v(zo.$$.fragment,o),v(qe.$$.fragment,o),v(Ee.$$.fragment,o),v(Co.$$.fragment,o),v(qo.$$.fragment,o),v(jo.$$.fragment,o),v(Ae.$$.fragment,o),v(Pe.$$.fragment,o),v(Ao.$$.fragment,o),v(Po.$$.fragment,o),v(So.$$.fragment,o),v(Se.$$.fragment,o),v(Ne.$$.fragment,o),v(Ie.$$.fragment,o),v(No.$$.fragment,o),v(Io.$$.fragment,o),v(Wo.$$.fragment,o),v(We.$$.fragment,o),v(Be.$$.fragment,o),v(Bo.$$.fragment,o),v(Qo.$$.fragment,o),v(Uo.$$.fragment,o),v(He.$$.fragment,o),v(Ue.$$.fragment,o),v(Vo.$$.fragment,o),v(Go.$$.fragment,o),v(Ko.$$.fragment,o),v(Ge.$$.fragment,o),v(Je.$$.fragment,o),hs=!0)},o(o){X(n.$$.fragment,o),X(uo.$$.fragment,o),X(ko.$$.fragment,o),X(Mo.$$.fragment,o),X(xe.$$.fragment,o),X(vo.$$.fragment,o),X(Xo.$$.fragment,o),X($o.$$.fragment,o),X(Fe.$$.fragment,o),X(ze.$$.fragment,o),X(xo.$$.fragment,o),X(Ro.$$.fragment,o),X(zo.$$.fragment,o),X(qe.$$.fragment,o),X(Ee.$$.fragment,o),X(Co.$$.fragment,o),X(qo.$$.fragment,o),X(jo.$$.fragment,o),X(Ae.$$.fragment,o),X(Pe.$$.fragment,o),X(Ao.$$.fragment,o),X(Po.$$.fragment,o),X(So.$$.fragment,o),X(Se.$$.fragment,o),X(Ne.$$.fragment,o),X(Ie.$$.fragment,o),X(No.$$.fragment,o),X(Io.$$.fragment,o),X(Wo.$$.fragment,o),X(We.$$.fragment,o),X(Be.$$.fragment,o),X(Bo.$$.fragment,o),X(Qo.$$.fragment,o),X(Uo.$$.fragment,o),X(He.$$.fragment,o),X(Ue.$$.fragment,o),X(Vo.$$.fragment,o),X(Go.$$.fragment,o),X(Ko.$$.fragment,o),X(Ge.$$.fragment,o),X(Je.$$.fragment,o),hs=!1},d(o){t(d),o&&t(L),o&&t(m),T(n),o&&t(Wn),o&&t(Z),T(uo),o&&t(Bn),o&&t(ye),o&&t(Qn),o&&t(st),o&&t(Hn),o&&t(at),o&&t(Un),o&&t(rt),o&&t(Vn),o&&t(it),o&&t(Gn),o&&t(O),o&&t(Jn),o&&t(ee),T(ko),o&&t(Kn),o&&t(C),T(Mo),T(xe),o&&t(Yn),o&&t(te),T(vo),o&&t(Zn),o&&t(q),T(Xo),T($o),T(Fe),T(ze),o&&t(es),o&&t(ae),T(xo),o&&t(os),o&&t(H),T(Ro),T(zo),T(qe),T(Ee),o&&t(ts),o&&t(ie),T(Co),o&&t(ns),o&&t(V),T(qo),T(jo),T(Ae),T(Pe),o&&t(ss),o&&t(de),T(Ao),o&&t(as),o&&t(E),T(Po),T(So),T(Se),T(Ne),T(Ie),o&&t(rs),o&&t(he),T(No),o&&t(is),o&&t(j),T(Io),T(Wo),T(We),T(Be),o&&t(ls),o&&t(fe),T(Bo),o&&t(ds),o&&t(A),T(Qo),T(Uo),T(He),T(Ue),o&&t(cs),o&&t(be),T(Vo),o&&t(ps),o&&t(P),T(Go),T(Ko),T(Ge),T(Je)}}}const Id={local:"xlmrobertaxl",sections:[{local:"overview",title:"Overview"},{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 Dd(y){return vd(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Gd extends Ld{constructor(d){super();kd(this,d,Dd,Nd,Md,{})}}export{Gd as default,Id as metadata};
