import{S as Lf,i as Af,s as Sf,e as o,k as c,w as b,t,Y as $,M as If,c as r,d as a,m as h,a as l,x as w,h as n,Z as R,b as i,N as rf,G as s,g,y as k,q as M,o as T,B as z,v as Zf,L as Se}from"../../chunks/vendor-hf-doc-builder.js";import{T as Ot}from"../../chunks/Tip-hf-doc-builder.js";import{D as Q}from"../../chunks/Docstring-hf-doc-builder.js";import{C as Bs}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as N}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as Ae}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Nf(x){let d,y,u,f,v;return f=new Bs({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMFJlZm9ybWVyQ29uZmlnJTJDJTIwUmVmb3JtZXJNb2RlbCUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBSZWZvcm1lciUyMGNvbmZpZ3VyYXRpb24lMEFjb25maWd1cmF0aW9uJTIwJTNEJTIwUmVmb3JtZXJDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBSZWZvcm1lciUyMG1vZGVsJTIwKHdpdGglMjByYW5kb20lMjB3ZWlnaHRzKSUwQW1vZGVsJTIwJTNEJTIwUmVmb3JtZXJNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> ReformerConfig, ReformerModel

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a Reformer model (with random weights)</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ReformerModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=o("p"),y=t("Examples:"),u=c(),b(f.$$.fragment)},l(p){d=r(p,"P",{});var _=l(d);y=n(_,"Examples:"),_.forEach(a),u=h(p),w(f.$$.fragment,p)},m(p,_){g(p,d,_),s(d,y),g(p,u,_),k(f,p,_),v=!0},p:Se,i(p){v||(M(f.$$.fragment,p),v=!0)},o(p){T(f.$$.fragment,p),v=!1},d(p){p&&a(d),p&&a(u),z(f,p)}}}function Pf(x){let d,y,u,f,v;return{c(){d=o("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=t("Module"),v=t(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(p){d=r(p,"P",{});var _=l(d);y=n(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(_,"CODE",{});var C=l(u);f=n(C,"Module"),C.forEach(a),v=n(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(a)},m(p,_){g(p,d,_),s(d,y),s(d,u),s(u,f),s(d,v)},d(p){p&&a(d)}}}function Hf(x){let d,y,u,f,v;return f=new Bs({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSZWZvcm1lck1vZGVsJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZyZWZvcm1lci1jcmltZS1hbmQtcHVuaXNobWVudCUyMiklMEFtb2RlbCUyMCUzRCUyMFJlZm9ybWVyTW9kZWwuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnJlZm9ybWVyLWNyaW1lLWFuZC1wdW5pc2htZW50JTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, ReformerModel
<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;google/reformer-crime-and-punishment&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ReformerModel.from_pretrained(<span class="hljs-string">&quot;google/reformer-crime-and-punishment&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;Hello, my dog is cute&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=o("p"),y=t("Example:"),u=c(),b(f.$$.fragment)},l(p){d=r(p,"P",{});var _=l(d);y=n(_,"Example:"),_.forEach(a),u=h(p),w(f.$$.fragment,p)},m(p,_){g(p,d,_),s(d,y),g(p,u,_),k(f,p,_),v=!0},p:Se,i(p){v||(M(f.$$.fragment,p),v=!0)},o(p){T(f.$$.fragment,p),v=!1},d(p){p&&a(d),p&&a(u),z(f,p)}}}function Vf(x){let d,y,u,f,v;return{c(){d=o("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=t("Module"),v=t(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(p){d=r(p,"P",{});var _=l(d);y=n(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(_,"CODE",{});var C=l(u);f=n(C,"Module"),C.forEach(a),v=n(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(a)},m(p,_){g(p,d,_),s(d,y),s(d,u),s(u,f),s(d,v)},d(p){p&&a(d)}}}function Xf(x){let d,y,u,f,v;return f=new Bs({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFJlZm9ybWVyTW9kZWxXaXRoTE1IZWFkJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGcmVmb3JtZXItY3JpbWUtYW5kLXB1bmlzaG1lbnQlMjIpJTBBbW9kZWwlMjAlM0QlMjBSZWZvcm1lck1vZGVsV2l0aExNSGVhZC5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGcmVmb3JtZXItY3JpbWUtYW5kLXB1bmlzaG1lbnQlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGlucHV0cyU1QiUyMmlucHV0X2lkcyUyMiU1RCklMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3NzJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",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, ReformerModelWithLMHead

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/reformer-crime-and-punishment&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ReformerModelWithLMHead.from_pretrained(<span class="hljs-string">&quot;google/reformer-crime-and-punishment&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(){d=o("p"),y=t("Example:"),u=c(),b(f.$$.fragment)},l(p){d=r(p,"P",{});var _=l(d);y=n(_,"Example:"),_.forEach(a),u=h(p),w(f.$$.fragment,p)},m(p,_){g(p,d,_),s(d,y),g(p,u,_),k(f,p,_),v=!0},p:Se,i(p){v||(M(f.$$.fragment,p),v=!0)},o(p){T(f.$$.fragment,p),v=!1},d(p){p&&a(d),p&&a(u),z(f,p)}}}function Qf(x){let d,y,u,f,v;return{c(){d=o("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=t("Module"),v=t(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(p){d=r(p,"P",{});var _=l(d);y=n(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(_,"CODE",{});var C=l(u);f=n(C,"Module"),C.forEach(a),v=n(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(a)},m(p,_){g(p,d,_),s(d,y),s(d,u),s(u,f),s(d,v)},d(p){p&&a(d)}}}function Gf(x){let d,y;return{c(){d=o("p"),y=t(`This example uses a false checkpoint since we don\u2019t have any available pretrained model for the masked language
modeling task with the Reformer architecture.`)},l(u){d=r(u,"P",{});var f=l(d);y=n(f,`This example uses a false checkpoint since we don\u2019t have any available pretrained model for the masked language
modeling task with the Reformer architecture.`),f.forEach(a)},m(u,f){g(u,d,f),s(d,y)},d(u){u&&a(d)}}}function Bf(x){let d,y,u,f,v;return f=new Bs({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFJlZm9ybWVyRm9yTWFza2VkTE0lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJoZi1pbnRlcm5hbC10ZXN0aW5nJTJGdGlueS1yYW5kb20tcmVmb3JtZXIlMjIpJTBBbW9kZWwlMjAlM0QlMjBSZWZvcm1lckZvck1hc2tlZExNLmZyb21fcHJldHJhaW5lZCglMjJoZi1pbnRlcm5hbC10ZXN0aW5nJTJGdGlueS1yYW5kb20tcmVmb3JtZXIlMjIpJTBBJTBBJTIzJTIwYWRkJTIwbWFza190b2tlbiUwQXRva2VuaXplci5hZGRfc3BlY2lhbF90b2tlbnMoJTdCJTIybWFza190b2tlbiUyMiUzQSUyMCUyMiU1Qk1BU0slNUQlMjIlN0QpJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwJTVCTUFTSyU1RC4lMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSUwQSUwQSUyMyUyMHJlc2l6ZSUyMG1vZGVsJ3MlMjBlbWJlZGRpbmclMjBtYXRyaXglMEFtb2RlbC5yZXNpemVfdG9rZW5fZW1iZWRkaW5ncyhuZXdfbnVtX3Rva2VucyUzRG1vZGVsLmNvbmZpZy52b2NhYl9zaXplJTIwJTJCJTIwMSklMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQSUyMyUyMHJldHJpZXZlJTIwaW5kZXglMjBvZiUyMCU1Qk1BU0slNUQlMEFtYXNrX3Rva2VuX2luZGV4JTIwJTNEJTIwKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCklNUIwJTVELm5vbnplcm8oYXNfdHVwbGUlM0RUcnVlKSU1QjAlNUQlMEElMEFwcmVkaWN0ZWRfdG9rZW5faWQlMjAlM0QlMjBsb2dpdHMlNUIwJTJDJTIwbWFza190b2tlbl9pbmRleCU1RC5hcmdtYXgoYXhpcyUzRC0xKSUwQXByZWRpY3RlZF90b2tlbiUyMCUzRCUyMHRva2VuaXplci5kZWNvZGUocHJlZGljdGVkX3Rva2VuX2lkKQ==",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, ReformerForMaskedLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;hf-internal-testing/tiny-random-reformer&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ReformerForMaskedLM.from_pretrained(<span class="hljs-string">&quot;hf-internal-testing/tiny-random-reformer&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># add mask_token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer.add_special_tokens({<span class="hljs-string">&quot;mask_token&quot;</span>: <span class="hljs-string">&quot;[MASK]&quot;</span>})
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(<span class="hljs-string">&quot;The capital of France is [MASK].&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># resize model&#x27;s embedding matrix</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model.resize_token_embeddings(new_num_tokens=model.config.vocab_size + <span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve index of [MASK]</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>mask_token_index = (inputs.input_ids == tokenizer.mask_token_id)[<span class="hljs-number">0</span>].nonzero(as_tuple=<span class="hljs-literal">True</span>)[<span class="hljs-number">0</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_id = logits[<span class="hljs-number">0</span>, mask_token_index].argmax(axis=-<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token = tokenizer.decode(predicted_token_id)`}}),{c(){d=o("p"),y=t("Example:"),u=c(),b(f.$$.fragment)},l(p){d=r(p,"P",{});var _=l(d);y=n(_,"Example:"),_.forEach(a),u=h(p),w(f.$$.fragment,p)},m(p,_){g(p,d,_),s(d,y),g(p,u,_),k(f,p,_),v=!0},p:Se,i(p){v||(M(f.$$.fragment,p),v=!0)},o(p){T(f.$$.fragment,p),v=!1},d(p){p&&a(d),p&&a(u),z(f,p)}}}function Of(x){let d,y;return d=new Bs({props:{code:"bGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyKCUyMlRoZSUyMGNhcGl0YWwlMjBvZiUyMEZyYW5jZSUyMGlzJTIwUGFyaXMuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklNUIlMjJpbnB1dF9pZHMlMjIlNUQlMEElMjMlMjBtYXNrJTIwbGFiZWxzJTIwb2YlMjBub24tJTVCTUFTSyU1RCUyMHRva2VucyUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLndoZXJlKCUwQSUyMCUyMCUyMCUyMGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCUyQyUyMGxhYmVscyU1QiUzQSUyQyUyMCUzQSUyMGlucHV0cyU1QiUyMmlucHV0X2lkcyUyMiU1RC5zaGFwZSU1Qi0xJTVEJTVEJTJDJTIwLTEwMCUwQSklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpJTBBbG9zcyUyMCUzRCUyMHJvdW5kKG91dHB1dHMubG9zcy5pdGVtKCklMkMlMjAyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(<span class="hljs-string">&quot;The capital of France is Paris.&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)[<span class="hljs-string">&quot;input_ids&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># mask labels of non-[MASK] tokens</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.where(
<span class="hljs-meta">... </span>    inputs.input_ids == tokenizer.mask_token_id, labels[:, : inputs[<span class="hljs-string">&quot;input_ids&quot;</span>].shape[-<span class="hljs-number">1</span>]], -<span class="hljs-number">100</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = <span class="hljs-built_in">round</span>(outputs.loss.item(), <span class="hljs-number">2</span>)`}}),{c(){b(d.$$.fragment)},l(u){w(d.$$.fragment,u)},m(u,f){k(d,u,f),y=!0},p:Se,i(u){y||(M(d.$$.fragment,u),y=!0)},o(u){T(d.$$.fragment,u),y=!1},d(u){z(d,u)}}}function Df(x){let d,y,u,f,v;return{c(){d=o("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=t("Module"),v=t(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(p){d=r(p,"P",{});var _=l(d);y=n(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(_,"CODE",{});var C=l(u);f=n(C,"Module"),C.forEach(a),v=n(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(a)},m(p,_){g(p,d,_),s(d,y),s(d,u),s(u,f),s(d,v)},d(p){p&&a(d)}}}function Yf(x){let d,y,u,f,v;return f=new Bs({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMFJlZm9ybWVyRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbiUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnJlZm9ybWVyLWNyaW1lLWFuZC1wdW5pc2htZW50JTIyKSUwQW1vZGVsJTIwJTNEJTIwUmVmb3JtZXJGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZyZWZvcm1lci1jcmltZS1hbmQtcHVuaXNobWVudCUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWQlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KCkuaXRlbSgpJTBBbGFiZWwlMjAlM0QlMjBtb2RlbC5jb25maWcuaWQybGFiZWwlNUJwcmVkaWN0ZWRfY2xhc3NfaWQlNUQ=",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, ReformerForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/reformer-crime-and-punishment&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ReformerForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;google/reformer-crime-and-punishment&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>label = model.config.id2label[predicted_class_id]`}}),{c(){d=o("p"),y=t("Example of single-label classification:"),u=c(),b(f.$$.fragment)},l(p){d=r(p,"P",{});var _=l(d);y=n(_,"Example of single-label classification:"),_.forEach(a),u=h(p),w(f.$$.fragment,p)},m(p,_){g(p,d,_),s(d,y),g(p,u,_),k(f,p,_),v=!0},p:Se,i(p){v||(M(f.$$.fragment,p),v=!0)},o(p){T(f.$$.fragment,p),v=!1},d(p){p&&a(d),p&&a(u),z(f,p)}}}function Kf(x){let d,y;return d=new Bs({props:{code:"JTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwUmVmb3JtZXJGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uLmZyb21fcHJldHJhaW5lZCglMEElMjAlMjAlMjAlMjAlMjJnb29nbGUlMkZyZWZvcm1lci1jcmltZS1hbmQtcHVuaXNobWVudCUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTBBKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvcigxKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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>
<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 = ReformerForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;google/reformer-crime-and-punishment&quot;</span>, num_labels=num_labels
<span class="hljs-meta">... </span>)

<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(){b(d.$$.fragment)},l(u){w(d.$$.fragment,u)},m(u,f){k(d,u,f),y=!0},p:Se,i(u){y||(M(d.$$.fragment,u),y=!0)},o(u){T(d.$$.fragment,u),y=!1},d(u){z(d,u)}}}function s_(x){let d,y,u,f,v;return{c(){d=o("p"),y=t("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=o("code"),f=t("Module"),v=t(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(p){d=r(p,"P",{});var _=l(d);y=n(_,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(_,"CODE",{});var C=l(u);f=n(C,"Module"),C.forEach(a),v=n(_,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),_.forEach(a)},m(p,_){g(p,d,_),s(d,y),s(d,u),s(u,f),s(d,v)},d(p){p&&a(d)}}}function e_(x){let d,y,u,f,v;return f=new Bs({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBSZWZvcm1lckZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBaW1wb3J0JTIwdG9yY2glMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZyZWZvcm1lci1jcmltZS1hbmQtcHVuaXNobWVudCUyMiklMEFtb2RlbCUyMCUzRCUyMFJlZm9ybWVyRm9yUXVlc3Rpb25BbnN3ZXJpbmcuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRnJlZm9ybWVyLWNyaW1lLWFuZC1wdW5pc2htZW50JTIyKSUwQSUwQXF1ZXN0aW9uJTJDJTIwdGV4dCUyMCUzRCUyMCUyMldobyUyMHdhcyUyMEppbSUyMEhlbnNvbiUzRiUyMiUyQyUyMCUyMkppbSUyMEhlbnNvbiUyMHdhcyUyMGElMjBuaWNlJTIwcHVwcGV0JTIyJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHF1ZXN0aW9uJTJDJTIwdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMG91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0QlMjBvdXRwdXRzLnN0YXJ0X2xvZ2l0cy5hcmdtYXgoKSUwQWFuc3dlcl9lbmRfaW5kZXglMjAlM0QlMjBvdXRwdXRzLmVuZF9sb2dpdHMuYXJnbWF4KCklMEElMEFwcmVkaWN0X2Fuc3dlcl90b2tlbnMlMjAlM0QlMjBpbnB1dHMuaW5wdXRfaWRzJTVCMCUyQyUyMGFuc3dlcl9zdGFydF9pbmRleCUyMCUzQSUyMGFuc3dlcl9lbmRfaW5kZXglMjAlMkIlMjAxJTVEJTBBJTBBJTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QjE0JTVEKSUwQXRhcmdldF9lbmRfaW5kZXglMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCMTUlNUQpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwc3RhcnRfcG9zaXRpb25zJTNEdGFyZ2V0X3N0YXJ0X2luZGV4JTJDJTIwZW5kX3Bvc2l0aW9ucyUzRHRhcmdldF9lbmRfaW5kZXgpJTBBbG9zcyUyMCUzRCUyMG91dHB1dHMubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, ReformerForQuestionAnswering
<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;google/reformer-crime-and-punishment&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = ReformerForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;google/reformer-crime-and-punishment&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>question, text = <span class="hljs-string">&quot;Who was Jim Henson?&quot;</span>, <span class="hljs-string">&quot;Jim Henson was a nice puppet&quot;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(question, text, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>answer_start_index = outputs.start_logits.argmax()
<span class="hljs-meta">&gt;&gt;&gt; </span>answer_end_index = outputs.end_logits.argmax()

<span class="hljs-meta">&gt;&gt;&gt; </span>predict_answer_tokens = inputs.input_ids[<span class="hljs-number">0</span>, answer_start_index : answer_end_index + <span class="hljs-number">1</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># target is &quot;nice puppet&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index = torch.tensor([<span class="hljs-number">14</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>target_end_index = torch.tensor([<span class="hljs-number">15</span>])

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, start_positions=target_start_index, end_positions=target_end_index)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss`}}),{c(){d=o("p"),y=t("Example:"),u=c(),b(f.$$.fragment)},l(p){d=r(p,"P",{});var _=l(d);y=n(_,"Example:"),_.forEach(a),u=h(p),w(f.$$.fragment,p)},m(p,_){g(p,d,_),s(d,y),g(p,u,_),k(f,p,_),v=!0},p:Se,i(p){v||(M(f.$$.fragment,p),v=!0)},o(p){T(f.$$.fragment,p),v=!1},d(p){p&&a(d),p&&a(u),z(f,p)}}}function a_(x){let d,y,u,f,v,p,_,C,oi,Co,ws,ot,rt,Ud,ri,lt,it,Wd,Jo,ks,Dt,li,ii,Ie,mi,pi,Fo,Ms,Os,Yt,Ze,ci,Kt,hi,Uo,Ds,di,Ne,gi,ui,Wo,mt,fi,Lo,pt,sn,_i,Ao,ps,yi,Pe,vi,bi,He,wi,ki,So,ct,Mi,Io,P,is,Ti,en,zi,xi,an,$i,Ri,Ve,Ei,qi,ji,tn,Ci,Ji,nn,Fi,Ui,on,Wi,Li,rn,Ai,Zo,Ts,Ys,ln,Xe,Si,mn,Ii,No,E,Zi,Qe,Ni,Pi,Po,lf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>d</mi></mrow><annotation encoding="application/x-tex">d</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal">d</span></span></span></span>',Ho,pn,Hi,Vi,Vo,mf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>i</mi><mo separator="true">,</mo><mo>\u2026</mo><mo separator="true">,</mo><msub><mi>n</mi><mi>s</mi></msub></mrow><annotation encoding="application/x-tex">i, \\ldots, n_s</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.854em;vertical-align:-0.1944em;"></span><span class="mord mathnormal">i</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="minner">\u2026</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span>',Xo,Qo,pf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>n</mi><mi>s</mi></msub></mrow><annotation encoding="application/x-tex">n_s</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span>',Go,cn,Xi,Qi,Bo,cf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>n</mi><mi>s</mi></msub><mo>=</mo><msup><mn>2</mn><mn>19</mn></msup><mo>\u2248</mo><mn>0.5</mn><mi>M</mi></mrow><annotation encoding="application/x-tex">n_s = 2^{19} \\approx 0.5M</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">19</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">\u2248</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6833em;"></span><span class="mord">0.5</span><span class="mord mathnormal" style="margin-right:0.10903em;">M</span></span></span></span>',Oo,hn,Gi,Bi,Do,hf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>d</mi><mo>=</mo><msup><mn>2</mn><mn>10</mn></msup><mo>\u2248</mo><mn>1000</mn></mrow><annotation encoding="application/x-tex">d = 2^{10} \\approx 1000</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal">d</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">10</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">\u2248</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">1000</span></span></span></span>',Yo,Ko,df='<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><msub><mi>X</mi><mrow><mi>i</mi><mo separator="true">,</mo><mi>j</mi></mrow></msub><mo separator="true">,</mo><mtext>\xA0with\xA0</mtext><mi>i</mi><mo>\u2208</mo><mrow><mo fence="true">[</mo><mn>1</mn><mo separator="true">,</mo><mo>\u2026</mo><mo separator="true">,</mo><mi>d</mi><mo fence="true">]</mo></mrow><mtext>\xA0and\xA0</mtext><mi>j</mi><mo>\u2208</mo><mrow><mo fence="true">[</mo><mn>1</mn><mo separator="true">,</mo><mo>\u2026</mo><mo separator="true">,</mo><msub><mi>n</mi><mi>s</mi></msub><mo fence="true">]</mo></mrow></mrow><annotation encoding="application/x-tex">X_{i,j}, \\text{ with } i \\in \\left[1,\\ldots, d\\right] \\text{ and } j \\in \\left[1,\\ldots, n_s\\right]</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.9805em;vertical-align:-0.2861em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.07847em;">X</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3117em;"><span style="top:-2.55em;margin-left:-0.0785em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">i</span><span class="mpunct mtight">,</span><span class="mord mathnormal mtight" style="margin-right:0.05724em;">j</span></span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.2861em;"><span></span></span></span></span></span></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord text"><span class="mord">\xA0with\xA0</span></span><span class="mord mathnormal">i</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">\u2208</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="minner"><span class="mopen delimcenter" style="top:0em;">[</span><span class="mord">1</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="minner">\u2026</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord mathnormal">d</span><span class="mclose delimcenter" style="top:0em;">]</span></span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord text"><span class="mord">\xA0and\xA0</span></span><span class="mord mathnormal" style="margin-right:0.05724em;">j</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">\u2208</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="minner"><span class="mopen delimcenter" style="top:0em;">[</span><span class="mord">1</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="minner">\u2026</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mclose delimcenter" style="top:0em;">]</span></span></span></span></span></span>',sr,zs,Oi,er,gf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>X</mi><mrow><mi>i</mi><mo separator="true">,</mo><mi>j</mi></mrow></msub></mrow><annotation encoding="application/x-tex">X_{i,j}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.9694em;vertical-align:-0.2861em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.07847em;">X</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3117em;"><span style="top:-2.55em;margin-left:-0.0785em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">i</span><span class="mpunct mtight">,</span><span class="mord mathnormal mtight" style="margin-right:0.05724em;">j</span></span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.2861em;"><span></span></span></span></span></span></span></span></span></span>',ar,tr,uf='<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><msubsup><mi>X</mi><mrow><mi>i</mi><mo separator="true">,</mo><mi>j</mi></mrow><mn>1</mn></msubsup><mo separator="true">,</mo><mtext>\xA0with\xA0</mtext><mi>i</mi><mo>\u2208</mo><mrow><mo fence="true">[</mo><mn>1</mn><mo separator="true">,</mo><mo>\u2026</mo><mo separator="true">,</mo><msup><mi>d</mi><mn>1</mn></msup><mo fence="true">]</mo></mrow><mtext>\xA0and\xA0</mtext><mi>j</mi><mo>\u2208</mo><mrow><mo fence="true">[</mo><mn>1</mn><mo separator="true">,</mo><mo>\u2026</mo><mo separator="true">,</mo><msubsup><mi>n</mi><mi>s</mi><mn>1</mn></msubsup><mo fence="true">]</mo></mrow></mrow><annotation encoding="application/x-tex">X^{1}_{i,j}, \\text{ with } i \\in \\left[1,\\ldots, d^1\\right] \\text{ and } j \\in \\left[1,\\ldots, n_s^1\\right]</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.2472em;vertical-align:-0.3831em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.07847em;">X</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8641em;"><span style="top:-2.453em;margin-left:-0.0785em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">i</span><span class="mpunct mtight">,</span><span class="mord mathnormal mtight" style="margin-right:0.05724em;">j</span></span></span></span><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">1</span></span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.3831em;"><span></span></span></span></span></span></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord text"><span class="mord">\xA0with\xA0</span></span><span class="mord mathnormal">i</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">\u2208</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1.2141em;vertical-align:-0.35em;"></span><span class="minner"><span class="mopen delimcenter" style="top:0em;"><span class="delimsizing size1">[</span></span><span class="mord">1</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="minner">\u2026</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8641em;"><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span></span></span></span></span><span class="mclose delimcenter" style="top:0em;"><span class="delimsizing size1">]</span></span></span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord text"><span class="mord">\xA0and\xA0</span></span><span class="mord mathnormal" style="margin-right:0.05724em;">j</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">\u2208</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1.2141em;vertical-align:-0.35em;"></span><span class="minner"><span class="mopen delimcenter" style="top:0em;"><span class="delimsizing size1">[</span></span><span class="mord">1</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="minner">\u2026</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8641em;"><span style="top:-2.453em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.247em;"><span></span></span></span></span></span></span><span class="mclose delimcenter" style="top:0em;"><span class="delimsizing size1">]</span></span></span></span></span></span></span>',nr,Ge,Di,or,ff='<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><msubsup><mi>X</mi><mrow><mi>i</mi><mo separator="true">,</mo><mi>j</mi></mrow><mn>2</mn></msubsup><mo separator="true">,</mo><mtext>\xA0with\xA0</mtext><mi>i</mi><mo>\u2208</mo><mrow><mo fence="true">[</mo><mn>1</mn><mo separator="true">,</mo><mo>\u2026</mo><mo separator="true">,</mo><msup><mi>d</mi><mn>2</mn></msup><mo fence="true">]</mo></mrow><mtext>\xA0and\xA0</mtext><mi>j</mi><mo>\u2208</mo><mrow><mo fence="true">[</mo><mn>1</mn><mo separator="true">,</mo><mo>\u2026</mo><mo separator="true">,</mo><msubsup><mi>n</mi><mi>s</mi><mn>2</mn></msubsup><mo fence="true">]</mo></mrow></mrow><annotation encoding="application/x-tex">X^{2}_{i,j}, \\text{ with } i \\in \\left[1,\\ldots, d^2\\right] \\text{ and } j \\in \\left[1,\\ldots, n_s^2\\right]</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.2472em;vertical-align:-0.3831em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.07847em;">X</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8641em;"><span style="top:-2.453em;margin-left:-0.0785em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">i</span><span class="mpunct mtight">,</span><span class="mord mathnormal mtight" style="margin-right:0.05724em;">j</span></span></span></span><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">2</span></span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.3831em;"><span></span></span></span></span></span></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord text"><span class="mord">\xA0with\xA0</span></span><span class="mord mathnormal">i</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">\u2208</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1.2141em;vertical-align:-0.35em;"></span><span class="minner"><span class="mopen delimcenter" style="top:0em;"><span class="delimsizing size1">[</span></span><span class="mord">1</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="minner">\u2026</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8641em;"><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mclose delimcenter" style="top:0em;"><span class="delimsizing size1">]</span></span></span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord text"><span class="mord">\xA0and\xA0</span></span><span class="mord mathnormal" style="margin-right:0.05724em;">j</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">\u2208</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1.2141em;vertical-align:-0.35em;"></span><span class="minner"><span class="mopen delimcenter" style="top:0em;"><span class="delimsizing size1">[</span></span><span class="mord">1</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="minner">\u2026</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8641em;"><span style="top:-2.453em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.247em;"><span></span></span></span></span></span></span><span class="mclose delimcenter" style="top:0em;"><span class="delimsizing size1">]</span></span></span></span></span></span></span>',rr,Be,Yi,lr,_f='<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mi>d</mi><mo>=</mo><msup><mi>d</mi><mn>1</mn></msup><mo>+</mo><msup><mi>d</mi><mn>2</mn></msup><mtext>\xA0and\xA0</mtext><msub><mi>n</mi><mi>s</mi></msub><mo>=</mo><msubsup><mi>n</mi><mi>s</mi><mn>1</mn></msubsup><mo>\xD7</mo><msubsup><mi>n</mi><mi>s</mi><mn>2</mn></msubsup><mi mathvariant="normal">.</mi></mrow><annotation encoding="application/x-tex">d = d^1 + d^2 \\text{ and } n_s = n_s^1 \\times n_s^2 .</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal">d</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.9474em;vertical-align:-0.0833em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8641em;"><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1.0141em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8641em;"><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mord text"><span class="mord">\xA0and\xA0</span></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1.1111em;vertical-align:-0.247em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8641em;"><span style="top:-2.453em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.247em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">\xD7</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1.1111em;vertical-align:-0.247em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8641em;"><span style="top:-2.453em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span><span style="top:-3.113em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.247em;"><span></span></span></span></span></span></span><span class="mord">.</span></span></span></span></span>',ir,Oe,Ki,mr,yf=`<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><msub><mi>X</mi><mrow><mi>i</mi><mo separator="true">,</mo><mi>j</mi></mrow></msub><mo>=</mo><mrow><mo fence="true">{</mo><mtable rowspacing="0.36em" columnalign="left left" columnspacing="1em"><mtr><mtd><mstyle scriptlevel="0" displaystyle="false"><mrow><msubsup><mi>X</mi><mrow><mi>i</mi><mo separator="true">,</mo><mi>k</mi></mrow><mn>1</mn></msubsup><mo separator="true">,</mo></mrow></mstyle></mtd><mtd><mstyle scriptlevel="0" displaystyle="false"><mrow><mtext>if\xA0\xA0</mtext><mi>i</mi><mo>&lt;</mo><msup><mi>d</mi><mn>1</mn></msup><mtext>\xA0with\xA0</mtext><mi>k</mi><mo>=</mo><mi>j</mi><mspace></mspace><mspace width="0.6667em"/><mrow><mi mathvariant="normal">m</mi><mi mathvariant="normal">o</mi><mi mathvariant="normal">d</mi></mrow><mtext>\u2009</mtext><mtext>\u2009</mtext><msubsup><mi>n</mi><mi>s</mi><mn>1</mn></msubsup></mrow></mstyle></mtd></mtr><mtr><mtd><mstyle scriptlevel="0" displaystyle="false"><mrow><msubsup><mi>X</mi><mrow><mi>i</mi><mo>\u2212</mo><msup><mi>d</mi><mn>1</mn></msup><mo separator="true">,</mo><mi>l</mi></mrow><mn>2</mn></msubsup><mo separator="true">,</mo></mrow></mstyle></mtd><mtd><mstyle scriptlevel="0" displaystyle="false"><mrow><mtext>if\xA0</mtext><mi>i</mi><mo>\u2265</mo><msup><mi>d</mi><mn>1</mn></msup><mtext>\xA0with\xA0</mtext><mi>l</mi><mo>=</mo><mo stretchy="false">\u230A</mo><mfrac><mi>j</mi><msubsup><mi>n</mi><mi>s</mi><mn>1</mn></msubsup></mfrac><mo stretchy="false">\u230B</mo></mrow></mstyle></mtd></mtr></mtable></mrow></mrow><annotation encoding="application/x-tex">X_{i,j} = \\begin{cases}
X^{1}_{i, k}, &amp; \\text{if }\\ i &lt; d^1 \\text{ with } k = j \\mod n_s^1 \\\\
X^{2}_{i - d^1, l}, &amp; \\text{if } i \\ge d^1 \\text{ with } l = \\lfloor\\frac{j}{n_s^1}\\rfloor
\\end{cases}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.9694em;vertical-align:-0.2861em;"></span><span class="mord"><span class="mord mathnormal" style="margin-right:0.07847em;">X</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3117em;"><span style="top:-2.55em;margin-left:-0.0785em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">i</span><span class="mpunct mtight">,</span><span class="mord mathnormal mtight" style="margin-right:0.05724em;">j</span></span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.2861em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:3em;vertical-align:-1.25em;"></span><span class="minner"><span class="mopen delimcenter" style="top:0em;"><span class="delimsizing size4">{</span></span><span class="mord"><span class="mtable"><span class="col-align-l"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.7466em;"><span style="top:-3.7466em;"><span class="pstrut" style="height:3.008em;"></span><span class="mord"><span class="mord"><span class="mord mathnormal" style="margin-right:0.07847em;">X</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-2.4169em;margin-left:-0.0785em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">i</span><span class="mpunct mtight">,</span><span class="mord mathnormal mtight" style="margin-right:0.03148em;">k</span></span></span></span><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">1</span></span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.4192em;"><span></span></span></span></span></span></span><span class="mpunct">,</span></span></span><span style="top:-2.3066em;"><span class="pstrut" style="height:3.008em;"></span><span class="mord"><span class="mord"><span class="mord mathnormal" style="margin-right:0.07847em;">X</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-2.3806em;margin-left:-0.0785em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">i</span><span class="mbin mtight">\u2212</span><span class="mord mtight"><span class="mord mathnormal mtight">d</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.7463em;"><span style="top:-2.786em;margin-right:0.0714em;"><span class="pstrut" style="height:2.5em;"></span><span class="sizing reset-size3 size1 mtight"><span class="mord mtight">1</span></span></span></span></span></span></span></span><span class="mpunct mtight">,</span><span class="mord mathnormal mtight" style="margin-right:0.01968em;">l</span></span></span></span><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">2</span></span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.4555em;"><span></span></span></span></span></span></span><span class="mpunct">,</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:1.2466em;"><span></span></span></span></span></span><span class="arraycolsep" style="width:1em;"></span><span class="col-align-l"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:1.7466em;"><span style="top:-3.7466em;"><span class="pstrut" style="height:3.008em;"></span><span class="mord"><span class="mord text"><span class="mord">if\xA0</span></span><span class="mspace">\xA0</span><span class="mord mathnormal">i</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">&lt;</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span></span></span></span></span><span class="mord text"><span class="mord">\xA0with\xA0</span></span><span class="mord mathnormal" style="margin-right:0.03148em;">k</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mord mathnormal" style="margin-right:0.05724em;">j</span><span class="mspace allowbreak"></span><span class="mspace" style="margin-right:0.6667em;"></span><span class="mord"><span class="mord"><span class="mord mathrm">mod</span></span></span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-2.453em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.247em;"><span></span></span></span></span></span></span></span></span><span style="top:-2.3066em;"><span class="pstrut" style="height:3.008em;"></span><span class="mord"><span class="mord text"><span class="mord">if\xA0</span></span><span class="mord mathnormal">i</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">\u2265</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span></span></span></span></span><span class="mord text"><span class="mord">\xA0with\xA0</span></span><span class="mord mathnormal" style="margin-right:0.01968em;">l</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mopen">\u230A</span><span class="mord"><span class="mopen nulldelimiter"></span><span class="mfrac"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.9078em;"><span style="top:-2.655em;"><span class="pstrut" style="height:3em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight"><span class="mord mathnormal mtight">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.7463em;"><span style="top:-2.214em;margin-left:0em;margin-right:0.0714em;"><span class="pstrut" style="height:2.5em;"></span><span class="sizing reset-size3 size1 mtight"><span class="mord mathnormal mtight">s</span></span></span><span style="top:-2.786em;margin-right:0.0714em;"><span class="pstrut" style="height:2.5em;"></span><span class="sizing reset-size3 size1 mtight"><span class="mord mtight">1</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.286em;"><span></span></span></span></span></span></span></span></span></span><span style="top:-3.23em;"><span class="pstrut" style="height:3em;"></span><span class="frac-line" style="border-bottom-width:0.04em;"></span></span><span style="top:-3.4461em;"><span class="pstrut" style="height:3em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight" style="margin-right:0.05724em;">j</span></span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.5452em;"><span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span><span class="mclose">\u230B</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:1.2466em;"><span></span></span></span></span></span></span></span><span class="mclose nulldelimiter"></span></span></span></span></span></span>`,pr,J,sm,cr,vf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>x</mi><mi>j</mi></msub><mo>\u2208</mo><msup><mi mathvariant="double-struck">R</mi><mi>d</mi></msup></mrow><annotation encoding="application/x-tex">x_j \\in \\mathbb{R}^{d}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8252em;vertical-align:-0.2861em;"></span><span class="mord"><span class="mord mathnormal">x</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3117em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.05724em;">j</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.2861em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">\u2208</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8491em;"></span><span class="mord"><span class="mord mathbb">R</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8491em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight">d</span></span></span></span></span></span></span></span></span></span></span></span>',hr,dr,bf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msubsup><mi>x</mi><mrow><mi>k</mi><mo separator="true">,</mo><mi>l</mi></mrow><mn>1</mn></msubsup><mo>+</mo><msubsup><mi>x</mi><mrow><mi>l</mi><mo separator="true">,</mo><mi>k</mi></mrow><mn>2</mn></msubsup></mrow><annotation encoding="application/x-tex">x^1_{k, l} + x^2_{l, k}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.2333em;vertical-align:-0.4192em;"></span><span class="mord"><span class="mord mathnormal">x</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-2.4169em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight" style="margin-right:0.03148em;">k</span><span class="mpunct mtight">,</span><span class="mord mathnormal mtight" style="margin-right:0.01968em;">l</span></span></span></span><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.4192em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1.2333em;vertical-align:-0.4192em;"></span><span class="mord"><span class="mord mathnormal">x</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-2.4169em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mathnormal mtight" style="margin-right:0.01968em;">l</span><span class="mpunct mtight">,</span><span class="mord mathnormal mtight" style="margin-right:0.03148em;">k</span></span></span></span><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.4192em;"><span></span></span></span></span></span></span></span></span></span>',gr,dn,em,am,ur,wf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>j</mi></mrow><annotation encoding="application/x-tex">j</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.854em;vertical-align:-0.1944em;"></span><span class="mord mathnormal" style="margin-right:0.05724em;">j</span></span></span></span>',fr,_r,kf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi>k</mi><mtext>\xA0and\xA0</mtext><mi>l</mi></mrow><annotation encoding="application/x-tex">k \\text{ and } l</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6944em;"></span><span class="mord mathnormal" style="margin-right:0.03148em;">k</span><span class="mord text"><span class="mord">\xA0and\xA0</span></span><span class="mord mathnormal" style="margin-right:0.01968em;">l</span></span></span></span>',yr,vr,Mf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>x</mi><mi>j</mi></msub></mrow><annotation encoding="application/x-tex">x_j</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.7167em;vertical-align:-0.2861em;"></span><span class="mord"><span class="mord mathnormal">x</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3117em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight" style="margin-right:0.05724em;">j</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.2861em;"><span></span></span></span></span></span></span></span></span></span>',br,wr,cs,tm,kr,Tf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mi>d</mi><mn>1</mn></msup><mo>=</mo><msup><mn>2</mn><mn>9</mn></msup><mo separator="true">,</mo><msup><mi>d</mi><mn>2</mn></msup><mo>=</mo><msup><mn>2</mn><mn>9</mn></msup><mo separator="true">,</mo><msubsup><mi>n</mi><mi>s</mi><mn>1</mn></msubsup><mo>=</mo><msup><mn>2</mn><mn>9</mn></msup><mo separator="true">,</mo><msubsup><mi>n</mi><mi>s</mi><mn>2</mn></msubsup><mo>=</mo><msup><mn>2</mn><mn>10</mn></msup></mrow><annotation encoding="application/x-tex">d^1 = 2^9, d^2 = 2^9, n_s^1 = 2^9, n_s^2 = 2^{10}</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1.0085em;vertical-align:-0.1944em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">9</span></span></span></span></span></span></span></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1.0611em;vertical-align:-0.247em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">9</span></span></span></span></span></span></span></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-2.453em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.247em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:1.0611em;vertical-align:-0.247em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">9</span></span></span></span></span></span></span></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-2.453em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.247em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">=</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">10</span></span></span></span></span></span></span></span></span></span></span></span>',Mr,Tr,zf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msup><mn>2</mn><mn>18</mn></msup><mo>+</mo><msup><mn>2</mn><mn>19</mn></msup><mo>\u2248</mo><mn>780000</mn></mrow><annotation encoding="application/x-tex">2^{18} + 2^{19} \\approx 780 000</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.8974em;vertical-align:-0.0833em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">18</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">+</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.8141em;"></span><span class="mord"><span class="mord">2</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord mtight">19</span></span></span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2778em;"></span><span class="mrel">\u2248</span><span class="mspace" style="margin-right:0.2778em;"></span></span><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">780000</span></span></span></span>',zr,xr,q,nm,gn,om,rm,$r,xf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><msup><mi>d</mi><mn>1</mn></msup><mo separator="true">,</mo><msup><mi>d</mi><mn>2</mn></msup><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">(d^1, d^2)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.0641em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span></span></span></span></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">d</span><span class="msupsub"><span class="vlist-t"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span></span></span></span></span><span class="mclose">)</span></span></span></span>',Rr,un,lm,im,fn,mm,pm,Er,$f='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><msubsup><mi>n</mi><mi>s</mi><mn>1</mn></msubsup><mo separator="true">,</mo><msubsup><mi>n</mi><mi>s</mi><mn>2</mn></msubsup><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">(n_s^1, n_s^2)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.0641em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-2.453em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.247em;"><span></span></span></span></span></span></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-2.453em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.247em;"><span></span></span></span></span></span></span><span class="mclose">)</span></span></span></span>',qr,_n,cm,hm,yn,dm,gm,vn,um,fm,jr,xs,Ks,bn,De,_m,wn,ym,Cr,O,vm,Ye,bm,wm,kn,km,Mm,Mn,Tm,zm,Jr,L,xm,Tn,$m,Rm,zn,Em,qm,xn,jm,Cm,$n,Jm,Fm,Rn,Um,Wm,Fr,hs,Lm,Ke,Am,Sm,sa,Im,Zm,Ur,H,Nm,En,Pm,Hm,Wr,Rf=`<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><msubsup><mi>n</mi><mtext>buckets</mtext><mn>1</mn></msubsup><mo separator="true">,</mo><msubsup><mi>n</mi><mtext>buckets</mtext><mn>2</mn></msubsup><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">(n_{\\text{buckets}}^1,
n_{\\text{buckets}}^2)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1.0972em;vertical-align:-0.2831em;"></span><span class="mopen">(</span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-2.4169em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord text mtight"><span class="mord mtight">buckets</span></span></span></span></span><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.2831em;"><span></span></span></span></span></span></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-2.4169em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord text mtight"><span class="mord mtight">buckets</span></span></span></span></span><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.2831em;"><span></span></span></span></span></span></span><span class="mclose">)</span></span></span></span>`,Lr,Ar,Ef=`<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><mn>1</mn><mo separator="true">,</mo><mo>\u2026</mo><mo separator="true">,</mo><msub><mi>n</mi><mtext>buckets</mtext></msub><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">(1,\\ldots,
n_{\\text{buckets}})</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord">1</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="minner">\u2026</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.3361em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord text mtight"><span class="mord mtight">buckets</span></span></span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mclose">)</span></span></span></span>`,Sr,Ir,qf=`<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mo stretchy="false">(</mo><mn>1</mn><mo>\u2212</mo><mn>1</mn><mo separator="true">,</mo><mo>\u2026</mo><mo separator="true">,</mo><msubsup><mi>n</mi><mtext>buckets</mtext><mn>1</mn></msubsup><mo>\u2212</mo><mn>1</mn><mo separator="true">,</mo><mo>\u2026</mo><mo separator="true">,</mo><mn>1</mn><mo>\u2212</mo><msubsup><mi>n</mi><mtext>buckets</mtext><mn>2</mn></msubsup><mo separator="true">,</mo><mo>\u2026</mo><mo separator="true">,</mo><msubsup><mi>n</mi><mtext>buckets</mtext><mn>1</mn></msubsup><mo>\u2212</mo><msubsup><mi>n</mi><mtext>buckets</mtext><mn>2</mn></msubsup><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">(1-1,\\ldots, n_{\\text{buckets}}^1-1, \\ldots,
1-n_{\\text{buckets}}^2, \\ldots, n_{\\text{buckets}}^1-n_{\\text{buckets}}^2)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mopen">(</span><span class="mord">1</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">\u2212</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1.0972em;vertical-align:-0.2831em;"></span><span class="mord">1</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="minner">\u2026</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-2.4169em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord text mtight"><span class="mord mtight">buckets</span></span></span></span></span><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.2831em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">\u2212</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:0.8389em;vertical-align:-0.1944em;"></span><span class="mord">1</span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="minner">\u2026</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord">1</span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">\u2212</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1.0972em;vertical-align:-0.2831em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-2.4169em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord text mtight"><span class="mord mtight">buckets</span></span></span></span></span><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.2831em;"><span></span></span></span></span></span></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="minner">\u2026</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mpunct">,</span><span class="mspace" style="margin-right:0.1667em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-2.4169em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord text mtight"><span class="mord mtight">buckets</span></span></span></span></span><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">1</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.2831em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">\u2212</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1.0972em;vertical-align:-0.2831em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.8141em;"><span style="top:-2.4169em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight"><span class="mord text mtight"><span class="mord mtight">buckets</span></span></span></span></span><span style="top:-3.063em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mtight">2</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.2831em;"><span></span></span></span></span></span></span><span class="mclose">)</span></span></span></span>`,Zr,Nr,ds,Vm,qn,Xm,Qm,jn,Gm,Bm,Pr,D,Om,Hr,jf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="script">O</mi><mo stretchy="false">(</mo><msub><mi>n</mi><mi>s</mi></msub><mo>\xD7</mo><msub><mi>n</mi><mi>s</mi></msub><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">\\mathcal{O}(n_s \\times n_s)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathcal" style="margin-right:0.02778em;">O</span><span class="mopen">(</span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">\xD7</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mclose">)</span></span></span></span>',Vr,Xr,Cf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="script">O</mi><mo stretchy="false">(</mo><msub><mi>n</mi><mi>s</mi></msub><mo>\xD7</mo><mi>log</mi><mo>\u2061</mo><mo stretchy="false">(</mo><msub><mi>n</mi><mi>s</mi></msub><mo stretchy="false">)</mo><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">\\mathcal{O}(n_s \\times \\log(n_s))</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathcal" style="margin-right:0.02778em;">O</span><span class="mopen">(</span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">\xD7</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mop">lo<span style="margin-right:0.01389em;">g</span></span><span class="mopen">(</span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mclose">))</span></span></span></span>',Qr,Gr,Jf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>n</mi><mi>s</mi></msub></mrow><annotation encoding="application/x-tex">n_s</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span>',Br,Or,$s,se,Cn,ea,Dm,Jn,Ym,Dr,Y,Km,Fn,sp,ep,Un,ap,tp,Wn,np,op,Yr,K,rp,Kr,Ff='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="script">O</mi><mo stretchy="false">(</mo><msub><mi>n</mi><mi>s</mi></msub><mo>\xD7</mo><msub><mi>n</mi><mi>s</mi></msub><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">\\mathcal{O}(n_s \\times n_s)</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathcal" style="margin-right:0.02778em;">O</span><span class="mopen">(</span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">\xD7</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mclose">)</span></span></span></span>',sl,el,Uf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><mi mathvariant="script">O</mi><mo stretchy="false">(</mo><msub><mi>n</mi><mi>s</mi></msub><mo>\xD7</mo><mi>log</mi><mo>\u2061</mo><mo stretchy="false">(</mo><msub><mi>n</mi><mi>s</mi></msub><mo stretchy="false">)</mo><mo stretchy="false">)</mo></mrow><annotation encoding="application/x-tex">\\mathcal{O}(n_s \\times \\log(n_s))</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mord mathcal" style="margin-right:0.02778em;">O</span><span class="mopen">(</span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mspace" style="margin-right:0.2222em;"></span><span class="mbin">\xD7</span><span class="mspace" style="margin-right:0.2222em;"></span></span><span class="base"><span class="strut" style="height:1em;vertical-align:-0.25em;"></span><span class="mop">lo<span style="margin-right:0.01389em;">g</span></span><span class="mopen">(</span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span><span class="mclose">))</span></span></span></span>',al,tl,Wf='<span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML"><semantics><mrow><msub><mi>n</mi><mi>s</mi></msub></mrow><annotation encoding="application/x-tex">n_s</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.5806em;vertical-align:-0.15em;"></span><span class="mord"><span class="mord mathnormal">n</span><span class="msupsub"><span class="vlist-t vlist-t2"><span class="vlist-r"><span class="vlist" style="height:0.1514em;"><span style="top:-2.55em;margin-left:0em;margin-right:0.05em;"><span class="pstrut" style="height:2.7em;"></span><span class="sizing reset-size6 size3 mtight"><span class="mord mathnormal mtight">s</span></span></span></span><span class="vlist-s">\u200B</span></span><span class="vlist-r"><span class="vlist" style="height:0.15em;"><span></span></span></span></span></span></span></span></span></span>',nl,ol,Rs,ee,Ln,aa,lp,An,ip,rl,gs,mp,Sn,pp,cp,In,hp,dp,ll,ae,gp,ht,up,fp,il,ta,ml,Es,te,Zn,na,_p,Nn,yp,pl,ss,Pn,dt,vp,bp,Hn,gt,wp,kp,Vn,ut,Mp,Tp,Xn,ft,zp,cl,qs,ne,Qn,oa,xp,Gn,$p,hl,G,ra,Rp,js,Ep,_t,qp,jp,la,Cp,Jp,Fp,Cs,Up,yt,Wp,Lp,vt,Ap,Sp,Ip,oe,dl,Js,re,Bn,ia,Zp,On,Np,gl,B,ma,Pp,pa,Hp,ca,Vp,Xp,Qp,ha,Gp,bt,Bp,Op,Dp,wt,da,ul,Fs,le,Dn,ga,Yp,Yn,Kp,fl,ms,ua,sc,Us,ec,Kn,ac,tc,fa,nc,oc,rc,_a,lc,kt,ic,mc,_l,Ws,ie,so,ya,pc,eo,cc,yl,S,va,hc,ba,dc,wa,gc,uc,fc,ka,_c,Mt,yc,vc,bc,Ma,wc,Ta,kc,Mc,Tc,es,za,zc,Ls,xc,Tt,$c,Rc,ao,Ec,qc,jc,me,Cc,pe,vl,As,ce,to,xa,Jc,no,Fc,bl,I,$a,Uc,Ss,Wc,oo,Lc,Ac,Ra,Sc,Ic,Zc,Ea,Nc,zt,Pc,Hc,Vc,qa,Xc,ja,Qc,Gc,Bc,as,Ca,Oc,Is,Dc,xt,Yc,Kc,ro,sh,eh,ah,he,th,de,wl,Zs,ge,lo,Ja,nh,io,oh,kl,Z,Fa,rh,Ns,lh,mo,ih,mh,Ua,ph,ch,hh,Wa,dh,$t,gh,uh,fh,La,_h,Aa,yh,vh,bh,A,Sa,wh,Ps,kh,Rt,Mh,Th,po,zh,xh,$h,ue,Rh,fe,Eh,_e,qh,ye,Ml,Hs,ve,co,Ia,jh,ho,Ch,Tl,U,Za,Jh,go,Fh,Uh,Na,Wh,Pa,Lh,Ah,Sh,Ha,Ih,Et,Zh,Nh,Ph,Va,Hh,Xa,Vh,Xh,Qh,V,Qa,Gh,Vs,Bh,qt,Oh,Dh,uo,Yh,Kh,sd,be,ed,we,ad,ke,zl,Xs,Me,fo,Ga,td,_o,nd,xl,W,Ba,od,Qs,rd,yo,ld,id,vo,md,pd,cd,Oa,hd,Da,dd,gd,ud,Ya,fd,jt,_d,yd,vd,Ka,bd,st,wd,kd,Md,ts,et,Td,Gs,zd,Ct,xd,$d,bo,Rd,Ed,qd,Te,jd,ze,$l;return p=new N({}),Ze=new N({}),Xe=new N({}),De=new N({}),ea=new N({}),aa=new N({}),ta=new Bs({props:{code:"aW5wdXRfaWRzJTIwJTNEJTIwdG9rZW5pemVyLmVuY29kZSglMjJUaGlzJTIwaXMlMjBhJTIwc2VudGVuY2UlMjBmcm9tJTIwdGhlJTIwdHJhaW5pbmclMjBkYXRhJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFsb3NzJTIwJTNEJTIwbW9kZWwoaW5wdXRfaWRzJTJDJTIwbGFiZWxzJTNEaW5wdXRfaWRzKSU1QjAlNUQ=",highlighted:`input_ids = tokenizer.encode(<span class="hljs-string">&quot;This is a sentence from the training data&quot;</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
loss = model(input_ids, labels=input_ids)[<span class="hljs-number">0</span>]`}}),na=new N({}),oa=new N({}),ra=new Q({props:{name:"class transformers.ReformerConfig",anchor:"transformers.ReformerConfig",parameters:[{name:"attention_head_size",val:" = 64"},{name:"attn_layers",val:" = ['local', 'lsh', 'local', 'lsh', 'local', 'lsh']"},{name:"axial_norm_std",val:" = 1.0"},{name:"axial_pos_embds",val:" = True"},{name:"axial_pos_shape",val:" = [64, 64]"},{name:"axial_pos_embds_dim",val:" = [64, 192]"},{name:"chunk_size_lm_head",val:" = 0"},{name:"eos_token_id",val:" = 2"},{name:"feed_forward_size",val:" = 512"},{name:"hash_seed",val:" = None"},{name:"hidden_act",val:" = 'relu'"},{name:"hidden_dropout_prob",val:" = 0.05"},{name:"hidden_size",val:" = 256"},{name:"initializer_range",val:" = 0.02"},{name:"is_decoder",val:" = False"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"local_num_chunks_before",val:" = 1"},{name:"local_num_chunks_after",val:" = 0"},{name:"local_attention_probs_dropout_prob",val:" = 0.05"},{name:"local_attn_chunk_length",val:" = 64"},{name:"lsh_attn_chunk_length",val:" = 64"},{name:"lsh_attention_probs_dropout_prob",val:" = 0.0"},{name:"lsh_num_chunks_before",val:" = 1"},{name:"lsh_num_chunks_after",val:" = 0"},{name:"max_position_embeddings",val:" = 4096"},{name:"num_attention_heads",val:" = 12"},{name:"num_buckets",val:" = None"},{name:"num_hashes",val:" = 1"},{name:"pad_token_id",val:" = 0"},{name:"vocab_size",val:" = 320"},{name:"tie_word_embeddings",val:" = False"},{name:"use_cache",val:" = True"},{name:"classifier_dropout",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ReformerConfig.attention_head_size",description:`<strong>attention_head_size</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Dimensionality of the projected key, query and value vectors`,name:"attention_head_size"},{anchor:"transformers.ReformerConfig.attn_layers",description:`<strong>attn_layers</strong> (<code>List[str]</code>, <em>optional</em>, defaults to <code>[&quot;local&quot;, &quot;lsh&quot;, &quot;local&quot;, &quot;lsh&quot;, &quot;local&quot;, &quot;lsh&quot;]</code>) &#x2014;
List of attention layer types in ascending order. It can be chosen between a LSHSelfAttention layer
(<code>&quot;lsh&quot;</code>) and a LocalSelfAttention layer (<code>&quot;local&quot;</code>).</p>
<p>For more information on LSHSelfAttention layer, see <a href="reformer#lsh-self-attention">LSH Self Attention</a>. For
more information on LocalSelfAttention layer, see <a href="reformer#local-self-attention">Local Self Attention</a>.`,name:"attn_layers"},{anchor:"transformers.ReformerConfig.axial_pos_embds",description:`<strong>axial_pos_embds</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to use axial position embeddings. For more information on how axial position embeddings
work, see <a href="reformer#axial-positional-encodings">Axial Position Encodings</a>.`,name:"axial_pos_embds"},{anchor:"transformers.ReformerConfig.axial_norm_std",description:`<strong>axial_norm_std</strong> (<code>float</code>, <em>optional</em>, defaults to 1.0) &#x2014;
The standard deviation of the normal_initializer for initializing the weight matrices of the axial
positional encodings.`,name:"axial_norm_std"},{anchor:"transformers.ReformerConfig.axial_pos_shape",description:`<strong>axial_pos_shape</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[64, 64]</code>) &#x2014;
The position dims of the axial position encodings. During training, the product of the position dims has to
be equal to the sequence length.</p>
<p>For more information on how axial position embeddings work, see <a href="reformer#axial-positional-encodings">Axial Position
Encodings</a>.`,name:"axial_pos_shape"},{anchor:"transformers.ReformerConfig.axial_pos_embds_dim",description:`<strong>axial_pos_embds_dim</strong> (<code>List[int]</code>, <em>optional</em>, defaults to <code>[64, 192]</code>) &#x2014;
The embedding dims of the axial position encodings. The sum of the embedding dims has to be equal to the
hidden size.</p>
<p>For more information on how axial position embeddings work, see <a href="reformer#axial-positional-encodings">Axial Position
Encodings</a>.`,name:"axial_pos_embds_dim"},{anchor:"transformers.ReformerConfig.chunk_size_lm_head",description:`<strong>chunk_size_lm_head</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The chunk size of the final language model feed forward head layer. A chunk size of 0 means that the feed
forward layer is not chunked. A chunk size of n means that the feed forward layer processes n &lt;
sequence_length embeddings at a time.</p>
<p>For more information on feed forward chunking, see <a href="../glossary#feed-forward-chunking">How does Feed Forward Chunking
work?</a>.`,name:"chunk_size_lm_head"},{anchor:"transformers.ReformerConfig.eos_token_id",description:`<strong>eos_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The token id for the end-of-sentence token.`,name:"eos_token_id"},{anchor:"transformers.ReformerConfig.feed_forward_size",description:`<strong>feed_forward_size</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
Dimensionality of the feed_forward layer in the residual attention block.`,name:"feed_forward_size"},{anchor:"transformers.ReformerConfig.hash_seed",description:`<strong>hash_seed</strong> (<code>int</code>, <em>optional</em>) &#x2014;
Seed that can be used to make local sensitive hashing in <code>LSHSelfAttention</code> deterministic. This should only
be set for testing purposed. For evaluation and training purposes <code>hash_seed</code> should be left as <code>None</code> to
ensure fully random rotations in local sensitive hashing scheme.`,name:"hash_seed"},{anchor:"transformers.ReformerConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>Callable</code>, <em>optional</em>, defaults to <code>&quot;relu&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the feed forward layer in the residual attention
block. If string, <code>&quot;gelu&quot;</code>, <code>&quot;relu&quot;</code>, <code>&quot;silu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.ReformerConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.05) &#x2014;
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.ReformerConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 256) &#x2014;
Dimensionality of the output hidden states of the residual attention blocks.`,name:"hidden_size"},{anchor:"transformers.ReformerConfig.initializer_range",description:`<strong>initializer_range</strong> (<code>float</code>, <em>optional</em>, defaults to 0.02) &#x2014;
The standard deviation of the truncated_normal_initializer for initializing all weight matrices.`,name:"initializer_range"},{anchor:"transformers.ReformerConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to use a causal mask in addition to the <code>attention_mask</code> passed to <a href="/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerModel">ReformerModel</a>. When
using the Reformer for causal language modeling, this argument should be set to <code>True</code>.`,name:"is_decoder"},{anchor:"transformers.ReformerConfig.layer_norm_eps",description:`<strong>layer_norm_eps</strong> (<code>float</code>, <em>optional</em>, defaults to 1e-12) &#x2014;
The epsilon used by the layer normalization layers.`,name:"layer_norm_eps"},{anchor:"transformers.ReformerConfig.local_chunk_length",description:`<strong>local_chunk_length</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Length of chunk which attends to itself in <code>LocalSelfAttention</code>. Chunking reduces memory complexity from
sequence length x sequence length (self attention) to chunk length x chunk length x sequence length / chunk
length (chunked self attention).`,name:"local_chunk_length"},{anchor:"transformers.ReformerConfig.local_num_chunks_before",description:`<strong>local_num_chunks_before</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of previous neighbouring chunks to attend to in <code>LocalSelfAttention</code> layer to itself.`,name:"local_num_chunks_before"},{anchor:"transformers.ReformerConfig.local_num_chunks_after",description:`<strong>local_num_chunks_after</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Number of following neighbouring chunks to attend to in <code>LocalSelfAttention</code> layer in addition to itself.`,name:"local_num_chunks_after"},{anchor:"transformers.ReformerConfig.local_attention_probs_dropout_prob",description:`<strong>local_attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities in <code>LocalSelfAttention</code>.`,name:"local_attention_probs_dropout_prob"},{anchor:"transformers.ReformerConfig.lsh_attn_chunk_length",description:`<strong>lsh_attn_chunk_length</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Length of chunk which attends to itself in <code>LSHSelfAttention</code>. Chunking reduces memory complexity from
sequence length x sequence length (self attention) to chunk length x chunk length x sequence length / chunk
length (chunked self attention).`,name:"lsh_attn_chunk_length"},{anchor:"transformers.ReformerConfig.lsh_num_chunks_before",description:`<strong>lsh_num_chunks_before</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of previous neighbouring chunks to attend to in <code>LSHSelfAttention</code> layer to itself.`,name:"lsh_num_chunks_before"},{anchor:"transformers.ReformerConfig.lsh_num_chunks_after",description:`<strong>lsh_num_chunks_after</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
Number of following neighbouring chunks to attend to in <code>LSHSelfAttention</code> layer to itself.`,name:"lsh_num_chunks_after"},{anchor:"transformers.ReformerConfig.lsh_attention_probs_dropout_prob",description:`<strong>lsh_attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities in <code>LSHSelfAttention</code>.`,name:"lsh_attention_probs_dropout_prob"},{anchor:"transformers.ReformerConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 512 or 1024 or 2048).`,name:"max_position_embeddings"},{anchor:"transformers.ReformerConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.ReformerConfig.num_buckets",description:`<strong>num_buckets</strong> (<code>int</code> or <code>List[int]</code>, <em>optional</em>) &#x2014;
Number of buckets, the key query vectors can be &#x201C;hashed into&#x201D; using the locality sensitive hashing scheme.
Each query key vector is hashed into a hash in <code>1, ..., num_buckets</code>. The number of buckets can also be
factorized into a list for improved memory complexity. In this case, each query key vector is hashed into a
hash in <code>1-1, 1-2, ..., num_buckets[0]-1, ..., num_buckets[0]-num_buckets[1]</code> if <code>num_buckets</code> is
factorized into two factors. The number of buckets (or the product the factors) should approximately equal
sequence length / lsh_chunk_length. If <code>num_buckets</code> not set, a good value is calculated on the fly.`,name:"num_buckets"},{anchor:"transformers.ReformerConfig.num_hashes",description:`<strong>num_hashes</strong> (<code>int</code>, <em>optional</em>, defaults to 1) &#x2014;
Number of hashing rounds (e.g., number of random rotations) in Local Sensitive Hashing scheme. The higher
<code>num_hashes</code>, the more accurate the <code>LSHSelfAttention</code> becomes, but also the more memory and time intensive
the hashing becomes.`,name:"num_hashes"},{anchor:"transformers.ReformerConfig.pad_token_id",description:`<strong>pad_token_id</strong> (<code>int</code>, <em>optional</em>, defaults to 0) &#x2014;
The token id for the padding token.`,name:"pad_token_id"},{anchor:"transformers.ReformerConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 320) &#x2014;\\
Vocabulary size of the Reformer model. Defines the number of different tokens that can be represented by
the <code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerModel">ReformerModel</a>.`,name:"vocab_size"},{anchor:"transformers.ReformerConfig.tie_word_embeddings",description:`<strong>tie_word_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to tie input and output embeddings.`,name:"tie_word_embeddings"},{anchor:"transformers.ReformerConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models).`,name:"use_cache"},{anchor:"transformers.ReformerConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/reformer/configuration_reformer.py#L32"}}),oe=new Ae({props:{anchor:"transformers.ReformerConfig.example",$$slots:{default:[Nf]},$$scope:{ctx:x}}}),ia=new N({}),ma=new Q({props:{name:"class transformers.ReformerTokenizer",anchor:"transformers.ReformerTokenizer",parameters:[{name:"vocab_file",val:""},{name:"eos_token",val:" = '</s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"additional_special_tokens",val:" = []"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ReformerTokenizer.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.ReformerTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.ReformerTokenizer.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.ReformerTokenizer.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.ReformerTokenizer.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Additional special tokens used by the tokenizer.`,name:"additional_special_tokens"},{anchor:"transformers.ReformerTokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/reformer/tokenization_reformer.py#L48"}}),da=new Q({props:{name:"save_vocabulary",anchor:"transformers.ReformerTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/reformer/tokenization_reformer.py#L173"}}),ga=new N({}),ua=new Q({props:{name:"class transformers.ReformerTokenizerFast",anchor:"transformers.ReformerTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"eos_token",val:" = '</s>'"},{name:"unk_token",val:" = '<unk>'"},{name:"additional_special_tokens",val:" = []"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.ReformerTokenizerFast.vocab_file",description:`<strong>vocab_file</strong> (<code>str</code>) &#x2014;
<a href="https://github.com/google/sentencepiece" rel="nofollow">SentencePiece</a> file (generally has a <em>.spm</em> extension) that
contains the vocabulary necessary to instantiate a tokenizer.`,name:"vocab_file"},{anchor:"transformers.ReformerTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the end of sequence.
The token used is the <code>sep_token</code>.</p>

					</div>`,name:"eos_token"},{anchor:"transformers.ReformerTokenizerFast.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.ReformerTokenizerFast.pad_token",description:`<strong>pad_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;pad&gt;&quot;</code>) &#x2014;
The token used for padding, for example when batching sequences of different lengths.`,name:"pad_token"},{anchor:"transformers.ReformerTokenizerFast.additional_special_tokens",description:`<strong>additional_special_tokens</strong> (<code>List[str]</code>, <em>optional</em>) &#x2014;
Additional special tokens used by the tokenizer.`,name:"additional_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/reformer/tokenization_reformer_fast.py#L57"}}),ya=new N({}),va=new Q({props:{name:"class transformers.ReformerModel",anchor:"transformers.ReformerModel",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ReformerModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerConfig">ReformerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/reformer/modeling_reformer.py#L1976"}}),za=new Q({props:{name:"forward",anchor:"transformers.ReformerModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"num_hashes",val:": typing.Optional[int] = None"},{name:"past_buckets_states",val:": typing.Optional[typing.List[typing.Tuple[torch.Tensor]]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.ReformerModel.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. During training the input_ids sequence_length has to be
a multiple of the relevant model&#x2019;s chunk lengths (lsh&#x2019;s, local&#x2019;s or both). During evaluation, the indices
are automatically padded to be a multiple of the chunk length.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.ReformerModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.ReformerModel.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.ReformerModel.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.ReformerModel.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.ReformerModel.forward.num_hashes",description:`<strong>num_hashes</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of hashing rounds that should be performed during bucketing. Setting this argument overwrites
the default defined in <code>config.num_hashes</code>.</p>
<p>For more information, see <code>num_hashes</code> in <a href="/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerConfig">ReformerConfig</a>.`,name:"num_hashes"},{anchor:"transformers.ReformerModel.forward.past_buckets_states",description:`<strong>past_buckets_states</strong> (<code>List[Tuple(torch.LongTensor, torch.FloatTensor)]</code>, <em>optional</em>) &#x2014;
List of <code>Tuple(torch.LongTensor, torch.FloatTensor</code> of length <code>config.n_layers</code>, with the first element
being the previous <em>buckets</em> of shape <code>(batch_size, num_heads, num_hashes, sequence_length)</code>) and the
second being the previous <em>hidden_states</em> of shape <code>(batch_size, sequence_length, hidden_size)</code>).</p>
<p>Contains precomputed hidden-states and buckets (only relevant for LSH Self-Attention). Can be used to speed
up sequential decoding.`,name:"past_buckets_states"},{anchor:"transformers.ReformerModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.ReformerModel.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.ReformerModel.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.ReformerModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/reformer/modeling_reformer.py#L2004",returnDescription:`
<p>A <code>transformers.models.reformer.modeling_reformer.ReformerModelOutput</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.30.0/en/model_doc/reformer#transformers.ReformerConfig"
>ReformerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_predict, hidden_size)</code>) \u2014 Sequence of hidden-states at the last layer of the model.</p>
<p><code>num_predict</code> corresponds to <code>target_mapping.shape[1]</code>. If <code>target_mapping</code> is <code>None</code>, then <code>num_predict</code>
corresponds to <code>sequence_length</code>.</p>
</li>
<li>
<p><strong>past_buckets_states</strong> (<code>List[Tuple(torch.LongTensor, torch.FloatTensor)]</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 List of <code>Tuple(torch.LongTensor, torch.FloatTensor</code> of length <code>config.n_layers</code>, with the first element
being the previous <em>buckets</em> of shape <code>(batch_size, num_heads, num_hashes, sequence_length)</code>) and the
second being the previous <em>hidden_states</em> of shape <code>(batch_size, sequence_length, hidden_size)</code>).</p>
<p>Contains precomputed buckets and hidden-states that can be used (see <code>past_buckets_states</code> input) to speed
up sequential decoding.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings and one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.models.reformer.modeling_reformer.ReformerModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),me=new Ot({props:{$$slots:{default:[Pf]},$$scope:{ctx:x}}}),pe=new Ae({props:{anchor:"transformers.ReformerModel.forward.example",$$slots:{default:[Hf]},$$scope:{ctx:x}}}),xa=new N({}),$a=new Q({props:{name:"class transformers.ReformerModelWithLMHead",anchor:"transformers.ReformerModelWithLMHead",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ReformerModelWithLMHead.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerConfig">ReformerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/reformer/modeling_reformer.py#L2187"}}),Ca=new Q({props:{name:"forward",anchor:"transformers.ReformerModelWithLMHead.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"num_hashes",val:": typing.Optional[int] = None"},{name:"past_buckets_states",val:": typing.Optional[typing.List[typing.Tuple[torch.Tensor]]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"}],parametersDescription:[{anchor:"transformers.ReformerModelWithLMHead.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. During training the input_ids sequence_length has to be
a multiple of the relevant model&#x2019;s chunk lengths (lsh&#x2019;s, local&#x2019;s or both). During evaluation, the indices
are automatically padded to be a multiple of the chunk length.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.ReformerModelWithLMHead.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.ReformerModelWithLMHead.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.ReformerModelWithLMHead.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.ReformerModelWithLMHead.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.ReformerModelWithLMHead.forward.num_hashes",description:`<strong>num_hashes</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of hashing rounds that should be performed during bucketing. Setting this argument overwrites
the default defined in <code>config.num_hashes</code>.</p>
<p>For more information, see <code>num_hashes</code> in <a href="/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerConfig">ReformerConfig</a>.`,name:"num_hashes"},{anchor:"transformers.ReformerModelWithLMHead.forward.past_buckets_states",description:`<strong>past_buckets_states</strong> (<code>List[Tuple(torch.LongTensor, torch.FloatTensor)]</code>, <em>optional</em>) &#x2014;
List of <code>Tuple(torch.LongTensor, torch.FloatTensor</code> of length <code>config.n_layers</code>, with the first element
being the previous <em>buckets</em> of shape <code>(batch_size, num_heads, num_hashes, sequence_length)</code>) and the
second being the previous <em>hidden_states</em> of shape <code>(batch_size, sequence_length, hidden_size)</code>).</p>
<p>Contains precomputed hidden-states and buckets (only relevant for LSH Self-Attention). Can be used to speed
up sequential decoding.`,name:"past_buckets_states"},{anchor:"transformers.ReformerModelWithLMHead.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.ReformerModelWithLMHead.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.ReformerModelWithLMHead.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.ReformerModelWithLMHead.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ReformerModelWithLMHead.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>[-100, 0, ..., config.vocab_size - 1]</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.30.0/src/transformers/models/reformer/modeling_reformer.py#L2214",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutput"
>transformers.modeling_outputs.CausalLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerConfig"
>ReformerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutput"
>transformers.modeling_outputs.CausalLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),he=new Ot({props:{$$slots:{default:[Vf]},$$scope:{ctx:x}}}),de=new Ae({props:{anchor:"transformers.ReformerModelWithLMHead.forward.example",$$slots:{default:[Xf]},$$scope:{ctx:x}}}),Ja=new N({}),Fa=new Q({props:{name:"class transformers.ReformerForMaskedLM",anchor:"transformers.ReformerForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ReformerForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerConfig">ReformerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/reformer/modeling_reformer.py#L2313"}}),Sa=new Q({props:{name:"forward",anchor:"transformers.ReformerForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"num_hashes",val:": typing.Optional[int] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.ReformerForMaskedLM.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. During training the input_ids sequence_length has to be
a multiple of the relevant model&#x2019;s chunk lengths (lsh&#x2019;s, local&#x2019;s or both). During evaluation, the indices
are automatically padded to be a multiple of the chunk length.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.ReformerForMaskedLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.ReformerForMaskedLM.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.ReformerForMaskedLM.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.ReformerForMaskedLM.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.ReformerForMaskedLM.forward.num_hashes",description:`<strong>num_hashes</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of hashing rounds that should be performed during bucketing. Setting this argument overwrites
the default defined in <code>config.num_hashes</code>.</p>
<p>For more information, see <code>num_hashes</code> in <a href="/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerConfig">ReformerConfig</a>.`,name:"num_hashes"},{anchor:"transformers.ReformerForMaskedLM.forward.past_buckets_states",description:`<strong>past_buckets_states</strong> (<code>List[Tuple(torch.LongTensor, torch.FloatTensor)]</code>, <em>optional</em>) &#x2014;
List of <code>Tuple(torch.LongTensor, torch.FloatTensor</code> of length <code>config.n_layers</code>, with the first element
being the previous <em>buckets</em> of shape <code>(batch_size, num_heads, num_hashes, sequence_length)</code>) and the
second being the previous <em>hidden_states</em> of shape <code>(batch_size, sequence_length, hidden_size)</code>).</p>
<p>Contains precomputed hidden-states and buckets (only relevant for LSH Self-Attention). Can be used to speed
up sequential decoding.`,name:"past_buckets_states"},{anchor:"transformers.ReformerForMaskedLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.ReformerForMaskedLM.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.ReformerForMaskedLM.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.ReformerForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ReformerForMaskedLM.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Labels for computing the masked language modeling loss. Indices should be in <code>[-100, 0, ..., config.vocab_size]</code> (see <code>input_ids</code> docstring) Tokens with indices set to <code>-100</code> are ignored (masked),
the loss is only computed for the tokens with labels`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/reformer/modeling_reformer.py#L2332",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerConfig"
>ReformerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ue=new Ot({props:{$$slots:{default:[Qf]},$$scope:{ctx:x}}}),fe=new Ot({props:{warning:!0,$$slots:{default:[Gf]},$$scope:{ctx:x}}}),_e=new Ae({props:{anchor:"transformers.ReformerForMaskedLM.forward.example",$$slots:{default:[Bf]},$$scope:{ctx:x}}}),ye=new Ae({props:{anchor:"transformers.ReformerForMaskedLM.forward.example-2",$$slots:{default:[Of]},$$scope:{ctx:x}}}),Ia=new N({}),Za=new Q({props:{name:"class transformers.ReformerForSequenceClassification",anchor:"transformers.ReformerForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ReformerForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerConfig">ReformerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/reformer/modeling_reformer.py#L2441"}}),Qa=new Q({props:{name:"forward",anchor:"transformers.ReformerForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"num_hashes",val:": typing.Optional[int] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.ReformerForSequenceClassification.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. During training the input_ids sequence_length has to be
a multiple of the relevant model&#x2019;s chunk lengths (lsh&#x2019;s, local&#x2019;s or both). During evaluation, the indices
are automatically padded to be a multiple of the chunk length.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.ReformerForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.ReformerForSequenceClassification.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.ReformerForSequenceClassification.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.ReformerForSequenceClassification.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.ReformerForSequenceClassification.forward.num_hashes",description:`<strong>num_hashes</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of hashing rounds that should be performed during bucketing. Setting this argument overwrites
the default defined in <code>config.num_hashes</code>.</p>
<p>For more information, see <code>num_hashes</code> in <a href="/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerConfig">ReformerConfig</a>.`,name:"num_hashes"},{anchor:"transformers.ReformerForSequenceClassification.forward.past_buckets_states",description:`<strong>past_buckets_states</strong> (<code>List[Tuple(torch.LongTensor, torch.FloatTensor)]</code>, <em>optional</em>) &#x2014;
List of <code>Tuple(torch.LongTensor, torch.FloatTensor</code> of length <code>config.n_layers</code>, with the first element
being the previous <em>buckets</em> of shape <code>(batch_size, num_heads, num_hashes, sequence_length)</code>) and the
second being the previous <em>hidden_states</em> of shape <code>(batch_size, sequence_length, hidden_size)</code>).</p>
<p>Contains precomputed hidden-states and buckets (only relevant for LSH Self-Attention). Can be used to speed
up sequential decoding.`,name:"past_buckets_states"},{anchor:"transformers.ReformerForSequenceClassification.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.ReformerForSequenceClassification.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.ReformerForSequenceClassification.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.ReformerForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ReformerForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/reformer/modeling_reformer.py#L2455",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerConfig"
>ReformerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),be=new Ot({props:{$$slots:{default:[Df]},$$scope:{ctx:x}}}),we=new Ae({props:{anchor:"transformers.ReformerForSequenceClassification.forward.example",$$slots:{default:[Yf]},$$scope:{ctx:x}}}),ke=new Ae({props:{anchor:"transformers.ReformerForSequenceClassification.forward.example-2",$$slots:{default:[Kf]},$$scope:{ctx:x}}}),Ga=new N({}),Ba=new Q({props:{name:"class transformers.ReformerForQuestionAnswering",anchor:"transformers.ReformerForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.ReformerForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerConfig">ReformerConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/reformer/modeling_reformer.py#L2588"}}),et=new Q({props:{name:"forward",anchor:"transformers.ReformerForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"head_mask",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"num_hashes",val:": typing.Optional[int] = None"},{name:"start_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"end_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.ReformerForQuestionAnswering.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. During training the input_ids sequence_length has to be
a multiple of the relevant model&#x2019;s chunk lengths (lsh&#x2019;s, local&#x2019;s or both). During evaluation, the indices
are automatically padded to be a multiple of the chunk length.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.30.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.30.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.30.0/en/model_doc/speecht5#transformers.SpeechT5Tokenizer.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.ReformerForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.ReformerForQuestionAnswering.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Indices of positions of each input sequence tokens in the position embeddings. Selected in the range <code>[0, config.max_position_embeddings - 1]</code>.</p>
<p><a href="../glossary#position-ids">What are position IDs?</a>`,name:"position_ids"},{anchor:"transformers.ReformerForQuestionAnswering.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.ReformerForQuestionAnswering.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.ReformerForQuestionAnswering.forward.num_hashes",description:`<strong>num_hashes</strong> (<code>int</code>, <em>optional</em>) &#x2014;
The number of hashing rounds that should be performed during bucketing. Setting this argument overwrites
the default defined in <code>config.num_hashes</code>.</p>
<p>For more information, see <code>num_hashes</code> in <a href="/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerConfig">ReformerConfig</a>.`,name:"num_hashes"},{anchor:"transformers.ReformerForQuestionAnswering.forward.past_buckets_states",description:`<strong>past_buckets_states</strong> (<code>List[Tuple(torch.LongTensor, torch.FloatTensor)]</code>, <em>optional</em>) &#x2014;
List of <code>Tuple(torch.LongTensor, torch.FloatTensor</code> of length <code>config.n_layers</code>, with the first element
being the previous <em>buckets</em> of shape <code>(batch_size, num_heads, num_hashes, sequence_length)</code>) and the
second being the previous <em>hidden_states</em> of shape <code>(batch_size, sequence_length, hidden_size)</code>).</p>
<p>Contains precomputed hidden-states and buckets (only relevant for LSH Self-Attention). Can be used to speed
up sequential decoding.`,name:"past_buckets_states"},{anchor:"transformers.ReformerForQuestionAnswering.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"},{anchor:"transformers.ReformerForQuestionAnswering.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.ReformerForQuestionAnswering.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.ReformerForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.ReformerForQuestionAnswering.forward.start_positions",description:`<strong>start_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the start of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"start_positions"},{anchor:"transformers.ReformerForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.30.0/src/transformers/models/reformer/modeling_reformer.py#L2600",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerConfig"
>ReformerConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Total span extraction loss is the sum of a Cross-Entropy for the start and end positions.</p>
</li>
<li>
<p><strong>start_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.30.0/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Te=new Ot({props:{$$slots:{default:[s_]},$$scope:{ctx:x}}}),ze=new Ae({props:{anchor:"transformers.ReformerForQuestionAnswering.forward.example",$$slots:{default:[e_]},$$scope:{ctx:x}}}),{c(){d=o("meta"),y=c(),u=o("h1"),f=o("a"),v=o("span"),b(p.$$.fragment),_=c(),C=o("span"),oi=t("Reformer"),Co=c(),ws=o("div"),ot=o("a"),rt=o("img"),ri=c(),lt=o("a"),it=o("img"),Jo=c(),ks=o("p"),Dt=o("strong"),li=t("DISCLAIMER:"),ii=t(" This model is still a work in progress, if you see something strange, file a "),Ie=o("a"),mi=t("Github Issue"),pi=t("."),Fo=c(),Ms=o("h2"),Os=o("a"),Yt=o("span"),b(Ze.$$.fragment),ci=c(),Kt=o("span"),hi=t("Overview"),Uo=c(),Ds=o("p"),di=t("The Reformer model was proposed in the paper "),Ne=o("a"),gi=t("Reformer: The Efficient Transformer"),ui=t(" by Nikita Kitaev, \u0141ukasz Kaiser, Anselm Levskaya."),Wo=c(),mt=o("p"),fi=t("The abstract from the paper is the following:"),Lo=c(),pt=o("p"),sn=o("em"),_i=t(`Large Transformer models routinely achieve state-of-the-art results on a number of tasks but training these models can
be prohibitively costly, especially on long sequences. We introduce two techniques to improve the efficiency of
Transformers. For one, we replace dot-product attention by one that uses locality-sensitive hashing, changing its
complexity from O(L^2) to O(Llog(L)), where L is the length of the sequence. Furthermore, we use reversible residual
layers instead of the standard residuals, which allows storing activations only once in the training process instead of
N times, where N is the number of layers. The resulting model, the Reformer, performs on par with Transformer models
while being much more memory-efficient and much faster on long sequences.`),Ao=c(),ps=o("p"),yi=t("This model was contributed by "),Pe=o("a"),vi=t("patrickvonplaten"),bi=t(`. The Authors\u2019 code can be
found `),He=o("a"),wi=t("here"),ki=t("."),So=c(),ct=o("p"),Mi=t("Tips:"),Io=c(),P=o("ul"),is=o("li"),Ti=t("Reformer does "),en=o("strong"),zi=t("not"),xi=t(" work with "),an=o("em"),$i=t("torch.nn.DataParallel"),Ri=t(" due to a bug in PyTorch, see "),Ve=o("a"),Ei=t("issue #36035"),qi=t("."),ji=c(),tn=o("li"),Ci=t("Use Axial position encoding (see below for more details). It\u2019s a mechanism to avoid having a huge positional encoding matrix (when the sequence length is very big) by factorizing it into smaller matrices."),Ji=c(),nn=o("li"),Fi=t("Replace traditional attention by LSH (local-sensitive hashing) attention (see below for more details). It\u2019s a technique to avoid computing the full product query-key in the attention layers."),Ui=c(),on=o("li"),Wi=t("Avoid storing the intermediate results of each layer by using reversible transformer layers to obtain them during the backward pass (subtracting the residuals from the input of the next layer gives them back) or recomputing them for results inside a given layer (less efficient than storing them but saves memory)."),Li=c(),rn=o("li"),Ai=t("Compute the feedforward operations by chunks and not on the whole batch."),Zo=c(),Ts=o("h2"),Ys=o("a"),ln=o("span"),b(Xe.$$.fragment),Si=c(),mn=o("span"),Ii=t("Axial Positional Encodings"),No=c(),E=o("p"),Zi=t("Axial Positional Encodings were first implemented in Google\u2019s "),Qe=o("a"),Ni=t("trax library"),Pi=t(`
and developed by the authors of this model\u2019s paper. In models that are treating very long input sequences, the
conventional position id encodings store an embedings vector of size `),Po=new $,Ho=t(" being the "),pn=o("code"),Hi=t("config.hidden_size"),Vi=t(` for
every position `),Vo=new $,Xo=t(", with "),Qo=new $,Go=t(" being "),cn=o("code"),Xi=t("config.max_embedding_size"),Qi=t(`. This means that having
a sequence length of `),Bo=new $,Oo=t(" and a "),hn=o("code"),Gi=t("config.hidden_size"),Bi=t(" of "),Do=new $,Yo=t(`
would result in a position encoding matrix:
`),Ko=new $,sr=c(),zs=o("p"),Oi=t("which alone has over 500M parameters to store. Axial positional encodings factorize "),er=new $,ar=t(` into two matrices:
`),tr=new $,nr=c(),Ge=o("p"),Di=t(`and
`),or=new $,rr=c(),Be=o("p"),Yi=t(`with:
`),lr=new $,ir=c(),Oe=o("p"),Ki=t(`Therefore the following holds:
`),mr=new $,pr=c(),J=o("p"),sm=t("Intuitively, this means that a position embedding vector "),cr=new $,hr=t(` is now the composition of two
factorized embedding vectors: `),dr=new $,gr=t(", where as the "),dn=o("code"),em=t("config.max_embedding_size"),am=t(` dimension
`),ur=new $,fr=t(" is factorized into "),_r=new $,yr=t(`. This design ensures that each position embedding vector
`),vr=new $,br=t(" is unique."),wr=c(),cs=o("p"),tm=t("Using the above example again, axial position encoding with "),kr=new $,Mr=t(`
can drastically reduced the number of parameters from 500 000 000 to `),Tr=new $,zr=t(" parameters, this means 85% less memory usage."),xr=c(),q=o("p"),nm=t("In practice, the parameter "),gn=o("code"),om=t("config.axial_pos_embds_dim"),rm=t(" is set to a tuple "),$r=new $,Rr=t(` which sum has to be
equal to `),un=o("code"),lm=t("config.hidden_size"),im=t(" and "),fn=o("code"),mm=t("config.axial_pos_shape"),pm=t(" is set to a tuple "),Er=new $,qr=t(` which
product has to be equal to `),_n=o("code"),cm=t("config.max_embedding_size"),hm=t(", which during training has to be equal to the "),yn=o("em"),dm=t(`sequence
length`),gm=t(" of the "),vn=o("code"),um=t("input_ids"),fm=t("."),jr=c(),xs=o("h2"),Ks=o("a"),bn=o("span"),b(De.$$.fragment),_m=c(),wn=o("span"),ym=t("LSH Self Attention"),Cr=c(),O=o("p"),vm=t(`In Locality sensitive hashing (LSH) self attention the key and query projection weights are tied. Therefore, the key
query embedding vectors are also tied. LSH self attention uses the locality sensitive hashing mechanism proposed in
`),Ye=o("a"),bm=t("Practical and Optimal LSH for Angular Distance"),wm=t(` to assign each of the tied key
query embedding vectors to one of `),kn=o("code"),km=t("config.num_buckets"),Mm=t(` possible buckets. The premise is that the more \u201Csimilar\u201D
key query embedding vectors (in terms of `),Mn=o("em"),Tm=t("cosine similarity"),zm=t(`) are to each other, the more likely they are assigned to
the same bucket.`),Jr=c(),L=o("p"),xm=t("The accuracy of the LSH mechanism can be improved by increasing "),Tn=o("code"),$m=t("config.num_hashes"),Rm=t(` or directly the argument
`),zn=o("code"),Em=t("num_hashes"),qm=t(` of the forward function so that the output of the LSH self attention better approximates the output
of the \u201Cnormal\u201D full self attention. The buckets are then sorted and chunked into query key embedding vector chunks
each of length `),xn=o("code"),jm=t("config.lsh_chunk_length"),Cm=t(`. For each chunk, the query embedding vectors attend to its key vectors
(which are tied to themselves) and to the key embedding vectors of `),$n=o("code"),Jm=t("config.lsh_num_chunks_before"),Fm=t(` previous
neighboring chunks and `),Rn=o("code"),Um=t("config.lsh_num_chunks_after"),Wm=t(" following neighboring chunks."),Fr=c(),hs=o("p"),Lm=t("For more information, see the "),Ke=o("a"),Am=t("original Paper"),Sm=t(" or this great "),sa=o("a"),Im=t("blog post"),Zm=t("."),Ur=c(),H=o("p"),Nm=t("Note that "),En=o("code"),Pm=t("config.num_buckets"),Hm=t(" can also be factorized into a list "),Wr=new $,Lr=t(". This way instead of assigning the query key embedding vectors to one of "),Ar=new $,Sr=t(" they are assigned to one of "),Ir=new $,Zr=t(`. This is crucial for very long sequences to
save memory.`),Nr=c(),ds=o("p"),Vm=t("When training a model from scratch, it is recommended to leave "),qn=o("code"),Xm=t("config.num_buckets=None"),Qm=t(`, so that depending on the
sequence length a good value for `),jn=o("code"),Gm=t("num_buckets"),Bm=t(` is calculated on the fly. This value will then automatically be
saved in the config and should be reused for inference.`),Pr=c(),D=o("p"),Om=t(`Using LSH self attention, the memory and time complexity of the query-key matmul operation can be reduced from
`),Hr=new $,Vr=t(" to "),Xr=new $,Qr=t(`, which usually represents the memory
and time bottleneck in a transformer model, with `),Gr=new $,Br=t(" being the sequence length."),Or=c(),$s=o("h2"),se=o("a"),Cn=o("span"),b(ea.$$.fragment),Dm=c(),Jn=o("span"),Ym=t("Local Self Attention"),Dr=c(),Y=o("p"),Km=t(`Local self attention is essentially a \u201Cnormal\u201D self attention layer with key, query and value projections, but is
chunked so that in each chunk of length `),Fn=o("code"),sp=t("config.local_chunk_length"),ep=t(` the query embedding vectors only attends to
the key embedding vectors in its chunk and to the key embedding vectors of `),Un=o("code"),ap=t("config.local_num_chunks_before"),tp=t(`
previous neighboring chunks and `),Wn=o("code"),np=t("config.local_num_chunks_after"),op=t(" following neighboring chunks."),Yr=c(),K=o("p"),rp=t(`Using Local self attention, the memory and time complexity of the query-key matmul operation can be reduced from
`),Kr=new $,sl=t(" to "),el=new $,al=t(`, which usually represents the memory
and time bottleneck in a transformer model, with `),tl=new $,nl=t(" being the sequence length."),ol=c(),Rs=o("h2"),ee=o("a"),Ln=o("span"),b(aa.$$.fragment),lp=c(),An=o("span"),ip=t("Training"),rl=c(),gs=o("p"),mp=t(`During training, we must ensure that the sequence length is set to a value that can be divided by the least common
multiple of `),Sn=o("code"),pp=t("config.lsh_chunk_length"),cp=t(" and "),In=o("code"),hp=t("config.local_chunk_length"),dp=t(` and that the parameters of the Axial
Positional Encodings are correctly set as described above. Reformer is very memory efficient so that the model can
easily be trained on sequences as long as 64000 tokens.`),ll=c(),ae=o("p"),gp=t("For training, the "),ht=o("a"),up=t("ReformerModelWithLMHead"),fp=t(" should be used as follows:"),il=c(),b(ta.$$.fragment),ml=c(),Es=o("h2"),te=o("a"),Zn=o("span"),b(na.$$.fragment),_p=c(),Nn=o("span"),yp=t("Documentation resources"),pl=c(),ss=o("ul"),Pn=o("li"),dt=o("a"),vp=t("Text classification task guide"),bp=c(),Hn=o("li"),gt=o("a"),wp=t("Question answering task guide"),kp=c(),Vn=o("li"),ut=o("a"),Mp=t("Causal language modeling task guide"),Tp=c(),Xn=o("li"),ft=o("a"),zp=t("Masked language modeling task guide"),cl=c(),qs=o("h2"),ne=o("a"),Qn=o("span"),b(oa.$$.fragment),xp=c(),Gn=o("span"),$p=t("ReformerConfig"),hl=c(),G=o("div"),b(ra.$$.fragment),Rp=c(),js=o("p"),Ep=t("This is the configuration class to store the configuration of a "),_t=o("a"),qp=t("ReformerModel"),jp=t(`. It is used to instantiate a
Reformer 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 ReFormer
`),la=o("a"),Cp=t("google/reformer-crime-and-punishment"),Jp=t(" architecture."),Fp=c(),Cs=o("p"),Up=t("Configuration objects inherit from "),yt=o("a"),Wp=t("PretrainedConfig"),Lp=t(` and can be used to control the model outputs. Read the
documentation from `),vt=o("a"),Ap=t("PretrainedConfig"),Sp=t(" for more information."),Ip=c(),b(oe.$$.fragment),dl=c(),Js=o("h2"),re=o("a"),Bn=o("span"),b(ia.$$.fragment),Zp=c(),On=o("span"),Np=t("ReformerTokenizer"),gl=c(),B=o("div"),b(ma.$$.fragment),Pp=c(),pa=o("p"),Hp=t("Construct a Reformer tokenizer. Based on "),ca=o("a"),Vp=t("SentencePiece"),Xp=t(" ."),Qp=c(),ha=o("p"),Gp=t("This tokenizer inherits from "),bt=o("a"),Bp=t("PreTrainedTokenizer"),Op=t(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Dp=c(),wt=o("div"),b(da.$$.fragment),ul=c(),Fs=o("h2"),le=o("a"),Dn=o("span"),b(ga.$$.fragment),Yp=c(),Yn=o("span"),Kp=t("ReformerTokenizerFast"),fl=c(),ms=o("div"),b(ua.$$.fragment),sc=c(),Us=o("p"),ec=t("Construct a \u201Cfast\u201D Reformer tokenizer (backed by HuggingFace\u2019s "),Kn=o("em"),ac=t("tokenizers"),tc=t(` library). Based on
`),fa=o("a"),nc=t("Unigram"),oc=t("."),rc=c(),_a=o("p"),lc=t("This tokenizer inherits from "),kt=o("a"),ic=t("PreTrainedTokenizerFast"),mc=t(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),_l=c(),Ws=o("h2"),ie=o("a"),so=o("span"),b(ya.$$.fragment),pc=c(),eo=o("span"),cc=t("ReformerModel"),yl=c(),S=o("div"),b(va.$$.fragment),hc=c(),ba=o("p"),dc=t(`The bare Reformer Model transformer outputting raw hidden-stateswithout any specific head on top.
Reformer was proposed in `),wa=o("a"),gc=t("Reformer: The Efficient Transformer"),uc=t(` by Nikita Kitaev,
\u0141ukasz Kaiser, Anselm Levskaya.`),fc=c(),ka=o("p"),_c=t("This model inherits from "),Mt=o("a"),yc=t("PreTrainedModel"),vc=t(`. 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.)`),bc=c(),Ma=o("p"),wc=t("This model is also a PyTorch "),Ta=o("a"),kc=t("torch.nn.Module"),Mc=t(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Tc=c(),es=o("div"),b(za.$$.fragment),zc=c(),Ls=o("p"),xc=t("The "),Tt=o("a"),$c=t("ReformerModel"),Rc=t(" forward method, overrides the "),ao=o("code"),Ec=t("__call__"),qc=t(" special method."),jc=c(),b(me.$$.fragment),Cc=c(),b(pe.$$.fragment),vl=c(),As=o("h2"),ce=o("a"),to=o("span"),b(xa.$$.fragment),Jc=c(),no=o("span"),Fc=t("ReformerModelWithLMHead"),bl=c(),I=o("div"),b($a.$$.fragment),Uc=c(),Ss=o("p"),Wc=t("Reformer Model with a "),oo=o("code"),Lc=t("language modeling"),Ac=t(` head on top.
Reformer was proposed in `),Ra=o("a"),Sc=t("Reformer: The Efficient Transformer"),Ic=t(` by Nikita Kitaev,
\u0141ukasz Kaiser, Anselm Levskaya.`),Zc=c(),Ea=o("p"),Nc=t("This model inherits from "),zt=o("a"),Pc=t("PreTrainedModel"),Hc=t(`. 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.)`),Vc=c(),qa=o("p"),Xc=t("This model is also a PyTorch "),ja=o("a"),Qc=t("torch.nn.Module"),Gc=t(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Bc=c(),as=o("div"),b(Ca.$$.fragment),Oc=c(),Is=o("p"),Dc=t("The "),xt=o("a"),Yc=t("ReformerModelWithLMHead"),Kc=t(" forward method, overrides the "),ro=o("code"),sh=t("__call__"),eh=t(" special method."),ah=c(),b(he.$$.fragment),th=c(),b(de.$$.fragment),wl=c(),Zs=o("h2"),ge=o("a"),lo=o("span"),b(Ja.$$.fragment),nh=c(),io=o("span"),oh=t("ReformerForMaskedLM"),kl=c(),Z=o("div"),b(Fa.$$.fragment),rh=c(),Ns=o("p"),lh=t("Reformer Model with a "),mo=o("code"),ih=t("language modeling"),mh=t(` head on top.
Reformer was proposed in `),Ua=o("a"),ph=t("Reformer: The Efficient Transformer"),ch=t(` by Nikita Kitaev,
\u0141ukasz Kaiser, Anselm Levskaya.`),hh=c(),Wa=o("p"),dh=t("This model inherits from "),$t=o("a"),gh=t("PreTrainedModel"),uh=t(`. 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.)`),fh=c(),La=o("p"),_h=t("This model is also a PyTorch "),Aa=o("a"),yh=t("torch.nn.Module"),vh=t(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),bh=c(),A=o("div"),b(Sa.$$.fragment),wh=c(),Ps=o("p"),kh=t("The "),Rt=o("a"),Mh=t("ReformerForMaskedLM"),Th=t(" forward method, overrides the "),po=o("code"),zh=t("__call__"),xh=t(" special method."),$h=c(),b(ue.$$.fragment),Rh=c(),b(fe.$$.fragment),Eh=c(),b(_e.$$.fragment),qh=c(),b(ye.$$.fragment),Ml=c(),Hs=o("h2"),ve=o("a"),co=o("span"),b(Ia.$$.fragment),jh=c(),ho=o("span"),Ch=t("ReformerForSequenceClassification"),Tl=c(),U=o("div"),b(Za.$$.fragment),Jh=c(),go=o("p"),Fh=t(`Reformer Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Uh=c(),Na=o("p"),Wh=t("Reformer was proposed in "),Pa=o("a"),Lh=t("Reformer: The Efficient Transformer"),Ah=t(` by Nikita Kitaev,
\u0141ukasz Kaiser, Anselm Levskaya.`),Sh=c(),Ha=o("p"),Ih=t("This model inherits from "),Et=o("a"),Zh=t("PreTrainedModel"),Nh=t(`. 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.)`),Ph=c(),Va=o("p"),Hh=t("This model is also a PyTorch "),Xa=o("a"),Vh=t("torch.nn.Module"),Xh=t(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Qh=c(),V=o("div"),b(Qa.$$.fragment),Gh=c(),Vs=o("p"),Bh=t("The "),qt=o("a"),Oh=t("ReformerForSequenceClassification"),Dh=t(" forward method, overrides the "),uo=o("code"),Yh=t("__call__"),Kh=t(" special method."),sd=c(),b(be.$$.fragment),ed=c(),b(we.$$.fragment),ad=c(),b(ke.$$.fragment),zl=c(),Xs=o("h2"),Me=o("a"),fo=o("span"),b(Ga.$$.fragment),td=c(),_o=o("span"),nd=t("ReformerForQuestionAnswering"),xl=c(),W=o("div"),b(Ba.$$.fragment),od=c(),Qs=o("p"),rd=t(`Reformer Model with a span classification head on top for extractive question-answering tasks like SQuAD / TriviaQA
( a linear layer on top of hidden-states output to compute `),yo=o("code"),ld=t("span start logits"),id=t(" and "),vo=o("code"),md=t("span end logits"),pd=t("."),cd=c(),Oa=o("p"),hd=t("Reformer was proposed in "),Da=o("a"),dd=t("Reformer: The Efficient Transformer"),gd=t(` by Nikita Kitaev,
\u0141ukasz Kaiser, Anselm Levskaya.`),ud=c(),Ya=o("p"),fd=t("This model inherits from "),jt=o("a"),_d=t("PreTrainedModel"),yd=t(`. 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.)`),vd=c(),Ka=o("p"),bd=t("This model is also a PyTorch "),st=o("a"),wd=t("torch.nn.Module"),kd=t(` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Md=c(),ts=o("div"),b(et.$$.fragment),Td=c(),Gs=o("p"),zd=t("The "),Ct=o("a"),xd=t("ReformerForQuestionAnswering"),$d=t(" forward method, overrides the "),bo=o("code"),Rd=t("__call__"),Ed=t(" special method."),qd=c(),b(Te.$$.fragment),jd=c(),b(ze.$$.fragment),this.h()},l(e){const m=If('[data-svelte="svelte-1phssyn"]',document.head);d=r(m,"META",{name:!0,content:!0}),m.forEach(a),y=h(e),u=r(e,"H1",{class:!0});var at=l(u);f=r(at,"A",{id:!0,class:!0,href:!0});var wo=l(f);v=r(wo,"SPAN",{});var ko=l(v);w(p.$$.fragment,ko),ko.forEach(a),wo.forEach(a),_=h(at),C=r(at,"SPAN",{});var Mo=l(C);oi=n(Mo,"Reformer"),Mo.forEach(a),at.forEach(a),Co=h(e),ws=r(e,"DIV",{class:!0});var tt=l(ws);ot=r(tt,"A",{href:!0});var To=l(ot);rt=r(To,"IMG",{alt:!0,src:!0}),To.forEach(a),ri=h(tt),lt=r(tt,"A",{href:!0});var zo=l(lt);it=r(zo,"IMG",{alt:!0,src:!0}),zo.forEach(a),tt.forEach(a),Jo=h(e),ks=r(e,"P",{});var xe=l(ks);Dt=r(xe,"STRONG",{});var xo=l(Dt);li=n(xo,"DISCLAIMER:"),xo.forEach(a),ii=n(xe," This model is still a work in progress, if you see something strange, file a "),Ie=r(xe,"A",{href:!0,rel:!0});var $o=l(Ie);mi=n($o,"Github Issue"),$o.forEach(a),pi=n(xe,"."),xe.forEach(a),Fo=h(e),Ms=r(e,"H2",{class:!0});var nt=l(Ms);Os=r(nt,"A",{id:!0,class:!0,href:!0});var Ro=l(Os);Yt=r(Ro,"SPAN",{});var Eo=l(Yt);w(Ze.$$.fragment,Eo),Eo.forEach(a),Ro.forEach(a),ci=h(nt),Kt=r(nt,"SPAN",{});var qo=l(Kt);hi=n(qo,"Overview"),qo.forEach(a),nt.forEach(a),Uo=h(e),Ds=r(e,"P",{});var Rl=l(Ds);di=n(Rl,"The Reformer model was proposed in the paper "),Ne=r(Rl,"A",{href:!0,rel:!0});var Ld=l(Ne);gi=n(Ld,"Reformer: The Efficient Transformer"),Ld.forEach(a),ui=n(Rl," by Nikita Kitaev, \u0141ukasz Kaiser, Anselm Levskaya."),Rl.forEach(a),Wo=h(e),mt=r(e,"P",{});var Ad=l(mt);fi=n(Ad,"The abstract from the paper is the following:"),Ad.forEach(a),Lo=h(e),pt=r(e,"P",{});var Sd=l(pt);sn=r(Sd,"EM",{});var Id=l(sn);_i=n(Id,`Large Transformer models routinely achieve state-of-the-art results on a number of tasks but training these models can
be prohibitively costly, especially on long sequences. We introduce two techniques to improve the efficiency of
Transformers. For one, we replace dot-product attention by one that uses locality-sensitive hashing, changing its
complexity from O(L^2) to O(Llog(L)), where L is the length of the sequence. Furthermore, we use reversible residual
layers instead of the standard residuals, which allows storing activations only once in the training process instead of
N times, where N is the number of layers. The resulting model, the Reformer, performs on par with Transformer models
while being much more memory-efficient and much faster on long sequences.`),Id.forEach(a),Sd.forEach(a),Ao=h(e),ps=r(e,"P",{});var Jt=l(ps);yi=n(Jt,"This model was contributed by "),Pe=r(Jt,"A",{href:!0,rel:!0});var Zd=l(Pe);vi=n(Zd,"patrickvonplaten"),Zd.forEach(a),bi=n(Jt,`. The Authors\u2019 code can be
found `),He=r(Jt,"A",{href:!0,rel:!0});var Nd=l(He);wi=n(Nd,"here"),Nd.forEach(a),ki=n(Jt,"."),Jt.forEach(a),So=h(e),ct=r(e,"P",{});var Pd=l(ct);Mi=n(Pd,"Tips:"),Pd.forEach(a),Io=h(e),P=r(e,"UL",{});var us=l(P);is=r(us,"LI",{});var $e=l(is);Ti=n($e,"Reformer does "),en=r($e,"STRONG",{});var Hd=l(en);zi=n(Hd,"not"),Hd.forEach(a),xi=n($e," work with "),an=r($e,"EM",{});var Vd=l(an);$i=n(Vd,"torch.nn.DataParallel"),Vd.forEach(a),Ri=n($e," due to a bug in PyTorch, see "),Ve=r($e,"A",{href:!0,rel:!0});var Xd=l(Ve);Ei=n(Xd,"issue #36035"),Xd.forEach(a),qi=n($e,"."),$e.forEach(a),ji=h(us),tn=r(us,"LI",{});var Qd=l(tn);Ci=n(Qd,"Use Axial position encoding (see below for more details). It\u2019s a mechanism to avoid having a huge positional encoding matrix (when the sequence length is very big) by factorizing it into smaller matrices."),Qd.forEach(a),Ji=h(us),nn=r(us,"LI",{});var Gd=l(nn);Fi=n(Gd,"Replace traditional attention by LSH (local-sensitive hashing) attention (see below for more details). It\u2019s a technique to avoid computing the full product query-key in the attention layers."),Gd.forEach(a),Ui=h(us),on=r(us,"LI",{});var Bd=l(on);Wi=n(Bd,"Avoid storing the intermediate results of each layer by using reversible transformer layers to obtain them during the backward pass (subtracting the residuals from the input of the next layer gives them back) or recomputing them for results inside a given layer (less efficient than storing them but saves memory)."),Bd.forEach(a),Li=h(us),rn=r(us,"LI",{});var Od=l(rn);Ai=n(Od,"Compute the feedforward operations by chunks and not on the whole batch."),Od.forEach(a),us.forEach(a),Zo=h(e),Ts=r(e,"H2",{class:!0});var El=l(Ts);Ys=r(El,"A",{id:!0,class:!0,href:!0});var Dd=l(Ys);ln=r(Dd,"SPAN",{});var Yd=l(ln);w(Xe.$$.fragment,Yd),Yd.forEach(a),Dd.forEach(a),Si=h(El),mn=r(El,"SPAN",{});var Kd=l(mn);Ii=n(Kd,"Axial Positional Encodings"),Kd.forEach(a),El.forEach(a),No=h(e),E=r(e,"P",{});var j=l(E);Zi=n(j,"Axial Positional Encodings were first implemented in Google\u2019s "),Qe=r(j,"A",{href:!0,rel:!0});var sg=l(Qe);Ni=n(sg,"trax library"),sg.forEach(a),Pi=n(j,`
and developed by the authors of this model\u2019s paper. In models that are treating very long input sequences, the
conventional position id encodings store an embedings vector of size `),Po=R(j),Ho=n(j," being the "),pn=r(j,"CODE",{});var eg=l(pn);Hi=n(eg,"config.hidden_size"),eg.forEach(a),Vi=n(j,` for
every position `),Vo=R(j),Xo=n(j,", with "),Qo=R(j),Go=n(j," being "),cn=r(j,"CODE",{});var ag=l(cn);Xi=n(ag,"config.max_embedding_size"),ag.forEach(a),Qi=n(j,`. This means that having
a sequence length of `),Bo=R(j),Oo=n(j," and a "),hn=r(j,"CODE",{});var tg=l(hn);Gi=n(tg,"config.hidden_size"),tg.forEach(a),Bi=n(j," of "),Do=R(j),Yo=n(j,`
would result in a position encoding matrix:
`),Ko=R(j),j.forEach(a),sr=h(e),zs=r(e,"P",{});var jo=l(zs);Oi=n(jo,"which alone has over 500M parameters to store. Axial positional encodings factorize "),er=R(jo),ar=n(jo,` into two matrices:
`),tr=R(jo),jo.forEach(a),nr=h(e),Ge=r(e,"P",{});var Cd=l(Ge);Di=n(Cd,`and
`),or=R(Cd),Cd.forEach(a),rr=h(e),Be=r(e,"P",{});var Jd=l(Be);Yi=n(Jd,`with:
`),lr=R(Jd),Jd.forEach(a),ir=h(e),Oe=r(e,"P",{});var Fd=l(Oe);Ki=n(Fd,`Therefore the following holds:
`),mr=R(Fd),Fd.forEach(a),pr=h(e),J=r(e,"P",{});var X=l(J);sm=n(X,"Intuitively, this means that a position embedding vector "),cr=R(X),hr=n(X,` is now the composition of two
factorized embedding vectors: `),dr=R(X),gr=n(X,", where as the "),dn=r(X,"CODE",{});var ng=l(dn);em=n(ng,"config.max_embedding_size"),ng.forEach(a),am=n(X,` dimension
`),ur=R(X),fr=n(X," is factorized into "),_r=R(X),yr=n(X,`. This design ensures that each position embedding vector
`),vr=R(X),br=n(X," is unique."),X.forEach(a),wr=h(e),cs=r(e,"P",{});var Ft=l(cs);tm=n(Ft,"Using the above example again, axial position encoding with "),kr=R(Ft),Mr=n(Ft,`
can drastically reduced the number of parameters from 500 000 000 to `),Tr=R(Ft),zr=n(Ft," parameters, this means 85% less memory usage."),Ft.forEach(a),xr=h(e),q=r(e,"P",{});var F=l(q);nm=n(F,"In practice, the parameter "),gn=r(F,"CODE",{});var og=l(gn);om=n(og,"config.axial_pos_embds_dim"),og.forEach(a),rm=n(F," is set to a tuple "),$r=R(F),Rr=n(F,` which sum has to be
equal to `),un=r(F,"CODE",{});var rg=l(un);lm=n(rg,"config.hidden_size"),rg.forEach(a),im=n(F," and "),fn=r(F,"CODE",{});var lg=l(fn);mm=n(lg,"config.axial_pos_shape"),lg.forEach(a),pm=n(F," is set to a tuple "),Er=R(F),qr=n(F,` which
product has to be equal to `),_n=r(F,"CODE",{});var ig=l(_n);cm=n(ig,"config.max_embedding_size"),ig.forEach(a),hm=n(F,", which during training has to be equal to the "),yn=r(F,"EM",{});var mg=l(yn);dm=n(mg,`sequence
length`),mg.forEach(a),gm=n(F," of the "),vn=r(F,"CODE",{});var pg=l(vn);um=n(pg,"input_ids"),pg.forEach(a),fm=n(F,"."),F.forEach(a),jr=h(e),xs=r(e,"H2",{class:!0});var ql=l(xs);Ks=r(ql,"A",{id:!0,class:!0,href:!0});var cg=l(Ks);bn=r(cg,"SPAN",{});var hg=l(bn);w(De.$$.fragment,hg),hg.forEach(a),cg.forEach(a),_m=h(ql),wn=r(ql,"SPAN",{});var dg=l(wn);ym=n(dg,"LSH Self Attention"),dg.forEach(a),ql.forEach(a),Cr=h(e),O=r(e,"P",{});var Re=l(O);vm=n(Re,`In Locality sensitive hashing (LSH) self attention the key and query projection weights are tied. Therefore, the key
query embedding vectors are also tied. LSH self attention uses the locality sensitive hashing mechanism proposed in
`),Ye=r(Re,"A",{href:!0,rel:!0});var gg=l(Ye);bm=n(gg,"Practical and Optimal LSH for Angular Distance"),gg.forEach(a),wm=n(Re,` to assign each of the tied key
query embedding vectors to one of `),kn=r(Re,"CODE",{});var ug=l(kn);km=n(ug,"config.num_buckets"),ug.forEach(a),Mm=n(Re,` possible buckets. The premise is that the more \u201Csimilar\u201D
key query embedding vectors (in terms of `),Mn=r(Re,"EM",{});var fg=l(Mn);Tm=n(fg,"cosine similarity"),fg.forEach(a),zm=n(Re,`) are to each other, the more likely they are assigned to
the same bucket.`),Re.forEach(a),Jr=h(e),L=r(e,"P",{});var ns=l(L);xm=n(ns,"The accuracy of the LSH mechanism can be improved by increasing "),Tn=r(ns,"CODE",{});var _g=l(Tn);$m=n(_g,"config.num_hashes"),_g.forEach(a),Rm=n(ns,` or directly the argument
`),zn=r(ns,"CODE",{});var yg=l(zn);Em=n(yg,"num_hashes"),yg.forEach(a),qm=n(ns,` of the forward function so that the output of the LSH self attention better approximates the output
of the \u201Cnormal\u201D full self attention. The buckets are then sorted and chunked into query key embedding vector chunks
each of length `),xn=r(ns,"CODE",{});var vg=l(xn);jm=n(vg,"config.lsh_chunk_length"),vg.forEach(a),Cm=n(ns,`. For each chunk, the query embedding vectors attend to its key vectors
(which are tied to themselves) and to the key embedding vectors of `),$n=r(ns,"CODE",{});var bg=l($n);Jm=n(bg,"config.lsh_num_chunks_before"),bg.forEach(a),Fm=n(ns,` previous
neighboring chunks and `),Rn=r(ns,"CODE",{});var wg=l(Rn);Um=n(wg,"config.lsh_num_chunks_after"),wg.forEach(a),Wm=n(ns," following neighboring chunks."),ns.forEach(a),Fr=h(e),hs=r(e,"P",{});var Ut=l(hs);Lm=n(Ut,"For more information, see the "),Ke=r(Ut,"A",{href:!0,rel:!0});var kg=l(Ke);Am=n(kg,"original Paper"),kg.forEach(a),Sm=n(Ut," or this great "),sa=r(Ut,"A",{href:!0,rel:!0});var Mg=l(sa);Im=n(Mg,"blog post"),Mg.forEach(a),Zm=n(Ut,"."),Ut.forEach(a),Ur=h(e),H=r(e,"P",{});var fs=l(H);Nm=n(fs,"Note that "),En=r(fs,"CODE",{});var Tg=l(En);Pm=n(Tg,"config.num_buckets"),Tg.forEach(a),Hm=n(fs," can also be factorized into a list "),Wr=R(fs),Lr=n(fs,". This way instead of assigning the query key embedding vectors to one of "),Ar=R(fs),Sr=n(fs," they are assigned to one of "),Ir=R(fs),Zr=n(fs,`. This is crucial for very long sequences to
save memory.`),fs.forEach(a),Nr=h(e),ds=r(e,"P",{});var Wt=l(ds);Vm=n(Wt,"When training a model from scratch, it is recommended to leave "),qn=r(Wt,"CODE",{});var zg=l(qn);Xm=n(zg,"config.num_buckets=None"),zg.forEach(a),Qm=n(Wt,`, so that depending on the
sequence length a good value for `),jn=r(Wt,"CODE",{});var xg=l(jn);Gm=n(xg,"num_buckets"),xg.forEach(a),Bm=n(Wt,` is calculated on the fly. This value will then automatically be
saved in the config and should be reused for inference.`),Wt.forEach(a),Pr=h(e),D=r(e,"P",{});var Ee=l(D);Om=n(Ee,`Using LSH self attention, the memory and time complexity of the query-key matmul operation can be reduced from
`),Hr=R(Ee),Vr=n(Ee," to "),Xr=R(Ee),Qr=n(Ee,`, which usually represents the memory
and time bottleneck in a transformer model, with `),Gr=R(Ee),Br=n(Ee," being the sequence length."),Ee.forEach(a),Or=h(e),$s=r(e,"H2",{class:!0});var jl=l($s);se=r(jl,"A",{id:!0,class:!0,href:!0});var $g=l(se);Cn=r($g,"SPAN",{});var Rg=l(Cn);w(ea.$$.fragment,Rg),Rg.forEach(a),$g.forEach(a),Dm=h(jl),Jn=r(jl,"SPAN",{});var Eg=l(Jn);Ym=n(Eg,"Local Self Attention"),Eg.forEach(a),jl.forEach(a),Dr=h(e),Y=r(e,"P",{});var qe=l(Y);Km=n(qe,`Local self attention is essentially a \u201Cnormal\u201D self attention layer with key, query and value projections, but is
chunked so that in each chunk of length `),Fn=r(qe,"CODE",{});var qg=l(Fn);sp=n(qg,"config.local_chunk_length"),qg.forEach(a),ep=n(qe,` the query embedding vectors only attends to
the key embedding vectors in its chunk and to the key embedding vectors of `),Un=r(qe,"CODE",{});var jg=l(Un);ap=n(jg,"config.local_num_chunks_before"),jg.forEach(a),tp=n(qe,`
previous neighboring chunks and `),Wn=r(qe,"CODE",{});var Cg=l(Wn);np=n(Cg,"config.local_num_chunks_after"),Cg.forEach(a),op=n(qe," following neighboring chunks."),qe.forEach(a),Yr=h(e),K=r(e,"P",{});var je=l(K);rp=n(je,`Using Local self attention, the memory and time complexity of the query-key matmul operation can be reduced from
`),Kr=R(je),sl=n(je," to "),el=R(je),al=n(je,`, which usually represents the memory
and time bottleneck in a transformer model, with `),tl=R(je),nl=n(je," being the sequence length."),je.forEach(a),ol=h(e),Rs=r(e,"H2",{class:!0});var Cl=l(Rs);ee=r(Cl,"A",{id:!0,class:!0,href:!0});var Jg=l(ee);Ln=r(Jg,"SPAN",{});var Fg=l(Ln);w(aa.$$.fragment,Fg),Fg.forEach(a),Jg.forEach(a),lp=h(Cl),An=r(Cl,"SPAN",{});var Ug=l(An);ip=n(Ug,"Training"),Ug.forEach(a),Cl.forEach(a),rl=h(e),gs=r(e,"P",{});var Lt=l(gs);mp=n(Lt,`During training, we must ensure that the sequence length is set to a value that can be divided by the least common
multiple of `),Sn=r(Lt,"CODE",{});var Wg=l(Sn);pp=n(Wg,"config.lsh_chunk_length"),Wg.forEach(a),cp=n(Lt," and "),In=r(Lt,"CODE",{});var Lg=l(In);hp=n(Lg,"config.local_chunk_length"),Lg.forEach(a),dp=n(Lt,` and that the parameters of the Axial
Positional Encodings are correctly set as described above. Reformer is very memory efficient so that the model can
easily be trained on sequences as long as 64000 tokens.`),Lt.forEach(a),ll=h(e),ae=r(e,"P",{});var Jl=l(ae);gp=n(Jl,"For training, the "),ht=r(Jl,"A",{href:!0});var Ag=l(ht);up=n(Ag,"ReformerModelWithLMHead"),Ag.forEach(a),fp=n(Jl," should be used as follows:"),Jl.forEach(a),il=h(e),w(ta.$$.fragment,e),ml=h(e),Es=r(e,"H2",{class:!0});var Fl=l(Es);te=r(Fl,"A",{id:!0,class:!0,href:!0});var Sg=l(te);Zn=r(Sg,"SPAN",{});var Ig=l(Zn);w(na.$$.fragment,Ig),Ig.forEach(a),Sg.forEach(a),_p=h(Fl),Nn=r(Fl,"SPAN",{});var Zg=l(Nn);yp=n(Zg,"Documentation resources"),Zg.forEach(a),Fl.forEach(a),pl=h(e),ss=r(e,"UL",{});var Ce=l(ss);Pn=r(Ce,"LI",{});var Ng=l(Pn);dt=r(Ng,"A",{href:!0});var Pg=l(dt);vp=n(Pg,"Text classification task guide"),Pg.forEach(a),Ng.forEach(a),bp=h(Ce),Hn=r(Ce,"LI",{});var Hg=l(Hn);gt=r(Hg,"A",{href:!0});var Vg=l(gt);wp=n(Vg,"Question answering task guide"),Vg.forEach(a),Hg.forEach(a),kp=h(Ce),Vn=r(Ce,"LI",{});var Xg=l(Vn);ut=r(Xg,"A",{href:!0});var Qg=l(ut);Mp=n(Qg,"Causal language modeling task guide"),Qg.forEach(a),Xg.forEach(a),Tp=h(Ce),Xn=r(Ce,"LI",{});var Gg=l(Xn);ft=r(Gg,"A",{href:!0});var Bg=l(ft);zp=n(Bg,"Masked language modeling task guide"),Bg.forEach(a),Gg.forEach(a),Ce.forEach(a),cl=h(e),qs=r(e,"H2",{class:!0});var Ul=l(qs);ne=r(Ul,"A",{id:!0,class:!0,href:!0});var Og=l(ne);Qn=r(Og,"SPAN",{});var Dg=l(Qn);w(oa.$$.fragment,Dg),Dg.forEach(a),Og.forEach(a),xp=h(Ul),Gn=r(Ul,"SPAN",{});var Yg=l(Gn);$p=n(Yg,"ReformerConfig"),Yg.forEach(a),Ul.forEach(a),hl=h(e),G=r(e,"DIV",{class:!0});var Je=l(G);w(ra.$$.fragment,Je),Rp=h(Je),js=r(Je,"P",{});var At=l(js);Ep=n(At,"This is the configuration class to store the configuration of a "),_t=r(At,"A",{href:!0});var Kg=l(_t);qp=n(Kg,"ReformerModel"),Kg.forEach(a),jp=n(At,`. It is used to instantiate a
Reformer 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 ReFormer
`),la=r(At,"A",{href:!0,rel:!0});var su=l(la);Cp=n(su,"google/reformer-crime-and-punishment"),su.forEach(a),Jp=n(At," architecture."),At.forEach(a),Fp=h(Je),Cs=r(Je,"P",{});var St=l(Cs);Up=n(St,"Configuration objects inherit from "),yt=r(St,"A",{href:!0});var eu=l(yt);Wp=n(eu,"PretrainedConfig"),eu.forEach(a),Lp=n(St,` and can be used to control the model outputs. Read the
documentation from `),vt=r(St,"A",{href:!0});var au=l(vt);Ap=n(au,"PretrainedConfig"),au.forEach(a),Sp=n(St," for more information."),St.forEach(a),Ip=h(Je),w(oe.$$.fragment,Je),Je.forEach(a),dl=h(e),Js=r(e,"H2",{class:!0});var Wl=l(Js);re=r(Wl,"A",{id:!0,class:!0,href:!0});var tu=l(re);Bn=r(tu,"SPAN",{});var nu=l(Bn);w(ia.$$.fragment,nu),nu.forEach(a),tu.forEach(a),Zp=h(Wl),On=r(Wl,"SPAN",{});var ou=l(On);Np=n(ou,"ReformerTokenizer"),ou.forEach(a),Wl.forEach(a),gl=h(e),B=r(e,"DIV",{class:!0});var Fe=l(B);w(ma.$$.fragment,Fe),Pp=h(Fe),pa=r(Fe,"P",{});var Ll=l(pa);Hp=n(Ll,"Construct a Reformer tokenizer. Based on "),ca=r(Ll,"A",{href:!0,rel:!0});var ru=l(ca);Vp=n(ru,"SentencePiece"),ru.forEach(a),Xp=n(Ll," ."),Ll.forEach(a),Qp=h(Fe),ha=r(Fe,"P",{});var Al=l(ha);Gp=n(Al,"This tokenizer inherits from "),bt=r(Al,"A",{href:!0});var lu=l(bt);Bp=n(lu,"PreTrainedTokenizer"),lu.forEach(a),Op=n(Al,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Al.forEach(a),Dp=h(Fe),wt=r(Fe,"DIV",{class:!0});var iu=l(wt);w(da.$$.fragment,iu),iu.forEach(a),Fe.forEach(a),ul=h(e),Fs=r(e,"H2",{class:!0});var Sl=l(Fs);le=r(Sl,"A",{id:!0,class:!0,href:!0});var mu=l(le);Dn=r(mu,"SPAN",{});var pu=l(Dn);w(ga.$$.fragment,pu),pu.forEach(a),mu.forEach(a),Yp=h(Sl),Yn=r(Sl,"SPAN",{});var cu=l(Yn);Kp=n(cu,"ReformerTokenizerFast"),cu.forEach(a),Sl.forEach(a),fl=h(e),ms=r(e,"DIV",{class:!0});var It=l(ms);w(ua.$$.fragment,It),sc=h(It),Us=r(It,"P",{});var Zt=l(Us);ec=n(Zt,"Construct a \u201Cfast\u201D Reformer tokenizer (backed by HuggingFace\u2019s "),Kn=r(Zt,"EM",{});var hu=l(Kn);ac=n(hu,"tokenizers"),hu.forEach(a),tc=n(Zt,` library). Based on
`),fa=r(Zt,"A",{href:!0,rel:!0});var du=l(fa);nc=n(du,"Unigram"),du.forEach(a),oc=n(Zt,"."),Zt.forEach(a),rc=h(It),_a=r(It,"P",{});var Il=l(_a);lc=n(Il,"This tokenizer inherits from "),kt=r(Il,"A",{href:!0});var gu=l(kt);ic=n(gu,"PreTrainedTokenizerFast"),gu.forEach(a),mc=n(Il,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Il.forEach(a),It.forEach(a),_l=h(e),Ws=r(e,"H2",{class:!0});var Zl=l(Ws);ie=r(Zl,"A",{id:!0,class:!0,href:!0});var uu=l(ie);so=r(uu,"SPAN",{});var fu=l(so);w(ya.$$.fragment,fu),fu.forEach(a),uu.forEach(a),pc=h(Zl),eo=r(Zl,"SPAN",{});var _u=l(eo);cc=n(_u,"ReformerModel"),_u.forEach(a),Zl.forEach(a),yl=h(e),S=r(e,"DIV",{class:!0});var _s=l(S);w(va.$$.fragment,_s),hc=h(_s),ba=r(_s,"P",{});var Nl=l(ba);dc=n(Nl,`The bare Reformer Model transformer outputting raw hidden-stateswithout any specific head on top.
Reformer was proposed in `),wa=r(Nl,"A",{href:!0,rel:!0});var yu=l(wa);gc=n(yu,"Reformer: The Efficient Transformer"),yu.forEach(a),uc=n(Nl,` by Nikita Kitaev,
\u0141ukasz Kaiser, Anselm Levskaya.`),Nl.forEach(a),fc=h(_s),ka=r(_s,"P",{});var Pl=l(ka);_c=n(Pl,"This model inherits from "),Mt=r(Pl,"A",{href:!0});var vu=l(Mt);yc=n(vu,"PreTrainedModel"),vu.forEach(a),vc=n(Pl,`. 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.)`),Pl.forEach(a),bc=h(_s),Ma=r(_s,"P",{});var Hl=l(Ma);wc=n(Hl,"This model is also a PyTorch "),Ta=r(Hl,"A",{href:!0,rel:!0});var bu=l(Ta);kc=n(bu,"torch.nn.Module"),bu.forEach(a),Mc=n(Hl,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Hl.forEach(a),Tc=h(_s),es=r(_s,"DIV",{class:!0});var Ue=l(es);w(za.$$.fragment,Ue),zc=h(Ue),Ls=r(Ue,"P",{});var Nt=l(Ls);xc=n(Nt,"The "),Tt=r(Nt,"A",{href:!0});var wu=l(Tt);$c=n(wu,"ReformerModel"),wu.forEach(a),Rc=n(Nt," forward method, overrides the "),ao=r(Nt,"CODE",{});var ku=l(ao);Ec=n(ku,"__call__"),ku.forEach(a),qc=n(Nt," special method."),Nt.forEach(a),jc=h(Ue),w(me.$$.fragment,Ue),Cc=h(Ue),w(pe.$$.fragment,Ue),Ue.forEach(a),_s.forEach(a),vl=h(e),As=r(e,"H2",{class:!0});var Vl=l(As);ce=r(Vl,"A",{id:!0,class:!0,href:!0});var Mu=l(ce);to=r(Mu,"SPAN",{});var Tu=l(to);w(xa.$$.fragment,Tu),Tu.forEach(a),Mu.forEach(a),Jc=h(Vl),no=r(Vl,"SPAN",{});var zu=l(no);Fc=n(zu,"ReformerModelWithLMHead"),zu.forEach(a),Vl.forEach(a),bl=h(e),I=r(e,"DIV",{class:!0});var ys=l(I);w($a.$$.fragment,ys),Uc=h(ys),Ss=r(ys,"P",{});var Pt=l(Ss);Wc=n(Pt,"Reformer Model with a "),oo=r(Pt,"CODE",{});var xu=l(oo);Lc=n(xu,"language modeling"),xu.forEach(a),Ac=n(Pt,` head on top.
Reformer was proposed in `),Ra=r(Pt,"A",{href:!0,rel:!0});var $u=l(Ra);Sc=n($u,"Reformer: The Efficient Transformer"),$u.forEach(a),Ic=n(Pt,` by Nikita Kitaev,
\u0141ukasz Kaiser, Anselm Levskaya.`),Pt.forEach(a),Zc=h(ys),Ea=r(ys,"P",{});var Xl=l(Ea);Nc=n(Xl,"This model inherits from "),zt=r(Xl,"A",{href:!0});var Ru=l(zt);Pc=n(Ru,"PreTrainedModel"),Ru.forEach(a),Hc=n(Xl,`. 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.)`),Xl.forEach(a),Vc=h(ys),qa=r(ys,"P",{});var Ql=l(qa);Xc=n(Ql,"This model is also a PyTorch "),ja=r(Ql,"A",{href:!0,rel:!0});var Eu=l(ja);Qc=n(Eu,"torch.nn.Module"),Eu.forEach(a),Gc=n(Ql,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ql.forEach(a),Bc=h(ys),as=r(ys,"DIV",{class:!0});var We=l(as);w(Ca.$$.fragment,We),Oc=h(We),Is=r(We,"P",{});var Ht=l(Is);Dc=n(Ht,"The "),xt=r(Ht,"A",{href:!0});var qu=l(xt);Yc=n(qu,"ReformerModelWithLMHead"),qu.forEach(a),Kc=n(Ht," forward method, overrides the "),ro=r(Ht,"CODE",{});var ju=l(ro);sh=n(ju,"__call__"),ju.forEach(a),eh=n(Ht," special method."),Ht.forEach(a),ah=h(We),w(he.$$.fragment,We),th=h(We),w(de.$$.fragment,We),We.forEach(a),ys.forEach(a),wl=h(e),Zs=r(e,"H2",{class:!0});var Gl=l(Zs);ge=r(Gl,"A",{id:!0,class:!0,href:!0});var Cu=l(ge);lo=r(Cu,"SPAN",{});var Ju=l(lo);w(Ja.$$.fragment,Ju),Ju.forEach(a),Cu.forEach(a),nh=h(Gl),io=r(Gl,"SPAN",{});var Fu=l(io);oh=n(Fu,"ReformerForMaskedLM"),Fu.forEach(a),Gl.forEach(a),kl=h(e),Z=r(e,"DIV",{class:!0});var vs=l(Z);w(Fa.$$.fragment,vs),rh=h(vs),Ns=r(vs,"P",{});var Vt=l(Ns);lh=n(Vt,"Reformer Model with a "),mo=r(Vt,"CODE",{});var Uu=l(mo);ih=n(Uu,"language modeling"),Uu.forEach(a),mh=n(Vt,` head on top.
Reformer was proposed in `),Ua=r(Vt,"A",{href:!0,rel:!0});var Wu=l(Ua);ph=n(Wu,"Reformer: The Efficient Transformer"),Wu.forEach(a),ch=n(Vt,` by Nikita Kitaev,
\u0141ukasz Kaiser, Anselm Levskaya.`),Vt.forEach(a),hh=h(vs),Wa=r(vs,"P",{});var Bl=l(Wa);dh=n(Bl,"This model inherits from "),$t=r(Bl,"A",{href:!0});var Lu=l($t);gh=n(Lu,"PreTrainedModel"),Lu.forEach(a),uh=n(Bl,`. 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.)`),Bl.forEach(a),fh=h(vs),La=r(vs,"P",{});var Ol=l(La);_h=n(Ol,"This model is also a PyTorch "),Aa=r(Ol,"A",{href:!0,rel:!0});var Au=l(Aa);yh=n(Au,"torch.nn.Module"),Au.forEach(a),vh=n(Ol,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Ol.forEach(a),bh=h(vs),A=r(vs,"DIV",{class:!0});var os=l(A);w(Sa.$$.fragment,os),wh=h(os),Ps=r(os,"P",{});var Xt=l(Ps);kh=n(Xt,"The "),Rt=r(Xt,"A",{href:!0});var Su=l(Rt);Mh=n(Su,"ReformerForMaskedLM"),Su.forEach(a),Th=n(Xt," forward method, overrides the "),po=r(Xt,"CODE",{});var Iu=l(po);zh=n(Iu,"__call__"),Iu.forEach(a),xh=n(Xt," special method."),Xt.forEach(a),$h=h(os),w(ue.$$.fragment,os),Rh=h(os),w(fe.$$.fragment,os),Eh=h(os),w(_e.$$.fragment,os),qh=h(os),w(ye.$$.fragment,os),os.forEach(a),vs.forEach(a),Ml=h(e),Hs=r(e,"H2",{class:!0});var Dl=l(Hs);ve=r(Dl,"A",{id:!0,class:!0,href:!0});var Zu=l(ve);co=r(Zu,"SPAN",{});var Nu=l(co);w(Ia.$$.fragment,Nu),Nu.forEach(a),Zu.forEach(a),jh=h(Dl),ho=r(Dl,"SPAN",{});var Pu=l(ho);Ch=n(Pu,"ReformerForSequenceClassification"),Pu.forEach(a),Dl.forEach(a),Tl=h(e),U=r(e,"DIV",{class:!0});var rs=l(U);w(Za.$$.fragment,rs),Jh=h(rs),go=r(rs,"P",{});var Hu=l(go);Fh=n(Hu,`Reformer Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Hu.forEach(a),Uh=h(rs),Na=r(rs,"P",{});var Yl=l(Na);Wh=n(Yl,"Reformer was proposed in "),Pa=r(Yl,"A",{href:!0,rel:!0});var Vu=l(Pa);Lh=n(Vu,"Reformer: The Efficient Transformer"),Vu.forEach(a),Ah=n(Yl,` by Nikita Kitaev,
\u0141ukasz Kaiser, Anselm Levskaya.`),Yl.forEach(a),Sh=h(rs),Ha=r(rs,"P",{});var Kl=l(Ha);Ih=n(Kl,"This model inherits from "),Et=r(Kl,"A",{href:!0});var Xu=l(Et);Zh=n(Xu,"PreTrainedModel"),Xu.forEach(a),Nh=n(Kl,`. 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.)`),Kl.forEach(a),Ph=h(rs),Va=r(rs,"P",{});var si=l(Va);Hh=n(si,"This model is also a PyTorch "),Xa=r(si,"A",{href:!0,rel:!0});var Qu=l(Xa);Vh=n(Qu,"torch.nn.Module"),Qu.forEach(a),Xh=n(si,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),si.forEach(a),Qh=h(rs),V=r(rs,"DIV",{class:!0});var bs=l(V);w(Qa.$$.fragment,bs),Gh=h(bs),Vs=r(bs,"P",{});var Qt=l(Vs);Bh=n(Qt,"The "),qt=r(Qt,"A",{href:!0});var Gu=l(qt);Oh=n(Gu,"ReformerForSequenceClassification"),Gu.forEach(a),Dh=n(Qt," forward method, overrides the "),uo=r(Qt,"CODE",{});var Bu=l(uo);Yh=n(Bu,"__call__"),Bu.forEach(a),Kh=n(Qt," special method."),Qt.forEach(a),sd=h(bs),w(be.$$.fragment,bs),ed=h(bs),w(we.$$.fragment,bs),ad=h(bs),w(ke.$$.fragment,bs),bs.forEach(a),rs.forEach(a),zl=h(e),Xs=r(e,"H2",{class:!0});var ei=l(Xs);Me=r(ei,"A",{id:!0,class:!0,href:!0});var Ou=l(Me);fo=r(Ou,"SPAN",{});var Du=l(fo);w(Ga.$$.fragment,Du),Du.forEach(a),Ou.forEach(a),td=h(ei),_o=r(ei,"SPAN",{});var Yu=l(_o);nd=n(Yu,"ReformerForQuestionAnswering"),Yu.forEach(a),ei.forEach(a),xl=h(e),W=r(e,"DIV",{class:!0});var ls=l(W);w(Ba.$$.fragment,ls),od=h(ls),Qs=r(ls,"P",{});var Gt=l(Qs);rd=n(Gt,`Reformer Model with a span classification head on top for extractive question-answering tasks like SQuAD / TriviaQA
( a linear layer on top of hidden-states output to compute `),yo=r(Gt,"CODE",{});var Ku=l(yo);ld=n(Ku,"span start logits"),Ku.forEach(a),id=n(Gt," and "),vo=r(Gt,"CODE",{});var sf=l(vo);md=n(sf,"span end logits"),sf.forEach(a),pd=n(Gt,"."),Gt.forEach(a),cd=h(ls),Oa=r(ls,"P",{});var ai=l(Oa);hd=n(ai,"Reformer was proposed in "),Da=r(ai,"A",{href:!0,rel:!0});var ef=l(Da);dd=n(ef,"Reformer: The Efficient Transformer"),ef.forEach(a),gd=n(ai,` by Nikita Kitaev,
\u0141ukasz Kaiser, Anselm Levskaya.`),ai.forEach(a),ud=h(ls),Ya=r(ls,"P",{});var ti=l(Ya);fd=n(ti,"This model inherits from "),jt=r(ti,"A",{href:!0});var af=l(jt);_d=n(af,"PreTrainedModel"),af.forEach(a),yd=n(ti,`. 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.)`),ti.forEach(a),vd=h(ls),Ka=r(ls,"P",{});var ni=l(Ka);bd=n(ni,"This model is also a PyTorch "),st=r(ni,"A",{href:!0,rel:!0});var tf=l(st);wd=n(tf,"torch.nn.Module"),tf.forEach(a),kd=n(ni,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),ni.forEach(a),Md=h(ls),ts=r(ls,"DIV",{class:!0});var Le=l(ts);w(et.$$.fragment,Le),Td=h(Le),Gs=r(Le,"P",{});var Bt=l(Gs);zd=n(Bt,"The "),Ct=r(Bt,"A",{href:!0});var nf=l(Ct);xd=n(nf,"ReformerForQuestionAnswering"),nf.forEach(a),$d=n(Bt," forward method, overrides the "),bo=r(Bt,"CODE",{});var of=l(bo);Rd=n(of,"__call__"),of.forEach(a),Ed=n(Bt," special method."),Bt.forEach(a),qd=h(Le),w(Te.$$.fragment,Le),jd=h(Le),w(ze.$$.fragment,Le),Le.forEach(a),ls.forEach(a),this.h()},h(){i(d,"name","hf:doc:metadata"),i(d,"content",JSON.stringify(t_)),i(f,"id","reformer"),i(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(f,"href","#reformer"),i(u,"class","relative group"),i(rt,"alt","Models"),rf(rt.src,Ud="https://img.shields.io/badge/All_model_pages-reformer-blueviolet")||i(rt,"src",Ud),i(ot,"href","https://huggingface.co/models?filter=reformer"),i(it,"alt","Spaces"),rf(it.src,Wd="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||i(it,"src",Wd),i(lt,"href","https://huggingface.co/spaces/docs-demos/reformer-crime-and-punishment"),i(ws,"class","flex flex-wrap space-x-1"),i(Ie,"href","https://github.com/huggingface/transformers/issues/new?assignees=&labels=&template=bug-report.md&title"),i(Ie,"rel","nofollow"),i(Os,"id","overview"),i(Os,"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"),i(Os,"href","#overview"),i(Ms,"class","relative group"),i(Ne,"href","https://arxiv.org/abs/2001.04451.pdf"),i(Ne,"rel","nofollow"),i(Pe,"href","https://huggingface.co/patrickvonplaten"),i(Pe,"rel","nofollow"),i(He,"href","https://github.com/google/trax/tree/master/trax/models/reformer"),i(He,"rel","nofollow"),i(Ve,"href","https://github.com/pytorch/pytorch/issues/36035"),i(Ve,"rel","nofollow"),i(Ys,"id","axial-positional-encodings"),i(Ys,"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"),i(Ys,"href","#axial-positional-encodings"),i(Ts,"class","relative group"),i(Qe,"href","https://github.com/google/trax/blob/4d99ad4965bab1deba227539758d59f0df0fef48/trax/layers/research/position_encodings.py#L29"),i(Qe,"rel","nofollow"),Po.a=Ho,Vo.a=Xo,Qo.a=Go,Bo.a=Oo,Do.a=Yo,Ko.a=null,er.a=ar,tr.a=null,or.a=null,lr.a=null,mr.a=null,cr.a=hr,dr.a=gr,ur.a=fr,_r.a=yr,vr.a=br,kr.a=Mr,Tr.a=zr,$r.a=Rr,Er.a=qr,i(Ks,"id","lsh-self-attention"),i(Ks,"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"),i(Ks,"href","#lsh-self-attention"),i(xs,"class","relative group"),i(Ye,"href","https://arxiv.org/abs/1509.02897"),i(Ye,"rel","nofollow"),i(Ke,"href","https://arxiv.org/abs/2001.04451"),i(Ke,"rel","nofollow"),i(sa,"href","https://www.pragmatic.ml/reformer-deep-dive/"),i(sa,"rel","nofollow"),Wr.a=Lr,Ar.a=Sr,Ir.a=Zr,Hr.a=Vr,Xr.a=Qr,Gr.a=Br,i(se,"id","local-self-attention"),i(se,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(se,"href","#local-self-attention"),i($s,"class","relative group"),Kr.a=sl,el.a=al,tl.a=nl,i(ee,"id","training"),i(ee,"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"),i(ee,"href","#training"),i(Rs,"class","relative group"),i(ht,"href","/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerModelWithLMHead"),i(te,"id","documentation-resources"),i(te,"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"),i(te,"href","#documentation-resources"),i(Es,"class","relative group"),i(dt,"href","../tasks/sequence_classification"),i(gt,"href","../tasks/question_answering"),i(ut,"href","../tasks/language_modeling"),i(ft,"href","../tasks/masked_language_modeling"),i(ne,"id","transformers.ReformerConfig"),i(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"),i(ne,"href","#transformers.ReformerConfig"),i(qs,"class","relative group"),i(_t,"href","/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerModel"),i(la,"href","https://huggingface.co/google/reformer-crime-and-punishment"),i(la,"rel","nofollow"),i(yt,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),i(vt,"href","/docs/transformers/v4.30.0/en/main_classes/configuration#transformers.PretrainedConfig"),i(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(re,"id","transformers.ReformerTokenizer"),i(re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),i(re,"href","#transformers.ReformerTokenizer"),i(Js,"class","relative group"),i(ca,"href","https://github.com/google/sentencepiece"),i(ca,"rel","nofollow"),i(bt,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),i(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(le,"id","transformers.ReformerTokenizerFast"),i(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"),i(le,"href","#transformers.ReformerTokenizerFast"),i(Fs,"class","relative group"),i(fa,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=unigram#models"),i(fa,"rel","nofollow"),i(kt,"href","/docs/transformers/v4.30.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),i(ms,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(ie,"id","transformers.ReformerModel"),i(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"),i(ie,"href","#transformers.ReformerModel"),i(Ws,"class","relative group"),i(wa,"href","https://arxiv.org/abs/2001.04451"),i(wa,"rel","nofollow"),i(Mt,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),i(Ta,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),i(Ta,"rel","nofollow"),i(Tt,"href","/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerModel"),i(es,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(ce,"id","transformers.ReformerModelWithLMHead"),i(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"),i(ce,"href","#transformers.ReformerModelWithLMHead"),i(As,"class","relative group"),i(Ra,"href","https://arxiv.org/abs/2001.04451"),i(Ra,"rel","nofollow"),i(zt,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),i(ja,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),i(ja,"rel","nofollow"),i(xt,"href","/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerModelWithLMHead"),i(as,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(ge,"id","transformers.ReformerForMaskedLM"),i(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"),i(ge,"href","#transformers.ReformerForMaskedLM"),i(Zs,"class","relative group"),i(Ua,"href","https://arxiv.org/abs/2001.04451"),i(Ua,"rel","nofollow"),i($t,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),i(Aa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),i(Aa,"rel","nofollow"),i(Rt,"href","/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerForMaskedLM"),i(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(ve,"id","transformers.ReformerForSequenceClassification"),i(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"),i(ve,"href","#transformers.ReformerForSequenceClassification"),i(Hs,"class","relative group"),i(Pa,"href","https://arxiv.org/abs/2001.04451"),i(Pa,"rel","nofollow"),i(Et,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),i(Xa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),i(Xa,"rel","nofollow"),i(qt,"href","/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerForSequenceClassification"),i(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(Me,"id","transformers.ReformerForQuestionAnswering"),i(Me,"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"),i(Me,"href","#transformers.ReformerForQuestionAnswering"),i(Xs,"class","relative group"),i(Da,"href","https://arxiv.org/abs/2001.04451"),i(Da,"rel","nofollow"),i(jt,"href","/docs/transformers/v4.30.0/en/main_classes/model#transformers.PreTrainedModel"),i(st,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),i(st,"rel","nofollow"),i(Ct,"href","/docs/transformers/v4.30.0/en/model_doc/reformer#transformers.ReformerForQuestionAnswering"),i(ts,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),i(W,"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,m){s(document.head,d),g(e,y,m),g(e,u,m),s(u,f),s(f,v),k(p,v,null),s(u,_),s(u,C),s(C,oi),g(e,Co,m),g(e,ws,m),s(ws,ot),s(ot,rt),s(ws,ri),s(ws,lt),s(lt,it),g(e,Jo,m),g(e,ks,m),s(ks,Dt),s(Dt,li),s(ks,ii),s(ks,Ie),s(Ie,mi),s(ks,pi),g(e,Fo,m),g(e,Ms,m),s(Ms,Os),s(Os,Yt),k(Ze,Yt,null),s(Ms,ci),s(Ms,Kt),s(Kt,hi),g(e,Uo,m),g(e,Ds,m),s(Ds,di),s(Ds,Ne),s(Ne,gi),s(Ds,ui),g(e,Wo,m),g(e,mt,m),s(mt,fi),g(e,Lo,m),g(e,pt,m),s(pt,sn),s(sn,_i),g(e,Ao,m),g(e,ps,m),s(ps,yi),s(ps,Pe),s(Pe,vi),s(ps,bi),s(ps,He),s(He,wi),s(ps,ki),g(e,So,m),g(e,ct,m),s(ct,Mi),g(e,Io,m),g(e,P,m),s(P,is),s(is,Ti),s(is,en),s(en,zi),s(is,xi),s(is,an),s(an,$i),s(is,Ri),s(is,Ve),s(Ve,Ei),s(is,qi),s(P,ji),s(P,tn),s(tn,Ci),s(P,Ji),s(P,nn),s(nn,Fi),s(P,Ui),s(P,on),s(on,Wi),s(P,Li),s(P,rn),s(rn,Ai),g(e,Zo,m),g(e,Ts,m),s(Ts,Ys),s(Ys,ln),k(Xe,ln,null),s(Ts,Si),s(Ts,mn),s(mn,Ii),g(e,No,m),g(e,E,m),s(E,Zi),s(E,Qe),s(Qe,Ni),s(E,Pi),Po.m(lf,E),s(E,Ho),s(E,pn),s(pn,Hi),s(E,Vi),Vo.m(mf,E),s(E,Xo),Qo.m(pf,E),s(E,Go),s(E,cn),s(cn,Xi),s(E,Qi),Bo.m(cf,E),s(E,Oo),s(E,hn),s(hn,Gi),s(E,Bi),Do.m(hf,E),s(E,Yo),Ko.m(df,E),g(e,sr,m),g(e,zs,m),s(zs,Oi),er.m(gf,zs),s(zs,ar),tr.m(uf,zs),g(e,nr,m),g(e,Ge,m),s(Ge,Di),or.m(ff,Ge),g(e,rr,m),g(e,Be,m),s(Be,Yi),lr.m(_f,Be),g(e,ir,m),g(e,Oe,m),s(Oe,Ki),mr.m(yf,Oe),g(e,pr,m),g(e,J,m),s(J,sm),cr.m(vf,J),s(J,hr),dr.m(bf,J),s(J,gr),s(J,dn),s(dn,em),s(J,am),ur.m(wf,J),s(J,fr),_r.m(kf,J),s(J,yr),vr.m(Mf,J),s(J,br),g(e,wr,m),g(e,cs,m),s(cs,tm),kr.m(Tf,cs),s(cs,Mr),Tr.m(zf,cs),s(cs,zr),g(e,xr,m),g(e,q,m),s(q,nm),s(q,gn),s(gn,om),s(q,rm),$r.m(xf,q),s(q,Rr),s(q,un),s(un,lm),s(q,im),s(q,fn),s(fn,mm),s(q,pm),Er.m($f,q),s(q,qr),s(q,_n),s(_n,cm),s(q,hm),s(q,yn),s(yn,dm),s(q,gm),s(q,vn),s(vn,um),s(q,fm),g(e,jr,m),g(e,xs,m),s(xs,Ks),s(Ks,bn),k(De,bn,null),s(xs,_m),s(xs,wn),s(wn,ym),g(e,Cr,m),g(e,O,m),s(O,vm),s(O,Ye),s(Ye,bm),s(O,wm),s(O,kn),s(kn,km),s(O,Mm),s(O,Mn),s(Mn,Tm),s(O,zm),g(e,Jr,m),g(e,L,m),s(L,xm),s(L,Tn),s(Tn,$m),s(L,Rm),s(L,zn),s(zn,Em),s(L,qm),s(L,xn),s(xn,jm),s(L,Cm),s(L,$n),s($n,Jm),s(L,Fm),s(L,Rn),s(Rn,Um),s(L,Wm),g(e,Fr,m),g(e,hs,m),s(hs,Lm),s(hs,Ke),s(Ke,Am),s(hs,Sm),s(hs,sa),s(sa,Im),s(hs,Zm),g(e,Ur,m),g(e,H,m),s(H,Nm),s(H,En),s(En,Pm),s(H,Hm),Wr.m(Rf,H),s(H,Lr),Ar.m(Ef,H),s(H,Sr),Ir.m(qf,H),s(H,Zr),g(e,Nr,m),g(e,ds,m),s(ds,Vm),s(ds,qn),s(qn,Xm),s(ds,Qm),s(ds,jn),s(jn,Gm),s(ds,Bm),g(e,Pr,m),g(e,D,m),s(D,Om),Hr.m(jf,D),s(D,Vr),Xr.m(Cf,D),s(D,Qr),Gr.m(Jf,D),s(D,Br),g(e,Or,m),g(e,$s,m),s($s,se),s(se,Cn),k(ea,Cn,null),s($s,Dm),s($s,Jn),s(Jn,Ym),g(e,Dr,m),g(e,Y,m),s(Y,Km),s(Y,Fn),s(Fn,sp),s(Y,ep),s(Y,Un),s(Un,ap),s(Y,tp),s(Y,Wn),s(Wn,np),s(Y,op),g(e,Yr,m),g(e,K,m),s(K,rp),Kr.m(Ff,K),s(K,sl),el.m(Uf,K),s(K,al),tl.m(Wf,K),s(K,nl),g(e,ol,m),g(e,Rs,m),s(Rs,ee),s(ee,Ln),k(aa,Ln,null),s(Rs,lp),s(Rs,An),s(An,ip),g(e,rl,m),g(e,gs,m),s(gs,mp),s(gs,Sn),s(Sn,pp),s(gs,cp),s(gs,In),s(In,hp),s(gs,dp),g(e,ll,m),g(e,ae,m),s(ae,gp),s(ae,ht),s(ht,up),s(ae,fp),g(e,il,m),k(ta,e,m),g(e,ml,m),g(e,Es,m),s(Es,te),s(te,Zn),k(na,Zn,null),s(Es,_p),s(Es,Nn),s(Nn,yp),g(e,pl,m),g(e,ss,m),s(ss,Pn),s(Pn,dt),s(dt,vp),s(ss,bp),s(ss,Hn),s(Hn,gt),s(gt,wp),s(ss,kp),s(ss,Vn),s(Vn,ut),s(ut,Mp),s(ss,Tp),s(ss,Xn),s(Xn,ft),s(ft,zp),g(e,cl,m),g(e,qs,m),s(qs,ne),s(ne,Qn),k(oa,Qn,null),s(qs,xp),s(qs,Gn),s(Gn,$p),g(e,hl,m),g(e,G,m),k(ra,G,null),s(G,Rp),s(G,js),s(js,Ep),s(js,_t),s(_t,qp),s(js,jp),s(js,la),s(la,Cp),s(js,Jp),s(G,Fp),s(G,Cs),s(Cs,Up),s(Cs,yt),s(yt,Wp),s(Cs,Lp),s(Cs,vt),s(vt,Ap),s(Cs,Sp),s(G,Ip),k(oe,G,null),g(e,dl,m),g(e,Js,m),s(Js,re),s(re,Bn),k(ia,Bn,null),s(Js,Zp),s(Js,On),s(On,Np),g(e,gl,m),g(e,B,m),k(ma,B,null),s(B,Pp),s(B,pa),s(pa,Hp),s(pa,ca),s(ca,Vp),s(pa,Xp),s(B,Qp),s(B,ha),s(ha,Gp),s(ha,bt),s(bt,Bp),s(ha,Op),s(B,Dp),s(B,wt),k(da,wt,null),g(e,ul,m),g(e,Fs,m),s(Fs,le),s(le,Dn),k(ga,Dn,null),s(Fs,Yp),s(Fs,Yn),s(Yn,Kp),g(e,fl,m),g(e,ms,m),k(ua,ms,null),s(ms,sc),s(ms,Us),s(Us,ec),s(Us,Kn),s(Kn,ac),s(Us,tc),s(Us,fa),s(fa,nc),s(Us,oc),s(ms,rc),s(ms,_a),s(_a,lc),s(_a,kt),s(kt,ic),s(_a,mc),g(e,_l,m),g(e,Ws,m),s(Ws,ie),s(ie,so),k(ya,so,null),s(Ws,pc),s(Ws,eo),s(eo,cc),g(e,yl,m),g(e,S,m),k(va,S,null),s(S,hc),s(S,ba),s(ba,dc),s(ba,wa),s(wa,gc),s(ba,uc),s(S,fc),s(S,ka),s(ka,_c),s(ka,Mt),s(Mt,yc),s(ka,vc),s(S,bc),s(S,Ma),s(Ma,wc),s(Ma,Ta),s(Ta,kc),s(Ma,Mc),s(S,Tc),s(S,es),k(za,es,null),s(es,zc),s(es,Ls),s(Ls,xc),s(Ls,Tt),s(Tt,$c),s(Ls,Rc),s(Ls,ao),s(ao,Ec),s(Ls,qc),s(es,jc),k(me,es,null),s(es,Cc),k(pe,es,null),g(e,vl,m),g(e,As,m),s(As,ce),s(ce,to),k(xa,to,null),s(As,Jc),s(As,no),s(no,Fc),g(e,bl,m),g(e,I,m),k($a,I,null),s(I,Uc),s(I,Ss),s(Ss,Wc),s(Ss,oo),s(oo,Lc),s(Ss,Ac),s(Ss,Ra),s(Ra,Sc),s(Ss,Ic),s(I,Zc),s(I,Ea),s(Ea,Nc),s(Ea,zt),s(zt,Pc),s(Ea,Hc),s(I,Vc),s(I,qa),s(qa,Xc),s(qa,ja),s(ja,Qc),s(qa,Gc),s(I,Bc),s(I,as),k(Ca,as,null),s(as,Oc),s(as,Is),s(Is,Dc),s(Is,xt),s(xt,Yc),s(Is,Kc),s(Is,ro),s(ro,sh),s(Is,eh),s(as,ah),k(he,as,null),s(as,th),k(de,as,null),g(e,wl,m),g(e,Zs,m),s(Zs,ge),s(ge,lo),k(Ja,lo,null),s(Zs,nh),s(Zs,io),s(io,oh),g(e,kl,m),g(e,Z,m),k(Fa,Z,null),s(Z,rh),s(Z,Ns),s(Ns,lh),s(Ns,mo),s(mo,ih),s(Ns,mh),s(Ns,Ua),s(Ua,ph),s(Ns,ch),s(Z,hh),s(Z,Wa),s(Wa,dh),s(Wa,$t),s($t,gh),s(Wa,uh),s(Z,fh),s(Z,La),s(La,_h),s(La,Aa),s(Aa,yh),s(La,vh),s(Z,bh),s(Z,A),k(Sa,A,null),s(A,wh),s(A,Ps),s(Ps,kh),s(Ps,Rt),s(Rt,Mh),s(Ps,Th),s(Ps,po),s(po,zh),s(Ps,xh),s(A,$h),k(ue,A,null),s(A,Rh),k(fe,A,null),s(A,Eh),k(_e,A,null),s(A,qh),k(ye,A,null),g(e,Ml,m),g(e,Hs,m),s(Hs,ve),s(ve,co),k(Ia,co,null),s(Hs,jh),s(Hs,ho),s(ho,Ch),g(e,Tl,m),g(e,U,m),k(Za,U,null),s(U,Jh),s(U,go),s(go,Fh),s(U,Uh),s(U,Na),s(Na,Wh),s(Na,Pa),s(Pa,Lh),s(Na,Ah),s(U,Sh),s(U,Ha),s(Ha,Ih),s(Ha,Et),s(Et,Zh),s(Ha,Nh),s(U,Ph),s(U,Va),s(Va,Hh),s(Va,Xa),s(Xa,Vh),s(Va,Xh),s(U,Qh),s(U,V),k(Qa,V,null),s(V,Gh),s(V,Vs),s(Vs,Bh),s(Vs,qt),s(qt,Oh),s(Vs,Dh),s(Vs,uo),s(uo,Yh),s(Vs,Kh),s(V,sd),k(be,V,null),s(V,ed),k(we,V,null),s(V,ad),k(ke,V,null),g(e,zl,m),g(e,Xs,m),s(Xs,Me),s(Me,fo),k(Ga,fo,null),s(Xs,td),s(Xs,_o),s(_o,nd),g(e,xl,m),g(e,W,m),k(Ba,W,null),s(W,od),s(W,Qs),s(Qs,rd),s(Qs,yo),s(yo,ld),s(Qs,id),s(Qs,vo),s(vo,md),s(Qs,pd),s(W,cd),s(W,Oa),s(Oa,hd),s(Oa,Da),s(Da,dd),s(Oa,gd),s(W,ud),s(W,Ya),s(Ya,fd),s(Ya,jt),s(jt,_d),s(Ya,yd),s(W,vd),s(W,Ka),s(Ka,bd),s(Ka,st),s(st,wd),s(Ka,kd),s(W,Md),s(W,ts),k(et,ts,null),s(ts,Td),s(ts,Gs),s(Gs,zd),s(Gs,Ct),s(Ct,xd),s(Gs,$d),s(Gs,bo),s(bo,Rd),s(Gs,Ed),s(ts,qd),k(Te,ts,null),s(ts,jd),k(ze,ts,null),$l=!0},p(e,[m]){const at={};m&2&&(at.$$scope={dirty:m,ctx:e}),oe.$set(at);const wo={};m&2&&(wo.$$scope={dirty:m,ctx:e}),me.$set(wo);const ko={};m&2&&(ko.$$scope={dirty:m,ctx:e}),pe.$set(ko);const Mo={};m&2&&(Mo.$$scope={dirty:m,ctx:e}),he.$set(Mo);const tt={};m&2&&(tt.$$scope={dirty:m,ctx:e}),de.$set(tt);const To={};m&2&&(To.$$scope={dirty:m,ctx:e}),ue.$set(To);const zo={};m&2&&(zo.$$scope={dirty:m,ctx:e}),fe.$set(zo);const xe={};m&2&&(xe.$$scope={dirty:m,ctx:e}),_e.$set(xe);const xo={};m&2&&(xo.$$scope={dirty:m,ctx:e}),ye.$set(xo);const $o={};m&2&&($o.$$scope={dirty:m,ctx:e}),be.$set($o);const nt={};m&2&&(nt.$$scope={dirty:m,ctx:e}),we.$set(nt);const Ro={};m&2&&(Ro.$$scope={dirty:m,ctx:e}),ke.$set(Ro);const Eo={};m&2&&(Eo.$$scope={dirty:m,ctx:e}),Te.$set(Eo);const qo={};m&2&&(qo.$$scope={dirty:m,ctx:e}),ze.$set(qo)},i(e){$l||(M(p.$$.fragment,e),M(Ze.$$.fragment,e),M(Xe.$$.fragment,e),M(De.$$.fragment,e),M(ea.$$.fragment,e),M(aa.$$.fragment,e),M(ta.$$.fragment,e),M(na.$$.fragment,e),M(oa.$$.fragment,e),M(ra.$$.fragment,e),M(oe.$$.fragment,e),M(ia.$$.fragment,e),M(ma.$$.fragment,e),M(da.$$.fragment,e),M(ga.$$.fragment,e),M(ua.$$.fragment,e),M(ya.$$.fragment,e),M(va.$$.fragment,e),M(za.$$.fragment,e),M(me.$$.fragment,e),M(pe.$$.fragment,e),M(xa.$$.fragment,e),M($a.$$.fragment,e),M(Ca.$$.fragment,e),M(he.$$.fragment,e),M(de.$$.fragment,e),M(Ja.$$.fragment,e),M(Fa.$$.fragment,e),M(Sa.$$.fragment,e),M(ue.$$.fragment,e),M(fe.$$.fragment,e),M(_e.$$.fragment,e),M(ye.$$.fragment,e),M(Ia.$$.fragment,e),M(Za.$$.fragment,e),M(Qa.$$.fragment,e),M(be.$$.fragment,e),M(we.$$.fragment,e),M(ke.$$.fragment,e),M(Ga.$$.fragment,e),M(Ba.$$.fragment,e),M(et.$$.fragment,e),M(Te.$$.fragment,e),M(ze.$$.fragment,e),$l=!0)},o(e){T(p.$$.fragment,e),T(Ze.$$.fragment,e),T(Xe.$$.fragment,e),T(De.$$.fragment,e),T(ea.$$.fragment,e),T(aa.$$.fragment,e),T(ta.$$.fragment,e),T(na.$$.fragment,e),T(oa.$$.fragment,e),T(ra.$$.fragment,e),T(oe.$$.fragment,e),T(ia.$$.fragment,e),T(ma.$$.fragment,e),T(da.$$.fragment,e),T(ga.$$.fragment,e),T(ua.$$.fragment,e),T(ya.$$.fragment,e),T(va.$$.fragment,e),T(za.$$.fragment,e),T(me.$$.fragment,e),T(pe.$$.fragment,e),T(xa.$$.fragment,e),T($a.$$.fragment,e),T(Ca.$$.fragment,e),T(he.$$.fragment,e),T(de.$$.fragment,e),T(Ja.$$.fragment,e),T(Fa.$$.fragment,e),T(Sa.$$.fragment,e),T(ue.$$.fragment,e),T(fe.$$.fragment,e),T(_e.$$.fragment,e),T(ye.$$.fragment,e),T(Ia.$$.fragment,e),T(Za.$$.fragment,e),T(Qa.$$.fragment,e),T(be.$$.fragment,e),T(we.$$.fragment,e),T(ke.$$.fragment,e),T(Ga.$$.fragment,e),T(Ba.$$.fragment,e),T(et.$$.fragment,e),T(Te.$$.fragment,e),T(ze.$$.fragment,e),$l=!1},d(e){a(d),e&&a(y),e&&a(u),z(p),e&&a(Co),e&&a(ws),e&&a(Jo),e&&a(ks),e&&a(Fo),e&&a(Ms),z(Ze),e&&a(Uo),e&&a(Ds),e&&a(Wo),e&&a(mt),e&&a(Lo),e&&a(pt),e&&a(Ao),e&&a(ps),e&&a(So),e&&a(ct),e&&a(Io),e&&a(P),e&&a(Zo),e&&a(Ts),z(Xe),e&&a(No),e&&a(E),e&&a(sr),e&&a(zs),e&&a(nr),e&&a(Ge),e&&a(rr),e&&a(Be),e&&a(ir),e&&a(Oe),e&&a(pr),e&&a(J),e&&a(wr),e&&a(cs),e&&a(xr),e&&a(q),e&&a(jr),e&&a(xs),z(De),e&&a(Cr),e&&a(O),e&&a(Jr),e&&a(L),e&&a(Fr),e&&a(hs),e&&a(Ur),e&&a(H),e&&a(Nr),e&&a(ds),e&&a(Pr),e&&a(D),e&&a(Or),e&&a($s),z(ea),e&&a(Dr),e&&a(Y),e&&a(Yr),e&&a(K),e&&a(ol),e&&a(Rs),z(aa),e&&a(rl),e&&a(gs),e&&a(ll),e&&a(ae),e&&a(il),z(ta,e),e&&a(ml),e&&a(Es),z(na),e&&a(pl),e&&a(ss),e&&a(cl),e&&a(qs),z(oa),e&&a(hl),e&&a(G),z(ra),z(oe),e&&a(dl),e&&a(Js),z(ia),e&&a(gl),e&&a(B),z(ma),z(da),e&&a(ul),e&&a(Fs),z(ga),e&&a(fl),e&&a(ms),z(ua),e&&a(_l),e&&a(Ws),z(ya),e&&a(yl),e&&a(S),z(va),z(za),z(me),z(pe),e&&a(vl),e&&a(As),z(xa),e&&a(bl),e&&a(I),z($a),z(Ca),z(he),z(de),e&&a(wl),e&&a(Zs),z(Ja),e&&a(kl),e&&a(Z),z(Fa),z(Sa),z(ue),z(fe),z(_e),z(ye),e&&a(Ml),e&&a(Hs),z(Ia),e&&a(Tl),e&&a(U),z(Za),z(Qa),z(be),z(we),z(ke),e&&a(zl),e&&a(Xs),z(Ga),e&&a(xl),e&&a(W),z(Ba),z(et),z(Te),z(ze)}}}const t_={local:"reformer",sections:[{local:"overview",title:"Overview"},{local:"axial-positional-encodings",title:"Axial Positional Encodings"},{local:"lsh-self-attention",title:"LSH Self Attention"},{local:"local-self-attention",title:"Local Self Attention"},{local:"training",title:"Training"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.ReformerConfig",title:"ReformerConfig"},{local:"transformers.ReformerTokenizer",title:"ReformerTokenizer"},{local:"transformers.ReformerTokenizerFast",title:"ReformerTokenizerFast"},{local:"transformers.ReformerModel",title:"ReformerModel"},{local:"transformers.ReformerModelWithLMHead",title:"ReformerModelWithLMHead"},{local:"transformers.ReformerForMaskedLM",title:"ReformerForMaskedLM"},{local:"transformers.ReformerForSequenceClassification",title:"ReformerForSequenceClassification"},{local:"transformers.ReformerForQuestionAnswering",title:"ReformerForQuestionAnswering"}],title:"Reformer"};function n_(x){return Zf(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class c_ extends Lf{constructor(d){super();Af(this,d,n_,a_,Sf,{})}}export{c_ as default,t_ as metadata};
