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 o,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 io}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(o),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&&o(d),n&&o(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(o),_=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(o)},m(n,c){b(n,d,c),e(d,L),e(d,m),e(m,h),e(d,_)},d(n){n&&o(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(o),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&&o(d),n&&o(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(o),_=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(o)},m(n,c){b(n,d,c),e(d,L),e(d,m),e(m,h),e(d,_)},d(n){n&&o(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(o),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&&o(d),n&&o(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(o),_=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(o)},m(n,c){b(n,d,c),e(d,L),e(d,m),e(m,h),e(d,_)},d(n){n&&o(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(o),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&&o(d),n&&o(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(o),_=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(o)},m(n,c){b(n,d,c),e(d,L),e(d,m),e(m,h),e(d,_)},d(n){n&&o(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(o),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&&o(d),n&&o(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(o),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&&o(d),n&&o(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(o),_=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(o)},m(n,c){b(n,d,c),e(d,L),e(d,m),e(m,h),e(d,_)},d(n){n&&o(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(o),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&&o(d),n&&o(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(o),_=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(o)},m(n,c){b(n,d,c),e(d,L),e(d,m),e(m,h),e(d,_)},d(n){n&&o(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(o),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&&o(d),n&&o(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(o),_=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(o)},m(n,c){b(n,d,c),e(d,L),e(d,m),e(m,h),e(d,_)},d(n){n&&o(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(o),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&&o(d),n&&o(m),T(h,n)}}}function Ac(y){let d,L,m,h,_,n,c,$,Ws,ls,te,xe,Yo,_t,Bs,Zo,Qs,ds,Re,Hs,bt,Us,Vs,cs,lo,Gs,ps,co,en,Js,hs,po,Ks,ms,ho,Lt,Ys,tn,Zs,ea,us,S,ta,kt,oa,na,vt,sa,aa,Mt,ra,ia,fs,oe,Fe,on,wt,la,nn,da,gs,R,sn,mo,ca,pa,an,uo,ha,ma,rn,fo,ua,fa,ln,go,ga,_a,dn,_o,ba,La,cn,bo,ka,_s,ne,ze,pn,Xt,va,hn,Ma,bs,q,Tt,wa,U,Xa,Lo,Ta,ya,mn,$a,xa,yt,Ra,Fa,za,se,Ca,ko,qa,Ea,vo,ja,Aa,Pa,Ce,Ls,ae,qe,un,$t,Oa,fn,Sa,ks,E,xt,Na,re,Ia,Mo,Da,Wa,Rt,Ba,Qa,Ha,Z,Ua,gn,Va,x,Ga,_n,Ja,Ka,bn,Ya,Za,Ln,er,tr,kn,or,nr,vn,sr,ar,Mn,rr,ir,wn,lr,dr,Ft,cr,pr,N,zt,hr,ie,mr,wo,ur,fr,Xn,gr,_r,br,Ee,Lr,je,vs,le,Ae,Tn,Ct,kr,yn,vr,Ms,V,qt,Mr,G,wr,$n,Xr,Tr,Xo,yr,$r,Et,xr,Rr,Fr,I,jt,zr,de,Cr,To,qr,Er,xn,jr,Ar,Pr,Pe,Or,Oe,ws,ce,Se,Rn,At,Sr,Fn,Nr,Xs,J,Pt,Ir,K,Dr,zn,Wr,Br,yo,Qr,Hr,Ot,Ur,Vr,Gr,D,St,Jr,pe,Kr,$o,Yr,Zr,Cn,ei,ti,oi,Ne,ni,Ie,Ts,he,De,qn,Nt,si,En,ai,ys,j,It,ri,jn,ii,li,me,di,xo,ci,pi,Dt,hi,mi,ui,z,Wt,fi,ue,gi,Ro,_i,bi,An,Li,ki,vi,We,Mi,Be,wi,Qe,$s,fe,He,Pn,Bt,Xi,On,Ti,xs,A,Qt,yi,Sn,$i,xi,ge,Ri,Fo,Fi,zi,Ht,Ci,qi,Ei,W,Ut,ji,_e,Ai,zo,Pi,Oi,Nn,Si,Ni,Ii,Ue,Di,Ve,Rs,be,Ge,In,Vt,Wi,Dn,Bi,Fs,P,Gt,Qi,Wn,Hi,Ui,Le,Vi,Co,Gi,Ji,Jt,Ki,Yi,Zi,B,Kt,el,ke,tl,qo,ol,nl,Bn,sl,al,rl,Je,il,Ke,zs,ve,Ye,Qn,Yt,ll,Hn,dl,Cs,O,Zt,cl,Me,pl,Un,hl,ml,Vn,ul,fl,gl,we,_l,Eo,bl,Ll,eo,kl,vl,Ml,Q,to,wl,Xe,Xl,jo,Tl,yl,Gn,$l,xl,Rl,Ze,Fl,et,qs;return n=new Y({}),_t=new Y({}),wt=new Y({}),Xt=new Y({}),Tt=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.27.1/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.27.1/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.27.1/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}}}),$t=new Y({}),xt=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.27.1/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.27.1/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.27.1/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L671"}}),zt=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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMRobertaXLModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.XLMRobertaXLModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaXLModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMRobertaXLModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.XLMRobertaXLModel.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.XLMRobertaXLModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.XLMRobertaXLModel.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.XLMRobertaXLModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L711",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ee=new io({props:{$$slots:{default:[vc]},$$scope:{ctx:y}}}),je=new Te({props:{anchor:"transformers.XLMRobertaXLModel.forward.example",$$slots:{default:[Mc]},$$scope:{ctx:y}}}),Ct=new Y({}),qt=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.27.1/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.27.1/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.27.1/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L852"}}),jt=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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMRobertaXLForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.XLMRobertaXLForCausalLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaXLForCausalLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMRobertaXLForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.XLMRobertaXLForCausalLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.XLMRobertaXLForCausalLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.XLMRobertaXLForCausalLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.XLMRobertaXLForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L877",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Pe=new io({props:{$$slots:{default:[wc]},$$scope:{ctx:y}}}),Oe=new Te({props:{anchor:"transformers.XLMRobertaXLForCausalLM.forward.example",$$slots:{default:[Xc]},$$scope:{ctx:y}}}),At=new Y({}),Pt=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.27.1/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.27.1/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.27.1/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1002"}}),St=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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMRobertaXLForMaskedLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.XLMRobertaXLForMaskedLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaXLForMaskedLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMRobertaXLForMaskedLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.XLMRobertaXLForMaskedLM.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.XLMRobertaXLForMaskedLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.XLMRobertaXLForMaskedLM.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.XLMRobertaXLForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1030",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ne=new io({props:{$$slots:{default:[Tc]},$$scope:{ctx:y}}}),Ie=new Te({props:{anchor:"transformers.XLMRobertaXLForMaskedLM.forward.example",$$slots:{default:[yc]},$$scope:{ctx:y}}}),Nt=new Y({}),It=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.27.1/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.27.1/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.27.1/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1129"}}),Wt=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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMRobertaXLForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.XLMRobertaXLForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaXLForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMRobertaXLForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.XLMRobertaXLForSequenceClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.XLMRobertaXLForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.XLMRobertaXLForSequenceClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.XLMRobertaXLForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1142",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),We=new io({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}}}),Bt=new Y({}),Qt=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.27.1/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.27.1/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.27.1/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1225"}}),Ut=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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMRobertaXLForMultipleChoice.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.XLMRobertaXLForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaXLForMultipleChoice.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMRobertaXLForMultipleChoice.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.XLMRobertaXLForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.XLMRobertaXLForMultipleChoice.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.XLMRobertaXLForMultipleChoice.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.XLMRobertaXLForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1237",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ue=new io({props:{$$slots:{default:[Fc]},$$scope:{ctx:y}}}),Ve=new Te({props:{anchor:"transformers.XLMRobertaXLForMultipleChoice.forward.example",$$slots:{default:[zc]},$$scope:{ctx:y}}}),Vt=new Y({}),Gt=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.27.1/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.27.1/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.27.1/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1318"}}),Kt=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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMRobertaXLForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.XLMRobertaXLForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaXLForTokenClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMRobertaXLForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.XLMRobertaXLForTokenClassification.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.XLMRobertaXLForTokenClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.XLMRobertaXLForTokenClassification.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.XLMRobertaXLForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1335",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Je=new io({props:{$$slots:{default:[Cc]},$$scope:{ctx:y}}}),Ke=new Te({props:{anchor:"transformers.XLMRobertaXLForTokenClassification.forward.example",$$slots:{default:[qc]},$$scope:{ctx:y}}}),Yt=new Y({}),Zt=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.27.1/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.27.1/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.27.1/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1432"}}),to=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.27.1/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See
<a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and <a href="/docs/transformers/v4.27.1/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details. <a href="../glossary#input-ids">What are input
IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMRobertaXLForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.
<a href="../glossary#attention-mask">What are attention masks?</a></li>
</ul>`,name:"attention_mask"},{anchor:"transformers.XLMRobertaXLForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.
<a href="../glossary#token-type-ids">What are token type IDs?</a></li>
</ul>`,name:"token_type_ids"},{anchor:"transformers.XLMRobertaXLForQuestionAnswering.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>. <a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMRobertaXLForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.XLMRobertaXLForQuestionAnswering.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <code>input_ids</code> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.XLMRobertaXLForQuestionAnswering.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.XLMRobertaXLForQuestionAnswering.forward.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail.`,name:"output_hidden_states"},{anchor:"transformers.XLMRobertaXLForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.27.1/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.27.1/src/transformers/models/xlm_roberta_xl/modeling_xlm_roberta_xl.py#L1445",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.27.1/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.27.1/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.27.1/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ze=new io({props:{$$slots:{default:[Ec]},$$scope:{ctx:y}}}),et=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(),te=s("h2"),xe=s("a"),Yo=s("span"),k(_t.$$.fragment),Bs=u(),Zo=s("span"),Qs=i("Overview"),ds=u(),Re=s("p"),Hs=i("The XLM-RoBERTa-XL model was proposed in "),bt=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(),lo=s("p"),Gs=i("The abstract from the paper is the following:"),ps=u(),co=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(),po=s("p"),Ks=i("Tips:"),ms=u(),ho=s("ul"),Lt=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 `),tn=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"),ta=i("This model was contributed by "),kt=s("a"),oa=i("Soonhwan-Kwon"),na=i(" and "),vt=s("a"),sa=i("stefan-it"),aa=i(". The original code can be found "),Mt=s("a"),ra=i("here"),ia=i("."),fs=u(),oe=s("h2"),Fe=s("a"),on=s("span"),k(wt.$$.fragment),la=u(),nn=s("span"),da=i("Documentation resources"),gs=u(),R=s("ul"),sn=s("li"),mo=s("a"),ca=i("Text classification task guide"),pa=u(),an=s("li"),uo=s("a"),ha=i("Token classification task guide"),ma=u(),rn=s("li"),fo=s("a"),ua=i("Question answering task guide"),fa=u(),ln=s("li"),go=s("a"),ga=i("Causal language modeling task guide"),_a=u(),dn=s("li"),_o=s("a"),ba=i("Masked language modeling task guide"),La=u(),cn=s("li"),bo=s("a"),ka=i("Multiple choice task guide"),_s=u(),ne=s("h2"),ze=s("a"),pn=s("span"),k(Xt.$$.fragment),va=u(),hn=s("span"),Ma=i("XLMRobertaXLConfig"),bs=u(),q=s("div"),k(Tt.$$.fragment),wa=u(),U=s("p"),Xa=i("This is the configuration class to store the configuration of a "),Lo=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 `),yt=s("a"),Ra=i("facebook/xlm-roberta-xl"),Fa=i(" architecture."),za=u(),se=s("p"),Ca=i("Configuration objects inherit from "),ko=s("a"),qa=i("PretrainedConfig"),Ea=i(` and can be used to control the model outputs. Read the
documentation from `),vo=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($t.$$.fragment),Oa=u(),fn=s("span"),Sa=i("XLMRobertaXLModel"),ks=u(),E=s("div"),k(xt.$$.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 `),Mo=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 `),Rt=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"),tr=i(" argument and "),kn=s("code"),or=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(": "),Ft=s("a"),cr=i("https://arxiv.org/abs/1706.03762"),pr=u(),N=s("div"),k(zt.$$.fragment),hr=u(),ie=s("p"),mr=i("The "),wo=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(Ct.$$.fragment),kr=u(),yn=s("span"),vr=i("XLMRobertaXLForCausalLM"),Ms=u(),V=s("div"),k(qt.$$.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 `),Xo=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 `),Et=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(jt.$$.fragment),zr=u(),de=s("p"),Cr=i("The "),To=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(At.$$.fragment),Sr=u(),Fn=s("span"),Nr=i("XLMRobertaXLForMaskedLM"),Xs=u(),J=s("div"),k(Pt.$$.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 `),yo=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 `),Ot=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(St.$$.fragment),Jr=u(),pe=s("p"),Kr=i("The "),$o=s("a"),Yr=i("XLMRobertaXLForMaskedLM"),Zr=i(" forward method, overrides the "),Cn=s("code"),ei=i("__call__"),ti=i(" special method."),oi=u(),k(Ne.$$.fragment),ni=u(),k(Ie.$$.fragment),Ts=u(),he=s("h2"),De=s("a"),qn=s("span"),k(Nt.$$.fragment),si=u(),En=s("span"),ai=i("XLMRobertaXLForSequenceClassification"),ys=u(),j=s("div"),k(It.$$.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 "),xo=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 `),Dt=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(Wt.$$.fragment),fi=u(),ue=s("p"),gi=i("The "),Ro=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(Bt.$$.fragment),Xi=u(),On=s("span"),Ti=i("XLMRobertaXLForMultipleChoice"),xs=u(),A=s("div"),k(Qt.$$.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 "),Fo=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 `),Ht=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(Ut.$$.fragment),ji=u(),_e=s("p"),Ai=i("The "),zo=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(Vt.$$.fragment),Wi=u(),Dn=s("span"),Bi=i("XLMRobertaXLForTokenClassification"),Fs=u(),P=s("div"),k(Gt.$$.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 "),Co=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 `),Jt=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(Kt.$$.fragment),el=u(),ke=s("p"),tl=i("The "),qo=s("a"),ol=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(Yt.$$.fragment),ll=u(),Hn=s("span"),dl=i("XLMRobertaXLForQuestionAnswering"),Cs=u(),O=s("div"),k(Zt.$$.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 "),Eo=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 `),eo=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(to.$$.fragment),wl=u(),Xe=s("p"),Xl=i("The "),jo=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(et.$$.fragment),this.h()},l(t){const g=bc('[data-svelte="svelte-1phssyn"]',document.head);d=a(g,"META",{name:!0,content:!0}),g.forEach(o),L=f(t),m=a(t,"H1",{class:!0});var oo=r(m);h=a(oo,"A",{id:!0,class:!0,href:!0});var Jn=r(h);_=a(Jn,"SPAN",{});var Kn=r(_);v(n.$$.fragment,Kn),Kn.forEach(o),Jn.forEach(o),c=f(oo),$=a(oo,"SPAN",{});var Yn=r($);Ws=l(Yn,"XLM-RoBERTa-XL"),Yn.forEach(o),oo.forEach(o),ls=f(t),te=a(t,"H2",{class:!0});var no=r(te);xe=a(no,"A",{id:!0,class:!0,href:!0});var Zn=r(xe);Yo=a(Zn,"SPAN",{});var es=r(Yo);v(_t.$$.fragment,es),es.forEach(o),Zn.forEach(o),Bs=f(no),Zo=a(no,"SPAN",{});var ts=r(Zo);Qs=l(ts,"Overview"),ts.forEach(o),no.forEach(o),ds=f(t),Re=a(t,"P",{});var so=r(Re);Hs=l(so,"The XLM-RoBERTa-XL model was proposed in "),bt=a(so,"A",{href:!0,rel:!0});var os=r(bt);Us=l(os,"Larger-Scale Transformers for Multilingual Masked Language Modeling"),os.forEach(o),Vs=l(so," by Naman Goyal, Jingfei Du, Myle Ott, Giri Anantharaman, Alexis Conneau."),so.forEach(o),cs=f(t),lo=a(t,"P",{});var ns=r(lo);Gs=l(ns,"The abstract from the paper is the following:"),ns.forEach(o),ps=f(t),co=a(t,"P",{});var ss=r(co);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(o),ss.forEach(o),hs=f(t),po=a(t,"P",{});var rs=r(po);Ks=l(rs,"Tips:"),rs.forEach(o),ms=f(t),ho=a(t,"UL",{});var is=r(ho);Lt=a(is,"LI",{});var ao=r(Lt);Ys=l(ao,`XLM-RoBERTa-XL is a multilingual model trained on 100 different languages. Unlike some XLM multilingual models, it does
not require `),tn=a(ao,"CODE",{});var zl=r(tn);Zs=l(zl,"lang"),zl.forEach(o),ea=l(ao,` tensors to understand which language is used, and should be able to determine the correct
language from the input ids.`),ao.forEach(o),is.forEach(o),us=f(t),S=a(t,"P",{});var tt=r(S);ta=l(tt,"This model was contributed by "),kt=a(tt,"A",{href:!0,rel:!0});var Cl=r(kt);oa=l(Cl,"Soonhwan-Kwon"),Cl.forEach(o),na=l(tt," and "),vt=a(tt,"A",{href:!0,rel:!0});var ql=r(vt);sa=l(ql,"stefan-it"),ql.forEach(o),aa=l(tt,". The original code can be found "),Mt=a(tt,"A",{href:!0,rel:!0});var El=r(Mt);ra=l(El,"here"),El.forEach(o),ia=l(tt,"."),tt.forEach(o),fs=f(t),oe=a(t,"H2",{class:!0});var Es=r(oe);Fe=a(Es,"A",{id:!0,class:!0,href:!0});var jl=r(Fe);on=a(jl,"SPAN",{});var Al=r(on);v(wt.$$.fragment,Al),Al.forEach(o),jl.forEach(o),la=f(Es),nn=a(Es,"SPAN",{});var Pl=r(nn);da=l(Pl,"Documentation resources"),Pl.forEach(o),Es.forEach(o),gs=f(t),R=a(t,"UL",{});var H=r(R);sn=a(H,"LI",{});var Ol=r(sn);mo=a(Ol,"A",{href:!0});var Sl=r(mo);ca=l(Sl,"Text classification task guide"),Sl.forEach(o),Ol.forEach(o),pa=f(H),an=a(H,"LI",{});var Nl=r(an);uo=a(Nl,"A",{href:!0});var Il=r(uo);ha=l(Il,"Token classification task guide"),Il.forEach(o),Nl.forEach(o),ma=f(H),rn=a(H,"LI",{});var Dl=r(rn);fo=a(Dl,"A",{href:!0});var Wl=r(fo);ua=l(Wl,"Question answering task guide"),Wl.forEach(o),Dl.forEach(o),fa=f(H),ln=a(H,"LI",{});var Bl=r(ln);go=a(Bl,"A",{href:!0});var Ql=r(go);ga=l(Ql,"Causal language modeling task guide"),Ql.forEach(o),Bl.forEach(o),_a=f(H),dn=a(H,"LI",{});var Hl=r(dn);_o=a(Hl,"A",{href:!0});var Ul=r(_o);ba=l(Ul,"Masked language modeling task guide"),Ul.forEach(o),Hl.forEach(o),La=f(H),cn=a(H,"LI",{});var Vl=r(cn);bo=a(Vl,"A",{href:!0});var Gl=r(bo);ka=l(Gl,"Multiple choice task guide"),Gl.forEach(o),Vl.forEach(o),H.forEach(o),_s=f(t),ne=a(t,"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(Xt.$$.fragment,Kl),Kl.forEach(o),Jl.forEach(o),va=f(js),hn=a(js,"SPAN",{});var Yl=r(hn);Ma=l(Yl,"XLMRobertaXLConfig"),Yl.forEach(o),js.forEach(o),bs=f(t),q=a(t,"DIV",{class:!0});var ot=r(q);v(Tt.$$.fragment,ot),wa=f(ot),U=a(ot,"P",{});var nt=r(U);Xa=l(nt,"This is the configuration class to store the configuration of a "),Lo=a(nt,"A",{href:!0});var Zl=r(Lo);Ta=l(Zl,"XLMRobertaXLModel"),Zl.forEach(o),ya=l(nt," or a "),mn=a(nt,"CODE",{});var ed=r(mn);$a=l(ed,"TFXLMRobertaXLModel"),ed.forEach(o),xa=l(nt,`.
It is used to instantiate a XLM_ROBERTA_XL model according to the specified arguments, defining the model
architecture. Instantiating a configuration with the defaults will yield a similar configuration to that of the
XLM_ROBERTA_XL `),yt=a(nt,"A",{href:!0,rel:!0});var td=r(yt);Ra=l(td,"facebook/xlm-roberta-xl"),td.forEach(o),Fa=l(nt," architecture."),nt.forEach(o),za=f(ot),se=a(ot,"P",{});var Ao=r(se);Ca=l(Ao,"Configuration objects inherit from "),ko=a(Ao,"A",{href:!0});var od=r(ko);qa=l(od,"PretrainedConfig"),od.forEach(o),Ea=l(Ao,` and can be used to control the model outputs. Read the
documentation from `),vo=a(Ao,"A",{href:!0});var nd=r(vo);ja=l(nd,"PretrainedConfig"),nd.forEach(o),Aa=l(Ao," for more information."),Ao.forEach(o),Pa=f(ot),v(Ce.$$.fragment,ot),ot.forEach(o),Ls=f(t),ae=a(t,"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($t.$$.fragment,ad),ad.forEach(o),sd.forEach(o),Oa=f(As),fn=a(As,"SPAN",{});var rd=r(fn);Sa=l(rd,"XLMRobertaXLModel"),rd.forEach(o),As.forEach(o),ks=f(t),E=a(t,"DIV",{class:!0});var st=r(E);v(xt.$$.fragment,st),Na=f(st),re=a(st,"P",{});var Po=r(re);Ia=l(Po,`The bare XLM-RoBERTa-xlarge Model transformer outputting raw hidden-states without any specific head on top.
This model inherits from `),Mo=a(Po,"A",{href:!0});var id=r(Mo);Da=l(id,"PreTrainedModel"),id.forEach(o),Wa=l(Po,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.) This model is also a PyTorch `),Rt=a(Po,"A",{href:!0,rel:!0});var ld=r(Rt);Ba=l(ld,"torch.nn.Module"),ld.forEach(o),Qa=l(Po,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Po.forEach(o),Ha=f(st),Z=a(st,"P",{});var ro=r(Z);Ua=l(ro,`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),gn=a(ro,"EM",{});var dd=r(gn);Va=l(dd,`Attention is
all you need`),dd.forEach(o),x=a(ro,"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(o),Ka=l(C,`
argument of the configuration set to `),bn=a(C,"CODE",{});var pd=r(bn);Ya=l(pd,"True"),pd.forEach(o),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(o),tr=l(C," argument and "),kn=a(C,"CODE",{});var md=r(kn);or=l(md,"add_cross_attention"),md.forEach(o),nr=l(C," set to "),vn=a(C,"CODE",{});var ud=r(vn);sr=l(ud,"True"),ud.forEach(o),ar=l(C,"; an "),Mn=a(C,"CODE",{});var fd=r(Mn);rr=l(fd,"encoder_hidden_states"),fd.forEach(o),ir=l(C,` is then expected as
an input to the forward pass. .. `),C.forEach(o),wn=a(ro,"EM",{});var gd=r(wn);lr=l(gd,"Attention is all you need"),gd.forEach(o),dr=l(ro,": "),Ft=a(ro,"A",{href:!0,rel:!0});var _d=r(Ft);cr=l(_d,"https://arxiv.org/abs/1706.03762"),_d.forEach(o),ro.forEach(o),pr=f(st),N=a(st,"DIV",{class:!0});var at=r(N);v(zt.$$.fragment,at),hr=f(at),ie=a(at,"P",{});var Oo=r(ie);mr=l(Oo,"The "),wo=a(Oo,"A",{href:!0});var bd=r(wo);ur=l(bd,"XLMRobertaXLModel"),bd.forEach(o),fr=l(Oo," forward method, overrides the "),Xn=a(Oo,"CODE",{});var Ld=r(Xn);gr=l(Ld,"__call__"),Ld.forEach(o),_r=l(Oo," special method."),Oo.forEach(o),br=f(at),v(Ee.$$.fragment,at),Lr=f(at),v(je.$$.fragment,at),at.forEach(o),st.forEach(o),vs=f(t),le=a(t,"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(Ct.$$.fragment,vd),vd.forEach(o),kd.forEach(o),kr=f(Ps),yn=a(Ps,"SPAN",{});var Md=r(yn);vr=l(Md,"XLMRobertaXLForCausalLM"),Md.forEach(o),Ps.forEach(o),Ms=f(t),V=a(t,"DIV",{class:!0});var So=r(V);v(qt.$$.fragment,So),Mr=f(So),G=a(So,"P",{});var rt=r(G);wr=l(rt,"XLM-RoBERTa-xlarge Model with a "),$n=a(rt,"CODE",{});var wd=r($n);Xr=l(wd,"language modeling"),wd.forEach(o),Tr=l(rt,` head on top for CLM fine-tuning.
This model inherits from `),Xo=a(rt,"A",{href:!0});var Xd=r(Xo);yr=l(Xd,"PreTrainedModel"),Xd.forEach(o),$r=l(rt,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.) This model is also a PyTorch `),Et=a(rt,"A",{href:!0,rel:!0});var Td=r(Et);xr=l(Td,"torch.nn.Module"),Td.forEach(o),Rr=l(rt,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),rt.forEach(o),Fr=f(So),I=a(So,"DIV",{class:!0});var it=r(I);v(jt.$$.fragment,it),zr=f(it),de=a(it,"P",{});var No=r(de);Cr=l(No,"The "),To=a(No,"A",{href:!0});var yd=r(To);qr=l(yd,"XLMRobertaXLForCausalLM"),yd.forEach(o),Er=l(No," forward method, overrides the "),xn=a(No,"CODE",{});var $d=r(xn);jr=l($d,"__call__"),$d.forEach(o),Ar=l(No," special method."),No.forEach(o),Pr=f(it),v(Pe.$$.fragment,it),Or=f(it),v(Oe.$$.fragment,it),it.forEach(o),So.forEach(o),ws=f(t),ce=a(t,"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(At.$$.fragment,Rd),Rd.forEach(o),xd.forEach(o),Sr=f(Os),Fn=a(Os,"SPAN",{});var Fd=r(Fn);Nr=l(Fd,"XLMRobertaXLForMaskedLM"),Fd.forEach(o),Os.forEach(o),Xs=f(t),J=a(t,"DIV",{class:!0});var Io=r(J);v(Pt.$$.fragment,Io),Ir=f(Io),K=a(Io,"P",{});var lt=r(K);Dr=l(lt,"XLM-RoBERTa-xlarge Model with a "),zn=a(lt,"CODE",{});var zd=r(zn);Wr=l(zd,"language modeling"),zd.forEach(o),Br=l(lt,` head on top.
This model inherits from `),yo=a(lt,"A",{href:!0});var Cd=r(yo);Qr=l(Cd,"PreTrainedModel"),Cd.forEach(o),Hr=l(lt,`. 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(lt,"A",{href:!0,rel:!0});var qd=r(Ot);Ur=l(qd,"torch.nn.Module"),qd.forEach(o),Vr=l(lt,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),lt.forEach(o),Gr=f(Io),D=a(Io,"DIV",{class:!0});var dt=r(D);v(St.$$.fragment,dt),Jr=f(dt),pe=a(dt,"P",{});var Do=r(pe);Kr=l(Do,"The "),$o=a(Do,"A",{href:!0});var Ed=r($o);Yr=l(Ed,"XLMRobertaXLForMaskedLM"),Ed.forEach(o),Zr=l(Do," forward method, overrides the "),Cn=a(Do,"CODE",{});var jd=r(Cn);ei=l(jd,"__call__"),jd.forEach(o),ti=l(Do," special method."),Do.forEach(o),oi=f(dt),v(Ne.$$.fragment,dt),ni=f(dt),v(Ie.$$.fragment,dt),dt.forEach(o),Io.forEach(o),Ts=f(t),he=a(t,"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(Nt.$$.fragment,Pd),Pd.forEach(o),Ad.forEach(o),si=f(Ss),En=a(Ss,"SPAN",{});var Od=r(En);ai=l(Od,"XLMRobertaXLForSequenceClassification"),Od.forEach(o),Ss.forEach(o),ys=f(t),j=a(t,"DIV",{class:!0});var ct=r(j);v(It.$$.fragment,ct),ri=f(ct),jn=a(ct,"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(o),li=f(ct),me=a(ct,"P",{});var Wo=r(me);di=l(Wo,"This model inherits from "),xo=a(Wo,"A",{href:!0});var Nd=r(xo);ci=l(Nd,"PreTrainedModel"),Nd.forEach(o),pi=l(Wo,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.) This model is also a PyTorch `),Dt=a(Wo,"A",{href:!0,rel:!0});var Id=r(Dt);hi=l(Id,"torch.nn.Module"),Id.forEach(o),mi=l(Wo,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Wo.forEach(o),ui=f(ct),z=a(ct,"DIV",{class:!0});var ee=r(z);v(Wt.$$.fragment,ee),fi=f(ee),ue=a(ee,"P",{});var Bo=r(ue);gi=l(Bo,"The "),Ro=a(Bo,"A",{href:!0});var Dd=r(Ro);_i=l(Dd,"XLMRobertaXLForSequenceClassification"),Dd.forEach(o),bi=l(Bo," forward method, overrides the "),An=a(Bo,"CODE",{});var Wd=r(An);Li=l(Wd,"__call__"),Wd.forEach(o),ki=l(Bo," special method."),Bo.forEach(o),vi=f(ee),v(We.$$.fragment,ee),Mi=f(ee),v(Be.$$.fragment,ee),wi=f(ee),v(Qe.$$.fragment,ee),ee.forEach(o),ct.forEach(o),$s=f(t),fe=a(t,"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(Bt.$$.fragment,Qd),Qd.forEach(o),Bd.forEach(o),Xi=f(Ns),On=a(Ns,"SPAN",{});var Hd=r(On);Ti=l(Hd,"XLMRobertaXLForMultipleChoice"),Hd.forEach(o),Ns.forEach(o),xs=f(t),A=a(t,"DIV",{class:!0});var pt=r(A);v(Qt.$$.fragment,pt),yi=f(pt),Sn=a(pt,"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(o),xi=f(pt),ge=a(pt,"P",{});var Qo=r(ge);Ri=l(Qo,"This model inherits from "),Fo=a(Qo,"A",{href:!0});var Vd=r(Fo);Fi=l(Vd,"PreTrainedModel"),Vd.forEach(o),zi=l(Qo,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.) This model is also a PyTorch `),Ht=a(Qo,"A",{href:!0,rel:!0});var Gd=r(Ht);Ci=l(Gd,"torch.nn.Module"),Gd.forEach(o),qi=l(Qo,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Qo.forEach(o),Ei=f(pt),W=a(pt,"DIV",{class:!0});var ht=r(W);v(Ut.$$.fragment,ht),ji=f(ht),_e=a(ht,"P",{});var Ho=r(_e);Ai=l(Ho,"The "),zo=a(Ho,"A",{href:!0});var Jd=r(zo);Pi=l(Jd,"XLMRobertaXLForMultipleChoice"),Jd.forEach(o),Oi=l(Ho," forward method, overrides the "),Nn=a(Ho,"CODE",{});var Kd=r(Nn);Si=l(Kd,"__call__"),Kd.forEach(o),Ni=l(Ho," special method."),Ho.forEach(o),Ii=f(ht),v(Ue.$$.fragment,ht),Di=f(ht),v(Ve.$$.fragment,ht),ht.forEach(o),pt.forEach(o),Rs=f(t),be=a(t,"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(Vt.$$.fragment,Zd),Zd.forEach(o),Yd.forEach(o),Wi=f(Is),Dn=a(Is,"SPAN",{});var ec=r(Dn);Bi=l(ec,"XLMRobertaXLForTokenClassification"),ec.forEach(o),Is.forEach(o),Fs=f(t),P=a(t,"DIV",{class:!0});var mt=r(P);v(Gt.$$.fragment,mt),Qi=f(mt),Wn=a(mt,"P",{});var tc=r(Wn);Hi=l(tc,`XLM-Roberta-xlarge Model with a token classification head on top (a linear layer on top of the hidden-states
output) e.g. for Named-Entity-Recognition (NER) tasks.`),tc.forEach(o),Ui=f(mt),Le=a(mt,"P",{});var Uo=r(Le);Vi=l(Uo,"This model inherits from "),Co=a(Uo,"A",{href:!0});var oc=r(Co);Gi=l(oc,"PreTrainedModel"),oc.forEach(o),Ji=l(Uo,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.) This model is also a PyTorch `),Jt=a(Uo,"A",{href:!0,rel:!0});var nc=r(Jt);Ki=l(nc,"torch.nn.Module"),nc.forEach(o),Yi=l(Uo,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Uo.forEach(o),Zi=f(mt),B=a(mt,"DIV",{class:!0});var ut=r(B);v(Kt.$$.fragment,ut),el=f(ut),ke=a(ut,"P",{});var Vo=r(ke);tl=l(Vo,"The "),qo=a(Vo,"A",{href:!0});var sc=r(qo);ol=l(sc,"XLMRobertaXLForTokenClassification"),sc.forEach(o),nl=l(Vo," forward method, overrides the "),Bn=a(Vo,"CODE",{});var ac=r(Bn);sl=l(ac,"__call__"),ac.forEach(o),al=l(Vo," special method."),Vo.forEach(o),rl=f(ut),v(Je.$$.fragment,ut),il=f(ut),v(Ke.$$.fragment,ut),ut.forEach(o),mt.forEach(o),zs=f(t),ve=a(t,"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(Yt.$$.fragment,ic),ic.forEach(o),rc.forEach(o),ll=f(Ds),Hn=a(Ds,"SPAN",{});var lc=r(Hn);dl=l(lc,"XLMRobertaXLForQuestionAnswering"),lc.forEach(o),Ds.forEach(o),Cs=f(t),O=a(t,"DIV",{class:!0});var ft=r(O);v(Zt.$$.fragment,ft),cl=f(ft),Me=a(ft,"P",{});var Go=r(Me);pl=l(Go,`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(Go,"CODE",{});var dc=r(Un);hl=l(dc,"span start logits"),dc.forEach(o),ml=l(Go," and "),Vn=a(Go,"CODE",{});var cc=r(Vn);ul=l(cc,"span end logits"),cc.forEach(o),fl=l(Go,")."),Go.forEach(o),gl=f(ft),we=a(ft,"P",{});var Jo=r(we);_l=l(Jo,"This model inherits from "),Eo=a(Jo,"A",{href:!0});var pc=r(Eo);bl=l(pc,"PreTrainedModel"),pc.forEach(o),Ll=l(Jo,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.) This model is also a PyTorch `),eo=a(Jo,"A",{href:!0,rel:!0});var hc=r(eo);kl=l(hc,"torch.nn.Module"),hc.forEach(o),vl=l(Jo,`
subclass. Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to
general usage and behavior.`),Jo.forEach(o),Ml=f(ft),Q=a(ft,"DIV",{class:!0});var gt=r(Q);v(to.$$.fragment,gt),wl=f(gt),Xe=a(gt,"P",{});var Ko=r(Xe);Xl=l(Ko,"The "),jo=a(Ko,"A",{href:!0});var mc=r(jo);Tl=l(mc,"XLMRobertaXLForQuestionAnswering"),mc.forEach(o),yl=l(Ko," forward method, overrides the "),Gn=a(Ko,"CODE",{});var uc=r(Gn);$l=l(uc,"__call__"),uc.forEach(o),xl=l(Ko," special method."),Ko.forEach(o),Rl=f(gt),v(Ze.$$.fragment,gt),Fl=f(gt),v(et.$$.fragment,gt),gt.forEach(o),ft.forEach(o),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(te,"class","relative group"),p(bt,"href","https://arxiv.org/abs/2105.00572"),p(bt,"rel","nofollow"),p(kt,"href","https://github.com/Soonhwan-Kwon"),p(kt,"rel","nofollow"),p(vt,"href","https://huggingface.co/stefan-it"),p(vt,"rel","nofollow"),p(Mt,"href","https://github.com/pytorch/fairseq/tree/master/examples/xlmr"),p(Mt,"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(oe,"class","relative group"),p(mo,"href","./tasks/sequence_classification"),p(uo,"href","./tasks/token_classification"),p(fo,"href","./tasks/question_answering"),p(go,"href","./tasks/language_modeling"),p(_o,"href","./tasks/masked_language_modeling"),p(bo,"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(Lo,"href","/docs/transformers/v4.27.1/en/model_doc/xlm-roberta-xl#transformers.XLMRobertaXLModel"),p(yt,"href","https://huggingface.co/facebook/xlm-roberta-xl"),p(yt,"rel","nofollow"),p(ko,"href","/docs/transformers/v4.27.1/en/main_classes/configuration#transformers.PretrainedConfig"),p(vo,"href","/docs/transformers/v4.27.1/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(Mo,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(Rt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Rt,"rel","nofollow"),p(Ft,"href","https://arxiv.org/abs/1706.03762"),p(Ft,"rel","nofollow"),p(wo,"href","/docs/transformers/v4.27.1/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(Xo,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(Et,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Et,"rel","nofollow"),p(To,"href","/docs/transformers/v4.27.1/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(yo,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(Ot,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Ot,"rel","nofollow"),p($o,"href","/docs/transformers/v4.27.1/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(xo,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(Dt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Dt,"rel","nofollow"),p(Ro,"href","/docs/transformers/v4.27.1/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(Fo,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(Ht,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Ht,"rel","nofollow"),p(zo,"href","/docs/transformers/v4.27.1/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(Co,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(Jt,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(Jt,"rel","nofollow"),p(qo,"href","/docs/transformers/v4.27.1/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(Eo,"href","/docs/transformers/v4.27.1/en/main_classes/model#transformers.PreTrainedModel"),p(eo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),p(eo,"rel","nofollow"),p(jo,"href","/docs/transformers/v4.27.1/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(t,g){e(document.head,d),b(t,L,g),b(t,m,g),e(m,h),e(h,_),M(n,_,null),e(m,c),e(m,$),e($,Ws),b(t,ls,g),b(t,te,g),e(te,xe),e(xe,Yo),M(_t,Yo,null),e(te,Bs),e(te,Zo),e(Zo,Qs),b(t,ds,g),b(t,Re,g),e(Re,Hs),e(Re,bt),e(bt,Us),e(Re,Vs),b(t,cs,g),b(t,lo,g),e(lo,Gs),b(t,ps,g),b(t,co,g),e(co,en),e(en,Js),b(t,hs,g),b(t,po,g),e(po,Ks),b(t,ms,g),b(t,ho,g),e(ho,Lt),e(Lt,Ys),e(Lt,tn),e(tn,Zs),e(Lt,ea),b(t,us,g),b(t,S,g),e(S,ta),e(S,kt),e(kt,oa),e(S,na),e(S,vt),e(vt,sa),e(S,aa),e(S,Mt),e(Mt,ra),e(S,ia),b(t,fs,g),b(t,oe,g),e(oe,Fe),e(Fe,on),M(wt,on,null),e(oe,la),e(oe,nn),e(nn,da),b(t,gs,g),b(t,R,g),e(R,sn),e(sn,mo),e(mo,ca),e(R,pa),e(R,an),e(an,uo),e(uo,ha),e(R,ma),e(R,rn),e(rn,fo),e(fo,ua),e(R,fa),e(R,ln),e(ln,go),e(go,ga),e(R,_a),e(R,dn),e(dn,_o),e(_o,ba),e(R,La),e(R,cn),e(cn,bo),e(bo,ka),b(t,_s,g),b(t,ne,g),e(ne,ze),e(ze,pn),M(Xt,pn,null),e(ne,va),e(ne,hn),e(hn,Ma),b(t,bs,g),b(t,q,g),M(Tt,q,null),e(q,wa),e(q,U),e(U,Xa),e(U,Lo),e(Lo,Ta),e(U,ya),e(U,mn),e(mn,$a),e(U,xa),e(U,yt),e(yt,Ra),e(U,Fa),e(q,za),e(q,se),e(se,Ca),e(se,ko),e(ko,qa),e(se,Ea),e(se,vo),e(vo,ja),e(se,Aa),e(q,Pa),M(Ce,q,null),b(t,Ls,g),b(t,ae,g),e(ae,qe),e(qe,un),M($t,un,null),e(ae,Oa),e(ae,fn),e(fn,Sa),b(t,ks,g),b(t,E,g),M(xt,E,null),e(E,Na),e(E,re),e(re,Ia),e(re,Mo),e(Mo,Da),e(re,Wa),e(re,Rt),e(Rt,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,tr),e(x,kn),e(kn,or),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,Ft),e(Ft,cr),e(E,pr),e(E,N),M(zt,N,null),e(N,hr),e(N,ie),e(ie,mr),e(ie,wo),e(wo,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(t,vs,g),b(t,le,g),e(le,Ae),e(Ae,Tn),M(Ct,Tn,null),e(le,kr),e(le,yn),e(yn,vr),b(t,Ms,g),b(t,V,g),M(qt,V,null),e(V,Mr),e(V,G),e(G,wr),e(G,$n),e($n,Xr),e(G,Tr),e(G,Xo),e(Xo,yr),e(G,$r),e(G,Et),e(Et,xr),e(G,Rr),e(V,Fr),e(V,I),M(jt,I,null),e(I,zr),e(I,de),e(de,Cr),e(de,To),e(To,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(t,ws,g),b(t,ce,g),e(ce,Se),e(Se,Rn),M(At,Rn,null),e(ce,Sr),e(ce,Fn),e(Fn,Nr),b(t,Xs,g),b(t,J,g),M(Pt,J,null),e(J,Ir),e(J,K),e(K,Dr),e(K,zn),e(zn,Wr),e(K,Br),e(K,yo),e(yo,Qr),e(K,Hr),e(K,Ot),e(Ot,Ur),e(K,Vr),e(J,Gr),e(J,D),M(St,D,null),e(D,Jr),e(D,pe),e(pe,Kr),e(pe,$o),e($o,Yr),e(pe,Zr),e(pe,Cn),e(Cn,ei),e(pe,ti),e(D,oi),M(Ne,D,null),e(D,ni),M(Ie,D,null),b(t,Ts,g),b(t,he,g),e(he,De),e(De,qn),M(Nt,qn,null),e(he,si),e(he,En),e(En,ai),b(t,ys,g),b(t,j,g),M(It,j,null),e(j,ri),e(j,jn),e(jn,ii),e(j,li),e(j,me),e(me,di),e(me,xo),e(xo,ci),e(me,pi),e(me,Dt),e(Dt,hi),e(me,mi),e(j,ui),e(j,z),M(Wt,z,null),e(z,fi),e(z,ue),e(ue,gi),e(ue,Ro),e(Ro,_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(t,$s,g),b(t,fe,g),e(fe,He),e(He,Pn),M(Bt,Pn,null),e(fe,Xi),e(fe,On),e(On,Ti),b(t,xs,g),b(t,A,g),M(Qt,A,null),e(A,yi),e(A,Sn),e(Sn,$i),e(A,xi),e(A,ge),e(ge,Ri),e(ge,Fo),e(Fo,Fi),e(ge,zi),e(ge,Ht),e(Ht,Ci),e(ge,qi),e(A,Ei),e(A,W),M(Ut,W,null),e(W,ji),e(W,_e),e(_e,Ai),e(_e,zo),e(zo,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(t,Rs,g),b(t,be,g),e(be,Ge),e(Ge,In),M(Vt,In,null),e(be,Wi),e(be,Dn),e(Dn,Bi),b(t,Fs,g),b(t,P,g),M(Gt,P,null),e(P,Qi),e(P,Wn),e(Wn,Hi),e(P,Ui),e(P,Le),e(Le,Vi),e(Le,Co),e(Co,Gi),e(Le,Ji),e(Le,Jt),e(Jt,Ki),e(Le,Yi),e(P,Zi),e(P,B),M(Kt,B,null),e(B,el),e(B,ke),e(ke,tl),e(ke,qo),e(qo,ol),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(t,zs,g),b(t,ve,g),e(ve,Ye),e(Ye,Qn),M(Yt,Qn,null),e(ve,ll),e(ve,Hn),e(Hn,dl),b(t,Cs,g),b(t,O,g),M(Zt,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,Eo),e(Eo,bl),e(we,Ll),e(we,eo),e(eo,kl),e(we,vl),e(O,Ml),e(O,Q),M(to,Q,null),e(Q,wl),e(Q,Xe),e(Xe,Xl),e(Xe,jo),e(jo,Tl),e(Xe,yl),e(Xe,Gn),e(Gn,$l),e(Xe,xl),e(Q,Rl),M(Ze,Q,null),e(Q,Fl),M(et,Q,null),qs=!0},p(t,[g]){const oo={};g&2&&(oo.$$scope={dirty:g,ctx:t}),Ce.$set(oo);const Jn={};g&2&&(Jn.$$scope={dirty:g,ctx:t}),Ee.$set(Jn);const Kn={};g&2&&(Kn.$$scope={dirty:g,ctx:t}),je.$set(Kn);const Yn={};g&2&&(Yn.$$scope={dirty:g,ctx:t}),Pe.$set(Yn);const no={};g&2&&(no.$$scope={dirty:g,ctx:t}),Oe.$set(no);const Zn={};g&2&&(Zn.$$scope={dirty:g,ctx:t}),Ne.$set(Zn);const es={};g&2&&(es.$$scope={dirty:g,ctx:t}),Ie.$set(es);const ts={};g&2&&(ts.$$scope={dirty:g,ctx:t}),We.$set(ts);const so={};g&2&&(so.$$scope={dirty:g,ctx:t}),Be.$set(so);const os={};g&2&&(os.$$scope={dirty:g,ctx:t}),Qe.$set(os);const ns={};g&2&&(ns.$$scope={dirty:g,ctx:t}),Ue.$set(ns);const ss={};g&2&&(ss.$$scope={dirty:g,ctx:t}),Ve.$set(ss);const as={};g&2&&(as.$$scope={dirty:g,ctx:t}),Je.$set(as);const rs={};g&2&&(rs.$$scope={dirty:g,ctx:t}),Ke.$set(rs);const is={};g&2&&(is.$$scope={dirty:g,ctx:t}),Ze.$set(is);const ao={};g&2&&(ao.$$scope={dirty:g,ctx:t}),et.$set(ao)},i(t){qs||(w(n.$$.fragment,t),w(_t.$$.fragment,t),w(wt.$$.fragment,t),w(Xt.$$.fragment,t),w(Tt.$$.fragment,t),w(Ce.$$.fragment,t),w($t.$$.fragment,t),w(xt.$$.fragment,t),w(zt.$$.fragment,t),w(Ee.$$.fragment,t),w(je.$$.fragment,t),w(Ct.$$.fragment,t),w(qt.$$.fragment,t),w(jt.$$.fragment,t),w(Pe.$$.fragment,t),w(Oe.$$.fragment,t),w(At.$$.fragment,t),w(Pt.$$.fragment,t),w(St.$$.fragment,t),w(Ne.$$.fragment,t),w(Ie.$$.fragment,t),w(Nt.$$.fragment,t),w(It.$$.fragment,t),w(Wt.$$.fragment,t),w(We.$$.fragment,t),w(Be.$$.fragment,t),w(Qe.$$.fragment,t),w(Bt.$$.fragment,t),w(Qt.$$.fragment,t),w(Ut.$$.fragment,t),w(Ue.$$.fragment,t),w(Ve.$$.fragment,t),w(Vt.$$.fragment,t),w(Gt.$$.fragment,t),w(Kt.$$.fragment,t),w(Je.$$.fragment,t),w(Ke.$$.fragment,t),w(Yt.$$.fragment,t),w(Zt.$$.fragment,t),w(to.$$.fragment,t),w(Ze.$$.fragment,t),w(et.$$.fragment,t),qs=!0)},o(t){X(n.$$.fragment,t),X(_t.$$.fragment,t),X(wt.$$.fragment,t),X(Xt.$$.fragment,t),X(Tt.$$.fragment,t),X(Ce.$$.fragment,t),X($t.$$.fragment,t),X(xt.$$.fragment,t),X(zt.$$.fragment,t),X(Ee.$$.fragment,t),X(je.$$.fragment,t),X(Ct.$$.fragment,t),X(qt.$$.fragment,t),X(jt.$$.fragment,t),X(Pe.$$.fragment,t),X(Oe.$$.fragment,t),X(At.$$.fragment,t),X(Pt.$$.fragment,t),X(St.$$.fragment,t),X(Ne.$$.fragment,t),X(Ie.$$.fragment,t),X(Nt.$$.fragment,t),X(It.$$.fragment,t),X(Wt.$$.fragment,t),X(We.$$.fragment,t),X(Be.$$.fragment,t),X(Qe.$$.fragment,t),X(Bt.$$.fragment,t),X(Qt.$$.fragment,t),X(Ut.$$.fragment,t),X(Ue.$$.fragment,t),X(Ve.$$.fragment,t),X(Vt.$$.fragment,t),X(Gt.$$.fragment,t),X(Kt.$$.fragment,t),X(Je.$$.fragment,t),X(Ke.$$.fragment,t),X(Yt.$$.fragment,t),X(Zt.$$.fragment,t),X(to.$$.fragment,t),X(Ze.$$.fragment,t),X(et.$$.fragment,t),qs=!1},d(t){o(d),t&&o(L),t&&o(m),T(n),t&&o(ls),t&&o(te),T(_t),t&&o(ds),t&&o(Re),t&&o(cs),t&&o(lo),t&&o(ps),t&&o(co),t&&o(hs),t&&o(po),t&&o(ms),t&&o(ho),t&&o(us),t&&o(S),t&&o(fs),t&&o(oe),T(wt),t&&o(gs),t&&o(R),t&&o(_s),t&&o(ne),T(Xt),t&&o(bs),t&&o(q),T(Tt),T(Ce),t&&o(Ls),t&&o(ae),T($t),t&&o(ks),t&&o(E),T(xt),T(zt),T(Ee),T(je),t&&o(vs),t&&o(le),T(Ct),t&&o(Ms),t&&o(V),T(qt),T(jt),T(Pe),T(Oe),t&&o(ws),t&&o(ce),T(At),t&&o(Xs),t&&o(J),T(Pt),T(St),T(Ne),T(Ie),t&&o(Ts),t&&o(he),T(Nt),t&&o(ys),t&&o(j),T(It),T(Wt),T(We),T(Be),T(Qe),t&&o($s),t&&o(fe),T(Bt),t&&o(xs),t&&o(A),T(Qt),T(Ut),T(Ue),T(Ve),t&&o(Rs),t&&o(be),T(Vt),t&&o(Fs),t&&o(P),T(Gt),T(Kt),T(Je),T(Ke),t&&o(zs),t&&o(ve),T(Yt),t&&o(Cs),t&&o(O),T(Zt),T(to),T(Ze),T(et)}}}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};
