import{S as s1,i as a1,s as r1,e as a,k as c,w as y,t as n,M as i1,c as r,d as t,m as p,a as i,x as T,h as s,b as u,N as n1,G as e,g,y as w,q as N,o as $,B as x,v as l1,L as Ye}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ze}from"../../chunks/Tip-hf-doc-builder.js";import{D as A}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Ge}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Re}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ve}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function d1(q){let d,b,h,f,v;return f=new Ge({props:{code:`from transformers import XLNetConfig, XLNetModel

# Initializing a XLNet configuration
configuration = XLNetConfig()

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

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

<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 = XLNetModel(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=n("Examples:"),h=c(),y(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);b=s(m,"Examples:"),m.forEach(t),h=p(l),T(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,b),g(l,h,m),w(f,l,m),v=!0},p:Ye,i(l){v||(N(f.$$.fragment,l),v=!0)},o(l){$(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(h),x(f,l)}}}function c1(q){let d,b,h,f,v;return f=new Ge({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=n("sequence pair mask has the following format:"),h=c(),y(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);b=s(m,"sequence pair mask has the following format:"),m.forEach(t),h=p(l),T(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,b),g(l,h,m),w(f,l,m),v=!0},p:Ye,i(l){v||(N(f.$$.fragment,l),v=!0)},o(l){$(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(h),x(f,l)}}}function p1(q){let d,b,h,f,v;return f=new Ge({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=n("sequence pair mask has the following format:"),h=c(),y(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);b=s(m,"sequence pair mask has the following format:"),m.forEach(t),h=p(l),T(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,b),g(l,h,m),w(f,l,m),v=!0},p:Ye,i(l){v||(N(f.$$.fragment,l),v=!0)},o(l){$(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(h),x(f,l)}}}function m1(q){let d,b,h,f,v;return{c(){d=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),v=n(`
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 m=i(d);b=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var M=i(h);f=s(M,"Module"),M.forEach(t),v=s(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,b),e(d,h),e(h,f),e(d,v)},d(l){l&&t(d)}}}function h1(q){let d,b,h,f,v;return f=new Ge({props:{code:`from transformers import AutoTokenizer, XLNetModel
import torch

tokenizer = AutoTokenizer.from_pretrained("xlnet-base-cased")
model = XLNetModel.from_pretrained("xlnet-base-cased")

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, XLNetModel
<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;xlnet-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLNetModel.from_pretrained(<span class="hljs-string">&quot;xlnet-base-cased&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=n("Example:"),h=c(),y(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);b=s(m,"Example:"),m.forEach(t),h=p(l),T(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,b),g(l,h,m),w(f,l,m),v=!0},p:Ye,i(l){v||(N(f.$$.fragment,l),v=!0)},o(l){$(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(h),x(f,l)}}}function u1(q){let d,b,h,f,v;return{c(){d=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),v=n(`
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 m=i(d);b=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var M=i(h);f=s(M,"Module"),M.forEach(t),v=s(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,b),e(d,h),e(h,f),e(d,v)},d(l){l&&t(d)}}}function f1(q){let d,b,h,f,v;return f=new Ge({props:{code:`from transformers import AutoTokenizer, XLNetLMHeadModel
import torch

tokenizer = AutoTokenizer.from_pretrained("xlnet-large-cased")
model = XLNetLMHeadModel.from_pretrained("xlnet-large-cased")

# We show how to setup inputs to predict a next token using a bi-directional context.
input_ids = torch.tensor(
    tokenizer.encode("Hello, my dog is very <mask>", add_special_tokens=False)
).unsqueeze(
    0
)  # We will predict the masked token
perm_mask = torch.zeros((1, input_ids.shape[1], input_ids.shape[1]), dtype=torch.float)
perm_mask[:, :, -1] = 1.0  # Previous tokens don't see last token
target_mapping = torch.zeros(
    (1, 1, input_ids.shape[1]), dtype=torch.float
)  # Shape [1, 1, seq_length] => let's predict one token
target_mapping[
    0, 0, -1
] = 1.0  # Our first (and only) prediction will be the last token of the sequence (the masked token)

outputs = model(input_ids, perm_mask=perm_mask, target_mapping=target_mapping)
next_token_logits = outputs[
    0
]  # Output has shape [target_mapping.size(0), target_mapping.size(1), config.vocab_size]

# The same way can the XLNetLMHeadModel be used to be trained by standard auto-regressive language modeling.
input_ids = torch.tensor(
    tokenizer.encode("Hello, my dog is very <mask>", add_special_tokens=False)
).unsqueeze(
    0
)  # We will predict the masked token
labels = torch.tensor(tokenizer.encode("cute", add_special_tokens=False)).unsqueeze(0)
assert labels.shape[0] == 1, "only one word will be predicted"
perm_mask = torch.zeros((1, input_ids.shape[1], input_ids.shape[1]), dtype=torch.float)
perm_mask[
    :, :, -1
] = 1.0  # Previous tokens don't see last token as is done in standard auto-regressive lm training
target_mapping = torch.zeros(
    (1, 1, input_ids.shape[1]), dtype=torch.float
)  # Shape [1, 1, seq_length] => let's predict one token
target_mapping[
    0, 0, -1
] = 1.0  # Our first (and only) prediction will be the last token of the sequence (the masked token)

outputs = model(input_ids, perm_mask=perm_mask, target_mapping=target_mapping, labels=labels)
loss = outputs.loss
next_token_logits = (
    outputs.logits
)  # Logits have shape [target_mapping.size(0), target_mapping.size(1), config.vocab_size]`,highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, XLNetLMHeadModel
<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;xlnet-large-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLNetLMHeadModel.from_pretrained(<span class="hljs-string">&quot;xlnet-large-cased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># We show how to setup inputs to predict a next token using a bi-directional context.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = torch.tensor(
<span class="hljs-meta">... </span>    tokenizer.encode(<span class="hljs-string">&quot;Hello, my dog is very &lt;mask&gt;&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>)
<span class="hljs-meta">... </span>).unsqueeze(
<span class="hljs-meta">... </span>    <span class="hljs-number">0</span>
<span class="hljs-meta">... </span>)  <span class="hljs-comment"># We will predict the masked token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>perm_mask = torch.zeros((<span class="hljs-number">1</span>, input_ids.shape[<span class="hljs-number">1</span>], input_ids.shape[<span class="hljs-number">1</span>]), dtype=torch.<span class="hljs-built_in">float</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>perm_mask[:, :, -<span class="hljs-number">1</span>] = <span class="hljs-number">1.0</span>  <span class="hljs-comment"># Previous tokens don&#x27;t see last token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_mapping = torch.zeros(
<span class="hljs-meta">... </span>    (<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, input_ids.shape[<span class="hljs-number">1</span>]), dtype=torch.<span class="hljs-built_in">float</span>
<span class="hljs-meta">... </span>)  <span class="hljs-comment"># Shape [1, 1, seq_length] =&gt; let&#x27;s predict one token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_mapping[
<span class="hljs-meta">... </span>    <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, -<span class="hljs-number">1</span>
<span class="hljs-meta">... </span>] = <span class="hljs-number">1.0</span>  <span class="hljs-comment"># Our first (and only) prediction will be the last token of the sequence (the masked token)</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(input_ids, perm_mask=perm_mask, target_mapping=target_mapping)
<span class="hljs-meta">&gt;&gt;&gt; </span>next_token_logits = outputs[
<span class="hljs-meta">... </span>    <span class="hljs-number">0</span>
<span class="hljs-meta">... </span>]  <span class="hljs-comment"># Output has shape [target_mapping.size(0), target_mapping.size(1), config.vocab_size]</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># The same way can the XLNetLMHeadModel be used to be trained by standard auto-regressive language modeling.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = torch.tensor(
<span class="hljs-meta">... </span>    tokenizer.encode(<span class="hljs-string">&quot;Hello, my dog is very &lt;mask&gt;&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>)
<span class="hljs-meta">... </span>).unsqueeze(
<span class="hljs-meta">... </span>    <span class="hljs-number">0</span>
<span class="hljs-meta">... </span>)  <span class="hljs-comment"># We will predict the masked token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor(tokenizer.encode(<span class="hljs-string">&quot;cute&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>)).unsqueeze(<span class="hljs-number">0</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">assert</span> labels.shape[<span class="hljs-number">0</span>] == <span class="hljs-number">1</span>, <span class="hljs-string">&quot;only one word will be predicted&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>perm_mask = torch.zeros((<span class="hljs-number">1</span>, input_ids.shape[<span class="hljs-number">1</span>], input_ids.shape[<span class="hljs-number">1</span>]), dtype=torch.<span class="hljs-built_in">float</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>perm_mask[
<span class="hljs-meta">... </span>    :, :, -<span class="hljs-number">1</span>
<span class="hljs-meta">... </span>] = <span class="hljs-number">1.0</span>  <span class="hljs-comment"># Previous tokens don&#x27;t see last token as is done in standard auto-regressive lm training</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_mapping = torch.zeros(
<span class="hljs-meta">... </span>    (<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, input_ids.shape[<span class="hljs-number">1</span>]), dtype=torch.<span class="hljs-built_in">float</span>
<span class="hljs-meta">... </span>)  <span class="hljs-comment"># Shape [1, 1, seq_length] =&gt; let&#x27;s predict one token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_mapping[
<span class="hljs-meta">... </span>    <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, -<span class="hljs-number">1</span>
<span class="hljs-meta">... </span>] = <span class="hljs-number">1.0</span>  <span class="hljs-comment"># Our first (and only) prediction will be the last token of the sequence (the masked token)</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(input_ids, perm_mask=perm_mask, target_mapping=target_mapping, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>next_token_logits = (
<span class="hljs-meta">... </span>    outputs.logits
<span class="hljs-meta">... </span>)  <span class="hljs-comment"># Logits have shape [target_mapping.size(0), target_mapping.size(1), config.vocab_size]</span>`}}),{c(){d=a("p"),b=n("Examples:"),h=c(),y(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);b=s(m,"Examples:"),m.forEach(t),h=p(l),T(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,b),g(l,h,m),w(f,l,m),v=!0},p:Ye,i(l){v||(N(f.$$.fragment,l),v=!0)},o(l){$(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(h),x(f,l)}}}function g1(q){let d,b,h,f,v;return{c(){d=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),v=n(`
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 m=i(d);b=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var M=i(h);f=s(M,"Module"),M.forEach(t),v=s(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,b),e(d,h),e(h,f),e(d,v)},d(l){l&&t(d)}}}function _1(q){let d,b,h,f,v;return f=new Ge({props:{code:`import torch
from transformers import AutoTokenizer, XLNetForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("xlnet-base-cased")
model = XLNetForSequenceClassification.from_pretrained("xlnet-base-cased")

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 = XLNetForSequenceClassification.from_pretrained("xlnet-base-cased", 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, XLNetForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlnet-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLNetForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;xlnet-base-cased&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 = XLNetForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;xlnet-base-cased&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=n("Example of single-label classification:"),h=c(),y(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);b=s(m,"Example of single-label classification:"),m.forEach(t),h=p(l),T(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,b),g(l,h,m),w(f,l,m),v=!0},p:Ye,i(l){v||(N(f.$$.fragment,l),v=!0)},o(l){$(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(h),x(f,l)}}}function k1(q){let d,b,h,f,v;return f=new Ge({props:{code:`import torch
from transformers import AutoTokenizer, XLNetForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("xlnet-base-cased")
model = XLNetForSequenceClassification.from_pretrained("xlnet-base-cased", 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 = XLNetForSequenceClassification.from_pretrained(
    "xlnet-base-cased", 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, XLNetForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlnet-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLNetForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;xlnet-base-cased&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 = XLNetForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;xlnet-base-cased&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=n("Example of multi-label classification:"),h=c(),y(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);b=s(m,"Example of multi-label classification:"),m.forEach(t),h=p(l),T(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,b),g(l,h,m),w(f,l,m),v=!0},p:Ye,i(l){v||(N(f.$$.fragment,l),v=!0)},o(l){$(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(h),x(f,l)}}}function v1(q){let d,b,h,f,v;return{c(){d=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),v=n(`
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 m=i(d);b=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var M=i(h);f=s(M,"Module"),M.forEach(t),v=s(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,b),e(d,h),e(h,f),e(d,v)},d(l){l&&t(d)}}}function b1(q){let d,b,h,f,v;return f=new Ge({props:{code:`from transformers import AutoTokenizer, XLNetForMultipleChoice
import torch

tokenizer = AutoTokenizer.from_pretrained("xlnet-base-cased")
model = XLNetForMultipleChoice.from_pretrained("xlnet-base-cased")

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, XLNetForMultipleChoice
<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;xlnet-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLNetForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;xlnet-base-cased&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=n("Example:"),h=c(),y(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);b=s(m,"Example:"),m.forEach(t),h=p(l),T(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,b),g(l,h,m),w(f,l,m),v=!0},p:Ye,i(l){v||(N(f.$$.fragment,l),v=!0)},o(l){$(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(h),x(f,l)}}}function y1(q){let d,b,h,f,v;return{c(){d=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),v=n(`
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 m=i(d);b=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var M=i(h);f=s(M,"Module"),M.forEach(t),v=s(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,b),e(d,h),e(h,f),e(d,v)},d(l){l&&t(d)}}}function T1(q){let d,b,h,f,v;return f=new Ge({props:{code:`from transformers import AutoTokenizer, XLNetForTokenClassification
import torch

tokenizer = AutoTokenizer.from_pretrained("xlnet-base-cased")
model = XLNetForTokenClassification.from_pretrained("xlnet-base-cased")

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, XLNetForTokenClassification
<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;xlnet-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLNetForTokenClassification.from_pretrained(<span class="hljs-string">&quot;xlnet-base-cased&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=n("Example:"),h=c(),y(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);b=s(m,"Example:"),m.forEach(t),h=p(l),T(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,b),g(l,h,m),w(f,l,m),v=!0},p:Ye,i(l){v||(N(f.$$.fragment,l),v=!0)},o(l){$(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(h),x(f,l)}}}function w1(q){let d,b,h,f,v;return{c(){d=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),v=n(`
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 m=i(d);b=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var M=i(h);f=s(M,"Module"),M.forEach(t),v=s(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,b),e(d,h),e(h,f),e(d,v)},d(l){l&&t(d)}}}function N1(q){let d,b,h,f,v;return f=new Ge({props:{code:`from transformers import AutoTokenizer, XLNetForQuestionAnsweringSimple
import torch

tokenizer = AutoTokenizer.from_pretrained("xlnet-base-cased")
model = XLNetForQuestionAnsweringSimple.from_pretrained("xlnet-base-cased")

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, XLNetForQuestionAnsweringSimple
<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;xlnet-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = XLNetForQuestionAnsweringSimple.from_pretrained(<span class="hljs-string">&quot;xlnet-base-cased&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=n("Example:"),h=c(),y(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);b=s(m,"Example:"),m.forEach(t),h=p(l),T(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,b),g(l,h,m),w(f,l,m),v=!0},p:Ye,i(l){v||(N(f.$$.fragment,l),v=!0)},o(l){$(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(h),x(f,l)}}}function $1(q){let d,b,h,f,v;return{c(){d=a("p"),b=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),v=n(`
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 m=i(d);b=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var M=i(h);f=s(M,"Module"),M.forEach(t),v=s(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){g(l,d,m),e(d,b),e(d,h),e(h,f),e(d,v)},d(l){l&&t(d)}}}function x1(q){let d,b,h,f,v;return f=new Ge({props:{code:`from transformers import AutoTokenizer, XLNetForQuestionAnswering
import torch

tokenizer = AutoTokenizer.from_pretrained("xlnet-base-cased")
model = XLNetForQuestionAnswering.from_pretrained("xlnet-base-cased")

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

tokenizer = AutoTokenizer.from_pretrained("xlnet-base-cased")
model = TFXLNetModel.from_pretrained("xlnet-base-cased")

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

tokenizer = AutoTokenizer.from_pretrained("xlnet-large-cased")
model = TFXLNetLMHeadModel.from_pretrained("xlnet-large-cased")

# We show how to setup inputs to predict a next token using a bi-directional context.
input_ids = tf.constant(tokenizer.encode("Hello, my dog is very <mask>", add_special_tokens=True))[
    None, :
]  # We will predict the masked token

perm_mask = np.zeros((1, input_ids.shape[1], input_ids.shape[1]))
perm_mask[:, :, -1] = 1.0  # Previous tokens don't see last token

target_mapping = np.zeros(
    (1, 1, input_ids.shape[1])
)  # Shape [1, 1, seq_length] => let's predict one token
target_mapping[
    0, 0, -1
] = 1.0  # Our first (and only) prediction will be the last token of the sequence (the masked token)

outputs = model(
    input_ids,
    perm_mask=tf.constant(perm_mask, dtype=tf.float32),
    target_mapping=tf.constant(target_mapping, dtype=tf.float32),
)

next_token_logits = outputs[
    0
]  # Output has shape [target_mapping.size(0), target_mapping.size(1), config.vocab_size]`,highlighted:`<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><span class="hljs-keyword">import</span> numpy <span class="hljs-keyword">as</span> np
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFXLNetLMHeadModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;xlnet-large-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLNetLMHeadModel.from_pretrained(<span class="hljs-string">&quot;xlnet-large-cased&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># We show how to setup inputs to predict a next token using a bi-directional context.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>input_ids = tf.constant(tokenizer.encode(<span class="hljs-string">&quot;Hello, my dog is very &lt;mask&gt;&quot;</span>, add_special_tokens=<span class="hljs-literal">True</span>))[
<span class="hljs-meta">... </span>    <span class="hljs-literal">None</span>, :
<span class="hljs-meta">... </span>]  <span class="hljs-comment"># We will predict the masked token</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>perm_mask = np.zeros((<span class="hljs-number">1</span>, input_ids.shape[<span class="hljs-number">1</span>], input_ids.shape[<span class="hljs-number">1</span>]))
<span class="hljs-meta">&gt;&gt;&gt; </span>perm_mask[:, :, -<span class="hljs-number">1</span>] = <span class="hljs-number">1.0</span>  <span class="hljs-comment"># Previous tokens don&#x27;t see last token</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>target_mapping = np.zeros(
<span class="hljs-meta">... </span>    (<span class="hljs-number">1</span>, <span class="hljs-number">1</span>, input_ids.shape[<span class="hljs-number">1</span>])
<span class="hljs-meta">... </span>)  <span class="hljs-comment"># Shape [1, 1, seq_length] =&gt; let&#x27;s predict one token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_mapping[
<span class="hljs-meta">... </span>    <span class="hljs-number">0</span>, <span class="hljs-number">0</span>, -<span class="hljs-number">1</span>
<span class="hljs-meta">... </span>] = <span class="hljs-number">1.0</span>  <span class="hljs-comment"># Our first (and only) prediction will be the last token of the sequence (the masked token)</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(
<span class="hljs-meta">... </span>    input_ids,
<span class="hljs-meta">... </span>    perm_mask=tf.constant(perm_mask, dtype=tf.float32),
<span class="hljs-meta">... </span>    target_mapping=tf.constant(target_mapping, dtype=tf.float32),
<span class="hljs-meta">... </span>)

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

tokenizer = AutoTokenizer.from_pretrained("xlnet-base-cased")
model = TFXLNetForSequenceClassification.from_pretrained("xlnet-base-cased")

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

tokenizer = AutoTokenizer.from_pretrained("xlnet-base-cased")
model = TFXLNetForMultipleChoice.from_pretrained("xlnet-base-cased")

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

tokenizer = AutoTokenizer.from_pretrained("xlnet-base-cased")
model = TFXLNetForTokenClassification.from_pretrained("xlnet-base-cased")

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

tokenizer = AutoTokenizer.from_pretrained("xlnet-base-cased")
model = TFXLNetForQuestionAnsweringSimple.from_pretrained("xlnet-base-cased")

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, TFXLNetForQuestionAnsweringSimple
<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;xlnet-base-cased&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFXLNetForQuestionAnsweringSimple.from_pretrained(<span class="hljs-string">&quot;xlnet-base-cased&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=n("Example:"),h=c(),y(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);b=s(m,"Example:"),m.forEach(t),h=p(l),T(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,b),g(l,h,m),w(f,l,m),v=!0},p:Ye,i(l){v||(N(f.$$.fragment,l),v=!0)},o(l){$(f.$$.fragment,l),v=!1},d(l){l&&t(d),l&&t(h),x(f,l)}}}function B1(q){let d,b;return d=new Ge({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(){y(d.$$.fragment)},l(h){T(d.$$.fragment,h)},m(h,f){w(d,h,f),b=!0},p:Ye,i(h){b||(N(d.$$.fragment,h),b=!0)},o(h){$(d.$$.fragment,h),b=!1},d(h){x(d,h)}}}function R1(q){let d,b,h,f,v,l,m,M,ye,_e,P,me,te,L,Te,Q,he,Ee,V,re,le,U,de,we,W,Ne,ke,I,$e,ce,ie,z,C,ue,J,ve,fe,K,xe,be,E,Le,Y,G,pe,Z,ge,Fe,S,Xe,H,qe,oe,j,Me,O,ne,ze,k,F,Oe,se,Ae,Pe,X,Se,De,Ie,Ce,He,D,B,Qe,Ue,R,We,je,ae,Ke,ee,Be,Om,vs,Am,Pm,vc,oo,tn,hl,bs,Sm,ul,Dm,bc,ft,fl,Kr,Im,Hm,gl,Br,Qm,Um,_l,Rr,Wm,Km,kl,Vr,Bm,Rm,vl,Yr,Vm,yc,no,on,bl,ys,Ym,yl,Gm,Tc,yt,Ts,Jm,Dt,Zm,Gr,eh,th,Jr,oh,nh,ws,sh,ah,rh,so,ih,Zr,lh,dh,ei,ch,ph,mh,nn,wc,ao,sn,Tl,Ns,hh,wl,uh,Nc,Je,$s,fh,xs,gh,Ls,_h,kh,vh,Fs,bh,ti,yh,Th,wh,Ht,Xs,Nh,Nl,$h,xh,qs,oi,Lh,$l,Fh,Xh,ni,qh,xl,Mh,zh,an,Ms,Eh,zs,Ch,Ll,jh,Oh,Ah,wt,Es,Ph,Fl,Sh,Dh,rn,Ih,ro,Hh,Xl,Qh,Uh,ql,Wh,Kh,Bh,si,Cs,$c,io,ln,Ml,js,Rh,zl,Vh,xc,rt,Os,Yh,lo,Gh,El,Jh,Zh,As,eu,tu,ou,Ps,nu,ai,su,au,ru,Qt,Ss,iu,Cl,lu,du,Ds,ri,cu,jl,pu,mu,ii,hu,Ol,uu,fu,Nt,Is,gu,Al,_u,ku,dn,vu,co,bu,Pl,yu,Tu,Sl,wu,Nu,Lc,po,cn,Dl,Hs,$u,Il,xu,Fc,mo,Qs,Lu,Us,Fu,li,Xu,qu,Xc,ho,Ws,Mu,Ks,zu,di,Eu,Cu,qc,uo,Bs,ju,Rs,Ou,ci,Au,Pu,Mc,fo,Vs,Su,Ys,Du,pi,Iu,Hu,zc,go,Gs,Qu,Js,Uu,Hl,Wu,Ku,Ec,_o,Zs,Bu,ea,Ru,mi,Vu,Yu,Cc,ko,ta,Gu,oa,Ju,hi,Zu,ef,jc,vo,na,tf,sa,of,ui,nf,sf,Oc,bo,aa,af,ra,rf,fi,lf,df,Ac,yo,ia,cf,la,pf,gi,mf,hf,Pc,To,da,uf,ca,ff,_i,gf,_f,Sc,wo,pa,kf,ma,vf,Ql,bf,yf,Dc,No,ha,Tf,ua,wf,ki,Nf,$f,Ic,$o,pn,Ul,fa,xf,Wl,Lf,Hc,it,ga,Ff,Kl,Xf,qf,_a,Mf,vi,zf,Ef,Cf,ka,jf,va,Of,Af,Pf,$t,ba,Sf,xo,Df,bi,If,Hf,Bl,Qf,Uf,Wf,mn,Kf,hn,Qc,Lo,un,Rl,ya,Bf,Vl,Rf,Uc,lt,Ta,Vf,Yl,Yf,Gf,wa,Jf,yi,Zf,eg,tg,Na,og,$a,ng,sg,ag,xt,xa,rg,Fo,ig,Ti,lg,dg,Gl,cg,pg,mg,fn,hg,gn,Wc,Xo,_n,Jl,La,ug,Zl,fg,Kc,dt,Fa,gg,ed,_g,kg,Xa,vg,wi,bg,yg,Tg,qa,wg,Ma,Ng,$g,xg,gt,za,Lg,qo,Fg,Ni,Xg,qg,td,Mg,zg,Eg,kn,Cg,vn,jg,bn,Bc,Mo,yn,od,Ea,Og,nd,Ag,Rc,ct,Ca,Pg,sd,Sg,Dg,ja,Ig,$i,Hg,Qg,Ug,Oa,Wg,Aa,Kg,Bg,Rg,Lt,Pa,Vg,zo,Yg,xi,Gg,Jg,ad,Zg,e_,t_,Tn,o_,wn,Vc,Eo,Nn,rd,Sa,n_,id,s_,Yc,pt,Da,a_,ld,r_,i_,Ia,l_,Li,d_,c_,p_,Ha,m_,Qa,h_,u_,f_,Ft,Ua,g_,Co,__,Fi,k_,v_,dd,b_,y_,T_,$n,w_,xn,Gc,jo,Ln,cd,Wa,N_,pd,$_,Jc,mt,Ka,x_,Oo,L_,md,F_,X_,hd,q_,M_,z_,Ba,E_,Xi,C_,j_,O_,Ra,A_,Va,P_,S_,D_,Xt,Ya,I_,Ao,H_,qi,Q_,U_,ud,W_,K_,B_,Fn,R_,Xn,Zc,Po,qn,fd,Ga,V_,gd,Y_,ep,ht,Ja,G_,So,J_,_d,Z_,ek,kd,tk,ok,nk,Za,sk,Mi,ak,rk,ik,er,lk,tr,dk,ck,pk,qt,or,mk,Do,hk,zi,uk,fk,vd,gk,_k,kk,Mn,vk,zn,tp,Io,En,bd,nr,bk,yd,yk,op,et,sr,Tk,Td,wk,Nk,ar,$k,Ei,xk,Lk,Fk,rr,Xk,ir,qk,Mk,zk,Cn,Ek,Mt,lr,Ck,Ho,jk,Ci,Ok,Ak,wd,Pk,Sk,Dk,jn,Ik,On,np,Qo,An,Nd,dr,Hk,$d,Qk,sp,tt,cr,Uk,xd,Wk,Kk,pr,Bk,ji,Rk,Vk,Yk,mr,Gk,hr,Jk,Zk,ev,Pn,tv,zt,ur,ov,Uo,nv,Oi,sv,av,Ld,rv,iv,lv,Sn,dv,Dn,ap,Wo,In,Fd,fr,cv,Xd,pv,rp,ot,gr,mv,qd,hv,uv,_r,fv,Ai,gv,_v,kv,kr,vv,vr,bv,yv,Tv,Hn,wv,_t,br,Nv,Ko,$v,Pi,xv,Lv,Md,Fv,Xv,qv,Qn,Mv,Un,zv,Wn,ip,Bo,Kn,zd,yr,Ev,Ed,Cv,lp,nt,Tr,jv,Cd,Ov,Av,wr,Pv,Si,Sv,Dv,Iv,Nr,Hv,$r,Qv,Uv,Wv,Bn,Kv,Et,xr,Bv,Ro,Rv,Di,Vv,Yv,jd,Gv,Jv,Zv,Rn,eb,Vn,dp,Vo,Yn,Od,Lr,tb,Ad,ob,cp,st,Fr,nb,Pd,sb,ab,Xr,rb,Ii,ib,lb,db,qr,cb,Mr,pb,mb,hb,Gn,ub,kt,zr,fb,Yo,gb,Hi,_b,kb,Sd,vb,bb,yb,Jn,Tb,Zn,wb,es,pp,Go,ts,Dd,Er,Nb,Id,$b,mp,at,Cr,xb,Jo,Lb,Hd,Fb,Xb,Qd,qb,Mb,zb,jr,Eb,Qi,Cb,jb,Ob,Or,Ab,Ar,Pb,Sb,Db,os,Ib,vt,Pr,Hb,Zo,Qb,Ui,Ub,Wb,Ud,Kb,Bb,Rb,ns,Vb,ss,Yb,as,hp;return l=new Re({}),de=new Re({}),bs=new Re({}),ys=new Re({}),Ts=new A({props:{name:"class transformers.XLNetConfig",anchor:"transformers.XLNetConfig",parameters:[{name:"vocab_size",val:" = 32000"},{name:"d_model",val:" = 1024"},{name:"n_layer",val:" = 24"},{name:"n_head",val:" = 16"},{name:"d_inner",val:" = 4096"},{name:"ff_activation",val:" = 'gelu'"},{name:"untie_r",val:" = True"},{name:"attn_type",val:" = 'bi'"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"dropout",val:" = 0.1"},{name:"mem_len",val:" = 512"},{name:"reuse_len",val:" = None"},{name:"use_mems_eval",val:" = True"},{name:"use_mems_train",val:" = False"},{name:"bi_data",val:" = False"},{name:"clamp_len",val:" = -1"},{name:"same_length",val:" = False"},{name:"summary_type",val:" = 'last'"},{name:"summary_use_proj",val:" = True"},{name:"summary_activation",val:" = 'tanh'"},{name:"summary_last_dropout",val:" = 0.1"},{name:"start_n_top",val:" = 5"},{name:"end_n_top",val:" = 5"},{name:"pad_token_id",val:" = 5"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XLNetConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32000) &#x2014;
Vocabulary size of the XLNet model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetModel">XLNetModel</a> or <a href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.TFXLNetModel">TFXLNetModel</a>.`,name:"vocab_size"},{anchor:"transformers.XLNetConfig.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimensionality of the encoder layers and the pooler layer.`,name:"d_model"},{anchor:"transformers.XLNetConfig.n_layer",description:`<strong>n_layer</strong> (<code>int</code>, <em>optional</em>, defaults to 24) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"n_layer"},{anchor:"transformers.XLNetConfig.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.XLNetConfig.d_inner",description:`<strong>d_inner</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Dimensionality of the &#x201C;intermediate&#x201D; (often named feed-forward) layer in the Transformer encoder.`,name:"d_inner"},{anchor:"transformers.XLNetConfig.ff_activation",description:`<strong>ff_activation</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;gelu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the If string, <code>&quot;gelu&quot;</code>, <code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and
<code>&quot;gelu_new&quot;</code> are supported.`,name:"ff_activation"},{anchor:"transformers.XLNetConfig.untie_r",description:`<strong>untie_r</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to untie relative position biases`,name:"untie_r"},{anchor:"transformers.XLNetConfig.attn_type",description:`<strong>attn_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;bi&quot;</code>) &#x2014;
The attention type used by the model. Set <code>&quot;bi&quot;</code> for XLNet, <code>&quot;uni&quot;</code> for Transformer-XL.`,name:"attn_type"},{anchor:"transformers.XLNetConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.XLNetConfig.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.XLNetConfig.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.XLNetConfig.mem_len",description:`<strong>mem_len</strong> (<code>int</code> or <code>None</code>, <em>optional</em>) &#x2014;
The number of tokens to cache. The key/value pairs that have already been pre-computed in a previous
forward pass won&#x2019;t be re-computed. See the
<a href="https://huggingface.co/transformers/quickstart.html#using-the-past" rel="nofollow">quickstart</a> for more information.`,name:"mem_len"},{anchor:"transformers.XLNetConfig.reuse_len",description:`<strong>reuse_len</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of tokens in the current batch to be cached and reused in the future.`,name:"reuse_len"},{anchor:"transformers.XLNetConfig.bi_data",description:`<strong>bi_data</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use bidirectional input pipeline. Usually set to <code>True</code> during pretraining and <code>False</code>
during finetuning.`,name:"bi_data"},{anchor:"transformers.XLNetConfig.clamp_len",description:`<strong>clamp_len</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Clamp all relative distances larger than clamp_len. Setting this attribute to -1 means no clamping.`,name:"clamp_len"},{anchor:"transformers.XLNetConfig.same_length",description:`<strong>same_length</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the same attention length for each token.`,name:"same_length"},{anchor:"transformers.XLNetConfig.summary_type",description:`<strong>summary_type</strong> (<code>str</code>, <em>optional</em>, defaults to &#x201C;last&#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.XLNetConfig.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.XLNetConfig.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.XLNetConfig.summary_proj_to_labels",description:`<strong>summary_proj_to_labels</strong> (<code>boo</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.XLNetConfig.summary_last_dropout",description:`<strong>summary_last_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_last_dropout"},{anchor:"transformers.XLNetConfig.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.XLNetConfig.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.XLNetConfig.use_mems_eval",description:`<strong>use_mems_eval</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should make use of the recurrent memory mechanism in evaluation mode.`,name:"use_mems_eval"},{anchor:"transformers.XLNetConfig.use_mems_train",description:`<strong>use_mems_train</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the model should make use of the recurrent memory mechanism in train mode.</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>For pretraining, it is recommended to set <code>use_mems_train</code> to <code>True</code>. For fine-tuning, it is recommended to
set <code>use_mems_train</code> to <code>False</code> as discussed
<a href="https://github.com/zihangdai/xlnet/issues/41#issuecomment-505102587" rel="nofollow">here</a>. If <code>use_mems_train</code> is set to
<code>True</code>, one has to make sure that the train batches are correctly pre-processed, <em>e.g.</em> <code>batch_1 = [[This line is], [This is the]]</code> and <code>batch_2 = [[ the first line], [ second line]]</code> and that all batches are of
equal size.</p>

					</div>`,name:"use_mems_train"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/configuration_xlnet.py#L32"}}),nn=new Ve({props:{anchor:"transformers.XLNetConfig.example",$$slots:{default:[d1]},$$scope:{ctx:q}}}),Ns=new Re({}),$s=new A({props:{name:"class transformers.XLNetTokenizer",anchor:"transformers.XLNetTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = False"},{name:"remove_space",val:" = True"},{name:"keep_accents",val:" = False"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"sep_token",val:" = '<sep>'"},{name:"pad_token",val:" = '<pad>'"},{name:"cls_token",val:" = '<cls>'"},{name:"mask_token",val:" = '<mask>'"},{name:"additional_special_tokens",val:" = ['<eop>', '<eod>']"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XLNetTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a .spm extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.XLNetTokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.XLNetTokenizer.remove_space",description:`<strong>remove_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to strip the text when tokenizing (removing excess spaces before and after the string).`,name:"remove_space"},{anchor:"transformers.XLNetTokenizer.keep_accents",description:`<strong>keep_accents</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to keep accents when tokenizing.`,name:"keep_accents"},{anchor:"transformers.XLNetTokenizer.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.XLNetTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence 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 end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.XLNetTokenizer.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.XLNetTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;sep&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.XLNetTokenizer.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.XLNetTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;cls&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.XLNetTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&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.XLNetTokenizer.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;&lt;eop&gt;&quot;, &quot;&lt;eod&gt;&quot;]</code>) &#x2014;
Additional special tokens used by the tokenizer.`,name:"additional_special_tokens"},{anchor:"transformers.XLNetTokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"},{anchor:"transformers.XLNetTokenizer.sp_model",description:`<strong>sp_model</strong> (<code>SentencePieceProcessor</code>) &#x2014;
The <em>SentencePiece</em> processor that is used for every conversion (string, tokens and IDs).`,name:"sp_model"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/tokenization_xlnet.py#L53"}}),Xs=new A({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.XLNetTokenizer.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.XLNetTokenizer.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.XLNetTokenizer.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/v4.29.0/src/transformers/models/xlnet/tokenization_xlnet.py#L298",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>
`}}),Ms=new A({props:{name:"get_special_tokens_mask",anchor:"transformers.XLNetTokenizer.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.XLNetTokenizer.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.XLNetTokenizer.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.XLNetTokenizer.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/v4.29.0/src/transformers/models/xlnet/tokenization_xlnet.py#L323",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>
`}}),Es=new A({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.XLNetTokenizer.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.XLNetTokenizer.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.XLNetTokenizer.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/v4.29.0/src/transformers/models/xlnet/tokenization_xlnet.py#L351",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>
`}}),rn=new Ve({props:{anchor:"transformers.XLNetTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[c1]},$$scope:{ctx:q}}}),Cs=new A({props:{name:"save_vocabulary",anchor:"transformers.XLNetTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/tokenization_xlnet.py#L381"}}),js=new Re({}),Os=new A({props:{name:"class transformers.XLNetTokenizerFast",anchor:"transformers.XLNetTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = False"},{name:"remove_space",val:" = True"},{name:"keep_accents",val:" = False"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"sep_token",val:" = '<sep>'"},{name:"pad_token",val:" = '<pad>'"},{name:"cls_token",val:" = '<cls>'"},{name:"mask_token",val:" = '<mask>'"},{name:"additional_special_tokens",val:" = ['<eop>', '<eod>']"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XLNetTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a .spm extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.XLNetTokenizerFast.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.XLNetTokenizerFast.remove_space",description:`<strong>remove_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to strip the text when tokenizing (removing excess spaces before and after the string).`,name:"remove_space"},{anchor:"transformers.XLNetTokenizerFast.keep_accents",description:`<strong>keep_accents</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to keep accents when tokenizing.`,name:"keep_accents"},{anchor:"transformers.XLNetTokenizerFast.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.XLNetTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence 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 end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.XLNetTokenizerFast.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.XLNetTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;sep&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.XLNetTokenizerFast.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.XLNetTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;cls&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.XLNetTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;mask&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.XLNetTokenizerFast.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;&lt;eop&gt;&quot;, &quot;&lt;eod&gt;&quot;]</code>) &#x2014;
Additional special tokens used by the tokenizer.`,name:"additional_special_tokens"},{anchor:"transformers.XLNetTokenizerFast.sp_model",description:`<strong>sp_model</strong> (<code>SentencePieceProcessor</code>) &#x2014;
The <em>SentencePiece</em> processor that is used for every conversion (string, tokens and IDs).`,name:"sp_model"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/tokenization_xlnet_fast.py#L63"}}),Ss=new A({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.XLNetTokenizerFast.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.XLNetTokenizerFast.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.XLNetTokenizerFast.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/v4.29.0/src/transformers/models/xlnet/tokenization_xlnet_fast.py#L174",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>
`}}),Is=new A({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.XLNetTokenizerFast.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.XLNetTokenizerFast.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.XLNetTokenizerFast.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/v4.29.0/src/transformers/models/xlnet/tokenization_xlnet_fast.py#L199",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>
`}}),dn=new Ve({props:{anchor:"transformers.XLNetTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[p1]},$$scope:{ctx:q}}}),Hs=new Re({}),Qs=new A({props:{name:"class transformers.models.xlnet.modeling_xlnet.XLNetModelOutput",anchor:"transformers.models.xlnet.modeling_xlnet.XLNetModelOutput",parameters:[{name:"last_hidden_state",val:": FloatTensor"},{name:"mems",val:": typing.Optional[typing.List[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.xlnet.modeling_xlnet.XLNetModelOutput.last_hidden_state",description:`<strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_predict, hidden_size)</code>) &#x2014;
Sequence of hidden-states at the last layer of the model.</p>
<p><code>num_predict</code> corresponds to <code>target_mapping.shape[1]</code>. If <code>target_mapping</code> is <code>None</code>, then <code>num_predict</code>
corresponds to <code>sequence_length</code>.`,name:"last_hidden_state"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetModelOutput.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.`,name:"mems"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetModelOutput.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.xlnet.modeling_xlnet.XLNetModelOutput.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/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L579"}}),Ws=new A({props:{name:"class transformers.models.xlnet.modeling_xlnet.XLNetLMHeadModelOutput",anchor:"transformers.models.xlnet.modeling_xlnet.XLNetLMHeadModelOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"logits",val:": FloatTensor = None"},{name:"mems",val:": typing.Optional[typing.List[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.xlnet.modeling_xlnet.XLNetLMHeadModelOutput.loss",description:`<strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) &#x2014;
Language modeling loss (for next-token prediction).`,name:"loss"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetLMHeadModelOutput.logits",description:`<strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_predict, config.vocab_size)</code>) &#x2014;
Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
<p><code>num_predict</code> corresponds to <code>target_mapping.shape[1]</code>. If <code>target_mapping</code> is <code>None</code>, then <code>num_predict</code>
corresponds to <code>sequence_length</code>.`,name:"logits"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetLMHeadModelOutput.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.`,name:"mems"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetLMHeadModelOutput.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.xlnet.modeling_xlnet.XLNetLMHeadModelOutput.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/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L613"}}),Bs=new A({props:{name:"class transformers.models.xlnet.modeling_xlnet.XLNetForSequenceClassificationOutput",anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForSequenceClassificationOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"logits",val:": FloatTensor = None"},{name:"mems",val:": typing.Optional[typing.List[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.xlnet.modeling_xlnet.XLNetForSequenceClassificationOutput.loss",description:`<strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>label</code> is provided) &#x2014;
Classification (or regression if config.num_labels==1) loss.`,name:"loss"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForSequenceClassificationOutput.logits",description:`<strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) &#x2014;
Classification (or regression if config.num_labels==1) scores (before SoftMax).`,name:"logits"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForSequenceClassificationOutput.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.`,name:"mems"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForSequenceClassificationOutput.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.xlnet.modeling_xlnet.XLNetForSequenceClassificationOutput.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/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L650"}}),Vs=new A({props:{name:"class transformers.models.xlnet.modeling_xlnet.XLNetForMultipleChoiceOutput",anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForMultipleChoiceOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"logits",val:": FloatTensor = None"},{name:"mems",val:": typing.Optional[typing.List[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.xlnet.modeling_xlnet.XLNetForMultipleChoiceOutput.loss",description:`<strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) &#x2014;
Classification loss.`,name:"loss"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForMultipleChoiceOutput.logits",description:`<strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) &#x2014;
<em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).`,name:"logits"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForMultipleChoiceOutput.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.`,name:"mems"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForMultipleChoiceOutput.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.xlnet.modeling_xlnet.XLNetForMultipleChoiceOutput.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/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L718"}}),Gs=new A({props:{name:"class transformers.models.xlnet.modeling_xlnet.XLNetForTokenClassificationOutput",anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForTokenClassificationOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"logits",val:": FloatTensor = None"},{name:"mems",val:": typing.Optional[typing.List[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.xlnet.modeling_xlnet.XLNetForTokenClassificationOutput.loss",description:`<strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  &#x2014;
Classification loss.`,name:"loss"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForTokenClassificationOutput.logits",description:`<strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) &#x2014;
Classification scores (before SoftMax).`,name:"logits"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForTokenClassificationOutput.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.`,name:"mems"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForTokenClassificationOutput.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.xlnet.modeling_xlnet.XLNetForTokenClassificationOutput.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/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L684"}}),Zs=new A({props:{name:"class transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringSimpleOutput",anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringSimpleOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_logits",val:": FloatTensor = None"},{name:"end_logits",val:": FloatTensor = None"},{name:"mems",val:": typing.Optional[typing.List[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.xlnet.modeling_xlnet.XLNetForQuestionAnsweringSimpleOutput.loss",description:`<strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) &#x2014;
Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.`,name:"loss"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringSimpleOutput.start_logits",description:`<strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length,)</code>) &#x2014;
Span-start scores (before SoftMax).`,name:"start_logits"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringSimpleOutput.end_logits",description:`<strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length,)</code>) &#x2014;
Span-end scores (before SoftMax).`,name:"end_logits"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringSimpleOutput.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.`,name:"mems"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringSimpleOutput.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.xlnet.modeling_xlnet.XLNetForQuestionAnsweringSimpleOutput.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/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L754"}}),ta=new A({props:{name:"class transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringOutput",anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringOutput",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:"mems",val:": typing.Optional[typing.List[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.xlnet.modeling_xlnet.XLNetForQuestionAnsweringOutput.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.xlnet.modeling_xlnet.XLNetForQuestionAnsweringOutput.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.xlnet.modeling_xlnet.XLNetForQuestionAnsweringOutput.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.xlnet.modeling_xlnet.XLNetForQuestionAnsweringOutput.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.xlnet.modeling_xlnet.XLNetForQuestionAnsweringOutput.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.xlnet.modeling_xlnet.XLNetForQuestionAnsweringOutput.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.xlnet.modeling_xlnet.XLNetForQuestionAnsweringOutput.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.`,name:"mems"},{anchor:"transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringOutput.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.xlnet.modeling_xlnet.XLNetForQuestionAnsweringOutput.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/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L791"}}),na=new A({props:{name:"class transformers.models.xlnet.modeling_tf_xlnet.TFXLNetModelOutput",anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetModelOutput",parameters:[{name:"last_hidden_state",val:": Tensor = None"},{name:"mems",val:": typing.Optional[typing.List[tensorflow.python.framework.ops.Tensor]] = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"}],parametersDescription:[{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetModelOutput.last_hidden_state",description:`<strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_predict, hidden_size)</code>) &#x2014;
Sequence of hidden-states at the last layer of the model.</p>
<p><code>num_predict</code> corresponds to <code>target_mapping.shape[1]</code>. If <code>target_mapping</code> is <code>None</code>, then <code>num_predict</code>
corresponds to <code>sequence_length</code>.`,name:"last_hidden_state"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetModelOutput.mems",description:`<strong>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.`,name:"mems"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetModelOutput.hidden_states",description:`<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>) &#x2014;
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.`,name:"hidden_states"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetModelOutput.attentions",description:`<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>) &#x2014;
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.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L808"}}),aa=new A({props:{name:"class transformers.models.xlnet.modeling_tf_xlnet.TFXLNetLMHeadModelOutput",anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetLMHeadModelOutput",parameters:[{name:"loss",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"logits",val:": Tensor = None"},{name:"mems",val:": typing.Optional[typing.List[tensorflow.python.framework.ops.Tensor]] = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"}],parametersDescription:[{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetLMHeadModelOutput.loss",description:`<strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) &#x2014;
Language modeling loss (for next-token prediction).`,name:"loss"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetLMHeadModelOutput.logits",description:`<strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_predict, config.vocab_size)</code>) &#x2014;
Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
<p><code>num_predict</code> corresponds to <code>target_mapping.shape[1]</code>. If <code>target_mapping</code> is <code>None</code>, then <code>num_predict</code>
corresponds to <code>sequence_length</code>.`,name:"logits"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetLMHeadModelOutput.mems",description:`<strong>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.`,name:"mems"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetLMHeadModelOutput.hidden_states",description:`<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>) &#x2014;
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.`,name:"hidden_states"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetLMHeadModelOutput.attentions",description:`<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>) &#x2014;
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.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L842"}}),ia=new A({props:{name:"class transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForSequenceClassificationOutput",anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForSequenceClassificationOutput",parameters:[{name:"loss",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"logits",val:": Tensor = None"},{name:"mems",val:": typing.Optional[typing.List[tensorflow.python.framework.ops.Tensor]] = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"}],parametersDescription:[{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForSequenceClassificationOutput.loss",description:`<strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>label</code> is provided) &#x2014;
Classification (or regression if config.num_labels==1) loss.`,name:"loss"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForSequenceClassificationOutput.logits",description:`<strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, config.num_labels)</code>) &#x2014;
Classification (or regression if config.num_labels==1) scores (before SoftMax).`,name:"logits"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForSequenceClassificationOutput.mems",description:`<strong>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.`,name:"mems"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForSequenceClassificationOutput.hidden_states",description:`<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>) &#x2014;
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.`,name:"hidden_states"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForSequenceClassificationOutput.attentions",description:`<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>) &#x2014;
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.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L879"}}),da=new A({props:{name:"class transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForMultipleChoiceOutput",anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForMultipleChoiceOutput",parameters:[{name:"loss",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"logits",val:": Tensor = None"},{name:"mems",val:": typing.Optional[typing.List[tensorflow.python.framework.ops.Tensor]] = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"}],parametersDescription:[{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForMultipleChoiceOutput.loss",description:`<strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) &#x2014;
Classification loss.`,name:"loss"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForMultipleChoiceOutput.logits",description:`<strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_choices)</code>) &#x2014;
<em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).`,name:"logits"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForMultipleChoiceOutput.mems",description:`<strong>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.`,name:"mems"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForMultipleChoiceOutput.hidden_states",description:`<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>) &#x2014;
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.`,name:"hidden_states"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForMultipleChoiceOutput.attentions",description:`<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>) &#x2014;
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.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L947"}}),pa=new A({props:{name:"class transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForTokenClassificationOutput",anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForTokenClassificationOutput",parameters:[{name:"loss",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"logits",val:": Tensor = None"},{name:"mems",val:": typing.Optional[typing.List[tensorflow.python.framework.ops.Tensor]] = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"}],parametersDescription:[{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForTokenClassificationOutput.loss",description:`<strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  &#x2014;
Classification loss.`,name:"loss"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForTokenClassificationOutput.logits",description:`<strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) &#x2014;
Classification scores (before SoftMax).`,name:"logits"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForTokenClassificationOutput.mems",description:`<strong>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.`,name:"mems"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForTokenClassificationOutput.hidden_states",description:`<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>) &#x2014;
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.`,name:"hidden_states"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForTokenClassificationOutput.attentions",description:`<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>) &#x2014;
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.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L913"}}),ha=new A({props:{name:"class transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForQuestionAnsweringSimpleOutput",anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForQuestionAnsweringSimpleOutput",parameters:[{name:"loss",val:": typing.Optional[tensorflow.python.framework.ops.Tensor] = None"},{name:"start_logits",val:": Tensor = None"},{name:"end_logits",val:": Tensor = None"},{name:"mems",val:": typing.Optional[typing.List[tensorflow.python.framework.ops.Tensor]] = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[tensorflow.python.framework.ops.Tensor]] = None"}],parametersDescription:[{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForQuestionAnsweringSimpleOutput.loss",description:`<strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) &#x2014;
Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.`,name:"loss"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForQuestionAnsweringSimpleOutput.start_logits",description:`<strong>start_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length,)</code>) &#x2014;
Span-start scores (before SoftMax).`,name:"start_logits"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForQuestionAnsweringSimpleOutput.end_logits",description:`<strong>end_logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length,)</code>) &#x2014;
Span-end scores (before SoftMax).`,name:"end_logits"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForQuestionAnsweringSimpleOutput.mems",description:`<strong>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.`,name:"mems"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForQuestionAnsweringSimpleOutput.hidden_states",description:`<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>) &#x2014;
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.`,name:"hidden_states"},{anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForQuestionAnsweringSimpleOutput.attentions",description:`<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>) &#x2014;
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.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L983"}}),fa=new Re({}),ga=new A({props:{name:"class transformers.XLNetModel",anchor:"transformers.XLNetModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLNetModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig">XLNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L931"}}),ba=new A({props:{name:"forward",anchor:"transformers.XLNetModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"mems",val:": typing.Optional[torch.Tensor] = None"},{name:"perm_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"target_mapping",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"input_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"use_mems",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XLNetModel.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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLNetModel.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.XLNetModel.forward.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (see <code>mems</code> output below) . Can be used to speed up sequential
decoding. The token ids which have their past given to this model should not be passed as <code>input_ids</code> as
they have already been computed.</p>
<p><code>use_mems</code> has to be set to <code>True</code> to make use of <code>mems</code>.`,name:"mems"},{anchor:"transformers.XLNetModel.forward.perm_mask",description:`<strong>perm_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the attention pattern for each input token with values selected in <code>[0, 1]</code>:</p>
<ul>
<li>if <code>perm_mask[k, i, j] = 0</code>, i attend to j in batch k;</li>
<li>if <code>perm_mask[k, i, j] = 1</code>, i does not attend to j in batch k.</li>
</ul>
<p>If not set, each token attends to all the others (full bidirectional attention). Only used during
pretraining (to define factorization order) or for sequential decoding (generation).`,name:"perm_mask"},{anchor:"transformers.XLNetModel.forward.target_mapping",description:`<strong>target_mapping</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_predict, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the output tokens to use. If <code>target_mapping[k, i, j] = 1</code>, the i-th predict in batch k is
on the j-th token. Only used during pretraining for partial prediction or for sequential decoding
(generation).`,name:"target_mapping"},{anchor:"transformers.XLNetModel.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.XLNetModel.forward.input_mask",description:`<strong>input_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. Negative of <code>attention_mask</code>, i.e. with 0 for
real tokens and 1 for padding which is kept for compatibility with the original code base.</p>
<p>Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>masked</strong>,</li>
<li>0 for tokens that are <strong>not masked</strong>.</li>
</ul>
<p>You can only uses one of <code>input_mask</code> and <code>attention_mask</code>.`,name:"input_mask"},{anchor:"transformers.XLNetModel.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.XLNetModel.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.XLNetModel.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.XLNetModel.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.XLNetModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L1060",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_xlnet.XLNetModelOutput"
>transformers.models.xlnet.modeling_xlnet.XLNetModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig"
>XLNetConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_predict, hidden_size)</code>) \u2014 Sequence of hidden-states at the last layer of the model.</p>
<p><code>num_predict</code> corresponds to <code>target_mapping.shape[1]</code>. If <code>target_mapping</code> is <code>None</code>, then <code>num_predict</code>
corresponds to <code>sequence_length</code>.</p>
</li>
<li>
<p><strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) \u2014 Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.</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/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_xlnet.XLNetModelOutput"
>transformers.models.xlnet.modeling_xlnet.XLNetModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),mn=new Ze({props:{$$slots:{default:[m1]},$$scope:{ctx:q}}}),hn=new Ve({props:{anchor:"transformers.XLNetModel.forward.example",$$slots:{default:[h1]},$$scope:{ctx:q}}}),ya=new Re({}),Ta=new A({props:{name:"class transformers.XLNetLMHeadModel",anchor:"transformers.XLNetLMHeadModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLNetLMHeadModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig">XLNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L1295"}}),xa=new A({props:{name:"forward",anchor:"transformers.XLNetLMHeadModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"mems",val:": typing.Optional[torch.Tensor] = None"},{name:"perm_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"target_mapping",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"input_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"use_mems",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XLNetLMHeadModel.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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLNetLMHeadModel.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.XLNetLMHeadModel.forward.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (see <code>mems</code> output below) . Can be used to speed up sequential
decoding. The token ids which have their past given to this model should not be passed as <code>input_ids</code> as
they have already been computed.</p>
<p><code>use_mems</code> has to be set to <code>True</code> to make use of <code>mems</code>.`,name:"mems"},{anchor:"transformers.XLNetLMHeadModel.forward.perm_mask",description:`<strong>perm_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the attention pattern for each input token with values selected in <code>[0, 1]</code>:</p>
<ul>
<li>if <code>perm_mask[k, i, j] = 0</code>, i attend to j in batch k;</li>
<li>if <code>perm_mask[k, i, j] = 1</code>, i does not attend to j in batch k.</li>
</ul>
<p>If not set, each token attends to all the others (full bidirectional attention). Only used during
pretraining (to define factorization order) or for sequential decoding (generation).`,name:"perm_mask"},{anchor:"transformers.XLNetLMHeadModel.forward.target_mapping",description:`<strong>target_mapping</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_predict, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the output tokens to use. If <code>target_mapping[k, i, j] = 1</code>, the i-th predict in batch k is
on the j-th token. Only used during pretraining for partial prediction or for sequential decoding
(generation).`,name:"target_mapping"},{anchor:"transformers.XLNetLMHeadModel.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.XLNetLMHeadModel.forward.input_mask",description:`<strong>input_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. Negative of <code>attention_mask</code>, i.e. with 0 for
real tokens and 1 for padding which is kept for compatibility with the original code base.</p>
<p>Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>masked</strong>,</li>
<li>0 for tokens that are <strong>not masked</strong>.</li>
</ul>
<p>You can only uses one of <code>input_mask</code> and <code>attention_mask</code>.`,name:"input_mask"},{anchor:"transformers.XLNetLMHeadModel.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.XLNetLMHeadModel.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.XLNetLMHeadModel.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.XLNetLMHeadModel.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.XLNetLMHeadModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLNetLMHeadModel.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_predict)</code>, <em>optional</em>) &#x2014;
Labels for masked language modeling. <code>num_predict</code> corresponds to <code>target_mapping.shape[1]</code>. If
<code>target_mapping</code> is <code>None</code>, then <code>num_predict</code> corresponds to <code>sequence_length</code>.</p>
<p>The labels should correspond to the masked input words that should be predicted and depends on
<code>target_mapping</code>. Note in order to perform standard auto-regressive language modeling a <em><mask></mask></em> token has
to be added to the <code>input_ids</code> (see the <code>prepare_inputs_for_generation</code> function and examples below)</p>
<p>Indices are selected in <code>[-100, 0, ..., config.vocab_size]</code> All labels set to <code>-100</code> are ignored, the loss
is only computed for labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L1357",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_xlnet.XLNetLMHeadModelOutput"
>transformers.models.xlnet.modeling_xlnet.XLNetLMHeadModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig"
>XLNetConfig</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)
Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_predict, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
<p><code>num_predict</code> corresponds to <code>target_mapping.shape[1]</code>. If <code>target_mapping</code> is <code>None</code>, then <code>num_predict</code>
corresponds to <code>sequence_length</code>.</p>
</li>
<li>
<p><strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) \u2014 Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.</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/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_xlnet.XLNetLMHeadModelOutput"
>transformers.models.xlnet.modeling_xlnet.XLNetLMHeadModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),fn=new Ze({props:{$$slots:{default:[u1]},$$scope:{ctx:q}}}),gn=new Ve({props:{anchor:"transformers.XLNetLMHeadModel.forward.example",$$slots:{default:[f1]},$$scope:{ctx:q}}}),La=new Re({}),Fa=new A({props:{name:"class transformers.XLNetForSequenceClassification",anchor:"transformers.XLNetForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLNetForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig">XLNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L1501"}}),za=new A({props:{name:"forward",anchor:"transformers.XLNetForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"mems",val:": typing.Optional[torch.Tensor] = None"},{name:"perm_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"target_mapping",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"input_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"use_mems",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XLNetForSequenceClassification.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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLNetForSequenceClassification.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.XLNetForSequenceClassification.forward.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (see <code>mems</code> output below) . Can be used to speed up sequential
decoding. The token ids which have their past given to this model should not be passed as <code>input_ids</code> as
they have already been computed.</p>
<p><code>use_mems</code> has to be set to <code>True</code> to make use of <code>mems</code>.`,name:"mems"},{anchor:"transformers.XLNetForSequenceClassification.forward.perm_mask",description:`<strong>perm_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the attention pattern for each input token with values selected in <code>[0, 1]</code>:</p>
<ul>
<li>if <code>perm_mask[k, i, j] = 0</code>, i attend to j in batch k;</li>
<li>if <code>perm_mask[k, i, j] = 1</code>, i does not attend to j in batch k.</li>
</ul>
<p>If not set, each token attends to all the others (full bidirectional attention). Only used during
pretraining (to define factorization order) or for sequential decoding (generation).`,name:"perm_mask"},{anchor:"transformers.XLNetForSequenceClassification.forward.target_mapping",description:`<strong>target_mapping</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_predict, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the output tokens to use. If <code>target_mapping[k, i, j] = 1</code>, the i-th predict in batch k is
on the j-th token. Only used during pretraining for partial prediction or for sequential decoding
(generation).`,name:"target_mapping"},{anchor:"transformers.XLNetForSequenceClassification.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.XLNetForSequenceClassification.forward.input_mask",description:`<strong>input_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. Negative of <code>attention_mask</code>, i.e. with 0 for
real tokens and 1 for padding which is kept for compatibility with the original code base.</p>
<p>Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>masked</strong>,</li>
<li>0 for tokens that are <strong>not masked</strong>.</li>
</ul>
<p>You can only uses one of <code>input_mask</code> and <code>attention_mask</code>.`,name:"input_mask"},{anchor:"transformers.XLNetForSequenceClassification.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.XLNetForSequenceClassification.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.XLNetForSequenceClassification.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.XLNetForSequenceClassification.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.XLNetForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLNetForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L1514",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_xlnet.XLNetForSequenceClassificationOutput"
>transformers.models.xlnet.modeling_xlnet.XLNetForSequenceClassificationOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig"
>XLNetConfig</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>label</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>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) \u2014 Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.</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/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_xlnet.XLNetForSequenceClassificationOutput"
>transformers.models.xlnet.modeling_xlnet.XLNetForSequenceClassificationOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),kn=new Ze({props:{$$slots:{default:[g1]},$$scope:{ctx:q}}}),vn=new Ve({props:{anchor:"transformers.XLNetForSequenceClassification.forward.example",$$slots:{default:[_1]},$$scope:{ctx:q}}}),bn=new Ve({props:{anchor:"transformers.XLNetForSequenceClassification.forward.example-2",$$slots:{default:[k1]},$$scope:{ctx:q}}}),Ea=new Re({}),Ca=new A({props:{name:"class transformers.XLNetForMultipleChoice",anchor:"transformers.XLNetForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLNetForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig">XLNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L1697"}}),Pa=new A({props:{name:"forward",anchor:"transformers.XLNetForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"input_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"mems",val:": typing.Optional[torch.Tensor] = None"},{name:"perm_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"target_mapping",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"use_mems",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XLNetForMultipleChoice.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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLNetForMultipleChoice.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.XLNetForMultipleChoice.forward.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (see <code>mems</code> output below) . Can be used to speed up sequential
decoding. The token ids which have their past given to this model should not be passed as <code>input_ids</code> as
they have already been computed.</p>
<p><code>use_mems</code> has to be set to <code>True</code> to make use of <code>mems</code>.`,name:"mems"},{anchor:"transformers.XLNetForMultipleChoice.forward.perm_mask",description:`<strong>perm_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the attention pattern for each input token with values selected in <code>[0, 1]</code>:</p>
<ul>
<li>if <code>perm_mask[k, i, j] = 0</code>, i attend to j in batch k;</li>
<li>if <code>perm_mask[k, i, j] = 1</code>, i does not attend to j in batch k.</li>
</ul>
<p>If not set, each token attends to all the others (full bidirectional attention). Only used during
pretraining (to define factorization order) or for sequential decoding (generation).`,name:"perm_mask"},{anchor:"transformers.XLNetForMultipleChoice.forward.target_mapping",description:`<strong>target_mapping</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_predict, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the output tokens to use. If <code>target_mapping[k, i, j] = 1</code>, the i-th predict in batch k is
on the j-th token. Only used during pretraining for partial prediction or for sequential decoding
(generation).`,name:"target_mapping"},{anchor:"transformers.XLNetForMultipleChoice.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.XLNetForMultipleChoice.forward.input_mask",description:`<strong>input_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. Negative of <code>attention_mask</code>, i.e. with 0 for
real tokens and 1 for padding which is kept for compatibility with the original code base.</p>
<p>Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>masked</strong>,</li>
<li>0 for tokens that are <strong>not masked</strong>.</li>
</ul>
<p>You can only uses one of <code>input_mask</code> and <code>attention_mask</code>.`,name:"input_mask"},{anchor:"transformers.XLNetForMultipleChoice.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.XLNetForMultipleChoice.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.XLNetForMultipleChoice.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.XLNetForMultipleChoice.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.XLNetForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLNetForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L1708",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_xlnet.XLNetForMultipleChoiceOutput"
>transformers.models.xlnet.modeling_xlnet.XLNetForMultipleChoiceOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig"
>XLNetConfig</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>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) \u2014 Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.</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/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_xlnet.XLNetForMultipleChoiceOutput"
>transformers.models.xlnet.modeling_xlnet.XLNetForMultipleChoiceOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Tn=new Ze({props:{$$slots:{default:[v1]},$$scope:{ctx:q}}}),wn=new Ve({props:{anchor:"transformers.XLNetForMultipleChoice.forward.example",$$slots:{default:[b1]},$$scope:{ctx:q}}}),Sa=new Re({}),Da=new A({props:{name:"class transformers.XLNetForTokenClassification",anchor:"transformers.XLNetForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLNetForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig">XLNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L1610"}}),Ua=new A({props:{name:"forward",anchor:"transformers.XLNetForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"mems",val:": typing.Optional[torch.Tensor] = None"},{name:"perm_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"target_mapping",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"input_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"use_mems",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XLNetForTokenClassification.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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLNetForTokenClassification.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.XLNetForTokenClassification.forward.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (see <code>mems</code> output below) . Can be used to speed up sequential
decoding. The token ids which have their past given to this model should not be passed as <code>input_ids</code> as
they have already been computed.</p>
<p><code>use_mems</code> has to be set to <code>True</code> to make use of <code>mems</code>.`,name:"mems"},{anchor:"transformers.XLNetForTokenClassification.forward.perm_mask",description:`<strong>perm_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the attention pattern for each input token with values selected in <code>[0, 1]</code>:</p>
<ul>
<li>if <code>perm_mask[k, i, j] = 0</code>, i attend to j in batch k;</li>
<li>if <code>perm_mask[k, i, j] = 1</code>, i does not attend to j in batch k.</li>
</ul>
<p>If not set, each token attends to all the others (full bidirectional attention). Only used during
pretraining (to define factorization order) or for sequential decoding (generation).`,name:"perm_mask"},{anchor:"transformers.XLNetForTokenClassification.forward.target_mapping",description:`<strong>target_mapping</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_predict, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the output tokens to use. If <code>target_mapping[k, i, j] = 1</code>, the i-th predict in batch k is
on the j-th token. Only used during pretraining for partial prediction or for sequential decoding
(generation).`,name:"target_mapping"},{anchor:"transformers.XLNetForTokenClassification.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.XLNetForTokenClassification.forward.input_mask",description:`<strong>input_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. Negative of <code>attention_mask</code>, i.e. with 0 for
real tokens and 1 for padding which is kept for compatibility with the original code base.</p>
<p>Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>masked</strong>,</li>
<li>0 for tokens that are <strong>not masked</strong>.</li>
</ul>
<p>You can only uses one of <code>input_mask</code> and <code>attention_mask</code>.`,name:"input_mask"},{anchor:"transformers.XLNetForTokenClassification.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.XLNetForTokenClassification.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.XLNetForTokenClassification.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.XLNetForTokenClassification.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.XLNetForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLNetForTokenClassification.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]</code>
where <em>num_choices</em> is the size of the second dimension of the input tensors. (see <em>input_ids</em> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L1621",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_xlnet.XLNetForTokenClassificationOutput"
>transformers.models.xlnet.modeling_xlnet.XLNetForTokenClassificationOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig"
>XLNetConfig</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>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) \u2014 Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.</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/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_xlnet.XLNetForTokenClassificationOutput"
>transformers.models.xlnet.modeling_xlnet.XLNetForTokenClassificationOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),$n=new Ze({props:{$$slots:{default:[y1]},$$scope:{ctx:q}}}),xn=new Ve({props:{anchor:"transformers.XLNetForTokenClassification.forward.example",$$slots:{default:[T1]},$$scope:{ctx:q}}}),Wa=new Re({}),Ka=new A({props:{name:"class transformers.XLNetForQuestionAnsweringSimple",anchor:"transformers.XLNetForQuestionAnsweringSimple",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLNetForQuestionAnsweringSimple.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig">XLNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L1800"}}),Ya=new A({props:{name:"forward",anchor:"transformers.XLNetForQuestionAnsweringSimple.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"mems",val:": typing.Optional[torch.Tensor] = None"},{name:"perm_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"target_mapping",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"input_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"start_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"end_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"use_mems",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XLNetForQuestionAnsweringSimple.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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLNetForQuestionAnsweringSimple.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.XLNetForQuestionAnsweringSimple.forward.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (see <code>mems</code> output below) . Can be used to speed up sequential
decoding. The token ids which have their past given to this model should not be passed as <code>input_ids</code> as
they have already been computed.</p>
<p><code>use_mems</code> has to be set to <code>True</code> to make use of <code>mems</code>.`,name:"mems"},{anchor:"transformers.XLNetForQuestionAnsweringSimple.forward.perm_mask",description:`<strong>perm_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the attention pattern for each input token with values selected in <code>[0, 1]</code>:</p>
<ul>
<li>if <code>perm_mask[k, i, j] = 0</code>, i attend to j in batch k;</li>
<li>if <code>perm_mask[k, i, j] = 1</code>, i does not attend to j in batch k.</li>
</ul>
<p>If not set, each token attends to all the others (full bidirectional attention). Only used during
pretraining (to define factorization order) or for sequential decoding (generation).`,name:"perm_mask"},{anchor:"transformers.XLNetForQuestionAnsweringSimple.forward.target_mapping",description:`<strong>target_mapping</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_predict, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the output tokens to use. If <code>target_mapping[k, i, j] = 1</code>, the i-th predict in batch k is
on the j-th token. Only used during pretraining for partial prediction or for sequential decoding
(generation).`,name:"target_mapping"},{anchor:"transformers.XLNetForQuestionAnsweringSimple.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.XLNetForQuestionAnsweringSimple.forward.input_mask",description:`<strong>input_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. Negative of <code>attention_mask</code>, i.e. with 0 for
real tokens and 1 for padding which is kept for compatibility with the original code base.</p>
<p>Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>masked</strong>,</li>
<li>0 for tokens that are <strong>not masked</strong>.</li>
</ul>
<p>You can only uses one of <code>input_mask</code> and <code>attention_mask</code>.`,name:"input_mask"},{anchor:"transformers.XLNetForQuestionAnsweringSimple.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.XLNetForQuestionAnsweringSimple.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.XLNetForQuestionAnsweringSimple.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.XLNetForQuestionAnsweringSimple.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.XLNetForQuestionAnsweringSimple.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLNetForQuestionAnsweringSimple.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.XLNetForQuestionAnsweringSimple.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L1811",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringSimpleOutput"
>transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringSimpleOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig"
>XLNetConfig</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>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) \u2014 Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.</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/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringSimpleOutput"
>transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringSimpleOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Fn=new Ze({props:{$$slots:{default:[w1]},$$scope:{ctx:q}}}),Xn=new Ve({props:{anchor:"transformers.XLNetForQuestionAnsweringSimple.forward.example",$$slots:{default:[N1]},$$scope:{ctx:q}}}),Ga=new Re({}),Ja=new A({props:{name:"class transformers.XLNetForQuestionAnswering",anchor:"transformers.XLNetForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.XLNetForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig">XLNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L1910"}}),or=new A({props:{name:"forward",anchor:"transformers.XLNetForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"mems",val:": typing.Optional[torch.Tensor] = None"},{name:"perm_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"target_mapping",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"input_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"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:"use_mems",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.XLNetForQuestionAnswering.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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.XLNetForQuestionAnswering.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.XLNetForQuestionAnswering.forward.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (see <code>mems</code> output below) . Can be used to speed up sequential
decoding. The token ids which have their past given to this model should not be passed as <code>input_ids</code> as
they have already been computed.</p>
<p><code>use_mems</code> has to be set to <code>True</code> to make use of <code>mems</code>.`,name:"mems"},{anchor:"transformers.XLNetForQuestionAnswering.forward.perm_mask",description:`<strong>perm_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the attention pattern for each input token with values selected in <code>[0, 1]</code>:</p>
<ul>
<li>if <code>perm_mask[k, i, j] = 0</code>, i attend to j in batch k;</li>
<li>if <code>perm_mask[k, i, j] = 1</code>, i does not attend to j in batch k.</li>
</ul>
<p>If not set, each token attends to all the others (full bidirectional attention). Only used during
pretraining (to define factorization order) or for sequential decoding (generation).`,name:"perm_mask"},{anchor:"transformers.XLNetForQuestionAnswering.forward.target_mapping",description:`<strong>target_mapping</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_predict, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the output tokens to use. If <code>target_mapping[k, i, j] = 1</code>, the i-th predict in batch k is
on the j-th token. Only used during pretraining for partial prediction or for sequential decoding
(generation).`,name:"target_mapping"},{anchor:"transformers.XLNetForQuestionAnswering.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.XLNetForQuestionAnswering.forward.input_mask",description:`<strong>input_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. Negative of <code>attention_mask</code>, i.e. with 0 for
real tokens and 1 for padding which is kept for compatibility with the original code base.</p>
<p>Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>masked</strong>,</li>
<li>0 for tokens that are <strong>not masked</strong>.</li>
</ul>
<p>You can only uses one of <code>input_mask</code> and <code>attention_mask</code>.`,name:"input_mask"},{anchor:"transformers.XLNetForQuestionAnswering.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.XLNetForQuestionAnswering.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.XLNetForQuestionAnswering.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.XLNetForQuestionAnswering.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.XLNetForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.XLNetForQuestionAnswering.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.XLNetForQuestionAnswering.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.XLNetForQuestionAnswering.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.XLNetForQuestionAnswering.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.XLNetForQuestionAnswering.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/v4.29.0/src/transformers/models/xlnet/modeling_xlnet.py#L1924",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringOutput"
>transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig"
>XLNetConfig</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>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) \u2014 Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.</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/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringOutput"
>transformers.models.xlnet.modeling_xlnet.XLNetForQuestionAnsweringOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Mn=new Ze({props:{$$slots:{default:[$1]},$$scope:{ctx:q}}}),zn=new Ve({props:{anchor:"transformers.XLNetForQuestionAnswering.forward.example",$$slots:{default:[x1]},$$scope:{ctx:q}}}),nr=new Re({}),sr=new A({props:{name:"class transformers.TFXLNetModel",anchor:"transformers.TFXLNetModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLNetModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig">XLNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1138"}}),Cn=new Ze({props:{$$slots:{default:[L1]},$$scope:{ctx:q}}}),lr=new A({props:{name:"call",anchor:"transformers.TFXLNetModel.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:"mems",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"perm_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"target_mapping",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:"input_mask",val:": typing.Union[numpy.ndarray, 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:"use_mems",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFXLNetModel.call.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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLNetModel.call.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.TFXLNetModel.call.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (see <code>mems</code> output below) . Can be used to speed up sequential
decoding. The token ids which have their past given to this model should not be passed as <code>input_ids</code> as
they have already been computed.</p>
<p><code>use_mems</code> has to be set to <code>True</code> to make use of <code>mems</code>.`,name:"mems"},{anchor:"transformers.TFXLNetModel.call.perm_mask",description:`<strong>perm_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the attention pattern for each input token with values selected in <code>[0, 1]</code>:</p>
<ul>
<li>if <code>perm_mask[k, i, j] = 0</code>, i attend to j in batch k;</li>
<li>if <code>perm_mask[k, i, j] = 1</code>, i does not attend to j in batch k.</li>
</ul>
<p>If not set, each token attends to all the others (full bidirectional attention). Only used during
pretraining (to define factorization order) or for sequential decoding (generation).`,name:"perm_mask"},{anchor:"transformers.TFXLNetModel.call.target_mapping",description:`<strong>target_mapping</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_predict, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the output tokens to use. If <code>target_mapping[k, i, j] = 1</code>, the i-th predict in batch k is
on the j-th token. Only used during pretraining for partial prediction or for sequential decoding
(generation).`,name:"target_mapping"},{anchor:"transformers.TFXLNetModel.call.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.TFXLNetModel.call.input_mask",description:`<strong>input_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. Negative of <code>attention_mask</code>, i.e. with 0 for
real tokens and 1 for padding which is kept for compatibility with the original code base.</p>
<p>Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>masked</strong>,</li>
<li>0 for tokens that are <strong>not masked</strong>.</li>
</ul>
<p>You can only uses one of <code>input_mask</code> and <code>attention_mask</code>.`,name:"input_mask"},{anchor:"transformers.TFXLNetModel.call.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.TFXLNetModel.call.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.TFXLNetModel.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.`,name:"output_attentions"},{anchor:"transformers.TFXLNetModel.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.`,name:"output_hidden_states"},{anchor:"transformers.TFXLNetModel.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/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1143",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_tf_xlnet.TFXLNetModelOutput"
>transformers.models.xlnet.modeling_tf_xlnet.TFXLNetModelOutput</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/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig"
>XLNetConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_predict, hidden_size)</code>) \u2014 Sequence of hidden-states at the last layer of the model.</p>
<p><code>num_predict</code> corresponds to <code>target_mapping.shape[1]</code>. If <code>target_mapping</code> is <code>None</code>, then <code>num_predict</code>
corresponds to <code>sequence_length</code>.</p>
</li>
<li>
<p><strong>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) \u2014 Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.</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/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_tf_xlnet.TFXLNetModelOutput"
>transformers.models.xlnet.modeling_tf_xlnet.TFXLNetModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),jn=new Ze({props:{$$slots:{default:[F1]},$$scope:{ctx:q}}}),On=new Ve({props:{anchor:"transformers.TFXLNetModel.call.example",$$slots:{default:[X1]},$$scope:{ctx:q}}}),dr=new Re({}),cr=new A({props:{name:"class transformers.TFXLNetLMHeadModel",anchor:"transformers.TFXLNetLMHeadModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLNetLMHeadModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig">XLNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1202"}}),Pn=new Ze({props:{$$slots:{default:[q1]},$$scope:{ctx:q}}}),ur=new A({props:{name:"call",anchor:"transformers.TFXLNetLMHeadModel.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:"mems",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"perm_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"target_mapping",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:"input_mask",val:": typing.Union[numpy.ndarray, 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:"use_mems",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFXLNetLMHeadModel.call.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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLNetLMHeadModel.call.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.TFXLNetLMHeadModel.call.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (see <code>mems</code> output below) . Can be used to speed up sequential
decoding. The token ids which have their past given to this model should not be passed as <code>input_ids</code> as
they have already been computed.</p>
<p><code>use_mems</code> has to be set to <code>True</code> to make use of <code>mems</code>.`,name:"mems"},{anchor:"transformers.TFXLNetLMHeadModel.call.perm_mask",description:`<strong>perm_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the attention pattern for each input token with values selected in <code>[0, 1]</code>:</p>
<ul>
<li>if <code>perm_mask[k, i, j] = 0</code>, i attend to j in batch k;</li>
<li>if <code>perm_mask[k, i, j] = 1</code>, i does not attend to j in batch k.</li>
</ul>
<p>If not set, each token attends to all the others (full bidirectional attention). Only used during
pretraining (to define factorization order) or for sequential decoding (generation).`,name:"perm_mask"},{anchor:"transformers.TFXLNetLMHeadModel.call.target_mapping",description:`<strong>target_mapping</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_predict, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the output tokens to use. If <code>target_mapping[k, i, j] = 1</code>, the i-th predict in batch k is
on the j-th token. Only used during pretraining for partial prediction or for sequential decoding
(generation).`,name:"target_mapping"},{anchor:"transformers.TFXLNetLMHeadModel.call.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.TFXLNetLMHeadModel.call.input_mask",description:`<strong>input_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. Negative of <code>attention_mask</code>, i.e. with 0 for
real tokens and 1 for padding which is kept for compatibility with the original code base.</p>
<p>Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>masked</strong>,</li>
<li>0 for tokens that are <strong>not masked</strong>.</li>
</ul>
<p>You can only uses one of <code>input_mask</code> and <code>attention_mask</code>.`,name:"input_mask"},{anchor:"transformers.TFXLNetLMHeadModel.call.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.TFXLNetLMHeadModel.call.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.TFXLNetLMHeadModel.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.`,name:"output_attentions"},{anchor:"transformers.TFXLNetLMHeadModel.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.`,name:"output_hidden_states"},{anchor:"transformers.TFXLNetLMHeadModel.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/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TFXLNetLMHeadModel.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 cross entropy classification loss. Indices should be in <code>[0, ..., config.vocab_size - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1256",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_tf_xlnet.TFXLNetLMHeadModelOutput"
>transformers.models.xlnet.modeling_tf_xlnet.TFXLNetLMHeadModelOutput</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/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig"
>XLNetConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided)
Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, num_predict, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
<p><code>num_predict</code> corresponds to <code>target_mapping.shape[1]</code>. If <code>target_mapping</code> is <code>None</code>, then <code>num_predict</code>
corresponds to <code>sequence_length</code>.</p>
</li>
<li>
<p><strong>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) \u2014 Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.</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/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_tf_xlnet.TFXLNetLMHeadModelOutput"
>transformers.models.xlnet.modeling_tf_xlnet.TFXLNetLMHeadModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Sn=new Ze({props:{$$slots:{default:[M1]},$$scope:{ctx:q}}}),Dn=new Ve({props:{anchor:"transformers.TFXLNetLMHeadModel.call.example",$$slots:{default:[z1]},$$scope:{ctx:q}}}),fr=new Re({}),gr=new A({props:{name:"class transformers.TFXLNetForSequenceClassification",anchor:"transformers.TFXLNetForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLNetForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig">XLNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1369"}}),Hn=new Ze({props:{$$slots:{default:[E1]},$$scope:{ctx:q}}}),br=new A({props:{name:"call",anchor:"transformers.TFXLNetForSequenceClassification.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:"mems",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"perm_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"target_mapping",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:"input_mask",val:": typing.Union[numpy.ndarray, 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:"use_mems",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFXLNetForSequenceClassification.call.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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLNetForSequenceClassification.call.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.TFXLNetForSequenceClassification.call.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (see <code>mems</code> output below) . Can be used to speed up sequential
decoding. The token ids which have their past given to this model should not be passed as <code>input_ids</code> as
they have already been computed.</p>
<p><code>use_mems</code> has to be set to <code>True</code> to make use of <code>mems</code>.`,name:"mems"},{anchor:"transformers.TFXLNetForSequenceClassification.call.perm_mask",description:`<strong>perm_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the attention pattern for each input token with values selected in <code>[0, 1]</code>:</p>
<ul>
<li>if <code>perm_mask[k, i, j] = 0</code>, i attend to j in batch k;</li>
<li>if <code>perm_mask[k, i, j] = 1</code>, i does not attend to j in batch k.</li>
</ul>
<p>If not set, each token attends to all the others (full bidirectional attention). Only used during
pretraining (to define factorization order) or for sequential decoding (generation).`,name:"perm_mask"},{anchor:"transformers.TFXLNetForSequenceClassification.call.target_mapping",description:`<strong>target_mapping</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_predict, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the output tokens to use. If <code>target_mapping[k, i, j] = 1</code>, the i-th predict in batch k is
on the j-th token. Only used during pretraining for partial prediction or for sequential decoding
(generation).`,name:"target_mapping"},{anchor:"transformers.TFXLNetForSequenceClassification.call.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.TFXLNetForSequenceClassification.call.input_mask",description:`<strong>input_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. Negative of <code>attention_mask</code>, i.e. with 0 for
real tokens and 1 for padding which is kept for compatibility with the original code base.</p>
<p>Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>masked</strong>,</li>
<li>0 for tokens that are <strong>not masked</strong>.</li>
</ul>
<p>You can only uses one of <code>input_mask</code> and <code>attention_mask</code>.`,name:"input_mask"},{anchor:"transformers.TFXLNetForSequenceClassification.call.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.TFXLNetForSequenceClassification.call.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.TFXLNetForSequenceClassification.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.`,name:"output_attentions"},{anchor:"transformers.TFXLNetForSequenceClassification.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.`,name:"output_hidden_states"},{anchor:"transformers.TFXLNetForSequenceClassification.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/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TFXLNetForSequenceClassification.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/v4.29.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1382",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForSequenceClassificationOutput"
>transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForSequenceClassificationOutput</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/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig"
>XLNetConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>label</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>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) \u2014 Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.</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/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForSequenceClassificationOutput"
>transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForSequenceClassificationOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Qn=new Ze({props:{$$slots:{default:[C1]},$$scope:{ctx:q}}}),Un=new Ve({props:{anchor:"transformers.TFXLNetForSequenceClassification.call.example",$$slots:{default:[j1]},$$scope:{ctx:q}}}),Wn=new Ve({props:{anchor:"transformers.TFXLNetForSequenceClassification.call.example-2",$$slots:{default:[O1]},$$scope:{ctx:q}}}),yr=new Re({}),Tr=new A({props:{name:"class transformers.TFXLNetForMultipleChoice",anchor:"transformers.TFXLNetForMultipleChoice",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLNetForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig">XLNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1465"}}),Bn=new Ze({props:{$$slots:{default:[A1]},$$scope:{ctx:q}}}),xr=new A({props:{name:"call",anchor:"transformers.TFXLNetForMultipleChoice.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:"token_type_ids",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"input_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"attention_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"mems",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"perm_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"target_mapping",val:": typing.Union[numpy.ndarray, 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:"use_mems",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFXLNetForMultipleChoice.call.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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLNetForMultipleChoice.call.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.TFXLNetForMultipleChoice.call.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (see <code>mems</code> output below) . Can be used to speed up sequential
decoding. The token ids which have their past given to this model should not be passed as <code>input_ids</code> as
they have already been computed.</p>
<p><code>use_mems</code> has to be set to <code>True</code> to make use of <code>mems</code>.`,name:"mems"},{anchor:"transformers.TFXLNetForMultipleChoice.call.perm_mask",description:`<strong>perm_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the attention pattern for each input token with values selected in <code>[0, 1]</code>:</p>
<ul>
<li>if <code>perm_mask[k, i, j] = 0</code>, i attend to j in batch k;</li>
<li>if <code>perm_mask[k, i, j] = 1</code>, i does not attend to j in batch k.</li>
</ul>
<p>If not set, each token attends to all the others (full bidirectional attention). Only used during
pretraining (to define factorization order) or for sequential decoding (generation).`,name:"perm_mask"},{anchor:"transformers.TFXLNetForMultipleChoice.call.target_mapping",description:`<strong>target_mapping</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_predict, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the output tokens to use. If <code>target_mapping[k, i, j] = 1</code>, the i-th predict in batch k is
on the j-th token. Only used during pretraining for partial prediction or for sequential decoding
(generation).`,name:"target_mapping"},{anchor:"transformers.TFXLNetForMultipleChoice.call.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.TFXLNetForMultipleChoice.call.input_mask",description:`<strong>input_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. Negative of <code>attention_mask</code>, i.e. with 0 for
real tokens and 1 for padding which is kept for compatibility with the original code base.</p>
<p>Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>masked</strong>,</li>
<li>0 for tokens that are <strong>not masked</strong>.</li>
</ul>
<p>You can only uses one of <code>input_mask</code> and <code>attention_mask</code>.`,name:"input_mask"},{anchor:"transformers.TFXLNetForMultipleChoice.call.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.TFXLNetForMultipleChoice.call.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.TFXLNetForMultipleChoice.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.`,name:"output_attentions"},{anchor:"transformers.TFXLNetForMultipleChoice.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.`,name:"output_hidden_states"},{anchor:"transformers.TFXLNetForMultipleChoice.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/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TFXLNetForMultipleChoice.call.labels",description:`<strong>labels</strong> (<code>tf.Tensor</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]</code>
where <code>num_choices</code> is the size of the second dimension of the input tensors. (See <code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1487",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForMultipleChoiceOutput"
>transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForMultipleChoiceOutput</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/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig"
>XLNetConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</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>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>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) \u2014 Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.</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/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForMultipleChoiceOutput"
>transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForMultipleChoiceOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Rn=new Ze({props:{$$slots:{default:[P1]},$$scope:{ctx:q}}}),Vn=new Ve({props:{anchor:"transformers.TFXLNetForMultipleChoice.call.example",$$slots:{default:[S1]},$$scope:{ctx:q}}}),Lr=new Re({}),Fr=new A({props:{name:"class transformers.TFXLNetForTokenClassification",anchor:"transformers.TFXLNetForTokenClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLNetForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig">XLNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1597"}}),Gn=new Ze({props:{$$slots:{default:[D1]},$$scope:{ctx:q}}}),zr=new A({props:{name:"call",anchor:"transformers.TFXLNetForTokenClassification.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:"mems",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"perm_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"target_mapping",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:"input_mask",val:": typing.Union[numpy.ndarray, 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:"use_mems",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFXLNetForTokenClassification.call.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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLNetForTokenClassification.call.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.TFXLNetForTokenClassification.call.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (see <code>mems</code> output below) . Can be used to speed up sequential
decoding. The token ids which have their past given to this model should not be passed as <code>input_ids</code> as
they have already been computed.</p>
<p><code>use_mems</code> has to be set to <code>True</code> to make use of <code>mems</code>.`,name:"mems"},{anchor:"transformers.TFXLNetForTokenClassification.call.perm_mask",description:`<strong>perm_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the attention pattern for each input token with values selected in <code>[0, 1]</code>:</p>
<ul>
<li>if <code>perm_mask[k, i, j] = 0</code>, i attend to j in batch k;</li>
<li>if <code>perm_mask[k, i, j] = 1</code>, i does not attend to j in batch k.</li>
</ul>
<p>If not set, each token attends to all the others (full bidirectional attention). Only used during
pretraining (to define factorization order) or for sequential decoding (generation).`,name:"perm_mask"},{anchor:"transformers.TFXLNetForTokenClassification.call.target_mapping",description:`<strong>target_mapping</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_predict, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the output tokens to use. If <code>target_mapping[k, i, j] = 1</code>, the i-th predict in batch k is
on the j-th token. Only used during pretraining for partial prediction or for sequential decoding
(generation).`,name:"target_mapping"},{anchor:"transformers.TFXLNetForTokenClassification.call.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.TFXLNetForTokenClassification.call.input_mask",description:`<strong>input_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. Negative of <code>attention_mask</code>, i.e. with 0 for
real tokens and 1 for padding which is kept for compatibility with the original code base.</p>
<p>Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>masked</strong>,</li>
<li>0 for tokens that are <strong>not masked</strong>.</li>
</ul>
<p>You can only uses one of <code>input_mask</code> and <code>attention_mask</code>.`,name:"input_mask"},{anchor:"transformers.TFXLNetForTokenClassification.call.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.TFXLNetForTokenClassification.call.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.TFXLNetForTokenClassification.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.`,name:"output_attentions"},{anchor:"transformers.TFXLNetForTokenClassification.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.`,name:"output_hidden_states"},{anchor:"transformers.TFXLNetForTokenClassification.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/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TFXLNetForTokenClassification.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/v4.29.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1607",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForTokenClassificationOutput"
>transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForTokenClassificationOutput</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/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig"
>XLNetConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</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>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) \u2014 Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.</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/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForTokenClassificationOutput"
>transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForTokenClassificationOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Jn=new Ze({props:{$$slots:{default:[I1]},$$scope:{ctx:q}}}),Zn=new Ve({props:{anchor:"transformers.TFXLNetForTokenClassification.call.example",$$slots:{default:[H1]},$$scope:{ctx:q}}}),es=new Ve({props:{anchor:"transformers.TFXLNetForTokenClassification.call.example-2",$$slots:{default:[Q1]},$$scope:{ctx:q}}}),Er=new Re({}),Cr=new A({props:{name:"class transformers.TFXLNetForQuestionAnsweringSimple",anchor:"transformers.TFXLNetForQuestionAnsweringSimple",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFXLNetForQuestionAnsweringSimple.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig">XLNetConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.29.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1684"}}),os=new Ze({props:{$$slots:{default:[U1]},$$scope:{ctx:q}}}),Pr=new A({props:{name:"call",anchor:"transformers.TFXLNetForQuestionAnsweringSimple.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:"mems",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"perm_mask",val:": typing.Union[numpy.ndarray, tensorflow.python.framework.ops.Tensor, NoneType] = None"},{name:"target_mapping",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:"input_mask",val:": typing.Union[numpy.ndarray, 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:"use_mems",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{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.TFXLNetForQuestionAnsweringSimple.call.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/v4.29.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFXLNetForQuestionAnsweringSimple.call.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.TFXLNetForQuestionAnsweringSimple.call.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (see <code>mems</code> output below) . Can be used to speed up sequential
decoding. The token ids which have their past given to this model should not be passed as <code>input_ids</code> as
they have already been computed.</p>
<p><code>use_mems</code> has to be set to <code>True</code> to make use of <code>mems</code>.`,name:"mems"},{anchor:"transformers.TFXLNetForQuestionAnsweringSimple.call.perm_mask",description:`<strong>perm_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the attention pattern for each input token with values selected in <code>[0, 1]</code>:</p>
<ul>
<li>if <code>perm_mask[k, i, j] = 0</code>, i attend to j in batch k;</li>
<li>if <code>perm_mask[k, i, j] = 1</code>, i does not attend to j in batch k.</li>
</ul>
<p>If not set, each token attends to all the others (full bidirectional attention). Only used during
pretraining (to define factorization order) or for sequential decoding (generation).`,name:"perm_mask"},{anchor:"transformers.TFXLNetForQuestionAnsweringSimple.call.target_mapping",description:`<strong>target_mapping</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_predict, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to indicate the output tokens to use. If <code>target_mapping[k, i, j] = 1</code>, the i-th predict in batch k is
on the j-th token. Only used during pretraining for partial prediction or for sequential decoding
(generation).`,name:"target_mapping"},{anchor:"transformers.TFXLNetForQuestionAnsweringSimple.call.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.TFXLNetForQuestionAnsweringSimple.call.input_mask",description:`<strong>input_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. Negative of <code>attention_mask</code>, i.e. with 0 for
real tokens and 1 for padding which is kept for compatibility with the original code base.</p>
<p>Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>masked</strong>,</li>
<li>0 for tokens that are <strong>not masked</strong>.</li>
</ul>
<p>You can only uses one of <code>input_mask</code> and <code>attention_mask</code>.`,name:"input_mask"},{anchor:"transformers.TFXLNetForQuestionAnsweringSimple.call.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.TFXLNetForQuestionAnsweringSimple.call.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.TFXLNetForQuestionAnsweringSimple.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.`,name:"output_attentions"},{anchor:"transformers.TFXLNetForQuestionAnsweringSimple.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.`,name:"output_hidden_states"},{anchor:"transformers.TFXLNetForQuestionAnsweringSimple.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/v4.29.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TFXLNetForQuestionAnsweringSimple.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.TFXLNetForQuestionAnsweringSimple.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/v4.29.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1692",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForQuestionAnsweringSimpleOutput"
>transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForQuestionAnsweringSimpleOutput</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/v4.29.0/en/model_doc/xlnet#transformers.XLNetConfig"
>XLNetConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>tf.Tensor</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>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>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) \u2014 Contains pre-computed hidden-states. Can be used (see <code>mems</code> input) to speed up sequential decoding. The
token ids which have their past given to this model should not be passed as <code>input_ids</code> as they have
already been computed.</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/v4.29.0/en/model_doc/xlnet#transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForQuestionAnsweringSimpleOutput"
>transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForQuestionAnsweringSimpleOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),ns=new Ze({props:{$$slots:{default:[W1]},$$scope:{ctx:q}}}),ss=new Ve({props:{anchor:"transformers.TFXLNetForQuestionAnsweringSimple.call.example",$$slots:{default:[K1]},$$scope:{ctx:q}}}),as=new Ve({props:{anchor:"transformers.TFXLNetForQuestionAnsweringSimple.call.example-2",$$slots:{default:[B1]},$$scope:{ctx:q}}}),{c(){d=a("meta"),b=c(),h=a("h1"),f=a("a"),v=a("span"),y(l.$$.fragment),m=c(),M=a("span"),ye=n("XLNet"),_e=c(),P=a("div"),me=a("a"),te=a("img"),Te=c(),Q=a("a"),he=a("img"),V=c(),re=a("h2"),le=a("a"),U=a("span"),y(de.$$.fragment),we=c(),W=a("span"),Ne=n("Overview"),ke=c(),I=a("p"),$e=n("The XLNet model was proposed in "),ce=a("a"),ie=n("XLNet: Generalized Autoregressive Pretraining for Language Understanding"),z=n(` by Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov,
Quoc V. Le. XLnet is an extension of the Transformer-XL model pre-trained using an autoregressive method to learn
bidirectional contexts by maximizing the expected likelihood over all permutations of the input sequence factorization
order.`),C=c(),ue=a("p"),J=n("The abstract from the paper is the following:"),ve=c(),fe=a("p"),K=a("em"),xe=n(`With the capability of modeling bidirectional contexts, denoising autoencoding based pretraining like BERT achieves
better performance than pretraining approaches based on autoregressive language modeling. However, relying on
corrupting the input with masks, BERT neglects dependency between the masked positions and suffers from a
pretrain-finetune discrepancy. In light of these pros and cons, we propose XLNet, a generalized autoregressive
pretraining method that (1) enables learning bidirectional contexts by maximizing the expected likelihood over all
permutations of the factorization order and (2) overcomes the limitations of BERT thanks to its autoregressive
formulation. Furthermore, XLNet integrates ideas from Transformer-XL, the state-of-the-art autoregressive model, into
pretraining. Empirically, under comparable experiment settings, XLNet outperforms BERT on 20 tasks, often by a large
margin, including question answering, natural language inference, sentiment analysis, and document ranking.`),be=c(),E=a("p"),Le=n("Tips:"),Y=c(),G=a("ul"),pe=a("li"),Z=n("The specific attention pattern can be controlled at training and test time using the "),ge=a("code"),Fe=n("perm_mask"),S=n(" input."),Xe=c(),H=a("li"),qe=n(`Due to the difficulty of training a fully auto-regressive model over various factorization order, XLNet is pretrained
using only a sub-set of the output tokens as target which are selected with the `),oe=a("code"),j=n("target_mapping"),Me=n(" input."),O=c(),ne=a("li"),ze=n("To use XLNet for sequential decoding (i.e. not in fully bi-directional setting), use the "),k=a("code"),F=n("perm_mask"),Oe=n(` and
`),se=a("code"),Ae=n("target_mapping"),Pe=n(` inputs to control the attention span and outputs (see examples in
`),X=a("em"),Se=n("examples/pytorch/text-generation/run_generation.py"),De=n(")"),Ie=c(),Ce=a("li"),He=n("XLNet is one of the few models that has no sequence length limit."),D=c(),B=a("li"),Qe=n("XLNet is not a traditional autoregressive model but uses a training strategy that builds on that. It permutes the tokens in the sentence, then allows the model to use the last n tokens to predict the token n+1. Since this is all done with a mask, the sentence is actually fed in the model in the right order, but instead of masking the first n tokens for n+1, XLNet uses a mask that hides the previous tokens in some given permutation of 1,\u2026,sequence length."),Ue=c(),R=a("li"),We=n("XLNet also uses the same recurrence mechanism as Transformer-XL to build long-term dependencies."),je=c(),ae=a("p"),Ke=n("This model was contributed by "),ee=a("a"),Be=n("thomwolf"),Om=n(". The original code can be found "),vs=a("a"),Am=n("here"),Pm=n("."),vc=c(),oo=a("h2"),tn=a("a"),hl=a("span"),y(bs.$$.fragment),Sm=c(),ul=a("span"),Dm=n("Documentation resources"),bc=c(),ft=a("ul"),fl=a("li"),Kr=a("a"),Im=n("Text classification task guide"),Hm=c(),gl=a("li"),Br=a("a"),Qm=n("Token classification task guide"),Um=c(),_l=a("li"),Rr=a("a"),Wm=n("Question answering task guide"),Km=c(),kl=a("li"),Vr=a("a"),Bm=n("Causal language modeling task guide"),Rm=c(),vl=a("li"),Yr=a("a"),Vm=n("Multiple choice task guide"),yc=c(),no=a("h2"),on=a("a"),bl=a("span"),y(ys.$$.fragment),Ym=c(),yl=a("span"),Gm=n("XLNetConfig"),Tc=c(),yt=a("div"),y(Ts.$$.fragment),Jm=c(),Dt=a("p"),Zm=n("This is the configuration class to store the configuration of a "),Gr=a("a"),eh=n("XLNetModel"),th=n(" or a "),Jr=a("a"),oh=n("TFXLNetModel"),nh=n(`. It is used to
instantiate a XLNet 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
`),ws=a("a"),sh=n("xlnet-large-cased"),ah=n(" architecture."),rh=c(),so=a("p"),ih=n("Configuration objects inherit from "),Zr=a("a"),lh=n("PretrainedConfig"),dh=n(` and can be used to control the model outputs. Read the
documentation from `),ei=a("a"),ch=n("PretrainedConfig"),ph=n(" for more information."),mh=c(),y(nn.$$.fragment),wc=c(),ao=a("h2"),sn=a("a"),Tl=a("span"),y(Ns.$$.fragment),hh=c(),wl=a("span"),uh=n("XLNetTokenizer"),Nc=c(),Je=a("div"),y($s.$$.fragment),fh=c(),xs=a("p"),gh=n("Construct an XLNet tokenizer. Based on "),Ls=a("a"),_h=n("SentencePiece"),kh=n("."),vh=c(),Fs=a("p"),bh=n("This tokenizer inherits from "),ti=a("a"),yh=n("PreTrainedTokenizer"),Th=n(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),wh=c(),Ht=a("div"),y(Xs.$$.fragment),Nh=c(),Nl=a("p"),$h=n(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLNet sequence has the following format:`),xh=c(),qs=a("ul"),oi=a("li"),Lh=n("single sequence: "),$l=a("code"),Fh=n("X <sep> <cls>"),Xh=c(),ni=a("li"),qh=n("pair of sequences: "),xl=a("code"),Mh=n("A <sep> B <sep> <cls>"),zh=c(),an=a("div"),y(Ms.$$.fragment),Eh=c(),zs=a("p"),Ch=n(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Ll=a("code"),jh=n("prepare_for_model"),Oh=n(" method."),Ah=c(),wt=a("div"),y(Es.$$.fragment),Ph=c(),Fl=a("p"),Sh=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLNet"),Dh=c(),y(rn.$$.fragment),Ih=c(),ro=a("p"),Hh=n("If "),Xl=a("code"),Qh=n("token_ids_1"),Uh=n(" is "),ql=a("code"),Wh=n("None"),Kh=n(", this method only returns the first portion of the mask (0s)."),Bh=c(),si=a("div"),y(Cs.$$.fragment),$c=c(),io=a("h2"),ln=a("a"),Ml=a("span"),y(js.$$.fragment),Rh=c(),zl=a("span"),Vh=n("XLNetTokenizerFast"),xc=c(),rt=a("div"),y(Os.$$.fragment),Yh=c(),lo=a("p"),Gh=n("Construct a \u201Cfast\u201D XLNet tokenizer (backed by HuggingFace\u2019s "),El=a("em"),Jh=n("tokenizers"),Zh=n(` library). Based on
`),As=a("a"),eu=n("Unigram"),tu=n("."),ou=c(),Ps=a("p"),nu=n("This tokenizer inherits from "),ai=a("a"),su=n("PreTrainedTokenizerFast"),au=n(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),ru=c(),Qt=a("div"),y(Ss.$$.fragment),iu=c(),Cl=a("p"),lu=n(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLNet sequence has the following format:`),du=c(),Ds=a("ul"),ri=a("li"),cu=n("single sequence: "),jl=a("code"),pu=n("X <sep> <cls>"),mu=c(),ii=a("li"),hu=n("pair of sequences: "),Ol=a("code"),uu=n("A <sep> B <sep> <cls>"),fu=c(),Nt=a("div"),y(Is.$$.fragment),gu=c(),Al=a("p"),_u=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLNet"),ku=c(),y(dn.$$.fragment),vu=c(),co=a("p"),bu=n("If "),Pl=a("code"),yu=n("token_ids_1"),Tu=n(" is "),Sl=a("code"),wu=n("None"),Nu=n(", this method only returns the first portion of the mask (0s)."),Lc=c(),po=a("h2"),cn=a("a"),Dl=a("span"),y(Hs.$$.fragment),$u=c(),Il=a("span"),xu=n("XLNet specific outputs"),Fc=c(),mo=a("div"),y(Qs.$$.fragment),Lu=c(),Us=a("p"),Fu=n("Output type of "),li=a("a"),Xu=n("XLNetModel"),qu=n("."),Xc=c(),ho=a("div"),y(Ws.$$.fragment),Mu=c(),Ks=a("p"),zu=n("Output type of "),di=a("a"),Eu=n("XLNetLMHeadModel"),Cu=n("."),qc=c(),uo=a("div"),y(Bs.$$.fragment),ju=c(),Rs=a("p"),Ou=n("Output type of "),ci=a("a"),Au=n("XLNetForSequenceClassification"),Pu=n("."),Mc=c(),fo=a("div"),y(Vs.$$.fragment),Su=c(),Ys=a("p"),Du=n("Output type of "),pi=a("a"),Iu=n("XLNetForMultipleChoice"),Hu=n("."),zc=c(),go=a("div"),y(Gs.$$.fragment),Qu=c(),Js=a("p"),Uu=n("Output type of "),Hl=a("code"),Wu=n("XLNetForTokenClassificationOutput"),Ku=n("."),Ec=c(),_o=a("div"),y(Zs.$$.fragment),Bu=c(),ea=a("p"),Ru=n("Output type of "),mi=a("a"),Vu=n("XLNetForQuestionAnsweringSimple"),Yu=n("."),Cc=c(),ko=a("div"),y(ta.$$.fragment),Gu=c(),oa=a("p"),Ju=n("Output type of "),hi=a("a"),Zu=n("XLNetForQuestionAnswering"),ef=n("."),jc=c(),vo=a("div"),y(na.$$.fragment),tf=c(),sa=a("p"),of=n("Output type of "),ui=a("a"),nf=n("TFXLNetModel"),sf=n("."),Oc=c(),bo=a("div"),y(aa.$$.fragment),af=c(),ra=a("p"),rf=n("Output type of "),fi=a("a"),lf=n("TFXLNetLMHeadModel"),df=n("."),Ac=c(),yo=a("div"),y(ia.$$.fragment),cf=c(),la=a("p"),pf=n("Output type of "),gi=a("a"),mf=n("TFXLNetForSequenceClassification"),hf=n("."),Pc=c(),To=a("div"),y(da.$$.fragment),uf=c(),ca=a("p"),ff=n("Output type of "),_i=a("a"),gf=n("TFXLNetForMultipleChoice"),_f=n("."),Sc=c(),wo=a("div"),y(pa.$$.fragment),kf=c(),ma=a("p"),vf=n("Output type of "),Ql=a("code"),bf=n("TFXLNetForTokenClassificationOutput"),yf=n("."),Dc=c(),No=a("div"),y(ha.$$.fragment),Tf=c(),ua=a("p"),wf=n("Output type of "),ki=a("a"),Nf=n("TFXLNetForQuestionAnsweringSimple"),$f=n("."),Ic=c(),$o=a("h2"),pn=a("a"),Ul=a("span"),y(fa.$$.fragment),xf=c(),Wl=a("span"),Lf=n("XLNetModel"),Hc=c(),it=a("div"),y(ga.$$.fragment),Ff=c(),Kl=a("p"),Xf=n("The bare XLNet Model transformer outputting raw hidden-states without any specific head on top."),qf=c(),_a=a("p"),Mf=n("This model inherits from "),vi=a("a"),zf=n("PreTrainedModel"),Ef=n(`. 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.)`),Cf=c(),ka=a("p"),jf=n("This model is also a PyTorch "),va=a("a"),Of=n("torch.nn.Module"),Af=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Pf=c(),$t=a("div"),y(ba.$$.fragment),Sf=c(),xo=a("p"),Df=n("The "),bi=a("a"),If=n("XLNetModel"),Hf=n(" forward method, overrides the "),Bl=a("code"),Qf=n("__call__"),Uf=n(" special method."),Wf=c(),y(mn.$$.fragment),Kf=c(),y(hn.$$.fragment),Qc=c(),Lo=a("h2"),un=a("a"),Rl=a("span"),y(ya.$$.fragment),Bf=c(),Vl=a("span"),Rf=n("XLNetLMHeadModel"),Uc=c(),lt=a("div"),y(Ta.$$.fragment),Vf=c(),Yl=a("p"),Yf=n("XLNet Model with a language modeling head on top (linear layer with weights tied to the input embeddings)."),Gf=c(),wa=a("p"),Jf=n("This model inherits from "),yi=a("a"),Zf=n("PreTrainedModel"),eg=n(`. 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.)`),tg=c(),Na=a("p"),og=n("This model is also a PyTorch "),$a=a("a"),ng=n("torch.nn.Module"),sg=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ag=c(),xt=a("div"),y(xa.$$.fragment),rg=c(),Fo=a("p"),ig=n("The "),Ti=a("a"),lg=n("XLNetLMHeadModel"),dg=n(" forward method, overrides the "),Gl=a("code"),cg=n("__call__"),pg=n(" special method."),mg=c(),y(fn.$$.fragment),hg=c(),y(gn.$$.fragment),Wc=c(),Xo=a("h2"),_n=a("a"),Jl=a("span"),y(La.$$.fragment),ug=c(),Zl=a("span"),fg=n("XLNetForSequenceClassification"),Kc=c(),dt=a("div"),y(Fa.$$.fragment),gg=c(),ed=a("p"),_g=n(`XLNet Model with a sequence classification/regression head on top (a linear layer on top of the pooled output) e.g.
for GLUE tasks.`),kg=c(),Xa=a("p"),vg=n("This model inherits from "),wi=a("a"),bg=n("PreTrainedModel"),yg=n(`. 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.)`),Tg=c(),qa=a("p"),wg=n("This model is also a PyTorch "),Ma=a("a"),Ng=n("torch.nn.Module"),$g=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),xg=c(),gt=a("div"),y(za.$$.fragment),Lg=c(),qo=a("p"),Fg=n("The "),Ni=a("a"),Xg=n("XLNetForSequenceClassification"),qg=n(" forward method, overrides the "),td=a("code"),Mg=n("__call__"),zg=n(" special method."),Eg=c(),y(kn.$$.fragment),Cg=c(),y(vn.$$.fragment),jg=c(),y(bn.$$.fragment),Bc=c(),Mo=a("h2"),yn=a("a"),od=a("span"),y(Ea.$$.fragment),Og=c(),nd=a("span"),Ag=n("XLNetForMultipleChoice"),Rc=c(),ct=a("div"),y(Ca.$$.fragment),Pg=c(),sd=a("p"),Sg=n(`XLNet Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RACE/SWAG tasks.`),Dg=c(),ja=a("p"),Ig=n("This model inherits from "),$i=a("a"),Hg=n("PreTrainedModel"),Qg=n(`. 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.)`),Ug=c(),Oa=a("p"),Wg=n("This model is also a PyTorch "),Aa=a("a"),Kg=n("torch.nn.Module"),Bg=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Rg=c(),Lt=a("div"),y(Pa.$$.fragment),Vg=c(),zo=a("p"),Yg=n("The "),xi=a("a"),Gg=n("XLNetForMultipleChoice"),Jg=n(" forward method, overrides the "),ad=a("code"),Zg=n("__call__"),e_=n(" special method."),t_=c(),y(Tn.$$.fragment),o_=c(),y(wn.$$.fragment),Vc=c(),Eo=a("h2"),Nn=a("a"),rd=a("span"),y(Sa.$$.fragment),n_=c(),id=a("span"),s_=n("XLNetForTokenClassification"),Yc=c(),pt=a("div"),y(Da.$$.fragment),a_=c(),ld=a("p"),r_=n(`XLNet 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.`),i_=c(),Ia=a("p"),l_=n("This model inherits from "),Li=a("a"),d_=n("PreTrainedModel"),c_=n(`. 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.)`),p_=c(),Ha=a("p"),m_=n("This model is also a PyTorch "),Qa=a("a"),h_=n("torch.nn.Module"),u_=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),f_=c(),Ft=a("div"),y(Ua.$$.fragment),g_=c(),Co=a("p"),__=n("The "),Fi=a("a"),k_=n("XLNetForTokenClassification"),v_=n(" forward method, overrides the "),dd=a("code"),b_=n("__call__"),y_=n(" special method."),T_=c(),y($n.$$.fragment),w_=c(),y(xn.$$.fragment),Gc=c(),jo=a("h2"),Ln=a("a"),cd=a("span"),y(Wa.$$.fragment),N_=c(),pd=a("span"),$_=n("XLNetForQuestionAnsweringSimple"),Jc=c(),mt=a("div"),y(Ka.$$.fragment),x_=c(),Oo=a("p"),L_=n(`XLNet 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 `),md=a("code"),F_=n("span start logits"),X_=n(" and "),hd=a("code"),q_=n("span end logits"),M_=n(")."),z_=c(),Ba=a("p"),E_=n("This model inherits from "),Xi=a("a"),C_=n("PreTrainedModel"),j_=n(`. 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.)`),O_=c(),Ra=a("p"),A_=n("This model is also a PyTorch "),Va=a("a"),P_=n("torch.nn.Module"),S_=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),D_=c(),Xt=a("div"),y(Ya.$$.fragment),I_=c(),Ao=a("p"),H_=n("The "),qi=a("a"),Q_=n("XLNetForQuestionAnsweringSimple"),U_=n(" forward method, overrides the "),ud=a("code"),W_=n("__call__"),K_=n(" special method."),B_=c(),y(Fn.$$.fragment),R_=c(),y(Xn.$$.fragment),Zc=c(),Po=a("h2"),qn=a("a"),fd=a("span"),y(Ga.$$.fragment),V_=c(),gd=a("span"),Y_=n("XLNetForQuestionAnswering"),ep=c(),ht=a("div"),y(Ja.$$.fragment),G_=c(),So=a("p"),J_=n(`XLNet 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 `),_d=a("code"),Z_=n("span start logits"),ek=n(" and "),kd=a("code"),tk=n("span end logits"),ok=n(")."),nk=c(),Za=a("p"),sk=n("This model inherits from "),Mi=a("a"),ak=n("PreTrainedModel"),rk=n(`. 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.)`),ik=c(),er=a("p"),lk=n("This model is also a PyTorch "),tr=a("a"),dk=n("torch.nn.Module"),ck=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),pk=c(),qt=a("div"),y(or.$$.fragment),mk=c(),Do=a("p"),hk=n("The "),zi=a("a"),uk=n("XLNetForQuestionAnswering"),fk=n(" forward method, overrides the "),vd=a("code"),gk=n("__call__"),_k=n(" special method."),kk=c(),y(Mn.$$.fragment),vk=c(),y(zn.$$.fragment),tp=c(),Io=a("h2"),En=a("a"),bd=a("span"),y(nr.$$.fragment),bk=c(),yd=a("span"),yk=n("TFXLNetModel"),op=c(),et=a("div"),y(sr.$$.fragment),Tk=c(),Td=a("p"),wk=n("The bare XLNet Model transformer outputting raw hidden-states without any specific head on top."),Nk=c(),ar=a("p"),$k=n("This model inherits from "),Ei=a("a"),xk=n("TFPreTrainedModel"),Lk=n(`. 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.)`),Fk=c(),rr=a("p"),Xk=n("This model is also a "),ir=a("a"),qk=n("tf.keras.Model"),Mk=n(` 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.`),zk=c(),y(Cn.$$.fragment),Ek=c(),Mt=a("div"),y(lr.$$.fragment),Ck=c(),Ho=a("p"),jk=n("The "),Ci=a("a"),Ok=n("TFXLNetModel"),Ak=n(" forward method, overrides the "),wd=a("code"),Pk=n("__call__"),Sk=n(" special method."),Dk=c(),y(jn.$$.fragment),Ik=c(),y(On.$$.fragment),np=c(),Qo=a("h2"),An=a("a"),Nd=a("span"),y(dr.$$.fragment),Hk=c(),$d=a("span"),Qk=n("TFXLNetLMHeadModel"),sp=c(),tt=a("div"),y(cr.$$.fragment),Uk=c(),xd=a("p"),Wk=n("XLNet Model with a language modeling head on top (linear layer with weights tied to the input embeddings)."),Kk=c(),pr=a("p"),Bk=n("This model inherits from "),ji=a("a"),Rk=n("TFPreTrainedModel"),Vk=n(`. 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.)`),Yk=c(),mr=a("p"),Gk=n("This model is also a "),hr=a("a"),Jk=n("tf.keras.Model"),Zk=n(` 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.`),ev=c(),y(Pn.$$.fragment),tv=c(),zt=a("div"),y(ur.$$.fragment),ov=c(),Uo=a("p"),nv=n("The "),Oi=a("a"),sv=n("TFXLNetLMHeadModel"),av=n(" forward method, overrides the "),Ld=a("code"),rv=n("__call__"),iv=n(" special method."),lv=c(),y(Sn.$$.fragment),dv=c(),y(Dn.$$.fragment),ap=c(),Wo=a("h2"),In=a("a"),Fd=a("span"),y(fr.$$.fragment),cv=c(),Xd=a("span"),pv=n("TFXLNetForSequenceClassification"),rp=c(),ot=a("div"),y(gr.$$.fragment),mv=c(),qd=a("p"),hv=n(`XLNet Model with a sequence classification/regression head on top (a linear layer on top of the pooled output) e.g.
for GLUE tasks.`),uv=c(),_r=a("p"),fv=n("This model inherits from "),Ai=a("a"),gv=n("TFPreTrainedModel"),_v=n(`. 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.)`),kv=c(),kr=a("p"),vv=n("This model is also a "),vr=a("a"),bv=n("tf.keras.Model"),yv=n(` 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.`),Tv=c(),y(Hn.$$.fragment),wv=c(),_t=a("div"),y(br.$$.fragment),Nv=c(),Ko=a("p"),$v=n("The "),Pi=a("a"),xv=n("TFXLNetForSequenceClassification"),Lv=n(" forward method, overrides the "),Md=a("code"),Fv=n("__call__"),Xv=n(" special method."),qv=c(),y(Qn.$$.fragment),Mv=c(),y(Un.$$.fragment),zv=c(),y(Wn.$$.fragment),ip=c(),Bo=a("h2"),Kn=a("a"),zd=a("span"),y(yr.$$.fragment),Ev=c(),Ed=a("span"),Cv=n("TFLNetForMultipleChoice"),lp=c(),nt=a("div"),y(Tr.$$.fragment),jv=c(),Cd=a("p"),Ov=n(`XLNET 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.`),Av=c(),wr=a("p"),Pv=n("This model inherits from "),Si=a("a"),Sv=n("TFPreTrainedModel"),Dv=n(`. 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.)`),Iv=c(),Nr=a("p"),Hv=n("This model is also a "),$r=a("a"),Qv=n("tf.keras.Model"),Uv=n(` 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.`),Wv=c(),y(Bn.$$.fragment),Kv=c(),Et=a("div"),y(xr.$$.fragment),Bv=c(),Ro=a("p"),Rv=n("The "),Di=a("a"),Vv=n("TFXLNetForMultipleChoice"),Yv=n(" forward method, overrides the "),jd=a("code"),Gv=n("__call__"),Jv=n(" special method."),Zv=c(),y(Rn.$$.fragment),eb=c(),y(Vn.$$.fragment),dp=c(),Vo=a("h2"),Yn=a("a"),Od=a("span"),y(Lr.$$.fragment),tb=c(),Ad=a("span"),ob=n("TFXLNetForTokenClassification"),cp=c(),st=a("div"),y(Fr.$$.fragment),nb=c(),Pd=a("p"),sb=n(`XLNet 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.`),ab=c(),Xr=a("p"),rb=n("This model inherits from "),Ii=a("a"),ib=n("TFPreTrainedModel"),lb=n(`. 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.)`),db=c(),qr=a("p"),cb=n("This model is also a "),Mr=a("a"),pb=n("tf.keras.Model"),mb=n(` 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.`),hb=c(),y(Gn.$$.fragment),ub=c(),kt=a("div"),y(zr.$$.fragment),fb=c(),Yo=a("p"),gb=n("The "),Hi=a("a"),_b=n("TFXLNetForTokenClassification"),kb=n(" forward method, overrides the "),Sd=a("code"),vb=n("__call__"),bb=n(" special method."),yb=c(),y(Jn.$$.fragment),Tb=c(),y(Zn.$$.fragment),wb=c(),y(es.$$.fragment),pp=c(),Go=a("h2"),ts=a("a"),Dd=a("span"),y(Er.$$.fragment),Nb=c(),Id=a("span"),$b=n("TFXLNetForQuestionAnsweringSimple"),mp=c(),at=a("div"),y(Cr.$$.fragment),xb=c(),Jo=a("p"),Lb=n(`XLNet 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 `),Hd=a("code"),Fb=n("span start logits"),Xb=n(" and "),Qd=a("code"),qb=n("span end logits"),Mb=n(")."),zb=c(),jr=a("p"),Eb=n("This model inherits from "),Qi=a("a"),Cb=n("TFPreTrainedModel"),jb=n(`. 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.)`),Ob=c(),Or=a("p"),Ab=n("This model is also a "),Ar=a("a"),Pb=n("tf.keras.Model"),Sb=n(` 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.`),Db=c(),y(os.$$.fragment),Ib=c(),vt=a("div"),y(Pr.$$.fragment),Hb=c(),Zo=a("p"),Qb=n("The "),Ui=a("a"),Ub=n("TFXLNetForQuestionAnsweringSimple"),Wb=n(" forward method, overrides the "),Ud=a("code"),Kb=n("__call__"),Bb=n(" special method."),Rb=c(),y(ns.$$.fragment),Vb=c(),y(ss.$$.fragment),Yb=c(),y(as.$$.fragment),this.h()},l(o){const _=i1('[data-svelte="svelte-1phssyn"]',document.head);d=r(_,"META",{name:!0,content:!0}),_.forEach(t),b=p(o),h=r(o,"H1",{class:!0});var Sr=i(h);f=r(Sr,"A",{id:!0,class:!0,href:!0});var Wd=i(f);v=r(Wd,"SPAN",{});var Kd=i(v);T(l.$$.fragment,Kd),Kd.forEach(t),Wd.forEach(t),m=p(Sr),M=r(Sr,"SPAN",{});var Bd=i(M);ye=s(Bd,"XLNet"),Bd.forEach(t),Sr.forEach(t),_e=p(o),P=r(o,"DIV",{class:!0});var Dr=i(P);me=r(Dr,"A",{href:!0});var Rd=i(me);te=r(Rd,"IMG",{alt:!0,src:!0}),Rd.forEach(t),Te=p(Dr),Q=r(Dr,"A",{href:!0});var Vd=i(Q);he=r(Vd,"IMG",{alt:!0,src:!0}),Vd.forEach(t),Dr.forEach(t),V=p(o),re=r(o,"H2",{class:!0});var Ir=i(re);le=r(Ir,"A",{id:!0,class:!0,href:!0});var Yd=i(le);U=r(Yd,"SPAN",{});var Gd=i(U);T(de.$$.fragment,Gd),Gd.forEach(t),Yd.forEach(t),we=p(Ir),W=r(Ir,"SPAN",{});var Jd=i(W);Ne=s(Jd,"Overview"),Jd.forEach(t),Ir.forEach(t),ke=p(o),I=r(o,"P",{});var Hr=i(I);$e=s(Hr,"The XLNet model was proposed in "),ce=r(Hr,"A",{href:!0,rel:!0});var Zd=i(ce);ie=s(Zd,"XLNet: Generalized Autoregressive Pretraining for Language Understanding"),Zd.forEach(t),z=s(Hr,` by Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov,
Quoc V. Le. XLnet is an extension of the Transformer-XL model pre-trained using an autoregressive method to learn
bidirectional contexts by maximizing the expected likelihood over all permutations of the input sequence factorization
order.`),Hr.forEach(t),C=p(o),ue=r(o,"P",{});var ec=i(ue);J=s(ec,"The abstract from the paper is the following:"),ec.forEach(t),ve=p(o),fe=r(o,"P",{});var tc=i(fe);K=r(tc,"EM",{});var oc=i(K);xe=s(oc,`With the capability of modeling bidirectional contexts, denoising autoencoding based pretraining like BERT achieves
better performance than pretraining approaches based on autoregressive language modeling. However, relying on
corrupting the input with masks, BERT neglects dependency between the masked positions and suffers from a
pretrain-finetune discrepancy. In light of these pros and cons, we propose XLNet, a generalized autoregressive
pretraining method that (1) enables learning bidirectional contexts by maximizing the expected likelihood over all
permutations of the factorization order and (2) overcomes the limitations of BERT thanks to its autoregressive
formulation. Furthermore, XLNet integrates ideas from Transformer-XL, the state-of-the-art autoregressive model, into
pretraining. Empirically, under comparable experiment settings, XLNet outperforms BERT on 20 tasks, often by a large
margin, including question answering, natural language inference, sentiment analysis, and document ranking.`),oc.forEach(t),tc.forEach(t),be=p(o),E=r(o,"P",{});var nc=i(E);Le=s(nc,"Tips:"),nc.forEach(t),Y=p(o),G=r(o,"UL",{});var ut=i(G);pe=r(ut,"LI",{});var Qr=i(pe);Z=s(Qr,"The specific attention pattern can be controlled at training and test time using the "),ge=r(Qr,"CODE",{});var sc=i(ge);Fe=s(sc,"perm_mask"),sc.forEach(t),S=s(Qr," input."),Qr.forEach(t),Xe=p(ut),H=r(ut,"LI",{});var Ur=i(H);qe=s(Ur,`Due to the difficulty of training a fully auto-regressive model over various factorization order, XLNet is pretrained
using only a sub-set of the output tokens as target which are selected with the `),oe=r(Ur,"CODE",{});var ac=i(oe);j=s(ac,"target_mapping"),ac.forEach(t),Me=s(Ur," input."),Ur.forEach(t),O=p(ut),ne=r(ut,"LI",{});var It=i(ne);ze=s(It,"To use XLNet for sequential decoding (i.e. not in fully bi-directional setting), use the "),k=r(It,"CODE",{});var rc=i(k);F=s(rc,"perm_mask"),rc.forEach(t),Oe=s(It,` and
`),se=r(It,"CODE",{});var ic=i(se);Ae=s(ic,"target_mapping"),ic.forEach(t),Pe=s(It,` inputs to control the attention span and outputs (see examples in
`),X=r(It,"EM",{});var lc=i(X);Se=s(lc,"examples/pytorch/text-generation/run_generation.py"),lc.forEach(t),De=s(It,")"),It.forEach(t),Ie=p(ut),Ce=r(ut,"LI",{});var dc=i(Ce);He=s(dc,"XLNet is one of the few models that has no sequence length limit."),dc.forEach(t),D=p(ut),B=r(ut,"LI",{});var cc=i(B);Qe=s(cc,"XLNet is not a traditional autoregressive model but uses a training strategy that builds on that. It permutes the tokens in the sentence, then allows the model to use the last n tokens to predict the token n+1. Since this is all done with a mask, the sentence is actually fed in the model in the right order, but instead of masking the first n tokens for n+1, XLNet uses a mask that hides the previous tokens in some given permutation of 1,\u2026,sequence length."),cc.forEach(t),Ue=p(ut),R=r(ut,"LI",{});var pc=i(R);We=s(pc,"XLNet also uses the same recurrence mechanism as Transformer-XL to build long-term dependencies."),pc.forEach(t),ut.forEach(t),je=p(o),ae=r(o,"P",{});var en=i(ae);Ke=s(en,"This model was contributed by "),ee=r(en,"A",{href:!0,rel:!0});var mc=i(ee);Be=s(mc,"thomwolf"),mc.forEach(t),Om=s(en,". The original code can be found "),vs=r(en,"A",{href:!0,rel:!0});var hc=i(vs);Am=s(hc,"here"),hc.forEach(t),Pm=s(en,"."),en.forEach(t),vc=p(o),oo=r(o,"H2",{class:!0});var Wr=i(oo);tn=r(Wr,"A",{id:!0,class:!0,href:!0});var uc=i(tn);hl=r(uc,"SPAN",{});var fc=i(hl);T(bs.$$.fragment,fc),fc.forEach(t),uc.forEach(t),Sm=p(Wr),ul=r(Wr,"SPAN",{});var gc=i(ul);Dm=s(gc,"Documentation resources"),gc.forEach(t),Wr.forEach(t),bc=p(o),ft=r(o,"UL",{});var Tt=i(ft);fl=r(Tt,"LI",{});var _c=i(fl);Kr=r(_c,"A",{href:!0});var kc=i(Kr);Im=s(kc,"Text classification task guide"),kc.forEach(t),_c.forEach(t),Hm=p(Tt),gl=r(Tt,"LI",{});var ty=i(gl);Br=r(ty,"A",{href:!0});var oy=i(Br);Qm=s(oy,"Token classification task guide"),oy.forEach(t),ty.forEach(t),Um=p(Tt),_l=r(Tt,"LI",{});var ny=i(_l);Rr=r(ny,"A",{href:!0});var sy=i(Rr);Wm=s(sy,"Question answering task guide"),sy.forEach(t),ny.forEach(t),Km=p(Tt),kl=r(Tt,"LI",{});var ay=i(kl);Vr=r(ay,"A",{href:!0});var ry=i(Vr);Bm=s(ry,"Causal language modeling task guide"),ry.forEach(t),ay.forEach(t),Rm=p(Tt),vl=r(Tt,"LI",{});var iy=i(vl);Yr=r(iy,"A",{href:!0});var ly=i(Yr);Vm=s(ly,"Multiple choice task guide"),ly.forEach(t),iy.forEach(t),Tt.forEach(t),yc=p(o),no=r(o,"H2",{class:!0});var up=i(no);on=r(up,"A",{id:!0,class:!0,href:!0});var dy=i(on);bl=r(dy,"SPAN",{});var cy=i(bl);T(ys.$$.fragment,cy),cy.forEach(t),dy.forEach(t),Ym=p(up),yl=r(up,"SPAN",{});var py=i(yl);Gm=s(py,"XLNetConfig"),py.forEach(t),up.forEach(t),Tc=p(o),yt=r(o,"DIV",{class:!0});var rs=i(yt);T(Ts.$$.fragment,rs),Jm=p(rs),Dt=r(rs,"P",{});var is=i(Dt);Zm=s(is,"This is the configuration class to store the configuration of a "),Gr=r(is,"A",{href:!0});var my=i(Gr);eh=s(my,"XLNetModel"),my.forEach(t),th=s(is," or a "),Jr=r(is,"A",{href:!0});var hy=i(Jr);oh=s(hy,"TFXLNetModel"),hy.forEach(t),nh=s(is,`. It is used to
instantiate a XLNet 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
`),ws=r(is,"A",{href:!0,rel:!0});var uy=i(ws);sh=s(uy,"xlnet-large-cased"),uy.forEach(t),ah=s(is," architecture."),is.forEach(t),rh=p(rs),so=r(rs,"P",{});var Wi=i(so);ih=s(Wi,"Configuration objects inherit from "),Zr=r(Wi,"A",{href:!0});var fy=i(Zr);lh=s(fy,"PretrainedConfig"),fy.forEach(t),dh=s(Wi,` and can be used to control the model outputs. Read the
documentation from `),ei=r(Wi,"A",{href:!0});var gy=i(ei);ch=s(gy,"PretrainedConfig"),gy.forEach(t),ph=s(Wi," for more information."),Wi.forEach(t),mh=p(rs),T(nn.$$.fragment,rs),rs.forEach(t),wc=p(o),ao=r(o,"H2",{class:!0});var fp=i(ao);sn=r(fp,"A",{id:!0,class:!0,href:!0});var _y=i(sn);Tl=r(_y,"SPAN",{});var ky=i(Tl);T(Ns.$$.fragment,ky),ky.forEach(t),_y.forEach(t),hh=p(fp),wl=r(fp,"SPAN",{});var vy=i(wl);uh=s(vy,"XLNetTokenizer"),vy.forEach(t),fp.forEach(t),Nc=p(o),Je=r(o,"DIV",{class:!0});var bt=i(Je);T($s.$$.fragment,bt),fh=p(bt),xs=r(bt,"P",{});var gp=i(xs);gh=s(gp,"Construct an XLNet tokenizer. Based on "),Ls=r(gp,"A",{href:!0,rel:!0});var by=i(Ls);_h=s(by,"SentencePiece"),by.forEach(t),kh=s(gp,"."),gp.forEach(t),vh=p(bt),Fs=r(bt,"P",{});var _p=i(Fs);bh=s(_p,"This tokenizer inherits from "),ti=r(_p,"A",{href:!0});var yy=i(ti);yh=s(yy,"PreTrainedTokenizer"),yy.forEach(t),Th=s(_p,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),_p.forEach(t),wh=p(bt),Ht=r(bt,"DIV",{class:!0});var Ki=i(Ht);T(Xs.$$.fragment,Ki),Nh=p(Ki),Nl=r(Ki,"P",{});var Ty=i(Nl);$h=s(Ty,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLNet sequence has the following format:`),Ty.forEach(t),xh=p(Ki),qs=r(Ki,"UL",{});var kp=i(qs);oi=r(kp,"LI",{});var Gb=i(oi);Lh=s(Gb,"single sequence: "),$l=r(Gb,"CODE",{});var wy=i($l);Fh=s(wy,"X <sep> <cls>"),wy.forEach(t),Gb.forEach(t),Xh=p(kp),ni=r(kp,"LI",{});var Jb=i(ni);qh=s(Jb,"pair of sequences: "),xl=r(Jb,"CODE",{});var Ny=i(xl);Mh=s(Ny,"A <sep> B <sep> <cls>"),Ny.forEach(t),Jb.forEach(t),kp.forEach(t),Ki.forEach(t),zh=p(bt),an=r(bt,"DIV",{class:!0});var vp=i(an);T(Ms.$$.fragment,vp),Eh=p(vp),zs=r(vp,"P",{});var bp=i(zs);Ch=s(bp,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Ll=r(bp,"CODE",{});var $y=i(Ll);jh=s($y,"prepare_for_model"),$y.forEach(t),Oh=s(bp," method."),bp.forEach(t),vp.forEach(t),Ah=p(bt),wt=r(bt,"DIV",{class:!0});var ls=i(wt);T(Es.$$.fragment,ls),Ph=p(ls),Fl=r(ls,"P",{});var xy=i(Fl);Sh=s(xy,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLNet"),xy.forEach(t),Dh=p(ls),T(rn.$$.fragment,ls),Ih=p(ls),ro=r(ls,"P",{});var Bi=i(ro);Hh=s(Bi,"If "),Xl=r(Bi,"CODE",{});var Ly=i(Xl);Qh=s(Ly,"token_ids_1"),Ly.forEach(t),Uh=s(Bi," is "),ql=r(Bi,"CODE",{});var Fy=i(ql);Wh=s(Fy,"None"),Fy.forEach(t),Kh=s(Bi,", this method only returns the first portion of the mask (0s)."),Bi.forEach(t),ls.forEach(t),Bh=p(bt),si=r(bt,"DIV",{class:!0});var Xy=i(si);T(Cs.$$.fragment,Xy),Xy.forEach(t),bt.forEach(t),$c=p(o),io=r(o,"H2",{class:!0});var yp=i(io);ln=r(yp,"A",{id:!0,class:!0,href:!0});var qy=i(ln);Ml=r(qy,"SPAN",{});var My=i(Ml);T(js.$$.fragment,My),My.forEach(t),qy.forEach(t),Rh=p(yp),zl=r(yp,"SPAN",{});var zy=i(zl);Vh=s(zy,"XLNetTokenizerFast"),zy.forEach(t),yp.forEach(t),xc=p(o),rt=r(o,"DIV",{class:!0});var Ut=i(rt);T(Os.$$.fragment,Ut),Yh=p(Ut),lo=r(Ut,"P",{});var Ri=i(lo);Gh=s(Ri,"Construct a \u201Cfast\u201D XLNet tokenizer (backed by HuggingFace\u2019s "),El=r(Ri,"EM",{});var Ey=i(El);Jh=s(Ey,"tokenizers"),Ey.forEach(t),Zh=s(Ri,` library). Based on
`),As=r(Ri,"A",{href:!0,rel:!0});var Cy=i(As);eu=s(Cy,"Unigram"),Cy.forEach(t),tu=s(Ri,"."),Ri.forEach(t),ou=p(Ut),Ps=r(Ut,"P",{});var Tp=i(Ps);nu=s(Tp,"This tokenizer inherits from "),ai=r(Tp,"A",{href:!0});var jy=i(ai);su=s(jy,"PreTrainedTokenizerFast"),jy.forEach(t),au=s(Tp,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Tp.forEach(t),ru=p(Ut),Qt=r(Ut,"DIV",{class:!0});var Vi=i(Qt);T(Ss.$$.fragment,Vi),iu=p(Vi),Cl=r(Vi,"P",{});var Oy=i(Cl);lu=s(Oy,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An XLNet sequence has the following format:`),Oy.forEach(t),du=p(Vi),Ds=r(Vi,"UL",{});var wp=i(Ds);ri=r(wp,"LI",{});var Zb=i(ri);cu=s(Zb,"single sequence: "),jl=r(Zb,"CODE",{});var Ay=i(jl);pu=s(Ay,"X <sep> <cls>"),Ay.forEach(t),Zb.forEach(t),mu=p(wp),ii=r(wp,"LI",{});var ey=i(ii);hu=s(ey,"pair of sequences: "),Ol=r(ey,"CODE",{});var Py=i(Ol);uu=s(Py,"A <sep> B <sep> <cls>"),Py.forEach(t),ey.forEach(t),wp.forEach(t),Vi.forEach(t),fu=p(Ut),Nt=r(Ut,"DIV",{class:!0});var ds=i(Nt);T(Is.$$.fragment,ds),gu=p(ds),Al=r(ds,"P",{});var Sy=i(Al);_u=s(Sy,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLNet"),Sy.forEach(t),ku=p(ds),T(dn.$$.fragment,ds),vu=p(ds),co=r(ds,"P",{});var Yi=i(co);bu=s(Yi,"If "),Pl=r(Yi,"CODE",{});var Dy=i(Pl);yu=s(Dy,"token_ids_1"),Dy.forEach(t),Tu=s(Yi," is "),Sl=r(Yi,"CODE",{});var Iy=i(Sl);wu=s(Iy,"None"),Iy.forEach(t),Nu=s(Yi,", this method only returns the first portion of the mask (0s)."),Yi.forEach(t),ds.forEach(t),Ut.forEach(t),Lc=p(o),po=r(o,"H2",{class:!0});var Np=i(po);cn=r(Np,"A",{id:!0,class:!0,href:!0});var Hy=i(cn);Dl=r(Hy,"SPAN",{});var Qy=i(Dl);T(Hs.$$.fragment,Qy),Qy.forEach(t),Hy.forEach(t),$u=p(Np),Il=r(Np,"SPAN",{});var Uy=i(Il);xu=s(Uy,"XLNet specific outputs"),Uy.forEach(t),Np.forEach(t),Fc=p(o),mo=r(o,"DIV",{class:!0});var $p=i(mo);T(Qs.$$.fragment,$p),Lu=p($p),Us=r($p,"P",{});var xp=i(Us);Fu=s(xp,"Output type of "),li=r(xp,"A",{href:!0});var Wy=i(li);Xu=s(Wy,"XLNetModel"),Wy.forEach(t),qu=s(xp,"."),xp.forEach(t),$p.forEach(t),Xc=p(o),ho=r(o,"DIV",{class:!0});var Lp=i(ho);T(Ws.$$.fragment,Lp),Mu=p(Lp),Ks=r(Lp,"P",{});var Fp=i(Ks);zu=s(Fp,"Output type of "),di=r(Fp,"A",{href:!0});var Ky=i(di);Eu=s(Ky,"XLNetLMHeadModel"),Ky.forEach(t),Cu=s(Fp,"."),Fp.forEach(t),Lp.forEach(t),qc=p(o),uo=r(o,"DIV",{class:!0});var Xp=i(uo);T(Bs.$$.fragment,Xp),ju=p(Xp),Rs=r(Xp,"P",{});var qp=i(Rs);Ou=s(qp,"Output type of "),ci=r(qp,"A",{href:!0});var By=i(ci);Au=s(By,"XLNetForSequenceClassification"),By.forEach(t),Pu=s(qp,"."),qp.forEach(t),Xp.forEach(t),Mc=p(o),fo=r(o,"DIV",{class:!0});var Mp=i(fo);T(Vs.$$.fragment,Mp),Su=p(Mp),Ys=r(Mp,"P",{});var zp=i(Ys);Du=s(zp,"Output type of "),pi=r(zp,"A",{href:!0});var Ry=i(pi);Iu=s(Ry,"XLNetForMultipleChoice"),Ry.forEach(t),Hu=s(zp,"."),zp.forEach(t),Mp.forEach(t),zc=p(o),go=r(o,"DIV",{class:!0});var Ep=i(go);T(Gs.$$.fragment,Ep),Qu=p(Ep),Js=r(Ep,"P",{});var Cp=i(Js);Uu=s(Cp,"Output type of "),Hl=r(Cp,"CODE",{});var Vy=i(Hl);Wu=s(Vy,"XLNetForTokenClassificationOutput"),Vy.forEach(t),Ku=s(Cp,"."),Cp.forEach(t),Ep.forEach(t),Ec=p(o),_o=r(o,"DIV",{class:!0});var jp=i(_o);T(Zs.$$.fragment,jp),Bu=p(jp),ea=r(jp,"P",{});var Op=i(ea);Ru=s(Op,"Output type of "),mi=r(Op,"A",{href:!0});var Yy=i(mi);Vu=s(Yy,"XLNetForQuestionAnsweringSimple"),Yy.forEach(t),Yu=s(Op,"."),Op.forEach(t),jp.forEach(t),Cc=p(o),ko=r(o,"DIV",{class:!0});var Ap=i(ko);T(ta.$$.fragment,Ap),Gu=p(Ap),oa=r(Ap,"P",{});var Pp=i(oa);Ju=s(Pp,"Output type of "),hi=r(Pp,"A",{href:!0});var Gy=i(hi);Zu=s(Gy,"XLNetForQuestionAnswering"),Gy.forEach(t),ef=s(Pp,"."),Pp.forEach(t),Ap.forEach(t),jc=p(o),vo=r(o,"DIV",{class:!0});var Sp=i(vo);T(na.$$.fragment,Sp),tf=p(Sp),sa=r(Sp,"P",{});var Dp=i(sa);of=s(Dp,"Output type of "),ui=r(Dp,"A",{href:!0});var Jy=i(ui);nf=s(Jy,"TFXLNetModel"),Jy.forEach(t),sf=s(Dp,"."),Dp.forEach(t),Sp.forEach(t),Oc=p(o),bo=r(o,"DIV",{class:!0});var Ip=i(bo);T(aa.$$.fragment,Ip),af=p(Ip),ra=r(Ip,"P",{});var Hp=i(ra);rf=s(Hp,"Output type of "),fi=r(Hp,"A",{href:!0});var Zy=i(fi);lf=s(Zy,"TFXLNetLMHeadModel"),Zy.forEach(t),df=s(Hp,"."),Hp.forEach(t),Ip.forEach(t),Ac=p(o),yo=r(o,"DIV",{class:!0});var Qp=i(yo);T(ia.$$.fragment,Qp),cf=p(Qp),la=r(Qp,"P",{});var Up=i(la);pf=s(Up,"Output type of "),gi=r(Up,"A",{href:!0});var eT=i(gi);mf=s(eT,"TFXLNetForSequenceClassification"),eT.forEach(t),hf=s(Up,"."),Up.forEach(t),Qp.forEach(t),Pc=p(o),To=r(o,"DIV",{class:!0});var Wp=i(To);T(da.$$.fragment,Wp),uf=p(Wp),ca=r(Wp,"P",{});var Kp=i(ca);ff=s(Kp,"Output type of "),_i=r(Kp,"A",{href:!0});var tT=i(_i);gf=s(tT,"TFXLNetForMultipleChoice"),tT.forEach(t),_f=s(Kp,"."),Kp.forEach(t),Wp.forEach(t),Sc=p(o),wo=r(o,"DIV",{class:!0});var Bp=i(wo);T(pa.$$.fragment,Bp),kf=p(Bp),ma=r(Bp,"P",{});var Rp=i(ma);vf=s(Rp,"Output type of "),Ql=r(Rp,"CODE",{});var oT=i(Ql);bf=s(oT,"TFXLNetForTokenClassificationOutput"),oT.forEach(t),yf=s(Rp,"."),Rp.forEach(t),Bp.forEach(t),Dc=p(o),No=r(o,"DIV",{class:!0});var Vp=i(No);T(ha.$$.fragment,Vp),Tf=p(Vp),ua=r(Vp,"P",{});var Yp=i(ua);wf=s(Yp,"Output type of "),ki=r(Yp,"A",{href:!0});var nT=i(ki);Nf=s(nT,"TFXLNetForQuestionAnsweringSimple"),nT.forEach(t),$f=s(Yp,"."),Yp.forEach(t),Vp.forEach(t),Ic=p(o),$o=r(o,"H2",{class:!0});var Gp=i($o);pn=r(Gp,"A",{id:!0,class:!0,href:!0});var sT=i(pn);Ul=r(sT,"SPAN",{});var aT=i(Ul);T(fa.$$.fragment,aT),aT.forEach(t),sT.forEach(t),xf=p(Gp),Wl=r(Gp,"SPAN",{});var rT=i(Wl);Lf=s(rT,"XLNetModel"),rT.forEach(t),Gp.forEach(t),Hc=p(o),it=r(o,"DIV",{class:!0});var Wt=i(it);T(ga.$$.fragment,Wt),Ff=p(Wt),Kl=r(Wt,"P",{});var iT=i(Kl);Xf=s(iT,"The bare XLNet Model transformer outputting raw hidden-states without any specific head on top."),iT.forEach(t),qf=p(Wt),_a=r(Wt,"P",{});var Jp=i(_a);Mf=s(Jp,"This model inherits from "),vi=r(Jp,"A",{href:!0});var lT=i(vi);zf=s(lT,"PreTrainedModel"),lT.forEach(t),Ef=s(Jp,`. 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.)`),Jp.forEach(t),Cf=p(Wt),ka=r(Wt,"P",{});var Zp=i(ka);jf=s(Zp,"This model is also a PyTorch "),va=r(Zp,"A",{href:!0,rel:!0});var dT=i(va);Of=s(dT,"torch.nn.Module"),dT.forEach(t),Af=s(Zp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Zp.forEach(t),Pf=p(Wt),$t=r(Wt,"DIV",{class:!0});var cs=i($t);T(ba.$$.fragment,cs),Sf=p(cs),xo=r(cs,"P",{});var Gi=i(xo);Df=s(Gi,"The "),bi=r(Gi,"A",{href:!0});var cT=i(bi);If=s(cT,"XLNetModel"),cT.forEach(t),Hf=s(Gi," forward method, overrides the "),Bl=r(Gi,"CODE",{});var pT=i(Bl);Qf=s(pT,"__call__"),pT.forEach(t),Uf=s(Gi," special method."),Gi.forEach(t),Wf=p(cs),T(mn.$$.fragment,cs),Kf=p(cs),T(hn.$$.fragment,cs),cs.forEach(t),Wt.forEach(t),Qc=p(o),Lo=r(o,"H2",{class:!0});var em=i(Lo);un=r(em,"A",{id:!0,class:!0,href:!0});var mT=i(un);Rl=r(mT,"SPAN",{});var hT=i(Rl);T(ya.$$.fragment,hT),hT.forEach(t),mT.forEach(t),Bf=p(em),Vl=r(em,"SPAN",{});var uT=i(Vl);Rf=s(uT,"XLNetLMHeadModel"),uT.forEach(t),em.forEach(t),Uc=p(o),lt=r(o,"DIV",{class:!0});var Kt=i(lt);T(Ta.$$.fragment,Kt),Vf=p(Kt),Yl=r(Kt,"P",{});var fT=i(Yl);Yf=s(fT,"XLNet Model with a language modeling head on top (linear layer with weights tied to the input embeddings)."),fT.forEach(t),Gf=p(Kt),wa=r(Kt,"P",{});var tm=i(wa);Jf=s(tm,"This model inherits from "),yi=r(tm,"A",{href:!0});var gT=i(yi);Zf=s(gT,"PreTrainedModel"),gT.forEach(t),eg=s(tm,`. 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.)`),tm.forEach(t),tg=p(Kt),Na=r(Kt,"P",{});var om=i(Na);og=s(om,"This model is also a PyTorch "),$a=r(om,"A",{href:!0,rel:!0});var _T=i($a);ng=s(_T,"torch.nn.Module"),_T.forEach(t),sg=s(om,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),om.forEach(t),ag=p(Kt),xt=r(Kt,"DIV",{class:!0});var ps=i(xt);T(xa.$$.fragment,ps),rg=p(ps),Fo=r(ps,"P",{});var Ji=i(Fo);ig=s(Ji,"The "),Ti=r(Ji,"A",{href:!0});var kT=i(Ti);lg=s(kT,"XLNetLMHeadModel"),kT.forEach(t),dg=s(Ji," forward method, overrides the "),Gl=r(Ji,"CODE",{});var vT=i(Gl);cg=s(vT,"__call__"),vT.forEach(t),pg=s(Ji," special method."),Ji.forEach(t),mg=p(ps),T(fn.$$.fragment,ps),hg=p(ps),T(gn.$$.fragment,ps),ps.forEach(t),Kt.forEach(t),Wc=p(o),Xo=r(o,"H2",{class:!0});var nm=i(Xo);_n=r(nm,"A",{id:!0,class:!0,href:!0});var bT=i(_n);Jl=r(bT,"SPAN",{});var yT=i(Jl);T(La.$$.fragment,yT),yT.forEach(t),bT.forEach(t),ug=p(nm),Zl=r(nm,"SPAN",{});var TT=i(Zl);fg=s(TT,"XLNetForSequenceClassification"),TT.forEach(t),nm.forEach(t),Kc=p(o),dt=r(o,"DIV",{class:!0});var Bt=i(dt);T(Fa.$$.fragment,Bt),gg=p(Bt),ed=r(Bt,"P",{});var wT=i(ed);_g=s(wT,`XLNet Model with a sequence classification/regression head on top (a linear layer on top of the pooled output) e.g.
for GLUE tasks.`),wT.forEach(t),kg=p(Bt),Xa=r(Bt,"P",{});var sm=i(Xa);vg=s(sm,"This model inherits from "),wi=r(sm,"A",{href:!0});var NT=i(wi);bg=s(NT,"PreTrainedModel"),NT.forEach(t),yg=s(sm,`. 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.)`),sm.forEach(t),Tg=p(Bt),qa=r(Bt,"P",{});var am=i(qa);wg=s(am,"This model is also a PyTorch "),Ma=r(am,"A",{href:!0,rel:!0});var $T=i(Ma);Ng=s($T,"torch.nn.Module"),$T.forEach(t),$g=s(am,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),am.forEach(t),xg=p(Bt),gt=r(Bt,"DIV",{class:!0});var Rt=i(gt);T(za.$$.fragment,Rt),Lg=p(Rt),qo=r(Rt,"P",{});var Zi=i(qo);Fg=s(Zi,"The "),Ni=r(Zi,"A",{href:!0});var xT=i(Ni);Xg=s(xT,"XLNetForSequenceClassification"),xT.forEach(t),qg=s(Zi," forward method, overrides the "),td=r(Zi,"CODE",{});var LT=i(td);Mg=s(LT,"__call__"),LT.forEach(t),zg=s(Zi," special method."),Zi.forEach(t),Eg=p(Rt),T(kn.$$.fragment,Rt),Cg=p(Rt),T(vn.$$.fragment,Rt),jg=p(Rt),T(bn.$$.fragment,Rt),Rt.forEach(t),Bt.forEach(t),Bc=p(o),Mo=r(o,"H2",{class:!0});var rm=i(Mo);yn=r(rm,"A",{id:!0,class:!0,href:!0});var FT=i(yn);od=r(FT,"SPAN",{});var XT=i(od);T(Ea.$$.fragment,XT),XT.forEach(t),FT.forEach(t),Og=p(rm),nd=r(rm,"SPAN",{});var qT=i(nd);Ag=s(qT,"XLNetForMultipleChoice"),qT.forEach(t),rm.forEach(t),Rc=p(o),ct=r(o,"DIV",{class:!0});var Vt=i(ct);T(Ca.$$.fragment,Vt),Pg=p(Vt),sd=r(Vt,"P",{});var MT=i(sd);Sg=s(MT,`XLNet Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RACE/SWAG tasks.`),MT.forEach(t),Dg=p(Vt),ja=r(Vt,"P",{});var im=i(ja);Ig=s(im,"This model inherits from "),$i=r(im,"A",{href:!0});var zT=i($i);Hg=s(zT,"PreTrainedModel"),zT.forEach(t),Qg=s(im,`. 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.)`),im.forEach(t),Ug=p(Vt),Oa=r(Vt,"P",{});var lm=i(Oa);Wg=s(lm,"This model is also a PyTorch "),Aa=r(lm,"A",{href:!0,rel:!0});var ET=i(Aa);Kg=s(ET,"torch.nn.Module"),ET.forEach(t),Bg=s(lm,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),lm.forEach(t),Rg=p(Vt),Lt=r(Vt,"DIV",{class:!0});var ms=i(Lt);T(Pa.$$.fragment,ms),Vg=p(ms),zo=r(ms,"P",{});var el=i(zo);Yg=s(el,"The "),xi=r(el,"A",{href:!0});var CT=i(xi);Gg=s(CT,"XLNetForMultipleChoice"),CT.forEach(t),Jg=s(el," forward method, overrides the "),ad=r(el,"CODE",{});var jT=i(ad);Zg=s(jT,"__call__"),jT.forEach(t),e_=s(el," special method."),el.forEach(t),t_=p(ms),T(Tn.$$.fragment,ms),o_=p(ms),T(wn.$$.fragment,ms),ms.forEach(t),Vt.forEach(t),Vc=p(o),Eo=r(o,"H2",{class:!0});var dm=i(Eo);Nn=r(dm,"A",{id:!0,class:!0,href:!0});var OT=i(Nn);rd=r(OT,"SPAN",{});var AT=i(rd);T(Sa.$$.fragment,AT),AT.forEach(t),OT.forEach(t),n_=p(dm),id=r(dm,"SPAN",{});var PT=i(id);s_=s(PT,"XLNetForTokenClassification"),PT.forEach(t),dm.forEach(t),Yc=p(o),pt=r(o,"DIV",{class:!0});var Yt=i(pt);T(Da.$$.fragment,Yt),a_=p(Yt),ld=r(Yt,"P",{});var ST=i(ld);r_=s(ST,`XLNet 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.`),ST.forEach(t),i_=p(Yt),Ia=r(Yt,"P",{});var cm=i(Ia);l_=s(cm,"This model inherits from "),Li=r(cm,"A",{href:!0});var DT=i(Li);d_=s(DT,"PreTrainedModel"),DT.forEach(t),c_=s(cm,`. 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.)`),cm.forEach(t),p_=p(Yt),Ha=r(Yt,"P",{});var pm=i(Ha);m_=s(pm,"This model is also a PyTorch "),Qa=r(pm,"A",{href:!0,rel:!0});var IT=i(Qa);h_=s(IT,"torch.nn.Module"),IT.forEach(t),u_=s(pm,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),pm.forEach(t),f_=p(Yt),Ft=r(Yt,"DIV",{class:!0});var hs=i(Ft);T(Ua.$$.fragment,hs),g_=p(hs),Co=r(hs,"P",{});var tl=i(Co);__=s(tl,"The "),Fi=r(tl,"A",{href:!0});var HT=i(Fi);k_=s(HT,"XLNetForTokenClassification"),HT.forEach(t),v_=s(tl," forward method, overrides the "),dd=r(tl,"CODE",{});var QT=i(dd);b_=s(QT,"__call__"),QT.forEach(t),y_=s(tl," special method."),tl.forEach(t),T_=p(hs),T($n.$$.fragment,hs),w_=p(hs),T(xn.$$.fragment,hs),hs.forEach(t),Yt.forEach(t),Gc=p(o),jo=r(o,"H2",{class:!0});var mm=i(jo);Ln=r(mm,"A",{id:!0,class:!0,href:!0});var UT=i(Ln);cd=r(UT,"SPAN",{});var WT=i(cd);T(Wa.$$.fragment,WT),WT.forEach(t),UT.forEach(t),N_=p(mm),pd=r(mm,"SPAN",{});var KT=i(pd);$_=s(KT,"XLNetForQuestionAnsweringSimple"),KT.forEach(t),mm.forEach(t),Jc=p(o),mt=r(o,"DIV",{class:!0});var Gt=i(mt);T(Ka.$$.fragment,Gt),x_=p(Gt),Oo=r(Gt,"P",{});var ol=i(Oo);L_=s(ol,`XLNet 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 `),md=r(ol,"CODE",{});var BT=i(md);F_=s(BT,"span start logits"),BT.forEach(t),X_=s(ol," and "),hd=r(ol,"CODE",{});var RT=i(hd);q_=s(RT,"span end logits"),RT.forEach(t),M_=s(ol,")."),ol.forEach(t),z_=p(Gt),Ba=r(Gt,"P",{});var hm=i(Ba);E_=s(hm,"This model inherits from "),Xi=r(hm,"A",{href:!0});var VT=i(Xi);C_=s(VT,"PreTrainedModel"),VT.forEach(t),j_=s(hm,`. 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.)`),hm.forEach(t),O_=p(Gt),Ra=r(Gt,"P",{});var um=i(Ra);A_=s(um,"This model is also a PyTorch "),Va=r(um,"A",{href:!0,rel:!0});var YT=i(Va);P_=s(YT,"torch.nn.Module"),YT.forEach(t),S_=s(um,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),um.forEach(t),D_=p(Gt),Xt=r(Gt,"DIV",{class:!0});var us=i(Xt);T(Ya.$$.fragment,us),I_=p(us),Ao=r(us,"P",{});var nl=i(Ao);H_=s(nl,"The "),qi=r(nl,"A",{href:!0});var GT=i(qi);Q_=s(GT,"XLNetForQuestionAnsweringSimple"),GT.forEach(t),U_=s(nl," forward method, overrides the "),ud=r(nl,"CODE",{});var JT=i(ud);W_=s(JT,"__call__"),JT.forEach(t),K_=s(nl," special method."),nl.forEach(t),B_=p(us),T(Fn.$$.fragment,us),R_=p(us),T(Xn.$$.fragment,us),us.forEach(t),Gt.forEach(t),Zc=p(o),Po=r(o,"H2",{class:!0});var fm=i(Po);qn=r(fm,"A",{id:!0,class:!0,href:!0});var ZT=i(qn);fd=r(ZT,"SPAN",{});var ew=i(fd);T(Ga.$$.fragment,ew),ew.forEach(t),ZT.forEach(t),V_=p(fm),gd=r(fm,"SPAN",{});var tw=i(gd);Y_=s(tw,"XLNetForQuestionAnswering"),tw.forEach(t),fm.forEach(t),ep=p(o),ht=r(o,"DIV",{class:!0});var Jt=i(ht);T(Ja.$$.fragment,Jt),G_=p(Jt),So=r(Jt,"P",{});var sl=i(So);J_=s(sl,`XLNet 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 `),_d=r(sl,"CODE",{});var ow=i(_d);Z_=s(ow,"span start logits"),ow.forEach(t),ek=s(sl," and "),kd=r(sl,"CODE",{});var nw=i(kd);tk=s(nw,"span end logits"),nw.forEach(t),ok=s(sl,")."),sl.forEach(t),nk=p(Jt),Za=r(Jt,"P",{});var gm=i(Za);sk=s(gm,"This model inherits from "),Mi=r(gm,"A",{href:!0});var sw=i(Mi);ak=s(sw,"PreTrainedModel"),sw.forEach(t),rk=s(gm,`. 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.)`),gm.forEach(t),ik=p(Jt),er=r(Jt,"P",{});var _m=i(er);lk=s(_m,"This model is also a PyTorch "),tr=r(_m,"A",{href:!0,rel:!0});var aw=i(tr);dk=s(aw,"torch.nn.Module"),aw.forEach(t),ck=s(_m,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),_m.forEach(t),pk=p(Jt),qt=r(Jt,"DIV",{class:!0});var fs=i(qt);T(or.$$.fragment,fs),mk=p(fs),Do=r(fs,"P",{});var al=i(Do);hk=s(al,"The "),zi=r(al,"A",{href:!0});var rw=i(zi);uk=s(rw,"XLNetForQuestionAnswering"),rw.forEach(t),fk=s(al," forward method, overrides the "),vd=r(al,"CODE",{});var iw=i(vd);gk=s(iw,"__call__"),iw.forEach(t),_k=s(al," special method."),al.forEach(t),kk=p(fs),T(Mn.$$.fragment,fs),vk=p(fs),T(zn.$$.fragment,fs),fs.forEach(t),Jt.forEach(t),tp=p(o),Io=r(o,"H2",{class:!0});var km=i(Io);En=r(km,"A",{id:!0,class:!0,href:!0});var lw=i(En);bd=r(lw,"SPAN",{});var dw=i(bd);T(nr.$$.fragment,dw),dw.forEach(t),lw.forEach(t),bk=p(km),yd=r(km,"SPAN",{});var cw=i(yd);yk=s(cw,"TFXLNetModel"),cw.forEach(t),km.forEach(t),op=p(o),et=r(o,"DIV",{class:!0});var Ct=i(et);T(sr.$$.fragment,Ct),Tk=p(Ct),Td=r(Ct,"P",{});var pw=i(Td);wk=s(pw,"The bare XLNet Model transformer outputting raw hidden-states without any specific head on top."),pw.forEach(t),Nk=p(Ct),ar=r(Ct,"P",{});var vm=i(ar);$k=s(vm,"This model inherits from "),Ei=r(vm,"A",{href:!0});var mw=i(Ei);xk=s(mw,"TFPreTrainedModel"),mw.forEach(t),Lk=s(vm,`. 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.)`),vm.forEach(t),Fk=p(Ct),rr=r(Ct,"P",{});var bm=i(rr);Xk=s(bm,"This model is also a "),ir=r(bm,"A",{href:!0,rel:!0});var hw=i(ir);qk=s(hw,"tf.keras.Model"),hw.forEach(t),Mk=s(bm,` 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.`),bm.forEach(t),zk=p(Ct),T(Cn.$$.fragment,Ct),Ek=p(Ct),Mt=r(Ct,"DIV",{class:!0});var gs=i(Mt);T(lr.$$.fragment,gs),Ck=p(gs),Ho=r(gs,"P",{});var rl=i(Ho);jk=s(rl,"The "),Ci=r(rl,"A",{href:!0});var uw=i(Ci);Ok=s(uw,"TFXLNetModel"),uw.forEach(t),Ak=s(rl," forward method, overrides the "),wd=r(rl,"CODE",{});var fw=i(wd);Pk=s(fw,"__call__"),fw.forEach(t),Sk=s(rl," special method."),rl.forEach(t),Dk=p(gs),T(jn.$$.fragment,gs),Ik=p(gs),T(On.$$.fragment,gs),gs.forEach(t),Ct.forEach(t),np=p(o),Qo=r(o,"H2",{class:!0});var ym=i(Qo);An=r(ym,"A",{id:!0,class:!0,href:!0});var gw=i(An);Nd=r(gw,"SPAN",{});var _w=i(Nd);T(dr.$$.fragment,_w),_w.forEach(t),gw.forEach(t),Hk=p(ym),$d=r(ym,"SPAN",{});var kw=i($d);Qk=s(kw,"TFXLNetLMHeadModel"),kw.forEach(t),ym.forEach(t),sp=p(o),tt=r(o,"DIV",{class:!0});var jt=i(tt);T(cr.$$.fragment,jt),Uk=p(jt),xd=r(jt,"P",{});var vw=i(xd);Wk=s(vw,"XLNet Model with a language modeling head on top (linear layer with weights tied to the input embeddings)."),vw.forEach(t),Kk=p(jt),pr=r(jt,"P",{});var Tm=i(pr);Bk=s(Tm,"This model inherits from "),ji=r(Tm,"A",{href:!0});var bw=i(ji);Rk=s(bw,"TFPreTrainedModel"),bw.forEach(t),Vk=s(Tm,`. 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.)`),Tm.forEach(t),Yk=p(jt),mr=r(jt,"P",{});var wm=i(mr);Gk=s(wm,"This model is also a "),hr=r(wm,"A",{href:!0,rel:!0});var yw=i(hr);Jk=s(yw,"tf.keras.Model"),yw.forEach(t),Zk=s(wm,` 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.`),wm.forEach(t),ev=p(jt),T(Pn.$$.fragment,jt),tv=p(jt),zt=r(jt,"DIV",{class:!0});var _s=i(zt);T(ur.$$.fragment,_s),ov=p(_s),Uo=r(_s,"P",{});var il=i(Uo);nv=s(il,"The "),Oi=r(il,"A",{href:!0});var Tw=i(Oi);sv=s(Tw,"TFXLNetLMHeadModel"),Tw.forEach(t),av=s(il," forward method, overrides the "),Ld=r(il,"CODE",{});var ww=i(Ld);rv=s(ww,"__call__"),ww.forEach(t),iv=s(il," special method."),il.forEach(t),lv=p(_s),T(Sn.$$.fragment,_s),dv=p(_s),T(Dn.$$.fragment,_s),_s.forEach(t),jt.forEach(t),ap=p(o),Wo=r(o,"H2",{class:!0});var Nm=i(Wo);In=r(Nm,"A",{id:!0,class:!0,href:!0});var Nw=i(In);Fd=r(Nw,"SPAN",{});var $w=i(Fd);T(fr.$$.fragment,$w),$w.forEach(t),Nw.forEach(t),cv=p(Nm),Xd=r(Nm,"SPAN",{});var xw=i(Xd);pv=s(xw,"TFXLNetForSequenceClassification"),xw.forEach(t),Nm.forEach(t),rp=p(o),ot=r(o,"DIV",{class:!0});var Ot=i(ot);T(gr.$$.fragment,Ot),mv=p(Ot),qd=r(Ot,"P",{});var Lw=i(qd);hv=s(Lw,`XLNet Model with a sequence classification/regression head on top (a linear layer on top of the pooled output) e.g.
for GLUE tasks.`),Lw.forEach(t),uv=p(Ot),_r=r(Ot,"P",{});var $m=i(_r);fv=s($m,"This model inherits from "),Ai=r($m,"A",{href:!0});var Fw=i(Ai);gv=s(Fw,"TFPreTrainedModel"),Fw.forEach(t),_v=s($m,`. 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.forEach(t),kv=p(Ot),kr=r(Ot,"P",{});var xm=i(kr);vv=s(xm,"This model is also a "),vr=r(xm,"A",{href:!0,rel:!0});var Xw=i(vr);bv=s(Xw,"tf.keras.Model"),Xw.forEach(t),yv=s(xm,` 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.`),xm.forEach(t),Tv=p(Ot),T(Hn.$$.fragment,Ot),wv=p(Ot),_t=r(Ot,"DIV",{class:!0});var Zt=i(_t);T(br.$$.fragment,Zt),Nv=p(Zt),Ko=r(Zt,"P",{});var ll=i(Ko);$v=s(ll,"The "),Pi=r(ll,"A",{href:!0});var qw=i(Pi);xv=s(qw,"TFXLNetForSequenceClassification"),qw.forEach(t),Lv=s(ll," forward method, overrides the "),Md=r(ll,"CODE",{});var Mw=i(Md);Fv=s(Mw,"__call__"),Mw.forEach(t),Xv=s(ll," special method."),ll.forEach(t),qv=p(Zt),T(Qn.$$.fragment,Zt),Mv=p(Zt),T(Un.$$.fragment,Zt),zv=p(Zt),T(Wn.$$.fragment,Zt),Zt.forEach(t),Ot.forEach(t),ip=p(o),Bo=r(o,"H2",{class:!0});var Lm=i(Bo);Kn=r(Lm,"A",{id:!0,class:!0,href:!0});var zw=i(Kn);zd=r(zw,"SPAN",{});var Ew=i(zd);T(yr.$$.fragment,Ew),Ew.forEach(t),zw.forEach(t),Ev=p(Lm),Ed=r(Lm,"SPAN",{});var Cw=i(Ed);Cv=s(Cw,"TFLNetForMultipleChoice"),Cw.forEach(t),Lm.forEach(t),lp=p(o),nt=r(o,"DIV",{class:!0});var At=i(nt);T(Tr.$$.fragment,At),jv=p(At),Cd=r(At,"P",{});var jw=i(Cd);Ov=s(jw,`XLNET 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.`),jw.forEach(t),Av=p(At),wr=r(At,"P",{});var Fm=i(wr);Pv=s(Fm,"This model inherits from "),Si=r(Fm,"A",{href:!0});var Ow=i(Si);Sv=s(Ow,"TFPreTrainedModel"),Ow.forEach(t),Dv=s(Fm,`. 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.)`),Fm.forEach(t),Iv=p(At),Nr=r(At,"P",{});var Xm=i(Nr);Hv=s(Xm,"This model is also a "),$r=r(Xm,"A",{href:!0,rel:!0});var Aw=i($r);Qv=s(Aw,"tf.keras.Model"),Aw.forEach(t),Uv=s(Xm,` 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.`),Xm.forEach(t),Wv=p(At),T(Bn.$$.fragment,At),Kv=p(At),Et=r(At,"DIV",{class:!0});var ks=i(Et);T(xr.$$.fragment,ks),Bv=p(ks),Ro=r(ks,"P",{});var dl=i(Ro);Rv=s(dl,"The "),Di=r(dl,"A",{href:!0});var Pw=i(Di);Vv=s(Pw,"TFXLNetForMultipleChoice"),Pw.forEach(t),Yv=s(dl," forward method, overrides the "),jd=r(dl,"CODE",{});var Sw=i(jd);Gv=s(Sw,"__call__"),Sw.forEach(t),Jv=s(dl," special method."),dl.forEach(t),Zv=p(ks),T(Rn.$$.fragment,ks),eb=p(ks),T(Vn.$$.fragment,ks),ks.forEach(t),At.forEach(t),dp=p(o),Vo=r(o,"H2",{class:!0});var qm=i(Vo);Yn=r(qm,"A",{id:!0,class:!0,href:!0});var Dw=i(Yn);Od=r(Dw,"SPAN",{});var Iw=i(Od);T(Lr.$$.fragment,Iw),Iw.forEach(t),Dw.forEach(t),tb=p(qm),Ad=r(qm,"SPAN",{});var Hw=i(Ad);ob=s(Hw,"TFXLNetForTokenClassification"),Hw.forEach(t),qm.forEach(t),cp=p(o),st=r(o,"DIV",{class:!0});var Pt=i(st);T(Fr.$$.fragment,Pt),nb=p(Pt),Pd=r(Pt,"P",{});var Qw=i(Pd);sb=s(Qw,`XLNet 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.`),Qw.forEach(t),ab=p(Pt),Xr=r(Pt,"P",{});var Mm=i(Xr);rb=s(Mm,"This model inherits from "),Ii=r(Mm,"A",{href:!0});var Uw=i(Ii);ib=s(Uw,"TFPreTrainedModel"),Uw.forEach(t),lb=s(Mm,`. 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.)`),Mm.forEach(t),db=p(Pt),qr=r(Pt,"P",{});var zm=i(qr);cb=s(zm,"This model is also a "),Mr=r(zm,"A",{href:!0,rel:!0});var Ww=i(Mr);pb=s(Ww,"tf.keras.Model"),Ww.forEach(t),mb=s(zm,` 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.`),zm.forEach(t),hb=p(Pt),T(Gn.$$.fragment,Pt),ub=p(Pt),kt=r(Pt,"DIV",{class:!0});var eo=i(kt);T(zr.$$.fragment,eo),fb=p(eo),Yo=r(eo,"P",{});var cl=i(Yo);gb=s(cl,"The "),Hi=r(cl,"A",{href:!0});var Kw=i(Hi);_b=s(Kw,"TFXLNetForTokenClassification"),Kw.forEach(t),kb=s(cl," forward method, overrides the "),Sd=r(cl,"CODE",{});var Bw=i(Sd);vb=s(Bw,"__call__"),Bw.forEach(t),bb=s(cl," special method."),cl.forEach(t),yb=p(eo),T(Jn.$$.fragment,eo),Tb=p(eo),T(Zn.$$.fragment,eo),wb=p(eo),T(es.$$.fragment,eo),eo.forEach(t),Pt.forEach(t),pp=p(o),Go=r(o,"H2",{class:!0});var Em=i(Go);ts=r(Em,"A",{id:!0,class:!0,href:!0});var Rw=i(ts);Dd=r(Rw,"SPAN",{});var Vw=i(Dd);T(Er.$$.fragment,Vw),Vw.forEach(t),Rw.forEach(t),Nb=p(Em),Id=r(Em,"SPAN",{});var Yw=i(Id);$b=s(Yw,"TFXLNetForQuestionAnsweringSimple"),Yw.forEach(t),Em.forEach(t),mp=p(o),at=r(o,"DIV",{class:!0});var St=i(at);T(Cr.$$.fragment,St),xb=p(St),Jo=r(St,"P",{});var pl=i(Jo);Lb=s(pl,`XLNet 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 `),Hd=r(pl,"CODE",{});var Gw=i(Hd);Fb=s(Gw,"span start logits"),Gw.forEach(t),Xb=s(pl," and "),Qd=r(pl,"CODE",{});var Jw=i(Qd);qb=s(Jw,"span end logits"),Jw.forEach(t),Mb=s(pl,")."),pl.forEach(t),zb=p(St),jr=r(St,"P",{});var Cm=i(jr);Eb=s(Cm,"This model inherits from "),Qi=r(Cm,"A",{href:!0});var Zw=i(Qi);Cb=s(Zw,"TFPreTrainedModel"),Zw.forEach(t),jb=s(Cm,`. 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.)`),Cm.forEach(t),Ob=p(St),Or=r(St,"P",{});var jm=i(Or);Ab=s(jm,"This model is also a "),Ar=r(jm,"A",{href:!0,rel:!0});var e1=i(Ar);Pb=s(e1,"tf.keras.Model"),e1.forEach(t),Sb=s(jm,` 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.`),jm.forEach(t),Db=p(St),T(os.$$.fragment,St),Ib=p(St),vt=r(St,"DIV",{class:!0});var to=i(vt);T(Pr.$$.fragment,to),Hb=p(to),Zo=r(to,"P",{});var ml=i(Zo);Qb=s(ml,"The "),Ui=r(ml,"A",{href:!0});var t1=i(Ui);Ub=s(t1,"TFXLNetForQuestionAnsweringSimple"),t1.forEach(t),Wb=s(ml," forward method, overrides the "),Ud=r(ml,"CODE",{});var o1=i(Ud);Kb=s(o1,"__call__"),o1.forEach(t),Bb=s(ml," special method."),ml.forEach(t),Rb=p(to),T(ns.$$.fragment,to),Vb=p(to),T(ss.$$.fragment,to),Yb=p(to),T(as.$$.fragment,to),to.forEach(t),St.forEach(t),this.h()},h(){u(d,"name","hf:doc:metadata"),u(d,"content",JSON.stringify(V1)),u(f,"id","xlnet"),u(f,"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"),u(f,"href","#xlnet"),u(h,"class","relative group"),u(te,"alt","Models"),n1(te.src,L="https://img.shields.io/badge/All_model_pages-xlnet-blueviolet")||u(te,"src",L),u(me,"href","https://huggingface.co/models?filter=xlnet"),u(he,"alt","Spaces"),n1(he.src,Ee="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||u(he,"src",Ee),u(Q,"href","https://huggingface.co/spaces/docs-demos/xlnet-base-cased"),u(P,"class","flex flex-wrap space-x-1"),u(le,"id","overview"),u(le,"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"),u(le,"href","#overview"),u(re,"class","relative group"),u(ce,"href","https://arxiv.org/abs/1906.08237"),u(ce,"rel","nofollow"),u(ee,"href","https://huggingface.co/thomwolf"),u(ee,"rel","nofollow"),u(vs,"href","https://github.com/zihangdai/xlnet/"),u(vs,"rel","nofollow"),u(tn,"id","documentation-resources"),u(tn,"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"),u(tn,"href","#documentation-resources"),u(oo,"class","relative group"),u(Kr,"href","../tasks/sequence_classification"),u(Br,"href","../tasks/token_classification"),u(Rr,"href","../tasks/question_answering"),u(Vr,"href","../tasks/language_modeling"),u(Yr,"href","../tasks/multiple_choice"),u(on,"id","transformers.XLNetConfig"),u(on,"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"),u(on,"href","#transformers.XLNetConfig"),u(no,"class","relative group"),u(Gr,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetModel"),u(Jr,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.TFXLNetModel"),u(ws,"href","https://huggingface.co/xlnet-large-cased"),u(ws,"rel","nofollow"),u(Zr,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),u(ei,"href","/docs/transformers/v4.29.0/en/main_classes/configuration#transformers.PretrainedConfig"),u(yt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(sn,"id","transformers.XLNetTokenizer"),u(sn,"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"),u(sn,"href","#transformers.XLNetTokenizer"),u(ao,"class","relative group"),u(Ls,"href","https://github.com/google/sentencepiece"),u(Ls,"rel","nofollow"),u(ti,"href","/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),u(Ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(an,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(si,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ln,"id","transformers.XLNetTokenizerFast"),u(ln,"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"),u(ln,"href","#transformers.XLNetTokenizerFast"),u(io,"class","relative group"),u(As,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=unigram#models"),u(As,"rel","nofollow"),u(ai,"href","/docs/transformers/v4.29.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),u(Qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(rt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(cn,"id","transformers.models.xlnet.modeling_xlnet.XLNetModelOutput"),u(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"),u(cn,"href","#transformers.models.xlnet.modeling_xlnet.XLNetModelOutput"),u(po,"class","relative group"),u(li,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetModel"),u(mo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(di,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetLMHeadModel"),u(ho,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ci,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetForSequenceClassification"),u(uo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(pi,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetForMultipleChoice"),u(fo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(go,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(mi,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetForQuestionAnsweringSimple"),u(_o,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(hi,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetForQuestionAnswering"),u(ko,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ui,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.TFXLNetModel"),u(vo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(fi,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.TFXLNetLMHeadModel"),u(bo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(gi,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.TFXLNetForSequenceClassification"),u(yo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(_i,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.TFXLNetForMultipleChoice"),u(To,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(wo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ki,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.TFXLNetForQuestionAnsweringSimple"),u(No,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(pn,"id","transformers.XLNetModel"),u(pn,"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"),u(pn,"href","#transformers.XLNetModel"),u($o,"class","relative group"),u(vi,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),u(va,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(va,"rel","nofollow"),u(bi,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetModel"),u($t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(it,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(un,"id","transformers.XLNetLMHeadModel"),u(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"),u(un,"href","#transformers.XLNetLMHeadModel"),u(Lo,"class","relative group"),u(yi,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),u($a,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u($a,"rel","nofollow"),u(Ti,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetLMHeadModel"),u(xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(_n,"id","transformers.XLNetForSequenceClassification"),u(_n,"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"),u(_n,"href","#transformers.XLNetForSequenceClassification"),u(Xo,"class","relative group"),u(wi,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),u(Ma,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Ma,"rel","nofollow"),u(Ni,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetForSequenceClassification"),u(gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(yn,"id","transformers.XLNetForMultipleChoice"),u(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"),u(yn,"href","#transformers.XLNetForMultipleChoice"),u(Mo,"class","relative group"),u($i,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),u(Aa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Aa,"rel","nofollow"),u(xi,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetForMultipleChoice"),u(Lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ct,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Nn,"id","transformers.XLNetForTokenClassification"),u(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"),u(Nn,"href","#transformers.XLNetForTokenClassification"),u(Eo,"class","relative group"),u(Li,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),u(Qa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Qa,"rel","nofollow"),u(Fi,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetForTokenClassification"),u(Ft,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(pt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Ln,"id","transformers.XLNetForQuestionAnsweringSimple"),u(Ln,"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"),u(Ln,"href","#transformers.XLNetForQuestionAnsweringSimple"),u(jo,"class","relative group"),u(Xi,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),u(Va,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Va,"rel","nofollow"),u(qi,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetForQuestionAnsweringSimple"),u(Xt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(qn,"id","transformers.XLNetForQuestionAnswering"),u(qn,"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"),u(qn,"href","#transformers.XLNetForQuestionAnswering"),u(Po,"class","relative group"),u(Mi,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.PreTrainedModel"),u(tr,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(tr,"rel","nofollow"),u(zi,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.XLNetForQuestionAnswering"),u(qt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(En,"id","transformers.TFXLNetModel"),u(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"),u(En,"href","#transformers.TFXLNetModel"),u(Io,"class","relative group"),u(Ei,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(ir,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(ir,"rel","nofollow"),u(Ci,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.TFXLNetModel"),u(Mt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(An,"id","transformers.TFXLNetLMHeadModel"),u(An,"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"),u(An,"href","#transformers.TFXLNetLMHeadModel"),u(Qo,"class","relative group"),u(ji,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(hr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(hr,"rel","nofollow"),u(Oi,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.TFXLNetLMHeadModel"),u(zt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(tt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(In,"id","transformers.TFXLNetForSequenceClassification"),u(In,"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"),u(In,"href","#transformers.TFXLNetForSequenceClassification"),u(Wo,"class","relative group"),u(Ai,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(vr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(vr,"rel","nofollow"),u(Pi,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.TFXLNetForSequenceClassification"),u(_t,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ot,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Kn,"id","transformers.TFXLNetForMultipleChoice"),u(Kn,"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"),u(Kn,"href","#transformers.TFXLNetForMultipleChoice"),u(Bo,"class","relative group"),u(Si,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),u($r,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u($r,"rel","nofollow"),u(Di,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.TFXLNetForMultipleChoice"),u(Et,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(nt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(Yn,"id","transformers.TFXLNetForTokenClassification"),u(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"),u(Yn,"href","#transformers.TFXLNetForTokenClassification"),u(Vo,"class","relative group"),u(Ii,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(Mr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Mr,"rel","nofollow"),u(Hi,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.TFXLNetForTokenClassification"),u(kt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(ts,"id","transformers.TFXLNetForQuestionAnsweringSimple"),u(ts,"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"),u(ts,"href","#transformers.TFXLNetForQuestionAnsweringSimple"),u(Go,"class","relative group"),u(Qi,"href","/docs/transformers/v4.29.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(Ar,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Ar,"rel","nofollow"),u(Ui,"href","/docs/transformers/v4.29.0/en/model_doc/xlnet#transformers.TFXLNetForQuestionAnsweringSimple"),u(vt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),u(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(o,_){e(document.head,d),g(o,b,_),g(o,h,_),e(h,f),e(f,v),w(l,v,null),e(h,m),e(h,M),e(M,ye),g(o,_e,_),g(o,P,_),e(P,me),e(me,te),e(P,Te),e(P,Q),e(Q,he),g(o,V,_),g(o,re,_),e(re,le),e(le,U),w(de,U,null),e(re,we),e(re,W),e(W,Ne),g(o,ke,_),g(o,I,_),e(I,$e),e(I,ce),e(ce,ie),e(I,z),g(o,C,_),g(o,ue,_),e(ue,J),g(o,ve,_),g(o,fe,_),e(fe,K),e(K,xe),g(o,be,_),g(o,E,_),e(E,Le),g(o,Y,_),g(o,G,_),e(G,pe),e(pe,Z),e(pe,ge),e(ge,Fe),e(pe,S),e(G,Xe),e(G,H),e(H,qe),e(H,oe),e(oe,j),e(H,Me),e(G,O),e(G,ne),e(ne,ze),e(ne,k),e(k,F),e(ne,Oe),e(ne,se),e(se,Ae),e(ne,Pe),e(ne,X),e(X,Se),e(ne,De),e(G,Ie),e(G,Ce),e(Ce,He),e(G,D),e(G,B),e(B,Qe),e(G,Ue),e(G,R),e(R,We),g(o,je,_),g(o,ae,_),e(ae,Ke),e(ae,ee),e(ee,Be),e(ae,Om),e(ae,vs),e(vs,Am),e(ae,Pm),g(o,vc,_),g(o,oo,_),e(oo,tn),e(tn,hl),w(bs,hl,null),e(oo,Sm),e(oo,ul),e(ul,Dm),g(o,bc,_),g(o,ft,_),e(ft,fl),e(fl,Kr),e(Kr,Im),e(ft,Hm),e(ft,gl),e(gl,Br),e(Br,Qm),e(ft,Um),e(ft,_l),e(_l,Rr),e(Rr,Wm),e(ft,Km),e(ft,kl),e(kl,Vr),e(Vr,Bm),e(ft,Rm),e(ft,vl),e(vl,Yr),e(Yr,Vm),g(o,yc,_),g(o,no,_),e(no,on),e(on,bl),w(ys,bl,null),e(no,Ym),e(no,yl),e(yl,Gm),g(o,Tc,_),g(o,yt,_),w(Ts,yt,null),e(yt,Jm),e(yt,Dt),e(Dt,Zm),e(Dt,Gr),e(Gr,eh),e(Dt,th),e(Dt,Jr),e(Jr,oh),e(Dt,nh),e(Dt,ws),e(ws,sh),e(Dt,ah),e(yt,rh),e(yt,so),e(so,ih),e(so,Zr),e(Zr,lh),e(so,dh),e(so,ei),e(ei,ch),e(so,ph),e(yt,mh),w(nn,yt,null),g(o,wc,_),g(o,ao,_),e(ao,sn),e(sn,Tl),w(Ns,Tl,null),e(ao,hh),e(ao,wl),e(wl,uh),g(o,Nc,_),g(o,Je,_),w($s,Je,null),e(Je,fh),e(Je,xs),e(xs,gh),e(xs,Ls),e(Ls,_h),e(xs,kh),e(Je,vh),e(Je,Fs),e(Fs,bh),e(Fs,ti),e(ti,yh),e(Fs,Th),e(Je,wh),e(Je,Ht),w(Xs,Ht,null),e(Ht,Nh),e(Ht,Nl),e(Nl,$h),e(Ht,xh),e(Ht,qs),e(qs,oi),e(oi,Lh),e(oi,$l),e($l,Fh),e(qs,Xh),e(qs,ni),e(ni,qh),e(ni,xl),e(xl,Mh),e(Je,zh),e(Je,an),w(Ms,an,null),e(an,Eh),e(an,zs),e(zs,Ch),e(zs,Ll),e(Ll,jh),e(zs,Oh),e(Je,Ah),e(Je,wt),w(Es,wt,null),e(wt,Ph),e(wt,Fl),e(Fl,Sh),e(wt,Dh),w(rn,wt,null),e(wt,Ih),e(wt,ro),e(ro,Hh),e(ro,Xl),e(Xl,Qh),e(ro,Uh),e(ro,ql),e(ql,Wh),e(ro,Kh),e(Je,Bh),e(Je,si),w(Cs,si,null),g(o,$c,_),g(o,io,_),e(io,ln),e(ln,Ml),w(js,Ml,null),e(io,Rh),e(io,zl),e(zl,Vh),g(o,xc,_),g(o,rt,_),w(Os,rt,null),e(rt,Yh),e(rt,lo),e(lo,Gh),e(lo,El),e(El,Jh),e(lo,Zh),e(lo,As),e(As,eu),e(lo,tu),e(rt,ou),e(rt,Ps),e(Ps,nu),e(Ps,ai),e(ai,su),e(Ps,au),e(rt,ru),e(rt,Qt),w(Ss,Qt,null),e(Qt,iu),e(Qt,Cl),e(Cl,lu),e(Qt,du),e(Qt,Ds),e(Ds,ri),e(ri,cu),e(ri,jl),e(jl,pu),e(Ds,mu),e(Ds,ii),e(ii,hu),e(ii,Ol),e(Ol,uu),e(rt,fu),e(rt,Nt),w(Is,Nt,null),e(Nt,gu),e(Nt,Al),e(Al,_u),e(Nt,ku),w(dn,Nt,null),e(Nt,vu),e(Nt,co),e(co,bu),e(co,Pl),e(Pl,yu),e(co,Tu),e(co,Sl),e(Sl,wu),e(co,Nu),g(o,Lc,_),g(o,po,_),e(po,cn),e(cn,Dl),w(Hs,Dl,null),e(po,$u),e(po,Il),e(Il,xu),g(o,Fc,_),g(o,mo,_),w(Qs,mo,null),e(mo,Lu),e(mo,Us),e(Us,Fu),e(Us,li),e(li,Xu),e(Us,qu),g(o,Xc,_),g(o,ho,_),w(Ws,ho,null),e(ho,Mu),e(ho,Ks),e(Ks,zu),e(Ks,di),e(di,Eu),e(Ks,Cu),g(o,qc,_),g(o,uo,_),w(Bs,uo,null),e(uo,ju),e(uo,Rs),e(Rs,Ou),e(Rs,ci),e(ci,Au),e(Rs,Pu),g(o,Mc,_),g(o,fo,_),w(Vs,fo,null),e(fo,Su),e(fo,Ys),e(Ys,Du),e(Ys,pi),e(pi,Iu),e(Ys,Hu),g(o,zc,_),g(o,go,_),w(Gs,go,null),e(go,Qu),e(go,Js),e(Js,Uu),e(Js,Hl),e(Hl,Wu),e(Js,Ku),g(o,Ec,_),g(o,_o,_),w(Zs,_o,null),e(_o,Bu),e(_o,ea),e(ea,Ru),e(ea,mi),e(mi,Vu),e(ea,Yu),g(o,Cc,_),g(o,ko,_),w(ta,ko,null),e(ko,Gu),e(ko,oa),e(oa,Ju),e(oa,hi),e(hi,Zu),e(oa,ef),g(o,jc,_),g(o,vo,_),w(na,vo,null),e(vo,tf),e(vo,sa),e(sa,of),e(sa,ui),e(ui,nf),e(sa,sf),g(o,Oc,_),g(o,bo,_),w(aa,bo,null),e(bo,af),e(bo,ra),e(ra,rf),e(ra,fi),e(fi,lf),e(ra,df),g(o,Ac,_),g(o,yo,_),w(ia,yo,null),e(yo,cf),e(yo,la),e(la,pf),e(la,gi),e(gi,mf),e(la,hf),g(o,Pc,_),g(o,To,_),w(da,To,null),e(To,uf),e(To,ca),e(ca,ff),e(ca,_i),e(_i,gf),e(ca,_f),g(o,Sc,_),g(o,wo,_),w(pa,wo,null),e(wo,kf),e(wo,ma),e(ma,vf),e(ma,Ql),e(Ql,bf),e(ma,yf),g(o,Dc,_),g(o,No,_),w(ha,No,null),e(No,Tf),e(No,ua),e(ua,wf),e(ua,ki),e(ki,Nf),e(ua,$f),g(o,Ic,_),g(o,$o,_),e($o,pn),e(pn,Ul),w(fa,Ul,null),e($o,xf),e($o,Wl),e(Wl,Lf),g(o,Hc,_),g(o,it,_),w(ga,it,null),e(it,Ff),e(it,Kl),e(Kl,Xf),e(it,qf),e(it,_a),e(_a,Mf),e(_a,vi),e(vi,zf),e(_a,Ef),e(it,Cf),e(it,ka),e(ka,jf),e(ka,va),e(va,Of),e(ka,Af),e(it,Pf),e(it,$t),w(ba,$t,null),e($t,Sf),e($t,xo),e(xo,Df),e(xo,bi),e(bi,If),e(xo,Hf),e(xo,Bl),e(Bl,Qf),e(xo,Uf),e($t,Wf),w(mn,$t,null),e($t,Kf),w(hn,$t,null),g(o,Qc,_),g(o,Lo,_),e(Lo,un),e(un,Rl),w(ya,Rl,null),e(Lo,Bf),e(Lo,Vl),e(Vl,Rf),g(o,Uc,_),g(o,lt,_),w(Ta,lt,null),e(lt,Vf),e(lt,Yl),e(Yl,Yf),e(lt,Gf),e(lt,wa),e(wa,Jf),e(wa,yi),e(yi,Zf),e(wa,eg),e(lt,tg),e(lt,Na),e(Na,og),e(Na,$a),e($a,ng),e(Na,sg),e(lt,ag),e(lt,xt),w(xa,xt,null),e(xt,rg),e(xt,Fo),e(Fo,ig),e(Fo,Ti),e(Ti,lg),e(Fo,dg),e(Fo,Gl),e(Gl,cg),e(Fo,pg),e(xt,mg),w(fn,xt,null),e(xt,hg),w(gn,xt,null),g(o,Wc,_),g(o,Xo,_),e(Xo,_n),e(_n,Jl),w(La,Jl,null),e(Xo,ug),e(Xo,Zl),e(Zl,fg),g(o,Kc,_),g(o,dt,_),w(Fa,dt,null),e(dt,gg),e(dt,ed),e(ed,_g),e(dt,kg),e(dt,Xa),e(Xa,vg),e(Xa,wi),e(wi,bg),e(Xa,yg),e(dt,Tg),e(dt,qa),e(qa,wg),e(qa,Ma),e(Ma,Ng),e(qa,$g),e(dt,xg),e(dt,gt),w(za,gt,null),e(gt,Lg),e(gt,qo),e(qo,Fg),e(qo,Ni),e(Ni,Xg),e(qo,qg),e(qo,td),e(td,Mg),e(qo,zg),e(gt,Eg),w(kn,gt,null),e(gt,Cg),w(vn,gt,null),e(gt,jg),w(bn,gt,null),g(o,Bc,_),g(o,Mo,_),e(Mo,yn),e(yn,od),w(Ea,od,null),e(Mo,Og),e(Mo,nd),e(nd,Ag),g(o,Rc,_),g(o,ct,_),w(Ca,ct,null),e(ct,Pg),e(ct,sd),e(sd,Sg),e(ct,Dg),e(ct,ja),e(ja,Ig),e(ja,$i),e($i,Hg),e(ja,Qg),e(ct,Ug),e(ct,Oa),e(Oa,Wg),e(Oa,Aa),e(Aa,Kg),e(Oa,Bg),e(ct,Rg),e(ct,Lt),w(Pa,Lt,null),e(Lt,Vg),e(Lt,zo),e(zo,Yg),e(zo,xi),e(xi,Gg),e(zo,Jg),e(zo,ad),e(ad,Zg),e(zo,e_),e(Lt,t_),w(Tn,Lt,null),e(Lt,o_),w(wn,Lt,null),g(o,Vc,_),g(o,Eo,_),e(Eo,Nn),e(Nn,rd),w(Sa,rd,null),e(Eo,n_),e(Eo,id),e(id,s_),g(o,Yc,_),g(o,pt,_),w(Da,pt,null),e(pt,a_),e(pt,ld),e(ld,r_),e(pt,i_),e(pt,Ia),e(Ia,l_),e(Ia,Li),e(Li,d_),e(Ia,c_),e(pt,p_),e(pt,Ha),e(Ha,m_),e(Ha,Qa),e(Qa,h_),e(Ha,u_),e(pt,f_),e(pt,Ft),w(Ua,Ft,null),e(Ft,g_),e(Ft,Co),e(Co,__),e(Co,Fi),e(Fi,k_),e(Co,v_),e(Co,dd),e(dd,b_),e(Co,y_),e(Ft,T_),w($n,Ft,null),e(Ft,w_),w(xn,Ft,null),g(o,Gc,_),g(o,jo,_),e(jo,Ln),e(Ln,cd),w(Wa,cd,null),e(jo,N_),e(jo,pd),e(pd,$_),g(o,Jc,_),g(o,mt,_),w(Ka,mt,null),e(mt,x_),e(mt,Oo),e(Oo,L_),e(Oo,md),e(md,F_),e(Oo,X_),e(Oo,hd),e(hd,q_),e(Oo,M_),e(mt,z_),e(mt,Ba),e(Ba,E_),e(Ba,Xi),e(Xi,C_),e(Ba,j_),e(mt,O_),e(mt,Ra),e(Ra,A_),e(Ra,Va),e(Va,P_),e(Ra,S_),e(mt,D_),e(mt,Xt),w(Ya,Xt,null),e(Xt,I_),e(Xt,Ao),e(Ao,H_),e(Ao,qi),e(qi,Q_),e(Ao,U_),e(Ao,ud),e(ud,W_),e(Ao,K_),e(Xt,B_),w(Fn,Xt,null),e(Xt,R_),w(Xn,Xt,null),g(o,Zc,_),g(o,Po,_),e(Po,qn),e(qn,fd),w(Ga,fd,null),e(Po,V_),e(Po,gd),e(gd,Y_),g(o,ep,_),g(o,ht,_),w(Ja,ht,null),e(ht,G_),e(ht,So),e(So,J_),e(So,_d),e(_d,Z_),e(So,ek),e(So,kd),e(kd,tk),e(So,ok),e(ht,nk),e(ht,Za),e(Za,sk),e(Za,Mi),e(Mi,ak),e(Za,rk),e(ht,ik),e(ht,er),e(er,lk),e(er,tr),e(tr,dk),e(er,ck),e(ht,pk),e(ht,qt),w(or,qt,null),e(qt,mk),e(qt,Do),e(Do,hk),e(Do,zi),e(zi,uk),e(Do,fk),e(Do,vd),e(vd,gk),e(Do,_k),e(qt,kk),w(Mn,qt,null),e(qt,vk),w(zn,qt,null),g(o,tp,_),g(o,Io,_),e(Io,En),e(En,bd),w(nr,bd,null),e(Io,bk),e(Io,yd),e(yd,yk),g(o,op,_),g(o,et,_),w(sr,et,null),e(et,Tk),e(et,Td),e(Td,wk),e(et,Nk),e(et,ar),e(ar,$k),e(ar,Ei),e(Ei,xk),e(ar,Lk),e(et,Fk),e(et,rr),e(rr,Xk),e(rr,ir),e(ir,qk),e(rr,Mk),e(et,zk),w(Cn,et,null),e(et,Ek),e(et,Mt),w(lr,Mt,null),e(Mt,Ck),e(Mt,Ho),e(Ho,jk),e(Ho,Ci),e(Ci,Ok),e(Ho,Ak),e(Ho,wd),e(wd,Pk),e(Ho,Sk),e(Mt,Dk),w(jn,Mt,null),e(Mt,Ik),w(On,Mt,null),g(o,np,_),g(o,Qo,_),e(Qo,An),e(An,Nd),w(dr,Nd,null),e(Qo,Hk),e(Qo,$d),e($d,Qk),g(o,sp,_),g(o,tt,_),w(cr,tt,null),e(tt,Uk),e(tt,xd),e(xd,Wk),e(tt,Kk),e(tt,pr),e(pr,Bk),e(pr,ji),e(ji,Rk),e(pr,Vk),e(tt,Yk),e(tt,mr),e(mr,Gk),e(mr,hr),e(hr,Jk),e(mr,Zk),e(tt,ev),w(Pn,tt,null),e(tt,tv),e(tt,zt),w(ur,zt,null),e(zt,ov),e(zt,Uo),e(Uo,nv),e(Uo,Oi),e(Oi,sv),e(Uo,av),e(Uo,Ld),e(Ld,rv),e(Uo,iv),e(zt,lv),w(Sn,zt,null),e(zt,dv),w(Dn,zt,null),g(o,ap,_),g(o,Wo,_),e(Wo,In),e(In,Fd),w(fr,Fd,null),e(Wo,cv),e(Wo,Xd),e(Xd,pv),g(o,rp,_),g(o,ot,_),w(gr,ot,null),e(ot,mv),e(ot,qd),e(qd,hv),e(ot,uv),e(ot,_r),e(_r,fv),e(_r,Ai),e(Ai,gv),e(_r,_v),e(ot,kv),e(ot,kr),e(kr,vv),e(kr,vr),e(vr,bv),e(kr,yv),e(ot,Tv),w(Hn,ot,null),e(ot,wv),e(ot,_t),w(br,_t,null),e(_t,Nv),e(_t,Ko),e(Ko,$v),e(Ko,Pi),e(Pi,xv),e(Ko,Lv),e(Ko,Md),e(Md,Fv),e(Ko,Xv),e(_t,qv),w(Qn,_t,null),e(_t,Mv),w(Un,_t,null),e(_t,zv),w(Wn,_t,null),g(o,ip,_),g(o,Bo,_),e(Bo,Kn),e(Kn,zd),w(yr,zd,null),e(Bo,Ev),e(Bo,Ed),e(Ed,Cv),g(o,lp,_),g(o,nt,_),w(Tr,nt,null),e(nt,jv),e(nt,Cd),e(Cd,Ov),e(nt,Av),e(nt,wr),e(wr,Pv),e(wr,Si),e(Si,Sv),e(wr,Dv),e(nt,Iv),e(nt,Nr),e(Nr,Hv),e(Nr,$r),e($r,Qv),e(Nr,Uv),e(nt,Wv),w(Bn,nt,null),e(nt,Kv),e(nt,Et),w(xr,Et,null),e(Et,Bv),e(Et,Ro),e(Ro,Rv),e(Ro,Di),e(Di,Vv),e(Ro,Yv),e(Ro,jd),e(jd,Gv),e(Ro,Jv),e(Et,Zv),w(Rn,Et,null),e(Et,eb),w(Vn,Et,null),g(o,dp,_),g(o,Vo,_),e(Vo,Yn),e(Yn,Od),w(Lr,Od,null),e(Vo,tb),e(Vo,Ad),e(Ad,ob),g(o,cp,_),g(o,st,_),w(Fr,st,null),e(st,nb),e(st,Pd),e(Pd,sb),e(st,ab),e(st,Xr),e(Xr,rb),e(Xr,Ii),e(Ii,ib),e(Xr,lb),e(st,db),e(st,qr),e(qr,cb),e(qr,Mr),e(Mr,pb),e(qr,mb),e(st,hb),w(Gn,st,null),e(st,ub),e(st,kt),w(zr,kt,null),e(kt,fb),e(kt,Yo),e(Yo,gb),e(Yo,Hi),e(Hi,_b),e(Yo,kb),e(Yo,Sd),e(Sd,vb),e(Yo,bb),e(kt,yb),w(Jn,kt,null),e(kt,Tb),w(Zn,kt,null),e(kt,wb),w(es,kt,null),g(o,pp,_),g(o,Go,_),e(Go,ts),e(ts,Dd),w(Er,Dd,null),e(Go,Nb),e(Go,Id),e(Id,$b),g(o,mp,_),g(o,at,_),w(Cr,at,null),e(at,xb),e(at,Jo),e(Jo,Lb),e(Jo,Hd),e(Hd,Fb),e(Jo,Xb),e(Jo,Qd),e(Qd,qb),e(Jo,Mb),e(at,zb),e(at,jr),e(jr,Eb),e(jr,Qi),e(Qi,Cb),e(jr,jb),e(at,Ob),e(at,Or),e(Or,Ab),e(Or,Ar),e(Ar,Pb),e(Or,Sb),e(at,Db),w(os,at,null),e(at,Ib),e(at,vt),w(Pr,vt,null),e(vt,Hb),e(vt,Zo),e(Zo,Qb),e(Zo,Ui),e(Ui,Ub),e(Zo,Wb),e(Zo,Ud),e(Ud,Kb),e(Zo,Bb),e(vt,Rb),w(ns,vt,null),e(vt,Vb),w(ss,vt,null),e(vt,Yb),w(as,vt,null),hp=!0},p(o,[_]){const Sr={};_&2&&(Sr.$$scope={dirty:_,ctx:o}),nn.$set(Sr);const Wd={};_&2&&(Wd.$$scope={dirty:_,ctx:o}),rn.$set(Wd);const Kd={};_&2&&(Kd.$$scope={dirty:_,ctx:o}),dn.$set(Kd);const Bd={};_&2&&(Bd.$$scope={dirty:_,ctx:o}),mn.$set(Bd);const Dr={};_&2&&(Dr.$$scope={dirty:_,ctx:o}),hn.$set(Dr);const Rd={};_&2&&(Rd.$$scope={dirty:_,ctx:o}),fn.$set(Rd);const Vd={};_&2&&(Vd.$$scope={dirty:_,ctx:o}),gn.$set(Vd);const Ir={};_&2&&(Ir.$$scope={dirty:_,ctx:o}),kn.$set(Ir);const Yd={};_&2&&(Yd.$$scope={dirty:_,ctx:o}),vn.$set(Yd);const Gd={};_&2&&(Gd.$$scope={dirty:_,ctx:o}),bn.$set(Gd);const Jd={};_&2&&(Jd.$$scope={dirty:_,ctx:o}),Tn.$set(Jd);const Hr={};_&2&&(Hr.$$scope={dirty:_,ctx:o}),wn.$set(Hr);const Zd={};_&2&&(Zd.$$scope={dirty:_,ctx:o}),$n.$set(Zd);const ec={};_&2&&(ec.$$scope={dirty:_,ctx:o}),xn.$set(ec);const tc={};_&2&&(tc.$$scope={dirty:_,ctx:o}),Fn.$set(tc);const oc={};_&2&&(oc.$$scope={dirty:_,ctx:o}),Xn.$set(oc);const nc={};_&2&&(nc.$$scope={dirty:_,ctx:o}),Mn.$set(nc);const ut={};_&2&&(ut.$$scope={dirty:_,ctx:o}),zn.$set(ut);const Qr={};_&2&&(Qr.$$scope={dirty:_,ctx:o}),Cn.$set(Qr);const sc={};_&2&&(sc.$$scope={dirty:_,ctx:o}),jn.$set(sc);const Ur={};_&2&&(Ur.$$scope={dirty:_,ctx:o}),On.$set(Ur);const ac={};_&2&&(ac.$$scope={dirty:_,ctx:o}),Pn.$set(ac);const It={};_&2&&(It.$$scope={dirty:_,ctx:o}),Sn.$set(It);const rc={};_&2&&(rc.$$scope={dirty:_,ctx:o}),Dn.$set(rc);const ic={};_&2&&(ic.$$scope={dirty:_,ctx:o}),Hn.$set(ic);const lc={};_&2&&(lc.$$scope={dirty:_,ctx:o}),Qn.$set(lc);const dc={};_&2&&(dc.$$scope={dirty:_,ctx:o}),Un.$set(dc);const cc={};_&2&&(cc.$$scope={dirty:_,ctx:o}),Wn.$set(cc);const pc={};_&2&&(pc.$$scope={dirty:_,ctx:o}),Bn.$set(pc);const en={};_&2&&(en.$$scope={dirty:_,ctx:o}),Rn.$set(en);const mc={};_&2&&(mc.$$scope={dirty:_,ctx:o}),Vn.$set(mc);const hc={};_&2&&(hc.$$scope={dirty:_,ctx:o}),Gn.$set(hc);const Wr={};_&2&&(Wr.$$scope={dirty:_,ctx:o}),Jn.$set(Wr);const uc={};_&2&&(uc.$$scope={dirty:_,ctx:o}),Zn.$set(uc);const fc={};_&2&&(fc.$$scope={dirty:_,ctx:o}),es.$set(fc);const gc={};_&2&&(gc.$$scope={dirty:_,ctx:o}),os.$set(gc);const Tt={};_&2&&(Tt.$$scope={dirty:_,ctx:o}),ns.$set(Tt);const _c={};_&2&&(_c.$$scope={dirty:_,ctx:o}),ss.$set(_c);const kc={};_&2&&(kc.$$scope={dirty:_,ctx:o}),as.$set(kc)},i(o){hp||(N(l.$$.fragment,o),N(de.$$.fragment,o),N(bs.$$.fragment,o),N(ys.$$.fragment,o),N(Ts.$$.fragment,o),N(nn.$$.fragment,o),N(Ns.$$.fragment,o),N($s.$$.fragment,o),N(Xs.$$.fragment,o),N(Ms.$$.fragment,o),N(Es.$$.fragment,o),N(rn.$$.fragment,o),N(Cs.$$.fragment,o),N(js.$$.fragment,o),N(Os.$$.fragment,o),N(Ss.$$.fragment,o),N(Is.$$.fragment,o),N(dn.$$.fragment,o),N(Hs.$$.fragment,o),N(Qs.$$.fragment,o),N(Ws.$$.fragment,o),N(Bs.$$.fragment,o),N(Vs.$$.fragment,o),N(Gs.$$.fragment,o),N(Zs.$$.fragment,o),N(ta.$$.fragment,o),N(na.$$.fragment,o),N(aa.$$.fragment,o),N(ia.$$.fragment,o),N(da.$$.fragment,o),N(pa.$$.fragment,o),N(ha.$$.fragment,o),N(fa.$$.fragment,o),N(ga.$$.fragment,o),N(ba.$$.fragment,o),N(mn.$$.fragment,o),N(hn.$$.fragment,o),N(ya.$$.fragment,o),N(Ta.$$.fragment,o),N(xa.$$.fragment,o),N(fn.$$.fragment,o),N(gn.$$.fragment,o),N(La.$$.fragment,o),N(Fa.$$.fragment,o),N(za.$$.fragment,o),N(kn.$$.fragment,o),N(vn.$$.fragment,o),N(bn.$$.fragment,o),N(Ea.$$.fragment,o),N(Ca.$$.fragment,o),N(Pa.$$.fragment,o),N(Tn.$$.fragment,o),N(wn.$$.fragment,o),N(Sa.$$.fragment,o),N(Da.$$.fragment,o),N(Ua.$$.fragment,o),N($n.$$.fragment,o),N(xn.$$.fragment,o),N(Wa.$$.fragment,o),N(Ka.$$.fragment,o),N(Ya.$$.fragment,o),N(Fn.$$.fragment,o),N(Xn.$$.fragment,o),N(Ga.$$.fragment,o),N(Ja.$$.fragment,o),N(or.$$.fragment,o),N(Mn.$$.fragment,o),N(zn.$$.fragment,o),N(nr.$$.fragment,o),N(sr.$$.fragment,o),N(Cn.$$.fragment,o),N(lr.$$.fragment,o),N(jn.$$.fragment,o),N(On.$$.fragment,o),N(dr.$$.fragment,o),N(cr.$$.fragment,o),N(Pn.$$.fragment,o),N(ur.$$.fragment,o),N(Sn.$$.fragment,o),N(Dn.$$.fragment,o),N(fr.$$.fragment,o),N(gr.$$.fragment,o),N(Hn.$$.fragment,o),N(br.$$.fragment,o),N(Qn.$$.fragment,o),N(Un.$$.fragment,o),N(Wn.$$.fragment,o),N(yr.$$.fragment,o),N(Tr.$$.fragment,o),N(Bn.$$.fragment,o),N(xr.$$.fragment,o),N(Rn.$$.fragment,o),N(Vn.$$.fragment,o),N(Lr.$$.fragment,o),N(Fr.$$.fragment,o),N(Gn.$$.fragment,o),N(zr.$$.fragment,o),N(Jn.$$.fragment,o),N(Zn.$$.fragment,o),N(es.$$.fragment,o),N(Er.$$.fragment,o),N(Cr.$$.fragment,o),N(os.$$.fragment,o),N(Pr.$$.fragment,o),N(ns.$$.fragment,o),N(ss.$$.fragment,o),N(as.$$.fragment,o),hp=!0)},o(o){$(l.$$.fragment,o),$(de.$$.fragment,o),$(bs.$$.fragment,o),$(ys.$$.fragment,o),$(Ts.$$.fragment,o),$(nn.$$.fragment,o),$(Ns.$$.fragment,o),$($s.$$.fragment,o),$(Xs.$$.fragment,o),$(Ms.$$.fragment,o),$(Es.$$.fragment,o),$(rn.$$.fragment,o),$(Cs.$$.fragment,o),$(js.$$.fragment,o),$(Os.$$.fragment,o),$(Ss.$$.fragment,o),$(Is.$$.fragment,o),$(dn.$$.fragment,o),$(Hs.$$.fragment,o),$(Qs.$$.fragment,o),$(Ws.$$.fragment,o),$(Bs.$$.fragment,o),$(Vs.$$.fragment,o),$(Gs.$$.fragment,o),$(Zs.$$.fragment,o),$(ta.$$.fragment,o),$(na.$$.fragment,o),$(aa.$$.fragment,o),$(ia.$$.fragment,o),$(da.$$.fragment,o),$(pa.$$.fragment,o),$(ha.$$.fragment,o),$(fa.$$.fragment,o),$(ga.$$.fragment,o),$(ba.$$.fragment,o),$(mn.$$.fragment,o),$(hn.$$.fragment,o),$(ya.$$.fragment,o),$(Ta.$$.fragment,o),$(xa.$$.fragment,o),$(fn.$$.fragment,o),$(gn.$$.fragment,o),$(La.$$.fragment,o),$(Fa.$$.fragment,o),$(za.$$.fragment,o),$(kn.$$.fragment,o),$(vn.$$.fragment,o),$(bn.$$.fragment,o),$(Ea.$$.fragment,o),$(Ca.$$.fragment,o),$(Pa.$$.fragment,o),$(Tn.$$.fragment,o),$(wn.$$.fragment,o),$(Sa.$$.fragment,o),$(Da.$$.fragment,o),$(Ua.$$.fragment,o),$($n.$$.fragment,o),$(xn.$$.fragment,o),$(Wa.$$.fragment,o),$(Ka.$$.fragment,o),$(Ya.$$.fragment,o),$(Fn.$$.fragment,o),$(Xn.$$.fragment,o),$(Ga.$$.fragment,o),$(Ja.$$.fragment,o),$(or.$$.fragment,o),$(Mn.$$.fragment,o),$(zn.$$.fragment,o),$(nr.$$.fragment,o),$(sr.$$.fragment,o),$(Cn.$$.fragment,o),$(lr.$$.fragment,o),$(jn.$$.fragment,o),$(On.$$.fragment,o),$(dr.$$.fragment,o),$(cr.$$.fragment,o),$(Pn.$$.fragment,o),$(ur.$$.fragment,o),$(Sn.$$.fragment,o),$(Dn.$$.fragment,o),$(fr.$$.fragment,o),$(gr.$$.fragment,o),$(Hn.$$.fragment,o),$(br.$$.fragment,o),$(Qn.$$.fragment,o),$(Un.$$.fragment,o),$(Wn.$$.fragment,o),$(yr.$$.fragment,o),$(Tr.$$.fragment,o),$(Bn.$$.fragment,o),$(xr.$$.fragment,o),$(Rn.$$.fragment,o),$(Vn.$$.fragment,o),$(Lr.$$.fragment,o),$(Fr.$$.fragment,o),$(Gn.$$.fragment,o),$(zr.$$.fragment,o),$(Jn.$$.fragment,o),$(Zn.$$.fragment,o),$(es.$$.fragment,o),$(Er.$$.fragment,o),$(Cr.$$.fragment,o),$(os.$$.fragment,o),$(Pr.$$.fragment,o),$(ns.$$.fragment,o),$(ss.$$.fragment,o),$(as.$$.fragment,o),hp=!1},d(o){t(d),o&&t(b),o&&t(h),x(l),o&&t(_e),o&&t(P),o&&t(V),o&&t(re),x(de),o&&t(ke),o&&t(I),o&&t(C),o&&t(ue),o&&t(ve),o&&t(fe),o&&t(be),o&&t(E),o&&t(Y),o&&t(G),o&&t(je),o&&t(ae),o&&t(vc),o&&t(oo),x(bs),o&&t(bc),o&&t(ft),o&&t(yc),o&&t(no),x(ys),o&&t(Tc),o&&t(yt),x(Ts),x(nn),o&&t(wc),o&&t(ao),x(Ns),o&&t(Nc),o&&t(Je),x($s),x(Xs),x(Ms),x(Es),x(rn),x(Cs),o&&t($c),o&&t(io),x(js),o&&t(xc),o&&t(rt),x(Os),x(Ss),x(Is),x(dn),o&&t(Lc),o&&t(po),x(Hs),o&&t(Fc),o&&t(mo),x(Qs),o&&t(Xc),o&&t(ho),x(Ws),o&&t(qc),o&&t(uo),x(Bs),o&&t(Mc),o&&t(fo),x(Vs),o&&t(zc),o&&t(go),x(Gs),o&&t(Ec),o&&t(_o),x(Zs),o&&t(Cc),o&&t(ko),x(ta),o&&t(jc),o&&t(vo),x(na),o&&t(Oc),o&&t(bo),x(aa),o&&t(Ac),o&&t(yo),x(ia),o&&t(Pc),o&&t(To),x(da),o&&t(Sc),o&&t(wo),x(pa),o&&t(Dc),o&&t(No),x(ha),o&&t(Ic),o&&t($o),x(fa),o&&t(Hc),o&&t(it),x(ga),x(ba),x(mn),x(hn),o&&t(Qc),o&&t(Lo),x(ya),o&&t(Uc),o&&t(lt),x(Ta),x(xa),x(fn),x(gn),o&&t(Wc),o&&t(Xo),x(La),o&&t(Kc),o&&t(dt),x(Fa),x(za),x(kn),x(vn),x(bn),o&&t(Bc),o&&t(Mo),x(Ea),o&&t(Rc),o&&t(ct),x(Ca),x(Pa),x(Tn),x(wn),o&&t(Vc),o&&t(Eo),x(Sa),o&&t(Yc),o&&t(pt),x(Da),x(Ua),x($n),x(xn),o&&t(Gc),o&&t(jo),x(Wa),o&&t(Jc),o&&t(mt),x(Ka),x(Ya),x(Fn),x(Xn),o&&t(Zc),o&&t(Po),x(Ga),o&&t(ep),o&&t(ht),x(Ja),x(or),x(Mn),x(zn),o&&t(tp),o&&t(Io),x(nr),o&&t(op),o&&t(et),x(sr),x(Cn),x(lr),x(jn),x(On),o&&t(np),o&&t(Qo),x(dr),o&&t(sp),o&&t(tt),x(cr),x(Pn),x(ur),x(Sn),x(Dn),o&&t(ap),o&&t(Wo),x(fr),o&&t(rp),o&&t(ot),x(gr),x(Hn),x(br),x(Qn),x(Un),x(Wn),o&&t(ip),o&&t(Bo),x(yr),o&&t(lp),o&&t(nt),x(Tr),x(Bn),x(xr),x(Rn),x(Vn),o&&t(dp),o&&t(Vo),x(Lr),o&&t(cp),o&&t(st),x(Fr),x(Gn),x(zr),x(Jn),x(Zn),x(es),o&&t(pp),o&&t(Go),x(Er),o&&t(mp),o&&t(at),x(Cr),x(os),x(Pr),x(ns),x(ss),x(as)}}}const V1={local:"xlnet",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.XLNetConfig",title:"XLNetConfig"},{local:"transformers.XLNetTokenizer",title:"XLNetTokenizer"},{local:"transformers.XLNetTokenizerFast",title:"XLNetTokenizerFast"},{local:"transformers.models.xlnet.modeling_xlnet.XLNetModelOutput",title:"XLNet specific outputs"},{local:"transformers.XLNetModel",title:"XLNetModel"},{local:"transformers.XLNetLMHeadModel",title:"XLNetLMHeadModel"},{local:"transformers.XLNetForSequenceClassification",title:"XLNetForSequenceClassification"},{local:"transformers.XLNetForMultipleChoice",title:"XLNetForMultipleChoice"},{local:"transformers.XLNetForTokenClassification",title:"XLNetForTokenClassification"},{local:"transformers.XLNetForQuestionAnsweringSimple",title:"XLNetForQuestionAnsweringSimple"},{local:"transformers.XLNetForQuestionAnswering",title:"XLNetForQuestionAnswering"},{local:"transformers.TFXLNetModel",title:"TFXLNetModel"},{local:"transformers.TFXLNetLMHeadModel",title:"TFXLNetLMHeadModel"},{local:"transformers.TFXLNetForSequenceClassification",title:"TFXLNetForSequenceClassification"},{local:"transformers.TFXLNetForMultipleChoice",title:"TFLNetForMultipleChoice"},{local:"transformers.TFXLNetForTokenClassification",title:"TFXLNetForTokenClassification"},{local:"transformers.TFXLNetForQuestionAnsweringSimple",title:"TFXLNetForQuestionAnsweringSimple"}],title:"XLNet"};function Y1(q){return l1(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class n0 extends s1{constructor(d){super();a1(this,d,Y1,R1,r1,{})}}export{n0 as default,V1 as metadata};
