import{S as sM,i as aM,s as rM,e as a,k as c,w as k,t as n,M as iM,c as r,d as t,m as p,a as i,x as v,h as s,b as u,N as nM,G as e,g,y as w,q as M,o as N,B as F,v as lM,L as Pe}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ke}from"../../chunks/Tip-hf-doc-builder.js";import{D as I}from"../../chunks/Docstring-hf-doc-builder.js";import{C as De}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as Re}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as He}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function dM(L){let d,T,h,f,y;return f=new De({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFhMTmV0Q29uZmlnJTJDJTIwWExOZXRNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBYTE5ldCUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwWExOZXRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwWExOZXRNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",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"),T=n("Examples:"),h=c(),k(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);T=s(m,"Examples:"),m.forEach(t),h=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,T),g(l,h,m),w(f,l,m),y=!0},p:Pe,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){N(f.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),F(f,l)}}}function cM(L){let d,T,h,f,y;return f=new De({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",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"),T=n("sequence pair mask has the following format:"),h=c(),k(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);T=s(m,"sequence pair mask has the following format:"),m.forEach(t),h=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,T),g(l,h,m),w(f,l,m),y=!0},p:Pe,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){N(f.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),F(f,l)}}}function pM(L){let d,T,h,f,y;return f=new De({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",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"),T=n("sequence pair mask has the following format:"),h=c(),k(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);T=s(m,"sequence pair mask has the following format:"),m.forEach(t),h=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,T),g(l,h,m),w(f,l,m),y=!0},p:Pe,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){N(f.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),F(f,l)}}}function mM(L){let d,T,h,f,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),y=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);T=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var j=i(h);f=s(j,"Module"),j.forEach(t),y=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,T),e(d,h),e(h,f),e(d,y)},d(l){l&&t(d)}}}function hM(L){let d,T,h,f,y;return f=new De({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBYTE5ldE1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ4bG5ldC1iYXNlLWNhc2VkJTIyKSUwQW1vZGVsJTIwJTNEJTIwWExOZXRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyeGxuZXQtYmFzZS1jYXNlZCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",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"),T=n("Example:"),h=c(),k(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);T=s(m,"Example:"),m.forEach(t),h=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,T),g(l,h,m),w(f,l,m),y=!0},p:Pe,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){N(f.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),F(f,l)}}}function uM(L){let d,T,h,f,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),y=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);T=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var j=i(h);f=s(j,"Module"),j.forEach(t),y=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,T),e(d,h),e(h,f),e(d,y)},d(l){l&&t(d)}}}function fM(L){let d,T,h,f,y;return f=new De({props:{code:" ",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"),T=n("Examples:"),h=c(),k(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);T=s(m,"Examples:"),m.forEach(t),h=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,T),g(l,h,m),w(f,l,m),y=!0},p:Pe,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){N(f.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),F(f,l)}}}function gM(L){let d,T,h,f,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),y=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);T=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var j=i(h);f=s(j,"Module"),j.forEach(t),y=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,T),e(d,h),e(h,f),e(d,y)},d(l){l&&t(d)}}}function _M(L){let d,T,h,f,y;return f=new De({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFhMTmV0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbmV0LWJhc2UtY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBYTE5ldEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMnhsbmV0LWJhc2UtY2FzZWQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwbG9naXRzLmFyZ21heCgpLml0ZW0oKSUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMFhMTmV0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyeGxuZXQtYmFzZS1jYXNlZCUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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"),T=n("Example of single-label classification:"),h=c(),k(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);T=s(m,"Example of single-label classification:"),m.forEach(t),h=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,T),g(l,h,m),w(f,l,m),y=!0},p:Pe,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){N(f.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),F(f,l)}}}function bM(L){let d,T,h,f,y;return f=new De({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFhMTmV0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbmV0LWJhc2UtY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBYTE5ldEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMnhsbmV0LWJhc2UtY2FzZWQlMjIlMkMlMjBwcm9ibGVtX3R5cGUlM0QlMjJtdWx0aV9sYWJlbF9jbGFzc2lmaWNhdGlvbiUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWRzJTIwJTNEJTIwdG9yY2guYXJhbmdlKDAlMkMlMjBsb2dpdHMuc2hhcGUlNUItMSU1RCklNUJ0b3JjaC5zaWdtb2lkKGxvZ2l0cykuc3F1ZWV6ZShkaW0lM0QwKSUyMCUzRSUyMDAuNSU1RCUwQSUwQSUyMyUyMFRvJTIwdHJhaW4lMjBhJTIwbW9kZWwlMjBvbiUyMCU2MG51bV9sYWJlbHMlNjAlMjBjbGFzc2VzJTJDJTIweW91JTIwY2FuJTIwcGFzcyUyMCU2MG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTYwJTIwdG8lMjAlNjAuZnJvbV9wcmV0cmFpbmVkKC4uLiklNjAlMEFudW1fbGFiZWxzJTIwJTNEJTIwbGVuKG1vZGVsLmNvbmZpZy5pZDJsYWJlbCklMEFtb2RlbCUyMCUzRCUyMFhMTmV0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIyeGxuZXQtYmFzZS1jYXNlZCUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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"),T=n("Example of multi-label classification:"),h=c(),k(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);T=s(m,"Example of multi-label classification:"),m.forEach(t),h=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,T),g(l,h,m),w(f,l,m),y=!0},p:Pe,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){N(f.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),F(f,l)}}}function yM(L){let d,T,h,f,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),y=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);T=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var j=i(h);f=s(j,"Module"),j.forEach(t),y=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,T),e(d,h),e(h,f),e(d,y)},d(l){l&&t(d)}}}function TM(L){let d,T,h,f,y;return f=new De({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBYTE5ldEZvck11bHRpcGxlQ2hvaWNlJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ4bG5ldC1iYXNlLWNhc2VkJTIyKSUwQW1vZGVsJTIwJTNEJTIwWExOZXRGb3JNdWx0aXBsZUNob2ljZS5mcm9tX3ByZXRyYWluZWQoJTIyeGxuZXQtYmFzZS1jYXNlZCUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJJbiUyMEl0YWx5JTJDJTIwcGl6emElMjBzZXJ2ZWQlMjBpbiUyMGZvcm1hbCUyMHNldHRpbmdzJTJDJTIwc3VjaCUyMGFzJTIwYXQlMjBhJTIwcmVzdGF1cmFudCUyQyUyMGlzJTIwcHJlc2VudGVkJTIwdW5zbGljZWQuJTIyJTBBY2hvaWNlMCUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdpdGglMjBhJTIwZm9yayUyMGFuZCUyMGElMjBrbmlmZS4lMjIlMEFjaG9pY2UxJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2hpbGUlMjBoZWxkJTIwaW4lMjB0aGUlMjBoYW5kLiUyMiUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvcigwKS51bnNxdWVlemUoMCklMjAlMjAlMjMlMjBjaG9pY2UwJTIwaXMlMjBjb3JyZWN0JTIwKGFjY29yZGluZyUyMHRvJTIwV2lraXBlZGlhJTIwJTNCKSklMkMlMjBiYXRjaCUyMHNpemUlMjAxJTBBJTBBZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIoJTVCcHJvbXB0JTJDJTIwcHJvbXB0JTVEJTJDJTIwJTVCY2hvaWNlMCUyQyUyMGNob2ljZTElNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTJDJTIwcGFkZGluZyUzRFRydWUpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqJTdCayUzQSUyMHYudW5zcXVlZXplKDApJTIwZm9yJTIwayUyQyUyMHYlMjBpbiUyMGVuY29kaW5nLml0ZW1zKCklN0QlMkMlMjBsYWJlbHMlM0RsYWJlbHMpJTIwJTIwJTIzJTIwYmF0Y2glMjBzaXplJTIwaXMlMjAxJTBBJTBBJTIzJTIwdGhlJTIwbGluZWFyJTIwY2xhc3NpZmllciUyMHN0aWxsJTIwbmVlZHMlMjB0byUyMGJlJTIwdHJhaW5lZCUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3MlMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",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"),T=n("Example:"),h=c(),k(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);T=s(m,"Example:"),m.forEach(t),h=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,T),g(l,h,m),w(f,l,m),y=!0},p:Pe,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){N(f.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),F(f,l)}}}function kM(L){let d,T,h,f,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),y=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);T=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var j=i(h);f=s(j,"Module"),j.forEach(t),y=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,T),e(d,h),e(h,f),e(d,y)},d(l){l&&t(d)}}}function vM(L){let d,T,h,f,y;return f=new De({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBYTE5ldEZvclRva2VuQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbmV0LWJhc2UtY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBYTE5ldEZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMnhsbmV0LWJhc2UtY2FzZWQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUwQSUyMCUyMCUyMCUyMCUyMkh1Z2dpbmdGYWNlJTIwaXMlMjBhJTIwY29tcGFueSUyMGJhc2VkJTIwaW4lMjBQYXJpcyUyMGFuZCUyME5ldyUyMFlvcmslMjIlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RGYWxzZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMEEpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSklMEElMEElMjMlMjBOb3RlJTIwdGhhdCUyMHRva2VucyUyMGFyZSUyMGNsYXNzaWZpZWQlMjByYXRoZXIlMjB0aGVuJTIwaW5wdXQlMjB3b3JkcyUyMHdoaWNoJTIwbWVhbnMlMjB0aGF0JTBBJTIzJTIwdGhlcmUlMjBtaWdodCUyMGJlJTIwbW9yZSUyMHByZWRpY3RlZCUyMHRva2VuJTIwY2xhc3NlcyUyMHRoYW4lMjB3b3Jkcy4lMEElMjMlMjBNdWx0aXBsZSUyMHRva2VuJTIwY2xhc3NlcyUyMG1pZ2h0JTIwYWNjb3VudCUyMGZvciUyMHRoZSUyMHNhbWUlMjB3b3JkJTBBcHJlZGljdGVkX3Rva2Vuc19jbGFzc2VzJTIwJTNEJTIwJTVCbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCdC5pdGVtKCklNUQlMjBmb3IlMjB0JTIwaW4lMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTVCMCU1RCU1RCUwQSUwQWxhYmVscyUyMCUzRCUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlMEFsb3NzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpLmxvc3M=",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"),T=n("Example:"),h=c(),k(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);T=s(m,"Example:"),m.forEach(t),h=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,T),g(l,h,m),w(f,l,m),y=!0},p:Pe,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){N(f.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),F(f,l)}}}function wM(L){let d,T,h,f,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),y=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);T=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var j=i(h);f=s(j,"Module"),j.forEach(t),y=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,T),e(d,h),e(h,f),e(d,y)},d(l){l&&t(d)}}}function MM(L){let d,T,h,f,y;return f=new De({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBYTE5ldEZvclF1ZXN0aW9uQW5zd2VyaW5nU2ltcGxlJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ4bG5ldC1iYXNlLWNhc2VkJTIyKSUwQW1vZGVsJTIwJTNEJTIwWExOZXRGb3JRdWVzdGlvbkFuc3dlcmluZ1NpbXBsZS5mcm9tX3ByZXRyYWluZWQoJTIyeGxuZXQtYmFzZS1jYXNlZCUyMiklMEElMEFxdWVzdGlvbiUyQyUyMHRleHQlMjAlM0QlMjAlMjJXaG8lMjB3YXMlMjBKaW0lMjBIZW5zb24lM0YlMjIlMkMlMjAlMjJKaW0lMjBIZW5zb24lMjB3YXMlMjBhJTIwbmljZSUyMHB1cHBldCUyMiUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihxdWVzdGlvbiUyQyUyMHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNEJTIwb3V0cHV0cy5zdGFydF9sb2dpdHMuYXJnbWF4KCklMEFhbnN3ZXJfZW5kX2luZGV4JTIwJTNEJTIwb3V0cHV0cy5lbmRfbG9naXRzLmFyZ21heCgpJTBBJTBBcHJlZGljdF9hbnN3ZXJfdG9rZW5zJTIwJTNEJTIwaW5wdXRzLmlucHV0X2lkcyU1QjAlMkMlMjBhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0ElMjBhbnN3ZXJfZW5kX2luZGV4JTIwJTJCJTIwMSU1RCUwQSUwQSUyMyUyMHRhcmdldCUyMGlzJTIwJTIybmljZSUyMHB1cHBldCUyMiUwQXRhcmdldF9zdGFydF9pbmRleCUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxNCU1RCklMEF0YXJnZXRfZW5kX2luZGV4JTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QjE1JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3M=",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"),T=n("Example:"),h=c(),k(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);T=s(m,"Example:"),m.forEach(t),h=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,T),g(l,h,m),w(f,l,m),y=!0},p:Pe,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){N(f.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),F(f,l)}}}function NM(L){let d,T,h,f,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),y=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);T=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var j=i(h);f=s(j,"Module"),j.forEach(t),y=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,T),e(d,h),e(h,f),e(d,y)},d(l){l&&t(d)}}}function FM(L){let d,T,h,f,y;return f=new De({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBYTE5ldEZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ4bG5ldC1iYXNlLWNhc2VkJTIyKSUwQW1vZGVsJTIwJTNEJTIwWExOZXRGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyeGxuZXQtYmFzZS1jYXNlZCUyMiklMEElMEFpbnB1dF9pZHMlMjAlM0QlMjB0b3JjaC50ZW5zb3IodG9rZW5pemVyLmVuY29kZSglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSkpLnVuc3F1ZWV6ZSglMEElMjAlMjAlMjAlMjAwJTBBKSUyMCUyMCUyMyUyMEJhdGNoJTIwc2l6ZSUyMDElMEFzdGFydF9wb3NpdGlvbnMlMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCMSU1RCklMEFlbmRfcG9zaXRpb25zJTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QjMlNUQpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0X2lkcyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHN0YXJ0X3Bvc2l0aW9ucyUyQyUyMGVuZF9wb3NpdGlvbnMlM0RlbmRfcG9zaXRpb25zKSUwQSUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3M=",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"),T=n("Example:"),h=c(),k(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);T=s(m,"Example:"),m.forEach(t),h=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,T),g(l,h,m),w(f,l,m),y=!0},p:Pe,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){N(f.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),F(f,l)}}}function xM(L){let d,T,h,f,y,l,m,j,ke,_e,q,me,te,x,ve,B,he,Ee,H,re,le,G,de,we,O,Me,be,Z,Ne,ce,ie,C,U,ue,Y,ye,fe,V,Fe,Te,E,xe,P,D,pe,K,ge,$e,W,Xe,S,Le,oe,z,je,J,ne,Ce;return{c(){d=a("p"),T=n("TensorFlow models and layers in "),h=a("code"),f=n("transformers"),y=n(" accept two formats as input:"),l=c(),m=a("ul"),j=a("li"),ke=n("having all inputs as keyword arguments (like PyTorch models), or"),_e=c(),q=a("li"),me=n("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),x=a("p"),ve=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 `),B=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 `),H=a("code"),re=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a("code"),de=n("fit()"),we=n(" and "),O=a("code"),Me=n("predict()"),be=n(`, such as when creating your own layers or models with
the Keras `),Z=a("code"),Ne=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(),C=a("ul"),U=a("li"),ue=n("a single Tensor with "),Y=a("code"),ye=n("input_ids"),fe=n(" only and nothing else: "),V=a("code"),Fe=n("model(input_ids)"),Te=c(),E=a("li"),xe=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a("code"),D=n("model([input_ids, attention_mask])"),pe=n(" or "),K=a("code"),ge=n("model([input_ids, attention_mask, token_type_ids])"),$e=c(),W=a("li"),Xe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a("code"),Le=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=c(),z=a("p"),je=n(`Note that when creating models and layers with
`),J=a("a"),ne=n("subclassing"),Ce=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(b){d=r(b,"P",{});var $=i(d);T=s($,"TensorFlow models and layers in "),h=r($,"CODE",{});var Je=i(h);f=s(Je,"transformers"),Je.forEach(t),y=s($," accept two formats as input:"),$.forEach(t),l=p(b),m=r(b,"UL",{});var se=i(m);j=r(se,"LI",{});var Ie=i(j);ke=s(Ie,"having all inputs as keyword arguments (like PyTorch models), or"),Ie.forEach(t),_e=p(se),q=r(se,"LI",{});var qe=i(q);me=s(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),se.forEach(t),te=p(b),x=r(b,"P",{});var X=i(x);ve=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 `),B=r(X,"CODE",{});var We=i(B);he=s(We,"model.fit()"),We.forEach(t),Ee=s(X,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),H=r(X,"CODE",{});var Ae=i(H);re=s(Ae,"model.fit()"),Ae.forEach(t),le=s(X,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=r(X,"CODE",{});var Ze=i(G);de=s(Ze,"fit()"),Ze.forEach(t),we=s(X," and "),O=r(X,"CODE",{});var Ue=i(O);Me=s(Ue,"predict()"),Ue.forEach(t),be=s(X,`, such as when creating your own layers or models with
the Keras `),Z=r(X,"CODE",{});var Se=i(Z);Ne=s(Se,"Functional"),Se.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(b),C=r(b,"UL",{});var A=i(C);U=r(A,"LI",{});var Q=i(U);ue=s(Q,"a single Tensor with "),Y=r(Q,"CODE",{});var Be=i(Y);ye=s(Be,"input_ids"),Be.forEach(t),fe=s(Q," only and nothing else: "),V=r(Q,"CODE",{});var Ge=i(V);Fe=s(Ge,"model(input_ids)"),Ge.forEach(t),Q.forEach(t),Te=p(A),E=r(A,"LI",{});var R=i(E);xe=s(R,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=r(R,"CODE",{});var Oe=i(P);D=s(Oe,"model([input_ids, attention_mask])"),Oe.forEach(t),pe=s(R," or "),K=r(R,"CODE",{});var ze=i(K);ge=s(ze,"model([input_ids, attention_mask, token_type_ids])"),ze.forEach(t),R.forEach(t),$e=p(A),W=r(A,"LI",{});var ae=i(W);Xe=s(ae,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r(ae,"CODE",{});var Ve=i(S);Le=s(Ve,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ve.forEach(t),ae.forEach(t),A.forEach(t),oe=p(b),z=r(b,"P",{});var ee=i(z);je=s(ee,`Note that when creating models and layers with
`),J=r(ee,"A",{href:!0,rel:!0});var Qe=i(J);ne=s(Qe,"subclassing"),Qe.forEach(t),Ce=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(J,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(J,"rel","nofollow")},m(b,$){g(b,d,$),e(d,T),e(d,h),e(h,f),e(d,y),g(b,l,$),g(b,m,$),e(m,j),e(j,ke),e(m,_e),e(m,q),e(q,me),g(b,te,$),g(b,x,$),e(x,ve),e(x,B),e(B,he),e(x,Ee),e(x,H),e(H,re),e(x,le),e(x,G),e(G,de),e(x,we),e(x,O),e(O,Me),e(x,be),e(x,Z),e(Z,Ne),e(x,ce),g(b,ie,$),g(b,C,$),e(C,U),e(U,ue),e(U,Y),e(Y,ye),e(U,fe),e(U,V),e(V,Fe),e(C,Te),e(C,E),e(E,xe),e(E,P),e(P,D),e(E,pe),e(E,K),e(K,ge),e(C,$e),e(C,W),e(W,Xe),e(W,S),e(S,Le),g(b,oe,$),g(b,z,$),e(z,je),e(z,J),e(J,ne),e(z,Ce)},d(b){b&&t(d),b&&t(l),b&&t(m),b&&t(te),b&&t(x),b&&t(ie),b&&t(C),b&&t(oe),b&&t(z)}}}function $M(L){let d,T,h,f,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),y=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);T=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var j=i(h);f=s(j,"Module"),j.forEach(t),y=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,T),e(d,h),e(h,f),e(d,y)},d(l){l&&t(d)}}}function XM(L){let d,T,h,f,y;return f=new De({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlhMTmV0TW9kZWwlMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbmV0LWJhc2UtY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBURlhMTmV0TW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbmV0LWJhc2UtY2FzZWQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbChpbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",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"),T=n("Example:"),h=c(),k(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);T=s(m,"Example:"),m.forEach(t),h=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,T),g(l,h,m),w(f,l,m),y=!0},p:Pe,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){N(f.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),F(f,l)}}}function LM(L){let d,T,h,f,y,l,m,j,ke,_e,q,me,te,x,ve,B,he,Ee,H,re,le,G,de,we,O,Me,be,Z,Ne,ce,ie,C,U,ue,Y,ye,fe,V,Fe,Te,E,xe,P,D,pe,K,ge,$e,W,Xe,S,Le,oe,z,je,J,ne,Ce;return{c(){d=a("p"),T=n("TensorFlow models and layers in "),h=a("code"),f=n("transformers"),y=n(" accept two formats as input:"),l=c(),m=a("ul"),j=a("li"),ke=n("having all inputs as keyword arguments (like PyTorch models), or"),_e=c(),q=a("li"),me=n("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),x=a("p"),ve=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 `),B=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 `),H=a("code"),re=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a("code"),de=n("fit()"),we=n(" and "),O=a("code"),Me=n("predict()"),be=n(`, such as when creating your own layers or models with
the Keras `),Z=a("code"),Ne=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(),C=a("ul"),U=a("li"),ue=n("a single Tensor with "),Y=a("code"),ye=n("input_ids"),fe=n(" only and nothing else: "),V=a("code"),Fe=n("model(input_ids)"),Te=c(),E=a("li"),xe=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a("code"),D=n("model([input_ids, attention_mask])"),pe=n(" or "),K=a("code"),ge=n("model([input_ids, attention_mask, token_type_ids])"),$e=c(),W=a("li"),Xe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a("code"),Le=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=c(),z=a("p"),je=n(`Note that when creating models and layers with
`),J=a("a"),ne=n("subclassing"),Ce=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(b){d=r(b,"P",{});var $=i(d);T=s($,"TensorFlow models and layers in "),h=r($,"CODE",{});var Je=i(h);f=s(Je,"transformers"),Je.forEach(t),y=s($," accept two formats as input:"),$.forEach(t),l=p(b),m=r(b,"UL",{});var se=i(m);j=r(se,"LI",{});var Ie=i(j);ke=s(Ie,"having all inputs as keyword arguments (like PyTorch models), or"),Ie.forEach(t),_e=p(se),q=r(se,"LI",{});var qe=i(q);me=s(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),se.forEach(t),te=p(b),x=r(b,"P",{});var X=i(x);ve=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 `),B=r(X,"CODE",{});var We=i(B);he=s(We,"model.fit()"),We.forEach(t),Ee=s(X,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),H=r(X,"CODE",{});var Ae=i(H);re=s(Ae,"model.fit()"),Ae.forEach(t),le=s(X,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=r(X,"CODE",{});var Ze=i(G);de=s(Ze,"fit()"),Ze.forEach(t),we=s(X," and "),O=r(X,"CODE",{});var Ue=i(O);Me=s(Ue,"predict()"),Ue.forEach(t),be=s(X,`, such as when creating your own layers or models with
the Keras `),Z=r(X,"CODE",{});var Se=i(Z);Ne=s(Se,"Functional"),Se.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(b),C=r(b,"UL",{});var A=i(C);U=r(A,"LI",{});var Q=i(U);ue=s(Q,"a single Tensor with "),Y=r(Q,"CODE",{});var Be=i(Y);ye=s(Be,"input_ids"),Be.forEach(t),fe=s(Q," only and nothing else: "),V=r(Q,"CODE",{});var Ge=i(V);Fe=s(Ge,"model(input_ids)"),Ge.forEach(t),Q.forEach(t),Te=p(A),E=r(A,"LI",{});var R=i(E);xe=s(R,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=r(R,"CODE",{});var Oe=i(P);D=s(Oe,"model([input_ids, attention_mask])"),Oe.forEach(t),pe=s(R," or "),K=r(R,"CODE",{});var ze=i(K);ge=s(ze,"model([input_ids, attention_mask, token_type_ids])"),ze.forEach(t),R.forEach(t),$e=p(A),W=r(A,"LI",{});var ae=i(W);Xe=s(ae,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r(ae,"CODE",{});var Ve=i(S);Le=s(Ve,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ve.forEach(t),ae.forEach(t),A.forEach(t),oe=p(b),z=r(b,"P",{});var ee=i(z);je=s(ee,`Note that when creating models and layers with
`),J=r(ee,"A",{href:!0,rel:!0});var Qe=i(J);ne=s(Qe,"subclassing"),Qe.forEach(t),Ce=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(J,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(J,"rel","nofollow")},m(b,$){g(b,d,$),e(d,T),e(d,h),e(h,f),e(d,y),g(b,l,$),g(b,m,$),e(m,j),e(j,ke),e(m,_e),e(m,q),e(q,me),g(b,te,$),g(b,x,$),e(x,ve),e(x,B),e(B,he),e(x,Ee),e(x,H),e(H,re),e(x,le),e(x,G),e(G,de),e(x,we),e(x,O),e(O,Me),e(x,be),e(x,Z),e(Z,Ne),e(x,ce),g(b,ie,$),g(b,C,$),e(C,U),e(U,ue),e(U,Y),e(Y,ye),e(U,fe),e(U,V),e(V,Fe),e(C,Te),e(C,E),e(E,xe),e(E,P),e(P,D),e(E,pe),e(E,K),e(K,ge),e(C,$e),e(C,W),e(W,Xe),e(W,S),e(S,Le),g(b,oe,$),g(b,z,$),e(z,je),e(z,J),e(J,ne),e(z,Ce)},d(b){b&&t(d),b&&t(l),b&&t(m),b&&t(te),b&&t(x),b&&t(ie),b&&t(C),b&&t(oe),b&&t(z)}}}function jM(L){let d,T,h,f,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),y=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);T=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var j=i(h);f=s(j,"Module"),j.forEach(t),y=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,T),e(d,h),e(h,f),e(d,y)},d(l){l&&t(d)}}}function CM(L){let d,T,h,f,y;return f=new De({props:{code:"aW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEFpbXBvcnQlMjBudW1weSUyMGFzJTIwbnAlMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFRGWExOZXRMTUhlYWRNb2RlbCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbmV0LWxhcmdlLWNhc2VkJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZYTE5ldExNSGVhZE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJ4bG5ldC1sYXJnZS1jYXNlZCUyMiklMEElMEElMjMlMjBXZSUyMHNob3clMjBob3clMjB0byUyMHNldHVwJTIwaW5wdXRzJTIwdG8lMjBwcmVkaWN0JTIwYSUyMG5leHQlMjB0b2tlbiUyMHVzaW5nJTIwYSUyMGJpLWRpcmVjdGlvbmFsJTIwY29udGV4dC4lMEFpbnB1dF9pZHMlMjAlM0QlMjB0Zi5jb25zdGFudCh0b2tlbml6ZXIuZW5jb2RlKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMHZlcnklMjAlM0NtYXNrJTNFJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNEVHJ1ZSkpJTVCJTBBJTIwJTIwJTIwJTIwTm9uZSUyQyUyMCUzQSUwQSU1RCUyMCUyMCUyMyUyMFdlJTIwd2lsbCUyMHByZWRpY3QlMjB0aGUlMjBtYXNrZWQlMjB0b2tlbiUwQSUwQXBlcm1fbWFzayUyMCUzRCUyMG5wLnplcm9zKCgxJTJDJTIwaW5wdXRfaWRzLnNoYXBlJTVCMSU1RCUyQyUyMGlucHV0X2lkcy5zaGFwZSU1QjElNUQpKSUwQXBlcm1fbWFzayU1QiUzQSUyQyUyMCUzQSUyQyUyMC0xJTVEJTIwJTNEJTIwMS4wJTIwJTIwJTIzJTIwUHJldmlvdXMlMjB0b2tlbnMlMjBkb24ndCUyMHNlZSUyMGxhc3QlMjB0b2tlbiUwQSUwQXRhcmdldF9tYXBwaW5nJTIwJTNEJTIwbnAuemVyb3MoJTBBJTIwJTIwJTIwJTIwKDElMkMlMjAxJTJDJTIwaW5wdXRfaWRzLnNoYXBlJTVCMSU1RCklMEEpJTIwJTIwJTIzJTIwU2hhcGUlMjAlNUIxJTJDJTIwMSUyQyUyMHNlcV9sZW5ndGglNUQlMjAlM0QlM0UlMjBsZXQncyUyMHByZWRpY3QlMjBvbmUlMjB0b2tlbiUwQXRhcmdldF9tYXBwaW5nJTVCJTBBJTIwJTIwJTIwJTIwMCUyQyUyMDAlMkMlMjAtMSUwQSU1RCUyMCUzRCUyMDEuMCUyMCUyMCUyMyUyME91ciUyMGZpcnN0JTIwKGFuZCUyMG9ubHkpJTIwcHJlZGljdGlvbiUyMHdpbGwlMjBiZSUyMHRoZSUyMGxhc3QlMjB0b2tlbiUyMG9mJTIwdGhlJTIwc2VxdWVuY2UlMjAodGhlJTIwbWFza2VkJTIwdG9rZW4pJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCUwQSUyMCUyMCUyMCUyMGlucHV0X2lkcyUyQyUwQSUyMCUyMCUyMCUyMHBlcm1fbWFzayUzRHRmLmNvbnN0YW50KHBlcm1fbWFzayUyQyUyMGR0eXBlJTNEdGYuZmxvYXQzMiklMkMlMEElMjAlMjAlMjAlMjB0YXJnZXRfbWFwcGluZyUzRHRmLmNvbnN0YW50KHRhcmdldF9tYXBwaW5nJTJDJTIwZHR5cGUlM0R0Zi5mbG9hdDMyKSUyQyUwQSklMEElMEFuZXh0X3Rva2VuX2xvZ2l0cyUyMCUzRCUyMG91dHB1dHMlNUIlMEElMjAlMjAlMjAlMjAwJTBBJTVEJTIwJTIwJTIzJTIwT3V0cHV0JTIwaGFzJTIwc2hhcGUlMjAlNUJ0YXJnZXRfbWFwcGluZy5zaXplKDApJTJDJTIwdGFyZ2V0X21hcHBpbmcuc2l6ZSgxKSUyQyUyMGNvbmZpZy52b2NhYl9zaXplJTVE",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"),T=n("Examples:"),h=c(),k(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);T=s(m,"Examples:"),m.forEach(t),h=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,T),g(l,h,m),w(f,l,m),y=!0},p:Pe,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){N(f.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),F(f,l)}}}function EM(L){let d,T,h,f,y,l,m,j,ke,_e,q,me,te,x,ve,B,he,Ee,H,re,le,G,de,we,O,Me,be,Z,Ne,ce,ie,C,U,ue,Y,ye,fe,V,Fe,Te,E,xe,P,D,pe,K,ge,$e,W,Xe,S,Le,oe,z,je,J,ne,Ce;return{c(){d=a("p"),T=n("TensorFlow models and layers in "),h=a("code"),f=n("transformers"),y=n(" accept two formats as input:"),l=c(),m=a("ul"),j=a("li"),ke=n("having all inputs as keyword arguments (like PyTorch models), or"),_e=c(),q=a("li"),me=n("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),x=a("p"),ve=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 `),B=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 `),H=a("code"),re=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a("code"),de=n("fit()"),we=n(" and "),O=a("code"),Me=n("predict()"),be=n(`, such as when creating your own layers or models with
the Keras `),Z=a("code"),Ne=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(),C=a("ul"),U=a("li"),ue=n("a single Tensor with "),Y=a("code"),ye=n("input_ids"),fe=n(" only and nothing else: "),V=a("code"),Fe=n("model(input_ids)"),Te=c(),E=a("li"),xe=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a("code"),D=n("model([input_ids, attention_mask])"),pe=n(" or "),K=a("code"),ge=n("model([input_ids, attention_mask, token_type_ids])"),$e=c(),W=a("li"),Xe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a("code"),Le=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=c(),z=a("p"),je=n(`Note that when creating models and layers with
`),J=a("a"),ne=n("subclassing"),Ce=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(b){d=r(b,"P",{});var $=i(d);T=s($,"TensorFlow models and layers in "),h=r($,"CODE",{});var Je=i(h);f=s(Je,"transformers"),Je.forEach(t),y=s($," accept two formats as input:"),$.forEach(t),l=p(b),m=r(b,"UL",{});var se=i(m);j=r(se,"LI",{});var Ie=i(j);ke=s(Ie,"having all inputs as keyword arguments (like PyTorch models), or"),Ie.forEach(t),_e=p(se),q=r(se,"LI",{});var qe=i(q);me=s(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),se.forEach(t),te=p(b),x=r(b,"P",{});var X=i(x);ve=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 `),B=r(X,"CODE",{});var We=i(B);he=s(We,"model.fit()"),We.forEach(t),Ee=s(X,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),H=r(X,"CODE",{});var Ae=i(H);re=s(Ae,"model.fit()"),Ae.forEach(t),le=s(X,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=r(X,"CODE",{});var Ze=i(G);de=s(Ze,"fit()"),Ze.forEach(t),we=s(X," and "),O=r(X,"CODE",{});var Ue=i(O);Me=s(Ue,"predict()"),Ue.forEach(t),be=s(X,`, such as when creating your own layers or models with
the Keras `),Z=r(X,"CODE",{});var Se=i(Z);Ne=s(Se,"Functional"),Se.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(b),C=r(b,"UL",{});var A=i(C);U=r(A,"LI",{});var Q=i(U);ue=s(Q,"a single Tensor with "),Y=r(Q,"CODE",{});var Be=i(Y);ye=s(Be,"input_ids"),Be.forEach(t),fe=s(Q," only and nothing else: "),V=r(Q,"CODE",{});var Ge=i(V);Fe=s(Ge,"model(input_ids)"),Ge.forEach(t),Q.forEach(t),Te=p(A),E=r(A,"LI",{});var R=i(E);xe=s(R,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=r(R,"CODE",{});var Oe=i(P);D=s(Oe,"model([input_ids, attention_mask])"),Oe.forEach(t),pe=s(R," or "),K=r(R,"CODE",{});var ze=i(K);ge=s(ze,"model([input_ids, attention_mask, token_type_ids])"),ze.forEach(t),R.forEach(t),$e=p(A),W=r(A,"LI",{});var ae=i(W);Xe=s(ae,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r(ae,"CODE",{});var Ve=i(S);Le=s(Ve,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ve.forEach(t),ae.forEach(t),A.forEach(t),oe=p(b),z=r(b,"P",{});var ee=i(z);je=s(ee,`Note that when creating models and layers with
`),J=r(ee,"A",{href:!0,rel:!0});var Qe=i(J);ne=s(Qe,"subclassing"),Qe.forEach(t),Ce=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(J,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(J,"rel","nofollow")},m(b,$){g(b,d,$),e(d,T),e(d,h),e(h,f),e(d,y),g(b,l,$),g(b,m,$),e(m,j),e(j,ke),e(m,_e),e(m,q),e(q,me),g(b,te,$),g(b,x,$),e(x,ve),e(x,B),e(B,he),e(x,Ee),e(x,H),e(H,re),e(x,le),e(x,G),e(G,de),e(x,we),e(x,O),e(O,Me),e(x,be),e(x,Z),e(Z,Ne),e(x,ce),g(b,ie,$),g(b,C,$),e(C,U),e(U,ue),e(U,Y),e(Y,ye),e(U,fe),e(U,V),e(V,Fe),e(C,Te),e(C,E),e(E,xe),e(E,P),e(P,D),e(E,pe),e(E,K),e(K,ge),e(C,$e),e(C,W),e(W,Xe),e(W,S),e(S,Le),g(b,oe,$),g(b,z,$),e(z,je),e(z,J),e(J,ne),e(z,Ce)},d(b){b&&t(d),b&&t(l),b&&t(m),b&&t(te),b&&t(x),b&&t(ie),b&&t(C),b&&t(oe),b&&t(z)}}}function UM(L){let d,T,h,f,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),y=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);T=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var j=i(h);f=s(j,"Module"),j.forEach(t),y=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,T),e(d,h),e(h,f),e(d,y)},d(l){l&&t(d)}}}function zM(L){let d,T,h,f,y;return f=new De({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlhMTmV0Rm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeGxuZXQtYmFzZS1jYXNlZCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGWExOZXRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJ4bG5ldC1iYXNlLWNhc2VkJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEElMEFsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBJTBBcHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwaW50KHRmLm1hdGguYXJnbWF4KGxvZ2l0cyUyQyUyMGF4aXMlM0QtMSklNUIwJTVEKQ==",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"),T=n("Example:"),h=c(),k(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);T=s(m,"Example:"),m.forEach(t),h=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,T),g(l,h,m),w(f,l,m),y=!0},p:Pe,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){N(f.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),F(f,l)}}}function JM(L){let d,T;return d=new De({props:{code:"JTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwVEZYTE5ldEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMnhsbmV0LWJhc2UtY2FzZWQlMjIlMkMlMjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyklMEElMEFsYWJlbHMlMjAlM0QlMjB0Zi5jb25zdGFudCgxKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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(){k(d.$$.fragment)},l(h){v(d.$$.fragment,h)},m(h,f){w(d,h,f),T=!0},p:Pe,i(h){T||(M(d.$$.fragment,h),T=!0)},o(h){N(d.$$.fragment,h),T=!1},d(h){F(d,h)}}}function IM(L){let d,T,h,f,y,l,m,j,ke,_e,q,me,te,x,ve,B,he,Ee,H,re,le,G,de,we,O,Me,be,Z,Ne,ce,ie,C,U,ue,Y,ye,fe,V,Fe,Te,E,xe,P,D,pe,K,ge,$e,W,Xe,S,Le,oe,z,je,J,ne,Ce;return{c(){d=a("p"),T=n("TensorFlow models and layers in "),h=a("code"),f=n("transformers"),y=n(" accept two formats as input:"),l=c(),m=a("ul"),j=a("li"),ke=n("having all inputs as keyword arguments (like PyTorch models), or"),_e=c(),q=a("li"),me=n("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),x=a("p"),ve=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 `),B=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 `),H=a("code"),re=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a("code"),de=n("fit()"),we=n(" and "),O=a("code"),Me=n("predict()"),be=n(`, such as when creating your own layers or models with
the Keras `),Z=a("code"),Ne=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(),C=a("ul"),U=a("li"),ue=n("a single Tensor with "),Y=a("code"),ye=n("input_ids"),fe=n(" only and nothing else: "),V=a("code"),Fe=n("model(input_ids)"),Te=c(),E=a("li"),xe=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a("code"),D=n("model([input_ids, attention_mask])"),pe=n(" or "),K=a("code"),ge=n("model([input_ids, attention_mask, token_type_ids])"),$e=c(),W=a("li"),Xe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a("code"),Le=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=c(),z=a("p"),je=n(`Note that when creating models and layers with
`),J=a("a"),ne=n("subclassing"),Ce=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(b){d=r(b,"P",{});var $=i(d);T=s($,"TensorFlow models and layers in "),h=r($,"CODE",{});var Je=i(h);f=s(Je,"transformers"),Je.forEach(t),y=s($," accept two formats as input:"),$.forEach(t),l=p(b),m=r(b,"UL",{});var se=i(m);j=r(se,"LI",{});var Ie=i(j);ke=s(Ie,"having all inputs as keyword arguments (like PyTorch models), or"),Ie.forEach(t),_e=p(se),q=r(se,"LI",{});var qe=i(q);me=s(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),se.forEach(t),te=p(b),x=r(b,"P",{});var X=i(x);ve=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 `),B=r(X,"CODE",{});var We=i(B);he=s(We,"model.fit()"),We.forEach(t),Ee=s(X,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),H=r(X,"CODE",{});var Ae=i(H);re=s(Ae,"model.fit()"),Ae.forEach(t),le=s(X,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=r(X,"CODE",{});var Ze=i(G);de=s(Ze,"fit()"),Ze.forEach(t),we=s(X," and "),O=r(X,"CODE",{});var Ue=i(O);Me=s(Ue,"predict()"),Ue.forEach(t),be=s(X,`, such as when creating your own layers or models with
the Keras `),Z=r(X,"CODE",{});var Se=i(Z);Ne=s(Se,"Functional"),Se.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(b),C=r(b,"UL",{});var A=i(C);U=r(A,"LI",{});var Q=i(U);ue=s(Q,"a single Tensor with "),Y=r(Q,"CODE",{});var Be=i(Y);ye=s(Be,"input_ids"),Be.forEach(t),fe=s(Q," only and nothing else: "),V=r(Q,"CODE",{});var Ge=i(V);Fe=s(Ge,"model(input_ids)"),Ge.forEach(t),Q.forEach(t),Te=p(A),E=r(A,"LI",{});var R=i(E);xe=s(R,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=r(R,"CODE",{});var Oe=i(P);D=s(Oe,"model([input_ids, attention_mask])"),Oe.forEach(t),pe=s(R," or "),K=r(R,"CODE",{});var ze=i(K);ge=s(ze,"model([input_ids, attention_mask, token_type_ids])"),ze.forEach(t),R.forEach(t),$e=p(A),W=r(A,"LI",{});var ae=i(W);Xe=s(ae,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r(ae,"CODE",{});var Ve=i(S);Le=s(Ve,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ve.forEach(t),ae.forEach(t),A.forEach(t),oe=p(b),z=r(b,"P",{});var ee=i(z);je=s(ee,`Note that when creating models and layers with
`),J=r(ee,"A",{href:!0,rel:!0});var Qe=i(J);ne=s(Qe,"subclassing"),Qe.forEach(t),Ce=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(J,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(J,"rel","nofollow")},m(b,$){g(b,d,$),e(d,T),e(d,h),e(h,f),e(d,y),g(b,l,$),g(b,m,$),e(m,j),e(j,ke),e(m,_e),e(m,q),e(q,me),g(b,te,$),g(b,x,$),e(x,ve),e(x,B),e(B,he),e(x,Ee),e(x,H),e(H,re),e(x,le),e(x,G),e(G,de),e(x,we),e(x,O),e(O,Me),e(x,be),e(x,Z),e(Z,Ne),e(x,ce),g(b,ie,$),g(b,C,$),e(C,U),e(U,ue),e(U,Y),e(Y,ye),e(U,fe),e(U,V),e(V,Fe),e(C,Te),e(C,E),e(E,xe),e(E,P),e(P,D),e(E,pe),e(E,K),e(K,ge),e(C,$e),e(C,W),e(W,Xe),e(W,S),e(S,Le),g(b,oe,$),g(b,z,$),e(z,je),e(z,J),e(J,ne),e(z,Ce)},d(b){b&&t(d),b&&t(l),b&&t(m),b&&t(te),b&&t(x),b&&t(ie),b&&t(C),b&&t(oe),b&&t(z)}}}function qM(L){let d,T,h,f,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),y=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);T=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var j=i(h);f=s(j,"Module"),j.forEach(t),y=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,T),e(d,h),e(h,f),e(d,y)},d(l){l&&t(d)}}}function WM(L){let d,T,h,f,y;return f=new De({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlhMTmV0Rm9yTXVsdGlwbGVDaG9pY2UlMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbmV0LWJhc2UtY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBURlhMTmV0Rm9yTXVsdGlwbGVDaG9pY2UuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbmV0LWJhc2UtY2FzZWQlMjIpJTBBJTBBcHJvbXB0JTIwJTNEJTIwJTIySW4lMjBJdGFseSUyQyUyMHBpenphJTIwc2VydmVkJTIwaW4lMjBmb3JtYWwlMjBzZXR0aW5ncyUyQyUyMHN1Y2glMjBhcyUyMGF0JTIwYSUyMHJlc3RhdXJhbnQlMkMlMjBpcyUyMHByZXNlbnRlZCUyMHVuc2xpY2VkLiUyMiUwQWNob2ljZTAlMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aXRoJTIwYSUyMGZvcmslMjBhbmQlMjBhJTIwa25pZmUuJTIyJTBBY2hvaWNlMSUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdoaWxlJTIwaGVsZCUyMGluJTIwdGhlJTIwaGFuZC4lMjIlMEElMEFlbmNvZGluZyUyMCUzRCUyMHRva2VuaXplciglNUJwcm9tcHQlMkMlMjBwcm9tcHQlNUQlMkMlMjAlNUJjaG9pY2UwJTJDJTIwY2hvaWNlMSU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIlMkMlMjBwYWRkaW5nJTNEVHJ1ZSklMEFpbnB1dHMlMjAlM0QlMjAlN0JrJTNBJTIwdGYuZXhwYW5kX2RpbXModiUyQyUyMDApJTIwZm9yJTIwayUyQyUyMHYlMjBpbiUyMGVuY29kaW5nLml0ZW1zKCklN0QlMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoaW5wdXRzKSUyMCUyMCUyMyUyMGJhdGNoJTIwc2l6ZSUyMGlzJTIwMSUwQSUwQSUyMyUyMHRoZSUyMGxpbmVhciUyMGNsYXNzaWZpZXIlMjBzdGlsbCUyMG5lZWRzJTIwdG8lMjBiZSUyMHRyYWluZWQlMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",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"),T=n("Example:"),h=c(),k(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);T=s(m,"Example:"),m.forEach(t),h=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,T),g(l,h,m),w(f,l,m),y=!0},p:Pe,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){N(f.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),F(f,l)}}}function AM(L){let d,T,h,f,y,l,m,j,ke,_e,q,me,te,x,ve,B,he,Ee,H,re,le,G,de,we,O,Me,be,Z,Ne,ce,ie,C,U,ue,Y,ye,fe,V,Fe,Te,E,xe,P,D,pe,K,ge,$e,W,Xe,S,Le,oe,z,je,J,ne,Ce;return{c(){d=a("p"),T=n("TensorFlow models and layers in "),h=a("code"),f=n("transformers"),y=n(" accept two formats as input:"),l=c(),m=a("ul"),j=a("li"),ke=n("having all inputs as keyword arguments (like PyTorch models), or"),_e=c(),q=a("li"),me=n("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),x=a("p"),ve=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 `),B=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 `),H=a("code"),re=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a("code"),de=n("fit()"),we=n(" and "),O=a("code"),Me=n("predict()"),be=n(`, such as when creating your own layers or models with
the Keras `),Z=a("code"),Ne=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(),C=a("ul"),U=a("li"),ue=n("a single Tensor with "),Y=a("code"),ye=n("input_ids"),fe=n(" only and nothing else: "),V=a("code"),Fe=n("model(input_ids)"),Te=c(),E=a("li"),xe=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a("code"),D=n("model([input_ids, attention_mask])"),pe=n(" or "),K=a("code"),ge=n("model([input_ids, attention_mask, token_type_ids])"),$e=c(),W=a("li"),Xe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a("code"),Le=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=c(),z=a("p"),je=n(`Note that when creating models and layers with
`),J=a("a"),ne=n("subclassing"),Ce=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(b){d=r(b,"P",{});var $=i(d);T=s($,"TensorFlow models and layers in "),h=r($,"CODE",{});var Je=i(h);f=s(Je,"transformers"),Je.forEach(t),y=s($," accept two formats as input:"),$.forEach(t),l=p(b),m=r(b,"UL",{});var se=i(m);j=r(se,"LI",{});var Ie=i(j);ke=s(Ie,"having all inputs as keyword arguments (like PyTorch models), or"),Ie.forEach(t),_e=p(se),q=r(se,"LI",{});var qe=i(q);me=s(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),se.forEach(t),te=p(b),x=r(b,"P",{});var X=i(x);ve=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 `),B=r(X,"CODE",{});var We=i(B);he=s(We,"model.fit()"),We.forEach(t),Ee=s(X,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),H=r(X,"CODE",{});var Ae=i(H);re=s(Ae,"model.fit()"),Ae.forEach(t),le=s(X,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=r(X,"CODE",{});var Ze=i(G);de=s(Ze,"fit()"),Ze.forEach(t),we=s(X," and "),O=r(X,"CODE",{});var Ue=i(O);Me=s(Ue,"predict()"),Ue.forEach(t),be=s(X,`, such as when creating your own layers or models with
the Keras `),Z=r(X,"CODE",{});var Se=i(Z);Ne=s(Se,"Functional"),Se.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(b),C=r(b,"UL",{});var A=i(C);U=r(A,"LI",{});var Q=i(U);ue=s(Q,"a single Tensor with "),Y=r(Q,"CODE",{});var Be=i(Y);ye=s(Be,"input_ids"),Be.forEach(t),fe=s(Q," only and nothing else: "),V=r(Q,"CODE",{});var Ge=i(V);Fe=s(Ge,"model(input_ids)"),Ge.forEach(t),Q.forEach(t),Te=p(A),E=r(A,"LI",{});var R=i(E);xe=s(R,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=r(R,"CODE",{});var Oe=i(P);D=s(Oe,"model([input_ids, attention_mask])"),Oe.forEach(t),pe=s(R," or "),K=r(R,"CODE",{});var ze=i(K);ge=s(ze,"model([input_ids, attention_mask, token_type_ids])"),ze.forEach(t),R.forEach(t),$e=p(A),W=r(A,"LI",{});var ae=i(W);Xe=s(ae,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r(ae,"CODE",{});var Ve=i(S);Le=s(Ve,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ve.forEach(t),ae.forEach(t),A.forEach(t),oe=p(b),z=r(b,"P",{});var ee=i(z);je=s(ee,`Note that when creating models and layers with
`),J=r(ee,"A",{href:!0,rel:!0});var Qe=i(J);ne=s(Qe,"subclassing"),Qe.forEach(t),Ce=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(J,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(J,"rel","nofollow")},m(b,$){g(b,d,$),e(d,T),e(d,h),e(h,f),e(d,y),g(b,l,$),g(b,m,$),e(m,j),e(j,ke),e(m,_e),e(m,q),e(q,me),g(b,te,$),g(b,x,$),e(x,ve),e(x,B),e(B,he),e(x,Ee),e(x,H),e(H,re),e(x,le),e(x,G),e(G,de),e(x,we),e(x,O),e(O,Me),e(x,be),e(x,Z),e(Z,Ne),e(x,ce),g(b,ie,$),g(b,C,$),e(C,U),e(U,ue),e(U,Y),e(Y,ye),e(U,fe),e(U,V),e(V,Fe),e(C,Te),e(C,E),e(E,xe),e(E,P),e(P,D),e(E,pe),e(E,K),e(K,ge),e(C,$e),e(C,W),e(W,Xe),e(W,S),e(S,Le),g(b,oe,$),g(b,z,$),e(z,je),e(z,J),e(J,ne),e(z,Ce)},d(b){b&&t(d),b&&t(l),b&&t(m),b&&t(te),b&&t(x),b&&t(ie),b&&t(C),b&&t(oe),b&&t(z)}}}function ZM(L){let d,T,h,f,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),y=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);T=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var j=i(h);f=s(j,"Module"),j.forEach(t),y=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,T),e(d,h),e(h,f),e(d,y)},d(l){l&&t(d)}}}function SM(L){let d,T,h,f,y;return f=new De({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlhMTmV0Rm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRlbnNvcmZsb3clMjBhcyUyMHRmJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyeGxuZXQtYmFzZS1jYXNlZCUyMiklMEFtb2RlbCUyMCUzRCUyMFRGWExOZXRGb3JUb2tlbkNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJ4bG5ldC1iYXNlLWNhc2VkJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMEElMjAlMjAlMjAlMjAlMjJIdWdnaW5nRmFjZSUyMGlzJTIwYSUyMGNvbXBhbnklMjBiYXNlZCUyMGluJTIwUGFyaXMlMjBhbmQlMjBOZXclMjBZb3JrJTIyJTJDJTIwYWRkX3NwZWNpYWxfdG9rZW5zJTNERmFsc2UlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyJTBBKSUwQSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEFwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTIwJTNEJTIwdGYubWF0aC5hcmdtYXgobG9naXRzJTJDJTIwYXhpcyUzRC0xKSUwQSUwQSUyMyUyME5vdGUlMjB0aGF0JTIwdG9rZW5zJTIwYXJlJTIwY2xhc3NpZmllZCUyMHJhdGhlciUyMHRoZW4lMjBpbnB1dCUyMHdvcmRzJTIwd2hpY2glMjBtZWFucyUyMHRoYXQlMEElMjMlMjB0aGVyZSUyMG1pZ2h0JTIwYmUlMjBtb3JlJTIwcHJlZGljdGVkJTIwdG9rZW4lMjBjbGFzc2VzJTIwdGhhbiUyMHdvcmRzLiUwQSUyMyUyME11bHRpcGxlJTIwdG9rZW4lMjBjbGFzc2VzJTIwbWlnaHQlMjBhY2NvdW50JTIwZm9yJTIwdGhlJTIwc2FtZSUyMHdvcmQlMEFwcmVkaWN0ZWRfdG9rZW5zX2NsYXNzZXMlMjAlM0QlMjAlNUJtb2RlbC5jb25maWcuaWQybGFiZWwlNUJ0JTVEJTIwZm9yJTIwdCUyMGluJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyU1QjAlNUQubnVtcHkoKS50b2xpc3QoKSU1RA==",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"),T=n("Example:"),h=c(),k(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);T=s(m,"Example:"),m.forEach(t),h=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,T),g(l,h,m),w(f,l,m),y=!0},p:Pe,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){N(f.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),F(f,l)}}}function BM(L){let d,T;return d=new De({props:{code:"bGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKS5sb3NzKQ==",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(){k(d.$$.fragment)},l(h){v(d.$$.fragment,h)},m(h,f){w(d,h,f),T=!0},p:Pe,i(h){T||(M(d.$$.fragment,h),T=!0)},o(h){N(d.$$.fragment,h),T=!1},d(h){F(d,h)}}}function GM(L){let d,T,h,f,y,l,m,j,ke,_e,q,me,te,x,ve,B,he,Ee,H,re,le,G,de,we,O,Me,be,Z,Ne,ce,ie,C,U,ue,Y,ye,fe,V,Fe,Te,E,xe,P,D,pe,K,ge,$e,W,Xe,S,Le,oe,z,je,J,ne,Ce;return{c(){d=a("p"),T=n("TensorFlow models and layers in "),h=a("code"),f=n("transformers"),y=n(" accept two formats as input:"),l=c(),m=a("ul"),j=a("li"),ke=n("having all inputs as keyword arguments (like PyTorch models), or"),_e=c(),q=a("li"),me=n("having all inputs as a list, tuple or dict in the first positional argument."),te=c(),x=a("p"),ve=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 `),B=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 `),H=a("code"),re=n("model.fit()"),le=n(` supports! If, however, you want to use the second
format outside of Keras methods like `),G=a("code"),de=n("fit()"),we=n(" and "),O=a("code"),Me=n("predict()"),be=n(`, such as when creating your own layers or models with
the Keras `),Z=a("code"),Ne=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(),C=a("ul"),U=a("li"),ue=n("a single Tensor with "),Y=a("code"),ye=n("input_ids"),fe=n(" only and nothing else: "),V=a("code"),Fe=n("model(input_ids)"),Te=c(),E=a("li"),xe=n(`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=a("code"),D=n("model([input_ids, attention_mask])"),pe=n(" or "),K=a("code"),ge=n("model([input_ids, attention_mask, token_type_ids])"),$e=c(),W=a("li"),Xe=n(`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=a("code"),Le=n('model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),oe=c(),z=a("p"),je=n(`Note that when creating models and layers with
`),J=a("a"),ne=n("subclassing"),Ce=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(b){d=r(b,"P",{});var $=i(d);T=s($,"TensorFlow models and layers in "),h=r($,"CODE",{});var Je=i(h);f=s(Je,"transformers"),Je.forEach(t),y=s($," accept two formats as input:"),$.forEach(t),l=p(b),m=r(b,"UL",{});var se=i(m);j=r(se,"LI",{});var Ie=i(j);ke=s(Ie,"having all inputs as keyword arguments (like PyTorch models), or"),Ie.forEach(t),_e=p(se),q=r(se,"LI",{});var qe=i(q);me=s(qe,"having all inputs as a list, tuple or dict in the first positional argument."),qe.forEach(t),se.forEach(t),te=p(b),x=r(b,"P",{});var X=i(x);ve=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 `),B=r(X,"CODE",{});var We=i(B);he=s(We,"model.fit()"),We.forEach(t),Ee=s(X,` things should \u201Cjust work\u201D for you - just
pass your inputs and labels in any format that `),H=r(X,"CODE",{});var Ae=i(H);re=s(Ae,"model.fit()"),Ae.forEach(t),le=s(X,` supports! If, however, you want to use the second
format outside of Keras methods like `),G=r(X,"CODE",{});var Ze=i(G);de=s(Ze,"fit()"),Ze.forEach(t),we=s(X," and "),O=r(X,"CODE",{});var Ue=i(O);Me=s(Ue,"predict()"),Ue.forEach(t),be=s(X,`, such as when creating your own layers or models with
the Keras `),Z=r(X,"CODE",{});var Se=i(Z);Ne=s(Se,"Functional"),Se.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(b),C=r(b,"UL",{});var A=i(C);U=r(A,"LI",{});var Q=i(U);ue=s(Q,"a single Tensor with "),Y=r(Q,"CODE",{});var Be=i(Y);ye=s(Be,"input_ids"),Be.forEach(t),fe=s(Q," only and nothing else: "),V=r(Q,"CODE",{});var Ge=i(V);Fe=s(Ge,"model(input_ids)"),Ge.forEach(t),Q.forEach(t),Te=p(A),E=r(A,"LI",{});var R=i(E);xe=s(R,`a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
`),P=r(R,"CODE",{});var Oe=i(P);D=s(Oe,"model([input_ids, attention_mask])"),Oe.forEach(t),pe=s(R," or "),K=r(R,"CODE",{});var ze=i(K);ge=s(ze,"model([input_ids, attention_mask, token_type_ids])"),ze.forEach(t),R.forEach(t),$e=p(A),W=r(A,"LI",{});var ae=i(W);Xe=s(ae,`a dictionary with one or several input Tensors associated to the input names given in the docstring:
`),S=r(ae,"CODE",{});var Ve=i(S);Le=s(Ve,'model({"input_ids": input_ids, "token_type_ids": token_type_ids})'),Ve.forEach(t),ae.forEach(t),A.forEach(t),oe=p(b),z=r(b,"P",{});var ee=i(z);je=s(ee,`Note that when creating models and layers with
`),J=r(ee,"A",{href:!0,rel:!0});var Qe=i(J);ne=s(Qe,"subclassing"),Qe.forEach(t),Ce=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(J,"href","https://keras.io/guides/making_new_layers_and_models_via_subclassing/"),u(J,"rel","nofollow")},m(b,$){g(b,d,$),e(d,T),e(d,h),e(h,f),e(d,y),g(b,l,$),g(b,m,$),e(m,j),e(j,ke),e(m,_e),e(m,q),e(q,me),g(b,te,$),g(b,x,$),e(x,ve),e(x,B),e(B,he),e(x,Ee),e(x,H),e(H,re),e(x,le),e(x,G),e(G,de),e(x,we),e(x,O),e(O,Me),e(x,be),e(x,Z),e(Z,Ne),e(x,ce),g(b,ie,$),g(b,C,$),e(C,U),e(U,ue),e(U,Y),e(Y,ye),e(U,fe),e(U,V),e(V,Fe),e(C,Te),e(C,E),e(E,xe),e(E,P),e(P,D),e(E,pe),e(E,K),e(K,ge),e(C,$e),e(C,W),e(W,Xe),e(W,S),e(S,Le),g(b,oe,$),g(b,z,$),e(z,je),e(z,J),e(J,ne),e(z,Ce)},d(b){b&&t(d),b&&t(l),b&&t(m),b&&t(te),b&&t(x),b&&t(ie),b&&t(C),b&&t(oe),b&&t(z)}}}function OM(L){let d,T,h,f,y;return{c(){d=a("p"),T=n("Although the recipe for forward pass needs to be defined within this function, one should call the "),h=a("code"),f=n("Module"),y=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);T=s(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),h=r(m,"CODE",{});var j=i(h);f=s(j,"Module"),j.forEach(t),y=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,T),e(d,h),e(h,f),e(d,y)},d(l){l&&t(d)}}}function VM(L){let d,T,h,f,y;return f=new De({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlhMTmV0Rm9yUXVlc3Rpb25BbnN3ZXJpbmdTaW1wbGUlMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbmV0LWJhc2UtY2FzZWQlMjIpJTBBbW9kZWwlMjAlM0QlMjBURlhMTmV0Rm9yUXVlc3Rpb25BbnN3ZXJpbmdTaW1wbGUuZnJvbV9wcmV0cmFpbmVkKCUyMnhsbmV0LWJhc2UtY2FzZWQlMjIpJTBBJTBBcXVlc3Rpb24lMkMlMjB0ZXh0JTIwJTNEJTIwJTIyV2hvJTIwd2FzJTIwSmltJTIwSGVuc29uJTNGJTIyJTJDJTIwJTIySmltJTIwSGVuc29uJTIwd2FzJTIwYSUyMG5pY2UlMjBwdXBwZXQlMjIlMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIocXVlc3Rpb24lMkMlMjB0ZXh0JTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJ0ZiUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNEJTIwaW50KHRmLm1hdGguYXJnbWF4KG91dHB1dHMuc3RhcnRfbG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMGludCh0Zi5tYXRoLmFyZ21heChvdXRwdXRzLmVuZF9sb2dpdHMlMkMlMjBheGlzJTNELTEpJTVCMCU1RCklMEElMEFwcmVkaWN0X2Fuc3dlcl90b2tlbnMlMjAlM0QlMjBpbnB1dHMuaW5wdXRfaWRzJTVCMCUyQyUyMGFuc3dlcl9zdGFydF9pbmRleCUyMCUzQSUyMGFuc3dlcl9lbmRfaW5kZXglMjAlMkIlMjAxJTVE",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"),T=n("Example:"),h=c(),k(f.$$.fragment)},l(l){d=r(l,"P",{});var m=i(d);T=s(m,"Example:"),m.forEach(t),h=p(l),v(f.$$.fragment,l)},m(l,m){g(l,d,m),e(d,T),g(l,h,m),w(f,l,m),y=!0},p:Pe,i(l){y||(M(f.$$.fragment,l),y=!0)},o(l){N(f.$$.fragment,l),y=!1},d(l){l&&t(d),l&&t(h),F(f,l)}}}function QM(L){let d,T;return d=new De({props:{code:"JTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdGYuY29uc3RhbnQoJTVCMTQlNUQpJTBBdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRmLmNvbnN0YW50KCU1QjE1JTVEKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMHN0YXJ0X3Bvc2l0aW9ucyUzRHRhcmdldF9zdGFydF9pbmRleCUyQyUyMGVuZF9wb3NpdGlvbnMlM0R0YXJnZXRfZW5kX2luZGV4KSUwQWxvc3MlMjAlM0QlMjB0Zi5tYXRoLnJlZHVjZV9tZWFuKG91dHB1dHMubG9zcyk=",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(){k(d.$$.fragment)},l(h){v(d.$$.fragment,h)},m(h,f){w(d,h,f),T=!0},p:Pe,i(h){T||(M(d.$$.fragment,h),T=!0)},o(h){N(d.$$.fragment,h),T=!1},d(h){F(d,h)}}}function RM(L){let d,T,h,f,y,l,m,j,ke,_e,q,me,te,x,ve,B,he,Ee,H,re,le,G,de,we,O,Me,be,Z,Ne,ce,ie,C,U,ue,Y,ye,fe,V,Fe,Te,E,xe,P,D,pe,K,ge,$e,W,Xe,S,Le,oe,z,je,J,ne,Ce,b,$,Je,se,Ie,qe,X,We,Ae,Ze,Ue,Se,A,Q,Be,Ge,R,Oe,ze,ae,Ve,ee,Qe,Jm,ys,Im,qm,yc,oo,tn,hl,Ts,Wm,ul,Am,Tc,ft,fl,Vr,Zm,Sm,gl,Qr,Bm,Gm,_l,Rr,Om,Vm,bl,Hr,Qm,Rm,yl,Pr,Hm,kc,no,on,Tl,ks,Pm,kl,Dm,vc,kt,vs,Ym,At,Km,Dr,eh,th,Yr,oh,nh,ws,sh,ah,rh,so,ih,Kr,lh,dh,ei,ch,ph,mh,nn,wc,ao,sn,vl,Ms,hh,wl,uh,Mc,Ye,Ns,fh,Fs,gh,xs,_h,bh,yh,$s,Th,ti,kh,vh,wh,St,Xs,Mh,Ml,Nh,Fh,Ls,oi,xh,Nl,$h,Xh,ni,Lh,Fl,jh,Ch,an,js,Eh,Cs,Uh,xl,zh,Jh,Ih,wt,Es,qh,$l,Wh,Ah,rn,Zh,ro,Sh,Xl,Bh,Gh,Ll,Oh,Vh,Qh,si,Us,Nc,io,ln,jl,zs,Rh,Cl,Hh,Fc,rt,Js,Ph,lo,Dh,El,Yh,Kh,Is,eu,tu,ou,qs,nu,ai,su,au,ru,Bt,Ws,iu,Ul,lu,du,As,ri,cu,zl,pu,mu,ii,hu,Jl,uu,fu,Mt,Zs,gu,Il,_u,bu,dn,yu,co,Tu,ql,ku,vu,Wl,wu,Mu,xc,po,cn,Al,Ss,Nu,Zl,Fu,$c,mo,Bs,xu,Gs,$u,li,Xu,Lu,Xc,ho,Os,ju,Vs,Cu,di,Eu,Uu,Lc,uo,Qs,zu,Rs,Ju,ci,Iu,qu,jc,fo,Hs,Wu,Ps,Au,pi,Zu,Su,Cc,go,Ds,Bu,Ys,Gu,Sl,Ou,Vu,Ec,_o,Ks,Qu,ea,Ru,mi,Hu,Pu,Uc,bo,ta,Du,oa,Yu,hi,Ku,ef,zc,yo,na,tf,sa,of,ui,nf,sf,Jc,To,aa,af,ra,rf,fi,lf,df,Ic,ko,ia,cf,la,pf,gi,mf,hf,qc,vo,da,uf,ca,ff,_i,gf,_f,Wc,wo,pa,bf,ma,yf,Bl,Tf,kf,Ac,Mo,ha,vf,ua,wf,bi,Mf,Nf,Zc,No,pn,Gl,fa,Ff,Ol,xf,Sc,it,ga,$f,Vl,Xf,Lf,_a,jf,yi,Cf,Ef,Uf,ba,zf,ya,Jf,If,qf,Nt,Ta,Wf,Fo,Af,Ti,Zf,Sf,Ql,Bf,Gf,Of,mn,Vf,hn,Bc,xo,un,Rl,ka,Qf,Hl,Rf,Gc,lt,va,Hf,Pl,Pf,Df,wa,Yf,ki,Kf,eg,tg,Ma,og,Na,ng,sg,ag,Ft,Fa,rg,$o,ig,vi,lg,dg,Dl,cg,pg,mg,fn,hg,gn,Oc,Xo,_n,Yl,xa,ug,Kl,fg,Vc,dt,$a,gg,ed,_g,bg,Xa,yg,wi,Tg,kg,vg,La,wg,ja,Mg,Ng,Fg,gt,Ca,xg,Lo,$g,Mi,Xg,Lg,td,jg,Cg,Eg,bn,Ug,yn,zg,Tn,Qc,jo,kn,od,Ea,Jg,nd,Ig,Rc,ct,Ua,qg,sd,Wg,Ag,za,Zg,Ni,Sg,Bg,Gg,Ja,Og,Ia,Vg,Qg,Rg,xt,qa,Hg,Co,Pg,Fi,Dg,Yg,ad,Kg,e_,t_,vn,o_,wn,Hc,Eo,Mn,rd,Wa,n_,id,s_,Pc,pt,Aa,a_,ld,r_,i_,Za,l_,xi,d_,c_,p_,Sa,m_,Ba,h_,u_,f_,$t,Ga,g_,Uo,__,$i,b_,y_,dd,T_,k_,v_,Nn,w_,Fn,Dc,zo,xn,cd,Oa,M_,pd,N_,Yc,mt,Va,F_,Jo,x_,md,$_,X_,hd,L_,j_,C_,Qa,E_,Xi,U_,z_,J_,Ra,I_,Ha,q_,W_,A_,Xt,Pa,Z_,Io,S_,Li,B_,G_,ud,O_,V_,Q_,$n,R_,Xn,Kc,qo,Ln,fd,Da,H_,gd,P_,ep,ht,Ya,D_,Wo,Y_,_d,K_,eb,bd,tb,ob,nb,Ka,sb,ji,ab,rb,ib,er,lb,tr,db,cb,pb,Lt,or,mb,Ao,hb,Ci,ub,fb,yd,gb,_b,bb,jn,yb,Cn,tp,Zo,En,Td,nr,Tb,kd,kb,op,et,sr,vb,vd,wb,Mb,ar,Nb,Ei,Fb,xb,$b,rr,Xb,ir,Lb,jb,Cb,Un,Eb,jt,lr,Ub,So,zb,Ui,Jb,Ib,wd,qb,Wb,Ab,zn,Zb,Jn,np,Bo,In,Md,dr,Sb,Nd,Bb,sp,tt,cr,Gb,Fd,Ob,Vb,pr,Qb,zi,Rb,Hb,Pb,mr,Db,hr,Yb,Kb,ey,qn,ty,Ct,ur,oy,Go,ny,Ji,sy,ay,xd,ry,iy,ly,Wn,dy,An,ap,Oo,Zn,$d,fr,cy,Xd,py,rp,ot,gr,my,Ld,hy,uy,_r,fy,Ii,gy,_y,by,br,yy,yr,Ty,ky,vy,Sn,wy,_t,Tr,My,Vo,Ny,qi,Fy,xy,jd,$y,Xy,Ly,Bn,jy,Gn,Cy,On,ip,Qo,Vn,Cd,kr,Ey,Ed,Uy,lp,nt,vr,zy,Ud,Jy,Iy,wr,qy,Wi,Wy,Ay,Zy,Mr,Sy,Nr,By,Gy,Oy,Qn,Vy,Et,Fr,Qy,Ro,Ry,Ai,Hy,Py,zd,Dy,Yy,Ky,Rn,eT,Hn,dp,Ho,Pn,Jd,xr,tT,Id,oT,cp,st,$r,nT,qd,sT,aT,Xr,rT,Zi,iT,lT,dT,Lr,cT,jr,pT,mT,hT,Dn,uT,bt,Cr,fT,Po,gT,Si,_T,bT,Wd,yT,TT,kT,Yn,vT,Kn,wT,es,pp,Do,ts,Ad,Er,MT,Zd,NT,mp,at,Ur,FT,Yo,xT,Sd,$T,XT,Bd,LT,jT,CT,zr,ET,Bi,UT,zT,JT,Jr,IT,Ir,qT,WT,AT,os,ZT,yt,qr,ST,Ko,BT,Gi,GT,OT,Gd,VT,QT,RT,ns,HT,ss,PT,as,hp;return l=new Re({}),de=new Re({}),Ts=new Re({}),ks=new Re({}),vs=new I({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.30.0/en/model_doc/xlnet#transformers.XLNetModel">XLNetModel</a> or <a href="/docs/transformers/v4.30.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.30.0/src/transformers/models/xlnet/configuration_xlnet.py#L32"}}),nn=new He({props:{anchor:"transformers.XLNetConfig.example",$$slots:{default:[dM]},$$scope:{ctx:L}}}),Ms=new Re({}),Ns=new I({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.30.0/src/transformers/models/xlnet/tokenization_xlnet.py#L53"}}),Xs=new I({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.30.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>
`}}),js=new I({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.30.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 I({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.30.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 He({props:{anchor:"transformers.XLNetTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[cM]},$$scope:{ctx:L}}}),Us=new I({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.30.0/src/transformers/models/xlnet/tokenization_xlnet.py#L381"}}),zs=new Re({}),Js=new I({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.30.0/src/transformers/models/xlnet/tokenization_xlnet_fast.py#L63"}}),Ws=new I({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.30.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>
`}}),Zs=new I({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.30.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 He({props:{anchor:"transformers.XLNetTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[pM]},$$scope:{ctx:L}}}),Ss=new Re({}),Bs=new I({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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L579"}}),Os=new I({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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L613"}}),Qs=new I({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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L650"}}),Hs=new I({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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L718"}}),Ds=new I({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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L684"}}),Ks=new I({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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L754"}}),ta=new I({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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L791"}}),na=new I({props:{name:"class transformers.models.xlnet.modeling_tf_xlnet.TFXLNetModelOutput",anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetModelOutput",parameters:[{name:"last_hidden_state",val:": tf.Tensor = None"},{name:"mems",val:": List[tf.Tensor] | None = None"},{name:"hidden_states",val:": Tuple[tf.Tensor] | None = None"},{name:"attentions",val:": Tuple[tf.Tensor] | None = 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.30.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L802"}}),aa=new I({props:{name:"class transformers.models.xlnet.modeling_tf_xlnet.TFXLNetLMHeadModelOutput",anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetLMHeadModelOutput",parameters:[{name:"loss",val:": tf.Tensor | None = None"},{name:"logits",val:": tf.Tensor = None"},{name:"mems",val:": List[tf.Tensor] | None = None"},{name:"hidden_states",val:": Tuple[tf.Tensor] | None = None"},{name:"attentions",val:": Tuple[tf.Tensor] | None = 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.30.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L836"}}),ia=new I({props:{name:"class transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForSequenceClassificationOutput",anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForSequenceClassificationOutput",parameters:[{name:"loss",val:": tf.Tensor | None = None"},{name:"logits",val:": tf.Tensor = None"},{name:"mems",val:": List[tf.Tensor] | None = None"},{name:"hidden_states",val:": Tuple[tf.Tensor] | None = None"},{name:"attentions",val:": Tuple[tf.Tensor] | None = 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.30.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L873"}}),da=new I({props:{name:"class transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForMultipleChoiceOutput",anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForMultipleChoiceOutput",parameters:[{name:"loss",val:": tf.Tensor | None = None"},{name:"logits",val:": tf.Tensor = None"},{name:"mems",val:": List[tf.Tensor] | None = None"},{name:"hidden_states",val:": Tuple[tf.Tensor] | None = None"},{name:"attentions",val:": Tuple[tf.Tensor] | None = 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.30.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L941"}}),pa=new I({props:{name:"class transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForTokenClassificationOutput",anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForTokenClassificationOutput",parameters:[{name:"loss",val:": tf.Tensor | None = None"},{name:"logits",val:": tf.Tensor = None"},{name:"mems",val:": List[tf.Tensor] | None = None"},{name:"hidden_states",val:": Tuple[tf.Tensor] | None = None"},{name:"attentions",val:": Tuple[tf.Tensor] | None = 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.30.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L907"}}),ha=new I({props:{name:"class transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForQuestionAnsweringSimpleOutput",anchor:"transformers.models.xlnet.modeling_tf_xlnet.TFXLNetForQuestionAnsweringSimpleOutput",parameters:[{name:"loss",val:": tf.Tensor | None = None"},{name:"start_logits",val:": tf.Tensor = None"},{name:"end_logits",val:": tf.Tensor = None"},{name:"mems",val:": List[tf.Tensor] | None = None"},{name:"hidden_states",val:": Tuple[tf.Tensor] | None = None"},{name:"attentions",val:": Tuple[tf.Tensor] | None = 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.30.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L977"}}),fa=new Re({}),ga=new I({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.30.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.30.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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L931"}}),Ta=new I({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L1059",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.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 Ke({props:{$$slots:{default:[mM]},$$scope:{ctx:L}}}),hn=new He({props:{anchor:"transformers.XLNetModel.forward.example",$$slots:{default:[hM]},$$scope:{ctx:L}}}),ka=new Re({}),va=new I({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.30.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.30.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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L1294"}}),Fa=new I({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L1356",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.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 Ke({props:{$$slots:{default:[uM]},$$scope:{ctx:L}}}),gn=new He({props:{anchor:"transformers.XLNetLMHeadModel.forward.example",$$slots:{default:[fM]},$$scope:{ctx:L}}}),xa=new Re({}),$a=new I({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.30.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.30.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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L1500"}}),Ca=new I({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L1513",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.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>
`}}),bn=new Ke({props:{$$slots:{default:[gM]},$$scope:{ctx:L}}}),yn=new He({props:{anchor:"transformers.XLNetForSequenceClassification.forward.example",$$slots:{default:[_M]},$$scope:{ctx:L}}}),Tn=new He({props:{anchor:"transformers.XLNetForSequenceClassification.forward.example-2",$$slots:{default:[bM]},$$scope:{ctx:L}}}),Ea=new Re({}),Ua=new I({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.30.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.30.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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L1696"}}),qa=new I({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L1707",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.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>
`}}),vn=new Ke({props:{$$slots:{default:[yM]},$$scope:{ctx:L}}}),wn=new He({props:{anchor:"transformers.XLNetForMultipleChoice.forward.example",$$slots:{default:[TM]},$$scope:{ctx:L}}}),Wa=new Re({}),Aa=new I({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.30.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.30.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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L1609"}}),Ga=new I({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L1620",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.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>
`}}),Nn=new Ke({props:{$$slots:{default:[kM]},$$scope:{ctx:L}}}),Fn=new He({props:{anchor:"transformers.XLNetForTokenClassification.forward.example",$$slots:{default:[vM]},$$scope:{ctx:L}}}),Oa=new Re({}),Va=new I({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.30.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.30.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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L1799"}}),Pa=new I({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L1810",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.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>
`}}),$n=new Ke({props:{$$slots:{default:[wM]},$$scope:{ctx:L}}}),Xn=new He({props:{anchor:"transformers.XLNetForQuestionAnsweringSimple.forward.example",$$slots:{default:[MM]},$$scope:{ctx:L}}}),Da=new Re({}),Ya=new I({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.30.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.30.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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L1909"}}),or=new I({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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/xlnet/modeling_xlnet.py#L1923",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.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>
`}}),jn=new Ke({props:{$$slots:{default:[NM]},$$scope:{ctx:L}}}),Cn=new He({props:{anchor:"transformers.XLNetForQuestionAnswering.forward.example",$$slots:{default:[FM]},$$scope:{ctx:L}}}),nr=new Re({}),sr=new I({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.30.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.30.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.30.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1132"}}),Un=new Ke({props:{$$slots:{default:[xM]},$$scope:{ctx:L}}}),lr=new I({props:{name:"call",anchor:"transformers.TFXLNetModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"mems",val:": np.ndarray | tf.Tensor | None = None"},{name:"perm_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"target_mapping",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"input_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"use_mems",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": 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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1137",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.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>
`}}),zn=new Ke({props:{$$slots:{default:[$M]},$$scope:{ctx:L}}}),Jn=new He({props:{anchor:"transformers.TFXLNetModel.call.example",$$slots:{default:[XM]},$$scope:{ctx:L}}}),dr=new Re({}),cr=new I({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.30.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.30.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.30.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1187"}}),qn=new Ke({props:{$$slots:{default:[LM]},$$scope:{ctx:L}}}),ur=new I({props:{name:"call",anchor:"transformers.TFXLNetLMHeadModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"mems",val:": np.ndarray | tf.Tensor | None = None"},{name:"perm_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"target_mapping",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"input_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"use_mems",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = 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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1241",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.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>
`}}),Wn=new Ke({props:{$$slots:{default:[jM]},$$scope:{ctx:L}}}),An=new He({props:{anchor:"transformers.TFXLNetLMHeadModel.call.example",$$slots:{default:[CM]},$$scope:{ctx:L}}}),fr=new Re({}),gr=new I({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.30.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.30.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.30.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1347"}}),Sn=new Ke({props:{$$slots:{default:[EM]},$$scope:{ctx:L}}}),Tr=new I({props:{name:"call",anchor:"transformers.TFXLNetForSequenceClassification.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"mems",val:": np.ndarray | tf.Tensor | None = None"},{name:"perm_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"target_mapping",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"input_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"use_mems",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = 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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1360",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.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>
`}}),Bn=new Ke({props:{$$slots:{default:[UM]},$$scope:{ctx:L}}}),Gn=new He({props:{anchor:"transformers.TFXLNetForSequenceClassification.call.example",$$slots:{default:[zM]},$$scope:{ctx:L}}}),On=new He({props:{anchor:"transformers.TFXLNetForSequenceClassification.call.example-2",$$slots:{default:[JM]},$$scope:{ctx:L}}}),kr=new Re({}),vr=new I({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.30.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.30.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.30.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1434"}}),Qn=new Ke({props:{$$slots:{default:[IM]},$$scope:{ctx:L}}}),Fr=new I({props:{name:"call",anchor:"transformers.TFXLNetForMultipleChoice.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"input_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"mems",val:": np.ndarray | tf.Tensor | None = None"},{name:"perm_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"target_mapping",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"use_mems",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = 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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1446",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.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 Ke({props:{$$slots:{default:[qM]},$$scope:{ctx:L}}}),Hn=new He({props:{anchor:"transformers.TFXLNetForMultipleChoice.call.example",$$slots:{default:[WM]},$$scope:{ctx:L}}}),xr=new Re({}),$r=new I({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.30.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.30.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.30.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1535"}}),Dn=new Ke({props:{$$slots:{default:[AM]},$$scope:{ctx:L}}}),Cr=new I({props:{name:"call",anchor:"transformers.TFXLNetForTokenClassification.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"mems",val:": np.ndarray | tf.Tensor | None = None"},{name:"perm_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"target_mapping",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"input_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"use_mems",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = 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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1545",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.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>
`}}),Yn=new Ke({props:{$$slots:{default:[ZM]},$$scope:{ctx:L}}}),Kn=new He({props:{anchor:"transformers.TFXLNetForTokenClassification.call.example",$$slots:{default:[SM]},$$scope:{ctx:L}}}),es=new He({props:{anchor:"transformers.TFXLNetForTokenClassification.call.example-2",$$slots:{default:[BM]},$$scope:{ctx:L}}}),Er=new Re({}),Ur=new I({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.30.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.30.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.30.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1615"}}),os=new Ke({props:{$$slots:{default:[GM]},$$scope:{ctx:L}}}),qr=new I({props:{name:"call",anchor:"transformers.TFXLNetForQuestionAnsweringSimple.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"attention_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"mems",val:": np.ndarray | tf.Tensor | None = None"},{name:"perm_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"target_mapping",val:": np.ndarray | tf.Tensor | None = None"},{name:"token_type_ids",val:": np.ndarray | tf.Tensor | None = None"},{name:"input_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"head_mask",val:": np.ndarray | tf.Tensor | None = None"},{name:"inputs_embeds",val:": np.ndarray | tf.Tensor | None = None"},{name:"use_mems",val:": Optional[bool] = None"},{name:"output_attentions",val:": Optional[bool] = None"},{name:"output_hidden_states",val:": Optional[bool] = None"},{name:"return_dict",val:": Optional[bool] = None"},{name:"start_positions",val:": np.ndarray | tf.Tensor | None = None"},{name:"end_positions",val:": np.ndarray | tf.Tensor | None = 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.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__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.30.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.30.0/src/transformers/models/xlnet/modeling_tf_xlnet.py#L1623",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.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.30.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.30.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 Ke({props:{$$slots:{default:[OM]},$$scope:{ctx:L}}}),ss=new He({props:{anchor:"transformers.TFXLNetForQuestionAnsweringSimple.call.example",$$slots:{default:[VM]},$$scope:{ctx:L}}}),as=new He({props:{anchor:"transformers.TFXLNetForQuestionAnsweringSimple.call.example-2",$$slots:{default:[QM]},$$scope:{ctx:L}}}),{c(){d=a("meta"),T=c(),h=a("h1"),f=a("a"),y=a("span"),k(l.$$.fragment),m=c(),j=a("span"),ke=n("XLNet"),_e=c(),q=a("div"),me=a("a"),te=a("img"),ve=c(),B=a("a"),he=a("img"),H=c(),re=a("h2"),le=a("a"),G=a("span"),k(de.$$.fragment),we=c(),O=a("span"),Me=n("Overview"),be=c(),Z=a("p"),Ne=n("The XLNet model was proposed in "),ce=a("a"),ie=n("XLNet: Generalized Autoregressive Pretraining for Language Understanding"),C=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.`),U=c(),ue=a("p"),Y=n("The abstract from the paper is the following:"),ye=c(),fe=a("p"),V=a("em"),Fe=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.`),Te=c(),E=a("p"),xe=n("Tips:"),P=c(),D=a("ul"),pe=a("li"),K=n("The specific attention pattern can be controlled at training and test time using the "),ge=a("code"),$e=n("perm_mask"),W=n(" input."),Xe=c(),S=a("li"),Le=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"),z=n("target_mapping"),je=n(" input."),J=c(),ne=a("li"),Ce=n("To use XLNet for sequential decoding (i.e. not in fully bi-directional setting), use the "),b=a("code"),$=n("perm_mask"),Je=n(` and
`),se=a("code"),Ie=n("target_mapping"),qe=n(` inputs to control the attention span and outputs (see examples in
`),X=a("em"),We=n("examples/pytorch/text-generation/run_generation.py"),Ae=n(")"),Ze=c(),Ue=a("li"),Se=n("XLNet is one of the few models that has no sequence length limit."),A=c(),Q=a("li"),Be=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."),Ge=c(),R=a("li"),Oe=n("XLNet also uses the same recurrence mechanism as Transformer-XL to build long-term dependencies."),ze=c(),ae=a("p"),Ve=n("This model was contributed by "),ee=a("a"),Qe=n("thomwolf"),Jm=n(". The original code can be found "),ys=a("a"),Im=n("here"),qm=n("."),yc=c(),oo=a("h2"),tn=a("a"),hl=a("span"),k(Ts.$$.fragment),Wm=c(),ul=a("span"),Am=n("Documentation resources"),Tc=c(),ft=a("ul"),fl=a("li"),Vr=a("a"),Zm=n("Text classification task guide"),Sm=c(),gl=a("li"),Qr=a("a"),Bm=n("Token classification task guide"),Gm=c(),_l=a("li"),Rr=a("a"),Om=n("Question answering task guide"),Vm=c(),bl=a("li"),Hr=a("a"),Qm=n("Causal language modeling task guide"),Rm=c(),yl=a("li"),Pr=a("a"),Hm=n("Multiple choice task guide"),kc=c(),no=a("h2"),on=a("a"),Tl=a("span"),k(ks.$$.fragment),Pm=c(),kl=a("span"),Dm=n("XLNetConfig"),vc=c(),kt=a("div"),k(vs.$$.fragment),Ym=c(),At=a("p"),Km=n("This is the configuration class to store the configuration of a "),Dr=a("a"),eh=n("XLNetModel"),th=n(" or a "),Yr=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 "),Kr=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(),k(nn.$$.fragment),wc=c(),ao=a("h2"),sn=a("a"),vl=a("span"),k(Ms.$$.fragment),hh=c(),wl=a("span"),uh=n("XLNetTokenizer"),Mc=c(),Ye=a("div"),k(Ns.$$.fragment),fh=c(),Fs=a("p"),gh=n("Construct an XLNet tokenizer. Based on "),xs=a("a"),_h=n("SentencePiece"),bh=n("."),yh=c(),$s=a("p"),Th=n("This tokenizer inherits from "),ti=a("a"),kh=n("PreTrainedTokenizer"),vh=n(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),wh=c(),St=a("div"),k(Xs.$$.fragment),Mh=c(),Ml=a("p"),Nh=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:`),Fh=c(),Ls=a("ul"),oi=a("li"),xh=n("single sequence: "),Nl=a("code"),$h=n("X <sep> <cls>"),Xh=c(),ni=a("li"),Lh=n("pair of sequences: "),Fl=a("code"),jh=n("A <sep> B <sep> <cls>"),Ch=c(),an=a("div"),k(js.$$.fragment),Eh=c(),Cs=a("p"),Uh=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 `),xl=a("code"),zh=n("prepare_for_model"),Jh=n(" method."),Ih=c(),wt=a("div"),k(Es.$$.fragment),qh=c(),$l=a("p"),Wh=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLNet"),Ah=c(),k(rn.$$.fragment),Zh=c(),ro=a("p"),Sh=n("If "),Xl=a("code"),Bh=n("token_ids_1"),Gh=n(" is "),Ll=a("code"),Oh=n("None"),Vh=n(", this method only returns the first portion of the mask (0s)."),Qh=c(),si=a("div"),k(Us.$$.fragment),Nc=c(),io=a("h2"),ln=a("a"),jl=a("span"),k(zs.$$.fragment),Rh=c(),Cl=a("span"),Hh=n("XLNetTokenizerFast"),Fc=c(),rt=a("div"),k(Js.$$.fragment),Ph=c(),lo=a("p"),Dh=n("Construct a \u201Cfast\u201D XLNet tokenizer (backed by HuggingFace\u2019s "),El=a("em"),Yh=n("tokenizers"),Kh=n(` library). Based on
`),Is=a("a"),eu=n("Unigram"),tu=n("."),ou=c(),qs=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(),Bt=a("div"),k(Ws.$$.fragment),iu=c(),Ul=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(),As=a("ul"),ri=a("li"),cu=n("single sequence: "),zl=a("code"),pu=n("X <sep> <cls>"),mu=c(),ii=a("li"),hu=n("pair of sequences: "),Jl=a("code"),uu=n("A <sep> B <sep> <cls>"),fu=c(),Mt=a("div"),k(Zs.$$.fragment),gu=c(),Il=a("p"),_u=n("Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLNet"),bu=c(),k(dn.$$.fragment),yu=c(),co=a("p"),Tu=n("If "),ql=a("code"),ku=n("token_ids_1"),vu=n(" is "),Wl=a("code"),wu=n("None"),Mu=n(", this method only returns the first portion of the mask (0s)."),xc=c(),po=a("h2"),cn=a("a"),Al=a("span"),k(Ss.$$.fragment),Nu=c(),Zl=a("span"),Fu=n("XLNet specific outputs"),$c=c(),mo=a("div"),k(Bs.$$.fragment),xu=c(),Gs=a("p"),$u=n("Output type of "),li=a("a"),Xu=n("XLNetModel"),Lu=n("."),Xc=c(),ho=a("div"),k(Os.$$.fragment),ju=c(),Vs=a("p"),Cu=n("Output type of "),di=a("a"),Eu=n("XLNetLMHeadModel"),Uu=n("."),Lc=c(),uo=a("div"),k(Qs.$$.fragment),zu=c(),Rs=a("p"),Ju=n("Output type of "),ci=a("a"),Iu=n("XLNetForSequenceClassification"),qu=n("."),jc=c(),fo=a("div"),k(Hs.$$.fragment),Wu=c(),Ps=a("p"),Au=n("Output type of "),pi=a("a"),Zu=n("XLNetForMultipleChoice"),Su=n("."),Cc=c(),go=a("div"),k(Ds.$$.fragment),Bu=c(),Ys=a("p"),Gu=n("Output type of "),Sl=a("code"),Ou=n("XLNetForTokenClassificationOutput"),Vu=n("."),Ec=c(),_o=a("div"),k(Ks.$$.fragment),Qu=c(),ea=a("p"),Ru=n("Output type of "),mi=a("a"),Hu=n("XLNetForQuestionAnsweringSimple"),Pu=n("."),Uc=c(),bo=a("div"),k(ta.$$.fragment),Du=c(),oa=a("p"),Yu=n("Output type of "),hi=a("a"),Ku=n("XLNetForQuestionAnswering"),ef=n("."),zc=c(),yo=a("div"),k(na.$$.fragment),tf=c(),sa=a("p"),of=n("Output type of "),ui=a("a"),nf=n("TFXLNetModel"),sf=n("."),Jc=c(),To=a("div"),k(aa.$$.fragment),af=c(),ra=a("p"),rf=n("Output type of "),fi=a("a"),lf=n("TFXLNetLMHeadModel"),df=n("."),Ic=c(),ko=a("div"),k(ia.$$.fragment),cf=c(),la=a("p"),pf=n("Output type of "),gi=a("a"),mf=n("TFXLNetForSequenceClassification"),hf=n("."),qc=c(),vo=a("div"),k(da.$$.fragment),uf=c(),ca=a("p"),ff=n("Output type of "),_i=a("a"),gf=n("TFXLNetForMultipleChoice"),_f=n("."),Wc=c(),wo=a("div"),k(pa.$$.fragment),bf=c(),ma=a("p"),yf=n("Output type of "),Bl=a("code"),Tf=n("TFXLNetForTokenClassificationOutput"),kf=n("."),Ac=c(),Mo=a("div"),k(ha.$$.fragment),vf=c(),ua=a("p"),wf=n("Output type of "),bi=a("a"),Mf=n("TFXLNetForQuestionAnsweringSimple"),Nf=n("."),Zc=c(),No=a("h2"),pn=a("a"),Gl=a("span"),k(fa.$$.fragment),Ff=c(),Ol=a("span"),xf=n("XLNetModel"),Sc=c(),it=a("div"),k(ga.$$.fragment),$f=c(),Vl=a("p"),Xf=n("The bare XLNet Model transformer outputting raw hidden-states without any specific head on top."),Lf=c(),_a=a("p"),jf=n("This model inherits from "),yi=a("a"),Cf=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.)`),Uf=c(),ba=a("p"),zf=n("This model is also a PyTorch "),ya=a("a"),Jf=n("torch.nn.Module"),If=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),qf=c(),Nt=a("div"),k(Ta.$$.fragment),Wf=c(),Fo=a("p"),Af=n("The "),Ti=a("a"),Zf=n("XLNetModel"),Sf=n(" forward method, overrides the "),Ql=a("code"),Bf=n("__call__"),Gf=n(" special method."),Of=c(),k(mn.$$.fragment),Vf=c(),k(hn.$$.fragment),Bc=c(),xo=a("h2"),un=a("a"),Rl=a("span"),k(ka.$$.fragment),Qf=c(),Hl=a("span"),Rf=n("XLNetLMHeadModel"),Gc=c(),lt=a("div"),k(va.$$.fragment),Hf=c(),Pl=a("p"),Pf=n("XLNet Model with a language modeling head on top (linear layer with weights tied to the input embeddings)."),Df=c(),wa=a("p"),Yf=n("This model inherits from "),ki=a("a"),Kf=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(),Ma=a("p"),og=n("This model is also a PyTorch "),Na=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(),Ft=a("div"),k(Fa.$$.fragment),rg=c(),$o=a("p"),ig=n("The "),vi=a("a"),lg=n("XLNetLMHeadModel"),dg=n(" forward method, overrides the "),Dl=a("code"),cg=n("__call__"),pg=n(" special method."),mg=c(),k(fn.$$.fragment),hg=c(),k(gn.$$.fragment),Oc=c(),Xo=a("h2"),_n=a("a"),Yl=a("span"),k(xa.$$.fragment),ug=c(),Kl=a("span"),fg=n("XLNetForSequenceClassification"),Vc=c(),dt=a("div"),k($a.$$.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.`),bg=c(),Xa=a("p"),yg=n("This model inherits from "),wi=a("a"),Tg=n("PreTrainedModel"),kg=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.)`),vg=c(),La=a("p"),wg=n("This model is also a PyTorch "),ja=a("a"),Mg=n("torch.nn.Module"),Ng=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Fg=c(),gt=a("div"),k(Ca.$$.fragment),xg=c(),Lo=a("p"),$g=n("The "),Mi=a("a"),Xg=n("XLNetForSequenceClassification"),Lg=n(" forward method, overrides the "),td=a("code"),jg=n("__call__"),Cg=n(" special method."),Eg=c(),k(bn.$$.fragment),Ug=c(),k(yn.$$.fragment),zg=c(),k(Tn.$$.fragment),Qc=c(),jo=a("h2"),kn=a("a"),od=a("span"),k(Ea.$$.fragment),Jg=c(),nd=a("span"),Ig=n("XLNetForMultipleChoice"),Rc=c(),ct=a("div"),k(Ua.$$.fragment),qg=c(),sd=a("p"),Wg=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.`),Ag=c(),za=a("p"),Zg=n("This model inherits from "),Ni=a("a"),Sg=n("PreTrainedModel"),Bg=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.)`),Gg=c(),Ja=a("p"),Og=n("This model is also a PyTorch "),Ia=a("a"),Vg=n("torch.nn.Module"),Qg=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(),xt=a("div"),k(qa.$$.fragment),Hg=c(),Co=a("p"),Pg=n("The "),Fi=a("a"),Dg=n("XLNetForMultipleChoice"),Yg=n(" forward method, overrides the "),ad=a("code"),Kg=n("__call__"),e_=n(" special method."),t_=c(),k(vn.$$.fragment),o_=c(),k(wn.$$.fragment),Hc=c(),Eo=a("h2"),Mn=a("a"),rd=a("span"),k(Wa.$$.fragment),n_=c(),id=a("span"),s_=n("XLNetForTokenClassification"),Pc=c(),pt=a("div"),k(Aa.$$.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(),Za=a("p"),l_=n("This model inherits from "),xi=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(),Sa=a("p"),m_=n("This model is also a PyTorch "),Ba=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(),$t=a("div"),k(Ga.$$.fragment),g_=c(),Uo=a("p"),__=n("The "),$i=a("a"),b_=n("XLNetForTokenClassification"),y_=n(" forward method, overrides the "),dd=a("code"),T_=n("__call__"),k_=n(" special method."),v_=c(),k(Nn.$$.fragment),w_=c(),k(Fn.$$.fragment),Dc=c(),zo=a("h2"),xn=a("a"),cd=a("span"),k(Oa.$$.fragment),M_=c(),pd=a("span"),N_=n("XLNetForQuestionAnsweringSimple"),Yc=c(),mt=a("div"),k(Va.$$.fragment),F_=c(),Jo=a("p"),x_=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"),$_=n("span start logits"),X_=n(" and "),hd=a("code"),L_=n("span end logits"),j_=n(")."),C_=c(),Qa=a("p"),E_=n("This model inherits from "),Xi=a("a"),U_=n("PreTrainedModel"),z_=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.)`),J_=c(),Ra=a("p"),I_=n("This model is also a PyTorch "),Ha=a("a"),q_=n("torch.nn.Module"),W_=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),A_=c(),Xt=a("div"),k(Pa.$$.fragment),Z_=c(),Io=a("p"),S_=n("The "),Li=a("a"),B_=n("XLNetForQuestionAnsweringSimple"),G_=n(" forward method, overrides the "),ud=a("code"),O_=n("__call__"),V_=n(" special method."),Q_=c(),k($n.$$.fragment),R_=c(),k(Xn.$$.fragment),Kc=c(),qo=a("h2"),Ln=a("a"),fd=a("span"),k(Da.$$.fragment),H_=c(),gd=a("span"),P_=n("XLNetForQuestionAnswering"),ep=c(),ht=a("div"),k(Ya.$$.fragment),D_=c(),Wo=a("p"),Y_=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"),K_=n("span start logits"),eb=n(" and "),bd=a("code"),tb=n("span end logits"),ob=n(")."),nb=c(),Ka=a("p"),sb=n("This model inherits from "),ji=a("a"),ab=n("PreTrainedModel"),rb=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.)`),ib=c(),er=a("p"),lb=n("This model is also a PyTorch "),tr=a("a"),db=n("torch.nn.Module"),cb=n(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),pb=c(),Lt=a("div"),k(or.$$.fragment),mb=c(),Ao=a("p"),hb=n("The "),Ci=a("a"),ub=n("XLNetForQuestionAnswering"),fb=n(" forward method, overrides the "),yd=a("code"),gb=n("__call__"),_b=n(" special method."),bb=c(),k(jn.$$.fragment),yb=c(),k(Cn.$$.fragment),tp=c(),Zo=a("h2"),En=a("a"),Td=a("span"),k(nr.$$.fragment),Tb=c(),kd=a("span"),kb=n("TFXLNetModel"),op=c(),et=a("div"),k(sr.$$.fragment),vb=c(),vd=a("p"),wb=n("The bare XLNet Model transformer outputting raw hidden-states without any specific head on top."),Mb=c(),ar=a("p"),Nb=n("This model inherits from "),Ei=a("a"),Fb=n("TFPreTrainedModel"),xb=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.)`),$b=c(),rr=a("p"),Xb=n("This model is also a "),ir=a("a"),Lb=n("tf.keras.Model"),jb=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.`),Cb=c(),k(Un.$$.fragment),Eb=c(),jt=a("div"),k(lr.$$.fragment),Ub=c(),So=a("p"),zb=n("The "),Ui=a("a"),Jb=n("TFXLNetModel"),Ib=n(" forward method, overrides the "),wd=a("code"),qb=n("__call__"),Wb=n(" special method."),Ab=c(),k(zn.$$.fragment),Zb=c(),k(Jn.$$.fragment),np=c(),Bo=a("h2"),In=a("a"),Md=a("span"),k(dr.$$.fragment),Sb=c(),Nd=a("span"),Bb=n("TFXLNetLMHeadModel"),sp=c(),tt=a("div"),k(cr.$$.fragment),Gb=c(),Fd=a("p"),Ob=n("XLNet Model with a language modeling head on top (linear layer with weights tied to the input embeddings)."),Vb=c(),pr=a("p"),Qb=n("This model inherits from "),zi=a("a"),Rb=n("TFPreTrainedModel"),Hb=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.)`),Pb=c(),mr=a("p"),Db=n("This model is also a "),hr=a("a"),Yb=n("tf.keras.Model"),Kb=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.`),ey=c(),k(qn.$$.fragment),ty=c(),Ct=a("div"),k(ur.$$.fragment),oy=c(),Go=a("p"),ny=n("The "),Ji=a("a"),sy=n("TFXLNetLMHeadModel"),ay=n(" forward method, overrides the "),xd=a("code"),ry=n("__call__"),iy=n(" special method."),ly=c(),k(Wn.$$.fragment),dy=c(),k(An.$$.fragment),ap=c(),Oo=a("h2"),Zn=a("a"),$d=a("span"),k(fr.$$.fragment),cy=c(),Xd=a("span"),py=n("TFXLNetForSequenceClassification"),rp=c(),ot=a("div"),k(gr.$$.fragment),my=c(),Ld=a("p"),hy=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.`),uy=c(),_r=a("p"),fy=n("This model inherits from "),Ii=a("a"),gy=n("TFPreTrainedModel"),_y=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.)`),by=c(),br=a("p"),yy=n("This model is also a "),yr=a("a"),Ty=n("tf.keras.Model"),ky=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.`),vy=c(),k(Sn.$$.fragment),wy=c(),_t=a("div"),k(Tr.$$.fragment),My=c(),Vo=a("p"),Ny=n("The "),qi=a("a"),Fy=n("TFXLNetForSequenceClassification"),xy=n(" forward method, overrides the "),jd=a("code"),$y=n("__call__"),Xy=n(" special method."),Ly=c(),k(Bn.$$.fragment),jy=c(),k(Gn.$$.fragment),Cy=c(),k(On.$$.fragment),ip=c(),Qo=a("h2"),Vn=a("a"),Cd=a("span"),k(kr.$$.fragment),Ey=c(),Ed=a("span"),Uy=n("TFLNetForMultipleChoice"),lp=c(),nt=a("div"),k(vr.$$.fragment),zy=c(),Ud=a("p"),Jy=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.`),Iy=c(),wr=a("p"),qy=n("This model inherits from "),Wi=a("a"),Wy=n("TFPreTrainedModel"),Ay=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.)`),Zy=c(),Mr=a("p"),Sy=n("This model is also a "),Nr=a("a"),By=n("tf.keras.Model"),Gy=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.`),Oy=c(),k(Qn.$$.fragment),Vy=c(),Et=a("div"),k(Fr.$$.fragment),Qy=c(),Ro=a("p"),Ry=n("The "),Ai=a("a"),Hy=n("TFXLNetForMultipleChoice"),Py=n(" forward method, overrides the "),zd=a("code"),Dy=n("__call__"),Yy=n(" special method."),Ky=c(),k(Rn.$$.fragment),eT=c(),k(Hn.$$.fragment),dp=c(),Ho=a("h2"),Pn=a("a"),Jd=a("span"),k(xr.$$.fragment),tT=c(),Id=a("span"),oT=n("TFXLNetForTokenClassification"),cp=c(),st=a("div"),k($r.$$.fragment),nT=c(),qd=a("p"),sT=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.`),aT=c(),Xr=a("p"),rT=n("This model inherits from "),Zi=a("a"),iT=n("TFPreTrainedModel"),lT=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.)`),dT=c(),Lr=a("p"),cT=n("This model is also a "),jr=a("a"),pT=n("tf.keras.Model"),mT=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.`),hT=c(),k(Dn.$$.fragment),uT=c(),bt=a("div"),k(Cr.$$.fragment),fT=c(),Po=a("p"),gT=n("The "),Si=a("a"),_T=n("TFXLNetForTokenClassification"),bT=n(" forward method, overrides the "),Wd=a("code"),yT=n("__call__"),TT=n(" special method."),kT=c(),k(Yn.$$.fragment),vT=c(),k(Kn.$$.fragment),wT=c(),k(es.$$.fragment),pp=c(),Do=a("h2"),ts=a("a"),Ad=a("span"),k(Er.$$.fragment),MT=c(),Zd=a("span"),NT=n("TFXLNetForQuestionAnsweringSimple"),mp=c(),at=a("div"),k(Ur.$$.fragment),FT=c(),Yo=a("p"),xT=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 `),Sd=a("code"),$T=n("span start logits"),XT=n(" and "),Bd=a("code"),LT=n("span end logits"),jT=n(")."),CT=c(),zr=a("p"),ET=n("This model inherits from "),Bi=a("a"),UT=n("TFPreTrainedModel"),zT=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.)`),JT=c(),Jr=a("p"),IT=n("This model is also a "),Ir=a("a"),qT=n("tf.keras.Model"),WT=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.`),AT=c(),k(os.$$.fragment),ZT=c(),yt=a("div"),k(qr.$$.fragment),ST=c(),Ko=a("p"),BT=n("The "),Gi=a("a"),GT=n("TFXLNetForQuestionAnsweringSimple"),OT=n(" forward method, overrides the "),Gd=a("code"),VT=n("__call__"),QT=n(" special method."),RT=c(),k(ns.$$.fragment),HT=c(),k(ss.$$.fragment),PT=c(),k(as.$$.fragment),this.h()},l(o){const _=iM('[data-svelte="svelte-1phssyn"]',document.head);d=r(_,"META",{name:!0,content:!0}),_.forEach(t),T=p(o),h=r(o,"H1",{class:!0});var Wr=i(h);f=r(Wr,"A",{id:!0,class:!0,href:!0});var Od=i(f);y=r(Od,"SPAN",{});var Vd=i(y);v(l.$$.fragment,Vd),Vd.forEach(t),Od.forEach(t),m=p(Wr),j=r(Wr,"SPAN",{});var Qd=i(j);ke=s(Qd,"XLNet"),Qd.forEach(t),Wr.forEach(t),_e=p(o),q=r(o,"DIV",{class:!0});var Ar=i(q);me=r(Ar,"A",{href:!0});var Rd=i(me);te=r(Rd,"IMG",{alt:!0,src:!0}),Rd.forEach(t),ve=p(Ar),B=r(Ar,"A",{href:!0});var Hd=i(B);he=r(Hd,"IMG",{alt:!0,src:!0}),Hd.forEach(t),Ar.forEach(t),H=p(o),re=r(o,"H2",{class:!0});var Zr=i(re);le=r(Zr,"A",{id:!0,class:!0,href:!0});var Pd=i(le);G=r(Pd,"SPAN",{});var Dd=i(G);v(de.$$.fragment,Dd),Dd.forEach(t),Pd.forEach(t),we=p(Zr),O=r(Zr,"SPAN",{});var Yd=i(O);Me=s(Yd,"Overview"),Yd.forEach(t),Zr.forEach(t),be=p(o),Z=r(o,"P",{});var Sr=i(Z);Ne=s(Sr,"The XLNet model was proposed in "),ce=r(Sr,"A",{href:!0,rel:!0});var Kd=i(ce);ie=s(Kd,"XLNet: Generalized Autoregressive Pretraining for Language Understanding"),Kd.forEach(t),C=s(Sr,` 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.`),Sr.forEach(t),U=p(o),ue=r(o,"P",{});var ec=i(ue);Y=s(ec,"The abstract from the paper is the following:"),ec.forEach(t),ye=p(o),fe=r(o,"P",{});var tc=i(fe);V=r(tc,"EM",{});var oc=i(V);Fe=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),Te=p(o),E=r(o,"P",{});var nc=i(E);xe=s(nc,"Tips:"),nc.forEach(t),P=p(o),D=r(o,"UL",{});var ut=i(D);pe=r(ut,"LI",{});var Br=i(pe);K=s(Br,"The specific attention pattern can be controlled at training and test time using the "),ge=r(Br,"CODE",{});var sc=i(ge);$e=s(sc,"perm_mask"),sc.forEach(t),W=s(Br," input."),Br.forEach(t),Xe=p(ut),S=r(ut,"LI",{});var Gr=i(S);Le=s(Gr,`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(Gr,"CODE",{});var ac=i(oe);z=s(ac,"target_mapping"),ac.forEach(t),je=s(Gr," input."),Gr.forEach(t),J=p(ut),ne=r(ut,"LI",{});var Zt=i(ne);Ce=s(Zt,"To use XLNet for sequential decoding (i.e. not in fully bi-directional setting), use the "),b=r(Zt,"CODE",{});var rc=i(b);$=s(rc,"perm_mask"),rc.forEach(t),Je=s(Zt,` and
`),se=r(Zt,"CODE",{});var ic=i(se);Ie=s(ic,"target_mapping"),ic.forEach(t),qe=s(Zt,` inputs to control the attention span and outputs (see examples in
`),X=r(Zt,"EM",{});var lc=i(X);We=s(lc,"examples/pytorch/text-generation/run_generation.py"),lc.forEach(t),Ae=s(Zt,")"),Zt.forEach(t),Ze=p(ut),Ue=r(ut,"LI",{});var dc=i(Ue);Se=s(dc,"XLNet is one of the few models that has no sequence length limit."),dc.forEach(t),A=p(ut),Q=r(ut,"LI",{});var cc=i(Q);Be=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),Ge=p(ut),R=r(ut,"LI",{});var pc=i(R);Oe=s(pc,"XLNet also uses the same recurrence mechanism as Transformer-XL to build long-term dependencies."),pc.forEach(t),ut.forEach(t),ze=p(o),ae=r(o,"P",{});var en=i(ae);Ve=s(en,"This model was contributed by "),ee=r(en,"A",{href:!0,rel:!0});var mc=i(ee);Qe=s(mc,"thomwolf"),mc.forEach(t),Jm=s(en,". The original code can be found "),ys=r(en,"A",{href:!0,rel:!0});var hc=i(ys);Im=s(hc,"here"),hc.forEach(t),qm=s(en,"."),en.forEach(t),yc=p(o),oo=r(o,"H2",{class:!0});var Or=i(oo);tn=r(Or,"A",{id:!0,class:!0,href:!0});var uc=i(tn);hl=r(uc,"SPAN",{});var fc=i(hl);v(Ts.$$.fragment,fc),fc.forEach(t),uc.forEach(t),Wm=p(Or),ul=r(Or,"SPAN",{});var gc=i(ul);Am=s(gc,"Documentation resources"),gc.forEach(t),Or.forEach(t),Tc=p(o),ft=r(o,"UL",{});var vt=i(ft);fl=r(vt,"LI",{});var _c=i(fl);Vr=r(_c,"A",{href:!0});var bc=i(Vr);Zm=s(bc,"Text classification task guide"),bc.forEach(t),_c.forEach(t),Sm=p(vt),gl=r(vt,"LI",{});var tk=i(gl);Qr=r(tk,"A",{href:!0});var ok=i(Qr);Bm=s(ok,"Token classification task guide"),ok.forEach(t),tk.forEach(t),Gm=p(vt),_l=r(vt,"LI",{});var nk=i(_l);Rr=r(nk,"A",{href:!0});var sk=i(Rr);Om=s(sk,"Question answering task guide"),sk.forEach(t),nk.forEach(t),Vm=p(vt),bl=r(vt,"LI",{});var ak=i(bl);Hr=r(ak,"A",{href:!0});var rk=i(Hr);Qm=s(rk,"Causal language modeling task guide"),rk.forEach(t),ak.forEach(t),Rm=p(vt),yl=r(vt,"LI",{});var ik=i(yl);Pr=r(ik,"A",{href:!0});var lk=i(Pr);Hm=s(lk,"Multiple choice task guide"),lk.forEach(t),ik.forEach(t),vt.forEach(t),kc=p(o),no=r(o,"H2",{class:!0});var up=i(no);on=r(up,"A",{id:!0,class:!0,href:!0});var dk=i(on);Tl=r(dk,"SPAN",{});var ck=i(Tl);v(ks.$$.fragment,ck),ck.forEach(t),dk.forEach(t),Pm=p(up),kl=r(up,"SPAN",{});var pk=i(kl);Dm=s(pk,"XLNetConfig"),pk.forEach(t),up.forEach(t),vc=p(o),kt=r(o,"DIV",{class:!0});var rs=i(kt);v(vs.$$.fragment,rs),Ym=p(rs),At=r(rs,"P",{});var is=i(At);Km=s(is,"This is the configuration class to store the configuration of a "),Dr=r(is,"A",{href:!0});var mk=i(Dr);eh=s(mk,"XLNetModel"),mk.forEach(t),th=s(is," or a "),Yr=r(is,"A",{href:!0});var hk=i(Yr);oh=s(hk,"TFXLNetModel"),hk.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 uk=i(ws);sh=s(uk,"xlnet-large-cased"),uk.forEach(t),ah=s(is," architecture."),is.forEach(t),rh=p(rs),so=r(rs,"P",{});var Oi=i(so);ih=s(Oi,"Configuration objects inherit from "),Kr=r(Oi,"A",{href:!0});var fk=i(Kr);lh=s(fk,"PretrainedConfig"),fk.forEach(t),dh=s(Oi,` and can be used to control the model outputs. Read the
documentation from `),ei=r(Oi,"A",{href:!0});var gk=i(ei);ch=s(gk,"PretrainedConfig"),gk.forEach(t),ph=s(Oi," for more information."),Oi.forEach(t),mh=p(rs),v(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 _k=i(sn);vl=r(_k,"SPAN",{});var bk=i(vl);v(Ms.$$.fragment,bk),bk.forEach(t),_k.forEach(t),hh=p(fp),wl=r(fp,"SPAN",{});var yk=i(wl);uh=s(yk,"XLNetTokenizer"),yk.forEach(t),fp.forEach(t),Mc=p(o),Ye=r(o,"DIV",{class:!0});var Tt=i(Ye);v(Ns.$$.fragment,Tt),fh=p(Tt),Fs=r(Tt,"P",{});var gp=i(Fs);gh=s(gp,"Construct an XLNet tokenizer. Based on "),xs=r(gp,"A",{href:!0,rel:!0});var Tk=i(xs);_h=s(Tk,"SentencePiece"),Tk.forEach(t),bh=s(gp,"."),gp.forEach(t),yh=p(Tt),$s=r(Tt,"P",{});var _p=i($s);Th=s(_p,"This tokenizer inherits from "),ti=r(_p,"A",{href:!0});var kk=i(ti);kh=s(kk,"PreTrainedTokenizer"),kk.forEach(t),vh=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(Tt),St=r(Tt,"DIV",{class:!0});var Vi=i(St);v(Xs.$$.fragment,Vi),Mh=p(Vi),Ml=r(Vi,"P",{});var vk=i(Ml);Nh=s(vk,`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:`),vk.forEach(t),Fh=p(Vi),Ls=r(Vi,"UL",{});var bp=i(Ls);oi=r(bp,"LI",{});var DT=i(oi);xh=s(DT,"single sequence: "),Nl=r(DT,"CODE",{});var wk=i(Nl);$h=s(wk,"X <sep> <cls>"),wk.forEach(t),DT.forEach(t),Xh=p(bp),ni=r(bp,"LI",{});var YT=i(ni);Lh=s(YT,"pair of sequences: "),Fl=r(YT,"CODE",{});var Mk=i(Fl);jh=s(Mk,"A <sep> B <sep> <cls>"),Mk.forEach(t),YT.forEach(t),bp.forEach(t),Vi.forEach(t),Ch=p(Tt),an=r(Tt,"DIV",{class:!0});var yp=i(an);v(js.$$.fragment,yp),Eh=p(yp),Cs=r(yp,"P",{});var Tp=i(Cs);Uh=s(Tp,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),xl=r(Tp,"CODE",{});var Nk=i(xl);zh=s(Nk,"prepare_for_model"),Nk.forEach(t),Jh=s(Tp," method."),Tp.forEach(t),yp.forEach(t),Ih=p(Tt),wt=r(Tt,"DIV",{class:!0});var ls=i(wt);v(Es.$$.fragment,ls),qh=p(ls),$l=r(ls,"P",{});var Fk=i($l);Wh=s(Fk,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLNet"),Fk.forEach(t),Ah=p(ls),v(rn.$$.fragment,ls),Zh=p(ls),ro=r(ls,"P",{});var Qi=i(ro);Sh=s(Qi,"If "),Xl=r(Qi,"CODE",{});var xk=i(Xl);Bh=s(xk,"token_ids_1"),xk.forEach(t),Gh=s(Qi," is "),Ll=r(Qi,"CODE",{});var $k=i(Ll);Oh=s($k,"None"),$k.forEach(t),Vh=s(Qi,", this method only returns the first portion of the mask (0s)."),Qi.forEach(t),ls.forEach(t),Qh=p(Tt),si=r(Tt,"DIV",{class:!0});var Xk=i(si);v(Us.$$.fragment,Xk),Xk.forEach(t),Tt.forEach(t),Nc=p(o),io=r(o,"H2",{class:!0});var kp=i(io);ln=r(kp,"A",{id:!0,class:!0,href:!0});var Lk=i(ln);jl=r(Lk,"SPAN",{});var jk=i(jl);v(zs.$$.fragment,jk),jk.forEach(t),Lk.forEach(t),Rh=p(kp),Cl=r(kp,"SPAN",{});var Ck=i(Cl);Hh=s(Ck,"XLNetTokenizerFast"),Ck.forEach(t),kp.forEach(t),Fc=p(o),rt=r(o,"DIV",{class:!0});var Gt=i(rt);v(Js.$$.fragment,Gt),Ph=p(Gt),lo=r(Gt,"P",{});var Ri=i(lo);Dh=s(Ri,"Construct a \u201Cfast\u201D XLNet tokenizer (backed by HuggingFace\u2019s "),El=r(Ri,"EM",{});var Ek=i(El);Yh=s(Ek,"tokenizers"),Ek.forEach(t),Kh=s(Ri,` library). Based on
`),Is=r(Ri,"A",{href:!0,rel:!0});var Uk=i(Is);eu=s(Uk,"Unigram"),Uk.forEach(t),tu=s(Ri,"."),Ri.forEach(t),ou=p(Gt),qs=r(Gt,"P",{});var vp=i(qs);nu=s(vp,"This tokenizer inherits from "),ai=r(vp,"A",{href:!0});var zk=i(ai);su=s(zk,"PreTrainedTokenizerFast"),zk.forEach(t),au=s(vp,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),vp.forEach(t),ru=p(Gt),Bt=r(Gt,"DIV",{class:!0});var Hi=i(Bt);v(Ws.$$.fragment,Hi),iu=p(Hi),Ul=r(Hi,"P",{});var Jk=i(Ul);lu=s(Jk,`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:`),Jk.forEach(t),du=p(Hi),As=r(Hi,"UL",{});var wp=i(As);ri=r(wp,"LI",{});var KT=i(ri);cu=s(KT,"single sequence: "),zl=r(KT,"CODE",{});var Ik=i(zl);pu=s(Ik,"X <sep> <cls>"),Ik.forEach(t),KT.forEach(t),mu=p(wp),ii=r(wp,"LI",{});var ek=i(ii);hu=s(ek,"pair of sequences: "),Jl=r(ek,"CODE",{});var qk=i(Jl);uu=s(qk,"A <sep> B <sep> <cls>"),qk.forEach(t),ek.forEach(t),wp.forEach(t),Hi.forEach(t),fu=p(Gt),Mt=r(Gt,"DIV",{class:!0});var ds=i(Mt);v(Zs.$$.fragment,ds),gu=p(ds),Il=r(ds,"P",{});var Wk=i(Il);_u=s(Wk,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. An XLNet"),Wk.forEach(t),bu=p(ds),v(dn.$$.fragment,ds),yu=p(ds),co=r(ds,"P",{});var Pi=i(co);Tu=s(Pi,"If "),ql=r(Pi,"CODE",{});var Ak=i(ql);ku=s(Ak,"token_ids_1"),Ak.forEach(t),vu=s(Pi," is "),Wl=r(Pi,"CODE",{});var Zk=i(Wl);wu=s(Zk,"None"),Zk.forEach(t),Mu=s(Pi,", this method only returns the first portion of the mask (0s)."),Pi.forEach(t),ds.forEach(t),Gt.forEach(t),xc=p(o),po=r(o,"H2",{class:!0});var Mp=i(po);cn=r(Mp,"A",{id:!0,class:!0,href:!0});var Sk=i(cn);Al=r(Sk,"SPAN",{});var Bk=i(Al);v(Ss.$$.fragment,Bk),Bk.forEach(t),Sk.forEach(t),Nu=p(Mp),Zl=r(Mp,"SPAN",{});var Gk=i(Zl);Fu=s(Gk,"XLNet specific outputs"),Gk.forEach(t),Mp.forEach(t),$c=p(o),mo=r(o,"DIV",{class:!0});var Np=i(mo);v(Bs.$$.fragment,Np),xu=p(Np),Gs=r(Np,"P",{});var Fp=i(Gs);$u=s(Fp,"Output type of "),li=r(Fp,"A",{href:!0});var Ok=i(li);Xu=s(Ok,"XLNetModel"),Ok.forEach(t),Lu=s(Fp,"."),Fp.forEach(t),Np.forEach(t),Xc=p(o),ho=r(o,"DIV",{class:!0});var xp=i(ho);v(Os.$$.fragment,xp),ju=p(xp),Vs=r(xp,"P",{});var $p=i(Vs);Cu=s($p,"Output type of "),di=r($p,"A",{href:!0});var Vk=i(di);Eu=s(Vk,"XLNetLMHeadModel"),Vk.forEach(t),Uu=s($p,"."),$p.forEach(t),xp.forEach(t),Lc=p(o),uo=r(o,"DIV",{class:!0});var Xp=i(uo);v(Qs.$$.fragment,Xp),zu=p(Xp),Rs=r(Xp,"P",{});var Lp=i(Rs);Ju=s(Lp,"Output type of "),ci=r(Lp,"A",{href:!0});var Qk=i(ci);Iu=s(Qk,"XLNetForSequenceClassification"),Qk.forEach(t),qu=s(Lp,"."),Lp.forEach(t),Xp.forEach(t),jc=p(o),fo=r(o,"DIV",{class:!0});var jp=i(fo);v(Hs.$$.fragment,jp),Wu=p(jp),Ps=r(jp,"P",{});var Cp=i(Ps);Au=s(Cp,"Output type of "),pi=r(Cp,"A",{href:!0});var Rk=i(pi);Zu=s(Rk,"XLNetForMultipleChoice"),Rk.forEach(t),Su=s(Cp,"."),Cp.forEach(t),jp.forEach(t),Cc=p(o),go=r(o,"DIV",{class:!0});var Ep=i(go);v(Ds.$$.fragment,Ep),Bu=p(Ep),Ys=r(Ep,"P",{});var Up=i(Ys);Gu=s(Up,"Output type of "),Sl=r(Up,"CODE",{});var Hk=i(Sl);Ou=s(Hk,"XLNetForTokenClassificationOutput"),Hk.forEach(t),Vu=s(Up,"."),Up.forEach(t),Ep.forEach(t),Ec=p(o),_o=r(o,"DIV",{class:!0});var zp=i(_o);v(Ks.$$.fragment,zp),Qu=p(zp),ea=r(zp,"P",{});var Jp=i(ea);Ru=s(Jp,"Output type of "),mi=r(Jp,"A",{href:!0});var Pk=i(mi);Hu=s(Pk,"XLNetForQuestionAnsweringSimple"),Pk.forEach(t),Pu=s(Jp,"."),Jp.forEach(t),zp.forEach(t),Uc=p(o),bo=r(o,"DIV",{class:!0});var Ip=i(bo);v(ta.$$.fragment,Ip),Du=p(Ip),oa=r(Ip,"P",{});var qp=i(oa);Yu=s(qp,"Output type of "),hi=r(qp,"A",{href:!0});var Dk=i(hi);Ku=s(Dk,"XLNetForQuestionAnswering"),Dk.forEach(t),ef=s(qp,"."),qp.forEach(t),Ip.forEach(t),zc=p(o),yo=r(o,"DIV",{class:!0});var Wp=i(yo);v(na.$$.fragment,Wp),tf=p(Wp),sa=r(Wp,"P",{});var Ap=i(sa);of=s(Ap,"Output type of "),ui=r(Ap,"A",{href:!0});var Yk=i(ui);nf=s(Yk,"TFXLNetModel"),Yk.forEach(t),sf=s(Ap,"."),Ap.forEach(t),Wp.forEach(t),Jc=p(o),To=r(o,"DIV",{class:!0});var Zp=i(To);v(aa.$$.fragment,Zp),af=p(Zp),ra=r(Zp,"P",{});var Sp=i(ra);rf=s(Sp,"Output type of "),fi=r(Sp,"A",{href:!0});var Kk=i(fi);lf=s(Kk,"TFXLNetLMHeadModel"),Kk.forEach(t),df=s(Sp,"."),Sp.forEach(t),Zp.forEach(t),Ic=p(o),ko=r(o,"DIV",{class:!0});var Bp=i(ko);v(ia.$$.fragment,Bp),cf=p(Bp),la=r(Bp,"P",{});var Gp=i(la);pf=s(Gp,"Output type of "),gi=r(Gp,"A",{href:!0});var ev=i(gi);mf=s(ev,"TFXLNetForSequenceClassification"),ev.forEach(t),hf=s(Gp,"."),Gp.forEach(t),Bp.forEach(t),qc=p(o),vo=r(o,"DIV",{class:!0});var Op=i(vo);v(da.$$.fragment,Op),uf=p(Op),ca=r(Op,"P",{});var Vp=i(ca);ff=s(Vp,"Output type of "),_i=r(Vp,"A",{href:!0});var tv=i(_i);gf=s(tv,"TFXLNetForMultipleChoice"),tv.forEach(t),_f=s(Vp,"."),Vp.forEach(t),Op.forEach(t),Wc=p(o),wo=r(o,"DIV",{class:!0});var Qp=i(wo);v(pa.$$.fragment,Qp),bf=p(Qp),ma=r(Qp,"P",{});var Rp=i(ma);yf=s(Rp,"Output type of "),Bl=r(Rp,"CODE",{});var ov=i(Bl);Tf=s(ov,"TFXLNetForTokenClassificationOutput"),ov.forEach(t),kf=s(Rp,"."),Rp.forEach(t),Qp.forEach(t),Ac=p(o),Mo=r(o,"DIV",{class:!0});var Hp=i(Mo);v(ha.$$.fragment,Hp),vf=p(Hp),ua=r(Hp,"P",{});var Pp=i(ua);wf=s(Pp,"Output type of "),bi=r(Pp,"A",{href:!0});var nv=i(bi);Mf=s(nv,"TFXLNetForQuestionAnsweringSimple"),nv.forEach(t),Nf=s(Pp,"."),Pp.forEach(t),Hp.forEach(t),Zc=p(o),No=r(o,"H2",{class:!0});var Dp=i(No);pn=r(Dp,"A",{id:!0,class:!0,href:!0});var sv=i(pn);Gl=r(sv,"SPAN",{});var av=i(Gl);v(fa.$$.fragment,av),av.forEach(t),sv.forEach(t),Ff=p(Dp),Ol=r(Dp,"SPAN",{});var rv=i(Ol);xf=s(rv,"XLNetModel"),rv.forEach(t),Dp.forEach(t),Sc=p(o),it=r(o,"DIV",{class:!0});var Ot=i(it);v(ga.$$.fragment,Ot),$f=p(Ot),Vl=r(Ot,"P",{});var iv=i(Vl);Xf=s(iv,"The bare XLNet Model transformer outputting raw hidden-states without any specific head on top."),iv.forEach(t),Lf=p(Ot),_a=r(Ot,"P",{});var Yp=i(_a);jf=s(Yp,"This model inherits from "),yi=r(Yp,"A",{href:!0});var lv=i(yi);Cf=s(lv,"PreTrainedModel"),lv.forEach(t),Ef=s(Yp,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading or saving, resizing the input embeddings, pruning heads
etc.)`),Yp.forEach(t),Uf=p(Ot),ba=r(Ot,"P",{});var Kp=i(ba);zf=s(Kp,"This model is also a PyTorch "),ya=r(Kp,"A",{href:!0,rel:!0});var dv=i(ya);Jf=s(dv,"torch.nn.Module"),dv.forEach(t),If=s(Kp,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Kp.forEach(t),qf=p(Ot),Nt=r(Ot,"DIV",{class:!0});var cs=i(Nt);v(Ta.$$.fragment,cs),Wf=p(cs),Fo=r(cs,"P",{});var Di=i(Fo);Af=s(Di,"The "),Ti=r(Di,"A",{href:!0});var cv=i(Ti);Zf=s(cv,"XLNetModel"),cv.forEach(t),Sf=s(Di," forward method, overrides the "),Ql=r(Di,"CODE",{});var pv=i(Ql);Bf=s(pv,"__call__"),pv.forEach(t),Gf=s(Di," special method."),Di.forEach(t),Of=p(cs),v(mn.$$.fragment,cs),Vf=p(cs),v(hn.$$.fragment,cs),cs.forEach(t),Ot.forEach(t),Bc=p(o),xo=r(o,"H2",{class:!0});var em=i(xo);un=r(em,"A",{id:!0,class:!0,href:!0});var mv=i(un);Rl=r(mv,"SPAN",{});var hv=i(Rl);v(ka.$$.fragment,hv),hv.forEach(t),mv.forEach(t),Qf=p(em),Hl=r(em,"SPAN",{});var uv=i(Hl);Rf=s(uv,"XLNetLMHeadModel"),uv.forEach(t),em.forEach(t),Gc=p(o),lt=r(o,"DIV",{class:!0});var Vt=i(lt);v(va.$$.fragment,Vt),Hf=p(Vt),Pl=r(Vt,"P",{});var fv=i(Pl);Pf=s(fv,"XLNet Model with a language modeling head on top (linear layer with weights tied to the input embeddings)."),fv.forEach(t),Df=p(Vt),wa=r(Vt,"P",{});var tm=i(wa);Yf=s(tm,"This model inherits from "),ki=r(tm,"A",{href:!0});var gv=i(ki);Kf=s(gv,"PreTrainedModel"),gv.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(Vt),Ma=r(Vt,"P",{});var om=i(Ma);og=s(om,"This model is also a PyTorch "),Na=r(om,"A",{href:!0,rel:!0});var _v=i(Na);ng=s(_v,"torch.nn.Module"),_v.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(Vt),Ft=r(Vt,"DIV",{class:!0});var ps=i(Ft);v(Fa.$$.fragment,ps),rg=p(ps),$o=r(ps,"P",{});var Yi=i($o);ig=s(Yi,"The "),vi=r(Yi,"A",{href:!0});var bv=i(vi);lg=s(bv,"XLNetLMHeadModel"),bv.forEach(t),dg=s(Yi," forward method, overrides the "),Dl=r(Yi,"CODE",{});var yv=i(Dl);cg=s(yv,"__call__"),yv.forEach(t),pg=s(Yi," special method."),Yi.forEach(t),mg=p(ps),v(fn.$$.fragment,ps),hg=p(ps),v(gn.$$.fragment,ps),ps.forEach(t),Vt.forEach(t),Oc=p(o),Xo=r(o,"H2",{class:!0});var nm=i(Xo);_n=r(nm,"A",{id:!0,class:!0,href:!0});var Tv=i(_n);Yl=r(Tv,"SPAN",{});var kv=i(Yl);v(xa.$$.fragment,kv),kv.forEach(t),Tv.forEach(t),ug=p(nm),Kl=r(nm,"SPAN",{});var vv=i(Kl);fg=s(vv,"XLNetForSequenceClassification"),vv.forEach(t),nm.forEach(t),Vc=p(o),dt=r(o,"DIV",{class:!0});var Qt=i(dt);v($a.$$.fragment,Qt),gg=p(Qt),ed=r(Qt,"P",{});var wv=i(ed);_g=s(wv,`XLNet Model with a sequence classification/regression head on top (a linear layer on top of the pooled output) e.g.
for GLUE tasks.`),wv.forEach(t),bg=p(Qt),Xa=r(Qt,"P",{});var sm=i(Xa);yg=s(sm,"This model inherits from "),wi=r(sm,"A",{href:!0});var Mv=i(wi);Tg=s(Mv,"PreTrainedModel"),Mv.forEach(t),kg=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),vg=p(Qt),La=r(Qt,"P",{});var am=i(La);wg=s(am,"This model is also a PyTorch "),ja=r(am,"A",{href:!0,rel:!0});var Nv=i(ja);Mg=s(Nv,"torch.nn.Module"),Nv.forEach(t),Ng=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),Fg=p(Qt),gt=r(Qt,"DIV",{class:!0});var Rt=i(gt);v(Ca.$$.fragment,Rt),xg=p(Rt),Lo=r(Rt,"P",{});var Ki=i(Lo);$g=s(Ki,"The "),Mi=r(Ki,"A",{href:!0});var Fv=i(Mi);Xg=s(Fv,"XLNetForSequenceClassification"),Fv.forEach(t),Lg=s(Ki," forward method, overrides the "),td=r(Ki,"CODE",{});var xv=i(td);jg=s(xv,"__call__"),xv.forEach(t),Cg=s(Ki," special method."),Ki.forEach(t),Eg=p(Rt),v(bn.$$.fragment,Rt),Ug=p(Rt),v(yn.$$.fragment,Rt),zg=p(Rt),v(Tn.$$.fragment,Rt),Rt.forEach(t),Qt.forEach(t),Qc=p(o),jo=r(o,"H2",{class:!0});var rm=i(jo);kn=r(rm,"A",{id:!0,class:!0,href:!0});var $v=i(kn);od=r($v,"SPAN",{});var Xv=i(od);v(Ea.$$.fragment,Xv),Xv.forEach(t),$v.forEach(t),Jg=p(rm),nd=r(rm,"SPAN",{});var Lv=i(nd);Ig=s(Lv,"XLNetForMultipleChoice"),Lv.forEach(t),rm.forEach(t),Rc=p(o),ct=r(o,"DIV",{class:!0});var Ht=i(ct);v(Ua.$$.fragment,Ht),qg=p(Ht),sd=r(Ht,"P",{});var jv=i(sd);Wg=s(jv,`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.`),jv.forEach(t),Ag=p(Ht),za=r(Ht,"P",{});var im=i(za);Zg=s(im,"This model inherits from "),Ni=r(im,"A",{href:!0});var Cv=i(Ni);Sg=s(Cv,"PreTrainedModel"),Cv.forEach(t),Bg=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),Gg=p(Ht),Ja=r(Ht,"P",{});var lm=i(Ja);Og=s(lm,"This model is also a PyTorch "),Ia=r(lm,"A",{href:!0,rel:!0});var Ev=i(Ia);Vg=s(Ev,"torch.nn.Module"),Ev.forEach(t),Qg=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(Ht),xt=r(Ht,"DIV",{class:!0});var ms=i(xt);v(qa.$$.fragment,ms),Hg=p(ms),Co=r(ms,"P",{});var el=i(Co);Pg=s(el,"The "),Fi=r(el,"A",{href:!0});var Uv=i(Fi);Dg=s(Uv,"XLNetForMultipleChoice"),Uv.forEach(t),Yg=s(el," forward method, overrides the "),ad=r(el,"CODE",{});var zv=i(ad);Kg=s(zv,"__call__"),zv.forEach(t),e_=s(el," special method."),el.forEach(t),t_=p(ms),v(vn.$$.fragment,ms),o_=p(ms),v(wn.$$.fragment,ms),ms.forEach(t),Ht.forEach(t),Hc=p(o),Eo=r(o,"H2",{class:!0});var dm=i(Eo);Mn=r(dm,"A",{id:!0,class:!0,href:!0});var Jv=i(Mn);rd=r(Jv,"SPAN",{});var Iv=i(rd);v(Wa.$$.fragment,Iv),Iv.forEach(t),Jv.forEach(t),n_=p(dm),id=r(dm,"SPAN",{});var qv=i(id);s_=s(qv,"XLNetForTokenClassification"),qv.forEach(t),dm.forEach(t),Pc=p(o),pt=r(o,"DIV",{class:!0});var Pt=i(pt);v(Aa.$$.fragment,Pt),a_=p(Pt),ld=r(Pt,"P",{});var Wv=i(ld);r_=s(Wv,`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.`),Wv.forEach(t),i_=p(Pt),Za=r(Pt,"P",{});var cm=i(Za);l_=s(cm,"This model inherits from "),xi=r(cm,"A",{href:!0});var Av=i(xi);d_=s(Av,"PreTrainedModel"),Av.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(Pt),Sa=r(Pt,"P",{});var pm=i(Sa);m_=s(pm,"This model is also a PyTorch "),Ba=r(pm,"A",{href:!0,rel:!0});var Zv=i(Ba);h_=s(Zv,"torch.nn.Module"),Zv.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(Pt),$t=r(Pt,"DIV",{class:!0});var hs=i($t);v(Ga.$$.fragment,hs),g_=p(hs),Uo=r(hs,"P",{});var tl=i(Uo);__=s(tl,"The "),$i=r(tl,"A",{href:!0});var Sv=i($i);b_=s(Sv,"XLNetForTokenClassification"),Sv.forEach(t),y_=s(tl," forward method, overrides the "),dd=r(tl,"CODE",{});var Bv=i(dd);T_=s(Bv,"__call__"),Bv.forEach(t),k_=s(tl," special method."),tl.forEach(t),v_=p(hs),v(Nn.$$.fragment,hs),w_=p(hs),v(Fn.$$.fragment,hs),hs.forEach(t),Pt.forEach(t),Dc=p(o),zo=r(o,"H2",{class:!0});var mm=i(zo);xn=r(mm,"A",{id:!0,class:!0,href:!0});var Gv=i(xn);cd=r(Gv,"SPAN",{});var Ov=i(cd);v(Oa.$$.fragment,Ov),Ov.forEach(t),Gv.forEach(t),M_=p(mm),pd=r(mm,"SPAN",{});var Vv=i(pd);N_=s(Vv,"XLNetForQuestionAnsweringSimple"),Vv.forEach(t),mm.forEach(t),Yc=p(o),mt=r(o,"DIV",{class:!0});var Dt=i(mt);v(Va.$$.fragment,Dt),F_=p(Dt),Jo=r(Dt,"P",{});var ol=i(Jo);x_=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 Qv=i(md);$_=s(Qv,"span start logits"),Qv.forEach(t),X_=s(ol," and "),hd=r(ol,"CODE",{});var Rv=i(hd);L_=s(Rv,"span end logits"),Rv.forEach(t),j_=s(ol,")."),ol.forEach(t),C_=p(Dt),Qa=r(Dt,"P",{});var hm=i(Qa);E_=s(hm,"This model inherits from "),Xi=r(hm,"A",{href:!0});var Hv=i(Xi);U_=s(Hv,"PreTrainedModel"),Hv.forEach(t),z_=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),J_=p(Dt),Ra=r(Dt,"P",{});var um=i(Ra);I_=s(um,"This model is also a PyTorch "),Ha=r(um,"A",{href:!0,rel:!0});var Pv=i(Ha);q_=s(Pv,"torch.nn.Module"),Pv.forEach(t),W_=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),A_=p(Dt),Xt=r(Dt,"DIV",{class:!0});var us=i(Xt);v(Pa.$$.fragment,us),Z_=p(us),Io=r(us,"P",{});var nl=i(Io);S_=s(nl,"The "),Li=r(nl,"A",{href:!0});var Dv=i(Li);B_=s(Dv,"XLNetForQuestionAnsweringSimple"),Dv.forEach(t),G_=s(nl," forward method, overrides the "),ud=r(nl,"CODE",{});var Yv=i(ud);O_=s(Yv,"__call__"),Yv.forEach(t),V_=s(nl," special method."),nl.forEach(t),Q_=p(us),v($n.$$.fragment,us),R_=p(us),v(Xn.$$.fragment,us),us.forEach(t),Dt.forEach(t),Kc=p(o),qo=r(o,"H2",{class:!0});var fm=i(qo);Ln=r(fm,"A",{id:!0,class:!0,href:!0});var Kv=i(Ln);fd=r(Kv,"SPAN",{});var ew=i(fd);v(Da.$$.fragment,ew),ew.forEach(t),Kv.forEach(t),H_=p(fm),gd=r(fm,"SPAN",{});var tw=i(gd);P_=s(tw,"XLNetForQuestionAnswering"),tw.forEach(t),fm.forEach(t),ep=p(o),ht=r(o,"DIV",{class:!0});var Yt=i(ht);v(Ya.$$.fragment,Yt),D_=p(Yt),Wo=r(Yt,"P",{});var sl=i(Wo);Y_=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);K_=s(ow,"span start logits"),ow.forEach(t),eb=s(sl," and "),bd=r(sl,"CODE",{});var nw=i(bd);tb=s(nw,"span end logits"),nw.forEach(t),ob=s(sl,")."),sl.forEach(t),nb=p(Yt),Ka=r(Yt,"P",{});var gm=i(Ka);sb=s(gm,"This model inherits from "),ji=r(gm,"A",{href:!0});var sw=i(ji);ab=s(sw,"PreTrainedModel"),sw.forEach(t),rb=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),ib=p(Yt),er=r(Yt,"P",{});var _m=i(er);lb=s(_m,"This model is also a PyTorch "),tr=r(_m,"A",{href:!0,rel:!0});var aw=i(tr);db=s(aw,"torch.nn.Module"),aw.forEach(t),cb=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),pb=p(Yt),Lt=r(Yt,"DIV",{class:!0});var fs=i(Lt);v(or.$$.fragment,fs),mb=p(fs),Ao=r(fs,"P",{});var al=i(Ao);hb=s(al,"The "),Ci=r(al,"A",{href:!0});var rw=i(Ci);ub=s(rw,"XLNetForQuestionAnswering"),rw.forEach(t),fb=s(al," forward method, overrides the "),yd=r(al,"CODE",{});var iw=i(yd);gb=s(iw,"__call__"),iw.forEach(t),_b=s(al," special method."),al.forEach(t),bb=p(fs),v(jn.$$.fragment,fs),yb=p(fs),v(Cn.$$.fragment,fs),fs.forEach(t),Yt.forEach(t),tp=p(o),Zo=r(o,"H2",{class:!0});var bm=i(Zo);En=r(bm,"A",{id:!0,class:!0,href:!0});var lw=i(En);Td=r(lw,"SPAN",{});var dw=i(Td);v(nr.$$.fragment,dw),dw.forEach(t),lw.forEach(t),Tb=p(bm),kd=r(bm,"SPAN",{});var cw=i(kd);kb=s(cw,"TFXLNetModel"),cw.forEach(t),bm.forEach(t),op=p(o),et=r(o,"DIV",{class:!0});var Ut=i(et);v(sr.$$.fragment,Ut),vb=p(Ut),vd=r(Ut,"P",{});var pw=i(vd);wb=s(pw,"The bare XLNet Model transformer outputting raw hidden-states without any specific head on top."),pw.forEach(t),Mb=p(Ut),ar=r(Ut,"P",{});var ym=i(ar);Nb=s(ym,"This model inherits from "),Ei=r(ym,"A",{href:!0});var mw=i(Ei);Fb=s(mw,"TFPreTrainedModel"),mw.forEach(t),xb=s(ym,`. 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.)`),ym.forEach(t),$b=p(Ut),rr=r(Ut,"P",{});var Tm=i(rr);Xb=s(Tm,"This model is also a "),ir=r(Tm,"A",{href:!0,rel:!0});var hw=i(ir);Lb=s(hw,"tf.keras.Model"),hw.forEach(t),jb=s(Tm,` 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.`),Tm.forEach(t),Cb=p(Ut),v(Un.$$.fragment,Ut),Eb=p(Ut),jt=r(Ut,"DIV",{class:!0});var gs=i(jt);v(lr.$$.fragment,gs),Ub=p(gs),So=r(gs,"P",{});var rl=i(So);zb=s(rl,"The "),Ui=r(rl,"A",{href:!0});var uw=i(Ui);Jb=s(uw,"TFXLNetModel"),uw.forEach(t),Ib=s(rl," forward method, overrides the "),wd=r(rl,"CODE",{});var fw=i(wd);qb=s(fw,"__call__"),fw.forEach(t),Wb=s(rl," special method."),rl.forEach(t),Ab=p(gs),v(zn.$$.fragment,gs),Zb=p(gs),v(Jn.$$.fragment,gs),gs.forEach(t),Ut.forEach(t),np=p(o),Bo=r(o,"H2",{class:!0});var km=i(Bo);In=r(km,"A",{id:!0,class:!0,href:!0});var gw=i(In);Md=r(gw,"SPAN",{});var _w=i(Md);v(dr.$$.fragment,_w),_w.forEach(t),gw.forEach(t),Sb=p(km),Nd=r(km,"SPAN",{});var bw=i(Nd);Bb=s(bw,"TFXLNetLMHeadModel"),bw.forEach(t),km.forEach(t),sp=p(o),tt=r(o,"DIV",{class:!0});var zt=i(tt);v(cr.$$.fragment,zt),Gb=p(zt),Fd=r(zt,"P",{});var yw=i(Fd);Ob=s(yw,"XLNet Model with a language modeling head on top (linear layer with weights tied to the input embeddings)."),yw.forEach(t),Vb=p(zt),pr=r(zt,"P",{});var vm=i(pr);Qb=s(vm,"This model inherits from "),zi=r(vm,"A",{href:!0});var Tw=i(zi);Rb=s(Tw,"TFPreTrainedModel"),Tw.forEach(t),Hb=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),Pb=p(zt),mr=r(zt,"P",{});var wm=i(mr);Db=s(wm,"This model is also a "),hr=r(wm,"A",{href:!0,rel:!0});var kw=i(hr);Yb=s(kw,"tf.keras.Model"),kw.forEach(t),Kb=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),ey=p(zt),v(qn.$$.fragment,zt),ty=p(zt),Ct=r(zt,"DIV",{class:!0});var _s=i(Ct);v(ur.$$.fragment,_s),oy=p(_s),Go=r(_s,"P",{});var il=i(Go);ny=s(il,"The "),Ji=r(il,"A",{href:!0});var vw=i(Ji);sy=s(vw,"TFXLNetLMHeadModel"),vw.forEach(t),ay=s(il," forward method, overrides the "),xd=r(il,"CODE",{});var ww=i(xd);ry=s(ww,"__call__"),ww.forEach(t),iy=s(il," special method."),il.forEach(t),ly=p(_s),v(Wn.$$.fragment,_s),dy=p(_s),v(An.$$.fragment,_s),_s.forEach(t),zt.forEach(t),ap=p(o),Oo=r(o,"H2",{class:!0});var Mm=i(Oo);Zn=r(Mm,"A",{id:!0,class:!0,href:!0});var Mw=i(Zn);$d=r(Mw,"SPAN",{});var Nw=i($d);v(fr.$$.fragment,Nw),Nw.forEach(t),Mw.forEach(t),cy=p(Mm),Xd=r(Mm,"SPAN",{});var Fw=i(Xd);py=s(Fw,"TFXLNetForSequenceClassification"),Fw.forEach(t),Mm.forEach(t),rp=p(o),ot=r(o,"DIV",{class:!0});var Jt=i(ot);v(gr.$$.fragment,Jt),my=p(Jt),Ld=r(Jt,"P",{});var xw=i(Ld);hy=s(xw,`XLNet Model with a sequence classification/regression head on top (a linear layer on top of the pooled output) e.g.
for GLUE tasks.`),xw.forEach(t),uy=p(Jt),_r=r(Jt,"P",{});var Nm=i(_r);fy=s(Nm,"This model inherits from "),Ii=r(Nm,"A",{href:!0});var $w=i(Ii);gy=s($w,"TFPreTrainedModel"),$w.forEach(t),_y=s(Nm,`. 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.)`),Nm.forEach(t),by=p(Jt),br=r(Jt,"P",{});var Fm=i(br);yy=s(Fm,"This model is also a "),yr=r(Fm,"A",{href:!0,rel:!0});var Xw=i(yr);Ty=s(Xw,"tf.keras.Model"),Xw.forEach(t),ky=s(Fm,` 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.`),Fm.forEach(t),vy=p(Jt),v(Sn.$$.fragment,Jt),wy=p(Jt),_t=r(Jt,"DIV",{class:!0});var Kt=i(_t);v(Tr.$$.fragment,Kt),My=p(Kt),Vo=r(Kt,"P",{});var ll=i(Vo);Ny=s(ll,"The "),qi=r(ll,"A",{href:!0});var Lw=i(qi);Fy=s(Lw,"TFXLNetForSequenceClassification"),Lw.forEach(t),xy=s(ll," forward method, overrides the "),jd=r(ll,"CODE",{});var jw=i(jd);$y=s(jw,"__call__"),jw.forEach(t),Xy=s(ll," special method."),ll.forEach(t),Ly=p(Kt),v(Bn.$$.fragment,Kt),jy=p(Kt),v(Gn.$$.fragment,Kt),Cy=p(Kt),v(On.$$.fragment,Kt),Kt.forEach(t),Jt.forEach(t),ip=p(o),Qo=r(o,"H2",{class:!0});var xm=i(Qo);Vn=r(xm,"A",{id:!0,class:!0,href:!0});var Cw=i(Vn);Cd=r(Cw,"SPAN",{});var Ew=i(Cd);v(kr.$$.fragment,Ew),Ew.forEach(t),Cw.forEach(t),Ey=p(xm),Ed=r(xm,"SPAN",{});var Uw=i(Ed);Uy=s(Uw,"TFLNetForMultipleChoice"),Uw.forEach(t),xm.forEach(t),lp=p(o),nt=r(o,"DIV",{class:!0});var It=i(nt);v(vr.$$.fragment,It),zy=p(It),Ud=r(It,"P",{});var zw=i(Ud);Jy=s(zw,`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.`),zw.forEach(t),Iy=p(It),wr=r(It,"P",{});var $m=i(wr);qy=s($m,"This model inherits from "),Wi=r($m,"A",{href:!0});var Jw=i(Wi);Wy=s(Jw,"TFPreTrainedModel"),Jw.forEach(t),Ay=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),Zy=p(It),Mr=r(It,"P",{});var Xm=i(Mr);Sy=s(Xm,"This model is also a "),Nr=r(Xm,"A",{href:!0,rel:!0});var Iw=i(Nr);By=s(Iw,"tf.keras.Model"),Iw.forEach(t),Gy=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),Oy=p(It),v(Qn.$$.fragment,It),Vy=p(It),Et=r(It,"DIV",{class:!0});var bs=i(Et);v(Fr.$$.fragment,bs),Qy=p(bs),Ro=r(bs,"P",{});var dl=i(Ro);Ry=s(dl,"The "),Ai=r(dl,"A",{href:!0});var qw=i(Ai);Hy=s(qw,"TFXLNetForMultipleChoice"),qw.forEach(t),Py=s(dl," forward method, overrides the "),zd=r(dl,"CODE",{});var Ww=i(zd);Dy=s(Ww,"__call__"),Ww.forEach(t),Yy=s(dl," special method."),dl.forEach(t),Ky=p(bs),v(Rn.$$.fragment,bs),eT=p(bs),v(Hn.$$.fragment,bs),bs.forEach(t),It.forEach(t),dp=p(o),Ho=r(o,"H2",{class:!0});var Lm=i(Ho);Pn=r(Lm,"A",{id:!0,class:!0,href:!0});var Aw=i(Pn);Jd=r(Aw,"SPAN",{});var Zw=i(Jd);v(xr.$$.fragment,Zw),Zw.forEach(t),Aw.forEach(t),tT=p(Lm),Id=r(Lm,"SPAN",{});var Sw=i(Id);oT=s(Sw,"TFXLNetForTokenClassification"),Sw.forEach(t),Lm.forEach(t),cp=p(o),st=r(o,"DIV",{class:!0});var qt=i(st);v($r.$$.fragment,qt),nT=p(qt),qd=r(qt,"P",{});var Bw=i(qd);sT=s(Bw,`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.`),Bw.forEach(t),aT=p(qt),Xr=r(qt,"P",{});var jm=i(Xr);rT=s(jm,"This model inherits from "),Zi=r(jm,"A",{href:!0});var Gw=i(Zi);iT=s(Gw,"TFPreTrainedModel"),Gw.forEach(t),lT=s(jm,`. 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.)`),jm.forEach(t),dT=p(qt),Lr=r(qt,"P",{});var Cm=i(Lr);cT=s(Cm,"This model is also a "),jr=r(Cm,"A",{href:!0,rel:!0});var Ow=i(jr);pT=s(Ow,"tf.keras.Model"),Ow.forEach(t),mT=s(Cm,` 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.`),Cm.forEach(t),hT=p(qt),v(Dn.$$.fragment,qt),uT=p(qt),bt=r(qt,"DIV",{class:!0});var eo=i(bt);v(Cr.$$.fragment,eo),fT=p(eo),Po=r(eo,"P",{});var cl=i(Po);gT=s(cl,"The "),Si=r(cl,"A",{href:!0});var Vw=i(Si);_T=s(Vw,"TFXLNetForTokenClassification"),Vw.forEach(t),bT=s(cl," forward method, overrides the "),Wd=r(cl,"CODE",{});var Qw=i(Wd);yT=s(Qw,"__call__"),Qw.forEach(t),TT=s(cl," special method."),cl.forEach(t),kT=p(eo),v(Yn.$$.fragment,eo),vT=p(eo),v(Kn.$$.fragment,eo),wT=p(eo),v(es.$$.fragment,eo),eo.forEach(t),qt.forEach(t),pp=p(o),Do=r(o,"H2",{class:!0});var Em=i(Do);ts=r(Em,"A",{id:!0,class:!0,href:!0});var Rw=i(ts);Ad=r(Rw,"SPAN",{});var Hw=i(Ad);v(Er.$$.fragment,Hw),Hw.forEach(t),Rw.forEach(t),MT=p(Em),Zd=r(Em,"SPAN",{});var Pw=i(Zd);NT=s(Pw,"TFXLNetForQuestionAnsweringSimple"),Pw.forEach(t),Em.forEach(t),mp=p(o),at=r(o,"DIV",{class:!0});var Wt=i(at);v(Ur.$$.fragment,Wt),FT=p(Wt),Yo=r(Wt,"P",{});var pl=i(Yo);xT=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 `),Sd=r(pl,"CODE",{});var Dw=i(Sd);$T=s(Dw,"span start logits"),Dw.forEach(t),XT=s(pl," and "),Bd=r(pl,"CODE",{});var Yw=i(Bd);LT=s(Yw,"span end logits"),Yw.forEach(t),jT=s(pl,")."),pl.forEach(t),CT=p(Wt),zr=r(Wt,"P",{});var Um=i(zr);ET=s(Um,"This model inherits from "),Bi=r(Um,"A",{href:!0});var Kw=i(Bi);UT=s(Kw,"TFPreTrainedModel"),Kw.forEach(t),zT=s(Um,`. 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.)`),Um.forEach(t),JT=p(Wt),Jr=r(Wt,"P",{});var zm=i(Jr);IT=s(zm,"This model is also a "),Ir=r(zm,"A",{href:!0,rel:!0});var eM=i(Ir);qT=s(eM,"tf.keras.Model"),eM.forEach(t),WT=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),AT=p(Wt),v(os.$$.fragment,Wt),ZT=p(Wt),yt=r(Wt,"DIV",{class:!0});var to=i(yt);v(qr.$$.fragment,to),ST=p(to),Ko=r(to,"P",{});var ml=i(Ko);BT=s(ml,"The "),Gi=r(ml,"A",{href:!0});var tM=i(Gi);GT=s(tM,"TFXLNetForQuestionAnsweringSimple"),tM.forEach(t),OT=s(ml," forward method, overrides the "),Gd=r(ml,"CODE",{});var oM=i(Gd);VT=s(oM,"__call__"),oM.forEach(t),QT=s(ml," special method."),ml.forEach(t),RT=p(to),v(ns.$$.fragment,to),HT=p(to),v(ss.$$.fragment,to),PT=p(to),v(as.$$.fragment,to),to.forEach(t),Wt.forEach(t),this.h()},h(){u(d,"name","hf:doc:metadata"),u(d,"content",JSON.stringify(HM)),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"),nM(te.src,x="https://img.shields.io/badge/All_model_pages-xlnet-blueviolet")||u(te,"src",x),u(me,"href","https://huggingface.co/models?filter=xlnet"),u(he,"alt","Spaces"),nM(he.src,Ee="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||u(he,"src",Ee),u(B,"href","https://huggingface.co/spaces/docs-demos/xlnet-base-cased"),u(q,"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(ys,"href","https://github.com/zihangdai/xlnet/"),u(ys,"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(Vr,"href","../tasks/sequence_classification"),u(Qr,"href","../tasks/token_classification"),u(Rr,"href","../tasks/question_answering"),u(Hr,"href","../tasks/language_modeling"),u(Pr,"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(Dr,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.XLNetModel"),u(Yr,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.TFXLNetModel"),u(ws,"href","https://huggingface.co/xlnet-large-cased"),u(ws,"rel","nofollow"),u(Kr,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),u(ei,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),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(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(xs,"href","https://github.com/google/sentencepiece"),u(xs,"rel","nofollow"),u(ti,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),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(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(Ye,"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(Is,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=unigram#models"),u(Is,"rel","nofollow"),u(ai,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),u(Bt,"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(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.30.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.30.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.30.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.30.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.30.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.30.0/en/model_doc/xlnet#transformers.XLNetForQuestionAnswering"),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(ui,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.TFXLNetModel"),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(fi,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.TFXLNetLMHeadModel"),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(gi,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.TFXLNetForSequenceClassification"),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(_i,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.TFXLNetForMultipleChoice"),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(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(bi,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.TFXLNetForQuestionAnsweringSimple"),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(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(No,"class","relative group"),u(yi,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),u(ya,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(ya,"rel","nofollow"),u(Ti,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.XLNetModel"),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(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(xo,"class","relative group"),u(ki,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),u(Na,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Na,"rel","nofollow"),u(vi,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.XLNetLMHeadModel"),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(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.30.0/en/main_classes/model#transformers.PreTrainedModel"),u(ja,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(ja,"rel","nofollow"),u(Mi,"href","/docs/transformers/v4.30.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(kn,"id","transformers.XLNetForMultipleChoice"),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.XLNetForMultipleChoice"),u(jo,"class","relative group"),u(Ni,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),u(Ia,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Ia,"rel","nofollow"),u(Fi,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.XLNetForMultipleChoice"),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(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(Mn,"id","transformers.XLNetForTokenClassification"),u(Mn,"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(Mn,"href","#transformers.XLNetForTokenClassification"),u(Eo,"class","relative group"),u(xi,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),u(Ba,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Ba,"rel","nofollow"),u($i,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.XLNetForTokenClassification"),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(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(xn,"id","transformers.XLNetForQuestionAnsweringSimple"),u(xn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(xn,"href","#transformers.XLNetForQuestionAnsweringSimple"),u(zo,"class","relative group"),u(Xi,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),u(Ha,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),u(Ha,"rel","nofollow"),u(Li,"href","/docs/transformers/v4.30.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(Ln,"id","transformers.XLNetForQuestionAnswering"),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.XLNetForQuestionAnswering"),u(qo,"class","relative group"),u(ji,"href","/docs/transformers/v4.30.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(Ci,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.XLNetForQuestionAnswering"),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(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(Zo,"class","relative group"),u(Ei,"href","/docs/transformers/v4.30.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(Ui,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.TFXLNetModel"),u(jt,"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(In,"id","transformers.TFXLNetLMHeadModel"),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.TFXLNetLMHeadModel"),u(Bo,"class","relative group"),u(zi,"href","/docs/transformers/v4.30.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(Ji,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.TFXLNetLMHeadModel"),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(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(Zn,"id","transformers.TFXLNetForSequenceClassification"),u(Zn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Zn,"href","#transformers.TFXLNetForSequenceClassification"),u(Oo,"class","relative group"),u(Ii,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(yr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(yr,"rel","nofollow"),u(qi,"href","/docs/transformers/v4.30.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(Vn,"id","transformers.TFXLNetForMultipleChoice"),u(Vn,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),u(Vn,"href","#transformers.TFXLNetForMultipleChoice"),u(Qo,"class","relative group"),u(Wi,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(Nr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(Nr,"rel","nofollow"),u(Ai,"href","/docs/transformers/v4.30.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(Pn,"id","transformers.TFXLNetForTokenClassification"),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.TFXLNetForTokenClassification"),u(Ho,"class","relative group"),u(Zi,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.TFPreTrainedModel"),u(jr,"href","https://www.tensorflow.org/api_docs/python/tf/keras/Model"),u(jr,"rel","nofollow"),u(Si,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.TFXLNetForTokenClassification"),u(bt,"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(Do,"class","relative group"),u(Bi,"href","/docs/transformers/v4.30.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(Gi,"href","/docs/transformers/v4.30.0/en/model_doc/xlnet#transformers.TFXLNetForQuestionAnsweringSimple"),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(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,T,_),g(o,h,_),e(h,f),e(f,y),w(l,y,null),e(h,m),e(h,j),e(j,ke),g(o,_e,_),g(o,q,_),e(q,me),e(me,te),e(q,ve),e(q,B),e(B,he),g(o,H,_),g(o,re,_),e(re,le),e(le,G),w(de,G,null),e(re,we),e(re,O),e(O,Me),g(o,be,_),g(o,Z,_),e(Z,Ne),e(Z,ce),e(ce,ie),e(Z,C),g(o,U,_),g(o,ue,_),e(ue,Y),g(o,ye,_),g(o,fe,_),e(fe,V),e(V,Fe),g(o,Te,_),g(o,E,_),e(E,xe),g(o,P,_),g(o,D,_),e(D,pe),e(pe,K),e(pe,ge),e(ge,$e),e(pe,W),e(D,Xe),e(D,S),e(S,Le),e(S,oe),e(oe,z),e(S,je),e(D,J),e(D,ne),e(ne,Ce),e(ne,b),e(b,$),e(ne,Je),e(ne,se),e(se,Ie),e(ne,qe),e(ne,X),e(X,We),e(ne,Ae),e(D,Ze),e(D,Ue),e(Ue,Se),e(D,A),e(D,Q),e(Q,Be),e(D,Ge),e(D,R),e(R,Oe),g(o,ze,_),g(o,ae,_),e(ae,Ve),e(ae,ee),e(ee,Qe),e(ae,Jm),e(ae,ys),e(ys,Im),e(ae,qm),g(o,yc,_),g(o,oo,_),e(oo,tn),e(tn,hl),w(Ts,hl,null),e(oo,Wm),e(oo,ul),e(ul,Am),g(o,Tc,_),g(o,ft,_),e(ft,fl),e(fl,Vr),e(Vr,Zm),e(ft,Sm),e(ft,gl),e(gl,Qr),e(Qr,Bm),e(ft,Gm),e(ft,_l),e(_l,Rr),e(Rr,Om),e(ft,Vm),e(ft,bl),e(bl,Hr),e(Hr,Qm),e(ft,Rm),e(ft,yl),e(yl,Pr),e(Pr,Hm),g(o,kc,_),g(o,no,_),e(no,on),e(on,Tl),w(ks,Tl,null),e(no,Pm),e(no,kl),e(kl,Dm),g(o,vc,_),g(o,kt,_),w(vs,kt,null),e(kt,Ym),e(kt,At),e(At,Km),e(At,Dr),e(Dr,eh),e(At,th),e(At,Yr),e(Yr,oh),e(At,nh),e(At,ws),e(ws,sh),e(At,ah),e(kt,rh),e(kt,so),e(so,ih),e(so,Kr),e(Kr,lh),e(so,dh),e(so,ei),e(ei,ch),e(so,ph),e(kt,mh),w(nn,kt,null),g(o,wc,_),g(o,ao,_),e(ao,sn),e(sn,vl),w(Ms,vl,null),e(ao,hh),e(ao,wl),e(wl,uh),g(o,Mc,_),g(o,Ye,_),w(Ns,Ye,null),e(Ye,fh),e(Ye,Fs),e(Fs,gh),e(Fs,xs),e(xs,_h),e(Fs,bh),e(Ye,yh),e(Ye,$s),e($s,Th),e($s,ti),e(ti,kh),e($s,vh),e(Ye,wh),e(Ye,St),w(Xs,St,null),e(St,Mh),e(St,Ml),e(Ml,Nh),e(St,Fh),e(St,Ls),e(Ls,oi),e(oi,xh),e(oi,Nl),e(Nl,$h),e(Ls,Xh),e(Ls,ni),e(ni,Lh),e(ni,Fl),e(Fl,jh),e(Ye,Ch),e(Ye,an),w(js,an,null),e(an,Eh),e(an,Cs),e(Cs,Uh),e(Cs,xl),e(xl,zh),e(Cs,Jh),e(Ye,Ih),e(Ye,wt),w(Es,wt,null),e(wt,qh),e(wt,$l),e($l,Wh),e(wt,Ah),w(rn,wt,null),e(wt,Zh),e(wt,ro),e(ro,Sh),e(ro,Xl),e(Xl,Bh),e(ro,Gh),e(ro,Ll),e(Ll,Oh),e(ro,Vh),e(Ye,Qh),e(Ye,si),w(Us,si,null),g(o,Nc,_),g(o,io,_),e(io,ln),e(ln,jl),w(zs,jl,null),e(io,Rh),e(io,Cl),e(Cl,Hh),g(o,Fc,_),g(o,rt,_),w(Js,rt,null),e(rt,Ph),e(rt,lo),e(lo,Dh),e(lo,El),e(El,Yh),e(lo,Kh),e(lo,Is),e(Is,eu),e(lo,tu),e(rt,ou),e(rt,qs),e(qs,nu),e(qs,ai),e(ai,su),e(qs,au),e(rt,ru),e(rt,Bt),w(Ws,Bt,null),e(Bt,iu),e(Bt,Ul),e(Ul,lu),e(Bt,du),e(Bt,As),e(As,ri),e(ri,cu),e(ri,zl),e(zl,pu),e(As,mu),e(As,ii),e(ii,hu),e(ii,Jl),e(Jl,uu),e(rt,fu),e(rt,Mt),w(Zs,Mt,null),e(Mt,gu),e(Mt,Il),e(Il,_u),e(Mt,bu),w(dn,Mt,null),e(Mt,yu),e(Mt,co),e(co,Tu),e(co,ql),e(ql,ku),e(co,vu),e(co,Wl),e(Wl,wu),e(co,Mu),g(o,xc,_),g(o,po,_),e(po,cn),e(cn,Al),w(Ss,Al,null),e(po,Nu),e(po,Zl),e(Zl,Fu),g(o,$c,_),g(o,mo,_),w(Bs,mo,null),e(mo,xu),e(mo,Gs),e(Gs,$u),e(Gs,li),e(li,Xu),e(Gs,Lu),g(o,Xc,_),g(o,ho,_),w(Os,ho,null),e(ho,ju),e(ho,Vs),e(Vs,Cu),e(Vs,di),e(di,Eu),e(Vs,Uu),g(o,Lc,_),g(o,uo,_),w(Qs,uo,null),e(uo,zu),e(uo,Rs),e(Rs,Ju),e(Rs,ci),e(ci,Iu),e(Rs,qu),g(o,jc,_),g(o,fo,_),w(Hs,fo,null),e(fo,Wu),e(fo,Ps),e(Ps,Au),e(Ps,pi),e(pi,Zu),e(Ps,Su),g(o,Cc,_),g(o,go,_),w(Ds,go,null),e(go,Bu),e(go,Ys),e(Ys,Gu),e(Ys,Sl),e(Sl,Ou),e(Ys,Vu),g(o,Ec,_),g(o,_o,_),w(Ks,_o,null),e(_o,Qu),e(_o,ea),e(ea,Ru),e(ea,mi),e(mi,Hu),e(ea,Pu),g(o,Uc,_),g(o,bo,_),w(ta,bo,null),e(bo,Du),e(bo,oa),e(oa,Yu),e(oa,hi),e(hi,Ku),e(oa,ef),g(o,zc,_),g(o,yo,_),w(na,yo,null),e(yo,tf),e(yo,sa),e(sa,of),e(sa,ui),e(ui,nf),e(sa,sf),g(o,Jc,_),g(o,To,_),w(aa,To,null),e(To,af),e(To,ra),e(ra,rf),e(ra,fi),e(fi,lf),e(ra,df),g(o,Ic,_),g(o,ko,_),w(ia,ko,null),e(ko,cf),e(ko,la),e(la,pf),e(la,gi),e(gi,mf),e(la,hf),g(o,qc,_),g(o,vo,_),w(da,vo,null),e(vo,uf),e(vo,ca),e(ca,ff),e(ca,_i),e(_i,gf),e(ca,_f),g(o,Wc,_),g(o,wo,_),w(pa,wo,null),e(wo,bf),e(wo,ma),e(ma,yf),e(ma,Bl),e(Bl,Tf),e(ma,kf),g(o,Ac,_),g(o,Mo,_),w(ha,Mo,null),e(Mo,vf),e(Mo,ua),e(ua,wf),e(ua,bi),e(bi,Mf),e(ua,Nf),g(o,Zc,_),g(o,No,_),e(No,pn),e(pn,Gl),w(fa,Gl,null),e(No,Ff),e(No,Ol),e(Ol,xf),g(o,Sc,_),g(o,it,_),w(ga,it,null),e(it,$f),e(it,Vl),e(Vl,Xf),e(it,Lf),e(it,_a),e(_a,jf),e(_a,yi),e(yi,Cf),e(_a,Ef),e(it,Uf),e(it,ba),e(ba,zf),e(ba,ya),e(ya,Jf),e(ba,If),e(it,qf),e(it,Nt),w(Ta,Nt,null),e(Nt,Wf),e(Nt,Fo),e(Fo,Af),e(Fo,Ti),e(Ti,Zf),e(Fo,Sf),e(Fo,Ql),e(Ql,Bf),e(Fo,Gf),e(Nt,Of),w(mn,Nt,null),e(Nt,Vf),w(hn,Nt,null),g(o,Bc,_),g(o,xo,_),e(xo,un),e(un,Rl),w(ka,Rl,null),e(xo,Qf),e(xo,Hl),e(Hl,Rf),g(o,Gc,_),g(o,lt,_),w(va,lt,null),e(lt,Hf),e(lt,Pl),e(Pl,Pf),e(lt,Df),e(lt,wa),e(wa,Yf),e(wa,ki),e(ki,Kf),e(wa,eg),e(lt,tg),e(lt,Ma),e(Ma,og),e(Ma,Na),e(Na,ng),e(Ma,sg),e(lt,ag),e(lt,Ft),w(Fa,Ft,null),e(Ft,rg),e(Ft,$o),e($o,ig),e($o,vi),e(vi,lg),e($o,dg),e($o,Dl),e(Dl,cg),e($o,pg),e(Ft,mg),w(fn,Ft,null),e(Ft,hg),w(gn,Ft,null),g(o,Oc,_),g(o,Xo,_),e(Xo,_n),e(_n,Yl),w(xa,Yl,null),e(Xo,ug),e(Xo,Kl),e(Kl,fg),g(o,Vc,_),g(o,dt,_),w($a,dt,null),e(dt,gg),e(dt,ed),e(ed,_g),e(dt,bg),e(dt,Xa),e(Xa,yg),e(Xa,wi),e(wi,Tg),e(Xa,kg),e(dt,vg),e(dt,La),e(La,wg),e(La,ja),e(ja,Mg),e(La,Ng),e(dt,Fg),e(dt,gt),w(Ca,gt,null),e(gt,xg),e(gt,Lo),e(Lo,$g),e(Lo,Mi),e(Mi,Xg),e(Lo,Lg),e(Lo,td),e(td,jg),e(Lo,Cg),e(gt,Eg),w(bn,gt,null),e(gt,Ug),w(yn,gt,null),e(gt,zg),w(Tn,gt,null),g(o,Qc,_),g(o,jo,_),e(jo,kn),e(kn,od),w(Ea,od,null),e(jo,Jg),e(jo,nd),e(nd,Ig),g(o,Rc,_),g(o,ct,_),w(Ua,ct,null),e(ct,qg),e(ct,sd),e(sd,Wg),e(ct,Ag),e(ct,za),e(za,Zg),e(za,Ni),e(Ni,Sg),e(za,Bg),e(ct,Gg),e(ct,Ja),e(Ja,Og),e(Ja,Ia),e(Ia,Vg),e(Ja,Qg),e(ct,Rg),e(ct,xt),w(qa,xt,null),e(xt,Hg),e(xt,Co),e(Co,Pg),e(Co,Fi),e(Fi,Dg),e(Co,Yg),e(Co,ad),e(ad,Kg),e(Co,e_),e(xt,t_),w(vn,xt,null),e(xt,o_),w(wn,xt,null),g(o,Hc,_),g(o,Eo,_),e(Eo,Mn),e(Mn,rd),w(Wa,rd,null),e(Eo,n_),e(Eo,id),e(id,s_),g(o,Pc,_),g(o,pt,_),w(Aa,pt,null),e(pt,a_),e(pt,ld),e(ld,r_),e(pt,i_),e(pt,Za),e(Za,l_),e(Za,xi),e(xi,d_),e(Za,c_),e(pt,p_),e(pt,Sa),e(Sa,m_),e(Sa,Ba),e(Ba,h_),e(Sa,u_),e(pt,f_),e(pt,$t),w(Ga,$t,null),e($t,g_),e($t,Uo),e(Uo,__),e(Uo,$i),e($i,b_),e(Uo,y_),e(Uo,dd),e(dd,T_),e(Uo,k_),e($t,v_),w(Nn,$t,null),e($t,w_),w(Fn,$t,null),g(o,Dc,_),g(o,zo,_),e(zo,xn),e(xn,cd),w(Oa,cd,null),e(zo,M_),e(zo,pd),e(pd,N_),g(o,Yc,_),g(o,mt,_),w(Va,mt,null),e(mt,F_),e(mt,Jo),e(Jo,x_),e(Jo,md),e(md,$_),e(Jo,X_),e(Jo,hd),e(hd,L_),e(Jo,j_),e(mt,C_),e(mt,Qa),e(Qa,E_),e(Qa,Xi),e(Xi,U_),e(Qa,z_),e(mt,J_),e(mt,Ra),e(Ra,I_),e(Ra,Ha),e(Ha,q_),e(Ra,W_),e(mt,A_),e(mt,Xt),w(Pa,Xt,null),e(Xt,Z_),e(Xt,Io),e(Io,S_),e(Io,Li),e(Li,B_),e(Io,G_),e(Io,ud),e(ud,O_),e(Io,V_),e(Xt,Q_),w($n,Xt,null),e(Xt,R_),w(Xn,Xt,null),g(o,Kc,_),g(o,qo,_),e(qo,Ln),e(Ln,fd),w(Da,fd,null),e(qo,H_),e(qo,gd),e(gd,P_),g(o,ep,_),g(o,ht,_),w(Ya,ht,null),e(ht,D_),e(ht,Wo),e(Wo,Y_),e(Wo,_d),e(_d,K_),e(Wo,eb),e(Wo,bd),e(bd,tb),e(Wo,ob),e(ht,nb),e(ht,Ka),e(Ka,sb),e(Ka,ji),e(ji,ab),e(Ka,rb),e(ht,ib),e(ht,er),e(er,lb),e(er,tr),e(tr,db),e(er,cb),e(ht,pb),e(ht,Lt),w(or,Lt,null),e(Lt,mb),e(Lt,Ao),e(Ao,hb),e(Ao,Ci),e(Ci,ub),e(Ao,fb),e(Ao,yd),e(yd,gb),e(Ao,_b),e(Lt,bb),w(jn,Lt,null),e(Lt,yb),w(Cn,Lt,null),g(o,tp,_),g(o,Zo,_),e(Zo,En),e(En,Td),w(nr,Td,null),e(Zo,Tb),e(Zo,kd),e(kd,kb),g(o,op,_),g(o,et,_),w(sr,et,null),e(et,vb),e(et,vd),e(vd,wb),e(et,Mb),e(et,ar),e(ar,Nb),e(ar,Ei),e(Ei,Fb),e(ar,xb),e(et,$b),e(et,rr),e(rr,Xb),e(rr,ir),e(ir,Lb),e(rr,jb),e(et,Cb),w(Un,et,null),e(et,Eb),e(et,jt),w(lr,jt,null),e(jt,Ub),e(jt,So),e(So,zb),e(So,Ui),e(Ui,Jb),e(So,Ib),e(So,wd),e(wd,qb),e(So,Wb),e(jt,Ab),w(zn,jt,null),e(jt,Zb),w(Jn,jt,null),g(o,np,_),g(o,Bo,_),e(Bo,In),e(In,Md),w(dr,Md,null),e(Bo,Sb),e(Bo,Nd),e(Nd,Bb),g(o,sp,_),g(o,tt,_),w(cr,tt,null),e(tt,Gb),e(tt,Fd),e(Fd,Ob),e(tt,Vb),e(tt,pr),e(pr,Qb),e(pr,zi),e(zi,Rb),e(pr,Hb),e(tt,Pb),e(tt,mr),e(mr,Db),e(mr,hr),e(hr,Yb),e(mr,Kb),e(tt,ey),w(qn,tt,null),e(tt,ty),e(tt,Ct),w(ur,Ct,null),e(Ct,oy),e(Ct,Go),e(Go,ny),e(Go,Ji),e(Ji,sy),e(Go,ay),e(Go,xd),e(xd,ry),e(Go,iy),e(Ct,ly),w(Wn,Ct,null),e(Ct,dy),w(An,Ct,null),g(o,ap,_),g(o,Oo,_),e(Oo,Zn),e(Zn,$d),w(fr,$d,null),e(Oo,cy),e(Oo,Xd),e(Xd,py),g(o,rp,_),g(o,ot,_),w(gr,ot,null),e(ot,my),e(ot,Ld),e(Ld,hy),e(ot,uy),e(ot,_r),e(_r,fy),e(_r,Ii),e(Ii,gy),e(_r,_y),e(ot,by),e(ot,br),e(br,yy),e(br,yr),e(yr,Ty),e(br,ky),e(ot,vy),w(Sn,ot,null),e(ot,wy),e(ot,_t),w(Tr,_t,null),e(_t,My),e(_t,Vo),e(Vo,Ny),e(Vo,qi),e(qi,Fy),e(Vo,xy),e(Vo,jd),e(jd,$y),e(Vo,Xy),e(_t,Ly),w(Bn,_t,null),e(_t,jy),w(Gn,_t,null),e(_t,Cy),w(On,_t,null),g(o,ip,_),g(o,Qo,_),e(Qo,Vn),e(Vn,Cd),w(kr,Cd,null),e(Qo,Ey),e(Qo,Ed),e(Ed,Uy),g(o,lp,_),g(o,nt,_),w(vr,nt,null),e(nt,zy),e(nt,Ud),e(Ud,Jy),e(nt,Iy),e(nt,wr),e(wr,qy),e(wr,Wi),e(Wi,Wy),e(wr,Ay),e(nt,Zy),e(nt,Mr),e(Mr,Sy),e(Mr,Nr),e(Nr,By),e(Mr,Gy),e(nt,Oy),w(Qn,nt,null),e(nt,Vy),e(nt,Et),w(Fr,Et,null),e(Et,Qy),e(Et,Ro),e(Ro,Ry),e(Ro,Ai),e(Ai,Hy),e(Ro,Py),e(Ro,zd),e(zd,Dy),e(Ro,Yy),e(Et,Ky),w(Rn,Et,null),e(Et,eT),w(Hn,Et,null),g(o,dp,_),g(o,Ho,_),e(Ho,Pn),e(Pn,Jd),w(xr,Jd,null),e(Ho,tT),e(Ho,Id),e(Id,oT),g(o,cp,_),g(o,st,_),w($r,st,null),e(st,nT),e(st,qd),e(qd,sT),e(st,aT),e(st,Xr),e(Xr,rT),e(Xr,Zi),e(Zi,iT),e(Xr,lT),e(st,dT),e(st,Lr),e(Lr,cT),e(Lr,jr),e(jr,pT),e(Lr,mT),e(st,hT),w(Dn,st,null),e(st,uT),e(st,bt),w(Cr,bt,null),e(bt,fT),e(bt,Po),e(Po,gT),e(Po,Si),e(Si,_T),e(Po,bT),e(Po,Wd),e(Wd,yT),e(Po,TT),e(bt,kT),w(Yn,bt,null),e(bt,vT),w(Kn,bt,null),e(bt,wT),w(es,bt,null),g(o,pp,_),g(o,Do,_),e(Do,ts),e(ts,Ad),w(Er,Ad,null),e(Do,MT),e(Do,Zd),e(Zd,NT),g(o,mp,_),g(o,at,_),w(Ur,at,null),e(at,FT),e(at,Yo),e(Yo,xT),e(Yo,Sd),e(Sd,$T),e(Yo,XT),e(Yo,Bd),e(Bd,LT),e(Yo,jT),e(at,CT),e(at,zr),e(zr,ET),e(zr,Bi),e(Bi,UT),e(zr,zT),e(at,JT),e(at,Jr),e(Jr,IT),e(Jr,Ir),e(Ir,qT),e(Jr,WT),e(at,AT),w(os,at,null),e(at,ZT),e(at,yt),w(qr,yt,null),e(yt,ST),e(yt,Ko),e(Ko,BT),e(Ko,Gi),e(Gi,GT),e(Ko,OT),e(Ko,Gd),e(Gd,VT),e(Ko,QT),e(yt,RT),w(ns,yt,null),e(yt,HT),w(ss,yt,null),e(yt,PT),w(as,yt,null),hp=!0},p(o,[_]){const Wr={};_&2&&(Wr.$$scope={dirty:_,ctx:o}),nn.$set(Wr);const Od={};_&2&&(Od.$$scope={dirty:_,ctx:o}),rn.$set(Od);const Vd={};_&2&&(Vd.$$scope={dirty:_,ctx:o}),dn.$set(Vd);const Qd={};_&2&&(Qd.$$scope={dirty:_,ctx:o}),mn.$set(Qd);const Ar={};_&2&&(Ar.$$scope={dirty:_,ctx:o}),hn.$set(Ar);const Rd={};_&2&&(Rd.$$scope={dirty:_,ctx:o}),fn.$set(Rd);const Hd={};_&2&&(Hd.$$scope={dirty:_,ctx:o}),gn.$set(Hd);const Zr={};_&2&&(Zr.$$scope={dirty:_,ctx:o}),bn.$set(Zr);const Pd={};_&2&&(Pd.$$scope={dirty:_,ctx:o}),yn.$set(Pd);const Dd={};_&2&&(Dd.$$scope={dirty:_,ctx:o}),Tn.$set(Dd);const Yd={};_&2&&(Yd.$$scope={dirty:_,ctx:o}),vn.$set(Yd);const Sr={};_&2&&(Sr.$$scope={dirty:_,ctx:o}),wn.$set(Sr);const Kd={};_&2&&(Kd.$$scope={dirty:_,ctx:o}),Nn.$set(Kd);const ec={};_&2&&(ec.$$scope={dirty:_,ctx:o}),Fn.$set(ec);const tc={};_&2&&(tc.$$scope={dirty:_,ctx:o}),$n.$set(tc);const oc={};_&2&&(oc.$$scope={dirty:_,ctx:o}),Xn.$set(oc);const nc={};_&2&&(nc.$$scope={dirty:_,ctx:o}),jn.$set(nc);const ut={};_&2&&(ut.$$scope={dirty:_,ctx:o}),Cn.$set(ut);const Br={};_&2&&(Br.$$scope={dirty:_,ctx:o}),Un.$set(Br);const sc={};_&2&&(sc.$$scope={dirty:_,ctx:o}),zn.$set(sc);const Gr={};_&2&&(Gr.$$scope={dirty:_,ctx:o}),Jn.$set(Gr);const ac={};_&2&&(ac.$$scope={dirty:_,ctx:o}),qn.$set(ac);const Zt={};_&2&&(Zt.$$scope={dirty:_,ctx:o}),Wn.$set(Zt);const rc={};_&2&&(rc.$$scope={dirty:_,ctx:o}),An.$set(rc);const ic={};_&2&&(ic.$$scope={dirty:_,ctx:o}),Sn.$set(ic);const lc={};_&2&&(lc.$$scope={dirty:_,ctx:o}),Bn.$set(lc);const dc={};_&2&&(dc.$$scope={dirty:_,ctx:o}),Gn.$set(dc);const cc={};_&2&&(cc.$$scope={dirty:_,ctx:o}),On.$set(cc);const pc={};_&2&&(pc.$$scope={dirty:_,ctx:o}),Qn.$set(pc);const en={};_&2&&(en.$$scope={dirty:_,ctx:o}),Rn.$set(en);const mc={};_&2&&(mc.$$scope={dirty:_,ctx:o}),Hn.$set(mc);const hc={};_&2&&(hc.$$scope={dirty:_,ctx:o}),Dn.$set(hc);const Or={};_&2&&(Or.$$scope={dirty:_,ctx:o}),Yn.$set(Or);const uc={};_&2&&(uc.$$scope={dirty:_,ctx:o}),Kn.$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 vt={};_&2&&(vt.$$scope={dirty:_,ctx:o}),ns.$set(vt);const _c={};_&2&&(_c.$$scope={dirty:_,ctx:o}),ss.$set(_c);const bc={};_&2&&(bc.$$scope={dirty:_,ctx:o}),as.$set(bc)},i(o){hp||(M(l.$$.fragment,o),M(de.$$.fragment,o),M(Ts.$$.fragment,o),M(ks.$$.fragment,o),M(vs.$$.fragment,o),M(nn.$$.fragment,o),M(Ms.$$.fragment,o),M(Ns.$$.fragment,o),M(Xs.$$.fragment,o),M(js.$$.fragment,o),M(Es.$$.fragment,o),M(rn.$$.fragment,o),M(Us.$$.fragment,o),M(zs.$$.fragment,o),M(Js.$$.fragment,o),M(Ws.$$.fragment,o),M(Zs.$$.fragment,o),M(dn.$$.fragment,o),M(Ss.$$.fragment,o),M(Bs.$$.fragment,o),M(Os.$$.fragment,o),M(Qs.$$.fragment,o),M(Hs.$$.fragment,o),M(Ds.$$.fragment,o),M(Ks.$$.fragment,o),M(ta.$$.fragment,o),M(na.$$.fragment,o),M(aa.$$.fragment,o),M(ia.$$.fragment,o),M(da.$$.fragment,o),M(pa.$$.fragment,o),M(ha.$$.fragment,o),M(fa.$$.fragment,o),M(ga.$$.fragment,o),M(Ta.$$.fragment,o),M(mn.$$.fragment,o),M(hn.$$.fragment,o),M(ka.$$.fragment,o),M(va.$$.fragment,o),M(Fa.$$.fragment,o),M(fn.$$.fragment,o),M(gn.$$.fragment,o),M(xa.$$.fragment,o),M($a.$$.fragment,o),M(Ca.$$.fragment,o),M(bn.$$.fragment,o),M(yn.$$.fragment,o),M(Tn.$$.fragment,o),M(Ea.$$.fragment,o),M(Ua.$$.fragment,o),M(qa.$$.fragment,o),M(vn.$$.fragment,o),M(wn.$$.fragment,o),M(Wa.$$.fragment,o),M(Aa.$$.fragment,o),M(Ga.$$.fragment,o),M(Nn.$$.fragment,o),M(Fn.$$.fragment,o),M(Oa.$$.fragment,o),M(Va.$$.fragment,o),M(Pa.$$.fragment,o),M($n.$$.fragment,o),M(Xn.$$.fragment,o),M(Da.$$.fragment,o),M(Ya.$$.fragment,o),M(or.$$.fragment,o),M(jn.$$.fragment,o),M(Cn.$$.fragment,o),M(nr.$$.fragment,o),M(sr.$$.fragment,o),M(Un.$$.fragment,o),M(lr.$$.fragment,o),M(zn.$$.fragment,o),M(Jn.$$.fragment,o),M(dr.$$.fragment,o),M(cr.$$.fragment,o),M(qn.$$.fragment,o),M(ur.$$.fragment,o),M(Wn.$$.fragment,o),M(An.$$.fragment,o),M(fr.$$.fragment,o),M(gr.$$.fragment,o),M(Sn.$$.fragment,o),M(Tr.$$.fragment,o),M(Bn.$$.fragment,o),M(Gn.$$.fragment,o),M(On.$$.fragment,o),M(kr.$$.fragment,o),M(vr.$$.fragment,o),M(Qn.$$.fragment,o),M(Fr.$$.fragment,o),M(Rn.$$.fragment,o),M(Hn.$$.fragment,o),M(xr.$$.fragment,o),M($r.$$.fragment,o),M(Dn.$$.fragment,o),M(Cr.$$.fragment,o),M(Yn.$$.fragment,o),M(Kn.$$.fragment,o),M(es.$$.fragment,o),M(Er.$$.fragment,o),M(Ur.$$.fragment,o),M(os.$$.fragment,o),M(qr.$$.fragment,o),M(ns.$$.fragment,o),M(ss.$$.fragment,o),M(as.$$.fragment,o),hp=!0)},o(o){N(l.$$.fragment,o),N(de.$$.fragment,o),N(Ts.$$.fragment,o),N(ks.$$.fragment,o),N(vs.$$.fragment,o),N(nn.$$.fragment,o),N(Ms.$$.fragment,o),N(Ns.$$.fragment,o),N(Xs.$$.fragment,o),N(js.$$.fragment,o),N(Es.$$.fragment,o),N(rn.$$.fragment,o),N(Us.$$.fragment,o),N(zs.$$.fragment,o),N(Js.$$.fragment,o),N(Ws.$$.fragment,o),N(Zs.$$.fragment,o),N(dn.$$.fragment,o),N(Ss.$$.fragment,o),N(Bs.$$.fragment,o),N(Os.$$.fragment,o),N(Qs.$$.fragment,o),N(Hs.$$.fragment,o),N(Ds.$$.fragment,o),N(Ks.$$.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(Ta.$$.fragment,o),N(mn.$$.fragment,o),N(hn.$$.fragment,o),N(ka.$$.fragment,o),N(va.$$.fragment,o),N(Fa.$$.fragment,o),N(fn.$$.fragment,o),N(gn.$$.fragment,o),N(xa.$$.fragment,o),N($a.$$.fragment,o),N(Ca.$$.fragment,o),N(bn.$$.fragment,o),N(yn.$$.fragment,o),N(Tn.$$.fragment,o),N(Ea.$$.fragment,o),N(Ua.$$.fragment,o),N(qa.$$.fragment,o),N(vn.$$.fragment,o),N(wn.$$.fragment,o),N(Wa.$$.fragment,o),N(Aa.$$.fragment,o),N(Ga.$$.fragment,o),N(Nn.$$.fragment,o),N(Fn.$$.fragment,o),N(Oa.$$.fragment,o),N(Va.$$.fragment,o),N(Pa.$$.fragment,o),N($n.$$.fragment,o),N(Xn.$$.fragment,o),N(Da.$$.fragment,o),N(Ya.$$.fragment,o),N(or.$$.fragment,o),N(jn.$$.fragment,o),N(Cn.$$.fragment,o),N(nr.$$.fragment,o),N(sr.$$.fragment,o),N(Un.$$.fragment,o),N(lr.$$.fragment,o),N(zn.$$.fragment,o),N(Jn.$$.fragment,o),N(dr.$$.fragment,o),N(cr.$$.fragment,o),N(qn.$$.fragment,o),N(ur.$$.fragment,o),N(Wn.$$.fragment,o),N(An.$$.fragment,o),N(fr.$$.fragment,o),N(gr.$$.fragment,o),N(Sn.$$.fragment,o),N(Tr.$$.fragment,o),N(Bn.$$.fragment,o),N(Gn.$$.fragment,o),N(On.$$.fragment,o),N(kr.$$.fragment,o),N(vr.$$.fragment,o),N(Qn.$$.fragment,o),N(Fr.$$.fragment,o),N(Rn.$$.fragment,o),N(Hn.$$.fragment,o),N(xr.$$.fragment,o),N($r.$$.fragment,o),N(Dn.$$.fragment,o),N(Cr.$$.fragment,o),N(Yn.$$.fragment,o),N(Kn.$$.fragment,o),N(es.$$.fragment,o),N(Er.$$.fragment,o),N(Ur.$$.fragment,o),N(os.$$.fragment,o),N(qr.$$.fragment,o),N(ns.$$.fragment,o),N(ss.$$.fragment,o),N(as.$$.fragment,o),hp=!1},d(o){t(d),o&&t(T),o&&t(h),F(l),o&&t(_e),o&&t(q),o&&t(H),o&&t(re),F(de),o&&t(be),o&&t(Z),o&&t(U),o&&t(ue),o&&t(ye),o&&t(fe),o&&t(Te),o&&t(E),o&&t(P),o&&t(D),o&&t(ze),o&&t(ae),o&&t(yc),o&&t(oo),F(Ts),o&&t(Tc),o&&t(ft),o&&t(kc),o&&t(no),F(ks),o&&t(vc),o&&t(kt),F(vs),F(nn),o&&t(wc),o&&t(ao),F(Ms),o&&t(Mc),o&&t(Ye),F(Ns),F(Xs),F(js),F(Es),F(rn),F(Us),o&&t(Nc),o&&t(io),F(zs),o&&t(Fc),o&&t(rt),F(Js),F(Ws),F(Zs),F(dn),o&&t(xc),o&&t(po),F(Ss),o&&t($c),o&&t(mo),F(Bs),o&&t(Xc),o&&t(ho),F(Os),o&&t(Lc),o&&t(uo),F(Qs),o&&t(jc),o&&t(fo),F(Hs),o&&t(Cc),o&&t(go),F(Ds),o&&t(Ec),o&&t(_o),F(Ks),o&&t(Uc),o&&t(bo),F(ta),o&&t(zc),o&&t(yo),F(na),o&&t(Jc),o&&t(To),F(aa),o&&t(Ic),o&&t(ko),F(ia),o&&t(qc),o&&t(vo),F(da),o&&t(Wc),o&&t(wo),F(pa),o&&t(Ac),o&&t(Mo),F(ha),o&&t(Zc),o&&t(No),F(fa),o&&t(Sc),o&&t(it),F(ga),F(Ta),F(mn),F(hn),o&&t(Bc),o&&t(xo),F(ka),o&&t(Gc),o&&t(lt),F(va),F(Fa),F(fn),F(gn),o&&t(Oc),o&&t(Xo),F(xa),o&&t(Vc),o&&t(dt),F($a),F(Ca),F(bn),F(yn),F(Tn),o&&t(Qc),o&&t(jo),F(Ea),o&&t(Rc),o&&t(ct),F(Ua),F(qa),F(vn),F(wn),o&&t(Hc),o&&t(Eo),F(Wa),o&&t(Pc),o&&t(pt),F(Aa),F(Ga),F(Nn),F(Fn),o&&t(Dc),o&&t(zo),F(Oa),o&&t(Yc),o&&t(mt),F(Va),F(Pa),F($n),F(Xn),o&&t(Kc),o&&t(qo),F(Da),o&&t(ep),o&&t(ht),F(Ya),F(or),F(jn),F(Cn),o&&t(tp),o&&t(Zo),F(nr),o&&t(op),o&&t(et),F(sr),F(Un),F(lr),F(zn),F(Jn),o&&t(np),o&&t(Bo),F(dr),o&&t(sp),o&&t(tt),F(cr),F(qn),F(ur),F(Wn),F(An),o&&t(ap),o&&t(Oo),F(fr),o&&t(rp),o&&t(ot),F(gr),F(Sn),F(Tr),F(Bn),F(Gn),F(On),o&&t(ip),o&&t(Qo),F(kr),o&&t(lp),o&&t(nt),F(vr),F(Qn),F(Fr),F(Rn),F(Hn),o&&t(dp),o&&t(Ho),F(xr),o&&t(cp),o&&t(st),F($r),F(Dn),F(Cr),F(Yn),F(Kn),F(es),o&&t(pp),o&&t(Do),F(Er),o&&t(mp),o&&t(at),F(Ur),F(os),F(qr),F(ns),F(ss),F(as)}}}const HM={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 PM(L){return lM(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class n0 extends sM{constructor(d){super();aM(this,d,PM,RM,rM,{})}}export{n0 as default,HM as metadata};
