import{S as kk,i as bk,s as wk,e as a,k as p,w as T,t as o,M as Tk,c as r,d as t,m,a as i,x as v,h as n,b as f,G as e,g as _,y as M,q as $,o as L,B as x,v as vk,L as Ge}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ve}from"../../chunks/Tip-hf-doc-builder.js";import{D as ae}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Je}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Ze}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ye}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Mk(q){let d,b,h,u,k;return u=new Je({props:{code:`from transformers import XLMConfig, XLMModel

# Initializing a XLM configuration
configuration = XLMConfig()

# Initializing a model (with random weights) from the configuration
model = XLMModel(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> XLMConfig, XLMModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a XLM configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = XLMConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMModel(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=a("p"),b=o("Examples:"),h=p(),T(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Examples:"),c.forEach(t),h=m(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),k=!0},p:Ge,i(l){k||($(u.$$.fragment,l),k=!0)},o(l){L(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(h),x(u,l)}}}function $k(q){let d,b,h,u,k;return u=new Je({props:{code:`0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1
| first sequence    | second sequence |`,highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=a("p"),b=o("pair mask has the following format:"),h=p(),T(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"pair mask has the following format:"),c.forEach(t),h=m(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),k=!0},p:Ge,i(l){k||($(u.$$.fragment,l),k=!0)},o(l){L(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(h),x(u,l)}}}function Lk(q){let d,b,h,u,k;return{c(){d=a("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),u=o("Module"),k=o(`
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(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var X=i(h);u=n(X,"Module"),X.forEach(t),k=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,k)},d(l){l&&t(d)}}}function xk(q){let d,b,h,u,k;return u=new Je({props:{code:`from transformers import AutoTokenizer, XLMModel
import torch

tokenizer = AutoTokenizer.from_pretrained("xlm-mlm-en-2048")
model = XLMModel.from_pretrained("xlm-mlm-en-2048")

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, XLMModel
<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-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMModel.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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=a("p"),b=o("Example:"),h=p(),T(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),k=!0},p:Ge,i(l){k||($(u.$$.fragment,l),k=!0)},o(l){L(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(h),x(u,l)}}}function Fk(q){let d,b,h,u,k;return{c(){d=a("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),u=o("Module"),k=o(`
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(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var X=i(h);u=n(X,"Module"),X.forEach(t),k=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,k)},d(l){l&&t(d)}}}function Ek(q){let d,b,h,u,k;return u=new Je({props:{code:`from transformers import AutoTokenizer, XLMWithLMHeadModel
import torch

tokenizer = AutoTokenizer.from_pretrained("xlm-mlm-en-2048")
model = XLMWithLMHeadModel.from_pretrained("xlm-mlm-en-2048")

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

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

# retrieve index of <special1>
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-<special1> 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, XLMWithLMHeadModel
<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-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMWithLMHeadModel.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is &lt;special1&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;special1&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;special1&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=a("p"),b=o("Example:"),h=p(),T(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),k=!0},p:Ge,i(l){k||($(u.$$.fragment,l),k=!0)},o(l){L(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(h),x(u,l)}}}function Xk(q){let d,b,h,u,k;return{c(){d=a("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),u=o("Module"),k=o(`
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(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var X=i(h);u=n(X,"Module"),X.forEach(t),k=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,k)},d(l){l&&t(d)}}}function qk(q){let d,b,h,u,k;return u=new Je({props:{code:`import torch
from transformers import AutoTokenizer, XLMForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("xlm-mlm-en-2048")
model = XLMForSequenceClassification.from_pretrained("xlm-mlm-en-2048")

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 = XLMForSequenceClassification.from_pretrained("xlm-mlm-en-2048", 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, XLMForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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 = XLMForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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=a("p"),b=o("Example of single-label classification:"),h=p(),T(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example of single-label classification:"),c.forEach(t),h=m(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),k=!0},p:Ge,i(l){k||($(u.$$.fragment,l),k=!0)},o(l){L(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(h),x(u,l)}}}function zk(q){let d,b,h,u,k;return u=new Je({props:{code:`import torch
from transformers import AutoTokenizer, XLMForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("xlm-mlm-en-2048")
model = XLMForSequenceClassification.from_pretrained("xlm-mlm-en-2048", 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 = XLMForSequenceClassification.from_pretrained(
    "xlm-mlm-en-2048", 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, XLMForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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 = XLMForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;xlm-mlm-en-2048&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=a("p"),b=o("Example of multi-label classification:"),h=p(),T(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example of multi-label classification:"),c.forEach(t),h=m(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),k=!0},p:Ge,i(l){k||($(u.$$.fragment,l),k=!0)},o(l){L(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(h),x(u,l)}}}function Ck(q){let d,b,h,u,k;return{c(){d=a("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),u=o("Module"),k=o(`
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(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var X=i(h);u=n(X,"Module"),X.forEach(t),k=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,k)},d(l){l&&t(d)}}}function jk(q){let d,b,h,u,k;return u=new Je({props:{code:`from transformers import AutoTokenizer, XLMForMultipleChoice
import torch

tokenizer = AutoTokenizer.from_pretrained("xlm-mlm-en-2048")
model = XLMForMultipleChoice.from_pretrained("xlm-mlm-en-2048")

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, XLMForMultipleChoice
<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-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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=a("p"),b=o("Example:"),h=p(),T(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),k=!0},p:Ge,i(l){k||($(u.$$.fragment,l),k=!0)},o(l){L(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(h),x(u,l)}}}function Ak(q){let d,b,h,u,k;return{c(){d=a("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),u=o("Module"),k=o(`
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(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var X=i(h);u=n(X,"Module"),X.forEach(t),k=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,k)},d(l){l&&t(d)}}}function Nk(q){let d,b,h,u,k;return u=new Je({props:{code:`from transformers import AutoTokenizer, XLMForTokenClassification
import torch

tokenizer = AutoTokenizer.from_pretrained("xlm-mlm-en-2048")
model = XLMForTokenClassification.from_pretrained("xlm-mlm-en-2048")

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, XLMForTokenClassification
<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-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMForTokenClassification.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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=a("p"),b=o("Example:"),h=p(),T(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),k=!0},p:Ge,i(l){k||($(u.$$.fragment,l),k=!0)},o(l){L(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(h),x(u,l)}}}function Pk(q){let d,b,h,u,k;return{c(){d=a("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),u=o("Module"),k=o(`
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(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var X=i(h);u=n(X,"Module"),X.forEach(t),k=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,k)},d(l){l&&t(d)}}}function Ok(q){let d,b,h,u,k;return u=new Je({props:{code:`from transformers import AutoTokenizer, XLMForQuestionAnsweringSimple
import torch

tokenizer = AutoTokenizer.from_pretrained("xlm-mlm-en-2048")
model = XLMForQuestionAnsweringSimple.from_pretrained("xlm-mlm-en-2048")

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, XLMForQuestionAnsweringSimple
<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-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMForQuestionAnsweringSimple.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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=a("p"),b=o("Example:"),h=p(),T(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),k=!0},p:Ge,i(l){k||($(u.$$.fragment,l),k=!0)},o(l){L(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(h),x(u,l)}}}function Dk(q){let d,b,h,u,k;return{c(){d=a("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),u=o("Module"),k=o(`
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(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var X=i(h);u=n(X,"Module"),X.forEach(t),k=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,k)},d(l){l&&t(d)}}}function Sk(q){let d,b,h,u,k;return u=new Je({props:{code:`from transformers import AutoTokenizer, XLMForQuestionAnswering
import torch

tokenizer = AutoTokenizer.from_pretrained("xlm-mlm-en-2048")
model = XLMForQuestionAnswering.from_pretrained("xlm-mlm-en-2048")

input_ids = torch.tensor(tokenizer.encode("Hello, my dog is cute", add_special_tokens=True)).unsqueeze(
    0
)  # Batch size 1
start_positions = torch.tensor([1])
end_positions = torch.tensor([3])

outputs = model(input_ids, start_positions=start_positions, end_positions=end_positions)
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, XLMForQuestionAnswering
<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-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLMForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = torch.tensor(tokenizer.encode(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, add_special_tokens=<span class="hljs-literal">True</span>)).unsqueeze(
<span class="hljs-meta">... </span>    <span class="hljs-number">0</span>
<span class="hljs-meta">... </span>)  <span class="hljs-comment"># Batch size 1</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>start_positions = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>end_positions = torch.tensor([<span class="hljs-number">3</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(input_ids, start_positions=start_positions, end_positions=end_positions)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss`}}),{c(){d=a("p"),b=o("Example:"),h=p(),T(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),k=!0},p:Ge,i(l){k||($(u.$$.fragment,l),k=!0)},o(l){L(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(h),x(u,l)}}}function Ik(q){let d,b,h,u,k,l,c,X,be,he,S,re,Z,w,we,U,Te,ue,W,ve,le,V,Me,fe,D,ce,$e,Y,pe,Le,oe,z,A,ge,H,xe,_e,Q,me,Fe,j,de,G,ye,ie,B,Ee,Xe,N,qe,K,ze,ne,C,Ce,P,ke,te;return{c(){d=a("p"),b=o("TensorFlow models and layers in "),h=a("code"),u=o("transformers"),k=o(" accept two formats as input:"),l=p(),c=a("ul"),X=a("li"),be=o("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),S=a("li"),re=o("having all inputs as a list, tuple or dict in the first positional argument."),Z=p(),w=a("p"),we=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),U=a("code"),Te=o("model.fit()"),ue=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=a("code"),ve=o("model.fit()"),le=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a("code"),Me=o("fit()"),fe=o(" and "),D=a("code"),ce=o("predict()"),$e=o(`, such as when creating your own layers or models with
the Keras `),Y=a("code"),pe=o("Functional"),Le=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),z=a("ul"),A=a("li"),ge=o("a single Tensor with "),H=a("code"),xe=o("input_ids"),_e=o(" only and nothing else: "),Q=a("code"),me=o("model(input_ids)"),Fe=p(),j=a("li"),de=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=a("code"),ye=o("model([input_ids, attention_mask])"),ie=o(" or "),B=a("code"),Ee=o("model([input_ids, attention_mask, token_type_ids])"),Xe=p(),N=a("li"),qe=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),K=a("code"),ze=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ne=p(),C=a("p"),Ce=o(`Note that when creating models and layers with
`),P=a("a"),ke=o("subclassing"),te=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var F=i(d);b=n(F,"TensorFlow models and layers in "),h=r(F,"CODE",{});var We=i(h);u=n(We,"transformers"),We.forEach(t),k=n(F," accept two formats as input:"),F.forEach(t),l=m(g),c=r(g,"UL",{});var se=i(c);X=r(se,"LI",{});var Ne=i(X);be=n(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),he=m(se),S=r(se,"LI",{});var He=i(S);re=n(He,"having all inputs as a list, tuple or dict in the first positional argument."),He.forEach(t),se.forEach(t),Z=m(g),w=r(g,"P",{});var E=i(w);we=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),U=r(E,"CODE",{});var Se=i(U);Te=n(Se,"model.fit()"),Se.forEach(t),ue=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=r(E,"CODE",{});var je=i(W);ve=n(je,"model.fit()"),je.forEach(t),le=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(E,"CODE",{});var Ae=i(V);Me=n(Ae,"fit()"),Ae.forEach(t),fe=n(E," and "),D=r(E,"CODE",{});var De=i(D);ce=n(De,"predict()"),De.forEach(t),$e=n(E,`, such as when creating your own layers or models with
the Keras `),Y=r(E,"CODE",{});var Pe=i(Y);pe=n(Pe,"Functional"),Pe.forEach(t),Le=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),oe=m(g),z=r(g,"UL",{});var I=i(z);A=r(I,"LI",{});var R=i(A);ge=n(R,"a single Tensor with "),H=r(R,"CODE",{});var Qe=i(H);xe=n(Qe,"input_ids"),Qe.forEach(t),_e=n(R," only and nothing else: "),Q=r(R,"CODE",{});var Ie=i(Q);me=n(Ie,"model(input_ids)"),Ie.forEach(t),R.forEach(t),Fe=m(I),j=r(I,"LI",{});var O=i(j);de=n(O,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=r(O,"CODE",{});var Oe=i(G);ye=n(Oe,"model([input_ids, attention_mask])"),Oe.forEach(t),ie=n(O," or "),B=r(O,"CODE",{});var Ue=i(B);Ee=n(Ue,"model([input_ids, attention_mask, token_type_ids])"),Ue.forEach(t),O.forEach(t),Xe=m(I),N=r(I,"LI",{});var ee=i(N);qe=n(ee,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),K=r(ee,"CODE",{});var Be=i(K);ze=n(Be,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Be.forEach(t),ee.forEach(t),I.forEach(t),ne=m(g),C=r(g,"P",{});var J=i(C);Ce=n(J,`Note that when creating models and layers with
`),P=r(J,"A",{href:!0,rel:!0});var Ke=i(P);ke=n(Ke,"subclassing"),Ke.forEach(t),te=n(J,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),J.forEach(t),this.h()},h(){f(P,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(P,"rel","nofollow")},m(g,F){_(g,d,F),e(d,b),e(d,h),e(h,u),e(d,k),_(g,l,F),_(g,c,F),e(c,X),e(X,be),e(c,he),e(c,S),e(S,re),_(g,Z,F),_(g,w,F),e(w,we),e(w,U),e(U,Te),e(w,ue),e(w,W),e(W,ve),e(w,le),e(w,V),e(V,Me),e(w,fe),e(w,D),e(D,ce),e(w,$e),e(w,Y),e(Y,pe),e(w,Le),_(g,oe,F),_(g,z,F),e(z,A),e(A,ge),e(A,H),e(H,xe),e(A,_e),e(A,Q),e(Q,me),e(z,Fe),e(z,j),e(j,de),e(j,G),e(G,ye),e(j,ie),e(j,B),e(B,Ee),e(z,Xe),e(z,N),e(N,qe),e(N,K),e(K,ze),_(g,ne,F),_(g,C,F),e(C,Ce),e(C,P),e(P,ke),e(C,te)},d(g){g&&t(d),g&&t(l),g&&t(c),g&&t(Z),g&&t(w),g&&t(oe),g&&t(z),g&&t(ne),g&&t(C)}}}function Wk(q){let d,b,h,u,k;return{c(){d=a("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),u=o("Module"),k=o(`
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(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var X=i(h);u=n(X,"Module"),X.forEach(t),k=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,k)},d(l){l&&t(d)}}}function Hk(q){let d,b,h,u,k;return u=new Je({props:{code:`from transformers import AutoTokenizer, TFXLMModel
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("xlm-mlm-en-2048")
model = TFXLMModel.from_pretrained("xlm-mlm-en-2048")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")
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, TFXLMModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLMModel.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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;tf&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=a("p"),b=o("Example:"),h=p(),T(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),k=!0},p:Ge,i(l){k||($(u.$$.fragment,l),k=!0)},o(l){L(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(h),x(u,l)}}}function Qk(q){let d,b,h,u,k,l,c,X,be,he,S,re,Z,w,we,U,Te,ue,W,ve,le,V,Me,fe,D,ce,$e,Y,pe,Le,oe,z,A,ge,H,xe,_e,Q,me,Fe,j,de,G,ye,ie,B,Ee,Xe,N,qe,K,ze,ne,C,Ce,P,ke,te;return{c(){d=a("p"),b=o("TensorFlow models and layers in "),h=a("code"),u=o("transformers"),k=o(" accept two formats as input:"),l=p(),c=a("ul"),X=a("li"),be=o("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),S=a("li"),re=o("having all inputs as a list, tuple or dict in the first positional argument."),Z=p(),w=a("p"),we=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),U=a("code"),Te=o("model.fit()"),ue=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=a("code"),ve=o("model.fit()"),le=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a("code"),Me=o("fit()"),fe=o(" and "),D=a("code"),ce=o("predict()"),$e=o(`, such as when creating your own layers or models with
the Keras `),Y=a("code"),pe=o("Functional"),Le=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),z=a("ul"),A=a("li"),ge=o("a single Tensor with "),H=a("code"),xe=o("input_ids"),_e=o(" only and nothing else: "),Q=a("code"),me=o("model(input_ids)"),Fe=p(),j=a("li"),de=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=a("code"),ye=o("model([input_ids, attention_mask])"),ie=o(" or "),B=a("code"),Ee=o("model([input_ids, attention_mask, token_type_ids])"),Xe=p(),N=a("li"),qe=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),K=a("code"),ze=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ne=p(),C=a("p"),Ce=o(`Note that when creating models and layers with
`),P=a("a"),ke=o("subclassing"),te=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var F=i(d);b=n(F,"TensorFlow models and layers in "),h=r(F,"CODE",{});var We=i(h);u=n(We,"transformers"),We.forEach(t),k=n(F," accept two formats as input:"),F.forEach(t),l=m(g),c=r(g,"UL",{});var se=i(c);X=r(se,"LI",{});var Ne=i(X);be=n(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),he=m(se),S=r(se,"LI",{});var He=i(S);re=n(He,"having all inputs as a list, tuple or dict in the first positional argument."),He.forEach(t),se.forEach(t),Z=m(g),w=r(g,"P",{});var E=i(w);we=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),U=r(E,"CODE",{});var Se=i(U);Te=n(Se,"model.fit()"),Se.forEach(t),ue=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=r(E,"CODE",{});var je=i(W);ve=n(je,"model.fit()"),je.forEach(t),le=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(E,"CODE",{});var Ae=i(V);Me=n(Ae,"fit()"),Ae.forEach(t),fe=n(E," and "),D=r(E,"CODE",{});var De=i(D);ce=n(De,"predict()"),De.forEach(t),$e=n(E,`, such as when creating your own layers or models with
the Keras `),Y=r(E,"CODE",{});var Pe=i(Y);pe=n(Pe,"Functional"),Pe.forEach(t),Le=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),oe=m(g),z=r(g,"UL",{});var I=i(z);A=r(I,"LI",{});var R=i(A);ge=n(R,"a single Tensor with "),H=r(R,"CODE",{});var Qe=i(H);xe=n(Qe,"input_ids"),Qe.forEach(t),_e=n(R," only and nothing else: "),Q=r(R,"CODE",{});var Ie=i(Q);me=n(Ie,"model(input_ids)"),Ie.forEach(t),R.forEach(t),Fe=m(I),j=r(I,"LI",{});var O=i(j);de=n(O,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=r(O,"CODE",{});var Oe=i(G);ye=n(Oe,"model([input_ids, attention_mask])"),Oe.forEach(t),ie=n(O," or "),B=r(O,"CODE",{});var Ue=i(B);Ee=n(Ue,"model([input_ids, attention_mask, token_type_ids])"),Ue.forEach(t),O.forEach(t),Xe=m(I),N=r(I,"LI",{});var ee=i(N);qe=n(ee,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),K=r(ee,"CODE",{});var Be=i(K);ze=n(Be,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Be.forEach(t),ee.forEach(t),I.forEach(t),ne=m(g),C=r(g,"P",{});var J=i(C);Ce=n(J,`Note that when creating models and layers with
`),P=r(J,"A",{href:!0,rel:!0});var Ke=i(P);ke=n(Ke,"subclassing"),Ke.forEach(t),te=n(J,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),J.forEach(t),this.h()},h(){f(P,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(P,"rel","nofollow")},m(g,F){_(g,d,F),e(d,b),e(d,h),e(h,u),e(d,k),_(g,l,F),_(g,c,F),e(c,X),e(X,be),e(c,he),e(c,S),e(S,re),_(g,Z,F),_(g,w,F),e(w,we),e(w,U),e(U,Te),e(w,ue),e(w,W),e(W,ve),e(w,le),e(w,V),e(V,Me),e(w,fe),e(w,D),e(D,ce),e(w,$e),e(w,Y),e(Y,pe),e(w,Le),_(g,oe,F),_(g,z,F),e(z,A),e(A,ge),e(A,H),e(H,xe),e(A,_e),e(A,Q),e(Q,me),e(z,Fe),e(z,j),e(j,de),e(j,G),e(G,ye),e(j,ie),e(j,B),e(B,Ee),e(z,Xe),e(z,N),e(N,qe),e(N,K),e(K,ze),_(g,ne,F),_(g,C,F),e(C,Ce),e(C,P),e(P,ke),e(C,te)},d(g){g&&t(d),g&&t(l),g&&t(c),g&&t(Z),g&&t(w),g&&t(oe),g&&t(z),g&&t(ne),g&&t(C)}}}function Uk(q){let d,b,h,u,k;return{c(){d=a("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),u=o("Module"),k=o(`
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(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var X=i(h);u=n(X,"Module"),X.forEach(t),k=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,k)},d(l){l&&t(d)}}}function Bk(q){let d,b,h,u,k;return u=new Je({props:{code:`from transformers import AutoTokenizer, TFXLMWithLMHeadModel
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("xlm-mlm-en-2048")
model = TFXLMWithLMHeadModel.from_pretrained("xlm-mlm-en-2048")

inputs = tokenizer("Hello, my dog is cute", return_tensors="tf")
outputs = model(inputs)
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, TFXLMWithLMHeadModel
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLMWithLMHeadModel.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=a("p"),b=o("Example:"),h=p(),T(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),k=!0},p:Ge,i(l){k||($(u.$$.fragment,l),k=!0)},o(l){L(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(h),x(u,l)}}}function Kk(q){let d,b,h,u,k,l,c,X,be,he,S,re,Z,w,we,U,Te,ue,W,ve,le,V,Me,fe,D,ce,$e,Y,pe,Le,oe,z,A,ge,H,xe,_e,Q,me,Fe,j,de,G,ye,ie,B,Ee,Xe,N,qe,K,ze,ne,C,Ce,P,ke,te;return{c(){d=a("p"),b=o("TensorFlow models and layers in "),h=a("code"),u=o("transformers"),k=o(" accept two formats as input:"),l=p(),c=a("ul"),X=a("li"),be=o("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),S=a("li"),re=o("having all inputs as a list, tuple or dict in the first positional argument."),Z=p(),w=a("p"),we=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),U=a("code"),Te=o("model.fit()"),ue=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=a("code"),ve=o("model.fit()"),le=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a("code"),Me=o("fit()"),fe=o(" and "),D=a("code"),ce=o("predict()"),$e=o(`, such as when creating your own layers or models with
the Keras `),Y=a("code"),pe=o("Functional"),Le=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),z=a("ul"),A=a("li"),ge=o("a single Tensor with "),H=a("code"),xe=o("input_ids"),_e=o(" only and nothing else: "),Q=a("code"),me=o("model(input_ids)"),Fe=p(),j=a("li"),de=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=a("code"),ye=o("model([input_ids, attention_mask])"),ie=o(" or "),B=a("code"),Ee=o("model([input_ids, attention_mask, token_type_ids])"),Xe=p(),N=a("li"),qe=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),K=a("code"),ze=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ne=p(),C=a("p"),Ce=o(`Note that when creating models and layers with
`),P=a("a"),ke=o("subclassing"),te=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var F=i(d);b=n(F,"TensorFlow models and layers in "),h=r(F,"CODE",{});var We=i(h);u=n(We,"transformers"),We.forEach(t),k=n(F," accept two formats as input:"),F.forEach(t),l=m(g),c=r(g,"UL",{});var se=i(c);X=r(se,"LI",{});var Ne=i(X);be=n(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),he=m(se),S=r(se,"LI",{});var He=i(S);re=n(He,"having all inputs as a list, tuple or dict in the first positional argument."),He.forEach(t),se.forEach(t),Z=m(g),w=r(g,"P",{});var E=i(w);we=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),U=r(E,"CODE",{});var Se=i(U);Te=n(Se,"model.fit()"),Se.forEach(t),ue=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=r(E,"CODE",{});var je=i(W);ve=n(je,"model.fit()"),je.forEach(t),le=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(E,"CODE",{});var Ae=i(V);Me=n(Ae,"fit()"),Ae.forEach(t),fe=n(E," and "),D=r(E,"CODE",{});var De=i(D);ce=n(De,"predict()"),De.forEach(t),$e=n(E,`, such as when creating your own layers or models with
the Keras `),Y=r(E,"CODE",{});var Pe=i(Y);pe=n(Pe,"Functional"),Pe.forEach(t),Le=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),oe=m(g),z=r(g,"UL",{});var I=i(z);A=r(I,"LI",{});var R=i(A);ge=n(R,"a single Tensor with "),H=r(R,"CODE",{});var Qe=i(H);xe=n(Qe,"input_ids"),Qe.forEach(t),_e=n(R," only and nothing else: "),Q=r(R,"CODE",{});var Ie=i(Q);me=n(Ie,"model(input_ids)"),Ie.forEach(t),R.forEach(t),Fe=m(I),j=r(I,"LI",{});var O=i(j);de=n(O,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=r(O,"CODE",{});var Oe=i(G);ye=n(Oe,"model([input_ids, attention_mask])"),Oe.forEach(t),ie=n(O," or "),B=r(O,"CODE",{});var Ue=i(B);Ee=n(Ue,"model([input_ids, attention_mask, token_type_ids])"),Ue.forEach(t),O.forEach(t),Xe=m(I),N=r(I,"LI",{});var ee=i(N);qe=n(ee,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),K=r(ee,"CODE",{});var Be=i(K);ze=n(Be,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Be.forEach(t),ee.forEach(t),I.forEach(t),ne=m(g),C=r(g,"P",{});var J=i(C);Ce=n(J,`Note that when creating models and layers with
`),P=r(J,"A",{href:!0,rel:!0});var Ke=i(P);ke=n(Ke,"subclassing"),Ke.forEach(t),te=n(J,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),J.forEach(t),this.h()},h(){f(P,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(P,"rel","nofollow")},m(g,F){_(g,d,F),e(d,b),e(d,h),e(h,u),e(d,k),_(g,l,F),_(g,c,F),e(c,X),e(X,be),e(c,he),e(c,S),e(S,re),_(g,Z,F),_(g,w,F),e(w,we),e(w,U),e(U,Te),e(w,ue),e(w,W),e(W,ve),e(w,le),e(w,V),e(V,Me),e(w,fe),e(w,D),e(D,ce),e(w,$e),e(w,Y),e(Y,pe),e(w,Le),_(g,oe,F),_(g,z,F),e(z,A),e(A,ge),e(A,H),e(H,xe),e(A,_e),e(A,Q),e(Q,me),e(z,Fe),e(z,j),e(j,de),e(j,G),e(G,ye),e(j,ie),e(j,B),e(B,Ee),e(z,Xe),e(z,N),e(N,qe),e(N,K),e(K,ze),_(g,ne,F),_(g,C,F),e(C,Ce),e(C,P),e(P,ke),e(C,te)},d(g){g&&t(d),g&&t(l),g&&t(c),g&&t(Z),g&&t(w),g&&t(oe),g&&t(z),g&&t(ne),g&&t(C)}}}function Rk(q){let d,b,h,u,k;return{c(){d=a("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),u=o("Module"),k=o(`
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(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var X=i(h);u=n(X,"Module"),X.forEach(t),k=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,k)},d(l){l&&t(d)}}}function Vk(q){let d,b,h,u,k;return u=new Je({props:{code:`from transformers import AutoTokenizer, TFXLMForSequenceClassification
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("xlm-mlm-en-2048")
model = TFXLMForSequenceClassification.from_pretrained("xlm-mlm-en-2048")

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

logits = model(**inputs).logits

predicted_class_id = int(tf.math.argmax(logits, axis=-1)[0])`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFXLMForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLMForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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;tf&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = <span class="hljs-built_in">int</span>(tf.math.argmax(logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])`}}),{c(){d=a("p"),b=o("Example:"),h=p(),T(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),k=!0},p:Ge,i(l){k||($(u.$$.fragment,l),k=!0)},o(l){L(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(h),x(u,l)}}}function Yk(q){let d,b;return d=new Je({props:{code:'# To train a model on `num_labels` classes, you can pass `num_labels=num_labels` to `.from_pretrained(...)`\nnum_labels = len(model.config.id2label)\nmodel = TFXLMForSequenceClassification.from_pretrained("xlm-mlm-en-2048", num_labels=num_labels)\n\nlabels = tf.constant(1)\nloss = model(**inputs, labels=labels).loss',highlighted:'<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>\n<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)\n<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLMForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>, num_labels=num_labels)\n\n<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.constant(<span class="hljs-number">1</span>)\n<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss'}}),{c(){T(d.$$.fragment)},l(h){v(d.$$.fragment,h)},m(h,u){M(d,h,u),b=!0},p:Ge,i(h){b||($(d.$$.fragment,h),b=!0)},o(h){L(d.$$.fragment,h),b=!1},d(h){x(d,h)}}}function Gk(q){let d,b,h,u,k,l,c,X,be,he,S,re,Z,w,we,U,Te,ue,W,ve,le,V,Me,fe,D,ce,$e,Y,pe,Le,oe,z,A,ge,H,xe,_e,Q,me,Fe,j,de,G,ye,ie,B,Ee,Xe,N,qe,K,ze,ne,C,Ce,P,ke,te;return{c(){d=a("p"),b=o("TensorFlow models and layers in "),h=a("code"),u=o("transformers"),k=o(" accept two formats as input:"),l=p(),c=a("ul"),X=a("li"),be=o("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),S=a("li"),re=o("having all inputs as a list, tuple or dict in the first positional argument."),Z=p(),w=a("p"),we=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),U=a("code"),Te=o("model.fit()"),ue=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=a("code"),ve=o("model.fit()"),le=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a("code"),Me=o("fit()"),fe=o(" and "),D=a("code"),ce=o("predict()"),$e=o(`, such as when creating your own layers or models with
the Keras `),Y=a("code"),pe=o("Functional"),Le=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),z=a("ul"),A=a("li"),ge=o("a single Tensor with "),H=a("code"),xe=o("input_ids"),_e=o(" only and nothing else: "),Q=a("code"),me=o("model(input_ids)"),Fe=p(),j=a("li"),de=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=a("code"),ye=o("model([input_ids, attention_mask])"),ie=o(" or "),B=a("code"),Ee=o("model([input_ids, attention_mask, token_type_ids])"),Xe=p(),N=a("li"),qe=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),K=a("code"),ze=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ne=p(),C=a("p"),Ce=o(`Note that when creating models and layers with
`),P=a("a"),ke=o("subclassing"),te=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var F=i(d);b=n(F,"TensorFlow models and layers in "),h=r(F,"CODE",{});var We=i(h);u=n(We,"transformers"),We.forEach(t),k=n(F," accept two formats as input:"),F.forEach(t),l=m(g),c=r(g,"UL",{});var se=i(c);X=r(se,"LI",{});var Ne=i(X);be=n(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),he=m(se),S=r(se,"LI",{});var He=i(S);re=n(He,"having all inputs as a list, tuple or dict in the first positional argument."),He.forEach(t),se.forEach(t),Z=m(g),w=r(g,"P",{});var E=i(w);we=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),U=r(E,"CODE",{});var Se=i(U);Te=n(Se,"model.fit()"),Se.forEach(t),ue=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=r(E,"CODE",{});var je=i(W);ve=n(je,"model.fit()"),je.forEach(t),le=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(E,"CODE",{});var Ae=i(V);Me=n(Ae,"fit()"),Ae.forEach(t),fe=n(E," and "),D=r(E,"CODE",{});var De=i(D);ce=n(De,"predict()"),De.forEach(t),$e=n(E,`, such as when creating your own layers or models with
the Keras `),Y=r(E,"CODE",{});var Pe=i(Y);pe=n(Pe,"Functional"),Pe.forEach(t),Le=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),oe=m(g),z=r(g,"UL",{});var I=i(z);A=r(I,"LI",{});var R=i(A);ge=n(R,"a single Tensor with "),H=r(R,"CODE",{});var Qe=i(H);xe=n(Qe,"input_ids"),Qe.forEach(t),_e=n(R," only and nothing else: "),Q=r(R,"CODE",{});var Ie=i(Q);me=n(Ie,"model(input_ids)"),Ie.forEach(t),R.forEach(t),Fe=m(I),j=r(I,"LI",{});var O=i(j);de=n(O,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=r(O,"CODE",{});var Oe=i(G);ye=n(Oe,"model([input_ids, attention_mask])"),Oe.forEach(t),ie=n(O," or "),B=r(O,"CODE",{});var Ue=i(B);Ee=n(Ue,"model([input_ids, attention_mask, token_type_ids])"),Ue.forEach(t),O.forEach(t),Xe=m(I),N=r(I,"LI",{});var ee=i(N);qe=n(ee,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),K=r(ee,"CODE",{});var Be=i(K);ze=n(Be,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Be.forEach(t),ee.forEach(t),I.forEach(t),ne=m(g),C=r(g,"P",{});var J=i(C);Ce=n(J,`Note that when creating models and layers with
`),P=r(J,"A",{href:!0,rel:!0});var Ke=i(P);ke=n(Ke,"subclassing"),Ke.forEach(t),te=n(J,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),J.forEach(t),this.h()},h(){f(P,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(P,"rel","nofollow")},m(g,F){_(g,d,F),e(d,b),e(d,h),e(h,u),e(d,k),_(g,l,F),_(g,c,F),e(c,X),e(X,be),e(c,he),e(c,S),e(S,re),_(g,Z,F),_(g,w,F),e(w,we),e(w,U),e(U,Te),e(w,ue),e(w,W),e(W,ve),e(w,le),e(w,V),e(V,Me),e(w,fe),e(w,D),e(D,ce),e(w,$e),e(w,Y),e(Y,pe),e(w,Le),_(g,oe,F),_(g,z,F),e(z,A),e(A,ge),e(A,H),e(H,xe),e(A,_e),e(A,Q),e(Q,me),e(z,Fe),e(z,j),e(j,de),e(j,G),e(G,ye),e(j,ie),e(j,B),e(B,Ee),e(z,Xe),e(z,N),e(N,qe),e(N,K),e(K,ze),_(g,ne,F),_(g,C,F),e(C,Ce),e(C,P),e(P,ke),e(C,te)},d(g){g&&t(d),g&&t(l),g&&t(c),g&&t(Z),g&&t(w),g&&t(oe),g&&t(z),g&&t(ne),g&&t(C)}}}function Jk(q){let d,b,h,u,k;return{c(){d=a("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),u=o("Module"),k=o(`
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(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var X=i(h);u=n(X,"Module"),X.forEach(t),k=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,k)},d(l){l&&t(d)}}}function Zk(q){let d,b,h,u,k;return u=new Je({props:{code:`from transformers import AutoTokenizer, TFXLMForMultipleChoice
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("xlm-mlm-en-2048")
model = TFXLMForMultipleChoice.from_pretrained("xlm-mlm-en-2048")

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."

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

# the linear classifier still needs to be trained
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, TFXLMForMultipleChoice
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLMForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;tf&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = {k: tf.expand_dims(v, <span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()}
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)  <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>logits = outputs.logits`}}),{c(){d=a("p"),b=o("Example:"),h=p(),T(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),k=!0},p:Ge,i(l){k||($(u.$$.fragment,l),k=!0)},o(l){L(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(h),x(u,l)}}}function eb(q){let d,b,h,u,k,l,c,X,be,he,S,re,Z,w,we,U,Te,ue,W,ve,le,V,Me,fe,D,ce,$e,Y,pe,Le,oe,z,A,ge,H,xe,_e,Q,me,Fe,j,de,G,ye,ie,B,Ee,Xe,N,qe,K,ze,ne,C,Ce,P,ke,te;return{c(){d=a("p"),b=o("TensorFlow models and layers in "),h=a("code"),u=o("transformers"),k=o(" accept two formats as input:"),l=p(),c=a("ul"),X=a("li"),be=o("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),S=a("li"),re=o("having all inputs as a list, tuple or dict in the first positional argument."),Z=p(),w=a("p"),we=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),U=a("code"),Te=o("model.fit()"),ue=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=a("code"),ve=o("model.fit()"),le=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a("code"),Me=o("fit()"),fe=o(" and "),D=a("code"),ce=o("predict()"),$e=o(`, such as when creating your own layers or models with
the Keras `),Y=a("code"),pe=o("Functional"),Le=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),z=a("ul"),A=a("li"),ge=o("a single Tensor with "),H=a("code"),xe=o("input_ids"),_e=o(" only and nothing else: "),Q=a("code"),me=o("model(input_ids)"),Fe=p(),j=a("li"),de=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=a("code"),ye=o("model([input_ids, attention_mask])"),ie=o(" or "),B=a("code"),Ee=o("model([input_ids, attention_mask, token_type_ids])"),Xe=p(),N=a("li"),qe=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),K=a("code"),ze=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ne=p(),C=a("p"),Ce=o(`Note that when creating models and layers with
`),P=a("a"),ke=o("subclassing"),te=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var F=i(d);b=n(F,"TensorFlow models and layers in "),h=r(F,"CODE",{});var We=i(h);u=n(We,"transformers"),We.forEach(t),k=n(F," accept two formats as input:"),F.forEach(t),l=m(g),c=r(g,"UL",{});var se=i(c);X=r(se,"LI",{});var Ne=i(X);be=n(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),he=m(se),S=r(se,"LI",{});var He=i(S);re=n(He,"having all inputs as a list, tuple or dict in the first positional argument."),He.forEach(t),se.forEach(t),Z=m(g),w=r(g,"P",{});var E=i(w);we=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),U=r(E,"CODE",{});var Se=i(U);Te=n(Se,"model.fit()"),Se.forEach(t),ue=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=r(E,"CODE",{});var je=i(W);ve=n(je,"model.fit()"),je.forEach(t),le=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(E,"CODE",{});var Ae=i(V);Me=n(Ae,"fit()"),Ae.forEach(t),fe=n(E," and "),D=r(E,"CODE",{});var De=i(D);ce=n(De,"predict()"),De.forEach(t),$e=n(E,`, such as when creating your own layers or models with
the Keras `),Y=r(E,"CODE",{});var Pe=i(Y);pe=n(Pe,"Functional"),Pe.forEach(t),Le=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),oe=m(g),z=r(g,"UL",{});var I=i(z);A=r(I,"LI",{});var R=i(A);ge=n(R,"a single Tensor with "),H=r(R,"CODE",{});var Qe=i(H);xe=n(Qe,"input_ids"),Qe.forEach(t),_e=n(R," only and nothing else: "),Q=r(R,"CODE",{});var Ie=i(Q);me=n(Ie,"model(input_ids)"),Ie.forEach(t),R.forEach(t),Fe=m(I),j=r(I,"LI",{});var O=i(j);de=n(O,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=r(O,"CODE",{});var Oe=i(G);ye=n(Oe,"model([input_ids, attention_mask])"),Oe.forEach(t),ie=n(O," or "),B=r(O,"CODE",{});var Ue=i(B);Ee=n(Ue,"model([input_ids, attention_mask, token_type_ids])"),Ue.forEach(t),O.forEach(t),Xe=m(I),N=r(I,"LI",{});var ee=i(N);qe=n(ee,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),K=r(ee,"CODE",{});var Be=i(K);ze=n(Be,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Be.forEach(t),ee.forEach(t),I.forEach(t),ne=m(g),C=r(g,"P",{});var J=i(C);Ce=n(J,`Note that when creating models and layers with
`),P=r(J,"A",{href:!0,rel:!0});var Ke=i(P);ke=n(Ke,"subclassing"),Ke.forEach(t),te=n(J,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),J.forEach(t),this.h()},h(){f(P,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(P,"rel","nofollow")},m(g,F){_(g,d,F),e(d,b),e(d,h),e(h,u),e(d,k),_(g,l,F),_(g,c,F),e(c,X),e(X,be),e(c,he),e(c,S),e(S,re),_(g,Z,F),_(g,w,F),e(w,we),e(w,U),e(U,Te),e(w,ue),e(w,W),e(W,ve),e(w,le),e(w,V),e(V,Me),e(w,fe),e(w,D),e(D,ce),e(w,$e),e(w,Y),e(Y,pe),e(w,Le),_(g,oe,F),_(g,z,F),e(z,A),e(A,ge),e(A,H),e(H,xe),e(A,_e),e(A,Q),e(Q,me),e(z,Fe),e(z,j),e(j,de),e(j,G),e(G,ye),e(j,ie),e(j,B),e(B,Ee),e(z,Xe),e(z,N),e(N,qe),e(N,K),e(K,ze),_(g,ne,F),_(g,C,F),e(C,Ce),e(C,P),e(P,ke),e(C,te)},d(g){g&&t(d),g&&t(l),g&&t(c),g&&t(Z),g&&t(w),g&&t(oe),g&&t(z),g&&t(ne),g&&t(C)}}}function tb(q){let d,b,h,u,k;return{c(){d=a("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),u=o("Module"),k=o(`
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(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var X=i(h);u=n(X,"Module"),X.forEach(t),k=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,k)},d(l){l&&t(d)}}}function ob(q){let d,b,h,u,k;return u=new Je({props:{code:`from transformers import AutoTokenizer, TFXLMForTokenClassification
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("xlm-mlm-en-2048")
model = TFXLMForTokenClassification.from_pretrained("xlm-mlm-en-2048")

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

logits = model(**inputs).logits
predicted_token_class_ids = tf.math.argmax(logits, axis=-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] for t in predicted_token_class_ids[0].numpy().tolist()]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFXLMForTokenClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLMForTokenClassification.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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;tf&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = model(**inputs).logits
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = tf.math.argmax(logits, axis=-<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] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>].numpy().tolist()]`}}),{c(){d=a("p"),b=o("Example:"),h=p(),T(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),k=!0},p:Ge,i(l){k||($(u.$$.fragment,l),k=!0)},o(l){L(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(h),x(u,l)}}}function nb(q){let d,b;return d=new Je({props:{code:`labels = predicted_token_class_ids
loss = tf.math.reduce_mean(model(**inputs, labels=labels).loss)`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = tf.math.reduce_mean(model(**inputs, labels=labels).loss)`}}),{c(){T(d.$$.fragment)},l(h){v(d.$$.fragment,h)},m(h,u){M(d,h,u),b=!0},p:Ge,i(h){b||($(d.$$.fragment,h),b=!0)},o(h){L(d.$$.fragment,h),b=!1},d(h){x(d,h)}}}function sb(q){let d,b,h,u,k,l,c,X,be,he,S,re,Z,w,we,U,Te,ue,W,ve,le,V,Me,fe,D,ce,$e,Y,pe,Le,oe,z,A,ge,H,xe,_e,Q,me,Fe,j,de,G,ye,ie,B,Ee,Xe,N,qe,K,ze,ne,C,Ce,P,ke,te;return{c(){d=a("p"),b=o("TensorFlow models and layers in "),h=a("code"),u=o("transformers"),k=o(" accept two formats as input:"),l=p(),c=a("ul"),X=a("li"),be=o("having all inputs as keyword arguments (like PyTorch models), or"),he=p(),S=a("li"),re=o("having all inputs as a list, tuple or dict in the first positional argument."),Z=p(),w=a("p"),we=o(`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),U=a("code"),Te=o("model.fit()"),ue=o(` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=a("code"),ve=o("model.fit()"),le=o(` supports! If, however, you want to use the second
format outside of Keras methods like `),V=a("code"),Me=o("fit()"),fe=o(" and "),D=a("code"),ce=o("predict()"),$e=o(`, such as when creating your own layers or models with
the Keras `),Y=a("code"),pe=o("Functional"),Le=o(` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),oe=p(),z=a("ul"),A=a("li"),ge=o("a single Tensor with "),H=a("code"),xe=o("input_ids"),_e=o(" only and nothing else: "),Q=a("code"),me=o("model(input_ids)"),Fe=p(),j=a("li"),de=o(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=a("code"),ye=o("model([input_ids, attention_mask])"),ie=o(" or "),B=a("code"),Ee=o("model([input_ids, attention_mask, token_type_ids])"),Xe=p(),N=a("li"),qe=o(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),K=a("code"),ze=o('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),ne=p(),C=a("p"),Ce=o(`Note that when creating models and layers with
`),P=a("a"),ke=o("subclassing"),te=o(` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),this.h()},l(g){d=r(g,"P",{});var F=i(d);b=n(F,"TensorFlow models and layers in "),h=r(F,"CODE",{});var We=i(h);u=n(We,"transformers"),We.forEach(t),k=n(F," accept two formats as input:"),F.forEach(t),l=m(g),c=r(g,"UL",{});var se=i(c);X=r(se,"LI",{});var Ne=i(X);be=n(Ne,"having all inputs as keyword arguments (like PyTorch models), or"),Ne.forEach(t),he=m(se),S=r(se,"LI",{});var He=i(S);re=n(He,"having all inputs as a list, tuple or dict in the first positional argument."),He.forEach(t),se.forEach(t),Z=m(g),w=r(g,"P",{});var E=i(w);we=n(E,`The reason the second format is supported is that Keras methods prefer this format when passing inputs to models
and layers. Because of this support, when using methods like `),U=r(E,"CODE",{});var Se=i(U);Te=n(Se,"model.fit()"),Se.forEach(t),ue=n(E,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),W=r(E,"CODE",{});var je=i(W);ve=n(je,"model.fit()"),je.forEach(t),le=n(E,` supports! If, however, you want to use the second
format outside of Keras methods like `),V=r(E,"CODE",{});var Ae=i(V);Me=n(Ae,"fit()"),Ae.forEach(t),fe=n(E," and "),D=r(E,"CODE",{});var De=i(D);ce=n(De,"predict()"),De.forEach(t),$e=n(E,`, such as when creating your own layers or models with
the Keras `),Y=r(E,"CODE",{});var Pe=i(Y);pe=n(Pe,"Functional"),Pe.forEach(t),Le=n(E,` API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`),E.forEach(t),oe=m(g),z=r(g,"UL",{});var I=i(z);A=r(I,"LI",{});var R=i(A);ge=n(R,"a single Tensor with "),H=r(R,"CODE",{});var Qe=i(H);xe=n(Qe,"input_ids"),Qe.forEach(t),_e=n(R," only and nothing else: "),Q=r(R,"CODE",{});var Ie=i(Q);me=n(Ie,"model(input_ids)"),Ie.forEach(t),R.forEach(t),Fe=m(I),j=r(I,"LI",{});var O=i(j);de=n(O,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),G=r(O,"CODE",{});var Oe=i(G);ye=n(Oe,"model([input_ids, attention_mask])"),Oe.forEach(t),ie=n(O," or "),B=r(O,"CODE",{});var Ue=i(B);Ee=n(Ue,"model([input_ids, attention_mask, token_type_ids])"),Ue.forEach(t),O.forEach(t),Xe=m(I),N=r(I,"LI",{});var ee=i(N);qe=n(ee,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),K=r(ee,"CODE",{});var Be=i(K);ze=n(Be,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Be.forEach(t),ee.forEach(t),I.forEach(t),ne=m(g),C=r(g,"P",{});var J=i(C);Ce=n(J,`Note that when creating models and layers with
`),P=r(J,"A",{href:!0,rel:!0});var Ke=i(P);ke=n(Ke,"subclassing"),Ke.forEach(t),te=n(J,` then you don\u2019t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`),J.forEach(t),this.h()},h(){f(P,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),f(P,"rel","nofollow")},m(g,F){_(g,d,F),e(d,b),e(d,h),e(h,u),e(d,k),_(g,l,F),_(g,c,F),e(c,X),e(X,be),e(c,he),e(c,S),e(S,re),_(g,Z,F),_(g,w,F),e(w,we),e(w,U),e(U,Te),e(w,ue),e(w,W),e(W,ve),e(w,le),e(w,V),e(V,Me),e(w,fe),e(w,D),e(D,ce),e(w,$e),e(w,Y),e(Y,pe),e(w,Le),_(g,oe,F),_(g,z,F),e(z,A),e(A,ge),e(A,H),e(H,xe),e(A,_e),e(A,Q),e(Q,me),e(z,Fe),e(z,j),e(j,de),e(j,G),e(G,ye),e(j,ie),e(j,B),e(B,Ee),e(z,Xe),e(z,N),e(N,qe),e(N,K),e(K,ze),_(g,ne,F),_(g,C,F),e(C,Ce),e(C,P),e(P,ke),e(C,te)},d(g){g&&t(d),g&&t(l),g&&t(c),g&&t(Z),g&&t(w),g&&t(oe),g&&t(z),g&&t(ne),g&&t(C)}}}function ab(q){let d,b,h,u,k;return{c(){d=a("p"),b=o("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),u=o("Module"),k=o(`
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(l){d=r(l,"P",{});var c=i(d);b=n(c,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(c,"CODE",{});var X=i(h);u=n(X,"Module"),X.forEach(t),k=n(c,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),c.forEach(t)},m(l,c){_(l,d,c),e(d,b),e(d,h),e(h,u),e(d,k)},d(l){l&&t(d)}}}function rb(q){let d,b,h,u,k;return u=new Je({props:{code:`from transformers import AutoTokenizer, TFXLMForQuestionAnsweringSimple
import tensorflow as tf

tokenizer = AutoTokenizer.from_pretrained("xlm-mlm-en-2048")
model = TFXLMForQuestionAnsweringSimple.from_pretrained("xlm-mlm-en-2048")

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

inputs = tokenizer(question, text, return_tensors="tf")
outputs = model(**inputs)

answer_start_index = int(tf.math.argmax(outputs.start_logits, axis=-1)[0])
answer_end_index = int(tf.math.argmax(outputs.end_logits, axis=-1)[0])

predict_answer_tokens = inputs.input_ids[0, answer_start_index : answer_end_index + 1]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFXLMForQuestionAnsweringSimple
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">import</span> tensorflow <span class="hljs-keyword">as</span> tf

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLMForQuestionAnsweringSimple.from_pretrained(<span class="hljs-string">&quot;xlm-mlm-en-2048&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;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = <span class="hljs-built_in">int</span>(tf.math.argmax(outputs.start_logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = <span class="hljs-built_in">int</span>(tf.math.argmax(outputs.end_logits, axis=-<span class="hljs-number">1</span>)[<span class="hljs-number">0</span>])

<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>]`}}),{c(){d=a("p"),b=o("Example:"),h=p(),T(u.$$.fragment)},l(l){d=r(l,"P",{});var c=i(d);b=n(c,"Example:"),c.forEach(t),h=m(l),v(u.$$.fragment,l)},m(l,c){_(l,d,c),e(d,b),_(l,h,c),M(u,l,c),k=!0},p:Ge,i(l){k||($(u.$$.fragment,l),k=!0)},o(l){L(u.$$.fragment,l),k=!1},d(l){l&&t(d),l&&t(h),x(u,l)}}}function ib(q){let d,b;return d=new Je({props:{code:`# target is "nice puppet"
target_start_index = tf.constant([14])
target_end_index = tf.constant([15])

outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
loss = tf.math.reduce_mean(outputs.loss)`,highlighted:`<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 = tf.constant([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = tf.constant([<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 = tf.math.reduce_mean(outputs.loss)`}}),{c(){T(d.$$.fragment)},l(h){v(d.$$.fragment,h)},m(h,u){M(d,h,u),b=!0},p:Ge,i(h){b||($(d.$$.fragment,h),b=!0)},o(h){L(d.$$.fragment,h),b=!1},d(h){x(d,h)}}}function lb(q){let d,b,h,u,k,l,c,X,be,he,S,re,Z,w,we,U,Te,ue,W,ve,le,V,Me,fe,D,ce,$e,Y,pe,Le,oe,z,A,ge,H,xe,_e,Q,me,Fe,j,de,G,ye,ie,B,Ee,Xe,N,qe,K,ze,ne,C,Ce,P,ke,te,g,F,We,se,Ne,He,E,Se,je,Ae,De,Pe,I,R,Qe,Ie,O,Oe,Ue,ee,Be,J,Ke,oc,Oa,nc,sc,Rn,ac,rc,ic,Gt,lc,Da,dc,cc,Sa,pc,mc,hc,No,Xl,Jt,Po,Ar,Vn,uc,Nr,fc,ql,Re,Yn,gc,Pr,_c,yc,it,Or,kc,bc,Dr,wc,Tc,Sr,vc,Mc,Nt,$c,Ir,Lc,xc,Wr,Fc,Ec,Hr,Xc,qc,zc,Gn,Cc,Qr,jc,Ac,Nc,Jn,Pc,Ur,Oc,Dc,Sc,Zn,Ic,Ia,Wc,Hc,Qc,Dt,es,Uc,Br,Bc,Kc,ts,Wa,Rc,Kr,Vc,Yc,Ha,Gc,Rr,Jc,Zc,Oo,os,ep,ns,tp,Vr,op,np,sp,kt,ss,ap,Yr,rp,ip,Do,lp,Zt,dp,Gr,cp,pp,Jr,mp,hp,up,Qa,as,zl,eo,So,Zr,rs,fp,ei,gp,Cl,to,is,_p,ls,yp,ti,kp,bp,jl,oo,Io,oi,ds,wp,ni,Tp,Al,lt,cs,vp,si,Mp,$p,ps,Lp,Ua,xp,Fp,Ep,ms,Xp,hs,qp,zp,Cp,bt,us,jp,no,Ap,Ba,Np,Pp,ai,Op,Dp,Sp,Wo,Ip,Ho,Nl,so,Qo,ri,fs,Wp,ii,Hp,Pl,dt,gs,Qp,li,Up,Bp,_s,Kp,Ka,Rp,Vp,Yp,ys,Gp,ks,Jp,Zp,em,wt,bs,tm,ao,om,Ra,nm,sm,di,am,rm,im,Uo,lm,Bo,Ol,ro,Ko,ci,ws,dm,pi,cm,Dl,ct,Ts,pm,mi,mm,hm,vs,um,Va,fm,gm,_m,Ms,ym,$s,km,bm,wm,ft,Ls,Tm,io,vm,Ya,Mm,$m,hi,Lm,xm,Fm,Ro,Em,Vo,Xm,Yo,Sl,lo,Go,ui,xs,qm,fi,zm,Il,pt,Fs,Cm,gi,jm,Am,Es,Nm,Ga,Pm,Om,Dm,Xs,Sm,qs,Im,Wm,Hm,Tt,zs,Qm,co,Um,Ja,Bm,Km,_i,Rm,Vm,Ym,Jo,Gm,Zo,Wl,po,en,yi,Cs,Jm,ki,Zm,Hl,mt,js,eh,bi,th,oh,As,nh,Za,sh,ah,rh,Ns,ih,Ps,lh,dh,ch,vt,Os,ph,mo,mh,er,hh,uh,wi,fh,gh,_h,tn,yh,on,Ql,ho,nn,Ti,Ds,kh,vi,bh,Ul,ht,Ss,wh,uo,Th,Mi,vh,Mh,$i,$h,Lh,xh,Is,Fh,tr,Eh,Xh,qh,Ws,zh,Hs,Ch,jh,Ah,Mt,Qs,Nh,fo,Ph,or,Oh,Dh,Li,Sh,Ih,Wh,sn,Hh,an,Bl,go,rn,xi,Us,Qh,Fi,Uh,Kl,ut,Bs,Bh,_o,Kh,Ei,Rh,Vh,Xi,Yh,Gh,Jh,Ks,Zh,nr,eu,tu,ou,Rs,nu,Vs,su,au,ru,$t,Ys,iu,yo,lu,sr,du,cu,qi,pu,mu,hu,ln,uu,dn,Rl,ko,cn,zi,Gs,fu,Ci,gu,Vl,et,Js,_u,ji,yu,ku,Zs,bu,ar,wu,Tu,vu,ea,Mu,ta,$u,Lu,xu,pn,Fu,Lt,oa,Eu,bo,Xu,rr,qu,zu,Ai,Cu,ju,Au,mn,Nu,hn,Yl,wo,un,Ni,na,Pu,Pi,Ou,Gl,tt,sa,Du,Oi,Su,Iu,aa,Wu,ir,Hu,Qu,Uu,ra,Bu,ia,Ku,Ru,Vu,fn,Yu,xt,la,Gu,To,Ju,lr,Zu,ef,Di,tf,of,nf,gn,sf,_n,Jl,vo,yn,Si,da,af,Ii,rf,Zl,ot,ca,lf,Wi,df,cf,pa,pf,dr,mf,hf,uf,ma,ff,ha,gf,_f,yf,kn,kf,gt,ua,bf,Mo,wf,cr,Tf,vf,Hi,Mf,$f,Lf,bn,xf,wn,Ff,Tn,ed,$o,vn,Qi,fa,Ef,Ui,Xf,td,nt,ga,qf,Bi,zf,Cf,_a,jf,pr,Af,Nf,Pf,ya,Of,ka,Df,Sf,If,Mn,Wf,Ft,ba,Hf,Lo,Qf,mr,Uf,Bf,Ki,Kf,Rf,Vf,$n,Yf,Ln,od,xo,xn,Ri,wa,Gf,Vi,Jf,nd,st,Ta,Zf,Yi,eg,tg,va,og,hr,ng,sg,ag,Ma,rg,$a,ig,lg,dg,Fn,cg,_t,La,pg,Fo,mg,ur,hg,ug,Gi,fg,gg,_g,En,yg,Xn,kg,qn,sd,Eo,zn,Ji,xa,bg,Zi,wg,ad,at,Fa,Tg,Xo,vg,el,Mg,$g,tl,Lg,xg,Fg,Ea,Eg,fr,Xg,qg,zg,Xa,Cg,qa,jg,Ag,Ng,Cn,Pg,yt,za,Og,qo,Dg,gr,Sg,Ig,ol,Wg,Hg,Qg,jn,Ug,An,Bg,Nn,rd;return l=new Ze({}),w=new Ze({}),Pe=new Ze({}),Oe=new ae({props:{name:"class transformers.XLMConfig",anchor:"transformers.XLMConfig",parameters:[{name:"vocab_size",val:" = 30145"},{name:"emb_dim",val:" = 2048"},{name:"n_layers",val:" = 12"},{name:"n_heads",val:" = 16"},{name:"dropout",val:" = 0.1"},{name:"attention_dropout",val:" = 0.1"},{name:"gelu_activation",val:" = True"},{name:"sinusoidal_embeddings",val:" = False"},{name:"causal",val:" = False"},{name:"asm",val:" = False"},{name:"n_langs",val:" = 1"},{name:"use_lang_emb",val:" = True"},{name:"max_position_embeddings",val:" = 512"},{name:"embed_init_std",val:" = 0.02209708691207961"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"init_std",val:" = 0.02"},{name:"bos_index",val:" = 0"},{name:"eos_index",val:" = 1"},{name:"pad_index",val:" = 2"},{name:"unk_index",val:" = 3"},{name:"mask_index",val:" = 5"},{name:"is_encoder",val:" = True"},{name:"summary_type",val:" = 'first'"},{name:"summary_use_proj",val:" = True"},{name:"summary_activation",val:" = None"},{name:"summary_proj_to_labels",val:" = True"},{name:"summary_first_dropout",val:" = 0.1"},{name:"start_n_top",val:" = 5"},{name:"end_n_top",val:" = 5"},{name:"mask_token_id",val:" = 0"},{name:"lang_id",val:" = 0"},{name:"pad_token_id",val:" = 2"},{name:"bos_token_id",val:" = 0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XLMConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 30145) &#x2014;
Vocabulary size of the BERT model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMModel">XLMModel</a> or <a href="/docs/transformers/main/en/model_doc/xlm#transformers.TFXLMModel">TFXLMModel</a>.`,name:"vocab_size"},{anchor:"transformers.XLMConfig.emb_dim",description:`<strong>emb_dim</strong> (<code>int</code>, <em>optional</em>, defaults to 2048) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"emb_dim"},{anchor:"transformers.XLMConfig.n_layer",description:`<strong>n_layer</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"n_layer"},{anchor:"transformers.XLMConfig.n_head",description:`<strong>n_head</strong> (<code>int</code>, <em>optional</em>, defaults to 16) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"n_head"},{anchor:"transformers.XLMConfig.dropout",description:`<strong>dropout</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:"dropout"},{anchor:"transformers.XLMConfig.attention_dropout",description:`<strong>attention_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probability for the attention mechanism`,name:"attention_dropout"},{anchor:"transformers.XLMConfig.gelu_activation",description:`<strong>gelu_activation</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use <em>gelu</em> for the activations instead of <em>relu</em>.`,name:"gelu_activation"},{anchor:"transformers.XLMConfig.sinusoidal_embeddings",description:`<strong>sinusoidal_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use sinusoidal positional embeddings instead of absolute positional embeddings.`,name:"sinusoidal_embeddings"},{anchor:"transformers.XLMConfig.causal",description:`<strong>causal</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the model should behave in a causal manner. Causal models use a triangular attention mask in
order to only attend to the left-side context instead if a bidirectional context.`,name:"causal"},{anchor:"transformers.XLMConfig.asm",description:`<strong>asm</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use an adaptive log softmax projection layer instead of a linear layer for the prediction
layer.`,name:"asm"},{anchor:"transformers.XLMConfig.n_langs",description:`<strong>n_langs</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The number of languages the model handles. Set to 1 for monolingual models.`,name:"n_langs"},{anchor:"transformers.XLMConfig.use_lang_emb",description:`<strong>use_lang_emb</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use language embeddings. Some models use additional language embeddings, see <a href="http://huggingface.co/transformers/multilingual.html#xlm-language-embeddings" rel="nofollow">the multilingual
models page</a> for information
on how to use them.`,name:"use_lang_emb"},{anchor:"transformers.XLMConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#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.XLMConfig.embed_init_std",description:`<strong>embed_init_std</strong> (<code>float</code>, <em>optional</em>, defaults to 2048^-0.5) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing the embedding matrices.`,name:"embed_init_std"},{anchor:"transformers.XLMConfig.init_std",description:`<strong>init_std</strong> (<code>int</code>, <em>optional</em>, defaults to 50257) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices except the
embedding matrices.`,name:"init_std"},{anchor:"transformers.XLMConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.XLMConfig.bos_index",description:`<strong>bos_index</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The index of the beginning of sentence token in the vocabulary.`,name:"bos_index"},{anchor:"transformers.XLMConfig.eos_index",description:`<strong>eos_index</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The index of the end of sentence token in the vocabulary.`,name:"eos_index"},{anchor:"transformers.XLMConfig.pad_index",description:`<strong>pad_index</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The index of the padding token in the vocabulary.`,name:"pad_index"},{anchor:"transformers.XLMConfig.unk_index",description:`<strong>unk_index</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
The index of the unknown token in the vocabulary.`,name:"unk_index"},{anchor:"transformers.XLMConfig.mask_index",description:`<strong>mask_index</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
The index of the masking token in the vocabulary.`,name:"mask_index"},{anchor:"transformers.XLMConfig.is_encoder(bool,",description:`<strong>is_encoder(<code>bool</code>,</strong> <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the initialized model should be a transformer encoder or decoder as seen in Vaswani et al.`,name:"is_encoder(bool,"},{anchor:"transformers.XLMConfig.summary_type",description:`<strong>summary_type</strong> (<code>string</code>, <em>optional</em>, defaults to &#x201C;first&#x201D;) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Has to be one of the following options:</p>
<ul>
<li><code>&quot;last&quot;</code>: Take the last token hidden state (like XLNet).</li>
<li><code>&quot;first&quot;</code>: Take the first token hidden state (like BERT).</li>
<li><code>&quot;mean&quot;</code>: Take the mean of all tokens hidden states.</li>
<li><code>&quot;cls_index&quot;</code>: Supply a Tensor of classification token position (like GPT/GPT-2).</li>
<li><code>&quot;attn&quot;</code>: Not implemented now, use multi-head attention.</li>
</ul>`,name:"summary_type"},{anchor:"transformers.XLMConfig.summary_use_proj",description:`<strong>summary_use_proj</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Whether or not to add a projection after the vector extraction.`,name:"summary_use_proj"},{anchor:"transformers.XLMConfig.summary_activation",description:`<strong>summary_activation</strong> (<code>str</code>, <em>optional</em>) &#x2014;
Argument used when doing sequence summary. Used in the sequence classification and multiple choice models.</p>
<p>Pass <code>&quot;tanh&quot;</code> for a tanh activation to the output, any other value will result in no activation.`,name:"summary_activation"},{anchor:"transformers.XLMConfig.summary_proj_to_labels",description:`<strong>summary_proj_to_labels</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Used in the sequence classification and multiple choice models.</p>
<p>Whether the projection outputs should have <code>config.num_labels</code> or <code>config.hidden_size</code> classes.`,name:"summary_proj_to_labels"},{anchor:"transformers.XLMConfig.summary_first_dropout",description:`<strong>summary_first_dropout</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
Used in the sequence classification and multiple choice models.</p>
<p>The dropout ratio to be used after the projection and activation.`,name:"summary_first_dropout"},{anchor:"transformers.XLMConfig.start_n_top",description:`<strong>start_n_top</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
Used in the SQuAD evaluation script.`,name:"start_n_top"},{anchor:"transformers.XLMConfig.end_n_top",description:`<strong>end_n_top</strong> (<code>int</code>, <em>optional</em>, defaults to 5) &#x2014;
Used in the SQuAD evaluation script.`,name:"end_n_top"},{anchor:"transformers.XLMConfig.mask_token_id",description:`<strong>mask_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Model agnostic parameter to identify masked tokens when generating text in an MLM context.`,name:"mask_token_id"},{anchor:"transformers.XLMConfig.lang_id",description:`<strong>lang_id</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
The ID of the language used by the model. This parameter is used when generating text in a given language.`,name:"lang_id"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/configuration_xlm.py#L40"}}),No=new Ye({props:{anchor:"transformers.XLMConfig.example",$$slots:{default:[Mk]},$$scope:{ctx:q}}}),Vn=new Ze({}),Yn=new ae({props:{name:"class transformers.XLMTokenizer",anchor:"transformers.XLMTokenizer",parameters:[{name:"vocab_file",val:""},{name:"merges_file",val:""},{name:"unk_token",val:" = '<unk>'"},{name:"bos_token",val:" = '<s>'"},{name:"sep_token",val:" = '</s>'"},{name:"pad_token",val:" = '<pad>'"},{name:"cls_token",val:" = '</s>'"},{name:"mask_token",val:" = '<special1>'"},{name:"additional_special_tokens",val:" = ['<special0>', '<special1>', '<special2>', '<special3>', '<special4>', '<special5>', '<special6>', '<special7>', '<special8>', '<special9>']"},{name:"lang2id",val:" = None"},{name:"id2lang",val:" = None"},{name:"do_lowercase_and_remove_accent",val:" = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XLMTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
Vocabulary file.`,name:"vocab_file"},{anchor:"transformers.XLMTokenizer.merges_file",description:`<strong>merges_file</strong> (<code>str</code>) &#x2014;
Merges file.`,name:"merges_file"},{anchor:"transformers.XLMTokenizer.unk_token",description:`<strong>unk_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;unk&gt;&quot;</code>) &#x2014;
The unknown token. A token that is not in the vocabulary cannot be converted to an ID and is set to be this
token instead.`,name:"unk_token"},{anchor:"transformers.XLMTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.XLMTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.XLMTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.XLMTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.XLMTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;special1&gt;&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.XLMTokenizer.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;&lt;special0&gt;&quot;,&quot;&lt;special1&gt;&quot;,&quot;&lt;special2&gt;&quot;,&quot;&lt;special3&gt;&quot;,&quot;&lt;special4&gt;&quot;,&quot;&lt;special5&gt;&quot;,&quot;&lt;special6&gt;&quot;,&quot;&lt;special7&gt;&quot;,&quot;&lt;special8&gt;&quot;,&quot;&lt;special9&gt;&quot;]</code>) &#x2014;
List of additional special tokens.`,name:"additional_special_tokens"},{anchor:"transformers.XLMTokenizer.lang2id",description:`<strong>lang2id</strong> (<code>Dict[str, int]</code>, <em>optional</em>) &#x2014;
Dictionary mapping languages string identifiers to their IDs.`,name:"lang2id"},{anchor:"transformers.XLMTokenizer.id2lang",description:`<strong>id2lang</strong> (<code>Dict[int, str]</code>, <em>optional</em>) &#x2014;
Dictionary mapping language IDs to their string identifiers.`,name:"id2lang"},{anchor:"transformers.XLMTokenizer.do_lowercase_and_remove_accent",description:`<strong>do_lowercase_and_remove_accent</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to lowercase and remove accents when tokenizing.`,name:"do_lowercase_and_remove_accent"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/tokenization_xlm.py#L528"}}),es=new ae({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.XLMTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.XLMTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.XLMTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/tokenization_xlm.py#L871",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),os=new ae({props:{name:"get_special_tokens_mask",anchor:"transformers.XLMTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.XLMTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.XLMTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.XLMTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/tokenization_xlm.py#L898",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),ss=new ae({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.XLMTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.XLMTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.XLMTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/tokenization_xlm.py#L926",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Do=new Ye({props:{anchor:"transformers.XLMTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[$k]},$$scope:{ctx:q}}}),as=new ae({props:{name:"save_vocabulary",anchor:"transformers.XLMTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/tokenization_xlm.py#L955"}}),rs=new Ze({}),is=new ae({props:{name:"class transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput",anchor:"transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_top_log_probs",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_top_index",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_top_log_probs",val:": typing.Optional[torch.FloatTensor] = None"},{name:"end_top_index",val:": typing.Optional[torch.LongTensor] = None"},{name:"cls_logits",val:": typing.Optional[torch.FloatTensor] = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],parametersDescription:[{anchor:"transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput.loss",description:`<strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned if both <code>start_positions</code> and <code>end_positions</code> are provided) &#x2014;
Classification loss as the sum of start token, end token (and is_impossible if provided) classification
losses.`,name:"loss"},{anchor:"transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput.start_top_log_probs",description:`<strong>start_top_log_probs</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.start_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) &#x2014;
Log probabilities for the top config.start_n_top start token possibilities (beam-search).`,name:"start_top_log_probs"},{anchor:"transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput.start_top_index",description:`<strong>start_top_index</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, config.start_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) &#x2014;
Indices for the top config.start_n_top start token possibilities (beam-search).`,name:"start_top_index"},{anchor:"transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput.end_top_log_probs",description:`<strong>end_top_log_probs</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.start_n_top * config.end_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) &#x2014;
Log probabilities for the top <code>config.start_n_top * config.end_n_top</code> end token possibilities
(beam-search).`,name:"end_top_log_probs"},{anchor:"transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput.end_top_index",description:`<strong>end_top_index</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, config.start_n_top * config.end_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) &#x2014;
Indices for the top <code>config.start_n_top * config.end_n_top</code> end token possibilities (beam-search).`,name:"end_top_index"},{anchor:"transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput.cls_logits",description:`<strong>cls_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) &#x2014;
Log probabilities for the <code>is_impossible</code> label of the answers.`,name:"cls_logits"},{anchor:"transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput.hidden_states",description:`<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>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + 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 initial embedding outputs.`,name:"hidden_states"},{anchor:"transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput.attentions",description:`<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>) &#x2014;
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.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_xlm.py#L263"}}),ds=new Ze({}),cs=new ae({props:{name:"class transformers.XLMModel",anchor:"transformers.XLMModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLMModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig">XLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_xlm.py#L394"}}),us=new ae({props:{name:"forward",anchor:"transformers.XLMModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",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:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = 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.XLMModel.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.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMModel.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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.XLMModel.forward.langs",description:`<strong>langs</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.XLMModel.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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XLMModel.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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMModel.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.XLMModel.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.XLMModel.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.XLMModel.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.XLMModel.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.XLMModel.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.XLMModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_xlm.py#L481",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig"
>XLMConfig</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>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Wo=new Ve({props:{$$slots:{default:[Lk]},$$scope:{ctx:q}}}),Ho=new Ye({props:{anchor:"transformers.XLMModel.forward.example",$$slots:{default:[xk]},$$scope:{ctx:q}}}),fs=new Ze({}),gs=new ae({props:{name:"class transformers.XLMWithLMHeadModel",anchor:"transformers.XLMWithLMHeadModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLMWithLMHeadModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig">XLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_xlm.py#L673"}}),bs=new ae({props:{name:"forward",anchor:"transformers.XLMWithLMHeadModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",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:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = 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.XLMWithLMHeadModel.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.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMWithLMHeadModel.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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.XLMWithLMHeadModel.forward.langs",description:`<strong>langs</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.XLMWithLMHeadModel.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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XLMWithLMHeadModel.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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMWithLMHeadModel.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.XLMWithLMHeadModel.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.XLMWithLMHeadModel.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.XLMWithLMHeadModel.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.XLMWithLMHeadModel.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.XLMWithLMHeadModel.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.XLMWithLMHeadModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMWithLMHeadModel.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for language modeling. Note that the labels <strong>are shifted</strong> inside the model, i.e. you can set
<code>labels = input_ids</code> Indices are selected in <code>[-100, 0, ..., config.vocab_size]</code> All labels set to <code>-100</code>
are ignored (masked), the loss is only computed for labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_xlm.py#L703",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig"
>XLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Uo=new Ve({props:{$$slots:{default:[Fk]},$$scope:{ctx:q}}}),Bo=new Ye({props:{anchor:"transformers.XLMWithLMHeadModel.forward.example",$$slots:{default:[Ek]},$$scope:{ctx:q}}}),ws=new Ze({}),Ts=new ae({props:{name:"class transformers.XLMForSequenceClassification",anchor:"transformers.XLMForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLMForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig">XLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_xlm.py#L770"}}),Ls=new ae({props:{name:"forward",anchor:"transformers.XLMForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",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:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = 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.XLMForSequenceClassification.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.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMForSequenceClassification.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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.XLMForSequenceClassification.forward.langs",description:`<strong>langs</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.XLMForSequenceClassification.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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XLMForSequenceClassification.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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMForSequenceClassification.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.XLMForSequenceClassification.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.XLMForSequenceClassification.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.XLMForSequenceClassification.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.XLMForSequenceClassification.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.XLMForSequenceClassification.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.XLMForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_xlm.py#L782",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig"
>XLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ro=new Ve({props:{$$slots:{default:[Xk]},$$scope:{ctx:q}}}),Vo=new Ye({props:{anchor:"transformers.XLMForSequenceClassification.forward.example",$$slots:{default:[qk]},$$scope:{ctx:q}}}),Yo=new Ye({props:{anchor:"transformers.XLMForSequenceClassification.forward.example-2",$$slots:{default:[zk]},$$scope:{ctx:q}}}),xs=new Ze({}),Fs=new ae({props:{name:"class transformers.XLMForMultipleChoice",anchor:"transformers.XLMForMultipleChoice",parameters:[{name:"config",val:""},{name:"*inputs",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XLMForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig">XLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_xlm.py#L1181"}}),zs=new ae({props:{name:"forward",anchor:"transformers.XLMForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",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:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = 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.XLMForMultipleChoice.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.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMForMultipleChoice.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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.XLMForMultipleChoice.forward.langs",description:`<strong>langs</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.XLMForMultipleChoice.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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XLMForMultipleChoice.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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMForMultipleChoice.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.XLMForMultipleChoice.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.XLMForMultipleChoice.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.XLMForMultipleChoice.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.XLMForMultipleChoice.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.XLMForMultipleChoice.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.XLMForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_xlm.py#L1192",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig"
>XLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Jo=new Ve({props:{$$slots:{default:[Ck]},$$scope:{ctx:q}}}),Zo=new Ye({props:{anchor:"transformers.XLMForMultipleChoice.forward.example",$$slots:{default:[jk]},$$scope:{ctx:q}}}),Cs=new Ze({}),js=new ae({props:{name:"class transformers.XLMForTokenClassification",anchor:"transformers.XLMForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLMForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig">XLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_xlm.py#L1097"}}),Os=new ae({props:{name:"forward",anchor:"transformers.XLMForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",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:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = 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.XLMForTokenClassification.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.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMForTokenClassification.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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.XLMForTokenClassification.forward.langs",description:`<strong>langs</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.XLMForTokenClassification.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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XLMForTokenClassification.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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMForTokenClassification.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.XLMForTokenClassification.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.XLMForTokenClassification.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.XLMForTokenClassification.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.XLMForTokenClassification.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.XLMForTokenClassification.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.XLMForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMForTokenClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_xlm.py#L1109",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig"
>XLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),tn=new Ve({props:{$$slots:{default:[Ak]},$$scope:{ctx:q}}}),on=new Ye({props:{anchor:"transformers.XLMForTokenClassification.forward.example",$$slots:{default:[Nk]},$$scope:{ctx:q}}}),Ds=new Ze({}),Ss=new ae({props:{name:"class transformers.XLMForQuestionAnsweringSimple",anchor:"transformers.XLMForQuestionAnsweringSimple",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLMForQuestionAnsweringSimple.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig">XLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_xlm.py#L872"}}),Qs=new ae({props:{name:"forward",anchor:"transformers.XLMForQuestionAnsweringSimple.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",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:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"start_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"end_positions",val:": typing.Optional[torch.Tensor] = 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.XLMForQuestionAnsweringSimple.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.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMForQuestionAnsweringSimple.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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.XLMForQuestionAnsweringSimple.forward.langs",description:`<strong>langs</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.XLMForQuestionAnsweringSimple.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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XLMForQuestionAnsweringSimple.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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMForQuestionAnsweringSimple.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.XLMForQuestionAnsweringSimple.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.XLMForQuestionAnsweringSimple.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.XLMForQuestionAnsweringSimple.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.XLMForQuestionAnsweringSimple.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.XLMForQuestionAnsweringSimple.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.XLMForQuestionAnsweringSimple.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMForQuestionAnsweringSimple.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.XLMForQuestionAnsweringSimple.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_xlm.py#L882",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig"
>XLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),sn=new Ve({props:{$$slots:{default:[Pk]},$$scope:{ctx:q}}}),an=new Ye({props:{anchor:"transformers.XLMForQuestionAnsweringSimple.forward.example",$$slots:{default:[Ok]},$$scope:{ctx:q}}}),Us=new Ze({}),Bs=new ae({props:{name:"class transformers.XLMForQuestionAnswering",anchor:"transformers.XLMForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLMForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig">XLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_xlm.py#L976"}}),Ys=new ae({props:{name:"forward",anchor:"transformers.XLMForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"langs",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:"lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, torch.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"start_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"end_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"is_impossible",val:": typing.Optional[torch.Tensor] = None"},{name:"cls_index",val:": typing.Optional[torch.Tensor] = None"},{name:"p_mask",val:": typing.Optional[torch.Tensor] = 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.XLMForQuestionAnswering.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.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLMForQuestionAnswering.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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.XLMForQuestionAnswering.forward.langs",description:`<strong>langs</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.XLMForQuestionAnswering.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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.XLMForQuestionAnswering.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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.XLMForQuestionAnswering.forward.lengths",description:`<strong>lengths</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.XLMForQuestionAnswering.forward.cache",description:`<strong>cache</strong> (<code>Dict[str, torch.FloatTensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.XLMForQuestionAnswering.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.XLMForQuestionAnswering.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.XLMForQuestionAnswering.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.XLMForQuestionAnswering.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.XLMForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLMForQuestionAnswering.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.XLMForQuestionAnswering.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"},{anchor:"transformers.XLMForQuestionAnswering.forward.is_impossible",description:`<strong>is_impossible</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels whether a question has an answer or no answer (SQuAD 2.0)`,name:"is_impossible"},{anchor:"transformers.XLMForQuestionAnswering.forward.cls_index",description:`<strong>cls_index</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the classification token to use as input for computing plausibility of the
answer.`,name:"cls_index"},{anchor:"transformers.XLMForQuestionAnswering.forward.p_mask",description:`<strong>p_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Optional mask of tokens which can&#x2019;t be in answers (e.g. [CLS], [PAD], &#x2026;). 1.0 means token should be
masked. 0.0 mean token is not masked.`,name:"p_mask"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_xlm.py#L986",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/model_doc/xlm#transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput"
>transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig"
>XLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned if both <code>start_positions</code> and <code>end_positions</code> are provided) \u2014 Classification loss as the sum of start token, end token (and is_impossible if provided) classification
losses.</p>
</li>
<li>
<p><strong>start_top_log_probs</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.start_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) \u2014 Log probabilities for the top config.start_n_top start token possibilities (beam-search).</p>
</li>
<li>
<p><strong>start_top_index</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, config.start_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) \u2014 Indices for the top config.start_n_top start token possibilities (beam-search).</p>
</li>
<li>
<p><strong>end_top_log_probs</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.start_n_top * config.end_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) \u2014 Log probabilities for the top <code>config.start_n_top * config.end_n_top</code> end token possibilities
(beam-search).</p>
</li>
<li>
<p><strong>end_top_index</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, config.start_n_top * config.end_n_top)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) \u2014 Indices for the top <code>config.start_n_top * config.end_n_top</code> end token possibilities (beam-search).</p>
</li>
<li>
<p><strong>cls_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>, returned if <code>start_positions</code> or <code>end_positions</code> is not provided) \u2014 Log probabilities for the <code>is_impossible</code> label of the answers.</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 + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/model_doc/xlm#transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput"
>transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ln=new Ve({props:{$$slots:{default:[Dk]},$$scope:{ctx:q}}}),dn=new Ye({props:{anchor:"transformers.XLMForQuestionAnswering.forward.example",$$slots:{default:[Sk]},$$scope:{ctx:q}}}),Gs=new Ze({}),Js=new ae({props:{name:"class transformers.TFXLMModel",anchor:"transformers.TFXLMModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLMModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig">XLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_tf_xlm.py#L695"}}),pn=new Ve({props:{$$slots:{default:[Ik]},$$scope:{ctx:q}}}),oa=new ae({props:{name:"call",anchor:"transformers.TFXLMModel.call",parameters:[{name:"input_ids",val:" = None"},{name:"attention_mask",val:" = None"},{name:"langs",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"lengths",val:" = None"},{name:"cache",val:" = None"},{name:"head_mask",val:" = None"},{name:"inputs_embeds",val:" = None"},{name:"output_attentions",val:" = None"},{name:"output_hidden_states",val:" = None"},{name:"return_dict",val:" = None"},{name:"training",val:" = False"}],parametersDescription:[{anchor:"transformers.TFXLMModel.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLMModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFXLMModel.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFXLMModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFXLMModel.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFXLMModel.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.TFXLMModel.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFXLMModel.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.TFXLMModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</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.TFXLMModel.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFXLMModel.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFXLMModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFXLMModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_tf_xlm.py#L700",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig"
>XLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</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>hidden_states</strong> (<code>tuple(tf.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>tf.Tensor</code> (one for the output of the embeddings + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFBaseModelOutput"
>transformers.modeling_tf_outputs.TFBaseModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),mn=new Ve({props:{$$slots:{default:[Wk]},$$scope:{ctx:q}}}),hn=new Ye({props:{anchor:"transformers.TFXLMModel.call.example",$$slots:{default:[Hk]},$$scope:{ctx:q}}}),na=new Ze({}),sa=new ae({props:{name:"class transformers.TFXLMWithLMHeadModel",anchor:"transformers.TFXLMWithLMHeadModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLMWithLMHeadModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig">XLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_tf_xlm.py#L807"}}),fn=new Ve({props:{$$slots:{default:[Qk]},$$scope:{ctx:q}}}),la=new ae({props:{name:"call",anchor:"transformers.TFXLMWithLMHeadModel.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"langs",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"lengths",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, tensorflow.python.framework.ops.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFXLMWithLMHeadModel.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLMWithLMHeadModel.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFXLMWithLMHeadModel.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFXLMWithLMHeadModel.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFXLMWithLMHeadModel.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFXLMWithLMHeadModel.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.TFXLMWithLMHeadModel.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFXLMWithLMHeadModel.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.TFXLMWithLMHeadModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</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.TFXLMWithLMHeadModel.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFXLMWithLMHeadModel.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFXLMWithLMHeadModel.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFXLMWithLMHeadModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_tf_xlm.py#L836",returnDescription:`
<p>A <code>transformers.models.xlm.modeling_tf_xlm.TFXLMWithLMHeadModelOutput</code> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig"
>XLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</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(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</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><code>transformers.models.xlm.modeling_tf_xlm.TFXLMWithLMHeadModelOutput</code> or <code>tuple(tf.Tensor)</code></p>
`}}),gn=new Ve({props:{$$slots:{default:[Uk]},$$scope:{ctx:q}}}),_n=new Ye({props:{anchor:"transformers.TFXLMWithLMHeadModel.call.example",$$slots:{default:[Bk]},$$scope:{ctx:q}}}),da=new Ze({}),ca=new ae({props:{name:"class transformers.TFXLMForSequenceClassification",anchor:"transformers.TFXLMForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLMForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig">XLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_tf_xlm.py#L899"}}),kn=new Ve({props:{$$slots:{default:[Kk]},$$scope:{ctx:q}}}),ua=new ae({props:{name:"call",anchor:"transformers.TFXLMForSequenceClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"langs",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"lengths",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, tensorflow.python.framework.ops.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFXLMForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLMForSequenceClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFXLMForSequenceClassification.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFXLMForSequenceClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFXLMForSequenceClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFXLMForSequenceClassification.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.TFXLMForSequenceClassification.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFXLMForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.TFXLMForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</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.TFXLMForSequenceClassification.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFXLMForSequenceClassification.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFXLMForSequenceClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFXLMForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFXLMForSequenceClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_tf_xlm.py#L907",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig"
>XLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</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>tf.Tensor</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(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFSequenceClassifierOutput"
>transformers.modeling_tf_outputs.TFSequenceClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),bn=new Ve({props:{$$slots:{default:[Rk]},$$scope:{ctx:q}}}),wn=new Ye({props:{anchor:"transformers.TFXLMForSequenceClassification.call.example",$$slots:{default:[Vk]},$$scope:{ctx:q}}}),Tn=new Ye({props:{anchor:"transformers.TFXLMForSequenceClassification.call.example-2",$$slots:{default:[Yk]},$$scope:{ctx:q}}}),fa=new Ze({}),ga=new ae({props:{name:"class transformers.TFXLMForMultipleChoice",anchor:"transformers.TFXLMForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLMForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig">XLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_tf_xlm.py#L984"}}),Mn=new Ve({props:{$$slots:{default:[Gk]},$$scope:{ctx:q}}}),ba=new ae({props:{name:"call",anchor:"transformers.TFXLMForMultipleChoice.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"langs",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"lengths",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, tensorflow.python.framework.ops.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFXLMForMultipleChoice.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLMForMultipleChoice.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFXLMForMultipleChoice.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFXLMForMultipleChoice.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFXLMForMultipleChoice.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFXLMForMultipleChoice.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.TFXLMForMultipleChoice.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFXLMForMultipleChoice.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.TFXLMForMultipleChoice.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</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.TFXLMForMultipleChoice.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFXLMForMultipleChoice.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFXLMForMultipleChoice.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFXLMForMultipleChoice.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_tf_xlm.py#L1013",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig"
>XLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, )</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</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(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput"
>transformers.modeling_tf_outputs.TFMultipleChoiceModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),$n=new Ve({props:{$$slots:{default:[Jk]},$$scope:{ctx:q}}}),Ln=new Ye({props:{anchor:"transformers.TFXLMForMultipleChoice.call.example",$$slots:{default:[Zk]},$$scope:{ctx:q}}}),wa=new Ze({}),Ta=new ae({props:{name:"class transformers.TFXLMForTokenClassification",anchor:"transformers.TFXLMForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLMForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig">XLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_tf_xlm.py#L1125"}}),Fn=new Ve({props:{$$slots:{default:[eb]},$$scope:{ctx:q}}}),La=new ae({props:{name:"call",anchor:"transformers.TFXLMForTokenClassification.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"langs",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"lengths",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, tensorflow.python.framework.ops.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFXLMForTokenClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLMForTokenClassification.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFXLMForTokenClassification.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFXLMForTokenClassification.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFXLMForTokenClassification.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFXLMForTokenClassification.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.TFXLMForTokenClassification.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFXLMForTokenClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.TFXLMForTokenClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</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.TFXLMForTokenClassification.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFXLMForTokenClassification.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFXLMForTokenClassification.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFXLMForTokenClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFXLMForTokenClassification.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_tf_xlm.py#L1136",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig"
>XLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(n,)</code>, <em>optional</em>, where n is the number of unmasked labels, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</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(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFTokenClassifierOutput"
>transformers.modeling_tf_outputs.TFTokenClassifierOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),En=new Ve({props:{$$slots:{default:[tb]},$$scope:{ctx:q}}}),Xn=new Ye({props:{anchor:"transformers.TFXLMForTokenClassification.call.example",$$slots:{default:[ob]},$$scope:{ctx:q}}}),qn=new Ye({props:{anchor:"transformers.TFXLMForTokenClassification.call.example-2",$$slots:{default:[nb]},$$scope:{ctx:q}}}),xa=new Ze({}),Fa=new ae({props:{name:"class transformers.TFXLMForQuestionAnsweringSimple",anchor:"transformers.TFXLMForQuestionAnsweringSimple",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLMForQuestionAnsweringSimple.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig">XLMConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_tf_xlm.py#L1212"}}),Cn=new Ve({props:{$$slots:{default:[sb]},$$scope:{ctx:q}}}),za=new ae({props:{name:"call",anchor:"transformers.TFXLMForQuestionAnsweringSimple.call",parameters:[{name:"input_ids",val:": typing.Union[typing.List[tensorflow.python.framework.ops.Tensor], typing.List[numpy.ndarray], typing.List[keras.engine.keras_tensor.KerasTensor], typing.Dict[str, tensorflow.python.framework.ops.Tensor], typing.Dict[str, numpy.ndarray], typing.Dict[str, keras.engine.keras_tensor.KerasTensor], tensorflow.python.framework.ops.Tensor, numpy.ndarray, keras.engine.keras_tensor.KerasTensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"langs",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"position_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"lengths",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"cache",val:": typing.Union[typing.Dict[str, tensorflow.python.framework.ops.Tensor], NoneType] = None"},{name:"head_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"inputs_embeds",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = 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"},{name:"start_positions",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"end_positions",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFXLMForQuestionAnsweringSimple.call.input_ids",description:`<strong>input_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/main/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLMForQuestionAnsweringSimple.call.attention_mask",description:`<strong>attention_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</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>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.TFXLMForQuestionAnsweringSimple.call.langs",description:`<strong>langs</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
A parallel sequence of tokens to be used to indicate the language of each token in the input. Indices are
languages ids which can be obtained from the language names by using two conversion mappings provided in
the configuration of the model (only provided for multilingual models). More precisely, the <em>language name
to language id</em> mapping is in <code>model.config.lang2id</code> (which is a dictionary string to int) and the
<em>language id to language name</em> mapping is in <code>model.config.id2lang</code> (dictionary int to string).</p>
<p>See usage examples detailed in the <a href="../multilingual">multilingual documentation</a>.`,name:"langs"},{anchor:"transformers.TFXLMForQuestionAnsweringSimple.call.token_type_ids",description:`<strong>token_type_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.TFXLMForQuestionAnsweringSimple.call.position_ids",description:`<strong>position_ids</strong> (<code>Numpy array</code> or <code>tf.Tensor</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>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.TFXLMForQuestionAnsweringSimple.call.lengths",description:`<strong>lengths</strong> (<code>tf.Tensor</code> or <code>Numpy array</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Length of each sentence that can be used to avoid performing attention on padding token indices. You can
also use <em>attention_mask</em> for the same result (see above), kept here for compatibility. Indices selected in
<code>[0, ..., input_ids.size(-1)]</code>.`,name:"lengths"},{anchor:"transformers.TFXLMForQuestionAnsweringSimple.call.cache",description:`<strong>cache</strong> (<code>Dict[str, tf.Tensor]</code>, <em>optional</em>) &#x2014;
Dictionary string to <code>torch.FloatTensor</code> that contains precomputed hidden states (key and values in the
attention blocks) as computed by the model (see <code>cache</code> output below). Can be used to speed up sequential
decoding.</p>
<p>The dictionary object will be modified in-place during the forward pass to add newly computed
hidden-states.`,name:"cache"},{anchor:"transformers.TFXLMForQuestionAnsweringSimple.call.head_mask",description:`<strong>head_mask</strong> (<code>Numpy array</code> or <code>tf.Tensor</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.TFXLMForQuestionAnsweringSimple.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</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.TFXLMForQuestionAnsweringSimple.call.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. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFXLMForQuestionAnsweringSimple.call.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. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFXLMForQuestionAnsweringSimple.call.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFXLMForQuestionAnsweringSimple.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFXLMForQuestionAnsweringSimple.call.start_positions",description:`<strong>start_positions</strong> (<code>tf.Tensor</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.TFXLMForQuestionAnsweringSimple.call.end_positions",description:`<strong>end_positions</strong> (<code>tf.Tensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/xlm/modeling_tf_xlm.py#L1220",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/main/en/model_doc/xlm#transformers.XLMConfig"
>XLMConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, )</code>, <em>optional</em>, returned when <code>start_positions</code> and <code>end_positions</code> are 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>tf.Tensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>tf.Tensor</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(tf.Tensor)</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>tf.Tensor</code> (one for the output of the embeddings + 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 initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(tf.Tensor)</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>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput"
>transformers.modeling_tf_outputs.TFQuestionAnsweringModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),jn=new Ve({props:{$$slots:{default:[ab]},$$scope:{ctx:q}}}),An=new Ye({props:{anchor:"transformers.TFXLMForQuestionAnsweringSimple.call.example",$$slots:{default:[rb]},$$scope:{ctx:q}}}),Nn=new Ye({props:{anchor:"transformers.TFXLMForQuestionAnsweringSimple.call.example-2",$$slots:{default:[ib]},$$scope:{ctx:q}}}),{c(){d=a("meta"),b=p(),h=a("h1"),u=a("a"),k=a("span"),T(l.$$.fragment),c=p(),X=a("span"),be=o("XLM"),he=p(),S=a("h2"),re=a("a"),Z=a("span"),T(w.$$.fragment),we=p(),U=a("span"),Te=o("Overview"),ue=p(),W=a("p"),ve=o("The XLM model was proposed in "),le=a("a"),V=o("Cross-lingual Language Model Pretraining"),Me=o(` by
Guillaume Lample, Alexis Conneau. It\u2019s a transformer pretrained using one of the following objectives:`),fe=p(),D=a("ul"),ce=a("li"),$e=o("a causal language modeling (CLM) objective (next token prediction),"),Y=p(),pe=a("li"),Le=o("a masked language modeling (MLM) objective (BERT-like), or"),oe=p(),z=a("li"),A=o("a Translation Language Modeling (TLM) object (extension of BERT\u2019s MLM to multiple language inputs)"),ge=p(),H=a("p"),xe=o("The abstract from the paper is the following:"),_e=p(),Q=a("p"),me=a("em"),Fe=o(`Recent studies have demonstrated the efficiency of generative pretraining for English natural language understanding.
In this work, we extend this approach to multiple languages and show the effectiveness of cross-lingual pretraining. We
propose two methods to learn cross-lingual language models (XLMs): one unsupervised that only relies on monolingual
data, and one supervised that leverages parallel data with a new cross-lingual language model objective. We obtain
state-of-the-art results on cross-lingual classification, unsupervised and supervised machine translation. On XNLI, our
approach pushes the state of the art by an absolute gain of 4.9% accuracy. On unsupervised machine translation, we
obtain 34.3 BLEU on WMT\u201916 German-English, improving the previous state of the art by more than 9 BLEU. On supervised
machine translation, we obtain a new state of the art of 38.5 BLEU on WMT\u201916 Romanian-English, outperforming the
previous best approach by more than 4 BLEU. Our code and pretrained models will be made publicly available.`),j=p(),de=a("p"),G=o("Tips:"),ye=p(),ie=a("ul"),B=a("li"),Ee=o(`XLM has many different checkpoints, which were trained using different objectives: CLM, MLM or TLM. Make sure to
select the correct objective for your task (e.g. MLM checkpoints are not suitable for generation).`),Xe=p(),N=a("li"),qe=o("XLM has multilingual checkpoints which leverage a specific "),K=a("code"),ze=o("lang"),ne=o(" parameter. Check out the "),C=a("a"),Ce=o("multi-lingual"),P=o(" page for more information."),ke=p(),te=a("p"),g=o("This model was contributed by "),F=a("a"),We=o("thomwolf"),se=o(". The original code can be found "),Ne=a("a"),He=o("here"),E=o("."),Se=p(),je=a("h2"),Ae=a("a"),De=a("span"),T(Pe.$$.fragment),I=p(),R=a("span"),Qe=o("XLMConfig"),Ie=p(),O=a("div"),T(Oe.$$.fragment),Ue=p(),ee=a("p"),Be=o("This is the configuration class to store the configuration of a "),J=a("a"),Ke=o("XLMModel"),oc=o(" or a "),Oa=a("a"),nc=o("TFXLMModel"),sc=o(`. It is used to
instantiate a XLM 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
`),Rn=a("a"),ac=o("xlm-mlm-en-2048"),rc=o(" architecture."),ic=p(),Gt=a("p"),lc=o("Configuration objects inherit from "),Da=a("a"),dc=o("PretrainedConfig"),cc=o(` and can be used to control the model outputs. Read the
documentation from `),Sa=a("a"),pc=o("PretrainedConfig"),mc=o(" for more information."),hc=p(),T(No.$$.fragment),Xl=p(),Jt=a("h2"),Po=a("a"),Ar=a("span"),T(Vn.$$.fragment),uc=p(),Nr=a("span"),fc=o("XLMTokenizer"),ql=p(),Re=a("div"),T(Yn.$$.fragment),gc=p(),Pr=a("p"),_c=o("Construct an XLM tokenizer. Based on Byte-Pair Encoding. The tokenization process is the following:"),yc=p(),it=a("ul"),Or=a("li"),kc=o("Moses preprocessing and tokenization for most supported languages."),bc=p(),Dr=a("li"),wc=o("Language specific tokenization for Chinese (Jieba), Japanese (KyTea) and Thai (PyThaiNLP)."),Tc=p(),Sr=a("li"),vc=o("Optionally lowercases and normalizes all inputs text."),Mc=p(),Nt=a("li"),$c=o("The arguments "),Ir=a("code"),Lc=o("special_tokens"),xc=o(" and the function "),Wr=a("code"),Fc=o("set_special_tokens"),Ec=o(`, can be used to add additional symbols (like
\u201D`),Hr=a("strong"),Xc=o("classify"),qc=o("\u201D) to a vocabulary."),zc=p(),Gn=a("li"),Cc=o("The "),Qr=a("code"),jc=o("lang2id"),Ac=o(` attribute maps the languages supported by the model with their IDs if provided (automatically set
for pretrained vocabularies).`),Nc=p(),Jn=a("li"),Pc=o("The "),Ur=a("code"),Oc=o("id2lang"),Dc=o(" attributes does reverse mapping if provided (automatically set for pretrained vocabularies)."),Sc=p(),Zn=a("p"),Ic=o("This tokenizer inherits from "),Ia=a("a"),Wc=o("PreTrainedTokenizer"),Hc=o(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Qc=p(),Dt=a("div"),T(es.$$.fragment),Uc=p(),Br=a("p"),Bc=o(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLM sequence has the following format:`),Kc=p(),ts=a("ul"),Wa=a("li"),Rc=o("single sequence: "),Kr=a("code"),Vc=o("<s> X </s>"),Yc=p(),Ha=a("li"),Gc=o("pair of sequences: "),Rr=a("code"),Jc=o("<s> A </s> B </s>"),Zc=p(),Oo=a("div"),T(os.$$.fragment),ep=p(),ns=a("p"),tp=o(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Vr=a("code"),op=o("prepare_for_model"),np=o(" method."),sp=p(),kt=a("div"),T(ss.$$.fragment),ap=p(),Yr=a("p"),rp=o("Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLM sequence"),ip=p(),T(Do.$$.fragment),lp=p(),Zt=a("p"),dp=o("If "),Gr=a("code"),cp=o("token_ids_1"),pp=o(" is "),Jr=a("code"),mp=o("None"),hp=o(", this method only returns the first portion of the mask (0s)."),up=p(),Qa=a("div"),T(as.$$.fragment),zl=p(),eo=a("h2"),So=a("a"),Zr=a("span"),T(rs.$$.fragment),fp=p(),ei=a("span"),gp=o("XLM specific outputs"),Cl=p(),to=a("div"),T(is.$$.fragment),_p=p(),ls=a("p"),yp=o("Base class for outputs of question answering models using a "),ti=a("code"),kp=o("SquadHead"),bp=o("."),jl=p(),oo=a("h2"),Io=a("a"),oi=a("span"),T(ds.$$.fragment),wp=p(),ni=a("span"),Tp=o("XLMModel"),Al=p(),lt=a("div"),T(cs.$$.fragment),vp=p(),si=a("p"),Mp=o("The bare XLM Model transformer outputting raw hidden-states without any specific head on top."),$p=p(),ps=a("p"),Lp=o("This model inherits from "),Ua=a("a"),xp=o("PreTrainedModel"),Fp=o(`. 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.)`),Ep=p(),ms=a("p"),Xp=o("This model is also a PyTorch "),hs=a("a"),qp=o("torch.nn.Module"),zp=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Cp=p(),bt=a("div"),T(us.$$.fragment),jp=p(),no=a("p"),Ap=o("The "),Ba=a("a"),Np=o("XLMModel"),Pp=o(" forward method, overrides the "),ai=a("code"),Op=o("__call__"),Dp=o(" special method."),Sp=p(),T(Wo.$$.fragment),Ip=p(),T(Ho.$$.fragment),Nl=p(),so=a("h2"),Qo=a("a"),ri=a("span"),T(fs.$$.fragment),Wp=p(),ii=a("span"),Hp=o("XLMWithLMHeadModel"),Pl=p(),dt=a("div"),T(gs.$$.fragment),Qp=p(),li=a("p"),Up=o(`The XLM Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),Bp=p(),_s=a("p"),Kp=o("This model inherits from "),Ka=a("a"),Rp=o("PreTrainedModel"),Vp=o(`. 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.)`),Yp=p(),ys=a("p"),Gp=o("This model is also a PyTorch "),ks=a("a"),Jp=o("torch.nn.Module"),Zp=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),em=p(),wt=a("div"),T(bs.$$.fragment),tm=p(),ao=a("p"),om=o("The "),Ra=a("a"),nm=o("XLMWithLMHeadModel"),sm=o(" forward method, overrides the "),di=a("code"),am=o("__call__"),rm=o(" special method."),im=p(),T(Uo.$$.fragment),lm=p(),T(Bo.$$.fragment),Ol=p(),ro=a("h2"),Ko=a("a"),ci=a("span"),T(ws.$$.fragment),dm=p(),pi=a("span"),cm=o("XLMForSequenceClassification"),Dl=p(),ct=a("div"),T(Ts.$$.fragment),pm=p(),mi=a("p"),mm=o(`XLM Model with a sequence classification/regression head on top (a linear layer on top of the pooled output) e.g.
for GLUE tasks.`),hm=p(),vs=a("p"),um=o("This model inherits from "),Va=a("a"),fm=o("PreTrainedModel"),gm=o(`. 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.)`),_m=p(),Ms=a("p"),ym=o("This model is also a PyTorch "),$s=a("a"),km=o("torch.nn.Module"),bm=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),wm=p(),ft=a("div"),T(Ls.$$.fragment),Tm=p(),io=a("p"),vm=o("The "),Ya=a("a"),Mm=o("XLMForSequenceClassification"),$m=o(" forward method, overrides the "),hi=a("code"),Lm=o("__call__"),xm=o(" special method."),Fm=p(),T(Ro.$$.fragment),Em=p(),T(Vo.$$.fragment),Xm=p(),T(Yo.$$.fragment),Sl=p(),lo=a("h2"),Go=a("a"),ui=a("span"),T(xs.$$.fragment),qm=p(),fi=a("span"),zm=o("XLMForMultipleChoice"),Il=p(),pt=a("div"),T(Fs.$$.fragment),Cm=p(),gi=a("p"),jm=o(`XLM 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.`),Am=p(),Es=a("p"),Nm=o("This model inherits from "),Ga=a("a"),Pm=o("PreTrainedModel"),Om=o(`. 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.)`),Dm=p(),Xs=a("p"),Sm=o("This model is also a PyTorch "),qs=a("a"),Im=o("torch.nn.Module"),Wm=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Hm=p(),Tt=a("div"),T(zs.$$.fragment),Qm=p(),co=a("p"),Um=o("The "),Ja=a("a"),Bm=o("XLMForMultipleChoice"),Km=o(" forward method, overrides the "),_i=a("code"),Rm=o("__call__"),Vm=o(" special method."),Ym=p(),T(Jo.$$.fragment),Gm=p(),T(Zo.$$.fragment),Wl=p(),po=a("h2"),en=a("a"),yi=a("span"),T(Cs.$$.fragment),Jm=p(),ki=a("span"),Zm=o("XLMForTokenClassification"),Hl=p(),mt=a("div"),T(js.$$.fragment),eh=p(),bi=a("p"),th=o(`XLM 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.`),oh=p(),As=a("p"),nh=o("This model inherits from "),Za=a("a"),sh=o("PreTrainedModel"),ah=o(`. 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.)`),rh=p(),Ns=a("p"),ih=o("This model is also a PyTorch "),Ps=a("a"),lh=o("torch.nn.Module"),dh=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ch=p(),vt=a("div"),T(Os.$$.fragment),ph=p(),mo=a("p"),mh=o("The "),er=a("a"),hh=o("XLMForTokenClassification"),uh=o(" forward method, overrides the "),wi=a("code"),fh=o("__call__"),gh=o(" special method."),_h=p(),T(tn.$$.fragment),yh=p(),T(on.$$.fragment),Ql=p(),ho=a("h2"),nn=a("a"),Ti=a("span"),T(Ds.$$.fragment),kh=p(),vi=a("span"),bh=o("XLMForQuestionAnsweringSimple"),Ul=p(),ht=a("div"),T(Ss.$$.fragment),wh=p(),uo=a("p"),Th=o(`XLM 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 `),Mi=a("code"),vh=o("span start logits"),Mh=o(" and "),$i=a("code"),$h=o("span end logits"),Lh=o(")."),xh=p(),Is=a("p"),Fh=o("This model inherits from "),tr=a("a"),Eh=o("PreTrainedModel"),Xh=o(`. 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.)`),qh=p(),Ws=a("p"),zh=o("This model is also a PyTorch "),Hs=a("a"),Ch=o("torch.nn.Module"),jh=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ah=p(),Mt=a("div"),T(Qs.$$.fragment),Nh=p(),fo=a("p"),Ph=o("The "),or=a("a"),Oh=o("XLMForQuestionAnsweringSimple"),Dh=o(" forward method, overrides the "),Li=a("code"),Sh=o("__call__"),Ih=o(" special method."),Wh=p(),T(sn.$$.fragment),Hh=p(),T(an.$$.fragment),Bl=p(),go=a("h2"),rn=a("a"),xi=a("span"),T(Us.$$.fragment),Qh=p(),Fi=a("span"),Uh=o("XLMForQuestionAnswering"),Kl=p(),ut=a("div"),T(Bs.$$.fragment),Bh=p(),_o=a("p"),Kh=o(`XLM Model with a beam-search span classification head on top for extractive question-answering tasks like SQuAD (a
linear layers on top of the hidden-states output to compute `),Ei=a("code"),Rh=o("span start logits"),Vh=o(" and "),Xi=a("code"),Yh=o("span end logits"),Gh=o(")."),Jh=p(),Ks=a("p"),Zh=o("This model inherits from "),nr=a("a"),eu=o("PreTrainedModel"),tu=o(`. 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.)`),ou=p(),Rs=a("p"),nu=o("This model is also a PyTorch "),Vs=a("a"),su=o("torch.nn.Module"),au=o(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ru=p(),$t=a("div"),T(Ys.$$.fragment),iu=p(),yo=a("p"),lu=o("The "),sr=a("a"),du=o("XLMForQuestionAnswering"),cu=o(" forward method, overrides the "),qi=a("code"),pu=o("__call__"),mu=o(" special method."),hu=p(),T(ln.$$.fragment),uu=p(),T(dn.$$.fragment),Rl=p(),ko=a("h2"),cn=a("a"),zi=a("span"),T(Gs.$$.fragment),fu=p(),Ci=a("span"),gu=o("TFXLMModel"),Vl=p(),et=a("div"),T(Js.$$.fragment),_u=p(),ji=a("p"),yu=o("The bare XLM Model transformer outputting raw hidden-states without any specific head on top."),ku=p(),Zs=a("p"),bu=o("This model inherits from "),ar=a("a"),wu=o("TFPreTrainedModel"),Tu=o(`. 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.)`),vu=p(),ea=a("p"),Mu=o("This model is also a "),ta=a("a"),$u=o("tf.keras.Model"),Lu=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),xu=p(),T(pn.$$.fragment),Fu=p(),Lt=a("div"),T(oa.$$.fragment),Eu=p(),bo=a("p"),Xu=o("The "),rr=a("a"),qu=o("TFXLMModel"),zu=o(" forward method, overrides the "),Ai=a("code"),Cu=o("__call__"),ju=o(" special method."),Au=p(),T(mn.$$.fragment),Nu=p(),T(hn.$$.fragment),Yl=p(),wo=a("h2"),un=a("a"),Ni=a("span"),T(na.$$.fragment),Pu=p(),Pi=a("span"),Ou=o("TFXLMWithLMHeadModel"),Gl=p(),tt=a("div"),T(sa.$$.fragment),Du=p(),Oi=a("p"),Su=o(`The XLM Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),Iu=p(),aa=a("p"),Wu=o("This model inherits from "),ir=a("a"),Hu=o("TFPreTrainedModel"),Qu=o(`. 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.)`),Uu=p(),ra=a("p"),Bu=o("This model is also a "),ia=a("a"),Ku=o("tf.keras.Model"),Ru=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Vu=p(),T(fn.$$.fragment),Yu=p(),xt=a("div"),T(la.$$.fragment),Gu=p(),To=a("p"),Ju=o("The "),lr=a("a"),Zu=o("TFXLMWithLMHeadModel"),ef=o(" forward method, overrides the "),Di=a("code"),tf=o("__call__"),of=o(" special method."),nf=p(),T(gn.$$.fragment),sf=p(),T(_n.$$.fragment),Jl=p(),vo=a("h2"),yn=a("a"),Si=a("span"),T(da.$$.fragment),af=p(),Ii=a("span"),rf=o("TFXLMForSequenceClassification"),Zl=p(),ot=a("div"),T(ca.$$.fragment),lf=p(),Wi=a("p"),df=o(`XLM Model with a sequence classification/regression head on top (a linear layer on top of the pooled output) e.g.
for GLUE tasks.`),cf=p(),pa=a("p"),pf=o("This model inherits from "),dr=a("a"),mf=o("TFPreTrainedModel"),hf=o(`. 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.)`),uf=p(),ma=a("p"),ff=o("This model is also a "),ha=a("a"),gf=o("tf.keras.Model"),_f=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),yf=p(),T(kn.$$.fragment),kf=p(),gt=a("div"),T(ua.$$.fragment),bf=p(),Mo=a("p"),wf=o("The "),cr=a("a"),Tf=o("TFXLMForSequenceClassification"),vf=o(" forward method, overrides the "),Hi=a("code"),Mf=o("__call__"),$f=o(" special method."),Lf=p(),T(bn.$$.fragment),xf=p(),T(wn.$$.fragment),Ff=p(),T(Tn.$$.fragment),ed=p(),$o=a("h2"),vn=a("a"),Qi=a("span"),T(fa.$$.fragment),Ef=p(),Ui=a("span"),Xf=o("TFXLMForMultipleChoice"),td=p(),nt=a("div"),T(ga.$$.fragment),qf=p(),Bi=a("p"),zf=o(`XLM 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.`),Cf=p(),_a=a("p"),jf=o("This model inherits from "),pr=a("a"),Af=o("TFPreTrainedModel"),Nf=o(`. 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.)`),Pf=p(),ya=a("p"),Of=o("This model is also a "),ka=a("a"),Df=o("tf.keras.Model"),Sf=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),If=p(),T(Mn.$$.fragment),Wf=p(),Ft=a("div"),T(ba.$$.fragment),Hf=p(),Lo=a("p"),Qf=o("The "),mr=a("a"),Uf=o("TFXLMForMultipleChoice"),Bf=o(" forward method, overrides the "),Ki=a("code"),Kf=o("__call__"),Rf=o(" special method."),Vf=p(),T($n.$$.fragment),Yf=p(),T(Ln.$$.fragment),od=p(),xo=a("h2"),xn=a("a"),Ri=a("span"),T(wa.$$.fragment),Gf=p(),Vi=a("span"),Jf=o("TFXLMForTokenClassification"),nd=p(),st=a("div"),T(Ta.$$.fragment),Zf=p(),Yi=a("p"),eg=o(`XLM 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.`),tg=p(),va=a("p"),og=o("This model inherits from "),hr=a("a"),ng=o("TFPreTrainedModel"),sg=o(`. 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.)`),ag=p(),Ma=a("p"),rg=o("This model is also a "),$a=a("a"),ig=o("tf.keras.Model"),lg=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),dg=p(),T(Fn.$$.fragment),cg=p(),_t=a("div"),T(La.$$.fragment),pg=p(),Fo=a("p"),mg=o("The "),ur=a("a"),hg=o("TFXLMForTokenClassification"),ug=o(" forward method, overrides the "),Gi=a("code"),fg=o("__call__"),gg=o(" special method."),_g=p(),T(En.$$.fragment),yg=p(),T(Xn.$$.fragment),kg=p(),T(qn.$$.fragment),sd=p(),Eo=a("h2"),zn=a("a"),Ji=a("span"),T(xa.$$.fragment),bg=p(),Zi=a("span"),wg=o("TFXLMForQuestionAnsweringSimple"),ad=p(),at=a("div"),T(Fa.$$.fragment),Tg=p(),Xo=a("p"),vg=o(`XLM Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear layer
on top of the hidden-states output to compute `),el=a("code"),Mg=o("span start logits"),$g=o(" and "),tl=a("code"),Lg=o("span end logits"),xg=o(")."),Fg=p(),Ea=a("p"),Eg=o("This model inherits from "),fr=a("a"),Xg=o("TFPreTrainedModel"),qg=o(`. 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.)`),zg=p(),Xa=a("p"),Cg=o("This model is also a "),qa=a("a"),jg=o("tf.keras.Model"),Ag=o(` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Ng=p(),T(Cn.$$.fragment),Pg=p(),yt=a("div"),T(za.$$.fragment),Og=p(),qo=a("p"),Dg=o("The "),gr=a("a"),Sg=o("TFXLMForQuestionAnsweringSimple"),Ig=o(" forward method, overrides the "),ol=a("code"),Wg=o("__call__"),Hg=o(" special method."),Qg=p(),T(jn.$$.fragment),Ug=p(),T(An.$$.fragment),Bg=p(),T(Nn.$$.fragment),this.h()},l(s){const y=Tk('[data-svelte="svelte-1phssyn"]',document.head);d=r(y,"META",{name:!0,content:!0}),y.forEach(t),b=m(s),h=r(s,"H1",{class:!0});var Ca=i(h);u=r(Ca,"A",{id:!0,class:!0,href:!0});var nl=i(u);k=r(nl,"SPAN",{});var sl=i(k);v(l.$$.fragment,sl),sl.forEach(t),nl.forEach(t),c=m(Ca),X=r(Ca,"SPAN",{});var al=i(X);be=n(al,"XLM"),al.forEach(t),Ca.forEach(t),he=m(s),S=r(s,"H2",{class:!0});var ja=i(S);re=r(ja,"A",{id:!0,class:!0,href:!0});var rl=i(re);Z=r(rl,"SPAN",{});var il=i(Z);v(w.$$.fragment,il),il.forEach(t),rl.forEach(t),we=m(ja),U=r(ja,"SPAN",{});var ll=i(U);Te=n(ll,"Overview"),ll.forEach(t),ja.forEach(t),ue=m(s),W=r(s,"P",{});var Aa=i(W);ve=n(Aa,"The XLM model was proposed in "),le=r(Aa,"A",{href:!0,rel:!0});var dl=i(le);V=n(dl,"Cross-lingual Language Model Pretraining"),dl.forEach(t),Me=n(Aa,` by
Guillaume Lample, Alexis Conneau. It\u2019s a transformer pretrained using one of the following objectives:`),Aa.forEach(t),fe=m(s),D=r(s,"UL",{});var zo=i(D);ce=r(zo,"LI",{});var cl=i(ce);$e=n(cl,"a causal language modeling (CLM) objective (next token prediction),"),cl.forEach(t),Y=m(zo),pe=r(zo,"LI",{});var pl=i(pe);Le=n(pl,"a masked language modeling (MLM) objective (BERT-like), or"),pl.forEach(t),oe=m(zo),z=r(zo,"LI",{});var ml=i(z);A=n(ml,"a Translation Language Modeling (TLM) object (extension of BERT\u2019s MLM to multiple language inputs)"),ml.forEach(t),zo.forEach(t),ge=m(s),H=r(s,"P",{});var hl=i(H);xe=n(hl,"The abstract from the paper is the following:"),hl.forEach(t),_e=m(s),Q=r(s,"P",{});var ul=i(Q);me=r(ul,"EM",{});var fl=i(me);Fe=n(fl,`Recent studies have demonstrated the efficiency of generative pretraining for English natural language understanding.
In this work, we extend this approach to multiple languages and show the effectiveness of cross-lingual pretraining. We
propose two methods to learn cross-lingual language models (XLMs): one unsupervised that only relies on monolingual
data, and one supervised that leverages parallel data with a new cross-lingual language model objective. We obtain
state-of-the-art results on cross-lingual classification, unsupervised and supervised machine translation. On XNLI, our
approach pushes the state of the art by an absolute gain of 4.9% accuracy. On unsupervised machine translation, we
obtain 34.3 BLEU on WMT\u201916 German-English, improving the previous state of the art by more than 9 BLEU. On supervised
machine translation, we obtain a new state of the art of 38.5 BLEU on WMT\u201916 Romanian-English, outperforming the
previous best approach by more than 4 BLEU. Our code and pretrained models will be made publicly available.`),fl.forEach(t),ul.forEach(t),j=m(s),de=r(s,"P",{});var gl=i(de);G=n(gl,"Tips:"),gl.forEach(t),ye=m(s),ie=r(s,"UL",{});var Na=i(ie);B=r(Na,"LI",{});var _l=i(B);Ee=n(_l,`XLM has many different checkpoints, which were trained using different objectives: CLM, MLM or TLM. Make sure to
select the correct objective for your task (e.g. MLM checkpoints are not suitable for generation).`),_l.forEach(t),Xe=m(Na),N=r(Na,"LI",{});var Co=i(N);qe=n(Co,"XLM has multilingual checkpoints which leverage a specific "),K=r(Co,"CODE",{});var yl=i(K);ze=n(yl,"lang"),yl.forEach(t),ne=n(Co," parameter. Check out the "),C=r(Co,"A",{href:!0});var kl=i(C);Ce=n(kl,"multi-lingual"),kl.forEach(t),P=n(Co," page for more information."),Co.forEach(t),Na.forEach(t),ke=m(s),te=r(s,"P",{});var jo=i(te);g=n(jo,"This model was contributed by "),F=r(jo,"A",{href:!0,rel:!0});var bl=i(F);We=n(bl,"thomwolf"),bl.forEach(t),se=n(jo,". The original code can be found "),Ne=r(jo,"A",{href:!0,rel:!0});var wl=i(Ne);He=n(wl,"here"),wl.forEach(t),E=n(jo,"."),jo.forEach(t),Se=m(s),je=r(s,"H2",{class:!0});var Pa=i(je);Ae=r(Pa,"A",{id:!0,class:!0,href:!0});var Tl=i(Ae);De=r(Tl,"SPAN",{});var vl=i(De);v(Pe.$$.fragment,vl),vl.forEach(t),Tl.forEach(t),I=m(Pa),R=r(Pa,"SPAN",{});var Ml=i(R);Qe=n(Ml,"XLMConfig"),Ml.forEach(t),Pa.forEach(t),Ie=m(s),O=r(s,"DIV",{class:!0});var Pt=i(O);v(Oe.$$.fragment,Pt),Ue=m(Pt),ee=r(Pt,"P",{});var Ot=i(ee);Be=n(Ot,"This is the configuration class to store the configuration of a "),J=r(Ot,"A",{href:!0});var $l=i(J);Ke=n($l,"XLMModel"),$l.forEach(t),oc=n(Ot," or a "),Oa=r(Ot,"A",{href:!0});var Ll=i(Oa);nc=n(Ll,"TFXLMModel"),Ll.forEach(t),sc=n(Ot,`. It is used to
instantiate a XLM 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
`),Rn=r(Ot,"A",{href:!0,rel:!0});var xl=i(Rn);ac=n(xl,"xlm-mlm-en-2048"),xl.forEach(t),rc=n(Ot," architecture."),Ot.forEach(t),ic=m(Pt),Gt=r(Pt,"P",{});var Ao=i(Gt);lc=n(Ao,"Configuration objects inherit from "),Da=r(Ao,"A",{href:!0});var Fl=i(Da);dc=n(Fl,"PretrainedConfig"),Fl.forEach(t),cc=n(Ao,` and can be used to control the model outputs. Read the
documentation from `),Sa=r(Ao,"A",{href:!0});var El=i(Sa);pc=n(El,"PretrainedConfig"),El.forEach(t),mc=n(Ao," for more information."),Ao.forEach(t),hc=m(Pt),v(No.$$.fragment,Pt),Pt.forEach(t),Xl=m(s),Jt=r(s,"H2",{class:!0});var id=i(Jt);Po=r(id,"A",{id:!0,class:!0,href:!0});var Vg=i(Po);Ar=r(Vg,"SPAN",{});var Yg=i(Ar);v(Vn.$$.fragment,Yg),Yg.forEach(t),Vg.forEach(t),uc=m(id),Nr=r(id,"SPAN",{});var Gg=i(Nr);fc=n(Gg,"XLMTokenizer"),Gg.forEach(t),id.forEach(t),ql=m(s),Re=r(s,"DIV",{class:!0});var rt=i(Re);v(Yn.$$.fragment,rt),gc=m(rt),Pr=r(rt,"P",{});var Jg=i(Pr);_c=n(Jg,"Construct an XLM tokenizer. Based on Byte-Pair Encoding. The tokenization process is the following:"),Jg.forEach(t),yc=m(rt),it=r(rt,"UL",{});var Et=i(it);Or=r(Et,"LI",{});var Zg=i(Or);kc=n(Zg,"Moses preprocessing and tokenization for most supported languages."),Zg.forEach(t),bc=m(Et),Dr=r(Et,"LI",{});var e_=i(Dr);wc=n(e_,"Language specific tokenization for Chinese (Jieba), Japanese (KyTea) and Thai (PyThaiNLP)."),e_.forEach(t),Tc=m(Et),Sr=r(Et,"LI",{});var t_=i(Sr);vc=n(t_,"Optionally lowercases and normalizes all inputs text."),t_.forEach(t),Mc=m(Et),Nt=r(Et,"LI",{});var Pn=i(Nt);$c=n(Pn,"The arguments "),Ir=r(Pn,"CODE",{});var o_=i(Ir);Lc=n(o_,"special_tokens"),o_.forEach(t),xc=n(Pn," and the function "),Wr=r(Pn,"CODE",{});var n_=i(Wr);Fc=n(n_,"set_special_tokens"),n_.forEach(t),Ec=n(Pn,`, can be used to add additional symbols (like
\u201D`),Hr=r(Pn,"STRONG",{});var s_=i(Hr);Xc=n(s_,"classify"),s_.forEach(t),qc=n(Pn,"\u201D) to a vocabulary."),Pn.forEach(t),zc=m(Et),Gn=r(Et,"LI",{});var ld=i(Gn);Cc=n(ld,"The "),Qr=r(ld,"CODE",{});var a_=i(Qr);jc=n(a_,"lang2id"),a_.forEach(t),Ac=n(ld,` attribute maps the languages supported by the model with their IDs if provided (automatically set
for pretrained vocabularies).`),ld.forEach(t),Nc=m(Et),Jn=r(Et,"LI",{});var dd=i(Jn);Pc=n(dd,"The "),Ur=r(dd,"CODE",{});var r_=i(Ur);Oc=n(r_,"id2lang"),r_.forEach(t),Dc=n(dd," attributes does reverse mapping if provided (automatically set for pretrained vocabularies)."),dd.forEach(t),Et.forEach(t),Sc=m(rt),Zn=r(rt,"P",{});var cd=i(Zn);Ic=n(cd,"This tokenizer inherits from "),Ia=r(cd,"A",{href:!0});var i_=i(Ia);Wc=n(i_,"PreTrainedTokenizer"),i_.forEach(t),Hc=n(cd,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),cd.forEach(t),Qc=m(rt),Dt=r(rt,"DIV",{class:!0});var _r=i(Dt);v(es.$$.fragment,_r),Uc=m(_r),Br=r(_r,"P",{});var l_=i(Br);Bc=n(l_,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLM sequence has the following format:`),l_.forEach(t),Kc=m(_r),ts=r(_r,"UL",{});var pd=i(ts);Wa=r(pd,"LI",{});var Kg=i(Wa);Rc=n(Kg,"single sequence: "),Kr=r(Kg,"CODE",{});var d_=i(Kr);Vc=n(d_,"<s> X </s>"),d_.forEach(t),Kg.forEach(t),Yc=m(pd),Ha=r(pd,"LI",{});var Rg=i(Ha);Gc=n(Rg,"pair of sequences: "),Rr=r(Rg,"CODE",{});var c_=i(Rr);Jc=n(c_,"<s> A </s> B </s>"),c_.forEach(t),Rg.forEach(t),pd.forEach(t),_r.forEach(t),Zc=m(rt),Oo=r(rt,"DIV",{class:!0});var md=i(Oo);v(os.$$.fragment,md),ep=m(md),ns=r(md,"P",{});var hd=i(ns);tp=n(hd,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Vr=r(hd,"CODE",{});var p_=i(Vr);op=n(p_,"prepare_for_model"),p_.forEach(t),np=n(hd," method."),hd.forEach(t),md.forEach(t),sp=m(rt),kt=r(rt,"DIV",{class:!0});var On=i(kt);v(ss.$$.fragment,On),ap=m(On),Yr=r(On,"P",{});var m_=i(Yr);rp=n(m_,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLM sequence"),m_.forEach(t),ip=m(On),v(Do.$$.fragment,On),lp=m(On),Zt=r(On,"P",{});var yr=i(Zt);dp=n(yr,"If "),Gr=r(yr,"CODE",{});var h_=i(Gr);cp=n(h_,"token_ids_1"),h_.forEach(t),pp=n(yr," is "),Jr=r(yr,"CODE",{});var u_=i(Jr);mp=n(u_,"None"),u_.forEach(t),hp=n(yr,", this method only returns the first portion of the mask (0s)."),yr.forEach(t),On.forEach(t),up=m(rt),Qa=r(rt,"DIV",{class:!0});var f_=i(Qa);v(as.$$.fragment,f_),f_.forEach(t),rt.forEach(t),zl=m(s),eo=r(s,"H2",{class:!0});var ud=i(eo);So=r(ud,"A",{id:!0,class:!0,href:!0});var g_=i(So);Zr=r(g_,"SPAN",{});var __=i(Zr);v(rs.$$.fragment,__),__.forEach(t),g_.forEach(t),fp=m(ud),ei=r(ud,"SPAN",{});var y_=i(ei);gp=n(y_,"XLM specific outputs"),y_.forEach(t),ud.forEach(t),Cl=m(s),to=r(s,"DIV",{class:!0});var fd=i(to);v(is.$$.fragment,fd),_p=m(fd),ls=r(fd,"P",{});var gd=i(ls);yp=n(gd,"Base class for outputs of question answering models using a "),ti=r(gd,"CODE",{});var k_=i(ti);kp=n(k_,"SquadHead"),k_.forEach(t),bp=n(gd,"."),gd.forEach(t),fd.forEach(t),jl=m(s),oo=r(s,"H2",{class:!0});var _d=i(oo);Io=r(_d,"A",{id:!0,class:!0,href:!0});var b_=i(Io);oi=r(b_,"SPAN",{});var w_=i(oi);v(ds.$$.fragment,w_),w_.forEach(t),b_.forEach(t),wp=m(_d),ni=r(_d,"SPAN",{});var T_=i(ni);Tp=n(T_,"XLMModel"),T_.forEach(t),_d.forEach(t),Al=m(s),lt=r(s,"DIV",{class:!0});var St=i(lt);v(cs.$$.fragment,St),vp=m(St),si=r(St,"P",{});var v_=i(si);Mp=n(v_,"The bare XLM Model transformer outputting raw hidden-states without any specific head on top."),v_.forEach(t),$p=m(St),ps=r(St,"P",{});var yd=i(ps);Lp=n(yd,"This model inherits from "),Ua=r(yd,"A",{href:!0});var M_=i(Ua);xp=n(M_,"PreTrainedModel"),M_.forEach(t),Fp=n(yd,`. 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.)`),yd.forEach(t),Ep=m(St),ms=r(St,"P",{});var kd=i(ms);Xp=n(kd,"This model is also a PyTorch "),hs=r(kd,"A",{href:!0,rel:!0});var $_=i(hs);qp=n($_,"torch.nn.Module"),$_.forEach(t),zp=n(kd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),kd.forEach(t),Cp=m(St),bt=r(St,"DIV",{class:!0});var Dn=i(bt);v(us.$$.fragment,Dn),jp=m(Dn),no=r(Dn,"P",{});var kr=i(no);Ap=n(kr,"The "),Ba=r(kr,"A",{href:!0});var L_=i(Ba);Np=n(L_,"XLMModel"),L_.forEach(t),Pp=n(kr," forward method, overrides the "),ai=r(kr,"CODE",{});var x_=i(ai);Op=n(x_,"__call__"),x_.forEach(t),Dp=n(kr," special method."),kr.forEach(t),Sp=m(Dn),v(Wo.$$.fragment,Dn),Ip=m(Dn),v(Ho.$$.fragment,Dn),Dn.forEach(t),St.forEach(t),Nl=m(s),so=r(s,"H2",{class:!0});var bd=i(so);Qo=r(bd,"A",{id:!0,class:!0,href:!0});var F_=i(Qo);ri=r(F_,"SPAN",{});var E_=i(ri);v(fs.$$.fragment,E_),E_.forEach(t),F_.forEach(t),Wp=m(bd),ii=r(bd,"SPAN",{});var X_=i(ii);Hp=n(X_,"XLMWithLMHeadModel"),X_.forEach(t),bd.forEach(t),Pl=m(s),dt=r(s,"DIV",{class:!0});var It=i(dt);v(gs.$$.fragment,It),Qp=m(It),li=r(It,"P",{});var q_=i(li);Up=n(q_,`The XLM Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),q_.forEach(t),Bp=m(It),_s=r(It,"P",{});var wd=i(_s);Kp=n(wd,"This model inherits from "),Ka=r(wd,"A",{href:!0});var z_=i(Ka);Rp=n(z_,"PreTrainedModel"),z_.forEach(t),Vp=n(wd,`. 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.)`),wd.forEach(t),Yp=m(It),ys=r(It,"P",{});var Td=i(ys);Gp=n(Td,"This model is also a PyTorch "),ks=r(Td,"A",{href:!0,rel:!0});var C_=i(ks);Jp=n(C_,"torch.nn.Module"),C_.forEach(t),Zp=n(Td,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Td.forEach(t),em=m(It),wt=r(It,"DIV",{class:!0});var Sn=i(wt);v(bs.$$.fragment,Sn),tm=m(Sn),ao=r(Sn,"P",{});var br=i(ao);om=n(br,"The "),Ra=r(br,"A",{href:!0});var j_=i(Ra);nm=n(j_,"XLMWithLMHeadModel"),j_.forEach(t),sm=n(br," forward method, overrides the "),di=r(br,"CODE",{});var A_=i(di);am=n(A_,"__call__"),A_.forEach(t),rm=n(br," special method."),br.forEach(t),im=m(Sn),v(Uo.$$.fragment,Sn),lm=m(Sn),v(Bo.$$.fragment,Sn),Sn.forEach(t),It.forEach(t),Ol=m(s),ro=r(s,"H2",{class:!0});var vd=i(ro);Ko=r(vd,"A",{id:!0,class:!0,href:!0});var N_=i(Ko);ci=r(N_,"SPAN",{});var P_=i(ci);v(ws.$$.fragment,P_),P_.forEach(t),N_.forEach(t),dm=m(vd),pi=r(vd,"SPAN",{});var O_=i(pi);cm=n(O_,"XLMForSequenceClassification"),O_.forEach(t),vd.forEach(t),Dl=m(s),ct=r(s,"DIV",{class:!0});var Wt=i(ct);v(Ts.$$.fragment,Wt),pm=m(Wt),mi=r(Wt,"P",{});var D_=i(mi);mm=n(D_,`XLM Model with a sequence classification/regression head on top (a linear layer on top of the pooled output) e.g.
for GLUE tasks.`),D_.forEach(t),hm=m(Wt),vs=r(Wt,"P",{});var Md=i(vs);um=n(Md,"This model inherits from "),Va=r(Md,"A",{href:!0});var S_=i(Va);fm=n(S_,"PreTrainedModel"),S_.forEach(t),gm=n(Md,`. 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.)`),Md.forEach(t),_m=m(Wt),Ms=r(Wt,"P",{});var $d=i(Ms);ym=n($d,"This model is also a PyTorch "),$s=r($d,"A",{href:!0,rel:!0});var I_=i($s);km=n(I_,"torch.nn.Module"),I_.forEach(t),bm=n($d,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),$d.forEach(t),wm=m(Wt),ft=r(Wt,"DIV",{class:!0});var Ht=i(ft);v(Ls.$$.fragment,Ht),Tm=m(Ht),io=r(Ht,"P",{});var wr=i(io);vm=n(wr,"The "),Ya=r(wr,"A",{href:!0});var W_=i(Ya);Mm=n(W_,"XLMForSequenceClassification"),W_.forEach(t),$m=n(wr," forward method, overrides the "),hi=r(wr,"CODE",{});var H_=i(hi);Lm=n(H_,"__call__"),H_.forEach(t),xm=n(wr," special method."),wr.forEach(t),Fm=m(Ht),v(Ro.$$.fragment,Ht),Em=m(Ht),v(Vo.$$.fragment,Ht),Xm=m(Ht),v(Yo.$$.fragment,Ht),Ht.forEach(t),Wt.forEach(t),Sl=m(s),lo=r(s,"H2",{class:!0});var Ld=i(lo);Go=r(Ld,"A",{id:!0,class:!0,href:!0});var Q_=i(Go);ui=r(Q_,"SPAN",{});var U_=i(ui);v(xs.$$.fragment,U_),U_.forEach(t),Q_.forEach(t),qm=m(Ld),fi=r(Ld,"SPAN",{});var B_=i(fi);zm=n(B_,"XLMForMultipleChoice"),B_.forEach(t),Ld.forEach(t),Il=m(s),pt=r(s,"DIV",{class:!0});var Qt=i(pt);v(Fs.$$.fragment,Qt),Cm=m(Qt),gi=r(Qt,"P",{});var K_=i(gi);jm=n(K_,`XLM 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.`),K_.forEach(t),Am=m(Qt),Es=r(Qt,"P",{});var xd=i(Es);Nm=n(xd,"This model inherits from "),Ga=r(xd,"A",{href:!0});var R_=i(Ga);Pm=n(R_,"PreTrainedModel"),R_.forEach(t),Om=n(xd,`. 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.)`),xd.forEach(t),Dm=m(Qt),Xs=r(Qt,"P",{});var Fd=i(Xs);Sm=n(Fd,"This model is also a PyTorch "),qs=r(Fd,"A",{href:!0,rel:!0});var V_=i(qs);Im=n(V_,"torch.nn.Module"),V_.forEach(t),Wm=n(Fd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fd.forEach(t),Hm=m(Qt),Tt=r(Qt,"DIV",{class:!0});var In=i(Tt);v(zs.$$.fragment,In),Qm=m(In),co=r(In,"P",{});var Tr=i(co);Um=n(Tr,"The "),Ja=r(Tr,"A",{href:!0});var Y_=i(Ja);Bm=n(Y_,"XLMForMultipleChoice"),Y_.forEach(t),Km=n(Tr," forward method, overrides the "),_i=r(Tr,"CODE",{});var G_=i(_i);Rm=n(G_,"__call__"),G_.forEach(t),Vm=n(Tr," special method."),Tr.forEach(t),Ym=m(In),v(Jo.$$.fragment,In),Gm=m(In),v(Zo.$$.fragment,In),In.forEach(t),Qt.forEach(t),Wl=m(s),po=r(s,"H2",{class:!0});var Ed=i(po);en=r(Ed,"A",{id:!0,class:!0,href:!0});var J_=i(en);yi=r(J_,"SPAN",{});var Z_=i(yi);v(Cs.$$.fragment,Z_),Z_.forEach(t),J_.forEach(t),Jm=m(Ed),ki=r(Ed,"SPAN",{});var ey=i(ki);Zm=n(ey,"XLMForTokenClassification"),ey.forEach(t),Ed.forEach(t),Hl=m(s),mt=r(s,"DIV",{class:!0});var Ut=i(mt);v(js.$$.fragment,Ut),eh=m(Ut),bi=r(Ut,"P",{});var ty=i(bi);th=n(ty,`XLM 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.`),ty.forEach(t),oh=m(Ut),As=r(Ut,"P",{});var Xd=i(As);nh=n(Xd,"This model inherits from "),Za=r(Xd,"A",{href:!0});var oy=i(Za);sh=n(oy,"PreTrainedModel"),oy.forEach(t),ah=n(Xd,`. 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.)`),Xd.forEach(t),rh=m(Ut),Ns=r(Ut,"P",{});var qd=i(Ns);ih=n(qd,"This model is also a PyTorch "),Ps=r(qd,"A",{href:!0,rel:!0});var ny=i(Ps);lh=n(ny,"torch.nn.Module"),ny.forEach(t),dh=n(qd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),qd.forEach(t),ch=m(Ut),vt=r(Ut,"DIV",{class:!0});var Wn=i(vt);v(Os.$$.fragment,Wn),ph=m(Wn),mo=r(Wn,"P",{});var vr=i(mo);mh=n(vr,"The "),er=r(vr,"A",{href:!0});var sy=i(er);hh=n(sy,"XLMForTokenClassification"),sy.forEach(t),uh=n(vr," forward method, overrides the "),wi=r(vr,"CODE",{});var ay=i(wi);fh=n(ay,"__call__"),ay.forEach(t),gh=n(vr," special method."),vr.forEach(t),_h=m(Wn),v(tn.$$.fragment,Wn),yh=m(Wn),v(on.$$.fragment,Wn),Wn.forEach(t),Ut.forEach(t),Ql=m(s),ho=r(s,"H2",{class:!0});var zd=i(ho);nn=r(zd,"A",{id:!0,class:!0,href:!0});var ry=i(nn);Ti=r(ry,"SPAN",{});var iy=i(Ti);v(Ds.$$.fragment,iy),iy.forEach(t),ry.forEach(t),kh=m(zd),vi=r(zd,"SPAN",{});var ly=i(vi);bh=n(ly,"XLMForQuestionAnsweringSimple"),ly.forEach(t),zd.forEach(t),Ul=m(s),ht=r(s,"DIV",{class:!0});var Bt=i(ht);v(Ss.$$.fragment,Bt),wh=m(Bt),uo=r(Bt,"P",{});var Mr=i(uo);Th=n(Mr,`XLM 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 `),Mi=r(Mr,"CODE",{});var dy=i(Mi);vh=n(dy,"span start logits"),dy.forEach(t),Mh=n(Mr," and "),$i=r(Mr,"CODE",{});var cy=i($i);$h=n(cy,"span end logits"),cy.forEach(t),Lh=n(Mr,")."),Mr.forEach(t),xh=m(Bt),Is=r(Bt,"P",{});var Cd=i(Is);Fh=n(Cd,"This model inherits from "),tr=r(Cd,"A",{href:!0});var py=i(tr);Eh=n(py,"PreTrainedModel"),py.forEach(t),Xh=n(Cd,`. 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.)`),Cd.forEach(t),qh=m(Bt),Ws=r(Bt,"P",{});var jd=i(Ws);zh=n(jd,"This model is also a PyTorch "),Hs=r(jd,"A",{href:!0,rel:!0});var my=i(Hs);Ch=n(my,"torch.nn.Module"),my.forEach(t),jh=n(jd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),jd.forEach(t),Ah=m(Bt),Mt=r(Bt,"DIV",{class:!0});var Hn=i(Mt);v(Qs.$$.fragment,Hn),Nh=m(Hn),fo=r(Hn,"P",{});var $r=i(fo);Ph=n($r,"The "),or=r($r,"A",{href:!0});var hy=i(or);Oh=n(hy,"XLMForQuestionAnsweringSimple"),hy.forEach(t),Dh=n($r," forward method, overrides the "),Li=r($r,"CODE",{});var uy=i(Li);Sh=n(uy,"__call__"),uy.forEach(t),Ih=n($r," special method."),$r.forEach(t),Wh=m(Hn),v(sn.$$.fragment,Hn),Hh=m(Hn),v(an.$$.fragment,Hn),Hn.forEach(t),Bt.forEach(t),Bl=m(s),go=r(s,"H2",{class:!0});var Ad=i(go);rn=r(Ad,"A",{id:!0,class:!0,href:!0});var fy=i(rn);xi=r(fy,"SPAN",{});var gy=i(xi);v(Us.$$.fragment,gy),gy.forEach(t),fy.forEach(t),Qh=m(Ad),Fi=r(Ad,"SPAN",{});var _y=i(Fi);Uh=n(_y,"XLMForQuestionAnswering"),_y.forEach(t),Ad.forEach(t),Kl=m(s),ut=r(s,"DIV",{class:!0});var Kt=i(ut);v(Bs.$$.fragment,Kt),Bh=m(Kt),_o=r(Kt,"P",{});var Lr=i(_o);Kh=n(Lr,`XLM Model with a beam-search span classification head on top for extractive question-answering tasks like SQuAD (a
linear layers on top of the hidden-states output to compute `),Ei=r(Lr,"CODE",{});var yy=i(Ei);Rh=n(yy,"span start logits"),yy.forEach(t),Vh=n(Lr," and "),Xi=r(Lr,"CODE",{});var ky=i(Xi);Yh=n(ky,"span end logits"),ky.forEach(t),Gh=n(Lr,")."),Lr.forEach(t),Jh=m(Kt),Ks=r(Kt,"P",{});var Nd=i(Ks);Zh=n(Nd,"This model inherits from "),nr=r(Nd,"A",{href:!0});var by=i(nr);eu=n(by,"PreTrainedModel"),by.forEach(t),tu=n(Nd,`. 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.)`),Nd.forEach(t),ou=m(Kt),Rs=r(Kt,"P",{});var Pd=i(Rs);nu=n(Pd,"This model is also a PyTorch "),Vs=r(Pd,"A",{href:!0,rel:!0});var wy=i(Vs);su=n(wy,"torch.nn.Module"),wy.forEach(t),au=n(Pd,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Pd.forEach(t),ru=m(Kt),$t=r(Kt,"DIV",{class:!0});var Qn=i($t);v(Ys.$$.fragment,Qn),iu=m(Qn),yo=r(Qn,"P",{});var xr=i(yo);lu=n(xr,"The "),sr=r(xr,"A",{href:!0});var Ty=i(sr);du=n(Ty,"XLMForQuestionAnswering"),Ty.forEach(t),cu=n(xr," forward method, overrides the "),qi=r(xr,"CODE",{});var vy=i(qi);pu=n(vy,"__call__"),vy.forEach(t),mu=n(xr," special method."),xr.forEach(t),hu=m(Qn),v(ln.$$.fragment,Qn),uu=m(Qn),v(dn.$$.fragment,Qn),Qn.forEach(t),Kt.forEach(t),Rl=m(s),ko=r(s,"H2",{class:!0});var Od=i(ko);cn=r(Od,"A",{id:!0,class:!0,href:!0});var My=i(cn);zi=r(My,"SPAN",{});var $y=i(zi);v(Gs.$$.fragment,$y),$y.forEach(t),My.forEach(t),fu=m(Od),Ci=r(Od,"SPAN",{});var Ly=i(Ci);gu=n(Ly,"TFXLMModel"),Ly.forEach(t),Od.forEach(t),Vl=m(s),et=r(s,"DIV",{class:!0});var Xt=i(et);v(Js.$$.fragment,Xt),_u=m(Xt),ji=r(Xt,"P",{});var xy=i(ji);yu=n(xy,"The bare XLM Model transformer outputting raw hidden-states without any specific head on top."),xy.forEach(t),ku=m(Xt),Zs=r(Xt,"P",{});var Dd=i(Zs);bu=n(Dd,"This model inherits from "),ar=r(Dd,"A",{href:!0});var Fy=i(ar);wu=n(Fy,"TFPreTrainedModel"),Fy.forEach(t),Tu=n(Dd,`. 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.)`),Dd.forEach(t),vu=m(Xt),ea=r(Xt,"P",{});var Sd=i(ea);Mu=n(Sd,"This model is also a "),ta=r(Sd,"A",{href:!0,rel:!0});var Ey=i(ta);$u=n(Ey,"tf.keras.Model"),Ey.forEach(t),Lu=n(Sd,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Sd.forEach(t),xu=m(Xt),v(pn.$$.fragment,Xt),Fu=m(Xt),Lt=r(Xt,"DIV",{class:!0});var Un=i(Lt);v(oa.$$.fragment,Un),Eu=m(Un),bo=r(Un,"P",{});var Fr=i(bo);Xu=n(Fr,"The "),rr=r(Fr,"A",{href:!0});var Xy=i(rr);qu=n(Xy,"TFXLMModel"),Xy.forEach(t),zu=n(Fr," forward method, overrides the "),Ai=r(Fr,"CODE",{});var qy=i(Ai);Cu=n(qy,"__call__"),qy.forEach(t),ju=n(Fr," special method."),Fr.forEach(t),Au=m(Un),v(mn.$$.fragment,Un),Nu=m(Un),v(hn.$$.fragment,Un),Un.forEach(t),Xt.forEach(t),Yl=m(s),wo=r(s,"H2",{class:!0});var Id=i(wo);un=r(Id,"A",{id:!0,class:!0,href:!0});var zy=i(un);Ni=r(zy,"SPAN",{});var Cy=i(Ni);v(na.$$.fragment,Cy),Cy.forEach(t),zy.forEach(t),Pu=m(Id),Pi=r(Id,"SPAN",{});var jy=i(Pi);Ou=n(jy,"TFXLMWithLMHeadModel"),jy.forEach(t),Id.forEach(t),Gl=m(s),tt=r(s,"DIV",{class:!0});var qt=i(tt);v(sa.$$.fragment,qt),Du=m(qt),Oi=r(qt,"P",{});var Ay=i(Oi);Su=n(Ay,`The XLM Model transformer with a language modeling head on top (linear layer with weights tied to the input
embeddings).`),Ay.forEach(t),Iu=m(qt),aa=r(qt,"P",{});var Wd=i(aa);Wu=n(Wd,"This model inherits from "),ir=r(Wd,"A",{href:!0});var Ny=i(ir);Hu=n(Ny,"TFPreTrainedModel"),Ny.forEach(t),Qu=n(Wd,`. 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.)`),Wd.forEach(t),Uu=m(qt),ra=r(qt,"P",{});var Hd=i(ra);Bu=n(Hd,"This model is also a "),ia=r(Hd,"A",{href:!0,rel:!0});var Py=i(ia);Ku=n(Py,"tf.keras.Model"),Py.forEach(t),Ru=n(Hd,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Hd.forEach(t),Vu=m(qt),v(fn.$$.fragment,qt),Yu=m(qt),xt=r(qt,"DIV",{class:!0});var Bn=i(xt);v(la.$$.fragment,Bn),Gu=m(Bn),To=r(Bn,"P",{});var Er=i(To);Ju=n(Er,"The "),lr=r(Er,"A",{href:!0});var Oy=i(lr);Zu=n(Oy,"TFXLMWithLMHeadModel"),Oy.forEach(t),ef=n(Er," forward method, overrides the "),Di=r(Er,"CODE",{});var Dy=i(Di);tf=n(Dy,"__call__"),Dy.forEach(t),of=n(Er," special method."),Er.forEach(t),nf=m(Bn),v(gn.$$.fragment,Bn),sf=m(Bn),v(_n.$$.fragment,Bn),Bn.forEach(t),qt.forEach(t),Jl=m(s),vo=r(s,"H2",{class:!0});var Qd=i(vo);yn=r(Qd,"A",{id:!0,class:!0,href:!0});var Sy=i(yn);Si=r(Sy,"SPAN",{});var Iy=i(Si);v(da.$$.fragment,Iy),Iy.forEach(t),Sy.forEach(t),af=m(Qd),Ii=r(Qd,"SPAN",{});var Wy=i(Ii);rf=n(Wy,"TFXLMForSequenceClassification"),Wy.forEach(t),Qd.forEach(t),Zl=m(s),ot=r(s,"DIV",{class:!0});var zt=i(ot);v(ca.$$.fragment,zt),lf=m(zt),Wi=r(zt,"P",{});var Hy=i(Wi);df=n(Hy,`XLM Model with a sequence classification/regression head on top (a linear layer on top of the pooled output) e.g.
for GLUE tasks.`),Hy.forEach(t),cf=m(zt),pa=r(zt,"P",{});var Ud=i(pa);pf=n(Ud,"This model inherits from "),dr=r(Ud,"A",{href:!0});var Qy=i(dr);mf=n(Qy,"TFPreTrainedModel"),Qy.forEach(t),hf=n(Ud,`. 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.)`),Ud.forEach(t),uf=m(zt),ma=r(zt,"P",{});var Bd=i(ma);ff=n(Bd,"This model is also a "),ha=r(Bd,"A",{href:!0,rel:!0});var Uy=i(ha);gf=n(Uy,"tf.keras.Model"),Uy.forEach(t),_f=n(Bd,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Bd.forEach(t),yf=m(zt),v(kn.$$.fragment,zt),kf=m(zt),gt=r(zt,"DIV",{class:!0});var Rt=i(gt);v(ua.$$.fragment,Rt),bf=m(Rt),Mo=r(Rt,"P",{});var Xr=i(Mo);wf=n(Xr,"The "),cr=r(Xr,"A",{href:!0});var By=i(cr);Tf=n(By,"TFXLMForSequenceClassification"),By.forEach(t),vf=n(Xr," forward method, overrides the "),Hi=r(Xr,"CODE",{});var Ky=i(Hi);Mf=n(Ky,"__call__"),Ky.forEach(t),$f=n(Xr," special method."),Xr.forEach(t),Lf=m(Rt),v(bn.$$.fragment,Rt),xf=m(Rt),v(wn.$$.fragment,Rt),Ff=m(Rt),v(Tn.$$.fragment,Rt),Rt.forEach(t),zt.forEach(t),ed=m(s),$o=r(s,"H2",{class:!0});var Kd=i($o);vn=r(Kd,"A",{id:!0,class:!0,href:!0});var Ry=i(vn);Qi=r(Ry,"SPAN",{});var Vy=i(Qi);v(fa.$$.fragment,Vy),Vy.forEach(t),Ry.forEach(t),Ef=m(Kd),Ui=r(Kd,"SPAN",{});var Yy=i(Ui);Xf=n(Yy,"TFXLMForMultipleChoice"),Yy.forEach(t),Kd.forEach(t),td=m(s),nt=r(s,"DIV",{class:!0});var Ct=i(nt);v(ga.$$.fragment,Ct),qf=m(Ct),Bi=r(Ct,"P",{});var Gy=i(Bi);zf=n(Gy,`XLM 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.`),Gy.forEach(t),Cf=m(Ct),_a=r(Ct,"P",{});var Rd=i(_a);jf=n(Rd,"This model inherits from "),pr=r(Rd,"A",{href:!0});var Jy=i(pr);Af=n(Jy,"TFPreTrainedModel"),Jy.forEach(t),Nf=n(Rd,`. 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.)`),Rd.forEach(t),Pf=m(Ct),ya=r(Ct,"P",{});var Vd=i(ya);Of=n(Vd,"This model is also a "),ka=r(Vd,"A",{href:!0,rel:!0});var Zy=i(ka);Df=n(Zy,"tf.keras.Model"),Zy.forEach(t),Sf=n(Vd,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Vd.forEach(t),If=m(Ct),v(Mn.$$.fragment,Ct),Wf=m(Ct),Ft=r(Ct,"DIV",{class:!0});var Kn=i(Ft);v(ba.$$.fragment,Kn),Hf=m(Kn),Lo=r(Kn,"P",{});var qr=i(Lo);Qf=n(qr,"The "),mr=r(qr,"A",{href:!0});var ek=i(mr);Uf=n(ek,"TFXLMForMultipleChoice"),ek.forEach(t),Bf=n(qr," forward method, overrides the "),Ki=r(qr,"CODE",{});var tk=i(Ki);Kf=n(tk,"__call__"),tk.forEach(t),Rf=n(qr," special method."),qr.forEach(t),Vf=m(Kn),v($n.$$.fragment,Kn),Yf=m(Kn),v(Ln.$$.fragment,Kn),Kn.forEach(t),Ct.forEach(t),od=m(s),xo=r(s,"H2",{class:!0});var Yd=i(xo);xn=r(Yd,"A",{id:!0,class:!0,href:!0});var ok=i(xn);Ri=r(ok,"SPAN",{});var nk=i(Ri);v(wa.$$.fragment,nk),nk.forEach(t),ok.forEach(t),Gf=m(Yd),Vi=r(Yd,"SPAN",{});var sk=i(Vi);Jf=n(sk,"TFXLMForTokenClassification"),sk.forEach(t),Yd.forEach(t),nd=m(s),st=r(s,"DIV",{class:!0});var jt=i(st);v(Ta.$$.fragment,jt),Zf=m(jt),Yi=r(jt,"P",{});var ak=i(Yi);eg=n(ak,`XLM 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.`),ak.forEach(t),tg=m(jt),va=r(jt,"P",{});var Gd=i(va);og=n(Gd,"This model inherits from "),hr=r(Gd,"A",{href:!0});var rk=i(hr);ng=n(rk,"TFPreTrainedModel"),rk.forEach(t),sg=n(Gd,`. 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.)`),Gd.forEach(t),ag=m(jt),Ma=r(jt,"P",{});var Jd=i(Ma);rg=n(Jd,"This model is also a "),$a=r(Jd,"A",{href:!0,rel:!0});var ik=i($a);ig=n(ik,"tf.keras.Model"),ik.forEach(t),lg=n(Jd,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),Jd.forEach(t),dg=m(jt),v(Fn.$$.fragment,jt),cg=m(jt),_t=r(jt,"DIV",{class:!0});var Vt=i(_t);v(La.$$.fragment,Vt),pg=m(Vt),Fo=r(Vt,"P",{});var zr=i(Fo);mg=n(zr,"The "),ur=r(zr,"A",{href:!0});var lk=i(ur);hg=n(lk,"TFXLMForTokenClassification"),lk.forEach(t),ug=n(zr," forward method, overrides the "),Gi=r(zr,"CODE",{});var dk=i(Gi);fg=n(dk,"__call__"),dk.forEach(t),gg=n(zr," special method."),zr.forEach(t),_g=m(Vt),v(En.$$.fragment,Vt),yg=m(Vt),v(Xn.$$.fragment,Vt),kg=m(Vt),v(qn.$$.fragment,Vt),Vt.forEach(t),jt.forEach(t),sd=m(s),Eo=r(s,"H2",{class:!0});var Zd=i(Eo);zn=r(Zd,"A",{id:!0,class:!0,href:!0});var ck=i(zn);Ji=r(ck,"SPAN",{});var pk=i(Ji);v(xa.$$.fragment,pk),pk.forEach(t),ck.forEach(t),bg=m(Zd),Zi=r(Zd,"SPAN",{});var mk=i(Zi);wg=n(mk,"TFXLMForQuestionAnsweringSimple"),mk.forEach(t),Zd.forEach(t),ad=m(s),at=r(s,"DIV",{class:!0});var At=i(at);v(Fa.$$.fragment,At),Tg=m(At),Xo=r(At,"P",{});var Cr=i(Xo);vg=n(Cr,`XLM Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear layer
on top of the hidden-states output to compute `),el=r(Cr,"CODE",{});var hk=i(el);Mg=n(hk,"span start logits"),hk.forEach(t),$g=n(Cr," and "),tl=r(Cr,"CODE",{});var uk=i(tl);Lg=n(uk,"span end logits"),uk.forEach(t),xg=n(Cr,")."),Cr.forEach(t),Fg=m(At),Ea=r(At,"P",{});var ec=i(Ea);Eg=n(ec,"This model inherits from "),fr=r(ec,"A",{href:!0});var fk=i(fr);Xg=n(fk,"TFPreTrainedModel"),fk.forEach(t),qg=n(ec,`. 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.)`),ec.forEach(t),zg=m(At),Xa=r(At,"P",{});var tc=i(Xa);Cg=n(tc,"This model is also a "),qa=r(tc,"A",{href:!0,rel:!0});var gk=i(qa);jg=n(gk,"tf.keras.Model"),gk.forEach(t),Ag=n(tc,` subclass. Use it
as a regular TF 2.0 Keras Model and refer to the TF 2.0 documentation for all matter related to general usage and
behavior.`),tc.forEach(t),Ng=m(At),v(Cn.$$.fragment,At),Pg=m(At),yt=r(At,"DIV",{class:!0});var Yt=i(yt);v(za.$$.fragment,Yt),Og=m(Yt),qo=r(Yt,"P",{});var jr=i(qo);Dg=n(jr,"The "),gr=r(jr,"A",{href:!0});var _k=i(gr);Sg=n(_k,"TFXLMForQuestionAnsweringSimple"),_k.forEach(t),Ig=n(jr," forward method, overrides the "),ol=r(jr,"CODE",{});var yk=i(ol);Wg=n(yk,"__call__"),yk.forEach(t),Hg=n(jr," special method."),jr.forEach(t),Qg=m(Yt),v(jn.$$.fragment,Yt),Ug=m(Yt),v(An.$$.fragment,Yt),Bg=m(Yt),v(Nn.$$.fragment,Yt),Yt.forEach(t),At.forEach(t),this.h()},h(){f(d,"name","hf:doc:metadata"),f(d,"content",JSON.stringify(db)),f(u,"id","xlm"),f(u,"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"),f(u,"href","#xlm"),f(h,"class","relative group"),f(re,"id","overview"),f(re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),f(re,"href","#overview"),f(S,"class","relative group"),f(le,"href","https://arxiv.org/abs/1901.07291"),f(le,"rel","nofollow"),f(C,"href","../multilingual"),f(F,"href","https://huggingface.co/thomwolf"),f(F,"rel","nofollow"),f(Ne,"href","https://github.com/facebookresearch/XLM/"),f(Ne,"rel","nofollow"),f(Ae,"id","transformers.XLMConfig"),f(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"),f(Ae,"href","#transformers.XLMConfig"),f(je,"class","relative group"),f(J,"href","/docs/transformers/main/en/model_doc/xlm#transformers.XLMModel"),f(Oa,"href","/docs/transformers/main/en/model_doc/xlm#transformers.TFXLMModel"),f(Rn,"href","https://huggingface.co/xlm-mlm-en-2048"),f(Rn,"rel","nofollow"),f(Da,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),f(Sa,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),f(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Po,"id","transformers.XLMTokenizer"),f(Po,"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"),f(Po,"href","#transformers.XLMTokenizer"),f(Jt,"class","relative group"),f(Ia,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),f(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Oo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Qa,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(So,"id","transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput"),f(So,"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"),f(So,"href","#transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput"),f(eo,"class","relative group"),f(to,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Io,"id","transformers.XLMModel"),f(Io,"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"),f(Io,"href","#transformers.XLMModel"),f(oo,"class","relative group"),f(Ua,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),f(hs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(hs,"rel","nofollow"),f(Ba,"href","/docs/transformers/main/en/model_doc/xlm#transformers.XLMModel"),f(bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Qo,"id","transformers.XLMWithLMHeadModel"),f(Qo,"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"),f(Qo,"href","#transformers.XLMWithLMHeadModel"),f(so,"class","relative group"),f(Ka,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),f(ks,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(ks,"rel","nofollow"),f(Ra,"href","/docs/transformers/main/en/model_doc/xlm#transformers.XLMWithLMHeadModel"),f(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Ko,"id","transformers.XLMForSequenceClassification"),f(Ko,"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"),f(Ko,"href","#transformers.XLMForSequenceClassification"),f(ro,"class","relative group"),f(Va,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),f($s,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f($s,"rel","nofollow"),f(Ya,"href","/docs/transformers/main/en/model_doc/xlm#transformers.XLMForSequenceClassification"),f(ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(Go,"id","transformers.XLMForMultipleChoice"),f(Go,"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"),f(Go,"href","#transformers.XLMForMultipleChoice"),f(lo,"class","relative group"),f(Ga,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),f(qs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(qs,"rel","nofollow"),f(Ja,"href","/docs/transformers/main/en/model_doc/xlm#transformers.XLMForMultipleChoice"),f(Tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(en,"id","transformers.XLMForTokenClassification"),f(en,"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"),f(en,"href","#transformers.XLMForTokenClassification"),f(po,"class","relative group"),f(Za,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),f(Ps,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Ps,"rel","nofollow"),f(er,"href","/docs/transformers/main/en/model_doc/xlm#transformers.XLMForTokenClassification"),f(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(nn,"id","transformers.XLMForQuestionAnsweringSimple"),f(nn,"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"),f(nn,"href","#transformers.XLMForQuestionAnsweringSimple"),f(ho,"class","relative group"),f(tr,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),f(Hs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Hs,"rel","nofollow"),f(or,"href","/docs/transformers/main/en/model_doc/xlm#transformers.XLMForQuestionAnsweringSimple"),f(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(rn,"id","transformers.XLMForQuestionAnswering"),f(rn,"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"),f(rn,"href","#transformers.XLMForQuestionAnswering"),f(go,"class","relative group"),f(nr,"href","/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel"),f(Vs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),f(Vs,"rel","nofollow"),f(sr,"href","/docs/transformers/main/en/model_doc/xlm#transformers.XLMForQuestionAnswering"),f($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ut,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(cn,"id","transformers.TFXLMModel"),f(cn,"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"),f(cn,"href","#transformers.TFXLMModel"),f(ko,"class","relative group"),f(ar,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(ta,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(ta,"rel","nofollow"),f(rr,"href","/docs/transformers/main/en/model_doc/xlm#transformers.TFXLMModel"),f(Lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(un,"id","transformers.TFXLMWithLMHeadModel"),f(un,"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"),f(un,"href","#transformers.TFXLMWithLMHeadModel"),f(wo,"class","relative group"),f(ir,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(ia,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(ia,"rel","nofollow"),f(lr,"href","/docs/transformers/main/en/model_doc/xlm#transformers.TFXLMWithLMHeadModel"),f(xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(yn,"id","transformers.TFXLMForSequenceClassification"),f(yn,"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"),f(yn,"href","#transformers.TFXLMForSequenceClassification"),f(vo,"class","relative group"),f(dr,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(ha,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(ha,"rel","nofollow"),f(cr,"href","/docs/transformers/main/en/model_doc/xlm#transformers.TFXLMForSequenceClassification"),f(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(vn,"id","transformers.TFXLMForMultipleChoice"),f(vn,"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"),f(vn,"href","#transformers.TFXLMForMultipleChoice"),f($o,"class","relative group"),f(pr,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(ka,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(ka,"rel","nofollow"),f(mr,"href","/docs/transformers/main/en/model_doc/xlm#transformers.TFXLMForMultipleChoice"),f(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(xn,"id","transformers.TFXLMForTokenClassification"),f(xn,"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"),f(xn,"href","#transformers.TFXLMForTokenClassification"),f(xo,"class","relative group"),f(hr,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f($a,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f($a,"rel","nofollow"),f(ur,"href","/docs/transformers/main/en/model_doc/xlm#transformers.TFXLMForTokenClassification"),f(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(zn,"id","transformers.TFXLMForQuestionAnsweringSimple"),f(zn,"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"),f(zn,"href","#transformers.TFXLMForQuestionAnsweringSimple"),f(Eo,"class","relative group"),f(fr,"href","/docs/transformers/main/en/main_classes/model#transformers.TFPreTrainedModel"),f(qa,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),f(qa,"rel","nofollow"),f(gr,"href","/docs/transformers/main/en/model_doc/xlm#transformers.TFXLMForQuestionAnsweringSimple"),f(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),f(at,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(s,y){e(document.head,d),_(s,b,y),_(s,h,y),e(h,u),e(u,k),M(l,k,null),e(h,c),e(h,X),e(X,be),_(s,he,y),_(s,S,y),e(S,re),e(re,Z),M(w,Z,null),e(S,we),e(S,U),e(U,Te),_(s,ue,y),_(s,W,y),e(W,ve),e(W,le),e(le,V),e(W,Me),_(s,fe,y),_(s,D,y),e(D,ce),e(ce,$e),e(D,Y),e(D,pe),e(pe,Le),e(D,oe),e(D,z),e(z,A),_(s,ge,y),_(s,H,y),e(H,xe),_(s,_e,y),_(s,Q,y),e(Q,me),e(me,Fe),_(s,j,y),_(s,de,y),e(de,G),_(s,ye,y),_(s,ie,y),e(ie,B),e(B,Ee),e(ie,Xe),e(ie,N),e(N,qe),e(N,K),e(K,ze),e(N,ne),e(N,C),e(C,Ce),e(N,P),_(s,ke,y),_(s,te,y),e(te,g),e(te,F),e(F,We),e(te,se),e(te,Ne),e(Ne,He),e(te,E),_(s,Se,y),_(s,je,y),e(je,Ae),e(Ae,De),M(Pe,De,null),e(je,I),e(je,R),e(R,Qe),_(s,Ie,y),_(s,O,y),M(Oe,O,null),e(O,Ue),e(O,ee),e(ee,Be),e(ee,J),e(J,Ke),e(ee,oc),e(ee,Oa),e(Oa,nc),e(ee,sc),e(ee,Rn),e(Rn,ac),e(ee,rc),e(O,ic),e(O,Gt),e(Gt,lc),e(Gt,Da),e(Da,dc),e(Gt,cc),e(Gt,Sa),e(Sa,pc),e(Gt,mc),e(O,hc),M(No,O,null),_(s,Xl,y),_(s,Jt,y),e(Jt,Po),e(Po,Ar),M(Vn,Ar,null),e(Jt,uc),e(Jt,Nr),e(Nr,fc),_(s,ql,y),_(s,Re,y),M(Yn,Re,null),e(Re,gc),e(Re,Pr),e(Pr,_c),e(Re,yc),e(Re,it),e(it,Or),e(Or,kc),e(it,bc),e(it,Dr),e(Dr,wc),e(it,Tc),e(it,Sr),e(Sr,vc),e(it,Mc),e(it,Nt),e(Nt,$c),e(Nt,Ir),e(Ir,Lc),e(Nt,xc),e(Nt,Wr),e(Wr,Fc),e(Nt,Ec),e(Nt,Hr),e(Hr,Xc),e(Nt,qc),e(it,zc),e(it,Gn),e(Gn,Cc),e(Gn,Qr),e(Qr,jc),e(Gn,Ac),e(it,Nc),e(it,Jn),e(Jn,Pc),e(Jn,Ur),e(Ur,Oc),e(Jn,Dc),e(Re,Sc),e(Re,Zn),e(Zn,Ic),e(Zn,Ia),e(Ia,Wc),e(Zn,Hc),e(Re,Qc),e(Re,Dt),M(es,Dt,null),e(Dt,Uc),e(Dt,Br),e(Br,Bc),e(Dt,Kc),e(Dt,ts),e(ts,Wa),e(Wa,Rc),e(Wa,Kr),e(Kr,Vc),e(ts,Yc),e(ts,Ha),e(Ha,Gc),e(Ha,Rr),e(Rr,Jc),e(Re,Zc),e(Re,Oo),M(os,Oo,null),e(Oo,ep),e(Oo,ns),e(ns,tp),e(ns,Vr),e(Vr,op),e(ns,np),e(Re,sp),e(Re,kt),M(ss,kt,null),e(kt,ap),e(kt,Yr),e(Yr,rp),e(kt,ip),M(Do,kt,null),e(kt,lp),e(kt,Zt),e(Zt,dp),e(Zt,Gr),e(Gr,cp),e(Zt,pp),e(Zt,Jr),e(Jr,mp),e(Zt,hp),e(Re,up),e(Re,Qa),M(as,Qa,null),_(s,zl,y),_(s,eo,y),e(eo,So),e(So,Zr),M(rs,Zr,null),e(eo,fp),e(eo,ei),e(ei,gp),_(s,Cl,y),_(s,to,y),M(is,to,null),e(to,_p),e(to,ls),e(ls,yp),e(ls,ti),e(ti,kp),e(ls,bp),_(s,jl,y),_(s,oo,y),e(oo,Io),e(Io,oi),M(ds,oi,null),e(oo,wp),e(oo,ni),e(ni,Tp),_(s,Al,y),_(s,lt,y),M(cs,lt,null),e(lt,vp),e(lt,si),e(si,Mp),e(lt,$p),e(lt,ps),e(ps,Lp),e(ps,Ua),e(Ua,xp),e(ps,Fp),e(lt,Ep),e(lt,ms),e(ms,Xp),e(ms,hs),e(hs,qp),e(ms,zp),e(lt,Cp),e(lt,bt),M(us,bt,null),e(bt,jp),e(bt,no),e(no,Ap),e(no,Ba),e(Ba,Np),e(no,Pp),e(no,ai),e(ai,Op),e(no,Dp),e(bt,Sp),M(Wo,bt,null),e(bt,Ip),M(Ho,bt,null),_(s,Nl,y),_(s,so,y),e(so,Qo),e(Qo,ri),M(fs,ri,null),e(so,Wp),e(so,ii),e(ii,Hp),_(s,Pl,y),_(s,dt,y),M(gs,dt,null),e(dt,Qp),e(dt,li),e(li,Up),e(dt,Bp),e(dt,_s),e(_s,Kp),e(_s,Ka),e(Ka,Rp),e(_s,Vp),e(dt,Yp),e(dt,ys),e(ys,Gp),e(ys,ks),e(ks,Jp),e(ys,Zp),e(dt,em),e(dt,wt),M(bs,wt,null),e(wt,tm),e(wt,ao),e(ao,om),e(ao,Ra),e(Ra,nm),e(ao,sm),e(ao,di),e(di,am),e(ao,rm),e(wt,im),M(Uo,wt,null),e(wt,lm),M(Bo,wt,null),_(s,Ol,y),_(s,ro,y),e(ro,Ko),e(Ko,ci),M(ws,ci,null),e(ro,dm),e(ro,pi),e(pi,cm),_(s,Dl,y),_(s,ct,y),M(Ts,ct,null),e(ct,pm),e(ct,mi),e(mi,mm),e(ct,hm),e(ct,vs),e(vs,um),e(vs,Va),e(Va,fm),e(vs,gm),e(ct,_m),e(ct,Ms),e(Ms,ym),e(Ms,$s),e($s,km),e(Ms,bm),e(ct,wm),e(ct,ft),M(Ls,ft,null),e(ft,Tm),e(ft,io),e(io,vm),e(io,Ya),e(Ya,Mm),e(io,$m),e(io,hi),e(hi,Lm),e(io,xm),e(ft,Fm),M(Ro,ft,null),e(ft,Em),M(Vo,ft,null),e(ft,Xm),M(Yo,ft,null),_(s,Sl,y),_(s,lo,y),e(lo,Go),e(Go,ui),M(xs,ui,null),e(lo,qm),e(lo,fi),e(fi,zm),_(s,Il,y),_(s,pt,y),M(Fs,pt,null),e(pt,Cm),e(pt,gi),e(gi,jm),e(pt,Am),e(pt,Es),e(Es,Nm),e(Es,Ga),e(Ga,Pm),e(Es,Om),e(pt,Dm),e(pt,Xs),e(Xs,Sm),e(Xs,qs),e(qs,Im),e(Xs,Wm),e(pt,Hm),e(pt,Tt),M(zs,Tt,null),e(Tt,Qm),e(Tt,co),e(co,Um),e(co,Ja),e(Ja,Bm),e(co,Km),e(co,_i),e(_i,Rm),e(co,Vm),e(Tt,Ym),M(Jo,Tt,null),e(Tt,Gm),M(Zo,Tt,null),_(s,Wl,y),_(s,po,y),e(po,en),e(en,yi),M(Cs,yi,null),e(po,Jm),e(po,ki),e(ki,Zm),_(s,Hl,y),_(s,mt,y),M(js,mt,null),e(mt,eh),e(mt,bi),e(bi,th),e(mt,oh),e(mt,As),e(As,nh),e(As,Za),e(Za,sh),e(As,ah),e(mt,rh),e(mt,Ns),e(Ns,ih),e(Ns,Ps),e(Ps,lh),e(Ns,dh),e(mt,ch),e(mt,vt),M(Os,vt,null),e(vt,ph),e(vt,mo),e(mo,mh),e(mo,er),e(er,hh),e(mo,uh),e(mo,wi),e(wi,fh),e(mo,gh),e(vt,_h),M(tn,vt,null),e(vt,yh),M(on,vt,null),_(s,Ql,y),_(s,ho,y),e(ho,nn),e(nn,Ti),M(Ds,Ti,null),e(ho,kh),e(ho,vi),e(vi,bh),_(s,Ul,y),_(s,ht,y),M(Ss,ht,null),e(ht,wh),e(ht,uo),e(uo,Th),e(uo,Mi),e(Mi,vh),e(uo,Mh),e(uo,$i),e($i,$h),e(uo,Lh),e(ht,xh),e(ht,Is),e(Is,Fh),e(Is,tr),e(tr,Eh),e(Is,Xh),e(ht,qh),e(ht,Ws),e(Ws,zh),e(Ws,Hs),e(Hs,Ch),e(Ws,jh),e(ht,Ah),e(ht,Mt),M(Qs,Mt,null),e(Mt,Nh),e(Mt,fo),e(fo,Ph),e(fo,or),e(or,Oh),e(fo,Dh),e(fo,Li),e(Li,Sh),e(fo,Ih),e(Mt,Wh),M(sn,Mt,null),e(Mt,Hh),M(an,Mt,null),_(s,Bl,y),_(s,go,y),e(go,rn),e(rn,xi),M(Us,xi,null),e(go,Qh),e(go,Fi),e(Fi,Uh),_(s,Kl,y),_(s,ut,y),M(Bs,ut,null),e(ut,Bh),e(ut,_o),e(_o,Kh),e(_o,Ei),e(Ei,Rh),e(_o,Vh),e(_o,Xi),e(Xi,Yh),e(_o,Gh),e(ut,Jh),e(ut,Ks),e(Ks,Zh),e(Ks,nr),e(nr,eu),e(Ks,tu),e(ut,ou),e(ut,Rs),e(Rs,nu),e(Rs,Vs),e(Vs,su),e(Rs,au),e(ut,ru),e(ut,$t),M(Ys,$t,null),e($t,iu),e($t,yo),e(yo,lu),e(yo,sr),e(sr,du),e(yo,cu),e(yo,qi),e(qi,pu),e(yo,mu),e($t,hu),M(ln,$t,null),e($t,uu),M(dn,$t,null),_(s,Rl,y),_(s,ko,y),e(ko,cn),e(cn,zi),M(Gs,zi,null),e(ko,fu),e(ko,Ci),e(Ci,gu),_(s,Vl,y),_(s,et,y),M(Js,et,null),e(et,_u),e(et,ji),e(ji,yu),e(et,ku),e(et,Zs),e(Zs,bu),e(Zs,ar),e(ar,wu),e(Zs,Tu),e(et,vu),e(et,ea),e(ea,Mu),e(ea,ta),e(ta,$u),e(ea,Lu),e(et,xu),M(pn,et,null),e(et,Fu),e(et,Lt),M(oa,Lt,null),e(Lt,Eu),e(Lt,bo),e(bo,Xu),e(bo,rr),e(rr,qu),e(bo,zu),e(bo,Ai),e(Ai,Cu),e(bo,ju),e(Lt,Au),M(mn,Lt,null),e(Lt,Nu),M(hn,Lt,null),_(s,Yl,y),_(s,wo,y),e(wo,un),e(un,Ni),M(na,Ni,null),e(wo,Pu),e(wo,Pi),e(Pi,Ou),_(s,Gl,y),_(s,tt,y),M(sa,tt,null),e(tt,Du),e(tt,Oi),e(Oi,Su),e(tt,Iu),e(tt,aa),e(aa,Wu),e(aa,ir),e(ir,Hu),e(aa,Qu),e(tt,Uu),e(tt,ra),e(ra,Bu),e(ra,ia),e(ia,Ku),e(ra,Ru),e(tt,Vu),M(fn,tt,null),e(tt,Yu),e(tt,xt),M(la,xt,null),e(xt,Gu),e(xt,To),e(To,Ju),e(To,lr),e(lr,Zu),e(To,ef),e(To,Di),e(Di,tf),e(To,of),e(xt,nf),M(gn,xt,null),e(xt,sf),M(_n,xt,null),_(s,Jl,y),_(s,vo,y),e(vo,yn),e(yn,Si),M(da,Si,null),e(vo,af),e(vo,Ii),e(Ii,rf),_(s,Zl,y),_(s,ot,y),M(ca,ot,null),e(ot,lf),e(ot,Wi),e(Wi,df),e(ot,cf),e(ot,pa),e(pa,pf),e(pa,dr),e(dr,mf),e(pa,hf),e(ot,uf),e(ot,ma),e(ma,ff),e(ma,ha),e(ha,gf),e(ma,_f),e(ot,yf),M(kn,ot,null),e(ot,kf),e(ot,gt),M(ua,gt,null),e(gt,bf),e(gt,Mo),e(Mo,wf),e(Mo,cr),e(cr,Tf),e(Mo,vf),e(Mo,Hi),e(Hi,Mf),e(Mo,$f),e(gt,Lf),M(bn,gt,null),e(gt,xf),M(wn,gt,null),e(gt,Ff),M(Tn,gt,null),_(s,ed,y),_(s,$o,y),e($o,vn),e(vn,Qi),M(fa,Qi,null),e($o,Ef),e($o,Ui),e(Ui,Xf),_(s,td,y),_(s,nt,y),M(ga,nt,null),e(nt,qf),e(nt,Bi),e(Bi,zf),e(nt,Cf),e(nt,_a),e(_a,jf),e(_a,pr),e(pr,Af),e(_a,Nf),e(nt,Pf),e(nt,ya),e(ya,Of),e(ya,ka),e(ka,Df),e(ya,Sf),e(nt,If),M(Mn,nt,null),e(nt,Wf),e(nt,Ft),M(ba,Ft,null),e(Ft,Hf),e(Ft,Lo),e(Lo,Qf),e(Lo,mr),e(mr,Uf),e(Lo,Bf),e(Lo,Ki),e(Ki,Kf),e(Lo,Rf),e(Ft,Vf),M($n,Ft,null),e(Ft,Yf),M(Ln,Ft,null),_(s,od,y),_(s,xo,y),e(xo,xn),e(xn,Ri),M(wa,Ri,null),e(xo,Gf),e(xo,Vi),e(Vi,Jf),_(s,nd,y),_(s,st,y),M(Ta,st,null),e(st,Zf),e(st,Yi),e(Yi,eg),e(st,tg),e(st,va),e(va,og),e(va,hr),e(hr,ng),e(va,sg),e(st,ag),e(st,Ma),e(Ma,rg),e(Ma,$a),e($a,ig),e(Ma,lg),e(st,dg),M(Fn,st,null),e(st,cg),e(st,_t),M(La,_t,null),e(_t,pg),e(_t,Fo),e(Fo,mg),e(Fo,ur),e(ur,hg),e(Fo,ug),e(Fo,Gi),e(Gi,fg),e(Fo,gg),e(_t,_g),M(En,_t,null),e(_t,yg),M(Xn,_t,null),e(_t,kg),M(qn,_t,null),_(s,sd,y),_(s,Eo,y),e(Eo,zn),e(zn,Ji),M(xa,Ji,null),e(Eo,bg),e(Eo,Zi),e(Zi,wg),_(s,ad,y),_(s,at,y),M(Fa,at,null),e(at,Tg),e(at,Xo),e(Xo,vg),e(Xo,el),e(el,Mg),e(Xo,$g),e(Xo,tl),e(tl,Lg),e(Xo,xg),e(at,Fg),e(at,Ea),e(Ea,Eg),e(Ea,fr),e(fr,Xg),e(Ea,qg),e(at,zg),e(at,Xa),e(Xa,Cg),e(Xa,qa),e(qa,jg),e(Xa,Ag),e(at,Ng),M(Cn,at,null),e(at,Pg),e(at,yt),M(za,yt,null),e(yt,Og),e(yt,qo),e(qo,Dg),e(qo,gr),e(gr,Sg),e(qo,Ig),e(qo,ol),e(ol,Wg),e(qo,Hg),e(yt,Qg),M(jn,yt,null),e(yt,Ug),M(An,yt,null),e(yt,Bg),M(Nn,yt,null),rd=!0},p(s,[y]){const Ca={};y&2&&(Ca.$$scope={dirty:y,ctx:s}),No.$set(Ca);const nl={};y&2&&(nl.$$scope={dirty:y,ctx:s}),Do.$set(nl);const sl={};y&2&&(sl.$$scope={dirty:y,ctx:s}),Wo.$set(sl);const al={};y&2&&(al.$$scope={dirty:y,ctx:s}),Ho.$set(al);const ja={};y&2&&(ja.$$scope={dirty:y,ctx:s}),Uo.$set(ja);const rl={};y&2&&(rl.$$scope={dirty:y,ctx:s}),Bo.$set(rl);const il={};y&2&&(il.$$scope={dirty:y,ctx:s}),Ro.$set(il);const ll={};y&2&&(ll.$$scope={dirty:y,ctx:s}),Vo.$set(ll);const Aa={};y&2&&(Aa.$$scope={dirty:y,ctx:s}),Yo.$set(Aa);const dl={};y&2&&(dl.$$scope={dirty:y,ctx:s}),Jo.$set(dl);const zo={};y&2&&(zo.$$scope={dirty:y,ctx:s}),Zo.$set(zo);const cl={};y&2&&(cl.$$scope={dirty:y,ctx:s}),tn.$set(cl);const pl={};y&2&&(pl.$$scope={dirty:y,ctx:s}),on.$set(pl);const ml={};y&2&&(ml.$$scope={dirty:y,ctx:s}),sn.$set(ml);const hl={};y&2&&(hl.$$scope={dirty:y,ctx:s}),an.$set(hl);const ul={};y&2&&(ul.$$scope={dirty:y,ctx:s}),ln.$set(ul);const fl={};y&2&&(fl.$$scope={dirty:y,ctx:s}),dn.$set(fl);const gl={};y&2&&(gl.$$scope={dirty:y,ctx:s}),pn.$set(gl);const Na={};y&2&&(Na.$$scope={dirty:y,ctx:s}),mn.$set(Na);const _l={};y&2&&(_l.$$scope={dirty:y,ctx:s}),hn.$set(_l);const Co={};y&2&&(Co.$$scope={dirty:y,ctx:s}),fn.$set(Co);const yl={};y&2&&(yl.$$scope={dirty:y,ctx:s}),gn.$set(yl);const kl={};y&2&&(kl.$$scope={dirty:y,ctx:s}),_n.$set(kl);const jo={};y&2&&(jo.$$scope={dirty:y,ctx:s}),kn.$set(jo);const bl={};y&2&&(bl.$$scope={dirty:y,ctx:s}),bn.$set(bl);const wl={};y&2&&(wl.$$scope={dirty:y,ctx:s}),wn.$set(wl);const Pa={};y&2&&(Pa.$$scope={dirty:y,ctx:s}),Tn.$set(Pa);const Tl={};y&2&&(Tl.$$scope={dirty:y,ctx:s}),Mn.$set(Tl);const vl={};y&2&&(vl.$$scope={dirty:y,ctx:s}),$n.$set(vl);const Ml={};y&2&&(Ml.$$scope={dirty:y,ctx:s}),Ln.$set(Ml);const Pt={};y&2&&(Pt.$$scope={dirty:y,ctx:s}),Fn.$set(Pt);const Ot={};y&2&&(Ot.$$scope={dirty:y,ctx:s}),En.$set(Ot);const $l={};y&2&&($l.$$scope={dirty:y,ctx:s}),Xn.$set($l);const Ll={};y&2&&(Ll.$$scope={dirty:y,ctx:s}),qn.$set(Ll);const xl={};y&2&&(xl.$$scope={dirty:y,ctx:s}),Cn.$set(xl);const Ao={};y&2&&(Ao.$$scope={dirty:y,ctx:s}),jn.$set(Ao);const Fl={};y&2&&(Fl.$$scope={dirty:y,ctx:s}),An.$set(Fl);const El={};y&2&&(El.$$scope={dirty:y,ctx:s}),Nn.$set(El)},i(s){rd||($(l.$$.fragment,s),$(w.$$.fragment,s),$(Pe.$$.fragment,s),$(Oe.$$.fragment,s),$(No.$$.fragment,s),$(Vn.$$.fragment,s),$(Yn.$$.fragment,s),$(es.$$.fragment,s),$(os.$$.fragment,s),$(ss.$$.fragment,s),$(Do.$$.fragment,s),$(as.$$.fragment,s),$(rs.$$.fragment,s),$(is.$$.fragment,s),$(ds.$$.fragment,s),$(cs.$$.fragment,s),$(us.$$.fragment,s),$(Wo.$$.fragment,s),$(Ho.$$.fragment,s),$(fs.$$.fragment,s),$(gs.$$.fragment,s),$(bs.$$.fragment,s),$(Uo.$$.fragment,s),$(Bo.$$.fragment,s),$(ws.$$.fragment,s),$(Ts.$$.fragment,s),$(Ls.$$.fragment,s),$(Ro.$$.fragment,s),$(Vo.$$.fragment,s),$(Yo.$$.fragment,s),$(xs.$$.fragment,s),$(Fs.$$.fragment,s),$(zs.$$.fragment,s),$(Jo.$$.fragment,s),$(Zo.$$.fragment,s),$(Cs.$$.fragment,s),$(js.$$.fragment,s),$(Os.$$.fragment,s),$(tn.$$.fragment,s),$(on.$$.fragment,s),$(Ds.$$.fragment,s),$(Ss.$$.fragment,s),$(Qs.$$.fragment,s),$(sn.$$.fragment,s),$(an.$$.fragment,s),$(Us.$$.fragment,s),$(Bs.$$.fragment,s),$(Ys.$$.fragment,s),$(ln.$$.fragment,s),$(dn.$$.fragment,s),$(Gs.$$.fragment,s),$(Js.$$.fragment,s),$(pn.$$.fragment,s),$(oa.$$.fragment,s),$(mn.$$.fragment,s),$(hn.$$.fragment,s),$(na.$$.fragment,s),$(sa.$$.fragment,s),$(fn.$$.fragment,s),$(la.$$.fragment,s),$(gn.$$.fragment,s),$(_n.$$.fragment,s),$(da.$$.fragment,s),$(ca.$$.fragment,s),$(kn.$$.fragment,s),$(ua.$$.fragment,s),$(bn.$$.fragment,s),$(wn.$$.fragment,s),$(Tn.$$.fragment,s),$(fa.$$.fragment,s),$(ga.$$.fragment,s),$(Mn.$$.fragment,s),$(ba.$$.fragment,s),$($n.$$.fragment,s),$(Ln.$$.fragment,s),$(wa.$$.fragment,s),$(Ta.$$.fragment,s),$(Fn.$$.fragment,s),$(La.$$.fragment,s),$(En.$$.fragment,s),$(Xn.$$.fragment,s),$(qn.$$.fragment,s),$(xa.$$.fragment,s),$(Fa.$$.fragment,s),$(Cn.$$.fragment,s),$(za.$$.fragment,s),$(jn.$$.fragment,s),$(An.$$.fragment,s),$(Nn.$$.fragment,s),rd=!0)},o(s){L(l.$$.fragment,s),L(w.$$.fragment,s),L(Pe.$$.fragment,s),L(Oe.$$.fragment,s),L(No.$$.fragment,s),L(Vn.$$.fragment,s),L(Yn.$$.fragment,s),L(es.$$.fragment,s),L(os.$$.fragment,s),L(ss.$$.fragment,s),L(Do.$$.fragment,s),L(as.$$.fragment,s),L(rs.$$.fragment,s),L(is.$$.fragment,s),L(ds.$$.fragment,s),L(cs.$$.fragment,s),L(us.$$.fragment,s),L(Wo.$$.fragment,s),L(Ho.$$.fragment,s),L(fs.$$.fragment,s),L(gs.$$.fragment,s),L(bs.$$.fragment,s),L(Uo.$$.fragment,s),L(Bo.$$.fragment,s),L(ws.$$.fragment,s),L(Ts.$$.fragment,s),L(Ls.$$.fragment,s),L(Ro.$$.fragment,s),L(Vo.$$.fragment,s),L(Yo.$$.fragment,s),L(xs.$$.fragment,s),L(Fs.$$.fragment,s),L(zs.$$.fragment,s),L(Jo.$$.fragment,s),L(Zo.$$.fragment,s),L(Cs.$$.fragment,s),L(js.$$.fragment,s),L(Os.$$.fragment,s),L(tn.$$.fragment,s),L(on.$$.fragment,s),L(Ds.$$.fragment,s),L(Ss.$$.fragment,s),L(Qs.$$.fragment,s),L(sn.$$.fragment,s),L(an.$$.fragment,s),L(Us.$$.fragment,s),L(Bs.$$.fragment,s),L(Ys.$$.fragment,s),L(ln.$$.fragment,s),L(dn.$$.fragment,s),L(Gs.$$.fragment,s),L(Js.$$.fragment,s),L(pn.$$.fragment,s),L(oa.$$.fragment,s),L(mn.$$.fragment,s),L(hn.$$.fragment,s),L(na.$$.fragment,s),L(sa.$$.fragment,s),L(fn.$$.fragment,s),L(la.$$.fragment,s),L(gn.$$.fragment,s),L(_n.$$.fragment,s),L(da.$$.fragment,s),L(ca.$$.fragment,s),L(kn.$$.fragment,s),L(ua.$$.fragment,s),L(bn.$$.fragment,s),L(wn.$$.fragment,s),L(Tn.$$.fragment,s),L(fa.$$.fragment,s),L(ga.$$.fragment,s),L(Mn.$$.fragment,s),L(ba.$$.fragment,s),L($n.$$.fragment,s),L(Ln.$$.fragment,s),L(wa.$$.fragment,s),L(Ta.$$.fragment,s),L(Fn.$$.fragment,s),L(La.$$.fragment,s),L(En.$$.fragment,s),L(Xn.$$.fragment,s),L(qn.$$.fragment,s),L(xa.$$.fragment,s),L(Fa.$$.fragment,s),L(Cn.$$.fragment,s),L(za.$$.fragment,s),L(jn.$$.fragment,s),L(An.$$.fragment,s),L(Nn.$$.fragment,s),rd=!1},d(s){t(d),s&&t(b),s&&t(h),x(l),s&&t(he),s&&t(S),x(w),s&&t(ue),s&&t(W),s&&t(fe),s&&t(D),s&&t(ge),s&&t(H),s&&t(_e),s&&t(Q),s&&t(j),s&&t(de),s&&t(ye),s&&t(ie),s&&t(ke),s&&t(te),s&&t(Se),s&&t(je),x(Pe),s&&t(Ie),s&&t(O),x(Oe),x(No),s&&t(Xl),s&&t(Jt),x(Vn),s&&t(ql),s&&t(Re),x(Yn),x(es),x(os),x(ss),x(Do),x(as),s&&t(zl),s&&t(eo),x(rs),s&&t(Cl),s&&t(to),x(is),s&&t(jl),s&&t(oo),x(ds),s&&t(Al),s&&t(lt),x(cs),x(us),x(Wo),x(Ho),s&&t(Nl),s&&t(so),x(fs),s&&t(Pl),s&&t(dt),x(gs),x(bs),x(Uo),x(Bo),s&&t(Ol),s&&t(ro),x(ws),s&&t(Dl),s&&t(ct),x(Ts),x(Ls),x(Ro),x(Vo),x(Yo),s&&t(Sl),s&&t(lo),x(xs),s&&t(Il),s&&t(pt),x(Fs),x(zs),x(Jo),x(Zo),s&&t(Wl),s&&t(po),x(Cs),s&&t(Hl),s&&t(mt),x(js),x(Os),x(tn),x(on),s&&t(Ql),s&&t(ho),x(Ds),s&&t(Ul),s&&t(ht),x(Ss),x(Qs),x(sn),x(an),s&&t(Bl),s&&t(go),x(Us),s&&t(Kl),s&&t(ut),x(Bs),x(Ys),x(ln),x(dn),s&&t(Rl),s&&t(ko),x(Gs),s&&t(Vl),s&&t(et),x(Js),x(pn),x(oa),x(mn),x(hn),s&&t(Yl),s&&t(wo),x(na),s&&t(Gl),s&&t(tt),x(sa),x(fn),x(la),x(gn),x(_n),s&&t(Jl),s&&t(vo),x(da),s&&t(Zl),s&&t(ot),x(ca),x(kn),x(ua),x(bn),x(wn),x(Tn),s&&t(ed),s&&t($o),x(fa),s&&t(td),s&&t(nt),x(ga),x(Mn),x(ba),x($n),x(Ln),s&&t(od),s&&t(xo),x(wa),s&&t(nd),s&&t(st),x(Ta),x(Fn),x(La),x(En),x(Xn),x(qn),s&&t(sd),s&&t(Eo),x(xa),s&&t(ad),s&&t(at),x(Fa),x(Cn),x(za),x(jn),x(An),x(Nn)}}}const db={local:"xlm",sections:[{local:"overview",title:"Overview"},{local:"transformers.XLMConfig",title:"XLMConfig"},{local:"transformers.XLMTokenizer",title:"XLMTokenizer"},{local:"transformers.models.xlm.modeling_xlm.XLMForQuestionAnsweringOutput",title:"XLM specific outputs"},{local:"transformers.XLMModel",title:"XLMModel"},{local:"transformers.XLMWithLMHeadModel",title:"XLMWithLMHeadModel"},{local:"transformers.XLMForSequenceClassification",title:"XLMForSequenceClassification"},{local:"transformers.XLMForMultipleChoice",title:"XLMForMultipleChoice"},{local:"transformers.XLMForTokenClassification",title:"XLMForTokenClassification"},{local:"transformers.XLMForQuestionAnsweringSimple",title:"XLMForQuestionAnsweringSimple"},{local:"transformers.XLMForQuestionAnswering",title:"XLMForQuestionAnswering"},{local:"transformers.TFXLMModel",title:"TFXLMModel"},{local:"transformers.TFXLMWithLMHeadModel",title:"TFXLMWithLMHeadModel"},{local:"transformers.TFXLMForSequenceClassification",title:"TFXLMForSequenceClassification"},{local:"transformers.TFXLMForMultipleChoice",title:"TFXLMForMultipleChoice"},{local:"transformers.TFXLMForTokenClassification",title:"TFXLMForTokenClassification"},{local:"transformers.TFXLMForQuestionAnsweringSimple",title:"TFXLMForQuestionAnsweringSimple"}],title:"XLM"};function cb(q){return vk(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class _b extends kk{constructor(d){super();bk(this,d,cb,lb,wk,{})}}export{_b as default,db as metadata};
