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 i,x as w,h as n,Z as R,b as l,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 _=i(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 _=i(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=i(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 _=i(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 _=i(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=i(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 _=i(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 _=i(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=i(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=i(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 _=i(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 _=i(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=i(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 _=i(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 _=i(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=i(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 _=i(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,ol,Co,ws,ot,rt,Ud,rl,it,lt,Wd,Jo,ks,Dt,il,ll,Ie,ml,pl,Fo,Ms,Os,Yt,Ze,cl,Kt,hl,Uo,Ds,dl,Ne,gl,ul,Wo,mt,fl,Lo,pt,sn,_l,Ao,ps,yl,Pe,vl,bl,He,wl,kl,So,ct,Ml,Io,P,ls,Tl,en,zl,xl,an,$l,Rl,Ve,El,ql,jl,tn,Cl,Jl,nn,Fl,Ul,on,Wl,Ll,rn,Al,Zo,Ts,Ys,ln,Xe,Sl,mn,Il,No,E,Zl,Qe,Nl,Pl,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,Hl,Vl,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,Xl,Ql,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,Gl,Bl,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,Ol,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,Dl,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,Yl,ir,_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>',lr,Oe,Kl,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,im,lm,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>',si,ei,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>',ai,ti,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>',ni,oi,Rs,ee,Ln,aa,ip,An,lp,ri,gs,mp,Sn,pp,cp,In,hp,dp,ii,ae,gp,ht,up,fp,li,ta,mi,Es,te,Zn,na,_p,Nn,yp,pi,ss,Pn,dt,vp,bp,Hn,gt,wp,kp,Vn,ut,Mp,Tp,Xn,ft,zp,ci,qs,ne,Qn,oa,xp,Gn,$p,hi,G,ra,Rp,js,Ep,_t,qp,jp,ia,Cp,Jp,Fp,Cs,Up,yt,Wp,Lp,vt,Ap,Sp,Ip,oe,di,Js,re,Bn,la,Zp,On,Np,gi,B,ma,Pp,pa,Hp,ca,Vp,Xp,Qp,ha,Gp,bt,Bp,Op,Dp,wt,da,ui,Fs,ie,Dn,ga,Yp,Yn,Kp,fi,ms,ua,sc,Us,ec,Kn,ac,tc,fa,nc,oc,rc,_a,ic,kt,lc,mc,_i,Ws,le,so,ya,pc,eo,cc,yi,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,vi,As,ce,to,xa,Jc,no,Fc,bi,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,wi,Zs,ge,io,Ja,nh,lo,oh,ki,Z,Fa,rh,Ns,ih,mo,lh,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,Mi,Hs,ve,co,Ia,jh,ho,Ch,Ti,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,zi,Xs,Me,fo,Ga,td,_o,nd,xi,W,Ba,od,Qs,rd,yo,id,ld,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,$i;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.33.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.33.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.33.0/src/transformers/models/reformer/configuration_reformer.py#L32"}}),oe=new Ae({props:{anchor:"transformers.ReformerConfig.example",$$slots:{default:[Nf]},$$scope:{ctx:x}}}),la=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.33.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.33.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.33.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.33.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.33.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.33.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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.33.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.33.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.33.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.33.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.33.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.33.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.33.0/src/transformers/models/reformer/modeling_reformer.py#L2188"}}),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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.33.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.33.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.33.0/src/transformers/models/reformer/modeling_reformer.py#L2215",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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.33.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.33.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.33.0/src/transformers/models/reformer/modeling_reformer.py#L2314"}}),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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.33.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.33.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.33.0/src/transformers/models/reformer/modeling_reformer.py#L2335",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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.33.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.33.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.33.0/src/transformers/models/reformer/modeling_reformer.py#L2444"}}),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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.33.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.33.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.33.0/src/transformers/models/reformer/modeling_reformer.py#L2458",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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.33.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.33.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.33.0/src/transformers/models/reformer/modeling_reformer.py#L2591"}}),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.33.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.33.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.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.33.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.33.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.33.0/src/transformers/models/reformer/modeling_reformer.py#L2603",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.33.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.33.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.33.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"),ol=t("Reformer"),Co=c(),ws=o("div"),ot=o("a"),rt=o("img"),rl=c(),it=o("a"),lt=o("img"),Jo=c(),ks=o("p"),Dt=o("strong"),il=t("DISCLAIMER:"),ll=t(" This model is still a work in progress, if you see something strange, file a "),Ie=o("a"),ml=t("Github Issue"),pl=t("."),Fo=c(),Ms=o("h2"),Os=o("a"),Yt=o("span"),b(Ze.$$.fragment),cl=c(),Kt=o("span"),hl=t("Overview"),Uo=c(),Ds=o("p"),dl=t("The Reformer model was proposed in the paper "),Ne=o("a"),gl=t("Reformer: The Efficient Transformer"),ul=t(" by Nikita Kitaev, \u0141ukasz Kaiser, Anselm Levskaya."),Wo=c(),mt=o("p"),fl=t("The abstract from the paper is the following:"),Lo=c(),pt=o("p"),sn=o("em"),_l=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"),yl=t("This model was contributed by "),Pe=o("a"),vl=t("patrickvonplaten"),bl=t(`. The Authors\u2019 code can be
found `),He=o("a"),wl=t("here"),kl=t("."),So=c(),ct=o("p"),Ml=t("Tips:"),Io=c(),P=o("ul"),ls=o("li"),Tl=t("Reformer does "),en=o("strong"),zl=t("not"),xl=t(" work with "),an=o("em"),$l=t("torch.nn.DataParallel"),Rl=t(" due to a bug in PyTorch, see "),Ve=o("a"),El=t("issue #36035"),ql=t("."),jl=c(),tn=o("li"),Cl=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."),Jl=c(),nn=o("li"),Fl=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."),Ul=c(),on=o("li"),Wl=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)."),Ll=c(),rn=o("li"),Al=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),Sl=c(),mn=o("span"),Il=t("Axial Positional Encodings"),No=c(),E=o("p"),Zl=t("Axial Positional Encodings were first implemented in Google\u2019s "),Qe=o("a"),Nl=t("trax library"),Pl=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"),Hl=t("config.hidden_size"),Vl=t(` for
every position `),Vo=new $,Xo=t(", with "),Qo=new $,Go=t(" being "),cn=o("code"),Xl=t("config.max_embedding_size"),Ql=t(`. This means that having
a sequence length of `),Bo=new $,Oo=t(" and a "),hn=o("code"),Gl=t("config.hidden_size"),Bl=t(" of "),Do=new $,Yo=t(`
would result in a position encoding matrix:
`),Ko=new $,sr=c(),zs=o("p"),Ol=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"),Dl=t(`and
`),or=new $,rr=c(),Be=o("p"),Yl=t(`with:
`),ir=new $,lr=c(),Oe=o("p"),Kl=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"),im=t("config.hidden_size"),lm=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 $,si=t(" to "),ei=new $,ai=t(`, which usually represents the memory
and time bottleneck in a transformer model, with `),ti=new $,ni=t(" being the sequence length."),oi=c(),Rs=o("h2"),ee=o("a"),Ln=o("span"),b(aa.$$.fragment),ip=c(),An=o("span"),lp=t("Training"),ri=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.`),ii=c(),ae=o("p"),gp=t("For training, the "),ht=o("a"),up=t("ReformerModelWithLMHead"),fp=t(" should be used as follows:"),li=c(),b(ta.$$.fragment),mi=c(),Es=o("h2"),te=o("a"),Zn=o("span"),b(na.$$.fragment),_p=c(),Nn=o("span"),yp=t("Documentation resources"),pi=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"),ci=c(),qs=o("h2"),ne=o("a"),Qn=o("span"),b(oa.$$.fragment),xp=c(),Gn=o("span"),$p=t("ReformerConfig"),hi=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
`),ia=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),di=c(),Js=o("h2"),re=o("a"),Bn=o("span"),b(la.$$.fragment),Zp=c(),On=o("span"),Np=t("ReformerTokenizer"),gi=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),ui=c(),Fs=o("h2"),ie=o("a"),Dn=o("span"),b(ga.$$.fragment),Yp=c(),Yn=o("span"),Kp=t("ReformerTokenizerFast"),fi=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"),ic=t("This tokenizer inherits from "),kt=o("a"),lc=t("PreTrainedTokenizerFast"),mc=t(` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),_i=c(),Ws=o("h2"),le=o("a"),so=o("span"),b(ya.$$.fragment),pc=c(),eo=o("span"),cc=t("ReformerModel"),yi=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),vi=c(),As=o("h2"),ce=o("a"),to=o("span"),b(xa.$$.fragment),Jc=c(),no=o("span"),Fc=t("ReformerModelWithLMHead"),bi=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),wi=c(),Zs=o("h2"),ge=o("a"),io=o("span"),b(Ja.$$.fragment),nh=c(),lo=o("span"),oh=t("ReformerForMaskedLM"),ki=c(),Z=o("div"),b(Fa.$$.fragment),rh=c(),Ns=o("p"),ih=t("Reformer Model with a "),mo=o("code"),lh=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),Mi=c(),Hs=o("h2"),ve=o("a"),co=o("span"),b(Ia.$$.fragment),jh=c(),ho=o("span"),Ch=t("ReformerForSequenceClassification"),Ti=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),zi=c(),Xs=o("h2"),Me=o("a"),fo=o("span"),b(Ga.$$.fragment),td=c(),_o=o("span"),nd=t("ReformerForQuestionAnswering"),xi=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"),id=t("span start logits"),ld=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=i(u);f=r(at,"A",{id:!0,class:!0,href:!0});var wo=i(f);v=r(wo,"SPAN",{});var ko=i(v);w(p.$$.fragment,ko),ko.forEach(a),wo.forEach(a),_=h(at),C=r(at,"SPAN",{});var Mo=i(C);ol=n(Mo,"Reformer"),Mo.forEach(a),at.forEach(a),Co=h(e),ws=r(e,"DIV",{class:!0});var tt=i(ws);ot=r(tt,"A",{href:!0});var To=i(ot);rt=r(To,"IMG",{alt:!0,src:!0}),To.forEach(a),rl=h(tt),it=r(tt,"A",{href:!0});var zo=i(it);lt=r(zo,"IMG",{alt:!0,src:!0}),zo.forEach(a),tt.forEach(a),Jo=h(e),ks=r(e,"P",{});var xe=i(ks);Dt=r(xe,"STRONG",{});var xo=i(Dt);il=n(xo,"DISCLAIMER:"),xo.forEach(a),ll=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=i(Ie);ml=n($o,"Github Issue"),$o.forEach(a),pl=n(xe,"."),xe.forEach(a),Fo=h(e),Ms=r(e,"H2",{class:!0});var nt=i(Ms);Os=r(nt,"A",{id:!0,class:!0,href:!0});var Ro=i(Os);Yt=r(Ro,"SPAN",{});var Eo=i(Yt);w(Ze.$$.fragment,Eo),Eo.forEach(a),Ro.forEach(a),cl=h(nt),Kt=r(nt,"SPAN",{});var qo=i(Kt);hl=n(qo,"Overview"),qo.forEach(a),nt.forEach(a),Uo=h(e),Ds=r(e,"P",{});var Ri=i(Ds);dl=n(Ri,"The Reformer model was proposed in the paper "),Ne=r(Ri,"A",{href:!0,rel:!0});var Ld=i(Ne);gl=n(Ld,"Reformer: The Efficient Transformer"),Ld.forEach(a),ul=n(Ri," by Nikita Kitaev, \u0141ukasz Kaiser, Anselm Levskaya."),Ri.forEach(a),Wo=h(e),mt=r(e,"P",{});var Ad=i(mt);fl=n(Ad,"The abstract from the paper is the following:"),Ad.forEach(a),Lo=h(e),pt=r(e,"P",{});var Sd=i(pt);sn=r(Sd,"EM",{});var Id=i(sn);_l=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=i(ps);yl=n(Jt,"This model was contributed by "),Pe=r(Jt,"A",{href:!0,rel:!0});var Zd=i(Pe);vl=n(Zd,"patrickvonplaten"),Zd.forEach(a),bl=n(Jt,`. The Authors\u2019 code can be
found `),He=r(Jt,"A",{href:!0,rel:!0});var Nd=i(He);wl=n(Nd,"here"),Nd.forEach(a),kl=n(Jt,"."),Jt.forEach(a),So=h(e),ct=r(e,"P",{});var Pd=i(ct);Ml=n(Pd,"Tips:"),Pd.forEach(a),Io=h(e),P=r(e,"UL",{});var us=i(P);ls=r(us,"LI",{});var $e=i(ls);Tl=n($e,"Reformer does "),en=r($e,"STRONG",{});var Hd=i(en);zl=n(Hd,"not"),Hd.forEach(a),xl=n($e," work with "),an=r($e,"EM",{});var Vd=i(an);$l=n(Vd,"torch.nn.DataParallel"),Vd.forEach(a),Rl=n($e," due to a bug in PyTorch, see "),Ve=r($e,"A",{href:!0,rel:!0});var Xd=i(Ve);El=n(Xd,"issue #36035"),Xd.forEach(a),ql=n($e,"."),$e.forEach(a),jl=h(us),tn=r(us,"LI",{});var Qd=i(tn);Cl=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),Jl=h(us),nn=r(us,"LI",{});var Gd=i(nn);Fl=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),Ul=h(us),on=r(us,"LI",{});var Bd=i(on);Wl=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),Ll=h(us),rn=r(us,"LI",{});var Od=i(rn);Al=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 Ei=i(Ts);Ys=r(Ei,"A",{id:!0,class:!0,href:!0});var Dd=i(Ys);ln=r(Dd,"SPAN",{});var Yd=i(ln);w(Xe.$$.fragment,Yd),Yd.forEach(a),Dd.forEach(a),Sl=h(Ei),mn=r(Ei,"SPAN",{});var Kd=i(mn);Il=n(Kd,"Axial Positional Encodings"),Kd.forEach(a),Ei.forEach(a),No=h(e),E=r(e,"P",{});var j=i(E);Zl=n(j,"Axial Positional Encodings were first implemented in Google\u2019s "),Qe=r(j,"A",{href:!0,rel:!0});var sg=i(Qe);Nl=n(sg,"trax library"),sg.forEach(a),Pl=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=i(pn);Hl=n(eg,"config.hidden_size"),eg.forEach(a),Vl=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=i(cn);Xl=n(ag,"config.max_embedding_size"),ag.forEach(a),Ql=n(j,`. This means that having
a sequence length of `),Bo=R(j),Oo=n(j," and a "),hn=r(j,"CODE",{});var tg=i(hn);Gl=n(tg,"config.hidden_size"),tg.forEach(a),Bl=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=i(zs);Ol=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=i(Ge);Dl=n(Cd,`and
`),or=R(Cd),Cd.forEach(a),rr=h(e),Be=r(e,"P",{});var Jd=i(Be);Yl=n(Jd,`with:
`),ir=R(Jd),Jd.forEach(a),lr=h(e),Oe=r(e,"P",{});var Fd=i(Oe);Kl=n(Fd,`Therefore the following holds:
`),mr=R(Fd),Fd.forEach(a),pr=h(e),J=r(e,"P",{});var X=i(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=i(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=i(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=i(q);nm=n(F,"In practice, the parameter "),gn=r(F,"CODE",{});var og=i(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=i(un);im=n(rg,"config.hidden_size"),rg.forEach(a),lm=n(F," and "),fn=r(F,"CODE",{});var ig=i(fn);mm=n(ig,"config.axial_pos_shape"),ig.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 lg=i(_n);cm=n(lg,"config.max_embedding_size"),lg.forEach(a),hm=n(F,", which during training has to be equal to the "),yn=r(F,"EM",{});var mg=i(yn);dm=n(mg,`sequence
length`),mg.forEach(a),gm=n(F," of the "),vn=r(F,"CODE",{});var pg=i(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 qi=i(xs);Ks=r(qi,"A",{id:!0,class:!0,href:!0});var cg=i(Ks);bn=r(cg,"SPAN",{});var hg=i(bn);w(De.$$.fragment,hg),hg.forEach(a),cg.forEach(a),_m=h(qi),wn=r(qi,"SPAN",{});var dg=i(wn);ym=n(dg,"LSH Self Attention"),dg.forEach(a),qi.forEach(a),Cr=h(e),O=r(e,"P",{});var Re=i(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=i(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=i(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=i(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=i(L);xm=n(ns,"The accuracy of the LSH mechanism can be improved by increasing "),Tn=r(ns,"CODE",{});var _g=i(Tn);$m=n(_g,"config.num_hashes"),_g.forEach(a),Rm=n(ns,` or directly the argument
`),zn=r(ns,"CODE",{});var yg=i(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=i(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=i($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=i(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=i(hs);Lm=n(Ut,"For more information, see the "),Ke=r(Ut,"A",{href:!0,rel:!0});var kg=i(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=i(sa);Im=n(Mg,"blog post"),Mg.forEach(a),Zm=n(Ut,"."),Ut.forEach(a),Ur=h(e),H=r(e,"P",{});var fs=i(H);Nm=n(fs,"Note that "),En=r(fs,"CODE",{});var Tg=i(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=i(ds);Vm=n(Wt,"When training a model from scratch, it is recommended to leave "),qn=r(Wt,"CODE",{});var zg=i(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=i(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=i(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 ji=i($s);se=r(ji,"A",{id:!0,class:!0,href:!0});var $g=i(se);Cn=r($g,"SPAN",{});var Rg=i(Cn);w(ea.$$.fragment,Rg),Rg.forEach(a),$g.forEach(a),Dm=h(ji),Jn=r(ji,"SPAN",{});var Eg=i(Jn);Ym=n(Eg,"Local Self Attention"),Eg.forEach(a),ji.forEach(a),Dr=h(e),Y=r(e,"P",{});var qe=i(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=i(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=i(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=i(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=i(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),si=n(je," to "),ei=R(je),ai=n(je,`, which usually represents the memory
and time bottleneck in a transformer model, with `),ti=R(je),ni=n(je," being the sequence length."),je.forEach(a),oi=h(e),Rs=r(e,"H2",{class:!0});var Ci=i(Rs);ee=r(Ci,"A",{id:!0,class:!0,href:!0});var Jg=i(ee);Ln=r(Jg,"SPAN",{});var Fg=i(Ln);w(aa.$$.fragment,Fg),Fg.forEach(a),Jg.forEach(a),ip=h(Ci),An=r(Ci,"SPAN",{});var Ug=i(An);lp=n(Ug,"Training"),Ug.forEach(a),Ci.forEach(a),ri=h(e),gs=r(e,"P",{});var Lt=i(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=i(Sn);pp=n(Wg,"config.lsh_chunk_length"),Wg.forEach(a),cp=n(Lt," and "),In=r(Lt,"CODE",{});var Lg=i(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),ii=h(e),ae=r(e,"P",{});var Ji=i(ae);gp=n(Ji,"For training, the "),ht=r(Ji,"A",{href:!0});var Ag=i(ht);up=n(Ag,"ReformerModelWithLMHead"),Ag.forEach(a),fp=n(Ji," should be used as follows:"),Ji.forEach(a),li=h(e),w(ta.$$.fragment,e),mi=h(e),Es=r(e,"H2",{class:!0});var Fi=i(Es);te=r(Fi,"A",{id:!0,class:!0,href:!0});var Sg=i(te);Zn=r(Sg,"SPAN",{});var Ig=i(Zn);w(na.$$.fragment,Ig),Ig.forEach(a),Sg.forEach(a),_p=h(Fi),Nn=r(Fi,"SPAN",{});var Zg=i(Nn);yp=n(Zg,"Documentation resources"),Zg.forEach(a),Fi.forEach(a),pi=h(e),ss=r(e,"UL",{});var Ce=i(ss);Pn=r(Ce,"LI",{});var Ng=i(Pn);dt=r(Ng,"A",{href:!0});var Pg=i(dt);vp=n(Pg,"Text classification task guide"),Pg.forEach(a),Ng.forEach(a),bp=h(Ce),Hn=r(Ce,"LI",{});var Hg=i(Hn);gt=r(Hg,"A",{href:!0});var Vg=i(gt);wp=n(Vg,"Question answering task guide"),Vg.forEach(a),Hg.forEach(a),kp=h(Ce),Vn=r(Ce,"LI",{});var Xg=i(Vn);ut=r(Xg,"A",{href:!0});var Qg=i(ut);Mp=n(Qg,"Causal language modeling task guide"),Qg.forEach(a),Xg.forEach(a),Tp=h(Ce),Xn=r(Ce,"LI",{});var Gg=i(Xn);ft=r(Gg,"A",{href:!0});var Bg=i(ft);zp=n(Bg,"Masked language modeling task guide"),Bg.forEach(a),Gg.forEach(a),Ce.forEach(a),ci=h(e),qs=r(e,"H2",{class:!0});var Ui=i(qs);ne=r(Ui,"A",{id:!0,class:!0,href:!0});var Og=i(ne);Qn=r(Og,"SPAN",{});var Dg=i(Qn);w(oa.$$.fragment,Dg),Dg.forEach(a),Og.forEach(a),xp=h(Ui),Gn=r(Ui,"SPAN",{});var Yg=i(Gn);$p=n(Yg,"ReformerConfig"),Yg.forEach(a),Ui.forEach(a),hi=h(e),G=r(e,"DIV",{class:!0});var Je=i(G);w(ra.$$.fragment,Je),Rp=h(Je),js=r(Je,"P",{});var At=i(js);Ep=n(At,"This is the configuration class to store the configuration of a "),_t=r(At,"A",{href:!0});var Kg=i(_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
`),ia=r(At,"A",{href:!0,rel:!0});var su=i(ia);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=i(Cs);Up=n(St,"Configuration objects inherit from "),yt=r(St,"A",{href:!0});var eu=i(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=i(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),di=h(e),Js=r(e,"H2",{class:!0});var Wi=i(Js);re=r(Wi,"A",{id:!0,class:!0,href:!0});var tu=i(re);Bn=r(tu,"SPAN",{});var nu=i(Bn);w(la.$$.fragment,nu),nu.forEach(a),tu.forEach(a),Zp=h(Wi),On=r(Wi,"SPAN",{});var ou=i(On);Np=n(ou,"ReformerTokenizer"),ou.forEach(a),Wi.forEach(a),gi=h(e),B=r(e,"DIV",{class:!0});var Fe=i(B);w(ma.$$.fragment,Fe),Pp=h(Fe),pa=r(Fe,"P",{});var Li=i(pa);Hp=n(Li,"Construct a Reformer tokenizer. Based on "),ca=r(Li,"A",{href:!0,rel:!0});var ru=i(ca);Vp=n(ru,"SentencePiece"),ru.forEach(a),Xp=n(Li," ."),Li.forEach(a),Qp=h(Fe),ha=r(Fe,"P",{});var Ai=i(ha);Gp=n(Ai,"This tokenizer inherits from "),bt=r(Ai,"A",{href:!0});var iu=i(bt);Bp=n(iu,"PreTrainedTokenizer"),iu.forEach(a),Op=n(Ai,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),Ai.forEach(a),Dp=h(Fe),wt=r(Fe,"DIV",{class:!0});var lu=i(wt);w(da.$$.fragment,lu),lu.forEach(a),Fe.forEach(a),ui=h(e),Fs=r(e,"H2",{class:!0});var Si=i(Fs);ie=r(Si,"A",{id:!0,class:!0,href:!0});var mu=i(ie);Dn=r(mu,"SPAN",{});var pu=i(Dn);w(ga.$$.fragment,pu),pu.forEach(a),mu.forEach(a),Yp=h(Si),Yn=r(Si,"SPAN",{});var cu=i(Yn);Kp=n(cu,"ReformerTokenizerFast"),cu.forEach(a),Si.forEach(a),fi=h(e),ms=r(e,"DIV",{class:!0});var It=i(ms);w(ua.$$.fragment,It),sc=h(It),Us=r(It,"P",{});var Zt=i(Us);ec=n(Zt,"Construct a \u201Cfast\u201D Reformer tokenizer (backed by HuggingFace\u2019s "),Kn=r(Zt,"EM",{});var hu=i(Kn);ac=n(hu,"tokenizers"),hu.forEach(a),tc=n(Zt,` library). Based on
`),fa=r(Zt,"A",{href:!0,rel:!0});var du=i(fa);nc=n(du,"Unigram"),du.forEach(a),oc=n(Zt,"."),Zt.forEach(a),rc=h(It),_a=r(It,"P",{});var Ii=i(_a);ic=n(Ii,"This tokenizer inherits from "),kt=r(Ii,"A",{href:!0});var gu=i(kt);lc=n(gu,"PreTrainedTokenizerFast"),gu.forEach(a),mc=n(Ii,` which contains most of the main methods. Users should
refer to this superclass for more information regarding those methods.`),Ii.forEach(a),It.forEach(a),_i=h(e),Ws=r(e,"H2",{class:!0});var Zi=i(Ws);le=r(Zi,"A",{id:!0,class:!0,href:!0});var uu=i(le);so=r(uu,"SPAN",{});var fu=i(so);w(ya.$$.fragment,fu),fu.forEach(a),uu.forEach(a),pc=h(Zi),eo=r(Zi,"SPAN",{});var _u=i(eo);cc=n(_u,"ReformerModel"),_u.forEach(a),Zi.forEach(a),yi=h(e),S=r(e,"DIV",{class:!0});var _s=i(S);w(va.$$.fragment,_s),hc=h(_s),ba=r(_s,"P",{});var Ni=i(ba);dc=n(Ni,`The bare Reformer Model transformer outputting raw hidden-stateswithout any specific head on top.
Reformer was proposed in `),wa=r(Ni,"A",{href:!0,rel:!0});var yu=i(wa);gc=n(yu,"Reformer: The Efficient Transformer"),yu.forEach(a),uc=n(Ni,` by Nikita Kitaev,
\u0141ukasz Kaiser, Anselm Levskaya.`),Ni.forEach(a),fc=h(_s),ka=r(_s,"P",{});var Pi=i(ka);_c=n(Pi,"This model inherits from "),Mt=r(Pi,"A",{href:!0});var vu=i(Mt);yc=n(vu,"PreTrainedModel"),vu.forEach(a),vc=n(Pi,`. 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.)`),Pi.forEach(a),bc=h(_s),Ma=r(_s,"P",{});var Hi=i(Ma);wc=n(Hi,"This model is also a PyTorch "),Ta=r(Hi,"A",{href:!0,rel:!0});var bu=i(Ta);kc=n(bu,"torch.nn.Module"),bu.forEach(a),Mc=n(Hi,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Hi.forEach(a),Tc=h(_s),es=r(_s,"DIV",{class:!0});var Ue=i(es);w(za.$$.fragment,Ue),zc=h(Ue),Ls=r(Ue,"P",{});var Nt=i(Ls);xc=n(Nt,"The "),Tt=r(Nt,"A",{href:!0});var wu=i(Tt);$c=n(wu,"ReformerModel"),wu.forEach(a),Rc=n(Nt," forward method, overrides the "),ao=r(Nt,"CODE",{});var ku=i(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),vi=h(e),As=r(e,"H2",{class:!0});var Vi=i(As);ce=r(Vi,"A",{id:!0,class:!0,href:!0});var Mu=i(ce);to=r(Mu,"SPAN",{});var Tu=i(to);w(xa.$$.fragment,Tu),Tu.forEach(a),Mu.forEach(a),Jc=h(Vi),no=r(Vi,"SPAN",{});var zu=i(no);Fc=n(zu,"ReformerModelWithLMHead"),zu.forEach(a),Vi.forEach(a),bi=h(e),I=r(e,"DIV",{class:!0});var ys=i(I);w($a.$$.fragment,ys),Uc=h(ys),Ss=r(ys,"P",{});var Pt=i(Ss);Wc=n(Pt,"Reformer Model with a "),oo=r(Pt,"CODE",{});var xu=i(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=i(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 Xi=i(Ea);Nc=n(Xi,"This model inherits from "),zt=r(Xi,"A",{href:!0});var Ru=i(zt);Pc=n(Ru,"PreTrainedModel"),Ru.forEach(a),Hc=n(Xi,`. 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.)`),Xi.forEach(a),Vc=h(ys),qa=r(ys,"P",{});var Qi=i(qa);Xc=n(Qi,"This model is also a PyTorch "),ja=r(Qi,"A",{href:!0,rel:!0});var Eu=i(ja);Qc=n(Eu,"torch.nn.Module"),Eu.forEach(a),Gc=n(Qi,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Qi.forEach(a),Bc=h(ys),as=r(ys,"DIV",{class:!0});var We=i(as);w(Ca.$$.fragment,We),Oc=h(We),Is=r(We,"P",{});var Ht=i(Is);Dc=n(Ht,"The "),xt=r(Ht,"A",{href:!0});var qu=i(xt);Yc=n(qu,"ReformerModelWithLMHead"),qu.forEach(a),Kc=n(Ht," forward method, overrides the "),ro=r(Ht,"CODE",{});var ju=i(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),wi=h(e),Zs=r(e,"H2",{class:!0});var Gi=i(Zs);ge=r(Gi,"A",{id:!0,class:!0,href:!0});var Cu=i(ge);io=r(Cu,"SPAN",{});var Ju=i(io);w(Ja.$$.fragment,Ju),Ju.forEach(a),Cu.forEach(a),nh=h(Gi),lo=r(Gi,"SPAN",{});var Fu=i(lo);oh=n(Fu,"ReformerForMaskedLM"),Fu.forEach(a),Gi.forEach(a),ki=h(e),Z=r(e,"DIV",{class:!0});var vs=i(Z);w(Fa.$$.fragment,vs),rh=h(vs),Ns=r(vs,"P",{});var Vt=i(Ns);ih=n(Vt,"Reformer Model with a "),mo=r(Vt,"CODE",{});var Uu=i(mo);lh=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=i(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 Bi=i(Wa);dh=n(Bi,"This model inherits from "),$t=r(Bi,"A",{href:!0});var Lu=i($t);gh=n(Lu,"PreTrainedModel"),Lu.forEach(a),uh=n(Bi,`. 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.)`),Bi.forEach(a),fh=h(vs),La=r(vs,"P",{});var Oi=i(La);_h=n(Oi,"This model is also a PyTorch "),Aa=r(Oi,"A",{href:!0,rel:!0});var Au=i(Aa);yh=n(Au,"torch.nn.Module"),Au.forEach(a),vh=n(Oi,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),Oi.forEach(a),bh=h(vs),A=r(vs,"DIV",{class:!0});var os=i(A);w(Sa.$$.fragment,os),wh=h(os),Ps=r(os,"P",{});var Xt=i(Ps);kh=n(Xt,"The "),Rt=r(Xt,"A",{href:!0});var Su=i(Rt);Mh=n(Su,"ReformerForMaskedLM"),Su.forEach(a),Th=n(Xt," forward method, overrides the "),po=r(Xt,"CODE",{});var Iu=i(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),Mi=h(e),Hs=r(e,"H2",{class:!0});var Di=i(Hs);ve=r(Di,"A",{id:!0,class:!0,href:!0});var Zu=i(ve);co=r(Zu,"SPAN",{});var Nu=i(co);w(Ia.$$.fragment,Nu),Nu.forEach(a),Zu.forEach(a),jh=h(Di),ho=r(Di,"SPAN",{});var Pu=i(ho);Ch=n(Pu,"ReformerForSequenceClassification"),Pu.forEach(a),Di.forEach(a),Ti=h(e),U=r(e,"DIV",{class:!0});var rs=i(U);w(Za.$$.fragment,rs),Jh=h(rs),go=r(rs,"P",{});var Hu=i(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 Yi=i(Na);Wh=n(Yi,"Reformer was proposed in "),Pa=r(Yi,"A",{href:!0,rel:!0});var Vu=i(Pa);Lh=n(Vu,"Reformer: The Efficient Transformer"),Vu.forEach(a),Ah=n(Yi,` by Nikita Kitaev,
\u0141ukasz Kaiser, Anselm Levskaya.`),Yi.forEach(a),Sh=h(rs),Ha=r(rs,"P",{});var Ki=i(Ha);Ih=n(Ki,"This model inherits from "),Et=r(Ki,"A",{href:!0});var Xu=i(Et);Zh=n(Xu,"PreTrainedModel"),Xu.forEach(a),Nh=n(Ki,`. 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.)`),Ki.forEach(a),Ph=h(rs),Va=r(rs,"P",{});var sl=i(Va);Hh=n(sl,"This model is also a PyTorch "),Xa=r(sl,"A",{href:!0,rel:!0});var Qu=i(Xa);Vh=n(Qu,"torch.nn.Module"),Qu.forEach(a),Xh=n(sl,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),sl.forEach(a),Qh=h(rs),V=r(rs,"DIV",{class:!0});var bs=i(V);w(Qa.$$.fragment,bs),Gh=h(bs),Vs=r(bs,"P",{});var Qt=i(Vs);Bh=n(Qt,"The "),qt=r(Qt,"A",{href:!0});var Gu=i(qt);Oh=n(Gu,"ReformerForSequenceClassification"),Gu.forEach(a),Dh=n(Qt," forward method, overrides the "),uo=r(Qt,"CODE",{});var Bu=i(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),zi=h(e),Xs=r(e,"H2",{class:!0});var el=i(Xs);Me=r(el,"A",{id:!0,class:!0,href:!0});var Ou=i(Me);fo=r(Ou,"SPAN",{});var Du=i(fo);w(Ga.$$.fragment,Du),Du.forEach(a),Ou.forEach(a),td=h(el),_o=r(el,"SPAN",{});var Yu=i(_o);nd=n(Yu,"ReformerForQuestionAnswering"),Yu.forEach(a),el.forEach(a),xi=h(e),W=r(e,"DIV",{class:!0});var is=i(W);w(Ba.$$.fragment,is),od=h(is),Qs=r(is,"P",{});var Gt=i(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=i(yo);id=n(Ku,"span start logits"),Ku.forEach(a),ld=n(Gt," and "),vo=r(Gt,"CODE",{});var sf=i(vo);md=n(sf,"span end logits"),sf.forEach(a),pd=n(Gt,"."),Gt.forEach(a),cd=h(is),Oa=r(is,"P",{});var al=i(Oa);hd=n(al,"Reformer was proposed in "),Da=r(al,"A",{href:!0,rel:!0});var ef=i(Da);dd=n(ef,"Reformer: The Efficient Transformer"),ef.forEach(a),gd=n(al,` by Nikita Kitaev,
\u0141ukasz Kaiser, Anselm Levskaya.`),al.forEach(a),ud=h(is),Ya=r(is,"P",{});var tl=i(Ya);fd=n(tl,"This model inherits from "),jt=r(tl,"A",{href:!0});var af=i(jt);_d=n(af,"PreTrainedModel"),af.forEach(a),yd=n(tl,`. 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.)`),tl.forEach(a),vd=h(is),Ka=r(is,"P",{});var nl=i(Ka);bd=n(nl,"This model is also a PyTorch "),st=r(nl,"A",{href:!0,rel:!0});var tf=i(st);wd=n(tf,"torch.nn.Module"),tf.forEach(a),kd=n(nl,` subclass.
Use it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage
and behavior.`),nl.forEach(a),Md=h(is),ts=r(is,"DIV",{class:!0});var Le=i(ts);w(et.$$.fragment,Le),Td=h(Le),Gs=r(Le,"P",{});var Bt=i(Gs);zd=n(Bt,"The "),Ct=r(Bt,"A",{href:!0});var nf=i(Ct);xd=n(nf,"ReformerForQuestionAnswering"),nf.forEach(a),$d=n(Bt," forward method, overrides the "),bo=r(Bt,"CODE",{});var of=i(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),is.forEach(a),this.h()},h(){l(d,"name","hf:doc:metadata"),l(d,"content",JSON.stringify(t_)),l(f,"id","reformer"),l(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"),l(f,"href","#reformer"),l(u,"class","relative group"),l(rt,"alt","Models"),rf(rt.src,Ud="https://img.shields.io/badge/All_model_pages-reformer-blueviolet")||l(rt,"src",Ud),l(ot,"href","https://huggingface.co/models?filter=reformer"),l(lt,"alt","Spaces"),rf(lt.src,Wd="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue")||l(lt,"src",Wd),l(it,"href","https://huggingface.co/spaces/docs-demos/reformer-crime-and-punishment"),l(ws,"class","flex flex-wrap space-x-1"),l(Ie,"href","https://github.com/huggingface/transformers/issues/new?assignees=&labels=&template=bug-report.md&title"),l(Ie,"rel","nofollow"),l(Os,"id","overview"),l(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"),l(Os,"href","#overview"),l(Ms,"class","relative group"),l(Ne,"href","https://arxiv.org/abs/2001.04451.pdf"),l(Ne,"rel","nofollow"),l(Pe,"href","https://huggingface.co/patrickvonplaten"),l(Pe,"rel","nofollow"),l(He,"href","https://github.com/google/trax/tree/master/trax/models/reformer"),l(He,"rel","nofollow"),l(Ve,"href","https://github.com/pytorch/pytorch/issues/36035"),l(Ve,"rel","nofollow"),l(Ys,"id","axial-positional-encodings"),l(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"),l(Ys,"href","#axial-positional-encodings"),l(Ts,"class","relative group"),l(Qe,"href","https://github.com/google/trax/blob/4d99ad4965bab1deba227539758d59f0df0fef48/trax/layers/research/position_encodings.py#L29"),l(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,ir.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,l(Ks,"id","lsh-self-attention"),l(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"),l(Ks,"href","#lsh-self-attention"),l(xs,"class","relative group"),l(Ye,"href","https://arxiv.org/abs/1509.02897"),l(Ye,"rel","nofollow"),l(Ke,"href","https://arxiv.org/abs/2001.04451"),l(Ke,"rel","nofollow"),l(sa,"href","https://www.pragmatic.ml/reformer-deep-dive/"),l(sa,"rel","nofollow"),Wr.a=Lr,Ar.a=Sr,Ir.a=Zr,Hr.a=Vr,Xr.a=Qr,Gr.a=Br,l(se,"id","local-self-attention"),l(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"),l(se,"href","#local-self-attention"),l($s,"class","relative group"),Kr.a=si,ei.a=ai,ti.a=ni,l(ee,"id","training"),l(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"),l(ee,"href","#training"),l(Rs,"class","relative group"),l(ht,"href","/docs/transformers/v4.33.0/en/model_doc/reformer#transformers.ReformerModelWithLMHead"),l(te,"id","documentation-resources"),l(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"),l(te,"href","#documentation-resources"),l(Es,"class","relative group"),l(dt,"href","../tasks/sequence_classification"),l(gt,"href","../tasks/question_answering"),l(ut,"href","../tasks/language_modeling"),l(ft,"href","../tasks/masked_language_modeling"),l(ne,"id","transformers.ReformerConfig"),l(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"),l(ne,"href","#transformers.ReformerConfig"),l(qs,"class","relative group"),l(_t,"href","/docs/transformers/v4.33.0/en/model_doc/reformer#transformers.ReformerModel"),l(ia,"href","https://huggingface.co/google/reformer-crime-and-punishment"),l(ia,"rel","nofollow"),l(yt,"href","/docs/transformers/v4.33.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(vt,"href","/docs/transformers/v4.33.0/en/main_classes/configuration#transformers.PretrainedConfig"),l(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(re,"id","transformers.ReformerTokenizer"),l(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"),l(re,"href","#transformers.ReformerTokenizer"),l(Js,"class","relative group"),l(ca,"href","https://github.com/google/sentencepiece"),l(ca,"rel","nofollow"),l(bt,"href","/docs/transformers/v4.33.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),l(wt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ie,"id","transformers.ReformerTokenizerFast"),l(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"),l(ie,"href","#transformers.ReformerTokenizerFast"),l(Fs,"class","relative group"),l(fa,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=unigram#models"),l(fa,"rel","nofollow"),l(kt,"href","/docs/transformers/v4.33.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),l(ms,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(le,"id","transformers.ReformerModel"),l(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"),l(le,"href","#transformers.ReformerModel"),l(Ws,"class","relative group"),l(wa,"href","https://arxiv.org/abs/2001.04451"),l(wa,"rel","nofollow"),l(Mt,"href","/docs/transformers/v4.33.0/en/main_classes/model#transformers.PreTrainedModel"),l(Ta,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Ta,"rel","nofollow"),l(Tt,"href","/docs/transformers/v4.33.0/en/model_doc/reformer#transformers.ReformerModel"),l(es,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ce,"id","transformers.ReformerModelWithLMHead"),l(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"),l(ce,"href","#transformers.ReformerModelWithLMHead"),l(As,"class","relative group"),l(Ra,"href","https://arxiv.org/abs/2001.04451"),l(Ra,"rel","nofollow"),l(zt,"href","/docs/transformers/v4.33.0/en/main_classes/model#transformers.PreTrainedModel"),l(ja,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(ja,"rel","nofollow"),l(xt,"href","/docs/transformers/v4.33.0/en/model_doc/reformer#transformers.ReformerModelWithLMHead"),l(as,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ge,"id","transformers.ReformerForMaskedLM"),l(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"),l(ge,"href","#transformers.ReformerForMaskedLM"),l(Zs,"class","relative group"),l(Ua,"href","https://arxiv.org/abs/2001.04451"),l(Ua,"rel","nofollow"),l($t,"href","/docs/transformers/v4.33.0/en/main_classes/model#transformers.PreTrainedModel"),l(Aa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Aa,"rel","nofollow"),l(Rt,"href","/docs/transformers/v4.33.0/en/model_doc/reformer#transformers.ReformerForMaskedLM"),l(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(ve,"id","transformers.ReformerForSequenceClassification"),l(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"),l(ve,"href","#transformers.ReformerForSequenceClassification"),l(Hs,"class","relative group"),l(Pa,"href","https://arxiv.org/abs/2001.04451"),l(Pa,"rel","nofollow"),l(Et,"href","/docs/transformers/v4.33.0/en/main_classes/model#transformers.PreTrainedModel"),l(Xa,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(Xa,"rel","nofollow"),l(qt,"href","/docs/transformers/v4.33.0/en/model_doc/reformer#transformers.ReformerForSequenceClassification"),l(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(Me,"id","transformers.ReformerForQuestionAnswering"),l(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"),l(Me,"href","#transformers.ReformerForQuestionAnswering"),l(Xs,"class","relative group"),l(Da,"href","https://arxiv.org/abs/2001.04451"),l(Da,"rel","nofollow"),l(jt,"href","/docs/transformers/v4.33.0/en/main_classes/model#transformers.PreTrainedModel"),l(st,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),l(st,"rel","nofollow"),l(Ct,"href","/docs/transformers/v4.33.0/en/model_doc/reformer#transformers.ReformerForQuestionAnswering"),l(ts,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),l(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,ol),g(e,Co,m),g(e,ws,m),s(ws,ot),s(ot,rt),s(ws,rl),s(ws,it),s(it,lt),g(e,Jo,m),g(e,ks,m),s(ks,Dt),s(Dt,il),s(ks,ll),s(ks,Ie),s(Ie,ml),s(ks,pl),g(e,Fo,m),g(e,Ms,m),s(Ms,Os),s(Os,Yt),k(Ze,Yt,null),s(Ms,cl),s(Ms,Kt),s(Kt,hl),g(e,Uo,m),g(e,Ds,m),s(Ds,dl),s(Ds,Ne),s(Ne,gl),s(Ds,ul),g(e,Wo,m),g(e,mt,m),s(mt,fl),g(e,Lo,m),g(e,pt,m),s(pt,sn),s(sn,_l),g(e,Ao,m),g(e,ps,m),s(ps,yl),s(ps,Pe),s(Pe,vl),s(ps,bl),s(ps,He),s(He,wl),s(ps,kl),g(e,So,m),g(e,ct,m),s(ct,Ml),g(e,Io,m),g(e,P,m),s(P,ls),s(ls,Tl),s(ls,en),s(en,zl),s(ls,xl),s(ls,an),s(an,$l),s(ls,Rl),s(ls,Ve),s(Ve,El),s(ls,ql),s(P,jl),s(P,tn),s(tn,Cl),s(P,Jl),s(P,nn),s(nn,Fl),s(P,Ul),s(P,on),s(on,Wl),s(P,Ll),s(P,rn),s(rn,Al),g(e,Zo,m),g(e,Ts,m),s(Ts,Ys),s(Ys,ln),k(Xe,ln,null),s(Ts,Sl),s(Ts,mn),s(mn,Il),g(e,No,m),g(e,E,m),s(E,Zl),s(E,Qe),s(Qe,Nl),s(E,Pl),Po.m(lf,E),s(E,Ho),s(E,pn),s(pn,Hl),s(E,Vl),Vo.m(mf,E),s(E,Xo),Qo.m(pf,E),s(E,Go),s(E,cn),s(cn,Xl),s(E,Ql),Bo.m(cf,E),s(E,Oo),s(E,hn),s(hn,Gl),s(E,Bl),Do.m(hf,E),s(E,Yo),Ko.m(df,E),g(e,sr,m),g(e,zs,m),s(zs,Ol),er.m(gf,zs),s(zs,ar),tr.m(uf,zs),g(e,nr,m),g(e,Ge,m),s(Ge,Dl),or.m(ff,Ge),g(e,rr,m),g(e,Be,m),s(Be,Yl),ir.m(_f,Be),g(e,lr,m),g(e,Oe,m),s(Oe,Kl),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,im),s(q,lm),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,si),ei.m(Uf,K),s(K,ai),ti.m(Wf,K),s(K,ni),g(e,oi,m),g(e,Rs,m),s(Rs,ee),s(ee,Ln),k(aa,Ln,null),s(Rs,ip),s(Rs,An),s(An,lp),g(e,ri,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,ii,m),g(e,ae,m),s(ae,gp),s(ae,ht),s(ht,up),s(ae,fp),g(e,li,m),k(ta,e,m),g(e,mi,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,pi,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,ci,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,hi,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,ia),s(ia,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,di,m),g(e,Js,m),s(Js,re),s(re,Bn),k(la,Bn,null),s(Js,Zp),s(Js,On),s(On,Np),g(e,gi,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,ui,m),g(e,Fs,m),s(Fs,ie),s(ie,Dn),k(ga,Dn,null),s(Fs,Yp),s(Fs,Yn),s(Yn,Kp),g(e,fi,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,ic),s(_a,kt),s(kt,lc),s(_a,mc),g(e,_i,m),g(e,Ws,m),s(Ws,le),s(le,so),k(ya,so,null),s(Ws,pc),s(Ws,eo),s(eo,cc),g(e,yi,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,vi,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,bi,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,wi,m),g(e,Zs,m),s(Zs,ge),s(ge,io),k(Ja,io,null),s(Zs,nh),s(Zs,lo),s(lo,oh),g(e,ki,m),g(e,Z,m),k(Fa,Z,null),s(Z,rh),s(Z,Ns),s(Ns,ih),s(Ns,mo),s(mo,lh),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,Mi,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,Ti,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,zi,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,xi,m),g(e,W,m),k(Ba,W,null),s(W,od),s(W,Qs),s(Qs,rd),s(Qs,yo),s(yo,id),s(Qs,ld),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),$i=!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){$i||(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(la.$$.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),$i=!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(la.$$.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),$i=!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(lr),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(oi),e&&a(Rs),z(aa),e&&a(ri),e&&a(gs),e&&a(ii),e&&a(ae),e&&a(li),z(ta,e),e&&a(mi),e&&a(Es),z(na),e&&a(pi),e&&a(ss),e&&a(ci),e&&a(qs),z(oa),e&&a(hi),e&&a(G),z(ra),z(oe),e&&a(di),e&&a(Js),z(la),e&&a(gi),e&&a(B),z(ma),z(da),e&&a(ui),e&&a(Fs),z(ga),e&&a(fi),e&&a(ms),z(ua),e&&a(_i),e&&a(Ws),z(ya),e&&a(yi),e&&a(S),z(va),z(za),z(me),z(pe),e&&a(vi),e&&a(As),z(xa),e&&a(bi),e&&a(I),z($a),z(Ca),z(he),z(de),e&&a(wi),e&&a(Zs),z(Ja),e&&a(ki),e&&a(Z),z(Fa),z(Sa),z(ue),z(fe),z(_e),z(ye),e&&a(Mi),e&&a(Hs),z(Ia),e&&a(Ti),e&&a(U),z(Za),z(Qa),z(be),z(we),z(ke),e&&a(zi),e&&a(Xs),z(Ga),e&&a(xi),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};
