import{s as Dr,o as Kr,n as J}from"../chunks/scheduler.9bc65507.js";import{S as el,i as tl,g as s,s as l,u as T,A as ol,h as a,f as t,c as i,j as _,v,y as p,k as h,o as n,a as d,w as b,d as y,t as M,x as w}from"../chunks/index.78c82d43.js";import{T as ie}from"../chunks/Tip.87d55b76.js";import{D as z}from"../chunks/Docstring.f3d04bd2.js";import{C as $e}from"../chunks/CodeBlock.48618ec2.js";import{I as G}from"../chunks/IconCopyLink.bedaa44d.js";import{E as xe}from"../chunks/ExampleCodeBlock.872b014d.js";function nl(L){let o,g='TransformerXL does <strong>not</strong> work with <em>torch.nn.DataParallel</em> due to a bug in PyTorch, see <a href="https://github.com/pytorch/pytorch/issues/36035" rel="nofollow">issue #36035</a>';return{c(){o=s("p"),o.innerHTML=g},l(m){o=a(m,"P",{"data-svelte-h":!0}),p(o)!=="svelte-17chyfm"&&(o.innerHTML=g)},m(m,f){d(m,o,f)},p:J,d(m){m&&t(o)}}}function sl(L){let o,g="Examples:",m,f,$;return f=new $e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFRyYW5zZm9YTENvbmZpZyUyQyUyMFRyYW5zZm9YTE1vZGVsJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMFRyYW5zZm9ybWVyJTIwWEwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMFRyYW5zZm9YTENvbmZpZygpJTBBJTBBJTIzJTIwSW5pdGlhbGl6aW5nJTIwYSUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUyMGZyb20lMjB0aGUlMjBjb25maWd1cmF0aW9uJTBBbW9kZWwlMjAlM0QlMjBUcmFuc2ZvWExNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> TransfoXLConfig, TransfoXLModel

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

<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 = TransfoXLModel(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(){o=s("p"),o.textContent=g,m=l(),T(f.$$.fragment)},l(r){o=a(r,"P",{"data-svelte-h":!0}),p(o)!=="svelte-kvfsh7"&&(o.textContent=g),m=i(r),v(f.$$.fragment,r)},m(r,x){d(r,o,x),d(r,m,x),b(f,r,x),$=!0},p:J,i(r){$||(y(f.$$.fragment,r),$=!0)},o(r){M(f.$$.fragment,r),$=!1},d(r){r&&(t(o),t(m)),w(f,r)}}}function al(L){let o,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=s("p"),o.innerHTML=g},l(m){o=a(m,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=g)},m(m,f){d(m,o,f)},p:J,d(m){m&&t(o)}}}function rl(L){let o,g="Example:",m,f,$;return f=new $e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBUcmFuc2ZvWExNb2RlbCUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIydHJhbnNmby14bC13dDEwMyUyMiklMEFtb2RlbCUyMCUzRCUyMFRyYW5zZm9YTE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJ0cmFuc2ZvLXhsLXd0MTAzJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TransfoXLModel
<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;transfo-xl-wt103&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TransfoXLModel.from_pretrained(<span class="hljs-string">&quot;transfo-xl-wt103&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(){o=s("p"),o.textContent=g,m=l(),T(f.$$.fragment)},l(r){o=a(r,"P",{"data-svelte-h":!0}),p(o)!=="svelte-11lpom8"&&(o.textContent=g),m=i(r),v(f.$$.fragment,r)},m(r,x){d(r,o,x),d(r,m,x),b(f,r,x),$=!0},p:J,i(r){$||(y(f.$$.fragment,r),$=!0)},o(r){M(f.$$.fragment,r),$=!1},d(r){r&&(t(o),t(m)),w(f,r)}}}function ll(L){let o,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=s("p"),o.innerHTML=g},l(m){o=a(m,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=g)},m(m,f){d(m,o,f)},p:J,d(m){m&&t(o)}}}function il(L){let o,g="Example:",m,f,$;return f=new $e({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFRyYW5zZm9YTExNSGVhZE1vZGVsJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIydHJhbnNmby14bC13dDEwMyUyMiklMEFtb2RlbCUyMCUzRCUyMFRyYW5zZm9YTExNSGVhZE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJ0cmFuc2ZvLXhsLXd0MTAzJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RpbnB1dHMlNUIlMjJpbnB1dF9pZHMlMjIlNUQpJTBBbG9zcyUyMCUzRCUyMG91dHB1dHMubG9zcyUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",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, TransfoXLLMHeadModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;transfo-xl-wt103&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TransfoXLLMHeadModel.from_pretrained(<span class="hljs-string">&quot;transfo-xl-wt103&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, labels=inputs[<span class="hljs-string">&quot;input_ids&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){o=s("p"),o.textContent=g,m=l(),T(f.$$.fragment)},l(r){o=a(r,"P",{"data-svelte-h":!0}),p(o)!=="svelte-11lpom8"&&(o.textContent=g),m=i(r),v(f.$$.fragment,r)},m(r,x){d(r,o,x),d(r,m,x),b(f,r,x),$=!0},p:J,i(r){$||(y(f.$$.fragment,r),$=!0)},o(r){M(f.$$.fragment,r),$=!1},d(r){r&&(t(o),t(m)),w(f,r)}}}function dl(L){let o,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=s("p"),o.innerHTML=g},l(m){o=a(m,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=g)},m(m,f){d(m,o,f)},p:J,d(m){m&&t(o)}}}function cl(L){let o,g="Example of single-label classification:",m,f,$;return f=new $e({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFRyYW5zZm9YTEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ0cmFuc2ZvLXhsLXd0MTAzJTIyKSUwQW1vZGVsJTIwJTNEJTIwVHJhbnNmb1hMRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIydHJhbnNmby14bC13dDEwMyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWQlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KCkuaXRlbSgpJTBBJTBBJTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwVHJhbnNmb1hMRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIydHJhbnNmby14bC13dDEwMyUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, TransfoXLForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;transfo-xl-wt103&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TransfoXLForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;transfo-xl-wt103&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 = TransfoXLForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;transfo-xl-wt103&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(){o=s("p"),o.textContent=g,m=l(),T(f.$$.fragment)},l(r){o=a(r,"P",{"data-svelte-h":!0}),p(o)!=="svelte-ykxpe4"&&(o.textContent=g),m=i(r),v(f.$$.fragment,r)},m(r,x){d(r,o,x),d(r,m,x),b(f,r,x),$=!0},p:J,i(r){$||(y(f.$$.fragment,r),$=!0)},o(r){M(f.$$.fragment,r),$=!1},d(r){r&&(t(o),t(m)),w(f,r)}}}function ml(L){let o,g="Example of multi-label classification:",m,f,$;return f=new $e({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFRyYW5zZm9YTEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ0cmFuc2ZvLXhsLXd0MTAzJTIyKSUwQW1vZGVsJTIwJTNEJTIwVHJhbnNmb1hMRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIydHJhbnNmby14bC13dDEwMyUyMiUyQyUyMHByb2JsZW1fdHlwZSUzRCUyMm11bHRpX2xhYmVsX2NsYXNzaWZpY2F0aW9uJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZHMlMjAlM0QlMjB0b3JjaC5hcmFuZ2UoMCUyQyUyMGxvZ2l0cy5zaGFwZSU1Qi0xJTVEKSU1QnRvcmNoLnNpZ21vaWQobG9naXRzKS5zcXVlZXplKGRpbSUzRDApJTIwJTNFJTIwMC41JTVEJTBBJTBBJTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwVHJhbnNmb1hMRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIydHJhbnNmby14bC13dDEwMyUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, TransfoXLForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;transfo-xl-wt103&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TransfoXLForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;transfo-xl-wt103&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 = TransfoXLForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;transfo-xl-wt103&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(){o=s("p"),o.textContent=g,m=l(),T(f.$$.fragment)},l(r){o=a(r,"P",{"data-svelte-h":!0}),p(o)!=="svelte-1l8e32d"&&(o.textContent=g),m=i(r),v(f.$$.fragment,r)},m(r,x){d(r,o,x),d(r,m,x),b(f,r,x),$=!0},p:J,i(r){$||(y(f.$$.fragment,r),$=!0)},o(r){M(f.$$.fragment,r),$=!1},d(r){r&&(t(o),t(m)),w(f,r)}}}function fl(L){let o,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",m,f,$="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",r,x,W=`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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,q,C,ee=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,j,X,te=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){o=s("p"),o.innerHTML=g,m=l(),f=s("ul"),f.innerHTML=$,r=l(),x=s("p"),x.innerHTML=W,q=l(),C=s("ul"),C.innerHTML=ee,j=l(),X=s("p"),X.innerHTML=te},l(u){o=a(u,"P",{"data-svelte-h":!0}),p(o)!=="svelte-1ajbfxg"&&(o.innerHTML=g),m=i(u),f=a(u,"UL",{"data-svelte-h":!0}),p(f)!=="svelte-qm1t26"&&(f.innerHTML=$),r=i(u),x=a(u,"P",{"data-svelte-h":!0}),p(x)!=="svelte-1v9qsc5"&&(x.innerHTML=W),q=i(u),C=a(u,"UL",{"data-svelte-h":!0}),p(C)!=="svelte-15scerc"&&(C.innerHTML=ee),j=i(u),X=a(u,"P",{"data-svelte-h":!0}),p(X)!=="svelte-1an3odd"&&(X.innerHTML=te)},m(u,k){d(u,o,k),d(u,m,k),d(u,f,k),d(u,r,k),d(u,x,k),d(u,q,k),d(u,C,k),d(u,j,k),d(u,X,k)},p:J,d(u){u&&(t(o),t(m),t(f),t(r),t(x),t(q),t(C),t(j),t(X))}}}function pl(L){let o,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=s("p"),o.innerHTML=g},l(m){o=a(m,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=g)},m(m,f){d(m,o,f)},p:J,d(m){m&&t(o)}}}function hl(L){let o,g="Example:",m,f,$;return f=new $e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlRyYW5zZm9YTE1vZGVsJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ0cmFuc2ZvLXhsLXd0MTAzJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZUcmFuc2ZvWExNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIydHJhbnNmby14bC13dDEwMyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFTransfoXLModel
<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;transfo-xl-wt103&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFTransfoXLModel.from_pretrained(<span class="hljs-string">&quot;transfo-xl-wt103&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(){o=s("p"),o.textContent=g,m=l(),T(f.$$.fragment)},l(r){o=a(r,"P",{"data-svelte-h":!0}),p(o)!=="svelte-11lpom8"&&(o.textContent=g),m=i(r),v(f.$$.fragment,r)},m(r,x){d(r,o,x),d(r,m,x),b(f,r,x),$=!0},p:J,i(r){$||(y(f.$$.fragment,r),$=!0)},o(r){M(f.$$.fragment,r),$=!1},d(r){r&&(t(o),t(m)),w(f,r)}}}function ul(L){let o,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",m,f,$="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",r,x,W=`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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,q,C,ee=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,j,X,te=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){o=s("p"),o.innerHTML=g,m=l(),f=s("ul"),f.innerHTML=$,r=l(),x=s("p"),x.innerHTML=W,q=l(),C=s("ul"),C.innerHTML=ee,j=l(),X=s("p"),X.innerHTML=te},l(u){o=a(u,"P",{"data-svelte-h":!0}),p(o)!=="svelte-1ajbfxg"&&(o.innerHTML=g),m=i(u),f=a(u,"UL",{"data-svelte-h":!0}),p(f)!=="svelte-qm1t26"&&(f.innerHTML=$),r=i(u),x=a(u,"P",{"data-svelte-h":!0}),p(x)!=="svelte-1v9qsc5"&&(x.innerHTML=W),q=i(u),C=a(u,"UL",{"data-svelte-h":!0}),p(C)!=="svelte-15scerc"&&(C.innerHTML=ee),j=i(u),X=a(u,"P",{"data-svelte-h":!0}),p(X)!=="svelte-1an3odd"&&(X.innerHTML=te)},m(u,k){d(u,o,k),d(u,m,k),d(u,f,k),d(u,r,k),d(u,x,k),d(u,q,k),d(u,C,k),d(u,j,k),d(u,X,k)},p:J,d(u){u&&(t(o),t(m),t(f),t(r),t(x),t(q),t(C),t(j),t(X))}}}function gl(L){let o,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=s("p"),o.innerHTML=g},l(m){o=a(m,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=g)},m(m,f){d(m,o,f)},p:J,d(m){m&&t(o)}}}function _l(L){let o,g="Example:",m,f,$;return f=new $e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlRyYW5zZm9YTExNSGVhZE1vZGVsJTBBaW1wb3J0JTIwdGVuc29yZmxvdyUyMGFzJTIwdGYlMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJ0cmFuc2ZvLXhsLXd0MTAzJTIyKSUwQW1vZGVsJTIwJTNEJTIwVEZUcmFuc2ZvWExMTUhlYWRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIydHJhbnNmby14bC13dDEwMyUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIydGYlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKGlucHV0cyklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFTransfoXLLMHeadModel
<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;transfo-xl-wt103&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFTransfoXLLMHeadModel.from_pretrained(<span class="hljs-string">&quot;transfo-xl-wt103&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;tf&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){o=s("p"),o.textContent=g,m=l(),T(f.$$.fragment)},l(r){o=a(r,"P",{"data-svelte-h":!0}),p(o)!=="svelte-11lpom8"&&(o.textContent=g),m=i(r),v(f.$$.fragment,r)},m(r,x){d(r,o,x),d(r,m,x),b(f,r,x),$=!0},p:J,i(r){$||(y(f.$$.fragment,r),$=!0)},o(r){M(f.$$.fragment,r),$=!1},d(r){r&&(t(o),t(m)),w(f,r)}}}function Tl(L){let o,g="TensorFlow models and layers in <code>transformers</code> accept two formats as input:",m,f,$="<li>having all inputs as keyword arguments (like PyTorch models), or</li> <li>having all inputs as a list, tuple or dict in the first positional argument.</li>",r,x,W=`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 <code>model.fit()</code> things should “just work” for you - just
pass your inputs and labels in any format that <code>model.fit()</code> supports! If, however, you want to use the second
format outside of Keras methods like <code>fit()</code> and <code>predict()</code>, such as when creating your own layers or models with
the Keras <code>Functional</code> API, there are three possibilities you can use to gather all the input Tensors in the first
positional argument:`,q,C,ee=`<li>a single Tensor with <code>input_ids</code> only and nothing else: <code>model(input_ids)</code></li> <li>a list of varying length with one or several input Tensors IN THE ORDER given in the docstring:
<code>model([input_ids, attention_mask])</code> or <code>model([input_ids, attention_mask, token_type_ids])</code></li> <li>a dictionary with one or several input Tensors associated to the input names given in the docstring:
<code>model({&quot;input_ids&quot;: input_ids, &quot;token_type_ids&quot;: token_type_ids})</code></li>`,j,X,te=`Note that when creating models and layers with
<a href="https://keras.io/guides/making_new_layers_and_models_via_subclassing/" rel="nofollow">subclassing</a> then you don’t need to worry
about any of this, as you can just pass inputs like you would to any other Python function!`;return{c(){o=s("p"),o.innerHTML=g,m=l(),f=s("ul"),f.innerHTML=$,r=l(),x=s("p"),x.innerHTML=W,q=l(),C=s("ul"),C.innerHTML=ee,j=l(),X=s("p"),X.innerHTML=te},l(u){o=a(u,"P",{"data-svelte-h":!0}),p(o)!=="svelte-1ajbfxg"&&(o.innerHTML=g),m=i(u),f=a(u,"UL",{"data-svelte-h":!0}),p(f)!=="svelte-qm1t26"&&(f.innerHTML=$),r=i(u),x=a(u,"P",{"data-svelte-h":!0}),p(x)!=="svelte-1v9qsc5"&&(x.innerHTML=W),q=i(u),C=a(u,"UL",{"data-svelte-h":!0}),p(C)!=="svelte-15scerc"&&(C.innerHTML=ee),j=i(u),X=a(u,"P",{"data-svelte-h":!0}),p(X)!=="svelte-1an3odd"&&(X.innerHTML=te)},m(u,k){d(u,o,k),d(u,m,k),d(u,f,k),d(u,r,k),d(u,x,k),d(u,q,k),d(u,C,k),d(u,j,k),d(u,X,k)},p:J,d(u){u&&(t(o),t(m),t(f),t(r),t(x),t(q),t(C),t(j),t(X))}}}function vl(L){let o,g=`Although the recipe for forward pass needs to be defined within this function, one should call the <code>Module</code>
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`;return{c(){o=s("p"),o.innerHTML=g},l(m){o=a(m,"P",{"data-svelte-h":!0}),p(o)!=="svelte-fincs2"&&(o.innerHTML=g)},m(m,f){d(m,o,f)},p:J,d(m){m&&t(o)}}}function bl(L){let o,g="Example:",m,f,$;return f=new $e({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBURlRyYW5zZm9YTEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEFpbXBvcnQlMjB0ZW5zb3JmbG93JTIwYXMlMjB0ZiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMnRyYW5zZm8teGwtd3QxMDMlMjIpJTBBbW9kZWwlMjAlM0QlMjBURlRyYW5zZm9YTEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMnRyYW5zZm8teGwtd3QxMDMlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnRmJTIyKSUwQSUwQWxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWQlMjAlM0QlMjBpbnQodGYubWF0aC5hcmdtYXgobG9naXRzJTJDJTIwYXhpcyUzRC0xKSU1QjAlNUQp",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, TFTransfoXLForSequenceClassification
<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;transfo-xl-wt103&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = TFTransfoXLForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;transfo-xl-wt103&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(){o=s("p"),o.textContent=g,m=l(),T(f.$$.fragment)},l(r){o=a(r,"P",{"data-svelte-h":!0}),p(o)!=="svelte-11lpom8"&&(o.textContent=g),m=i(r),v(f.$$.fragment,r)},m(r,x){d(r,o,x),d(r,m,x),b(f,r,x),$=!0},p:J,i(r){$||(y(f.$$.fragment,r),$=!0)},o(r){M(f.$$.fragment,r),$=!1},d(r){r&&(t(o),t(m)),w(f,r)}}}function yl(L){let o,g;return o=new $e({props:{code:"JTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwVEZUcmFuc2ZvWExGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJ0cmFuc2ZvLXhsLXd0MTAzJTIyJTJDJTIwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdGYuY29uc3RhbnQoMSklMEFsb3NzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpLmxvc3M=",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 = TFTransfoXLForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;transfo-xl-wt103&quot;</span>, num_labels=num_labels)\n\n<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tf.constant(<span class="hljs-number">1</span>)\n<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss'}}),{c(){T(o.$$.fragment)},l(m){v(o.$$.fragment,m)},m(m,f){b(o,m,f),g=!0},p:J,i(m){g||(y(o.$$.fragment,m),g=!0)},o(m){M(o.$$.fragment,m),g=!1},d(m){w(o,m)}}}function Ml(L){let o,g,m,f,$,r,x,W,q,C,ee="Transformer XL",j,X,te='<a href="https://huggingface.co/models?filter=transfo-xl"><img alt="Models" src="https://img.shields.io/badge/All_model_pages-transfo--xl-blueviolet"/></a> <a href="https://huggingface.co/spaces/docs-demos/transfo-xl-wt103"><img alt="Spaces" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue"/></a>',u,k,Le,Oo,lt,hs,to,Ha="Overview",Mn,it,Ja=`The Transformer-XL model was proposed in <a href="https://arxiv.org/abs/1901.02860" rel="nofollow">Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context</a> by Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc V. Le, Ruslan
Salakhutdinov. It’s a causal (uni-directional) transformer with relative positioning (sinusoïdal) embeddings which can
reuse previously computed hidden-states to attend to longer context (memory). This model also uses adaptive softmax
inputs and outputs (tied).`,wn,dt,qa="The abstract from the paper is the following:",xn,ct,Na=`<em>Transformers have a potential of learning longer-term dependency, but are limited by a fixed-length context in the
setting of language modeling. We propose a novel neural architecture Transformer-XL that enables learning dependency
beyond a fixed length without disrupting temporal coherence. It consists of a segment-level recurrence mechanism and a
novel positional encoding scheme. Our method not only enables capturing longer-term dependency, but also resolves the
context fragmentation problem. As a result, Transformer-XL learns dependency that is 80% longer than RNNs and 450%
longer than vanilla Transformers, achieves better performance on both short and long sequences, and is up to 1,800+
times faster than vanilla Transformers during evaluation. Notably, we improve the state-of-the-art results of
bpc/perplexity to 0.99 on enwiki8, 1.08 on text8, 18.3 on WikiText-103, 21.8 on One Billion Word, and 54.5 on Penn
Treebank (without finetuning). When trained only on WikiText-103, Transformer-XL manages to generate reasonably
coherent, novel text articles with thousands of tokens.</em>`,$n,mt,Ua="Tips:",Ln,ft,Wa=`<li>Transformer-XL uses relative sinusoidal positional embeddings. Padding can be done on the left or on the right. The
original implementation trains on SQuAD with padding on the left, therefore the padding defaults are set to left.</li> <li>Transformer-XL is one of the few models that has no sequence length limit.</li> <li>Same as a regular GPT model, but introduces a recurrence mechanism for two consecutive segments (similar to a regular RNNs with two consecutive inputs). In this context, a segment is a number of consecutive tokens (for instance 512) that may span across multiple documents, and segments are fed in order to the model.</li> <li>Basically, the hidden states of the previous segment are concatenated to the current input to compute the attention scores. This allows the model to pay attention to information that was in the previous segment as well as the current one. By stacking multiple attention layers, the receptive field can be increased to multiple previous segments.</li> <li>This changes the positional embeddings to positional relative embeddings (as the regular positional embeddings would give the same results in the current input and the current hidden state at a given position) and needs to make some adjustments in the way attention scores are computed.</li>`,kn,pt,Ia='This model was contributed by <a href="https://huggingface.co/thomwolf" rel="nofollow">thomwolf</a>. The original code can be found <a href="https://github.com/kimiyoung/transformer-xl" rel="nofollow">here</a>.',Xn,ke,Cn,de,Xe,Do,ht,us,oo,Za="Documentation resources",Fn,ut,Ea='<li><a href="../tasks/sequence_classification">Text classification task guide</a></li> <li><a href="../tasks/language_modeling">Causal language modeling task guide</a></li>',zn,ce,Ce,Ko,gt,gs,no,Sa="TransfoXLConfig",jn,B,_t,_s,so,Va=`This is the configuration class to store the configuration of a <a href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TransfoXLModel">TransfoXLModel</a> or a <a href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TFTransfoXLModel">TFTransfoXLModel</a>. It is
used to instantiate a Transformer-XL model according to the specified arguments, defining the model architecture.
Instantiating a configuration with the defaults will yield a similar configuration to that of the TransfoXL
<a href="https://huggingface.co/transfo-xl-wt103" rel="nofollow">transfo-xl-wt103</a> architecture.`,Ts,ao,Pa=`Configuration objects inherit from <a href="/docs/transformers/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> and can be used to control the model outputs. Read the
documentation from <a href="/docs/transformers/v4.33.3/en/main_classes/configuration#transformers.PretrainedConfig">PretrainedConfig</a> for more information.`,vs,Fe,Hn,me,ze,en,Tt,bs,ro,Ba="TransfoXLTokenizer",Jn,R,vt,ys,lo,Ra=`Construct a Transformer-XL tokenizer adapted from Vocab class in <a href="https://github.com/kimiyoung/transformer-xl" rel="nofollow">the original
code</a>. The Transformer-XL tokenizer is a word-level tokenizer (no
sub-word tokenization).`,Ms,io,Ga=`This tokenizer inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizer">PreTrainedTokenizer</a> which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`,ws,co,bt,qn,fe,je,tn,yt,xs,mo,Ya="TransfoXL specific outputs",Nn,pe,Mt,$s,fo,Aa="Base class for model’s outputs that may also contain a past key/values (to speed up sequential decoding).",Un,he,wt,Ls,po,Qa="Base class for model’s outputs that may also contain a past key/values (to speed up sequential decoding).",Wn,ue,xt,ks,ho,Oa="Base class for model’s outputs that may also contain a past key/values (to speed up sequential decoding).",In,ge,$t,Xs,uo,Da="Base class for model’s outputs that may also contain a past key/values (to speed up sequential decoding).",Zn,_e,He,on,Lt,Cs,go,Ka="TransfoXLModel",En,Z,kt,Fs,_o,er="The bare Bert Model transformer outputting raw hidden-states without any specific head on top.",zs,To,tr=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,js,vo,or=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Hs,Y,Xt,Js,bo,nr='The <a href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TransfoXLModel">TransfoXLModel</a> forward method, overrides the <code>__call__</code> special method.',qs,Je,Ns,qe,Sn,Te,Ne,nn,Ct,Us,yo,sr="TransfoXLLMHeadModel",Vn,E,Ft,Ws,Mo,ar=`The Transformer-XL Model with a language modeling head on top (adaptive softmax with weights tied to the adaptive
input embeddings)`,Is,wo,rr=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,Zs,xo,lr=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Es,A,zt,Ss,$o,ir='The <a href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TransfoXLLMHeadModel">TransfoXLLMHeadModel</a> forward method, overrides the <code>__call__</code> special method.',Vs,Ue,Ps,We,Pn,ve,Ie,sn,jt,Bs,Lo,dr="TransfoXLForSequenceClassification",Bn,H,Ht,Rs,ko,cr="The Transformer-XL Model transformer with a sequence classification head on top (linear layer).",Gs,Xo,mr=`<a href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TransfoXLForSequenceClassification">TransfoXLForSequenceClassification</a> uses the last token in order to do the classification, as other causal
models (e.g. GPT-1) do.`,Ys,Co,fr=`Since it does classification on the last token, it requires to know the position of the last token. If a
<code>pad_token_id</code> is defined in the configuration, it finds the last token that is not a padding token in each row. If
no <code>pad_token_id</code> is defined, it simply takes the last value in each row of the batch. Since it cannot guess the
padding tokens when <code>inputs_embeds</code> are passed instead of <code>input_ids</code>, it does the same (take the last value in
each row of the batch).`,As,Fo,pr=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.PreTrainedModel">PreTrainedModel</a>. 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.)`,Qs,zo,hr=`This model is also a PyTorch <a href="https://pytorch.org/docs/stable/nn.html#torch.nn.Module" rel="nofollow">torch.nn.Module</a> subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`,Os,S,Jt,Ds,jo,ur='The <a href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TransfoXLForSequenceClassification">TransfoXLForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',Ks,Ze,ea,Ee,ta,Se,Rn,be,Ve,an,qt,oa,Ho,gr="TFTransfoXLModel",Gn,N,Nt,na,Jo,_r="The bare Bert Model transformer outputting raw hidden-states without any specific head on top.",sa,qo,Tr=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. 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.)`,aa,No,vr=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">tf.keras.Model</a> 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.`,ra,Pe,la,Q,Ut,ia,Uo,br='The <a href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TFTransfoXLModel">TFTransfoXLModel</a> forward method, overrides the <code>__call__</code> special method.',da,Be,ca,Re,Yn,ye,Ge,rn,Wt,ma,Wo,yr="TFTransfoXLLMHeadModel",An,U,It,fa,Io,Mr=`The Transformer-XL Model with a language modeling head on top (adaptive softmax with weights tied to the adaptive
input embeddings)`,pa,Zo,wr=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. 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.)`,ha,Eo,xr=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">tf.keras.Model</a> 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.`,ua,Ye,ga,O,Zt,_a,So,$r='The <a href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TFTransfoXLLMHeadModel">TFTransfoXLLMHeadModel</a> forward method, overrides the <code>__call__</code> special method.',Ta,Ae,va,Qe,Qn,Me,Oe,ln,Et,ba,Vo,Lr="TFTransfoXLForSequenceClassification",On,F,St,ya,Po,kr="The Transfo XL Model transformer with a sequence classification head on top (linear layer).",Ma,Bo,Xr=`<a href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TFTransfoXLForSequenceClassification">TFTransfoXLForSequenceClassification</a> uses the last token in order to do the classification, as other causal
models (e.g. GPT-1,GPT-2) do.`,wa,Ro,Cr=`Since it does classification on the last token, it requires to know the position of the last token. If a
<code>pad_token_id</code> is defined in the configuration, it finds the last token that is not a padding token in each row. If
no <code>pad_token_id</code> is defined, it simply takes the last value in each row of the batch. Since it cannot guess the
padding tokens when <code>inputs_embeds</code> are passed instead of <code>input_ids</code>, it does the same (take the last value in
each row of the batch).`,xa,Go,Fr=`This model inherits from <a href="/docs/transformers/v4.33.3/en/main_classes/model#transformers.TFPreTrainedModel">TFPreTrainedModel</a>. 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.)`,$a,Yo,zr=`This model is also a <a href="https://www.tensorflow.org/api_docs/python/tf/keras/Model" rel="nofollow">tf.keras.Model</a> 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.`,La,De,ka,V,Vt,Xa,Ao,jr='The <a href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TFTransfoXLForSequenceClassification">TFTransfoXLForSequenceClassification</a> forward method, overrides the <code>__call__</code> special method.',Ca,Ke,Fa,et,za,tt,Dn,we,ot,dn,Pt,ja,Qo,Hr="Internal Layers",Kn,Bt,Rt,es,Gt,Yt,ts,cn,os;return W=new G({}),lt=new G({}),ke=new ie({props:{warning:!0,$$slots:{default:[nl]},$$scope:{ctx:L}}}),ht=new G({}),gt=new G({}),_t=new z({props:{name:"class transformers.TransfoXLConfig",anchor:"transformers.TransfoXLConfig",parameters:[{name:"vocab_size",val:" = 267735"},{name:"cutoffs",val:" = [20000, 40000, 200000]"},{name:"d_model",val:" = 1024"},{name:"d_embed",val:" = 1024"},{name:"n_head",val:" = 16"},{name:"d_head",val:" = 64"},{name:"d_inner",val:" = 4096"},{name:"div_val",val:" = 4"},{name:"pre_lnorm",val:" = False"},{name:"n_layer",val:" = 18"},{name:"mem_len",val:" = 1600"},{name:"clamp_len",val:" = 1000"},{name:"same_length",val:" = True"},{name:"proj_share_all_but_first",val:" = True"},{name:"attn_type",val:" = 0"},{name:"sample_softmax",val:" = -1"},{name:"adaptive",val:" = True"},{name:"dropout",val:" = 0.1"},{name:"dropatt",val:" = 0.0"},{name:"untie_r",val:" = True"},{name:"init",val:" = 'normal'"},{name:"init_range",val:" = 0.01"},{name:"proj_init_std",val:" = 0.01"},{name:"init_std",val:" = 0.02"},{name:"layer_norm_epsilon",val:" = 1e-05"},{name:"eos_token_id",val:" = 0"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TransfoXLConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 267735) &#x2014;
Vocabulary size of the BERT model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TransfoXLModel">TransfoXLModel</a> or <a href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TFTransfoXLModel">TFTransfoXLModel</a>.`,name:"vocab_size"},{anchor:"transformers.TransfoXLConfig.cutoffs",description:`<strong>cutoffs</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[20000, 40000, 200000]</code>) &#x2014;
Cutoffs for the adaptive softmax.`,name:"cutoffs"},{anchor:"transformers.TransfoXLConfig.d_model",description:`<strong>d_model</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimensionality of the model&#x2019;s hidden states.`,name:"d_model"},{anchor:"transformers.TransfoXLConfig.d_embed",description:`<strong>d_embed</strong> (<code>int</code>, <em>optional</em>, defaults to 1024) &#x2014;
Dimensionality of the embeddings`,name:"d_embed"},{anchor:"transformers.TransfoXLConfig.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.TransfoXLConfig.d_head",description:`<strong>d_head</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Dimensionality of the model&#x2019;s heads.`,name:"d_head"},{anchor:"transformers.TransfoXLConfig.d_inner",description:`<strong>d_inner</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
Inner dimension in FF`,name:"d_inner"},{anchor:"transformers.TransfoXLConfig.div_val",description:`<strong>div_val</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
Divident value for adapative input and softmax`,name:"div_val"},{anchor:"transformers.TransfoXLConfig.pre_lnorm",description:`<strong>pre_lnorm</strong> (<code>boolean</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to apply LayerNorm to the input instead of the output in the blocks.`,name:"pre_lnorm"},{anchor:"transformers.TransfoXLConfig.n_layer",description:`<strong>n_layer</strong> (<code>int</code>, <em>optional</em>, defaults to 18) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"n_layer"},{anchor:"transformers.TransfoXLConfig.mem_len",description:`<strong>mem_len</strong> (<code>int</code>, <em>optional</em>, defaults to 1600) &#x2014;
Length of the retained previous heads.`,name:"mem_len"},{anchor:"transformers.TransfoXLConfig.clamp_len",description:`<strong>clamp_len</strong> (<code>int</code>, <em>optional</em>, defaults to 1000) &#x2014;
Use the same pos embeddings after clamp_len.`,name:"clamp_len"},{anchor:"transformers.TransfoXLConfig.same_length",description:`<strong>same_length</strong> (<code>boolean</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use the same attn length for all tokens`,name:"same_length"},{anchor:"transformers.TransfoXLConfig.proj_share_all_but_first",description:`<strong>proj_share_all_but_first</strong> (<code>boolean</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
True to share all but first projs, False not to share.`,name:"proj_share_all_but_first"},{anchor:"transformers.TransfoXLConfig.attn_type",description:`<strong>attn_type</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Attention type. 0 for Transformer-XL, 1 for Shaw et al, 2 for Vaswani et al, 3 for Al Rfou et al.`,name:"attn_type"},{anchor:"transformers.TransfoXLConfig.sample_softmax",description:`<strong>sample_softmax</strong> (<code>int</code>, <em>optional</em>, defaults to -1) &#x2014;
Number of samples in the sampled softmax.`,name:"sample_softmax"},{anchor:"transformers.TransfoXLConfig.adaptive",description:`<strong>adaptive</strong> (<code>boolean</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use adaptive softmax.`,name:"adaptive"},{anchor:"transformers.TransfoXLConfig.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.TransfoXLConfig.dropatt",description:`<strong>dropatt</strong> (<code>float</code>, <em>optional</em>, defaults to 0) &#x2014;
The dropout ratio for the attention probabilities.`,name:"dropatt"},{anchor:"transformers.TransfoXLConfig.untie_r",description:`<strong>untie_r</strong> (<code>boolean</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether ot not to untie relative position biases.`,name:"untie_r"},{anchor:"transformers.TransfoXLConfig.init",description:`<strong>init</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;normal&quot;</code>) &#x2014;
Parameter initializer to use.`,name:"init"},{anchor:"transformers.TransfoXLConfig.init_range",description:`<strong>init_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.01) &#x2014;
Parameters initialized by U(-init_range, init_range).`,name:"init_range"},{anchor:"transformers.TransfoXLConfig.proj_init_std",description:`<strong>proj_init_std</strong> (<code>float</code>, <em>optional</em>, defaults to 0.01) &#x2014;
Parameters initialized by N(0, init_std)`,name:"proj_init_std"},{anchor:"transformers.TransfoXLConfig.init_std",description:`<strong>init_std</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
Parameters initialized by N(0, init_std)`,name:"init_std"},{anchor:"transformers.TransfoXLConfig.layer_norm_epsilon",description:`<strong>layer_norm_epsilon</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-5) &#x2014;
The epsilon to use in the layer normalization layers`,name:"layer_norm_epsilon"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/transfo_xl/configuration_transfo_xl.py#L29"}}),Fe=new xe({props:{anchor:"transformers.TransfoXLConfig.example",$$slots:{default:[sl]},$$scope:{ctx:L}}}),Tt=new G({}),vt=new z({props:{name:"class transformers.TransfoXLTokenizer",anchor:"transformers.TransfoXLTokenizer",parameters:[{name:"special",val:" = None"},{name:"min_freq",val:" = 0"},{name:"max_size",val:" = None"},{name:"lower_case",val:" = False"},{name:"delimiter",val:" = None"},{name:"vocab_file",val:" = None"},{name:"pretrained_vocab_file",val:": str = None"},{name:"never_split",val:" = None"},{name:"unk_token",val:" = '<unk>'"},{name:"eos_token",val:" = '<eos>'"},{name:"additional_special_tokens",val:" = ['<formula>']"},{name:"language",val:" = 'en'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TransfoXLTokenizer.special",description:`<strong>special</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
A list of special tokens (to be treated by the original implementation of this tokenizer).`,name:"special"},{anchor:"transformers.TransfoXLTokenizer.min_freq",description:`<strong>min_freq</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The minimum number of times a token has to be present in order to be kept in the vocabulary (otherwise it
will be mapped to <code>unk_token</code>).`,name:"min_freq"},{anchor:"transformers.TransfoXLTokenizer.max_size",description:`<strong>max_size</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The maximum size of the vocabulary. If left unset, it will default to the size of the vocabulary found
after excluding the tokens according to the <code>min_freq</code> rule.`,name:"max_size"},{anchor:"transformers.TransfoXLTokenizer.lower_case",description:`<strong>lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"lower_case"},{anchor:"transformers.TransfoXLTokenizer.delimiter",description:`<strong>delimiter</strong> (<code>str</code>, <em>optional</em>) &#x2014;
The delimiter used between tokens.`,name:"delimiter"},{anchor:"transformers.TransfoXLTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
File containing the vocabulary (from the original implementation).`,name:"vocab_file"},{anchor:"transformers.TransfoXLTokenizer.pretrained_vocab_file",description:`<strong>pretrained_vocab_file</strong> (<code>str</code>, <em>optional</em>) &#x2014;
File containing the vocabulary as saved with the <code>save_pretrained()</code> method.`,name:"pretrained_vocab_file"},{anchor:"transformers.TransfoXLTokenizer.never_split",description:`<strong>never_split</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
List of tokens that should never be split. If no list is specified, will simply use the existing special
tokens.`,name:"never_split"},{anchor:"transformers.TransfoXLTokenizer.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.TransfoXLTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;eos&gt;&quot;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"},{anchor:"transformers.TransfoXLTokenizer.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;&lt;formula&gt;&quot;]</code>) &#x2014;
A list of additional special tokens (for the HuggingFace functionality).`,name:"additional_special_tokens"},{anchor:"transformers.TransfoXLTokenizer.language",description:`<strong>language</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;en&quot;</code>) &#x2014;
The language of this tokenizer (used for mose preprocessing).`,name:"language"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/transfo_xl/tokenization_transfo_xl.py#L123"}}),bt=new z({props:{name:"save_vocabulary",anchor:"transformers.TransfoXLTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/transfo_xl/tokenization_transfo_xl.py#L310"}}),yt=new G({}),Mt=new z({props:{name:"class transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLModelOutput",anchor:"transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLModelOutput",parameters:[{name:"last_hidden_state",val:": FloatTensor"},{name:"mems",val:": 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.transfo_xl.modeling_transfo_xl.TransfoXLModelOutput.last_hidden_state",description:`<strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) &#x2014;
Sequence of hidden-states at the output of the last layer of the model.`,name:"last_hidden_state"},{anchor:"transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLModelOutput.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (key and values in the attention blocks). 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 input ids as they have already been computed.`,name:"mems"},{anchor:"transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLModelOutput.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.transfo_xl.modeling_transfo_xl.TransfoXLModelOutput.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.33.3/src/transformers/models/transfo_xl/modeling_transfo_xl.py#L600"}}),wt=new z({props:{name:"class transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLLMHeadModelOutput",anchor:"transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLLMHeadModelOutput",parameters:[{name:"losses",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prediction_scores",val:": FloatTensor = None"},{name:"mems",val:": 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"},{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"}],parametersDescription:[{anchor:"transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLLMHeadModelOutput.losses",description:`<strong>losses</strong> (<code>torch.FloatTensor</code> of shape <em>(batch_size, sequence_length-1)</em>, <em>optional</em>, returned when <code>labels</code> is provided) &#x2014;
Language modeling losses (not reduced).`,name:"losses"},{anchor:"transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLLMHeadModelOutput.prediction_scores",description:`<strong>prediction_scores</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) &#x2014;
Prediction scores of the language modeling head (scores for each vocabulary token after SoftMax).`,name:"prediction_scores"},{anchor:"transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLLMHeadModelOutput.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (key and values in the attention blocks). 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 input ids as they have already been computed.`,name:"mems"},{anchor:"transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLLMHeadModelOutput.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.transfo_xl.modeling_transfo_xl.TransfoXLLMHeadModelOutput.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"},{anchor:"transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLLMHeadModelOutput.loss",description:`<strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>()</code>, <em>optional</em>, returned when <code>labels</code> is provided) &#x2014;
Reduced language modeling loss.`,name:"loss"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/transfo_xl/modeling_transfo_xl.py#L665"}}),xt=new z({props:{name:"class transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLModelOutput",anchor:"transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLModelOutput",parameters:[{name:"last_hidden_state",val:": tf.Tensor = None"},{name:"mems",val:": List[tf.Tensor] = None"},{name:"hidden_states",val:": Tuple[tf.Tensor] | None = None"},{name:"attentions",val:": Tuple[tf.Tensor] | None = None"}],parametersDescription:[{anchor:"transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLModelOutput.last_hidden_state",description:`<strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) &#x2014;
Sequence of hidden-states at the output of the last layer of the model.`,name:"last_hidden_state"},{anchor:"transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLModelOutput.mems",description:`<strong>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (key and values in the attention blocks). 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 input ids as they have already been computed.`,name:"mems"},{anchor:"transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLModelOutput.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.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLModelOutput.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.33.3/src/transformers/models/transfo_xl/modeling_tf_transfo_xl.py#L673"}}),$t=new z({props:{name:"class transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLLMHeadModelOutput",anchor:"transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLLMHeadModelOutput",parameters:[{name:"prediction_scores",val:": tf.Tensor = None"},{name:"mems",val:": List[tf.Tensor] = None"},{name:"hidden_states",val:": Tuple[tf.Tensor] | None = None"},{name:"attentions",val:": Tuple[tf.Tensor] | None = None"}],parametersDescription:[{anchor:"transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLLMHeadModelOutput.losses",description:`<strong>losses</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, sequence_length-1)</em>, <em>optional</em>, returned when <code>labels</code> is provided) &#x2014;
Language modeling losses (not reduced).`,name:"losses"},{anchor:"transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLLMHeadModelOutput.prediction_scores",description:`<strong>prediction_scores</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) &#x2014;
Prediction scores of the language modeling head (scores for each vocabulary token after SoftMax).`,name:"prediction_scores"},{anchor:"transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLLMHeadModelOutput.mems",description:`<strong>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (key and values in the attention blocks). 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 input ids as they have already been computed.`,name:"mems"},{anchor:"transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLLMHeadModelOutput.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.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLLMHeadModelOutput.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.33.3/src/transformers/models/transfo_xl/modeling_tf_transfo_xl.py#L704"}}),Lt=new G({}),kt=new z({props:{name:"class transformers.TransfoXLModel",anchor:"transformers.TransfoXLModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.TransfoXLModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TransfoXLConfig">TransfoXLConfig</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.33.3/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.33.3/src/transformers/models/transfo_xl/modeling_transfo_xl.py#L764"}}),Xt=new z({props:{name:"forward",anchor:"transformers.TransfoXLModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"mems",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.TransfoXLModel.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.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TransfoXLModel.forward.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>mems</code> output below). Can be used to speed up sequential decoding. The token ids which have their mems
given to this model should not be passed as <code>input_ids</code> as they have already been computed.`,name:"mems"},{anchor:"transformers.TransfoXLModel.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.TransfoXLModel.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.TransfoXLModel.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.TransfoXLModel.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.TransfoXLModel.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.33.3/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.33.3/src/transformers/models/transfo_xl/modeling_transfo_xl.py#L867",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLModelOutput"
>transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLModelOutput</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.33.3/en/model_doc/transfo-xl#transformers.TransfoXLConfig"
>TransfoXLConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) — Contains pre-computed hidden-states (key and values in the attention blocks). 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 input ids 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>) — 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>) — 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.33.3/en/model_doc/transfo-xl#transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLModelOutput"
>transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Je=new ie({props:{$$slots:{default:[al]},$$scope:{ctx:L}}}),qe=new xe({props:{anchor:"transformers.TransfoXLModel.forward.example",$$slots:{default:[rl]},$$scope:{ctx:L}}}),Ct=new G({}),Ft=new z({props:{name:"class transformers.TransfoXLLMHeadModel",anchor:"transformers.TransfoXLLMHeadModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.TransfoXLLMHeadModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TransfoXLConfig">TransfoXLConfig</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.33.3/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.33.3/src/transformers/models/transfo_xl/modeling_transfo_xl.py#L1004"}}),zt=new z({props:{name:"forward",anchor:"transformers.TransfoXLLMHeadModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"mems",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.TransfoXLLMHeadModel.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.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TransfoXLLMHeadModel.forward.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>mems</code> output below). Can be used to speed up sequential decoding. The token ids which have their mems
given to this model should not be passed as <code>input_ids</code> as they have already been computed.`,name:"mems"},{anchor:"transformers.TransfoXLLMHeadModel.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.TransfoXLLMHeadModel.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.TransfoXLLMHeadModel.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.TransfoXLLMHeadModel.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.TransfoXLLMHeadModel.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.33.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TransfoXLLMHeadModel.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for language modeling. Note that the labels <strong>are shifted</strong> inside the model, i.e. you can set
<code>labels = input_ids</code> Indices are selected in <code>[-100, 0, ..., config.vocab_size]</code> All labels set to <code>-100</code>
are ignored (masked), the loss is only computed for labels in <code>[0, ..., config.vocab_size]</code>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/transfo_xl/modeling_transfo_xl.py#L1060",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLLMHeadModelOutput"
>transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLLMHeadModelOutput</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.33.3/en/model_doc/transfo-xl#transformers.TransfoXLConfig"
>TransfoXLConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>losses</strong> (<code>torch.FloatTensor</code> of shape <em>(batch_size, sequence_length-1)</em>, <em>optional</em>, returned when <code>labels</code> is provided) — Language modeling losses (not reduced).</p>
</li>
<li>
<p><strong>prediction_scores</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — Prediction scores of the language modeling head (scores for each vocabulary token after SoftMax).</p>
</li>
<li>
<p><strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) — Contains pre-computed hidden-states (key and values in the attention blocks). 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 input ids 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>) — 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>) — Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>()</code>, <em>optional</em>, returned when <code>labels</code> is provided)
Reduced language modeling loss.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLLMHeadModelOutput"
>transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLLMHeadModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ue=new ie({props:{$$slots:{default:[ll]},$$scope:{ctx:L}}}),We=new xe({props:{anchor:"transformers.TransfoXLLMHeadModel.forward.example",$$slots:{default:[il]},$$scope:{ctx:L}}}),jt=new G({}),Ht=new z({props:{name:"class transformers.TransfoXLForSequenceClassification",anchor:"transformers.TransfoXLForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.TransfoXLForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TransfoXLConfig">TransfoXLConfig</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.33.3/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.33.3/src/transformers/models/transfo_xl/modeling_transfo_xl.py#L1192"}}),Jt=new z({props:{name:"forward",anchor:"transformers.TransfoXLForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"mems",val:": typing.Optional[typing.List[torch.FloatTensor]] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.TransfoXLForSequenceClassification.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.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TransfoXLForSequenceClassification.forward.mems",description:`<strong>mems</strong> (<code>List[torch.FloatTensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>mems</code> output below). Can be used to speed up sequential decoding. The token ids which have their mems
given to this model should not be passed as <code>input_ids</code> as they have already been computed.`,name:"mems"},{anchor:"transformers.TransfoXLForSequenceClassification.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.TransfoXLForSequenceClassification.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.TransfoXLForSequenceClassification.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.TransfoXLForSequenceClassification.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.TransfoXLForSequenceClassification.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.33.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.TransfoXLForSequenceClassification.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.33.3/src/transformers/models/transfo_xl/modeling_transfo_xl.py#L1201",returnDescription:`
<p>A <code>transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLSequenceClassifierOutputWithPast</code> 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.33.3/en/model_doc/transfo-xl#transformers.TransfoXLConfig"
>TransfoXLConfig</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) — 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>) — 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>) — Contains pre-computed hidden-states (key and values in the attention blocks). 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 input ids 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>) — 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>) — 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><code>transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLSequenceClassifierOutputWithPast</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ze=new ie({props:{$$slots:{default:[dl]},$$scope:{ctx:L}}}),Ee=new xe({props:{anchor:"transformers.TransfoXLForSequenceClassification.forward.example",$$slots:{default:[cl]},$$scope:{ctx:L}}}),Se=new xe({props:{anchor:"transformers.TransfoXLForSequenceClassification.forward.example-2",$$slots:{default:[ml]},$$scope:{ctx:L}}}),qt=new G({}),Nt=new z({props:{name:"class transformers.TFTransfoXLModel",anchor:"transformers.TFTransfoXLModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFTransfoXLModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TransfoXLConfig">TransfoXLConfig</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.33.3/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.33.3/src/transformers/models/transfo_xl/modeling_tf_transfo_xl.py#L855"}}),Pe=new ie({props:{$$slots:{default:[fl]},$$scope:{ctx:L}}}),Ut=new z({props:{name:"call",anchor:"transformers.TFTransfoXLModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"mems",val:": List[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:"output_attentions",val:": bool | None = None"},{name:"output_hidden_states",val:": bool | None = None"},{name:"return_dict",val:": bool | None = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFTransfoXLModel.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</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.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFTransfoXLModel.call.mems",description:`<strong>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>mems</code> output below). Can be used to speed up sequential decoding. The token ids which have their mems
given to this model should not be passed as <code>input_ids</code> as they have already been computed.`,name:"mems"},{anchor:"transformers.TFTransfoXLModel.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> or <code>Numpy array</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.TFTransfoXLModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> or <code>Numpy array</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.TFTransfoXLModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFTransfoXLModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFTransfoXLModel.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.33.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFTransfoXLModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/transfo_xl/modeling_tf_transfo_xl.py#L860",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLModelOutput"
>transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLModelOutput</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.33.3/en/model_doc/transfo-xl#transformers.TransfoXLConfig"
>TransfoXLConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) — Sequence of hidden-states at the output of the last layer of the model.</p>
</li>
<li>
<p><strong>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) — Contains pre-computed hidden-states (key and values in the attention blocks). 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 input ids 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>) — 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>) — 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.33.3/en/model_doc/transfo-xl#transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLModelOutput"
>transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Be=new ie({props:{$$slots:{default:[pl]},$$scope:{ctx:L}}}),Re=new xe({props:{anchor:"transformers.TFTransfoXLModel.call.example",$$slots:{default:[hl]},$$scope:{ctx:L}}}),Wt=new G({}),It=new z({props:{name:"class transformers.TFTransfoXLLMHeadModel",anchor:"transformers.TFTransfoXLLMHeadModel",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFTransfoXLLMHeadModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TransfoXLConfig">TransfoXLConfig</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.33.3/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.33.3/src/transformers/models/transfo_xl/modeling_tf_transfo_xl.py#L899"}}),Ye=new ie({props:{$$slots:{default:[ul]},$$scope:{ctx:L}}}),Zt=new z({props:{name:"call",anchor:"transformers.TFTransfoXLLMHeadModel.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"mems",val:": List[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:"output_attentions",val:": bool | None = None"},{name:"output_hidden_states",val:": bool | None = None"},{name:"return_dict",val:": bool | None = None"},{name:"labels",val:": np.ndarray | tf.Tensor | None = None"},{name:"training",val:": bool = False"}],parametersDescription:[{anchor:"transformers.TFTransfoXLLMHeadModel.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</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.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFTransfoXLLMHeadModel.call.mems",description:`<strong>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>mems</code> output below). Can be used to speed up sequential decoding. The token ids which have their mems
given to this model should not be passed as <code>input_ids</code> as they have already been computed.`,name:"mems"},{anchor:"transformers.TFTransfoXLLMHeadModel.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> or <code>Numpy array</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.TFTransfoXLLMHeadModel.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> or <code>Numpy array</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.TFTransfoXLLMHeadModel.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFTransfoXLLMHeadModel.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFTransfoXLLMHeadModel.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.33.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFTransfoXLLMHeadModel.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/transfo_xl/modeling_tf_transfo_xl.py#L928",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLLMHeadModelOutput"
>transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLLMHeadModelOutput</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.33.3/en/model_doc/transfo-xl#transformers.TransfoXLConfig"
>TransfoXLConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>losses</strong> (<code>tf.Tensor</code> of shape <em>(batch_size, sequence_length-1)</em>, <em>optional</em>, returned when <code>labels</code> is provided) — Language modeling losses (not reduced).</p>
</li>
<li>
<p><strong>prediction_scores</strong> (<code>tf.Tensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) — Prediction scores of the language modeling head (scores for each vocabulary token after SoftMax).</p>
</li>
<li>
<p><strong>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) — Contains pre-computed hidden-states (key and values in the attention blocks). 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 input ids 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>) — 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>) — 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.33.3/en/model_doc/transfo-xl#transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLLMHeadModelOutput"
>transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLLMHeadModelOutput</a> or <code>tuple(tf.Tensor)</code></p>
`}}),Ae=new ie({props:{$$slots:{default:[gl]},$$scope:{ctx:L}}}),Qe=new xe({props:{anchor:"transformers.TFTransfoXLLMHeadModel.call.example",$$slots:{default:[_l]},$$scope:{ctx:L}}}),Et=new G({}),St=new z({props:{name:"class transformers.TFTransfoXLForSequenceClassification",anchor:"transformers.TFTransfoXLForSequenceClassification",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.TFTransfoXLForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TransfoXLConfig">TransfoXLConfig</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.33.3/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.33.3/src/transformers/models/transfo_xl/modeling_tf_transfo_xl.py#L1006"}}),De=new ie({props:{$$slots:{default:[Tl]},$$scope:{ctx:L}}}),Vt=new z({props:{name:"call",anchor:"transformers.TFTransfoXLForSequenceClassification.call",parameters:[{name:"input_ids",val:": TFModelInputType | None = None"},{name:"mems",val:": List[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:"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:": Optional[bool] = False"}],parametersDescription:[{anchor:"transformers.TFTransfoXLForSequenceClassification.call.input_ids",description:`<strong>input_ids</strong> (<code>tf.Tensor</code> or <code>Numpy array</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.33.3/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> and
<a href="/docs/transformers/v4.33.3/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.TFTransfoXLForSequenceClassification.call.mems",description:`<strong>mems</strong> (<code>List[tf.Tensor]</code> of length <code>config.n_layers</code>) &#x2014;
Contains pre-computed hidden-states (key and values in the attention blocks) as computed by the model (see
<code>mems</code> output below). Can be used to speed up sequential decoding. The token ids which have their mems
given to this model should not be passed as <code>input_ids</code> as they have already been computed.`,name:"mems"},{anchor:"transformers.TFTransfoXLForSequenceClassification.call.head_mask",description:`<strong>head_mask</strong> (<code>tf.Tensor</code> or <code>Numpy array</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.TFTransfoXLForSequenceClassification.call.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>tf.Tensor</code> or <code>Numpy array</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.TFTransfoXLForSequenceClassification.call.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail. This argument can be used only in eager mode, in graph mode the value in the
config will be used instead.`,name:"output_attentions"},{anchor:"transformers.TFTransfoXLForSequenceClassification.call.output_hidden_states",description:`<strong>output_hidden_states</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the hidden states of all layers. See <code>hidden_states</code> under returned tensors for
more detail. This argument can be used only in eager mode, in graph mode the value in the config will be
used instead.`,name:"output_hidden_states"},{anchor:"transformers.TFTransfoXLForSequenceClassification.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.33.3/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple. This argument can be used in
eager mode, in graph mode the value will always be set to True.`,name:"return_dict"},{anchor:"transformers.TFTransfoXLForSequenceClassification.call.training",description:`<strong>training</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use the model in training mode (some modules like dropout modules have different
behaviors between training and evaluation).`,name:"training"},{anchor:"transformers.TFTransfoXLForSequenceClassification.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.33.3/src/transformers/models/transfo_xl/modeling_tf_transfo_xl.py#L1026",returnDescription:`
<p>A <code>transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLSequenceClassifierOutputWithPast</code> or a tuple of <code>tf.Tensor</code> (if
<code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various elements depending on the
configuration (<a
  href="/docs/transformers/v4.33.3/en/model_doc/transfo-xl#transformers.TransfoXLConfig"
>TransfoXLConfig</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) — 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>) — 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>) — Contains pre-computed hidden-states (key and values in the attention blocks). 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 input ids 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>) — 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>) — Tuple of <code>tf.Tensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.models.transfo_xl.modeling_tf_transfo_xl.TFTransfoXLSequenceClassifierOutputWithPast</code> or <code>tuple(tf.Tensor)</code></p>
`}}),Ke=new ie({props:{$$slots:{default:[vl]},$$scope:{ctx:L}}}),et=new xe({props:{anchor:"transformers.TFTransfoXLForSequenceClassification.call.example",$$slots:{default:[bl]},$$scope:{ctx:L}}}),tt=new xe({props:{anchor:"transformers.TFTransfoXLForSequenceClassification.call.example-2",$$slots:{default:[yl]},$$scope:{ctx:L}}}),Pt=new G({}),Rt=new z({props:{name:"class transformers.AdaptiveEmbedding",anchor:"transformers.AdaptiveEmbedding",parameters:[{name:"n_token",val:""},{name:"d_embed",val:""},{name:"d_proj",val:""},{name:"cutoffs",val:""},{name:"div_val",val:" = 1"},{name:"sample_softmax",val:" = False"}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/transfo_xl/modeling_transfo_xl.py#L399"}}),Yt=new z({props:{name:"class transformers.TFAdaptiveEmbedding",anchor:"transformers.TFAdaptiveEmbedding",parameters:[{name:"*args",val:""},{name:"**kwargs",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.33.3/src/transformers/models/transfo_xl/modeling_tf_transfo_xl.py#L344"}}),{c(){o=s("meta"),g=l(),m=s("p"),f=l(),$=s("h1"),r=s("a"),x=s("span"),T(W.$$.fragment),q=l(),C=s("span"),C.textContent=ee,j=l(),X=s("div"),X.innerHTML=te,u=l(),k=s("h2"),Le=s("a"),Oo=s("span"),T(lt.$$.fragment),hs=l(),to=s("span"),to.textContent=Ha,Mn=l(),it=s("p"),it.innerHTML=Ja,wn=l(),dt=s("p"),dt.textContent=qa,xn=l(),ct=s("p"),ct.innerHTML=Na,$n=l(),mt=s("p"),mt.textContent=Ua,Ln=l(),ft=s("ul"),ft.innerHTML=Wa,kn=l(),pt=s("p"),pt.innerHTML=Ia,Xn=l(),T(ke.$$.fragment),Cn=l(),de=s("h2"),Xe=s("a"),Do=s("span"),T(ht.$$.fragment),us=l(),oo=s("span"),oo.textContent=Za,Fn=l(),ut=s("ul"),ut.innerHTML=Ea,zn=l(),ce=s("h2"),Ce=s("a"),Ko=s("span"),T(gt.$$.fragment),gs=l(),no=s("span"),no.textContent=Sa,jn=l(),B=s("div"),T(_t.$$.fragment),_s=l(),so=s("p"),so.innerHTML=Va,Ts=l(),ao=s("p"),ao.innerHTML=Pa,vs=l(),T(Fe.$$.fragment),Hn=l(),me=s("h2"),ze=s("a"),en=s("span"),T(Tt.$$.fragment),bs=l(),ro=s("span"),ro.textContent=Ba,Jn=l(),R=s("div"),T(vt.$$.fragment),ys=l(),lo=s("p"),lo.innerHTML=Ra,Ms=l(),io=s("p"),io.innerHTML=Ga,ws=l(),co=s("div"),T(bt.$$.fragment),qn=l(),fe=s("h2"),je=s("a"),tn=s("span"),T(yt.$$.fragment),xs=l(),mo=s("span"),mo.textContent=Ya,Nn=l(),pe=s("div"),T(Mt.$$.fragment),$s=l(),fo=s("p"),fo.textContent=Aa,Un=l(),he=s("div"),T(wt.$$.fragment),Ls=l(),po=s("p"),po.textContent=Qa,Wn=l(),ue=s("div"),T(xt.$$.fragment),ks=l(),ho=s("p"),ho.textContent=Oa,In=l(),ge=s("div"),T($t.$$.fragment),Xs=l(),uo=s("p"),uo.textContent=Da,Zn=l(),_e=s("h2"),He=s("a"),on=s("span"),T(Lt.$$.fragment),Cs=l(),go=s("span"),go.textContent=Ka,En=l(),Z=s("div"),T(kt.$$.fragment),Fs=l(),_o=s("p"),_o.textContent=er,zs=l(),To=s("p"),To.innerHTML=tr,js=l(),vo=s("p"),vo.innerHTML=or,Hs=l(),Y=s("div"),T(Xt.$$.fragment),Js=l(),bo=s("p"),bo.innerHTML=nr,qs=l(),T(Je.$$.fragment),Ns=l(),T(qe.$$.fragment),Sn=l(),Te=s("h2"),Ne=s("a"),nn=s("span"),T(Ct.$$.fragment),Us=l(),yo=s("span"),yo.textContent=sr,Vn=l(),E=s("div"),T(Ft.$$.fragment),Ws=l(),Mo=s("p"),Mo.textContent=ar,Is=l(),wo=s("p"),wo.innerHTML=rr,Zs=l(),xo=s("p"),xo.innerHTML=lr,Es=l(),A=s("div"),T(zt.$$.fragment),Ss=l(),$o=s("p"),$o.innerHTML=ir,Vs=l(),T(Ue.$$.fragment),Ps=l(),T(We.$$.fragment),Pn=l(),ve=s("h2"),Ie=s("a"),sn=s("span"),T(jt.$$.fragment),Bs=l(),Lo=s("span"),Lo.textContent=dr,Bn=l(),H=s("div"),T(Ht.$$.fragment),Rs=l(),ko=s("p"),ko.textContent=cr,Gs=l(),Xo=s("p"),Xo.innerHTML=mr,Ys=l(),Co=s("p"),Co.innerHTML=fr,As=l(),Fo=s("p"),Fo.innerHTML=pr,Qs=l(),zo=s("p"),zo.innerHTML=hr,Os=l(),S=s("div"),T(Jt.$$.fragment),Ds=l(),jo=s("p"),jo.innerHTML=ur,Ks=l(),T(Ze.$$.fragment),ea=l(),T(Ee.$$.fragment),ta=l(),T(Se.$$.fragment),Rn=l(),be=s("h2"),Ve=s("a"),an=s("span"),T(qt.$$.fragment),oa=l(),Ho=s("span"),Ho.textContent=gr,Gn=l(),N=s("div"),T(Nt.$$.fragment),na=l(),Jo=s("p"),Jo.textContent=_r,sa=l(),qo=s("p"),qo.innerHTML=Tr,aa=l(),No=s("p"),No.innerHTML=vr,ra=l(),T(Pe.$$.fragment),la=l(),Q=s("div"),T(Ut.$$.fragment),ia=l(),Uo=s("p"),Uo.innerHTML=br,da=l(),T(Be.$$.fragment),ca=l(),T(Re.$$.fragment),Yn=l(),ye=s("h2"),Ge=s("a"),rn=s("span"),T(Wt.$$.fragment),ma=l(),Wo=s("span"),Wo.textContent=yr,An=l(),U=s("div"),T(It.$$.fragment),fa=l(),Io=s("p"),Io.textContent=Mr,pa=l(),Zo=s("p"),Zo.innerHTML=wr,ha=l(),Eo=s("p"),Eo.innerHTML=xr,ua=l(),T(Ye.$$.fragment),ga=l(),O=s("div"),T(Zt.$$.fragment),_a=l(),So=s("p"),So.innerHTML=$r,Ta=l(),T(Ae.$$.fragment),va=l(),T(Qe.$$.fragment),Qn=l(),Me=s("h2"),Oe=s("a"),ln=s("span"),T(Et.$$.fragment),ba=l(),Vo=s("span"),Vo.textContent=Lr,On=l(),F=s("div"),T(St.$$.fragment),ya=l(),Po=s("p"),Po.textContent=kr,Ma=l(),Bo=s("p"),Bo.innerHTML=Xr,wa=l(),Ro=s("p"),Ro.innerHTML=Cr,xa=l(),Go=s("p"),Go.innerHTML=Fr,$a=l(),Yo=s("p"),Yo.innerHTML=zr,La=l(),T(De.$$.fragment),ka=l(),V=s("div"),T(Vt.$$.fragment),Xa=l(),Ao=s("p"),Ao.innerHTML=jr,Ca=l(),T(Ke.$$.fragment),Fa=l(),T(et.$$.fragment),za=l(),T(tt.$$.fragment),Dn=l(),we=s("h2"),ot=s("a"),dn=s("span"),T(Pt.$$.fragment),ja=l(),Qo=s("span"),Qo.textContent=Hr,Kn=l(),Bt=s("div"),T(Rt.$$.fragment),es=l(),Gt=s("div"),T(Yt.$$.fragment),ts=l(),cn=s("p"),this.h()},l(e){const c=ol("svelte-1phssyn",document.head);o=a(c,"META",{name:!0,content:!0}),c.forEach(t),g=i(e),m=a(e,"P",{}),_(m).forEach(t),f=i(e),$=a(e,"H1",{class:!0});var At=_($);r=a(At,"A",{id:!0,class:!0,href:!0});var mn=_(r);x=a(mn,"SPAN",{});var fn=_(x);v(W.$$.fragment,fn),fn.forEach(t),mn.forEach(t),q=i(At),C=a(At,"SPAN",{"data-svelte-h":!0}),p(C)!=="svelte-1c8imza"&&(C.textContent=ee),At.forEach(t),j=i(e),X=a(e,"DIV",{class:!0,"data-svelte-h":!0}),p(X)!=="svelte-1e1blju"&&(X.innerHTML=te),u=i(e),k=a(e,"H2",{class:!0});var Qt=_(k);Le=a(Qt,"A",{id:!0,class:!0,href:!0});var pn=_(Le);Oo=a(pn,"SPAN",{});var hn=_(Oo);v(lt.$$.fragment,hn),hn.forEach(t),pn.forEach(t),hs=i(Qt),to=a(Qt,"SPAN",{"data-svelte-h":!0}),p(to)!=="svelte-1jsw1pg"&&(to.textContent=Ha),Qt.forEach(t),Mn=i(e),it=a(e,"P",{"data-svelte-h":!0}),p(it)!=="svelte-10474ig"&&(it.innerHTML=Ja),wn=i(e),dt=a(e,"P",{"data-svelte-h":!0}),p(dt)!=="svelte-vfdo9a"&&(dt.textContent=qa),xn=i(e),ct=a(e,"P",{"data-svelte-h":!0}),p(ct)!=="svelte-14c6mzu"&&(ct.innerHTML=Na),$n=i(e),mt=a(e,"P",{"data-svelte-h":!0}),p(mt)!=="svelte-axv494"&&(mt.textContent=Ua),Ln=i(e),ft=a(e,"UL",{"data-svelte-h":!0}),p(ft)!=="svelte-1dzkjyk"&&(ft.innerHTML=Wa),kn=i(e),pt=a(e,"P",{"data-svelte-h":!0}),p(pt)!=="svelte-fzra47"&&(pt.innerHTML=Ia),Xn=i(e),v(ke.$$.fragment,e),Cn=i(e),de=a(e,"H2",{class:!0});var Ot=_(de);Xe=a(Ot,"A",{id:!0,class:!0,href:!0});var un=_(Xe);Do=a(un,"SPAN",{});var gn=_(Do);v(ht.$$.fragment,gn),gn.forEach(t),un.forEach(t),us=i(Ot),oo=a(Ot,"SPAN",{"data-svelte-h":!0}),p(oo)!=="svelte-n3f0j0"&&(oo.textContent=Za),Ot.forEach(t),Fn=i(e),ut=a(e,"UL",{"data-svelte-h":!0}),p(ut)!=="svelte-17u5l9r"&&(ut.innerHTML=Ea),zn=i(e),ce=a(e,"H2",{class:!0});var Dt=_(ce);Ce=a(Dt,"A",{id:!0,class:!0,href:!0});var _n=_(Ce);Ko=a(_n,"SPAN",{});var Tn=_(Ko);v(gt.$$.fragment,Tn),Tn.forEach(t),_n.forEach(t),gs=i(Dt),no=a(Dt,"SPAN",{"data-svelte-h":!0}),p(no)!=="svelte-1ojxs24"&&(no.textContent=Sa),Dt.forEach(t),jn=i(e),B=a(e,"DIV",{class:!0});var oe=_(B);v(_t.$$.fragment,oe),_s=i(oe),so=a(oe,"P",{"data-svelte-h":!0}),p(so)!=="svelte-q0q71j"&&(so.innerHTML=Va),Ts=i(oe),ao=a(oe,"P",{"data-svelte-h":!0}),p(ao)!=="svelte-cfh5wl"&&(ao.innerHTML=Pa),vs=i(oe),v(Fe.$$.fragment,oe),oe.forEach(t),Hn=i(e),me=a(e,"H2",{class:!0});var Kt=_(me);ze=a(Kt,"A",{id:!0,class:!0,href:!0});var vn=_(ze);en=a(vn,"SPAN",{});var bn=_(en);v(Tt.$$.fragment,bn),bn.forEach(t),vn.forEach(t),bs=i(Kt),ro=a(Kt,"SPAN",{"data-svelte-h":!0}),p(ro)!=="svelte-xo70jr"&&(ro.textContent=Ba),Kt.forEach(t),Jn=i(e),R=a(e,"DIV",{class:!0});var ne=_(R);v(vt.$$.fragment,ne),ys=i(ne),lo=a(ne,"P",{"data-svelte-h":!0}),p(lo)!=="svelte-64mlya"&&(lo.innerHTML=Ra),Ms=i(ne),io=a(ne,"P",{"data-svelte-h":!0}),p(io)!=="svelte-14xlfoy"&&(io.innerHTML=Ga),ws=i(ne),co=a(ne,"DIV",{class:!0});var yn=_(co);v(bt.$$.fragment,yn),yn.forEach(t),ne.forEach(t),qn=i(e),fe=a(e,"H2",{class:!0});var eo=_(fe);je=a(eo,"A",{id:!0,class:!0,href:!0});var Jr=_(je);tn=a(Jr,"SPAN",{});var qr=_(tn);v(yt.$$.fragment,qr),qr.forEach(t),Jr.forEach(t),xs=i(eo),mo=a(eo,"SPAN",{"data-svelte-h":!0}),p(mo)!=="svelte-1ba3poa"&&(mo.textContent=Ya),eo.forEach(t),Nn=i(e),pe=a(e,"DIV",{class:!0});var ns=_(pe);v(Mt.$$.fragment,ns),$s=i(ns),fo=a(ns,"P",{"data-svelte-h":!0}),p(fo)!=="svelte-1kt4x95"&&(fo.textContent=Aa),ns.forEach(t),Un=i(e),he=a(e,"DIV",{class:!0});var ss=_(he);v(wt.$$.fragment,ss),Ls=i(ss),po=a(ss,"P",{"data-svelte-h":!0}),p(po)!=="svelte-1kt4x95"&&(po.textContent=Qa),ss.forEach(t),Wn=i(e),ue=a(e,"DIV",{class:!0});var as=_(ue);v(xt.$$.fragment,as),ks=i(as),ho=a(as,"P",{"data-svelte-h":!0}),p(ho)!=="svelte-1kt4x95"&&(ho.textContent=Oa),as.forEach(t),In=i(e),ge=a(e,"DIV",{class:!0});var rs=_(ge);v($t.$$.fragment,rs),Xs=i(rs),uo=a(rs,"P",{"data-svelte-h":!0}),p(uo)!=="svelte-1kt4x95"&&(uo.textContent=Da),rs.forEach(t),Zn=i(e),_e=a(e,"H2",{class:!0});var ls=_(_e);He=a(ls,"A",{id:!0,class:!0,href:!0});var Nr=_(He);on=a(Nr,"SPAN",{});var Ur=_(on);v(Lt.$$.fragment,Ur),Ur.forEach(t),Nr.forEach(t),Cs=i(ls),go=a(ls,"SPAN",{"data-svelte-h":!0}),p(go)!=="svelte-10j6ejr"&&(go.textContent=Ka),ls.forEach(t),En=i(e),Z=a(e,"DIV",{class:!0});var se=_(Z);v(kt.$$.fragment,se),Fs=i(se),_o=a(se,"P",{"data-svelte-h":!0}),p(_o)!=="svelte-1n9fdqw"&&(_o.textContent=er),zs=i(se),To=a(se,"P",{"data-svelte-h":!0}),p(To)!=="svelte-ev63c"&&(To.innerHTML=tr),js=i(se),vo=a(se,"P",{"data-svelte-h":!0}),p(vo)!=="svelte-hswkmf"&&(vo.innerHTML=or),Hs=i(se),Y=a(se,"DIV",{class:!0});var nt=_(Y);v(Xt.$$.fragment,nt),Js=i(nt),bo=a(nt,"P",{"data-svelte-h":!0}),p(bo)!=="svelte-bay2d5"&&(bo.innerHTML=nr),qs=i(nt),v(Je.$$.fragment,nt),Ns=i(nt),v(qe.$$.fragment,nt),nt.forEach(t),se.forEach(t),Sn=i(e),Te=a(e,"H2",{class:!0});var is=_(Te);Ne=a(is,"A",{id:!0,class:!0,href:!0});var Wr=_(Ne);nn=a(Wr,"SPAN",{});var Ir=_(nn);v(Ct.$$.fragment,Ir),Ir.forEach(t),Wr.forEach(t),Us=i(is),yo=a(is,"SPAN",{"data-svelte-h":!0}),p(yo)!=="svelte-1er2hcu"&&(yo.textContent=sr),is.forEach(t),Vn=i(e),E=a(e,"DIV",{class:!0});var ae=_(E);v(Ft.$$.fragment,ae),Ws=i(ae),Mo=a(ae,"P",{"data-svelte-h":!0}),p(Mo)!=="svelte-117cpg6"&&(Mo.textContent=ar),Is=i(ae),wo=a(ae,"P",{"data-svelte-h":!0}),p(wo)!=="svelte-ev63c"&&(wo.innerHTML=rr),Zs=i(ae),xo=a(ae,"P",{"data-svelte-h":!0}),p(xo)!=="svelte-hswkmf"&&(xo.innerHTML=lr),Es=i(ae),A=a(ae,"DIV",{class:!0});var st=_(A);v(zt.$$.fragment,st),Ss=i(st),$o=a(st,"P",{"data-svelte-h":!0}),p($o)!=="svelte-vnr7ur"&&($o.innerHTML=ir),Vs=i(st),v(Ue.$$.fragment,st),Ps=i(st),v(We.$$.fragment,st),st.forEach(t),ae.forEach(t),Pn=i(e),ve=a(e,"H2",{class:!0});var ds=_(ve);Ie=a(ds,"A",{id:!0,class:!0,href:!0});var Zr=_(Ie);sn=a(Zr,"SPAN",{});var Er=_(sn);v(jt.$$.fragment,Er),Er.forEach(t),Zr.forEach(t),Bs=i(ds),Lo=a(ds,"SPAN",{"data-svelte-h":!0}),p(Lo)!=="svelte-dtj2se"&&(Lo.textContent=dr),ds.forEach(t),Bn=i(e),H=a(e,"DIV",{class:!0});var P=_(H);v(Ht.$$.fragment,P),Rs=i(P),ko=a(P,"P",{"data-svelte-h":!0}),p(ko)!=="svelte-1yst0e0"&&(ko.textContent=cr),Gs=i(P),Xo=a(P,"P",{"data-svelte-h":!0}),p(Xo)!=="svelte-1ag7kcx"&&(Xo.innerHTML=mr),Ys=i(P),Co=a(P,"P",{"data-svelte-h":!0}),p(Co)!=="svelte-10ugs3m"&&(Co.innerHTML=fr),As=i(P),Fo=a(P,"P",{"data-svelte-h":!0}),p(Fo)!=="svelte-ev63c"&&(Fo.innerHTML=pr),Qs=i(P),zo=a(P,"P",{"data-svelte-h":!0}),p(zo)!=="svelte-hswkmf"&&(zo.innerHTML=hr),Os=i(P),S=a(P,"DIV",{class:!0});var re=_(S);v(Jt.$$.fragment,re),Ds=i(re),jo=a(re,"P",{"data-svelte-h":!0}),p(jo)!=="svelte-sznwf3"&&(jo.innerHTML=ur),Ks=i(re),v(Ze.$$.fragment,re),ea=i(re),v(Ee.$$.fragment,re),ta=i(re),v(Se.$$.fragment,re),re.forEach(t),P.forEach(t),Rn=i(e),be=a(e,"H2",{class:!0});var cs=_(be);Ve=a(cs,"A",{id:!0,class:!0,href:!0});var Sr=_(Ve);an=a(Sr,"SPAN",{});var Vr=_(an);v(qt.$$.fragment,Vr),Vr.forEach(t),Sr.forEach(t),oa=i(cs),Ho=a(cs,"SPAN",{"data-svelte-h":!0}),p(Ho)!=="svelte-x4qac1"&&(Ho.textContent=gr),cs.forEach(t),Gn=i(e),N=a(e,"DIV",{class:!0});var D=_(N);v(Nt.$$.fragment,D),na=i(D),Jo=a(D,"P",{"data-svelte-h":!0}),p(Jo)!=="svelte-1n9fdqw"&&(Jo.textContent=_r),sa=i(D),qo=a(D,"P",{"data-svelte-h":!0}),p(qo)!=="svelte-1e9g3w8"&&(qo.innerHTML=Tr),aa=i(D),No=a(D,"P",{"data-svelte-h":!0}),p(No)!=="svelte-1ivrf8m"&&(No.innerHTML=vr),ra=i(D),v(Pe.$$.fragment,D),la=i(D),Q=a(D,"DIV",{class:!0});var at=_(Q);v(Ut.$$.fragment,at),ia=i(at),Uo=a(at,"P",{"data-svelte-h":!0}),p(Uo)!=="svelte-5d4bxp"&&(Uo.innerHTML=br),da=i(at),v(Be.$$.fragment,at),ca=i(at),v(Re.$$.fragment,at),at.forEach(t),D.forEach(t),Yn=i(e),ye=a(e,"H2",{class:!0});var ms=_(ye);Ge=a(ms,"A",{id:!0,class:!0,href:!0});var Pr=_(Ge);rn=a(Pr,"SPAN",{});var Br=_(rn);v(Wt.$$.fragment,Br),Br.forEach(t),Pr.forEach(t),ma=i(ms),Wo=a(ms,"SPAN",{"data-svelte-h":!0}),p(Wo)!=="svelte-142fuf4"&&(Wo.textContent=yr),ms.forEach(t),An=i(e),U=a(e,"DIV",{class:!0});var K=_(U);v(It.$$.fragment,K),fa=i(K),Io=a(K,"P",{"data-svelte-h":!0}),p(Io)!=="svelte-117cpg6"&&(Io.textContent=Mr),pa=i(K),Zo=a(K,"P",{"data-svelte-h":!0}),p(Zo)!=="svelte-1e9g3w8"&&(Zo.innerHTML=wr),ha=i(K),Eo=a(K,"P",{"data-svelte-h":!0}),p(Eo)!=="svelte-1ivrf8m"&&(Eo.innerHTML=xr),ua=i(K),v(Ye.$$.fragment,K),ga=i(K),O=a(K,"DIV",{class:!0});var rt=_(O);v(Zt.$$.fragment,rt),_a=i(rt),So=a(rt,"P",{"data-svelte-h":!0}),p(So)!=="svelte-k3tv4z"&&(So.innerHTML=$r),Ta=i(rt),v(Ae.$$.fragment,rt),va=i(rt),v(Qe.$$.fragment,rt),rt.forEach(t),K.forEach(t),Qn=i(e),Me=a(e,"H2",{class:!0});var fs=_(Me);Oe=a(fs,"A",{id:!0,class:!0,href:!0});var Rr=_(Oe);ln=a(Rr,"SPAN",{});var Gr=_(ln);v(Et.$$.fragment,Gr),Gr.forEach(t),Rr.forEach(t),ba=i(fs),Vo=a(fs,"SPAN",{"data-svelte-h":!0}),p(Vo)!=="svelte-1s7rebk"&&(Vo.textContent=Lr),fs.forEach(t),On=i(e),F=a(e,"DIV",{class:!0});var I=_(F);v(St.$$.fragment,I),ya=i(I),Po=a(I,"P",{"data-svelte-h":!0}),p(Po)!=="svelte-wlxpaz"&&(Po.textContent=kr),Ma=i(I),Bo=a(I,"P",{"data-svelte-h":!0}),p(Bo)!=="svelte-ia72z3"&&(Bo.innerHTML=Xr),wa=i(I),Ro=a(I,"P",{"data-svelte-h":!0}),p(Ro)!=="svelte-10ugs3m"&&(Ro.innerHTML=Cr),xa=i(I),Go=a(I,"P",{"data-svelte-h":!0}),p(Go)!=="svelte-1e9g3w8"&&(Go.innerHTML=Fr),$a=i(I),Yo=a(I,"P",{"data-svelte-h":!0}),p(Yo)!=="svelte-1ivrf8m"&&(Yo.innerHTML=zr),La=i(I),v(De.$$.fragment,I),ka=i(I),V=a(I,"DIV",{class:!0});var le=_(V);v(Vt.$$.fragment,le),Xa=i(le),Ao=a(le,"P",{"data-svelte-h":!0}),p(Ao)!=="svelte-1c1757z"&&(Ao.innerHTML=jr),Ca=i(le),v(Ke.$$.fragment,le),Fa=i(le),v(et.$$.fragment,le),za=i(le),v(tt.$$.fragment,le),le.forEach(t),I.forEach(t),Dn=i(e),we=a(e,"H2",{class:!0});var ps=_(we);ot=a(ps,"A",{id:!0,class:!0,href:!0});var Yr=_(ot);dn=a(Yr,"SPAN",{});var Ar=_(dn);v(Pt.$$.fragment,Ar),Ar.forEach(t),Yr.forEach(t),ja=i(ps),Qo=a(ps,"SPAN",{"data-svelte-h":!0}),p(Qo)!=="svelte-1l6ll5q"&&(Qo.textContent=Hr),ps.forEach(t),Kn=i(e),Bt=a(e,"DIV",{class:!0});var Qr=_(Bt);v(Rt.$$.fragment,Qr),Qr.forEach(t),es=i(e),Gt=a(e,"DIV",{class:!0});var Or=_(Gt);v(Yt.$$.fragment,Or),Or.forEach(t),ts=i(e),cn=a(e,"P",{}),_(cn).forEach(t),this.h()},h(){h(o,"name","hf:doc:metadata"),h(o,"content",JSON.stringify(wl)),h(r,"id","transformer-xl"),h(r,"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"),h(r,"href","#transformer-xl"),h($,"class","relative group"),h(X,"class","flex flex-wrap space-x-1"),h(Le,"id","overview"),h(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"),h(Le,"href","#overview"),h(k,"class","relative group"),h(Xe,"id","documentation-resources"),h(Xe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(Xe,"href","#documentation-resources"),h(de,"class","relative group"),h(Ce,"id","transformers.TransfoXLConfig"),h(Ce,"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"),h(Ce,"href","#transformers.TransfoXLConfig"),h(ce,"class","relative group"),h(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ze,"id","transformers.TransfoXLTokenizer"),h(ze,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(ze,"href","#transformers.TransfoXLTokenizer"),h(me,"class","relative group"),h(co,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(je,"id","transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLModelOutput"),h(je,"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"),h(je,"href","#transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLModelOutput"),h(fe,"class","relative group"),h(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(He,"id","transformers.TransfoXLModel"),h(He,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(He,"href","#transformers.TransfoXLModel"),h(_e,"class","relative group"),h(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ne,"id","transformers.TransfoXLLMHeadModel"),h(Ne,"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"),h(Ne,"href","#transformers.TransfoXLLMHeadModel"),h(Te,"class","relative group"),h(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(E,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ie,"id","transformers.TransfoXLForSequenceClassification"),h(Ie,"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"),h(Ie,"href","#transformers.TransfoXLForSequenceClassification"),h(ve,"class","relative group"),h(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ve,"id","transformers.TFTransfoXLModel"),h(Ve,"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"),h(Ve,"href","#transformers.TFTransfoXLModel"),h(be,"class","relative group"),h(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Ge,"id","transformers.TFTransfoXLLMHeadModel"),h(Ge,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),h(Ge,"href","#transformers.TFTransfoXLLMHeadModel"),h(ye,"class","relative group"),h(O,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Oe,"id","transformers.TFTransfoXLForSequenceClassification"),h(Oe,"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"),h(Oe,"href","#transformers.TFTransfoXLForSequenceClassification"),h(Me,"class","relative group"),h(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(F,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(ot,"id","transformers.AdaptiveEmbedding"),h(ot,"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"),h(ot,"href","#transformers.AdaptiveEmbedding"),h(we,"class","relative group"),h(Bt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),h(Gt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(e,c){n(document.head,o),d(e,g,c),d(e,m,c),d(e,f,c),d(e,$,c),n($,r),n(r,x),b(W,x,null),n($,q),n($,C),d(e,j,c),d(e,X,c),d(e,u,c),d(e,k,c),n(k,Le),n(Le,Oo),b(lt,Oo,null),n(k,hs),n(k,to),d(e,Mn,c),d(e,it,c),d(e,wn,c),d(e,dt,c),d(e,xn,c),d(e,ct,c),d(e,$n,c),d(e,mt,c),d(e,Ln,c),d(e,ft,c),d(e,kn,c),d(e,pt,c),d(e,Xn,c),b(ke,e,c),d(e,Cn,c),d(e,de,c),n(de,Xe),n(Xe,Do),b(ht,Do,null),n(de,us),n(de,oo),d(e,Fn,c),d(e,ut,c),d(e,zn,c),d(e,ce,c),n(ce,Ce),n(Ce,Ko),b(gt,Ko,null),n(ce,gs),n(ce,no),d(e,jn,c),d(e,B,c),b(_t,B,null),n(B,_s),n(B,so),n(B,Ts),n(B,ao),n(B,vs),b(Fe,B,null),d(e,Hn,c),d(e,me,c),n(me,ze),n(ze,en),b(Tt,en,null),n(me,bs),n(me,ro),d(e,Jn,c),d(e,R,c),b(vt,R,null),n(R,ys),n(R,lo),n(R,Ms),n(R,io),n(R,ws),n(R,co),b(bt,co,null),d(e,qn,c),d(e,fe,c),n(fe,je),n(je,tn),b(yt,tn,null),n(fe,xs),n(fe,mo),d(e,Nn,c),d(e,pe,c),b(Mt,pe,null),n(pe,$s),n(pe,fo),d(e,Un,c),d(e,he,c),b(wt,he,null),n(he,Ls),n(he,po),d(e,Wn,c),d(e,ue,c),b(xt,ue,null),n(ue,ks),n(ue,ho),d(e,In,c),d(e,ge,c),b($t,ge,null),n(ge,Xs),n(ge,uo),d(e,Zn,c),d(e,_e,c),n(_e,He),n(He,on),b(Lt,on,null),n(_e,Cs),n(_e,go),d(e,En,c),d(e,Z,c),b(kt,Z,null),n(Z,Fs),n(Z,_o),n(Z,zs),n(Z,To),n(Z,js),n(Z,vo),n(Z,Hs),n(Z,Y),b(Xt,Y,null),n(Y,Js),n(Y,bo),n(Y,qs),b(Je,Y,null),n(Y,Ns),b(qe,Y,null),d(e,Sn,c),d(e,Te,c),n(Te,Ne),n(Ne,nn),b(Ct,nn,null),n(Te,Us),n(Te,yo),d(e,Vn,c),d(e,E,c),b(Ft,E,null),n(E,Ws),n(E,Mo),n(E,Is),n(E,wo),n(E,Zs),n(E,xo),n(E,Es),n(E,A),b(zt,A,null),n(A,Ss),n(A,$o),n(A,Vs),b(Ue,A,null),n(A,Ps),b(We,A,null),d(e,Pn,c),d(e,ve,c),n(ve,Ie),n(Ie,sn),b(jt,sn,null),n(ve,Bs),n(ve,Lo),d(e,Bn,c),d(e,H,c),b(Ht,H,null),n(H,Rs),n(H,ko),n(H,Gs),n(H,Xo),n(H,Ys),n(H,Co),n(H,As),n(H,Fo),n(H,Qs),n(H,zo),n(H,Os),n(H,S),b(Jt,S,null),n(S,Ds),n(S,jo),n(S,Ks),b(Ze,S,null),n(S,ea),b(Ee,S,null),n(S,ta),b(Se,S,null),d(e,Rn,c),d(e,be,c),n(be,Ve),n(Ve,an),b(qt,an,null),n(be,oa),n(be,Ho),d(e,Gn,c),d(e,N,c),b(Nt,N,null),n(N,na),n(N,Jo),n(N,sa),n(N,qo),n(N,aa),n(N,No),n(N,ra),b(Pe,N,null),n(N,la),n(N,Q),b(Ut,Q,null),n(Q,ia),n(Q,Uo),n(Q,da),b(Be,Q,null),n(Q,ca),b(Re,Q,null),d(e,Yn,c),d(e,ye,c),n(ye,Ge),n(Ge,rn),b(Wt,rn,null),n(ye,ma),n(ye,Wo),d(e,An,c),d(e,U,c),b(It,U,null),n(U,fa),n(U,Io),n(U,pa),n(U,Zo),n(U,ha),n(U,Eo),n(U,ua),b(Ye,U,null),n(U,ga),n(U,O),b(Zt,O,null),n(O,_a),n(O,So),n(O,Ta),b(Ae,O,null),n(O,va),b(Qe,O,null),d(e,Qn,c),d(e,Me,c),n(Me,Oe),n(Oe,ln),b(Et,ln,null),n(Me,ba),n(Me,Vo),d(e,On,c),d(e,F,c),b(St,F,null),n(F,ya),n(F,Po),n(F,Ma),n(F,Bo),n(F,wa),n(F,Ro),n(F,xa),n(F,Go),n(F,$a),n(F,Yo),n(F,La),b(De,F,null),n(F,ka),n(F,V),b(Vt,V,null),n(V,Xa),n(V,Ao),n(V,Ca),b(Ke,V,null),n(V,Fa),b(et,V,null),n(V,za),b(tt,V,null),d(e,Dn,c),d(e,we,c),n(we,ot),n(ot,dn),b(Pt,dn,null),n(we,ja),n(we,Qo),d(e,Kn,c),d(e,Bt,c),b(Rt,Bt,null),d(e,es,c),d(e,Gt,c),b(Yt,Gt,null),d(e,ts,c),d(e,cn,c),os=!0},p(e,[c]){const At={};c&2&&(At.$$scope={dirty:c,ctx:e}),ke.$set(At);const mn={};c&2&&(mn.$$scope={dirty:c,ctx:e}),Fe.$set(mn);const fn={};c&2&&(fn.$$scope={dirty:c,ctx:e}),Je.$set(fn);const Qt={};c&2&&(Qt.$$scope={dirty:c,ctx:e}),qe.$set(Qt);const pn={};c&2&&(pn.$$scope={dirty:c,ctx:e}),Ue.$set(pn);const hn={};c&2&&(hn.$$scope={dirty:c,ctx:e}),We.$set(hn);const Ot={};c&2&&(Ot.$$scope={dirty:c,ctx:e}),Ze.$set(Ot);const un={};c&2&&(un.$$scope={dirty:c,ctx:e}),Ee.$set(un);const gn={};c&2&&(gn.$$scope={dirty:c,ctx:e}),Se.$set(gn);const Dt={};c&2&&(Dt.$$scope={dirty:c,ctx:e}),Pe.$set(Dt);const _n={};c&2&&(_n.$$scope={dirty:c,ctx:e}),Be.$set(_n);const Tn={};c&2&&(Tn.$$scope={dirty:c,ctx:e}),Re.$set(Tn);const oe={};c&2&&(oe.$$scope={dirty:c,ctx:e}),Ye.$set(oe);const Kt={};c&2&&(Kt.$$scope={dirty:c,ctx:e}),Ae.$set(Kt);const vn={};c&2&&(vn.$$scope={dirty:c,ctx:e}),Qe.$set(vn);const bn={};c&2&&(bn.$$scope={dirty:c,ctx:e}),De.$set(bn);const ne={};c&2&&(ne.$$scope={dirty:c,ctx:e}),Ke.$set(ne);const yn={};c&2&&(yn.$$scope={dirty:c,ctx:e}),et.$set(yn);const eo={};c&2&&(eo.$$scope={dirty:c,ctx:e}),tt.$set(eo)},i(e){os||(y(W.$$.fragment,e),y(lt.$$.fragment,e),y(ke.$$.fragment,e),y(ht.$$.fragment,e),y(gt.$$.fragment,e),y(_t.$$.fragment,e),y(Fe.$$.fragment,e),y(Tt.$$.fragment,e),y(vt.$$.fragment,e),y(bt.$$.fragment,e),y(yt.$$.fragment,e),y(Mt.$$.fragment,e),y(wt.$$.fragment,e),y(xt.$$.fragment,e),y($t.$$.fragment,e),y(Lt.$$.fragment,e),y(kt.$$.fragment,e),y(Xt.$$.fragment,e),y(Je.$$.fragment,e),y(qe.$$.fragment,e),y(Ct.$$.fragment,e),y(Ft.$$.fragment,e),y(zt.$$.fragment,e),y(Ue.$$.fragment,e),y(We.$$.fragment,e),y(jt.$$.fragment,e),y(Ht.$$.fragment,e),y(Jt.$$.fragment,e),y(Ze.$$.fragment,e),y(Ee.$$.fragment,e),y(Se.$$.fragment,e),y(qt.$$.fragment,e),y(Nt.$$.fragment,e),y(Pe.$$.fragment,e),y(Ut.$$.fragment,e),y(Be.$$.fragment,e),y(Re.$$.fragment,e),y(Wt.$$.fragment,e),y(It.$$.fragment,e),y(Ye.$$.fragment,e),y(Zt.$$.fragment,e),y(Ae.$$.fragment,e),y(Qe.$$.fragment,e),y(Et.$$.fragment,e),y(St.$$.fragment,e),y(De.$$.fragment,e),y(Vt.$$.fragment,e),y(Ke.$$.fragment,e),y(et.$$.fragment,e),y(tt.$$.fragment,e),y(Pt.$$.fragment,e),y(Rt.$$.fragment,e),y(Yt.$$.fragment,e),os=!0)},o(e){M(W.$$.fragment,e),M(lt.$$.fragment,e),M(ke.$$.fragment,e),M(ht.$$.fragment,e),M(gt.$$.fragment,e),M(_t.$$.fragment,e),M(Fe.$$.fragment,e),M(Tt.$$.fragment,e),M(vt.$$.fragment,e),M(bt.$$.fragment,e),M(yt.$$.fragment,e),M(Mt.$$.fragment,e),M(wt.$$.fragment,e),M(xt.$$.fragment,e),M($t.$$.fragment,e),M(Lt.$$.fragment,e),M(kt.$$.fragment,e),M(Xt.$$.fragment,e),M(Je.$$.fragment,e),M(qe.$$.fragment,e),M(Ct.$$.fragment,e),M(Ft.$$.fragment,e),M(zt.$$.fragment,e),M(Ue.$$.fragment,e),M(We.$$.fragment,e),M(jt.$$.fragment,e),M(Ht.$$.fragment,e),M(Jt.$$.fragment,e),M(Ze.$$.fragment,e),M(Ee.$$.fragment,e),M(Se.$$.fragment,e),M(qt.$$.fragment,e),M(Nt.$$.fragment,e),M(Pe.$$.fragment,e),M(Ut.$$.fragment,e),M(Be.$$.fragment,e),M(Re.$$.fragment,e),M(Wt.$$.fragment,e),M(It.$$.fragment,e),M(Ye.$$.fragment,e),M(Zt.$$.fragment,e),M(Ae.$$.fragment,e),M(Qe.$$.fragment,e),M(Et.$$.fragment,e),M(St.$$.fragment,e),M(De.$$.fragment,e),M(Vt.$$.fragment,e),M(Ke.$$.fragment,e),M(et.$$.fragment,e),M(tt.$$.fragment,e),M(Pt.$$.fragment,e),M(Rt.$$.fragment,e),M(Yt.$$.fragment,e),os=!1},d(e){e&&(t(g),t(m),t(f),t($),t(j),t(X),t(u),t(k),t(Mn),t(it),t(wn),t(dt),t(xn),t(ct),t($n),t(mt),t(Ln),t(ft),t(kn),t(pt),t(Xn),t(Cn),t(de),t(Fn),t(ut),t(zn),t(ce),t(jn),t(B),t(Hn),t(me),t(Jn),t(R),t(qn),t(fe),t(Nn),t(pe),t(Un),t(he),t(Wn),t(ue),t(In),t(ge),t(Zn),t(_e),t(En),t(Z),t(Sn),t(Te),t(Vn),t(E),t(Pn),t(ve),t(Bn),t(H),t(Rn),t(be),t(Gn),t(N),t(Yn),t(ye),t(An),t(U),t(Qn),t(Me),t(On),t(F),t(Dn),t(we),t(Kn),t(Bt),t(es),t(Gt),t(ts),t(cn)),t(o),w(W),w(lt),w(ke,e),w(ht),w(gt),w(_t),w(Fe),w(Tt),w(vt),w(bt),w(yt),w(Mt),w(wt),w(xt),w($t),w(Lt),w(kt),w(Xt),w(Je),w(qe),w(Ct),w(Ft),w(zt),w(Ue),w(We),w(jt),w(Ht),w(Jt),w(Ze),w(Ee),w(Se),w(qt),w(Nt),w(Pe),w(Ut),w(Be),w(Re),w(Wt),w(It),w(Ye),w(Zt),w(Ae),w(Qe),w(Et),w(St),w(De),w(Vt),w(Ke),w(et),w(tt),w(Pt),w(Rt),w(Yt)}}}const wl={local:"transformer-xl",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.TransfoXLConfig",title:"TransfoXLConfig"},{local:"transformers.TransfoXLTokenizer",title:"TransfoXLTokenizer"},{local:"transformers.models.transfo_xl.modeling_transfo_xl.TransfoXLModelOutput",title:"TransfoXL specific outputs"},{local:"transformers.TransfoXLModel",title:"TransfoXLModel"},{local:"transformers.TransfoXLLMHeadModel",title:"TransfoXLLMHeadModel"},{local:"transformers.TransfoXLForSequenceClassification",title:"TransfoXLForSequenceClassification"},{local:"transformers.TFTransfoXLModel",title:"TFTransfoXLModel"},{local:"transformers.TFTransfoXLLMHeadModel",title:"TFTransfoXLLMHeadModel"},{local:"transformers.TFTransfoXLForSequenceClassification",title:"TFTransfoXLForSequenceClassification"},{local:"transformers.AdaptiveEmbedding",title:"Internal Layers"}],title:"Transformer XL"};function xl(L){return Kr(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class jl extends el{constructor(o){super(),tl(this,o,xl,Ml,Dr,{})}}export{jl as component};
