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