import{S as Lm,i as Dm,s as Hm,e as s,k as h,w,t as i,M as Ym,c as r,d as o,m as f,a,x as T,h as l,b as m,G as e,g as b,y as k,q as M,o as v,B as F,v as Om,L as K}from"../../chunks/vendor-hf-doc-builder.js";import{T as St}from"../../chunks/Tip-hf-doc-builder.js";import{D as J}from"../../chunks/Docstring-hf-doc-builder.js";import{C as ee}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as E}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as O}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function Km($){let c,y,u,p,_;return p=new ee({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEZOZXRDb25maWclMkMlMjBGTmV0TW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwRk5ldCUyMGZuZXQtYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBGTmV0Q29uZmlnKCklMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwbW9kZWwlMjAod2l0aCUyMHJhbmRvbSUyMHdlaWdodHMpJTIwZnJvbSUyMHRoZSUyMGZuZXQtYmFzZSUyMHN0eWxlJTIwY29uZmlndXJhdGlvbiUwQW1vZGVsJTIwJTNEJTIwRk5ldE1vZGVsKGNvbmZpZ3VyYXRpb24pJTBBJTBBJTIzJTIwQWNjZXNzaW5nJTIwdGhlJTIwbW9kZWwlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMG1vZGVsLmNvbmZpZw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> FNetConfig, FNetModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a FNet fnet-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = FNetConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the fnet-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FNetModel(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(){c=s("p"),y=i("Example:"),u=h(),w(p.$$.fragment)},l(n){c=r(n,"P",{});var d=a(c);y=l(d,"Example:"),d.forEach(o),u=f(n),T(p.$$.fragment,n)},m(n,d){b(n,c,d),e(c,y),b(n,u,d),k(p,n,d),_=!0},p:K,i(n){_||(M(p.$$.fragment,n),_=!0)},o(n){v(p.$$.fragment,n),_=!1},d(n){n&&o(c),n&&o(u),F(p,n)}}}function eh($){let c,y,u,p,_;return p=new ee({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAlN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",highlighted:'<span class="hljs-attribute">0</span> <span class="hljs-number">0</span> <span class="hljs-number">0</span> <span class="hljs-number">0</span> <span class="hljs-number">0</span> <span class="hljs-number">0</span> <span class="hljs-number">0</span> <span class="hljs-number">0</span> <span class="hljs-number">0</span> <span class="hljs-number">0</span> <span class="hljs-number">0</span> <span class="hljs-number">1</span> <span class="hljs-number">1</span> <span class="hljs-number">1</span> <span class="hljs-number">1</span> <span class="hljs-number">1</span> <span class="hljs-number">1</span> <span class="hljs-number">1</span> <span class="hljs-number">1</span> <span class="hljs-number">1</span> | first sequence | second sequence |'}}),{c(){c=s("p"),y=i("pair mask has the following format: :"),u=h(),w(p.$$.fragment)},l(n){c=r(n,"P",{});var d=a(c);y=l(d,"pair mask has the following format: :"),d.forEach(o),u=f(n),T(p.$$.fragment,n)},m(n,d){b(n,c,d),e(c,y),b(n,u,d),k(p,n,d),_=!0},p:K,i(n){_||(M(p.$$.fragment,n),_=!0)},o(n){v(p.$$.fragment,n),_=!1},d(n){n&&o(c),n&&o(u),F(p,n)}}}function th($){let c,y,u,p,_;return p=new ee({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){c=s("p"),y=i("sequence pair mask has the following format:"),u=h(),w(p.$$.fragment)},l(n){c=r(n,"P",{});var d=a(c);y=l(d,"sequence pair mask has the following format:"),d.forEach(o),u=f(n),T(p.$$.fragment,n)},m(n,d){b(n,c,d),e(c,y),b(n,u,d),k(p,n,d),_=!0},p:K,i(n){_||(M(p.$$.fragment,n),_=!0)},o(n){v(p.$$.fragment,n),_=!1},d(n){n&&o(c),n&&o(u),F(p,n)}}}function oh($){let c,y,u,p,_;return{c(){c=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
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(n){c=r(n,"P",{});var d=a(c);y=l(d,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(d,"CODE",{});var N=a(u);p=l(N,"Module"),N.forEach(o),_=l(d,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),d.forEach(o)},m(n,d){b(n,c,d),e(c,y),e(c,u),e(u,p),e(c,_)},d(n){n&&o(c)}}}function nh($){let c,y,u,p,_;return p=new ee({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGTmV0TW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmZuZXQtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEZOZXRNb2RlbC5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZm5ldC1iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBJTBBbGFzdF9oaWRkZW5fc3RhdGVzJTIwJTNEJTIwb3V0cHV0cy5sYXN0X2hpZGRlbl9zdGF0ZQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FNetModel
<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/fnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FNetModel.from_pretrained(<span class="hljs-string">&quot;google/fnet-base&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(){c=s("p"),y=i("Example:"),u=h(),w(p.$$.fragment)},l(n){c=r(n,"P",{});var d=a(c);y=l(d,"Example:"),d.forEach(o),u=f(n),T(p.$$.fragment,n)},m(n,d){b(n,c,d),e(c,y),b(n,u,d),k(p,n,d),_=!0},p:K,i(n){_||(M(p.$$.fragment,n),_=!0)},o(n){v(p.$$.fragment,n),_=!1},d(n){n&&o(c),n&&o(u),F(p,n)}}}function sh($){let c,y,u,p,_;return{c(){c=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
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(n){c=r(n,"P",{});var d=a(c);y=l(d,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(d,"CODE",{});var N=a(u);p=l(N,"Module"),N.forEach(o),_=l(d,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),d.forEach(o)},m(n,d){b(n,c,d),e(c,y),e(c,u),e(u,p),e(c,_)},d(n){n&&o(c)}}}function rh($){let c,y,u,p,_;return p=new ee({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGTmV0Rm9yUHJlVHJhaW5pbmclMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmZuZXQtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEZOZXRGb3JQcmVUcmFpbmluZy5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZm5ldC1iYXNlJTIyKSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBcHJlZGljdGlvbl9sb2dpdHMlMjAlM0QlMjBvdXRwdXRzLnByZWRpY3Rpb25fbG9naXRzJTBBc2VxX3JlbGF0aW9uc2hpcF9sb2dpdHMlMjAlM0QlMjBvdXRwdXRzLnNlcV9yZWxhdGlvbnNoaXBfbG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FNetForPreTraining
<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/fnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FNetForPreTraining.from_pretrained(<span class="hljs-string">&quot;google/fnet-base&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>prediction_logits = outputs.prediction_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>seq_relationship_logits = outputs.seq_relationship_logits`}}),{c(){c=s("p"),y=i("Example:"),u=h(),w(p.$$.fragment)},l(n){c=r(n,"P",{});var d=a(c);y=l(d,"Example:"),d.forEach(o),u=f(n),T(p.$$.fragment,n)},m(n,d){b(n,c,d),e(c,y),b(n,u,d),k(p,n,d),_=!0},p:K,i(n){_||(M(p.$$.fragment,n),_=!0)},o(n){v(p.$$.fragment,n),_=!1},d(n){n&&o(c),n&&o(u),F(p,n)}}}function ah($){let c,y,u,p,_;return{c(){c=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
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(n){c=r(n,"P",{});var d=a(c);y=l(d,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(d,"CODE",{});var N=a(u);p=l(N,"Module"),N.forEach(o),_=l(d,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),d.forEach(o)},m(n,d){b(n,c,d),e(c,y),e(c,u),e(u,p),e(c,_)},d(n){n&&o(c)}}}function ih($){let c,y,u,p,_;return p=new ee({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGTmV0Rm9yTWFza2VkTE0lMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmZuZXQtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEZOZXRGb3JNYXNrZWRMTS5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZm5ldC1iYXNlJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJUaGUlMjBjYXBpdGFsJTIwb2YlMjBGcmFuY2UlMjBpcyUyMCU1Qk1BU0slNUQuJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQSUyMyUyMHJldHJpZXZlJTIwaW5kZXglMjBvZiUyMCU1Qk1BU0slNUQlMEFtYXNrX3Rva2VuX2luZGV4JTIwJTNEJTIwKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCklNUIwJTVELm5vbnplcm8oYXNfdHVwbGUlM0RUcnVlKSU1QjAlNUQlMEElMEFwcmVkaWN0ZWRfdG9rZW5faWQlMjAlM0QlMjBsb2dpdHMlNUIwJTJDJTIwbWFza190b2tlbl9pbmRleCU1RC5hcmdtYXgoYXhpcyUzRC0xKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRva2VuaXplciglMjJUaGUlMjBjYXBpdGFsJTIwb2YlMjBGcmFuY2UlMjBpcyUyMFBhcmlzLiUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTVCJTIyaW5wdXRfaWRzJTIyJTVEJTBBJTIzJTIwbWFzayUyMGxhYmVscyUyMG9mJTIwbm9uLSU1Qk1BU0slNUQlMjB0b2tlbnMlMEFsYWJlbHMlMjAlM0QlMjB0b3JjaC53aGVyZShpbnB1dHMuaW5wdXRfaWRzJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQlMkMlMjBsYWJlbHMlMkMlMjAtMTAwKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscyk=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FNetForMaskedLM
<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/fnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FNetForMaskedLM.from_pretrained(<span class="hljs-string">&quot;google/fnet-base&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-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>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(inputs.input_ids == tokenizer.mask_token_id, labels, -<span class="hljs-number">100</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs, labels=labels)`}}),{c(){c=s("p"),y=i("Example:"),u=h(),w(p.$$.fragment)},l(n){c=r(n,"P",{});var d=a(c);y=l(d,"Example:"),d.forEach(o),u=f(n),T(p.$$.fragment,n)},m(n,d){b(n,c,d),e(c,y),b(n,u,d),k(p,n,d),_=!0},p:K,i(n){_||(M(p.$$.fragment,n),_=!0)},o(n){v(p.$$.fragment,n),_=!1},d(n){n&&o(c),n&&o(u),F(p,n)}}}function lh($){let c,y,u,p,_;return{c(){c=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
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(n){c=r(n,"P",{});var d=a(c);y=l(d,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(d,"CODE",{});var N=a(u);p=l(N,"Module"),N.forEach(o),_=l(d,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),d.forEach(o)},m(n,d){b(n,c,d),e(c,y),e(c,u),e(u,p),e(c,_)},d(n){n&&o(c)}}}function ch($){let c,y,u,p,_;return p=new ee({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGTmV0Rm9yTmV4dFNlbnRlbmNlUHJlZGljdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZm5ldC1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwRk5ldEZvck5leHRTZW50ZW5jZVByZWRpY3Rpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmZuZXQtYmFzZSUyMiklMEFwcm9tcHQlMjAlM0QlMjAlMjJJbiUyMEl0YWx5JTJDJTIwcGl6emElMjBzZXJ2ZWQlMjBpbiUyMGZvcm1hbCUyMHNldHRpbmdzJTJDJTIwc3VjaCUyMGFzJTIwYXQlMjBhJTIwcmVzdGF1cmFudCUyQyUyMGlzJTIwcHJlc2VudGVkJTIwdW5zbGljZWQuJTIyJTBBbmV4dF9zZW50ZW5jZSUyMCUzRCUyMCUyMlRoZSUyMHNreSUyMGlzJTIwYmx1ZSUyMGR1ZSUyMHRvJTIwdGhlJTIwc2hvcnRlciUyMHdhdmVsZW5ndGglMjBvZiUyMGJsdWUlMjBsaWdodC4lMjIlMEFlbmNvZGluZyUyMCUzRCUyMHRva2VuaXplcihwcm9tcHQlMkMlMjBuZXh0X3NlbnRlbmNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKiplbmNvZGluZyUyQyUyMGxhYmVscyUzRHRvcmNoLkxvbmdUZW5zb3IoJTVCMSU1RCkpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHMlMEFhc3NlcnQlMjBsb2dpdHMlNUIwJTJDJTIwMCU1RCUyMCUzQyUyMGxvZ2l0cyU1QjAlMkMlMjAxJTVEJTIwJTIwJTIzJTIwbmV4dCUyMHNlbnRlbmNlJTIwd2FzJTIwcmFuZG9t",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FNetForNextSentencePrediction
<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/fnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FNetForNextSentencePrediction.from_pretrained(<span class="hljs-string">&quot;google/fnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>next_sentence = <span class="hljs-string">&quot;The sky is blue due to the shorter wavelength of blue light.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer(prompt, next_sentence, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**encoding, labels=torch.LongTensor([<span class="hljs-number">1</span>]))
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">assert</span> logits[<span class="hljs-number">0</span>, <span class="hljs-number">0</span>] &lt; logits[<span class="hljs-number">0</span>, <span class="hljs-number">1</span>]  <span class="hljs-comment"># next sentence was random</span>`}}),{c(){c=s("p"),y=i("Example:"),u=h(),w(p.$$.fragment)},l(n){c=r(n,"P",{});var d=a(c);y=l(d,"Example:"),d.forEach(o),u=f(n),T(p.$$.fragment,n)},m(n,d){b(n,c,d),e(c,y),b(n,u,d),k(p,n,d),_=!0},p:K,i(n){_||(M(p.$$.fragment,n),_=!0)},o(n){v(p.$$.fragment,n),_=!1},d(n){n&&o(c),n&&o(u),F(p,n)}}}function dh($){let c,y,u,p,_;return{c(){c=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
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(n){c=r(n,"P",{});var d=a(c);y=l(d,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(d,"CODE",{});var N=a(u);p=l(N,"Module"),N.forEach(o),_=l(d,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),d.forEach(o)},m(n,d){b(n,c,d),e(c,y),e(c,u),e(u,p),e(c,_)},d(n){n&&o(c)}}}function ph($){let c,y,u,p,_;return p=new ee({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEZOZXRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZm5ldC1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwRk5ldEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmZuZXQtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfY2xhc3NfaWQlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KCkuaXRlbSgpJTBBJTBBJTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwRk5ldEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmZuZXQtYmFzZSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzKSUwQSUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxJTVEKSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, FNetForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/fnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FNetForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;google/fnet-base&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_id = logits.argmax().item()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FNetForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;google/fnet-base&quot;</span>, num_labels=num_labels)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor([<span class="hljs-number">1</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){c=s("p"),y=i("Example of single-label classification:"),u=h(),w(p.$$.fragment)},l(n){c=r(n,"P",{});var d=a(c);y=l(d,"Example of single-label classification:"),d.forEach(o),u=f(n),T(p.$$.fragment,n)},m(n,d){b(n,c,d),e(c,y),b(n,u,d),k(p,n,d),_=!0},p:K,i(n){_||(M(p.$$.fragment,n),_=!0)},o(n){v(p.$$.fragment,n),_=!1},d(n){n&&o(c),n&&o(u),F(p,n)}}}function mh($){let c,y,u,p,_;return p=new ee({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEZOZXRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZm5ldC1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwRk5ldEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmZuZXQtYmFzZSUyMiUyQyUyMHByb2JsZW1fdHlwZSUzRCUyMm11bHRpX2xhYmVsX2NsYXNzaWZpY2F0aW9uJTIyKSUwQSUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplciglMjJIZWxsbyUyQyUyMG15JTIwZG9nJTIwaXMlMjBjdXRlJTIyJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF9jbGFzc19pZHMlMjAlM0QlMjB0b3JjaC5hcmFuZ2UoMCUyQyUyMGxvZ2l0cy5zaGFwZSU1Qi0xJTVEKSU1QnRvcmNoLnNpZ21vaWQobG9naXRzKS5zcXVlZXplKGRpbSUzRDApJTIwJTNFJTIwMC41JTVEJTBBJTBBJTIzJTIwVG8lMjB0cmFpbiUyMGElMjBtb2RlbCUyMG9uJTIwJTYwbnVtX2xhYmVscyU2MCUyMGNsYXNzZXMlMkMlMjB5b3UlMjBjYW4lMjBwYXNzJTIwJTYwbnVtX2xhYmVscyUzRG51bV9sYWJlbHMlNjAlMjB0byUyMCU2MC5mcm9tX3ByZXRyYWluZWQoLi4uKSU2MCUwQW51bV9sYWJlbHMlMjAlM0QlMjBsZW4obW9kZWwuY29uZmlnLmlkMmxhYmVsKSUwQW1vZGVsJTIwJTNEJTIwRk5ldEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUwQSUyMCUyMCUyMCUyMCUyMmdvb2dsZSUyRmZuZXQtYmFzZSUyMiUyQyUyMG51bV9sYWJlbHMlM0RudW1fbGFiZWxzJTJDJTIwcHJvYmxlbV90eXBlJTNEJTIybXVsdGlfbGFiZWxfY2xhc3NpZmljYXRpb24lMjIlMEEpJTBBJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2guc3VtKCUwQSUyMCUyMCUyMCUyMHRvcmNoLm5uLmZ1bmN0aW9uYWwub25lX2hvdChwcmVkaWN0ZWRfY2xhc3NfaWRzJTVCTm9uZSUyQyUyMCUzQSU1RC5jbG9uZSgpJTJDJTIwbnVtX2NsYXNzZXMlM0RudW1fbGFiZWxzKSUyQyUyMGRpbSUzRDElMEEpLnRvKHRvcmNoLmZsb2F0KSUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",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, FNetForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/fnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FNetForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;google/fnet-base&quot;</span>, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>)

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

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_class_ids = torch.arange(<span class="hljs-number">0</span>, logits.shape[-<span class="hljs-number">1</span>])[torch.sigmoid(logits).squeeze(dim=<span class="hljs-number">0</span>) &gt; <span class="hljs-number">0.5</span>]

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># To train a model on \`num_labels\` classes, you can pass \`num_labels=num_labels\` to \`.from_pretrained(...)\`</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>num_labels = <span class="hljs-built_in">len</span>(model.config.id2label)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FNetForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;google/fnet-base&quot;</span>, num_labels=num_labels, problem_type=<span class="hljs-string">&quot;multi_label_classification&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.<span class="hljs-built_in">sum</span>(
<span class="hljs-meta">... </span>    torch.nn.functional.one_hot(predicted_class_ids[<span class="hljs-literal">None</span>, :].clone(), num_classes=num_labels), dim=<span class="hljs-number">1</span>
<span class="hljs-meta">... </span>).to(torch.<span class="hljs-built_in">float</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){c=s("p"),y=i("Example of multi-label classification:"),u=h(),w(p.$$.fragment)},l(n){c=r(n,"P",{});var d=a(c);y=l(d,"Example of multi-label classification:"),d.forEach(o),u=f(n),T(p.$$.fragment,n)},m(n,d){b(n,c,d),e(c,y),b(n,u,d),k(p,n,d),_=!0},p:K,i(n){_||(M(p.$$.fragment,n),_=!0)},o(n){v(p.$$.fragment,n),_=!1},d(n){n&&o(c),n&&o(u),F(p,n)}}}function hh($){let c,y,u,p,_;return{c(){c=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
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(n){c=r(n,"P",{});var d=a(c);y=l(d,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(d,"CODE",{});var N=a(u);p=l(N,"Module"),N.forEach(o),_=l(d,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),d.forEach(o)},m(n,d){b(n,c,d),e(c,y),e(c,u),e(u,p),e(c,_)},d(n){n&&o(c)}}}function fh($){let c,y,u,p,_;return p=new ee({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGTmV0Rm9yTXVsdGlwbGVDaG9pY2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmZuZXQtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEZOZXRGb3JNdWx0aXBsZUNob2ljZS5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZm5ldC1iYXNlJTIyKSUwQSUwQXByb21wdCUyMCUzRCUyMCUyMkluJTIwSXRhbHklMkMlMjBwaXp6YSUyMHNlcnZlZCUyMGluJTIwZm9ybWFsJTIwc2V0dGluZ3MlMkMlMjBzdWNoJTIwYXMlMjBhdCUyMGElMjByZXN0YXVyYW50JTJDJTIwaXMlMjBwcmVzZW50ZWQlMjB1bnNsaWNlZC4lMjIlMEFjaG9pY2UwJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2l0aCUyMGElMjBmb3JrJTIwYW5kJTIwYSUyMGtuaWZlLiUyMiUwQWNob2ljZTElMjAlM0QlMjAlMjJJdCUyMGlzJTIwZWF0ZW4lMjB3aGlsZSUyMGhlbGQlMjBpbiUyMHRoZSUyMGhhbmQuJTIyJTBBbGFiZWxzJTIwJTNEJTIwdG9yY2gudGVuc29yKDApLnVuc3F1ZWV6ZSgwKSUyMCUyMCUyMyUyMGNob2ljZTAlMjBpcyUyMGNvcnJlY3QlMjAoYWNjb3JkaW5nJTIwdG8lMjBXaWtpcGVkaWElMjAlM0IpKSUyQyUyMGJhdGNoJTIwc2l6ZSUyMDElMEElMEFlbmNvZGluZyUyMCUzRCUyMHRva2VuaXplciglNUJwcm9tcHQlMkMlMjBwcm9tcHQlNUQlMkMlMjAlNUJjaG9pY2UwJTJDJTIwY2hvaWNlMSU1RCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMkMlMjBwYWRkaW5nJTNEVHJ1ZSklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKiolN0JrJTNBJTIwdi51bnNxdWVlemUoMCklMjBmb3IlMjBrJTJDJTIwdiUyMGluJTIwZW5jb2RpbmcuaXRlbXMoKSU3RCUyQyUyMGxhYmVscyUzRGxhYmVscyklMjAlMjAlMjMlMjBiYXRjaCUyMHNpemUlMjBpcyUyMDElMEElMEElMjMlMjB0aGUlMjBsaW5lYXIlMjBjbGFzc2lmaWVyJTIwc3RpbGwlMjBuZWVkcyUyMHRvJTIwYmUlMjB0cmFpbmVkJTBBbG9zcyUyMCUzRCUyMG91dHB1dHMubG9zcyUwQWxvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FNetForMultipleChoice
<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/fnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FNetForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;google/fnet-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>prompt = <span class="hljs-string">&quot;In Italy, pizza served in formal settings, such as at a restaurant, is presented unsliced.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice0 = <span class="hljs-string">&quot;It is eaten with a fork and a knife.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>choice1 = <span class="hljs-string">&quot;It is eaten while held in the hand.&quot;</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor(<span class="hljs-number">0</span>).unsqueeze(<span class="hljs-number">0</span>)  <span class="hljs-comment"># choice0 is correct (according to Wikipedia ;)), batch size 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;pt&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**{k: v.unsqueeze(<span class="hljs-number">0</span>) <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()}, labels=labels)  <span class="hljs-comment"># batch size is 1</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># the linear classifier still needs to be trained</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){c=s("p"),y=i("Example:"),u=h(),w(p.$$.fragment)},l(n){c=r(n,"P",{});var d=a(c);y=l(d,"Example:"),d.forEach(o),u=f(n),T(p.$$.fragment,n)},m(n,d){b(n,c,d),e(c,y),b(n,u,d),k(p,n,d),_=!0},p:K,i(n){_||(M(p.$$.fragment,n),_=!0)},o(n){v(p.$$.fragment,n),_=!1},d(n){n&&o(c),n&&o(u),F(p,n)}}}function uh($){let c,y,u,p,_;return{c(){c=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
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(n){c=r(n,"P",{});var d=a(c);y=l(d,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(d,"CODE",{});var N=a(u);p=l(N,"Module"),N.forEach(o),_=l(d,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),d.forEach(o)},m(n,d){b(n,c,d),e(c,y),e(c,u),e(u,p),e(c,_)},d(n){n&&o(c)}}}function gh($){let c,y,u,p,_;return p=new ee({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGTmV0Rm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZm5ldC1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwRk5ldEZvclRva2VuQ2xhc3NpZmljYXRpb24uZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmZuZXQtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTBBJTIwJTIwJTIwJTIwJTIySHVnZ2luZ0ZhY2UlMjBpcyUyMGElMjBjb21wYW55JTIwYmFzZWQlMjBpbiUyMFBhcmlzJTIwYW5kJTIwTmV3JTIwWW9yayUyMiUyQyUyMGFkZF9zcGVjaWFsX3Rva2VucyUzREZhbHNlJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiUwQSklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwbG9naXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpLmxvZ2l0cyUwQSUwQXByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlMjAlM0QlMjBsb2dpdHMuYXJnbWF4KC0xKSUwQSUwQSUyMyUyME5vdGUlMjB0aGF0JTIwdG9rZW5zJTIwYXJlJTIwY2xhc3NpZmllZCUyMHJhdGhlciUyMHRoZW4lMjBpbnB1dCUyMHdvcmRzJTIwd2hpY2glMjBtZWFucyUyMHRoYXQlMEElMjMlMjB0aGVyZSUyMG1pZ2h0JTIwYmUlMjBtb3JlJTIwcHJlZGljdGVkJTIwdG9rZW4lMjBjbGFzc2VzJTIwdGhhbiUyMHdvcmRzLiUwQSUyMyUyME11bHRpcGxlJTIwdG9rZW4lMjBjbGFzc2VzJTIwbWlnaHQlMjBhY2NvdW50JTIwZm9yJTIwdGhlJTIwc2FtZSUyMHdvcmQlMEFwcmVkaWN0ZWRfdG9rZW5zX2NsYXNzZXMlMjAlM0QlMjAlNUJtb2RlbC5jb25maWcuaWQybGFiZWwlNUJ0Lml0ZW0oKSU1RCUyMGZvciUyMHQlMjBpbiUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlNUIwJTVEJTVEJTBBJTBBbGFiZWxzJTIwJTNEJTIwcHJlZGljdGVkX3Rva2VuX2NsYXNzX2lkcyUwQWxvc3MlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyUyQyUyMGxhYmVscyUzRGxhYmVscykubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FNetForTokenClassification
<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/fnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FNetForTokenClassification.from_pretrained(<span class="hljs-string">&quot;google/fnet-base&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;HuggingFace is a company based in Paris and New York&quot;</span>, add_special_tokens=<span class="hljs-literal">False</span>, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>
<span class="hljs-meta">... </span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">with</span> torch.no_grad():
<span class="hljs-meta">... </span>    logits = model(**inputs).logits

<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_token_class_ids = logits.argmax(-<span class="hljs-number">1</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Note that tokens are classified rather then input words which means that</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># there might be more predicted token classes than words.</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Multiple token classes might account for the same word</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>predicted_tokens_classes = [model.config.id2label[t.item()] <span class="hljs-keyword">for</span> t <span class="hljs-keyword">in</span> predicted_token_class_ids[<span class="hljs-number">0</span>]]

<span class="hljs-meta">&gt;&gt;&gt; </span>labels = predicted_token_class_ids
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss`}}),{c(){c=s("p"),y=i("Example:"),u=h(),w(p.$$.fragment)},l(n){c=r(n,"P",{});var d=a(c);y=l(d,"Example:"),d.forEach(o),u=f(n),T(p.$$.fragment,n)},m(n,d){b(n,c,d),e(c,y),b(n,u,d),k(p,n,d),_=!0},p:K,i(n){_||(M(p.$$.fragment,n),_=!0)},o(n){v(p.$$.fragment,n),_=!1},d(n){n&&o(c),n&&o(u),F(p,n)}}}function _h($){let c,y,u,p,_;return{c(){c=s("p"),y=i("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s("code"),p=i("Module"),_=i(`
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(n){c=r(n,"P",{});var d=a(c);y=l(d,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=r(d,"CODE",{});var N=a(u);p=l(N,"Module"),N.forEach(o),_=l(d,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),d.forEach(o)},m(n,d){b(n,c,d),e(c,y),e(c,u),e(u,p),e(c,_)},d(n){n&&o(c)}}}function bh($){let c,y,u,p,_;return p=new ee({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGTmV0Rm9yUXVlc3Rpb25BbnN3ZXJpbmclMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmZuZXQtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEZOZXRGb3JRdWVzdGlvbkFuc3dlcmluZy5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGZm5ldC1iYXNlJTIyKSUwQSUwQXF1ZXN0aW9uJTJDJTIwdGV4dCUyMCUzRCUyMCUyMldobyUyMHdhcyUyMEppbSUyMEhlbnNvbiUzRiUyMiUyQyUyMCUyMkppbSUyMEhlbnNvbiUyMHdhcyUyMGElMjBuaWNlJTIwcHVwcGV0JTIyJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKHF1ZXN0aW9uJTJDJTIwdGV4dCUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMG91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFhbnN3ZXJfc3RhcnRfaW5kZXglMjAlM0QlMjBvdXRwdXRzLnN0YXJ0X2xvZ2l0cy5hcmdtYXgoKSUwQWFuc3dlcl9lbmRfaW5kZXglMjAlM0QlMjBvdXRwdXRzLmVuZF9sb2dpdHMuYXJnbWF4KCklMEElMEFwcmVkaWN0X2Fuc3dlcl90b2tlbnMlMjAlM0QlMjBpbnB1dHMuaW5wdXRfaWRzJTVCMCUyQyUyMGFuc3dlcl9zdGFydF9pbmRleCUyMCUzQSUyMGFuc3dlcl9lbmRfaW5kZXglMjAlMkIlMjAxJTVEJTBBJTBBJTIzJTIwdGFyZ2V0JTIwaXMlMjAlMjJuaWNlJTIwcHVwcGV0JTIyJTBBdGFyZ2V0X3N0YXJ0X2luZGV4JTIwJTNEJTIwdG9yY2gudGVuc29yKCU1QjE0JTVEKSUwQXRhcmdldF9lbmRfaW5kZXglMjAlM0QlMjB0b3JjaC50ZW5zb3IoJTVCMTUlNUQpJTBBJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwc3RhcnRfcG9zaXRpb25zJTNEdGFyZ2V0X3N0YXJ0X2luZGV4JTJDJTIwZW5kX3Bvc2l0aW9ucyUzRHRhcmdldF9lbmRfaW5kZXgpJTBBbG9zcyUyMCUzRCUyMG91dHB1dHMubG9zcw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FNetForQuestionAnswering
<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/fnet-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FNetForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;google/fnet-base&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(){c=s("p"),y=i("Example:"),u=h(),w(p.$$.fragment)},l(n){c=r(n,"P",{});var d=a(c);y=l(d,"Example:"),d.forEach(o),u=f(n),T(p.$$.fragment,n)},m(n,d){b(n,c,d),e(c,y),b(n,u,d),k(p,n,d),_=!0},p:K,i(n){_||(M(p.$$.fragment,n),_=!0)},o(n){v(p.$$.fragment,n),_=!1},d(n){n&&o(c),n&&o(u),F(p,n)}}}function yh($){let c,y,u,p,_,n,d,N,ga,_r,de,We,Qn,Wt,_a,Ln,ba,br,Ae,ya,At,wa,Ta,yr,Ko,Dn,ka,wr,en,Ma,Tr,tn,Hn,va,kr,se,Fa,Bt,$a,Na,Pt,Ja,ja,Mr,pe,Be,Yn,Rt,Ua,On,za,vr,U,Kn,on,Ea,Ia,es,nn,xa,Ca,ts,sn,Za,qa,os,rn,Sa,Wa,ns,an,Aa,Fr,me,Pe,ss,Gt,Ba,rs,Pa,$r,I,Xt,Ra,he,Ga,ln,Xa,Va,Vt,Qa,La,Da,fe,Ha,cn,Ya,Oa,dn,Ka,ei,ti,Re,Nr,ue,Ge,as,Qt,oi,is,ni,Jr,j,Lt,si,te,ri,pn,ai,ii,Dt,li,ci,mn,di,pi,mi,re,Ht,hi,ls,fi,ui,Yt,hn,gi,cs,_i,bi,fn,yi,ds,wi,Ti,Xe,Ot,ki,Kt,Mi,ps,vi,Fi,$i,P,eo,Ni,ms,Ji,ji,Ve,Ui,ge,zi,hs,Ei,Ii,fs,xi,Ci,Zi,un,to,jr,_e,Qe,us,oo,qi,gs,Si,Ur,x,no,Wi,C,Ai,_s,Bi,Pi,gn,Ri,Gi,so,Xi,Vi,_n,Qi,Li,Di,ae,ro,Hi,bs,Yi,Oi,ao,bn,Ki,ys,el,tl,yn,ol,ws,nl,sl,R,io,rl,Ts,al,il,Le,ll,ks,cl,zr,be,De,Ms,lo,dl,vs,pl,Er,Z,co,ml,po,hl,mo,fl,ul,gl,ho,_l,fo,bl,yl,wl,G,uo,Tl,ye,kl,wn,Ml,vl,Fs,Fl,$l,Nl,He,Jl,Ye,Ir,we,Oe,$s,go,jl,Ns,Ul,xr,q,_o,zl,Te,El,Js,Il,xl,js,Cl,Zl,ql,bo,Sl,yo,Wl,Al,Bl,X,wo,Pl,ke,Rl,Tn,Gl,Xl,Us,Vl,Ql,Ll,Ke,Dl,et,Cr,Me,tt,zs,To,Hl,Es,Yl,Zr,oe,ko,Ol,ve,Kl,Is,ec,tc,Mo,oc,nc,sc,V,vo,rc,Fe,ac,kn,ic,lc,xs,cc,dc,pc,ot,mc,nt,qr,$e,st,Cs,Fo,hc,Zs,fc,Sr,ne,$o,uc,Ne,gc,qs,_c,bc,No,yc,wc,Tc,Q,Jo,kc,Je,Mc,Mn,vc,Fc,Ss,$c,Nc,Jc,rt,jc,at,Wr,je,it,Ws,jo,Uc,As,zc,Ar,S,Uo,Ec,Bs,Ic,xc,zo,Cc,Eo,Zc,qc,Sc,z,Io,Wc,Ue,Ac,vn,Bc,Pc,Ps,Rc,Gc,Xc,lt,Vc,ct,Qc,dt,Br,ze,pt,Rs,xo,Lc,Gs,Dc,Pr,W,Co,Hc,Xs,Yc,Oc,Zo,Kc,qo,ed,td,od,L,So,nd,Ee,sd,Fn,rd,ad,Vs,id,ld,cd,mt,dd,ht,Rr,Ie,ft,Qs,Wo,pd,Ls,md,Gr,A,Ao,hd,Ds,fd,ud,Bo,gd,Po,_d,bd,yd,D,Ro,wd,xe,Td,$n,kd,Md,Hs,vd,Fd,$d,ut,Nd,gt,Xr,Ce,_t,Ys,Go,Jd,Os,jd,Vr,B,Xo,Ud,Ze,zd,Ks,Ed,Id,er,xd,Cd,Zd,Vo,qd,Qo,Sd,Wd,Ad,H,Lo,Bd,qe,Pd,Nn,Rd,Gd,tr,Xd,Vd,Qd,bt,Ld,yt,Qr;return n=new E({}),Wt=new E({}),Rt=new E({}),Gt=new E({}),Xt=new J({props:{name:"class transformers.FNetConfig",anchor:"transformers.FNetConfig",parameters:[{name:"vocab_size",val:" = 32000"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu_new'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 512"},{name:"type_vocab_size",val:" = 4"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"use_tpu_fourier_optimizations",val:" = False"},{name:"tpu_short_seq_length",val:" = 512"},{name:"pad_token_id",val:" = 3"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FNetConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 32000) &#x2014;
Vocabulary size of the FNet model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/fnet#transformers.FNetModel">FNetModel</a> or <code>TFFNetModel</code>.`,name:"vocab_size"},{anchor:"transformers.FNetConfig.hidden_size",description:`<strong>hidden_size</strong> (<code>int</code>, <em>optional</em>, defaults to 768) &#x2014;
Dimension of the encoder layers and the pooler layer.`,name:"hidden_size"},{anchor:"transformers.FNetConfig.num_hidden_layers",description:`<strong>num_hidden_layers</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of hidden layers in the Transformer encoder.`,name:"num_hidden_layers"},{anchor:"transformers.FNetConfig.intermediate_size",description:`<strong>intermediate_size</strong> (<code>int</code>, <em>optional</em>, defaults to 3072) &#x2014;
Dimension of the &#x201C;intermediate&#x201D; (i.e., feed-forward) layer in the Transformer encoder.`,name:"intermediate_size"},{anchor:"transformers.FNetConfig.hidden_act",description:`<strong>hidden_act</strong> (<code>str</code> or <code>function</code>, <em>optional</em>, defaults to <code>&quot;gelu_new&quot;</code>) &#x2014;
The non-linear activation function (function or string) in the encoder and pooler. If string, <code>&quot;gelu&quot;</code>,
<code>&quot;relu&quot;</code>, <code>&quot;selu&quot;</code> and <code>&quot;gelu_new&quot;</code> are supported.`,name:"hidden_act"},{anchor:"transformers.FNetConfig.hidden_dropout_prob",description:`<strong>hidden_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout probabilitiy for all fully connected layers in the embeddings, encoder, and pooler.`,name:"hidden_dropout_prob"},{anchor:"transformers.FNetConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#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.FNetConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 4) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/main/en/model_doc/fnet#transformers.FNetModel">FNetModel</a> or <code>TFFNetModel</code>.`,name:"type_vocab_size"},{anchor:"transformers.FNetConfig.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.FNetConfig.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.FNetConfig.use_tpu_fourier_optimizations",description:`<strong>use_tpu_fourier_optimizations</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Determines whether to use TPU optimized FFTs. If <code>True</code>, the model will favor axis-wise FFTs transforms.
Set to <code>False</code> for GPU/CPU hardware, in which case n-dimensional FFTs are used.`,name:"use_tpu_fourier_optimizations"},{anchor:"transformers.FNetConfig.tpu_short_seq_length",description:`<strong>tpu_short_seq_length</strong> (<code>int</code>, <em>optional</em>, defaults to 512) &#x2014;
The sequence length that is expected by the model when using TPUs. This will be used to initialize the DFT
matrix only when <em>use_tpu_fourier_optimizations</em> is set to <code>True</code> and the input sequence is shorter than or
equal to 4096 tokens.`,name:"tpu_short_seq_length"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/fnet/configuration_fnet.py#L30"}}),Re=new O({props:{anchor:"transformers.FNetConfig.example",$$slots:{default:[Km]},$$scope:{ctx:$}}}),Qt=new E({}),Lt=new J({props:{name:"class transformers.FNetTokenizer",anchor:"transformers.FNetTokenizer",parameters:[{name:"vocab_file",val:""},{name:"do_lower_case",val:" = False"},{name:"remove_space",val:" = True"},{name:"keep_accents",val:" = True"},{name:"unk_token",val:" = '<unk>'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '<pad>'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FNetTokenizer.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.FNetTokenizer.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.FNetTokenizer.remove_space",description:`<strong>remove_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to strip the text when tokenizing (removing excess spaces before and after the string).`,name:"remove_space"},{anchor:"transformers.FNetTokenizer.keep_accents",description:`<strong>keep_accents</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to keep accents when tokenizing.`,name:"keep_accents"},{anchor:"transformers.FNetTokenizer.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.FNetTokenizer.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.FNetTokenizer.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.FNetTokenizer.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.FNetTokenizer.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"},{anchor:"transformers.FNetTokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"},{anchor:"transformers.FNetTokenizer.sp_model",description:`<strong>sp_model</strong> (<code>SentencePieceProcessor</code>) &#x2014;
The <em>SentencePiece</em> processor that is used for every conversion (string, tokens and IDs).`,name:"sp_model"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/fnet/tokenization_fnet.py#L47"}}),Ht=new J({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.FNetTokenizer.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.FNetTokenizer.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added.`,name:"token_ids_0"},{anchor:"transformers.FNetTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/fnet/tokenization_fnet.py#L283",returnDescription:`
<p>List of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Ot=new J({props:{name:"get_special_tokens_mask",anchor:"transformers.FNetTokenizer.get_special_tokens_mask",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"},{name:"already_has_special_tokens",val:": bool = False"}],parametersDescription:[{anchor:"transformers.FNetTokenizer.get_special_tokens_mask.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.FNetTokenizer.get_special_tokens_mask.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"},{anchor:"transformers.FNetTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/fnet/tokenization_fnet.py#L308",returnDescription:`
<p>A list of integers in the range [0, 1]: 1 for a special token, 0 for a sequence token.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),eo=new J({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.FNetTokenizer.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.FNetTokenizer.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs.`,name:"token_ids_0"},{anchor:"transformers.FNetTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/fnet/tokenization_fnet.py#L336",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Ve=new O({props:{anchor:"transformers.FNetTokenizer.create_token_type_ids_from_sequences.example",$$slots:{default:[eh]},$$scope:{ctx:$}}}),to=new J({props:{name:"save_vocabulary",anchor:"transformers.FNetTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/fnet/tokenization_fnet.py#L365"}}),oo=new E({}),no=new J({props:{name:"class transformers.FNetTokenizerFast",anchor:"transformers.FNetTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"do_lower_case",val:" = False"},{name:"remove_space",val:" = True"},{name:"keep_accents",val:" = True"},{name:"unk_token",val:" = '<unk>'"},{name:"sep_token",val:" = '[SEP]'"},{name:"pad_token",val:" = '<pad>'"},{name:"cls_token",val:" = '[CLS]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FNetTokenizerFast.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.FNetTokenizerFast.do_lower_case",description:`<strong>do_lower_case</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not to lowercase the input when tokenizing.`,name:"do_lower_case"},{anchor:"transformers.FNetTokenizerFast.remove_space",description:`<strong>remove_space</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to strip the text when tokenizing (removing excess spaces before and after the string).`,name:"remove_space"},{anchor:"transformers.FNetTokenizerFast.keep_accents",description:`<strong>keep_accents</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not to keep accents when tokenizing.`,name:"keep_accents"},{anchor:"transformers.FNetTokenizerFast.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.FNetTokenizerFast.sep_token",description:`<strong>sep_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[SEP]&quot;</code>) &#x2014;
The separator token, which is used when building a sequence from multiple sequences, e.g. two sequences for
sequence classification or for a text and a question for question answering. It is also used as the last
token of a sequence built with special tokens.`,name:"sep_token"},{anchor:"transformers.FNetTokenizerFast.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.FNetTokenizerFast.cls_token",description:`<strong>cls_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[CLS]&quot;</code>) &#x2014;
The classifier token which is used when doing sequence classification (classification of the whole sequence
instead of per-token classification). It is the first token of the sequence when built with special tokens.`,name:"cls_token"},{anchor:"transformers.FNetTokenizerFast.mask_token",description:`<strong>mask_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;[MASK]&quot;</code>) &#x2014;
The token used for masking values. This is the token used when training this model with masked language
modeling. This is the token which the model will try to predict.`,name:"mask_token"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/fnet/tokenization_fnet_fast.py#L54"}}),ro=new J({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.FNetTokenizerFast.build_inputs_with_special_tokens",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.FNetTokenizerFast.build_inputs_with_special_tokens.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of IDs to which the special tokens will be added`,name:"token_ids_0"},{anchor:"transformers.FNetTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/fnet/tokenization_fnet_fast.py#L137",returnDescription:`
<p>list of <a href="../glossary#input-ids">input IDs</a> with the appropriate special tokens.</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),io=new J({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.FNetTokenizerFast.create_token_type_ids_from_sequences",parameters:[{name:"token_ids_0",val:": typing.List[int]"},{name:"token_ids_1",val:": typing.Optional[typing.List[int]] = None"}],parametersDescription:[{anchor:"transformers.FNetTokenizerFast.create_token_type_ids_from_sequences.token_ids_0",description:`<strong>token_ids_0</strong> (<code>List[int]</code>) &#x2014;
List of ids.`,name:"token_ids_0"},{anchor:"transformers.FNetTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/fnet/tokenization_fnet_fast.py#L162",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Le=new O({props:{anchor:"transformers.FNetTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[th]},$$scope:{ctx:$}}}),lo=new E({}),co=new J({props:{name:"class transformers.FNetModel",anchor:"transformers.FNetModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.FNetModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/fnet#transformers.FNetConfig">FNetConfig</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/main/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/main/src/transformers/models/fnet/modeling_fnet.py#L515"}}),uo=new J({props:{name:"forward",anchor:"transformers.FNetModel.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FNetModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FNetModel.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FNetModel.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.FNetModel.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FNetModel.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.FNetModel.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/fnet/modeling_fnet.py#L541",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</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/main/en/model_doc/fnet#transformers.FNetConfig"
>FNetConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>) \u2014 Sequence of hidden-states at the output of the last layer of the model.</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/main/en/main_classes/output#transformers.modeling_outputs.BaseModelOutput"
>transformers.modeling_outputs.BaseModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),He=new St({props:{$$slots:{default:[oh]},$$scope:{ctx:$}}}),Ye=new O({props:{anchor:"transformers.FNetModel.forward.example",$$slots:{default:[nh]},$$scope:{ctx:$}}}),go=new E({}),_o=new J({props:{name:"class transformers.FNetForPreTraining",anchor:"transformers.FNetForPreTraining",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.FNetForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/fnet#transformers.FNetConfig">FNetConfig</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/main/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/main/src/transformers/models/fnet/modeling_fnet.py#L624"}}),wo=new J({props:{name:"forward",anchor:"transformers.FNetForPreTraining.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"next_sentence_label",val:": typing.Optional[torch.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FNetForPreTraining.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FNetForPreTraining.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FNetForPreTraining.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.FNetForPreTraining.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FNetForPreTraining.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.FNetForPreTraining.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FNetForPreTraining.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 in <code>[0, ..., config.vocab_size]</code>`,name:"labels"},{anchor:"transformers.FNetForPreTraining.forward.next_sentence_label",description:`<strong>next_sentence_label</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the next sequence prediction (classification) loss. Input should be a sequence pair
(see <code>input_ids</code> docstring) Indices should be in <code>[0, 1]</code>:</p>
<ul>
<li>0 indicates sequence B is a continuation of sequence A,</li>
<li>1 indicates sequence B is a random sequence.</li>
</ul>`,name:"next_sentence_label"},{anchor:"transformers.FNetForPreTraining.forward.kwargs",description:`<strong>kwargs</strong> (<code>Dict[str, any]</code>, optional, defaults to <em>{}</em>) &#x2014;
Used to hide legacy arguments that have been deprecated.`,name:"kwargs"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/fnet/modeling_fnet.py#L642",returnDescription:`
<p>A <code>transformers.models.fnet.modeling_fnet.FNetForPreTrainingOutput</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/main/en/model_doc/fnet#transformers.FNetConfig"
>FNetConfig</a>) and inputs.</p>
<ul>
<li><strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) \u2014 Total loss as the sum of the masked language modeling loss and the next sequence prediction
(classification) loss.</li>
<li><strong>prediction_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).</li>
<li><strong>seq_relationship_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, 2)</code>) \u2014 Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
before SoftMax).</li>
<li><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>. Hidden-states of the model at the output of each layer
plus the initial embedding outputs.</li>
</ul>
`,returnType:`
<p><code>transformers.models.fnet.modeling_fnet.FNetForPreTrainingOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ke=new St({props:{$$slots:{default:[sh]},$$scope:{ctx:$}}}),et=new O({props:{anchor:"transformers.FNetForPreTraining.forward.example",$$slots:{default:[rh]},$$scope:{ctx:$}}}),To=new E({}),ko=new J({props:{name:"class transformers.FNetForMaskedLM",anchor:"transformers.FNetForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.FNetForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/fnet#transformers.FNetConfig">FNetConfig</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/main/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/main/src/transformers/models/fnet/modeling_fnet.py#L718"}}),vo=new J({props:{name:"forward",anchor:"transformers.FNetForMaskedLM.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FNetForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FNetForMaskedLM.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FNetForMaskedLM.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.FNetForMaskedLM.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FNetForMaskedLM.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.FNetForMaskedLM.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FNetForMaskedLM.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 in <code>[0, ..., config.vocab_size]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/fnet/modeling_fnet.py#L736",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/fnet#transformers.FNetConfig"
>FNetConfig</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/main/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ot=new St({props:{$$slots:{default:[ah]},$$scope:{ctx:$}}}),nt=new O({props:{anchor:"transformers.FNetForMaskedLM.forward.example",$$slots:{default:[ih]},$$scope:{ctx:$}}}),Fo=new E({}),$o=new J({props:{name:"class transformers.FNetForNextSentencePrediction",anchor:"transformers.FNetForNextSentencePrediction",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.FNetForNextSentencePrediction.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/fnet#transformers.FNetConfig">FNetConfig</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/main/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/main/src/transformers/models/fnet/modeling_fnet.py#L788"}}),Jo=new J({props:{name:"forward",anchor:"transformers.FNetForNextSentencePrediction.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FNetForNextSentencePrediction.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FNetForNextSentencePrediction.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FNetForNextSentencePrediction.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.FNetForNextSentencePrediction.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FNetForNextSentencePrediction.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.FNetForNextSentencePrediction.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FNetForNextSentencePrediction.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the next sequence prediction (classification) loss. Input should be a sequence pair
(see <code>input_ids</code> docstring). Indices should be in <code>[0, 1]</code>:</p>
<ul>
<li>0 indicates sequence B is a continuation of sequence A,</li>
<li>1 indicates sequence B is a random sequence.</li>
</ul>`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/fnet/modeling_fnet.py#L798",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.NextSentencePredictorOutput"
>transformers.modeling_outputs.NextSentencePredictorOutput</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/main/en/model_doc/fnet#transformers.FNetConfig"
>FNetConfig</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>next_sentence_label</code> is provided) \u2014 Next sequence prediction (classification) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, 2)</code>) \u2014 Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
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/main/en/main_classes/output#transformers.modeling_outputs.NextSentencePredictorOutput"
>transformers.modeling_outputs.NextSentencePredictorOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),rt=new St({props:{$$slots:{default:[lh]},$$scope:{ctx:$}}}),at=new O({props:{anchor:"transformers.FNetForNextSentencePrediction.forward.example",$$slots:{default:[ch]},$$scope:{ctx:$}}}),jo=new E({}),Uo=new J({props:{name:"class transformers.FNetForSequenceClassification",anchor:"transformers.FNetForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.FNetForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/fnet#transformers.FNetConfig">FNetConfig</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/main/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/main/src/transformers/models/fnet/modeling_fnet.py#L883"}}),Io=new J({props:{name:"forward",anchor:"transformers.FNetForSequenceClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FNetForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FNetForSequenceClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FNetForSequenceClassification.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.FNetForSequenceClassification.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FNetForSequenceClassification.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.FNetForSequenceClassification.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FNetForSequenceClassification.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/main/src/transformers/models/fnet/modeling_fnet.py#L895",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/fnet#transformers.FNetConfig"
>FNetConfig</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/main/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),lt=new St({props:{$$slots:{default:[dh]},$$scope:{ctx:$}}}),ct=new O({props:{anchor:"transformers.FNetForSequenceClassification.forward.example",$$slots:{default:[ph]},$$scope:{ctx:$}}}),dt=new O({props:{anchor:"transformers.FNetForSequenceClassification.forward.example-2",$$slots:{default:[mh]},$$scope:{ctx:$}}}),xo=new E({}),Co=new J({props:{name:"class transformers.FNetForMultipleChoice",anchor:"transformers.FNetForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.FNetForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/fnet#transformers.FNetConfig">FNetConfig</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/main/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/main/src/transformers/models/fnet/modeling_fnet.py#L968"}}),So=new J({props:{name:"forward",anchor:"transformers.FNetForMultipleChoice.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FNetForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FNetForMultipleChoice.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FNetForMultipleChoice.forward.position_ids",description:`<strong>position_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, 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.FNetForMultipleChoice.forward.inputs_embeds",description:`<strong>inputs_embeds</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Optionally, instead of passing <code>input_ids</code> you can choose to directly pass an embedded representation. This
is useful if you want more control over how to convert <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FNetForMultipleChoice.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.FNetForMultipleChoice.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FNetForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/fnet/modeling_fnet.py#L979",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</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/main/en/model_doc/fnet#transformers.FNetConfig"
>FNetConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <em>(1,)</em>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices)</code>) \u2014 <em>num_choices</em> is the second dimension of the input tensors. (see <em>input_ids</em> above).</p>
<p>Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>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/main/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),mt=new St({props:{$$slots:{default:[hh]},$$scope:{ctx:$}}}),ht=new O({props:{anchor:"transformers.FNetForMultipleChoice.forward.example",$$slots:{default:[fh]},$$scope:{ctx:$}}}),Wo=new E({}),Ao=new J({props:{name:"class transformers.FNetForTokenClassification",anchor:"transformers.FNetForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.FNetForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/fnet#transformers.FNetConfig">FNetConfig</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/main/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/main/src/transformers/models/fnet/modeling_fnet.py#L1047"}}),Ro=new J({props:{name:"forward",anchor:"transformers.FNetForTokenClassification.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"labels",val:": typing.Optional[torch.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FNetForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FNetForTokenClassification.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FNetForTokenClassification.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.FNetForTokenClassification.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FNetForTokenClassification.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.FNetForTokenClassification.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FNetForTokenClassification.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 token classification loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>.`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/main/src/transformers/models/fnet/modeling_fnet.py#L1060",returnDescription:`
<p>A <a
  href="/docs/transformers/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</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/main/en/model_doc/fnet#transformers.FNetConfig"
>FNetConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided)  \u2014 Classification loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.num_labels)</code>) \u2014 Classification scores (before SoftMax).</p>
</li>
<li>
<p><strong>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/main/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ut=new St({props:{$$slots:{default:[uh]},$$scope:{ctx:$}}}),gt=new O({props:{anchor:"transformers.FNetForTokenClassification.forward.example",$$slots:{default:[gh]},$$scope:{ctx:$}}}),Go=new E({}),Xo=new J({props:{name:"class transformers.FNetForQuestionAnswering",anchor:"transformers.FNetForQuestionAnswering",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.FNetForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/main/en/model_doc/fnet#transformers.FNetConfig">FNetConfig</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/main/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/main/src/transformers/models/fnet/modeling_fnet.py#L1116"}}),Lo=new J({props:{name:"forward",anchor:"transformers.FNetForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"position_ids",val:": typing.Optional[torch.Tensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.Tensor] = None"},{name:"start_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"end_positions",val:": typing.Optional[torch.Tensor] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FNetForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/main/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/main/en/model_doc/perceiver#transformers.PerceiverTokenizer.__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.FNetForQuestionAnswering.forward.token_type_ids",description:`<strong>token_type_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Segment token indices to indicate first and second portions of the inputs. Indices are selected in <code>[0, 1]</code>:</p>
<ul>
<li>0 corresponds to a <em>sentence A</em> token,</li>
<li>1 corresponds to a <em>sentence B</em> token.</li>
</ul>
<p><a href="../glossary#token-type-ids">What are token type IDs?</a>`,name:"token_type_ids"},{anchor:"transformers.FNetForQuestionAnswering.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.FNetForQuestionAnswering.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 <em>input_ids</em> indices into associated vectors than the
model&#x2019;s internal embedding lookup matrix.`,name:"inputs_embeds"},{anchor:"transformers.FNetForQuestionAnswering.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.FNetForQuestionAnswering.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/main/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.FNetForQuestionAnswering.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.FNetForQuestionAnswering.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/main/src/transformers/models/fnet/modeling_fnet.py#L1128",returnDescription:`
<p>A <a
  href="/docs/transformers/main/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/main/en/model_doc/fnet#transformers.FNetConfig"
>FNetConfig</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/main/en/main_classes/output#transformers.modeling_outputs.QuestionAnsweringModelOutput"
>transformers.modeling_outputs.QuestionAnsweringModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),bt=new St({props:{$$slots:{default:[_h]},$$scope:{ctx:$}}}),yt=new O({props:{anchor:"transformers.FNetForQuestionAnswering.forward.example",$$slots:{default:[bh]},$$scope:{ctx:$}}}),{c(){c=s("meta"),y=h(),u=s("h1"),p=s("a"),_=s("span"),w(n.$$.fragment),d=h(),N=s("span"),ga=i("FNet"),_r=h(),de=s("h2"),We=s("a"),Qn=s("span"),w(Wt.$$.fragment),_a=h(),Ln=s("span"),ba=i("Overview"),br=h(),Ae=s("p"),ya=i("The FNet model was proposed in "),At=s("a"),wa=i("FNet: Mixing Tokens with Fourier Transforms"),Ta=i(` by
James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, Santiago Ontanon. The model replaces the self-attention layer in a BERT
model with a fourier transform which returns only the real parts of the transform. The model is significantly faster
than the BERT model because it has fewer parameters and is more memory efficient. The model achieves about 92-97%
accuracy of BERT counterparts on GLUE benchmark, and trains much faster than the BERT model. The abstract from the
paper is the following:`),yr=h(),Ko=s("p"),Dn=s("em"),ka=i(`We show that Transformer encoder architectures can be sped up, with limited accuracy costs, by replacing the
self-attention sublayers with simple linear transformations that \u201Cmix\u201D input tokens. These linear mixers, along with
standard nonlinearities in feed-forward layers, prove competent at modeling semantic relationships in several text
classification tasks. Most surprisingly, we find that replacing the self-attention sublayer in a Transformer encoder
with a standard, unparameterized Fourier Transform achieves 92-97% of the accuracy of BERT counterparts on the GLUE
benchmark, but trains 80% faster on GPUs and 70% faster on TPUs at standard 512 input lengths. At longer input lengths,
our FNet model is significantly faster: when compared to the \u201Cefficient\u201D Transformers on the Long Range Arena
benchmark, FNet matches the accuracy of the most accurate models, while outpacing the fastest models across all
sequence lengths on GPUs (and across relatively shorter lengths on TPUs). Finally, FNet has a light memory footprint
and is particularly efficient at smaller model sizes; for a fixed speed and accuracy budget, small FNet models
outperform Transformer counterparts.`),wr=h(),en=s("p"),Ma=i("Tips on usage:"),Tr=h(),tn=s("ul"),Hn=s("li"),va=i(`The model was trained without an attention mask as it is based on Fourier Transform. The model was trained with
maximum sequence length 512 which includes pad tokens. Hence, it is highly recommended to use the same maximum
sequence length for fine-tuning and inference.`),kr=h(),se=s("p"),Fa=i("This model was contributed by "),Bt=s("a"),$a=i("gchhablani"),Na=i(". The original code can be found "),Pt=s("a"),Ja=i("here"),ja=i("."),Mr=h(),pe=s("h2"),Be=s("a"),Yn=s("span"),w(Rt.$$.fragment),Ua=h(),On=s("span"),za=i("Documentation resources"),vr=h(),U=s("ul"),Kn=s("li"),on=s("a"),Ea=i("Text classification task guide"),Ia=h(),es=s("li"),nn=s("a"),xa=i("Token classification task guide"),Ca=h(),ts=s("li"),sn=s("a"),Za=i("Question answering task guide"),qa=h(),os=s("li"),rn=s("a"),Sa=i("Masked language modeling task guide"),Wa=h(),ns=s("li"),an=s("a"),Aa=i("Multiple choice task guide"),Fr=h(),me=s("h2"),Pe=s("a"),ss=s("span"),w(Gt.$$.fragment),Ba=h(),rs=s("span"),Pa=i("FNetConfig"),$r=h(),I=s("div"),w(Xt.$$.fragment),Ra=h(),he=s("p"),Ga=i("This is the configuration class to store the configuration of a "),ln=s("a"),Xa=i("FNetModel"),Va=i(`. It is used to instantiate an FNet
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 FNet
`),Vt=s("a"),Qa=i("google/fnet-base"),La=i(" architecture."),Da=h(),fe=s("p"),Ha=i("Configuration objects inherit from "),cn=s("a"),Ya=i("PretrainedConfig"),Oa=i(` and can be used to control the model outputs. Read the
documentation from `),dn=s("a"),Ka=i("PretrainedConfig"),ei=i(" for more information."),ti=h(),w(Re.$$.fragment),Nr=h(),ue=s("h2"),Ge=s("a"),as=s("span"),w(Qt.$$.fragment),oi=h(),is=s("span"),ni=i("FNetTokenizer"),Jr=h(),j=s("div"),w(Lt.$$.fragment),si=h(),te=s("p"),ri=i("Construct an FNet tokenizer. Adapted from "),pn=s("a"),ai=i("AlbertTokenizer"),ii=i(`. Based on
`),Dt=s("a"),li=i("SentencePiece"),ci=i(". This tokenizer inherits from "),mn=s("a"),di=i("PreTrainedTokenizer"),pi=i(`
which contains most of the main methods. Users should refer to this superclass for more information regarding those
methods.`),mi=h(),re=s("div"),w(Ht.$$.fragment),hi=h(),ls=s("p"),fi=i(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An FNet sequence has the following format:`),ui=h(),Yt=s("ul"),hn=s("li"),gi=i("single sequence: "),cs=s("code"),_i=i("[CLS] X [SEP]"),bi=h(),fn=s("li"),yi=i("pair of sequences: "),ds=s("code"),wi=i("[CLS] A [SEP] B [SEP]"),Ti=h(),Xe=s("div"),w(Ot.$$.fragment),ki=h(),Kt=s("p"),Mi=i(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),ps=s("code"),vi=i("prepare_for_model"),Fi=i(" method."),$i=h(),P=s("div"),w(eo.$$.fragment),Ni=h(),ms=s("p"),Ji=i("Create a mask from the two sequences passed to be used in a sequence-pair classification task. An FNet sequence"),ji=h(),w(Ve.$$.fragment),Ui=h(),ge=s("p"),zi=i("If "),hs=s("code"),Ei=i("token_ids_1"),Ii=i(" is "),fs=s("code"),xi=i("None"),Ci=i(", this method only returns the first portion of the mask (0s)."),Zi=h(),un=s("div"),w(to.$$.fragment),jr=h(),_e=s("h2"),Qe=s("a"),us=s("span"),w(oo.$$.fragment),qi=h(),gs=s("span"),Si=i("FNetTokenizerFast"),Ur=h(),x=s("div"),w(no.$$.fragment),Wi=h(),C=s("p"),Ai=i("Construct a \u201Cfast\u201D FNetTokenizer (backed by HuggingFace\u2019s "),_s=s("em"),Bi=i("tokenizers"),Pi=i(` library). Adapted from
`),gn=s("a"),Ri=i("AlbertTokenizerFast"),Gi=i(`. Based on
`),so=s("a"),Xi=i("Unigram"),Vi=i(`. This
tokenizer inherits from `),_n=s("a"),Qi=i("PreTrainedTokenizerFast"),Li=i(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods`),Di=h(),ae=s("div"),w(ro.$$.fragment),Hi=h(),bs=s("p"),Yi=i(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An FNet sequence has the following format:`),Oi=h(),ao=s("ul"),bn=s("li"),Ki=i("single sequence: "),ys=s("code"),el=i("[CLS] X [SEP]"),tl=h(),yn=s("li"),ol=i("pair of sequences: "),ws=s("code"),nl=i("[CLS] A [SEP] B [SEP]"),sl=h(),R=s("div"),w(io.$$.fragment),rl=h(),Ts=s("p"),al=i("Creates a mask from the two sequences passed to be used in a sequence-pair classification task. An FNet"),il=h(),w(Le.$$.fragment),ll=h(),ks=s("p"),cl=i("if token_ids_1 is None, only returns the first portion of the mask (0s)."),zr=h(),be=s("h2"),De=s("a"),Ms=s("span"),w(lo.$$.fragment),dl=h(),vs=s("span"),pl=i("FNetModel"),Er=h(),Z=s("div"),w(co.$$.fragment),ml=h(),po=s("p"),hl=i(`The bare FNet Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),mo=s("a"),fl=i("torch.nn.Module"),ul=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),gl=h(),ho=s("p"),_l=i("The model can behave as an encoder, following the architecture described in "),fo=s("a"),bl=i(`FNet: Mixing Tokens with Fourier
Transforms`),yl=i(" by James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, Santiago Ontanon."),wl=h(),G=s("div"),w(uo.$$.fragment),Tl=h(),ye=s("p"),kl=i("The "),wn=s("a"),Ml=i("FNetModel"),vl=i(" forward method, overrides the "),Fs=s("code"),Fl=i("__call__"),$l=i(" special method."),Nl=h(),w(He.$$.fragment),Jl=h(),w(Ye.$$.fragment),Ir=h(),we=s("h2"),Oe=s("a"),$s=s("span"),w(go.$$.fragment),jl=h(),Ns=s("span"),Ul=i("FNetForPreTraining"),xr=h(),q=s("div"),w(_o.$$.fragment),zl=h(),Te=s("p"),El=i("FNet Model with two heads on top as done during the pretraining: a "),Js=s("code"),Il=i("masked language modeling"),xl=i(" head and a "),js=s("code"),Cl=i("next sentence prediction (classification)"),Zl=i(" head."),ql=h(),bo=s("p"),Sl=i("This model is a PyTorch "),yo=s("a"),Wl=i("torch.nn.Module"),Al=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Bl=h(),X=s("div"),w(wo.$$.fragment),Pl=h(),ke=s("p"),Rl=i("The "),Tn=s("a"),Gl=i("FNetForPreTraining"),Xl=i(" forward method, overrides the "),Us=s("code"),Vl=i("__call__"),Ql=i(" special method."),Ll=h(),w(Ke.$$.fragment),Dl=h(),w(et.$$.fragment),Cr=h(),Me=s("h2"),tt=s("a"),zs=s("span"),w(To.$$.fragment),Hl=h(),Es=s("span"),Yl=i("FNetForMaskedLM"),Zr=h(),oe=s("div"),w(ko.$$.fragment),Ol=h(),ve=s("p"),Kl=i("FNet Model with a "),Is=s("code"),ec=i("language modeling"),tc=i(` head on top.
This model is a PyTorch `),Mo=s("a"),oc=i("torch.nn.Module"),nc=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),sc=h(),V=s("div"),w(vo.$$.fragment),rc=h(),Fe=s("p"),ac=i("The "),kn=s("a"),ic=i("FNetForMaskedLM"),lc=i(" forward method, overrides the "),xs=s("code"),cc=i("__call__"),dc=i(" special method."),pc=h(),w(ot.$$.fragment),mc=h(),w(nt.$$.fragment),qr=h(),$e=s("h2"),st=s("a"),Cs=s("span"),w(Fo.$$.fragment),hc=h(),Zs=s("span"),fc=i("FNetForNextSentencePrediction"),Sr=h(),ne=s("div"),w($o.$$.fragment),uc=h(),Ne=s("p"),gc=i("FNet Model with a "),qs=s("code"),_c=i("next sentence prediction (classification)"),bc=i(` head on top.
This model is a PyTorch `),No=s("a"),yc=i("torch.nn.Module"),wc=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Tc=h(),Q=s("div"),w(Jo.$$.fragment),kc=h(),Je=s("p"),Mc=i("The "),Mn=s("a"),vc=i("FNetForNextSentencePrediction"),Fc=i(" forward method, overrides the "),Ss=s("code"),$c=i("__call__"),Nc=i(" special method."),Jc=h(),w(rt.$$.fragment),jc=h(),w(at.$$.fragment),Wr=h(),je=s("h2"),it=s("a"),Ws=s("span"),w(jo.$$.fragment),Uc=h(),As=s("span"),zc=i("FNetForSequenceClassification"),Ar=h(),S=s("div"),w(Uo.$$.fragment),Ec=h(),Bs=s("p"),Ic=i(`FNet Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),xc=h(),zo=s("p"),Cc=i("This model is a PyTorch "),Eo=s("a"),Zc=i("torch.nn.Module"),qc=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Sc=h(),z=s("div"),w(Io.$$.fragment),Wc=h(),Ue=s("p"),Ac=i("The "),vn=s("a"),Bc=i("FNetForSequenceClassification"),Pc=i(" forward method, overrides the "),Ps=s("code"),Rc=i("__call__"),Gc=i(" special method."),Xc=h(),w(lt.$$.fragment),Vc=h(),w(ct.$$.fragment),Qc=h(),w(dt.$$.fragment),Br=h(),ze=s("h2"),pt=s("a"),Rs=s("span"),w(xo.$$.fragment),Lc=h(),Gs=s("span"),Dc=i("FNetForMultipleChoice"),Pr=h(),W=s("div"),w(Co.$$.fragment),Hc=h(),Xs=s("p"),Yc=i(`FNet Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),Oc=h(),Zo=s("p"),Kc=i("This model is a PyTorch "),qo=s("a"),ed=i("torch.nn.Module"),td=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),od=h(),L=s("div"),w(So.$$.fragment),nd=h(),Ee=s("p"),sd=i("The "),Fn=s("a"),rd=i("FNetForMultipleChoice"),ad=i(" forward method, overrides the "),Vs=s("code"),id=i("__call__"),ld=i(" special method."),cd=h(),w(mt.$$.fragment),dd=h(),w(ht.$$.fragment),Rr=h(),Ie=s("h2"),ft=s("a"),Qs=s("span"),w(Wo.$$.fragment),pd=h(),Ls=s("span"),md=i("FNetForTokenClassification"),Gr=h(),A=s("div"),w(Ao.$$.fragment),hd=h(),Ds=s("p"),fd=i(`FNet Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),ud=h(),Bo=s("p"),gd=i("This model is a PyTorch "),Po=s("a"),_d=i("torch.nn.Module"),bd=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),yd=h(),D=s("div"),w(Ro.$$.fragment),wd=h(),xe=s("p"),Td=i("The "),$n=s("a"),kd=i("FNetForTokenClassification"),Md=i(" forward method, overrides the "),Hs=s("code"),vd=i("__call__"),Fd=i(" special method."),$d=h(),w(ut.$$.fragment),Nd=h(),w(gt.$$.fragment),Xr=h(),Ce=s("h2"),_t=s("a"),Ys=s("span"),w(Go.$$.fragment),Jd=h(),Os=s("span"),jd=i("FNetForQuestionAnswering"),Vr=h(),B=s("div"),w(Xo.$$.fragment),Ud=h(),Ze=s("p"),zd=i(`FNet Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Ks=s("code"),Ed=i("span start logits"),Id=i(" and "),er=s("code"),xd=i("span end logits"),Cd=i(")."),Zd=h(),Vo=s("p"),qd=i("This model is a PyTorch "),Qo=s("a"),Sd=i("torch.nn.Module"),Wd=i(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Ad=h(),H=s("div"),w(Lo.$$.fragment),Bd=h(),qe=s("p"),Pd=i("The "),Nn=s("a"),Rd=i("FNetForQuestionAnswering"),Gd=i(" forward method, overrides the "),tr=s("code"),Xd=i("__call__"),Vd=i(" special method."),Qd=h(),w(bt.$$.fragment),Ld=h(),w(yt.$$.fragment),this.h()},l(t){const g=Ym('[data-svelte="svelte-1phssyn"]',document.head);c=r(g,"META",{name:!0,content:!0}),g.forEach(o),y=f(t),u=r(t,"H1",{class:!0});var Do=a(u);p=r(Do,"A",{id:!0,class:!0,href:!0});var or=a(p);_=r(or,"SPAN",{});var nr=a(_);T(n.$$.fragment,nr),nr.forEach(o),or.forEach(o),d=f(Do),N=r(Do,"SPAN",{});var sr=a(N);ga=l(sr,"FNet"),sr.forEach(o),Do.forEach(o),_r=f(t),de=r(t,"H2",{class:!0});var Ho=a(de);We=r(Ho,"A",{id:!0,class:!0,href:!0});var rr=a(We);Qn=r(rr,"SPAN",{});var ar=a(Qn);T(Wt.$$.fragment,ar),ar.forEach(o),rr.forEach(o),_a=f(Ho),Ln=r(Ho,"SPAN",{});var ir=a(Ln);ba=l(ir,"Overview"),ir.forEach(o),Ho.forEach(o),br=f(t),Ae=r(t,"P",{});var Yo=a(Ae);ya=l(Yo,"The FNet model was proposed in "),At=r(Yo,"A",{href:!0,rel:!0});var lr=a(At);wa=l(lr,"FNet: Mixing Tokens with Fourier Transforms"),lr.forEach(o),Ta=l(Yo,` by
James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, Santiago Ontanon. The model replaces the self-attention layer in a BERT
model with a fourier transform which returns only the real parts of the transform. The model is significantly faster
than the BERT model because it has fewer parameters and is more memory efficient. The model achieves about 92-97%
accuracy of BERT counterparts on GLUE benchmark, and trains much faster than the BERT model. The abstract from the
paper is the following:`),Yo.forEach(o),yr=f(t),Ko=r(t,"P",{});var cr=a(Ko);Dn=r(cr,"EM",{});var dr=a(Dn);ka=l(dr,`We show that Transformer encoder architectures can be sped up, with limited accuracy costs, by replacing the
self-attention sublayers with simple linear transformations that \u201Cmix\u201D input tokens. These linear mixers, along with
standard nonlinearities in feed-forward layers, prove competent at modeling semantic relationships in several text
classification tasks. Most surprisingly, we find that replacing the self-attention sublayer in a Transformer encoder
with a standard, unparameterized Fourier Transform achieves 92-97% of the accuracy of BERT counterparts on the GLUE
benchmark, but trains 80% faster on GPUs and 70% faster on TPUs at standard 512 input lengths. At longer input lengths,
our FNet model is significantly faster: when compared to the \u201Cefficient\u201D Transformers on the Long Range Arena
benchmark, FNet matches the accuracy of the most accurate models, while outpacing the fastest models across all
sequence lengths on GPUs (and across relatively shorter lengths on TPUs). Finally, FNet has a light memory footprint
and is particularly efficient at smaller model sizes; for a fixed speed and accuracy budget, small FNet models
outperform Transformer counterparts.`),dr.forEach(o),cr.forEach(o),wr=f(t),en=r(t,"P",{});var pr=a(en);Ma=l(pr,"Tips on usage:"),pr.forEach(o),Tr=f(t),tn=r(t,"UL",{});var mr=a(tn);Hn=r(mr,"LI",{});var hr=a(Hn);va=l(hr,`The model was trained without an attention mask as it is based on Fourier Transform. The model was trained with
maximum sequence length 512 which includes pad tokens. Hence, it is highly recommended to use the same maximum
sequence length for fine-tuning and inference.`),hr.forEach(o),mr.forEach(o),kr=f(t),se=r(t,"P",{});var Se=a(se);Fa=l(Se,"This model was contributed by "),Bt=r(Se,"A",{href:!0,rel:!0});var fr=a(Bt);$a=l(fr,"gchhablani"),fr.forEach(o),Na=l(Se,". The original code can be found "),Pt=r(Se,"A",{href:!0,rel:!0});var ur=a(Pt);Ja=l(ur,"here"),ur.forEach(o),ja=l(Se,"."),Se.forEach(o),Mr=f(t),pe=r(t,"H2",{class:!0});var Oo=a(pe);Be=r(Oo,"A",{id:!0,class:!0,href:!0});var gr=a(Be);Yn=r(gr,"SPAN",{});var Kd=a(Yn);T(Rt.$$.fragment,Kd),Kd.forEach(o),gr.forEach(o),Ua=f(Oo),On=r(Oo,"SPAN",{});var ep=a(On);za=l(ep,"Documentation resources"),ep.forEach(o),Oo.forEach(o),vr=f(t),U=r(t,"UL",{});var ie=a(U);Kn=r(ie,"LI",{});var tp=a(Kn);on=r(tp,"A",{href:!0});var op=a(on);Ea=l(op,"Text classification task guide"),op.forEach(o),tp.forEach(o),Ia=f(ie),es=r(ie,"LI",{});var np=a(es);nn=r(np,"A",{href:!0});var sp=a(nn);xa=l(sp,"Token classification task guide"),sp.forEach(o),np.forEach(o),Ca=f(ie),ts=r(ie,"LI",{});var rp=a(ts);sn=r(rp,"A",{href:!0});var ap=a(sn);Za=l(ap,"Question answering task guide"),ap.forEach(o),rp.forEach(o),qa=f(ie),os=r(ie,"LI",{});var ip=a(os);rn=r(ip,"A",{href:!0});var lp=a(rn);Sa=l(lp,"Masked language modeling task guide"),lp.forEach(o),ip.forEach(o),Wa=f(ie),ns=r(ie,"LI",{});var cp=a(ns);an=r(cp,"A",{href:!0});var dp=a(an);Aa=l(dp,"Multiple choice task guide"),dp.forEach(o),cp.forEach(o),ie.forEach(o),Fr=f(t),me=r(t,"H2",{class:!0});var Lr=a(me);Pe=r(Lr,"A",{id:!0,class:!0,href:!0});var pp=a(Pe);ss=r(pp,"SPAN",{});var mp=a(ss);T(Gt.$$.fragment,mp),mp.forEach(o),pp.forEach(o),Ba=f(Lr),rs=r(Lr,"SPAN",{});var hp=a(rs);Pa=l(hp,"FNetConfig"),hp.forEach(o),Lr.forEach(o),$r=f(t),I=r(t,"DIV",{class:!0});var wt=a(I);T(Xt.$$.fragment,wt),Ra=f(wt),he=r(wt,"P",{});var Jn=a(he);Ga=l(Jn,"This is the configuration class to store the configuration of a "),ln=r(Jn,"A",{href:!0});var fp=a(ln);Xa=l(fp,"FNetModel"),fp.forEach(o),Va=l(Jn,`. It is used to instantiate an FNet
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 FNet
`),Vt=r(Jn,"A",{href:!0,rel:!0});var up=a(Vt);Qa=l(up,"google/fnet-base"),up.forEach(o),La=l(Jn," architecture."),Jn.forEach(o),Da=f(wt),fe=r(wt,"P",{});var jn=a(fe);Ha=l(jn,"Configuration objects inherit from "),cn=r(jn,"A",{href:!0});var gp=a(cn);Ya=l(gp,"PretrainedConfig"),gp.forEach(o),Oa=l(jn,` and can be used to control the model outputs. Read the
documentation from `),dn=r(jn,"A",{href:!0});var _p=a(dn);Ka=l(_p,"PretrainedConfig"),_p.forEach(o),ei=l(jn," for more information."),jn.forEach(o),ti=f(wt),T(Re.$$.fragment,wt),wt.forEach(o),Nr=f(t),ue=r(t,"H2",{class:!0});var Dr=a(ue);Ge=r(Dr,"A",{id:!0,class:!0,href:!0});var bp=a(Ge);as=r(bp,"SPAN",{});var yp=a(as);T(Qt.$$.fragment,yp),yp.forEach(o),bp.forEach(o),oi=f(Dr),is=r(Dr,"SPAN",{});var wp=a(is);ni=l(wp,"FNetTokenizer"),wp.forEach(o),Dr.forEach(o),Jr=f(t),j=r(t,"DIV",{class:!0});var Y=a(j);T(Lt.$$.fragment,Y),si=f(Y),te=r(Y,"P",{});var Tt=a(te);ri=l(Tt,"Construct an FNet tokenizer. Adapted from "),pn=r(Tt,"A",{href:!0});var Tp=a(pn);ai=l(Tp,"AlbertTokenizer"),Tp.forEach(o),ii=l(Tt,`. Based on
`),Dt=r(Tt,"A",{href:!0,rel:!0});var kp=a(Dt);li=l(kp,"SentencePiece"),kp.forEach(o),ci=l(Tt,". This tokenizer inherits from "),mn=r(Tt,"A",{href:!0});var Mp=a(mn);di=l(Mp,"PreTrainedTokenizer"),Mp.forEach(o),pi=l(Tt,`
which contains most of the main methods. Users should refer to this superclass for more information regarding those
methods.`),Tt.forEach(o),mi=f(Y),re=r(Y,"DIV",{class:!0});var Un=a(re);T(Ht.$$.fragment,Un),hi=f(Un),ls=r(Un,"P",{});var vp=a(ls);fi=l(vp,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An FNet sequence has the following format:`),vp.forEach(o),ui=f(Un),Yt=r(Un,"UL",{});var Hr=a(Yt);hn=r(Hr,"LI",{});var Dd=a(hn);gi=l(Dd,"single sequence: "),cs=r(Dd,"CODE",{});var Fp=a(cs);_i=l(Fp,"[CLS] X [SEP]"),Fp.forEach(o),Dd.forEach(o),bi=f(Hr),fn=r(Hr,"LI",{});var Hd=a(fn);yi=l(Hd,"pair of sequences: "),ds=r(Hd,"CODE",{});var $p=a(ds);wi=l($p,"[CLS] A [SEP] B [SEP]"),$p.forEach(o),Hd.forEach(o),Hr.forEach(o),Un.forEach(o),Ti=f(Y),Xe=r(Y,"DIV",{class:!0});var Yr=a(Xe);T(Ot.$$.fragment,Yr),ki=f(Yr),Kt=r(Yr,"P",{});var Or=a(Kt);Mi=l(Or,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),ps=r(Or,"CODE",{});var Np=a(ps);vi=l(Np,"prepare_for_model"),Np.forEach(o),Fi=l(Or," method."),Or.forEach(o),Yr.forEach(o),$i=f(Y),P=r(Y,"DIV",{class:!0});var kt=a(P);T(eo.$$.fragment,kt),Ni=f(kt),ms=r(kt,"P",{});var Jp=a(ms);Ji=l(Jp,"Create a mask from the two sequences passed to be used in a sequence-pair classification task. An FNet sequence"),Jp.forEach(o),ji=f(kt),T(Ve.$$.fragment,kt),Ui=f(kt),ge=r(kt,"P",{});var zn=a(ge);zi=l(zn,"If "),hs=r(zn,"CODE",{});var jp=a(hs);Ei=l(jp,"token_ids_1"),jp.forEach(o),Ii=l(zn," is "),fs=r(zn,"CODE",{});var Up=a(fs);xi=l(Up,"None"),Up.forEach(o),Ci=l(zn,", this method only returns the first portion of the mask (0s)."),zn.forEach(o),kt.forEach(o),Zi=f(Y),un=r(Y,"DIV",{class:!0});var zp=a(un);T(to.$$.fragment,zp),zp.forEach(o),Y.forEach(o),jr=f(t),_e=r(t,"H2",{class:!0});var Kr=a(_e);Qe=r(Kr,"A",{id:!0,class:!0,href:!0});var Ep=a(Qe);us=r(Ep,"SPAN",{});var Ip=a(us);T(oo.$$.fragment,Ip),Ip.forEach(o),Ep.forEach(o),qi=f(Kr),gs=r(Kr,"SPAN",{});var xp=a(gs);Si=l(xp,"FNetTokenizerFast"),xp.forEach(o),Kr.forEach(o),Ur=f(t),x=r(t,"DIV",{class:!0});var Mt=a(x);T(no.$$.fragment,Mt),Wi=f(Mt),C=r(Mt,"P",{});var le=a(C);Ai=l(le,"Construct a \u201Cfast\u201D FNetTokenizer (backed by HuggingFace\u2019s "),_s=r(le,"EM",{});var Cp=a(_s);Bi=l(Cp,"tokenizers"),Cp.forEach(o),Pi=l(le,` library). Adapted from
`),gn=r(le,"A",{href:!0});var Zp=a(gn);Ri=l(Zp,"AlbertTokenizerFast"),Zp.forEach(o),Gi=l(le,`. Based on
`),so=r(le,"A",{href:!0,rel:!0});var qp=a(so);Xi=l(qp,"Unigram"),qp.forEach(o),Vi=l(le,`. This
tokenizer inherits from `),_n=r(le,"A",{href:!0});var Sp=a(_n);Qi=l(Sp,"PreTrainedTokenizerFast"),Sp.forEach(o),Li=l(le,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods`),le.forEach(o),Di=f(Mt),ae=r(Mt,"DIV",{class:!0});var En=a(ae);T(ro.$$.fragment,En),Hi=f(En),bs=r(En,"P",{});var Wp=a(bs);Yi=l(Wp,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An FNet sequence has the following format:`),Wp.forEach(o),Oi=f(En),ao=r(En,"UL",{});var ea=a(ao);bn=r(ea,"LI",{});var Yd=a(bn);Ki=l(Yd,"single sequence: "),ys=r(Yd,"CODE",{});var Ap=a(ys);el=l(Ap,"[CLS] X [SEP]"),Ap.forEach(o),Yd.forEach(o),tl=f(ea),yn=r(ea,"LI",{});var Od=a(yn);ol=l(Od,"pair of sequences: "),ws=r(Od,"CODE",{});var Bp=a(ws);nl=l(Bp,"[CLS] A [SEP] B [SEP]"),Bp.forEach(o),Od.forEach(o),ea.forEach(o),En.forEach(o),sl=f(Mt),R=r(Mt,"DIV",{class:!0});var vt=a(R);T(io.$$.fragment,vt),rl=f(vt),Ts=r(vt,"P",{});var Pp=a(Ts);al=l(Pp,"Creates a mask from the two sequences passed to be used in a sequence-pair classification task. An FNet"),Pp.forEach(o),il=f(vt),T(Le.$$.fragment,vt),ll=f(vt),ks=r(vt,"P",{});var Rp=a(ks);cl=l(Rp,"if token_ids_1 is None, only returns the first portion of the mask (0s)."),Rp.forEach(o),vt.forEach(o),Mt.forEach(o),zr=f(t),be=r(t,"H2",{class:!0});var ta=a(be);De=r(ta,"A",{id:!0,class:!0,href:!0});var Gp=a(De);Ms=r(Gp,"SPAN",{});var Xp=a(Ms);T(lo.$$.fragment,Xp),Xp.forEach(o),Gp.forEach(o),dl=f(ta),vs=r(ta,"SPAN",{});var Vp=a(vs);pl=l(Vp,"FNetModel"),Vp.forEach(o),ta.forEach(o),Er=f(t),Z=r(t,"DIV",{class:!0});var Ft=a(Z);T(co.$$.fragment,Ft),ml=f(Ft),po=r(Ft,"P",{});var oa=a(po);hl=l(oa,`The bare FNet Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),mo=r(oa,"A",{href:!0,rel:!0});var Qp=a(mo);fl=l(Qp,"torch.nn.Module"),Qp.forEach(o),ul=l(oa,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),oa.forEach(o),gl=f(Ft),ho=r(Ft,"P",{});var na=a(ho);_l=l(na,"The model can behave as an encoder, following the architecture described in "),fo=r(na,"A",{href:!0,rel:!0});var Lp=a(fo);bl=l(Lp,`FNet: Mixing Tokens with Fourier
Transforms`),Lp.forEach(o),yl=l(na," by James Lee-Thorp, Joshua Ainslie, Ilya Eckstein, Santiago Ontanon."),na.forEach(o),wl=f(Ft),G=r(Ft,"DIV",{class:!0});var $t=a(G);T(uo.$$.fragment,$t),Tl=f($t),ye=r($t,"P",{});var In=a(ye);kl=l(In,"The "),wn=r(In,"A",{href:!0});var Dp=a(wn);Ml=l(Dp,"FNetModel"),Dp.forEach(o),vl=l(In," forward method, overrides the "),Fs=r(In,"CODE",{});var Hp=a(Fs);Fl=l(Hp,"__call__"),Hp.forEach(o),$l=l(In," special method."),In.forEach(o),Nl=f($t),T(He.$$.fragment,$t),Jl=f($t),T(Ye.$$.fragment,$t),$t.forEach(o),Ft.forEach(o),Ir=f(t),we=r(t,"H2",{class:!0});var sa=a(we);Oe=r(sa,"A",{id:!0,class:!0,href:!0});var Yp=a(Oe);$s=r(Yp,"SPAN",{});var Op=a($s);T(go.$$.fragment,Op),Op.forEach(o),Yp.forEach(o),jl=f(sa),Ns=r(sa,"SPAN",{});var Kp=a(Ns);Ul=l(Kp,"FNetForPreTraining"),Kp.forEach(o),sa.forEach(o),xr=f(t),q=r(t,"DIV",{class:!0});var Nt=a(q);T(_o.$$.fragment,Nt),zl=f(Nt),Te=r(Nt,"P",{});var xn=a(Te);El=l(xn,"FNet Model with two heads on top as done during the pretraining: a "),Js=r(xn,"CODE",{});var em=a(Js);Il=l(em,"masked language modeling"),em.forEach(o),xl=l(xn," head and a "),js=r(xn,"CODE",{});var tm=a(js);Cl=l(tm,"next sentence prediction (classification)"),tm.forEach(o),Zl=l(xn," head."),xn.forEach(o),ql=f(Nt),bo=r(Nt,"P",{});var ra=a(bo);Sl=l(ra,"This model is a PyTorch "),yo=r(ra,"A",{href:!0,rel:!0});var om=a(yo);Wl=l(om,"torch.nn.Module"),om.forEach(o),Al=l(ra,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ra.forEach(o),Bl=f(Nt),X=r(Nt,"DIV",{class:!0});var Jt=a(X);T(wo.$$.fragment,Jt),Pl=f(Jt),ke=r(Jt,"P",{});var Cn=a(ke);Rl=l(Cn,"The "),Tn=r(Cn,"A",{href:!0});var nm=a(Tn);Gl=l(nm,"FNetForPreTraining"),nm.forEach(o),Xl=l(Cn," forward method, overrides the "),Us=r(Cn,"CODE",{});var sm=a(Us);Vl=l(sm,"__call__"),sm.forEach(o),Ql=l(Cn," special method."),Cn.forEach(o),Ll=f(Jt),T(Ke.$$.fragment,Jt),Dl=f(Jt),T(et.$$.fragment,Jt),Jt.forEach(o),Nt.forEach(o),Cr=f(t),Me=r(t,"H2",{class:!0});var aa=a(Me);tt=r(aa,"A",{id:!0,class:!0,href:!0});var rm=a(tt);zs=r(rm,"SPAN",{});var am=a(zs);T(To.$$.fragment,am),am.forEach(o),rm.forEach(o),Hl=f(aa),Es=r(aa,"SPAN",{});var im=a(Es);Yl=l(im,"FNetForMaskedLM"),im.forEach(o),aa.forEach(o),Zr=f(t),oe=r(t,"DIV",{class:!0});var Zn=a(oe);T(ko.$$.fragment,Zn),Ol=f(Zn),ve=r(Zn,"P",{});var qn=a(ve);Kl=l(qn,"FNet Model with a "),Is=r(qn,"CODE",{});var lm=a(Is);ec=l(lm,"language modeling"),lm.forEach(o),tc=l(qn,` head on top.
This model is a PyTorch `),Mo=r(qn,"A",{href:!0,rel:!0});var cm=a(Mo);oc=l(cm,"torch.nn.Module"),cm.forEach(o),nc=l(qn,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),qn.forEach(o),sc=f(Zn),V=r(Zn,"DIV",{class:!0});var jt=a(V);T(vo.$$.fragment,jt),rc=f(jt),Fe=r(jt,"P",{});var Sn=a(Fe);ac=l(Sn,"The "),kn=r(Sn,"A",{href:!0});var dm=a(kn);ic=l(dm,"FNetForMaskedLM"),dm.forEach(o),lc=l(Sn," forward method, overrides the "),xs=r(Sn,"CODE",{});var pm=a(xs);cc=l(pm,"__call__"),pm.forEach(o),dc=l(Sn," special method."),Sn.forEach(o),pc=f(jt),T(ot.$$.fragment,jt),mc=f(jt),T(nt.$$.fragment,jt),jt.forEach(o),Zn.forEach(o),qr=f(t),$e=r(t,"H2",{class:!0});var ia=a($e);st=r(ia,"A",{id:!0,class:!0,href:!0});var mm=a(st);Cs=r(mm,"SPAN",{});var hm=a(Cs);T(Fo.$$.fragment,hm),hm.forEach(o),mm.forEach(o),hc=f(ia),Zs=r(ia,"SPAN",{});var fm=a(Zs);fc=l(fm,"FNetForNextSentencePrediction"),fm.forEach(o),ia.forEach(o),Sr=f(t),ne=r(t,"DIV",{class:!0});var Wn=a(ne);T($o.$$.fragment,Wn),uc=f(Wn),Ne=r(Wn,"P",{});var An=a(Ne);gc=l(An,"FNet Model with a "),qs=r(An,"CODE",{});var um=a(qs);_c=l(um,"next sentence prediction (classification)"),um.forEach(o),bc=l(An,` head on top.
This model is a PyTorch `),No=r(An,"A",{href:!0,rel:!0});var gm=a(No);yc=l(gm,"torch.nn.Module"),gm.forEach(o),wc=l(An,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),An.forEach(o),Tc=f(Wn),Q=r(Wn,"DIV",{class:!0});var Ut=a(Q);T(Jo.$$.fragment,Ut),kc=f(Ut),Je=r(Ut,"P",{});var Bn=a(Je);Mc=l(Bn,"The "),Mn=r(Bn,"A",{href:!0});var _m=a(Mn);vc=l(_m,"FNetForNextSentencePrediction"),_m.forEach(o),Fc=l(Bn," forward method, overrides the "),Ss=r(Bn,"CODE",{});var bm=a(Ss);$c=l(bm,"__call__"),bm.forEach(o),Nc=l(Bn," special method."),Bn.forEach(o),Jc=f(Ut),T(rt.$$.fragment,Ut),jc=f(Ut),T(at.$$.fragment,Ut),Ut.forEach(o),Wn.forEach(o),Wr=f(t),je=r(t,"H2",{class:!0});var la=a(je);it=r(la,"A",{id:!0,class:!0,href:!0});var ym=a(it);Ws=r(ym,"SPAN",{});var wm=a(Ws);T(jo.$$.fragment,wm),wm.forEach(o),ym.forEach(o),Uc=f(la),As=r(la,"SPAN",{});var Tm=a(As);zc=l(Tm,"FNetForSequenceClassification"),Tm.forEach(o),la.forEach(o),Ar=f(t),S=r(t,"DIV",{class:!0});var zt=a(S);T(Uo.$$.fragment,zt),Ec=f(zt),Bs=r(zt,"P",{});var km=a(Bs);Ic=l(km,`FNet Model transformer with a sequence classification/regression head on top (a linear layer on top of the pooled
output) e.g. for GLUE tasks.`),km.forEach(o),xc=f(zt),zo=r(zt,"P",{});var ca=a(zo);Cc=l(ca,"This model is a PyTorch "),Eo=r(ca,"A",{href:!0,rel:!0});var Mm=a(Eo);Zc=l(Mm,"torch.nn.Module"),Mm.forEach(o),qc=l(ca,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ca.forEach(o),Sc=f(zt),z=r(zt,"DIV",{class:!0});var ce=a(z);T(Io.$$.fragment,ce),Wc=f(ce),Ue=r(ce,"P",{});var Pn=a(Ue);Ac=l(Pn,"The "),vn=r(Pn,"A",{href:!0});var vm=a(vn);Bc=l(vm,"FNetForSequenceClassification"),vm.forEach(o),Pc=l(Pn," forward method, overrides the "),Ps=r(Pn,"CODE",{});var Fm=a(Ps);Rc=l(Fm,"__call__"),Fm.forEach(o),Gc=l(Pn," special method."),Pn.forEach(o),Xc=f(ce),T(lt.$$.fragment,ce),Vc=f(ce),T(ct.$$.fragment,ce),Qc=f(ce),T(dt.$$.fragment,ce),ce.forEach(o),zt.forEach(o),Br=f(t),ze=r(t,"H2",{class:!0});var da=a(ze);pt=r(da,"A",{id:!0,class:!0,href:!0});var $m=a(pt);Rs=r($m,"SPAN",{});var Nm=a(Rs);T(xo.$$.fragment,Nm),Nm.forEach(o),$m.forEach(o),Lc=f(da),Gs=r(da,"SPAN",{});var Jm=a(Gs);Dc=l(Jm,"FNetForMultipleChoice"),Jm.forEach(o),da.forEach(o),Pr=f(t),W=r(t,"DIV",{class:!0});var Et=a(W);T(Co.$$.fragment,Et),Hc=f(Et),Xs=r(Et,"P",{});var jm=a(Xs);Yc=l(jm,`FNet Model with a multiple choice classification head on top (a linear layer on top of the pooled output and a
softmax) e.g. for RocStories/SWAG tasks.`),jm.forEach(o),Oc=f(Et),Zo=r(Et,"P",{});var pa=a(Zo);Kc=l(pa,"This model is a PyTorch "),qo=r(pa,"A",{href:!0,rel:!0});var Um=a(qo);ed=l(Um,"torch.nn.Module"),Um.forEach(o),td=l(pa,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),pa.forEach(o),od=f(Et),L=r(Et,"DIV",{class:!0});var It=a(L);T(So.$$.fragment,It),nd=f(It),Ee=r(It,"P",{});var Rn=a(Ee);sd=l(Rn,"The "),Fn=r(Rn,"A",{href:!0});var zm=a(Fn);rd=l(zm,"FNetForMultipleChoice"),zm.forEach(o),ad=l(Rn," forward method, overrides the "),Vs=r(Rn,"CODE",{});var Em=a(Vs);id=l(Em,"__call__"),Em.forEach(o),ld=l(Rn," special method."),Rn.forEach(o),cd=f(It),T(mt.$$.fragment,It),dd=f(It),T(ht.$$.fragment,It),It.forEach(o),Et.forEach(o),Rr=f(t),Ie=r(t,"H2",{class:!0});var ma=a(Ie);ft=r(ma,"A",{id:!0,class:!0,href:!0});var Im=a(ft);Qs=r(Im,"SPAN",{});var xm=a(Qs);T(Wo.$$.fragment,xm),xm.forEach(o),Im.forEach(o),pd=f(ma),Ls=r(ma,"SPAN",{});var Cm=a(Ls);md=l(Cm,"FNetForTokenClassification"),Cm.forEach(o),ma.forEach(o),Gr=f(t),A=r(t,"DIV",{class:!0});var xt=a(A);T(Ao.$$.fragment,xt),hd=f(xt),Ds=r(xt,"P",{});var Zm=a(Ds);fd=l(Zm,`FNet Model with a token classification head on top (a linear layer on top of the hidden-states output) e.g. for
Named-Entity-Recognition (NER) tasks.`),Zm.forEach(o),ud=f(xt),Bo=r(xt,"P",{});var ha=a(Bo);gd=l(ha,"This model is a PyTorch "),Po=r(ha,"A",{href:!0,rel:!0});var qm=a(Po);_d=l(qm,"torch.nn.Module"),qm.forEach(o),bd=l(ha,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ha.forEach(o),yd=f(xt),D=r(xt,"DIV",{class:!0});var Ct=a(D);T(Ro.$$.fragment,Ct),wd=f(Ct),xe=r(Ct,"P",{});var Gn=a(xe);Td=l(Gn,"The "),$n=r(Gn,"A",{href:!0});var Sm=a($n);kd=l(Sm,"FNetForTokenClassification"),Sm.forEach(o),Md=l(Gn," forward method, overrides the "),Hs=r(Gn,"CODE",{});var Wm=a(Hs);vd=l(Wm,"__call__"),Wm.forEach(o),Fd=l(Gn," special method."),Gn.forEach(o),$d=f(Ct),T(ut.$$.fragment,Ct),Nd=f(Ct),T(gt.$$.fragment,Ct),Ct.forEach(o),xt.forEach(o),Xr=f(t),Ce=r(t,"H2",{class:!0});var fa=a(Ce);_t=r(fa,"A",{id:!0,class:!0,href:!0});var Am=a(_t);Ys=r(Am,"SPAN",{});var Bm=a(Ys);T(Go.$$.fragment,Bm),Bm.forEach(o),Am.forEach(o),Jd=f(fa),Os=r(fa,"SPAN",{});var Pm=a(Os);jd=l(Pm,"FNetForQuestionAnswering"),Pm.forEach(o),fa.forEach(o),Vr=f(t),B=r(t,"DIV",{class:!0});var Zt=a(B);T(Xo.$$.fragment,Zt),Ud=f(Zt),Ze=r(Zt,"P",{});var Xn=a(Ze);zd=l(Xn,`FNet Model with a span classification head on top for extractive question-answering tasks like SQuAD (a linear
layers on top of the hidden-states output to compute `),Ks=r(Xn,"CODE",{});var Rm=a(Ks);Ed=l(Rm,"span start logits"),Rm.forEach(o),Id=l(Xn," and "),er=r(Xn,"CODE",{});var Gm=a(er);xd=l(Gm,"span end logits"),Gm.forEach(o),Cd=l(Xn,")."),Xn.forEach(o),Zd=f(Zt),Vo=r(Zt,"P",{});var ua=a(Vo);qd=l(ua,"This model is a PyTorch "),Qo=r(ua,"A",{href:!0,rel:!0});var Xm=a(Qo);Sd=l(Xm,"torch.nn.Module"),Xm.forEach(o),Wd=l(ua,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ua.forEach(o),Ad=f(Zt),H=r(Zt,"DIV",{class:!0});var qt=a(H);T(Lo.$$.fragment,qt),Bd=f(qt),qe=r(qt,"P",{});var Vn=a(qe);Pd=l(Vn,"The "),Nn=r(Vn,"A",{href:!0});var Vm=a(Nn);Rd=l(Vm,"FNetForQuestionAnswering"),Vm.forEach(o),Gd=l(Vn," forward method, overrides the "),tr=r(Vn,"CODE",{});var Qm=a(tr);Xd=l(Qm,"__call__"),Qm.forEach(o),Vd=l(Vn," special method."),Vn.forEach(o),Qd=f(qt),T(bt.$$.fragment,qt),Ld=f(qt),T(yt.$$.fragment,qt),qt.forEach(o),Zt.forEach(o),this.h()},h(){m(c,"name","hf:doc:metadata"),m(c,"content",JSON.stringify(wh)),m(p,"id","fnet"),m(p,"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"),m(p,"href","#fnet"),m(u,"class","relative group"),m(We,"id","overview"),m(We,"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"),m(We,"href","#overview"),m(de,"class","relative group"),m(At,"href","https://arxiv.org/abs/2105.03824"),m(At,"rel","nofollow"),m(Bt,"href","https://huggingface.co/gchhablani"),m(Bt,"rel","nofollow"),m(Pt,"href","https://github.com/google-research/google-research/tree/master/f_net"),m(Pt,"rel","nofollow"),m(Be,"id","documentation-resources"),m(Be,"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"),m(Be,"href","#documentation-resources"),m(pe,"class","relative group"),m(on,"href","../tasks/sequence_classification"),m(nn,"href","../tasks/token_classification"),m(sn,"href","../tasks/question_answering"),m(rn,"href","../tasks/masked_language_modeling"),m(an,"href","../tasks/multiple_choice"),m(Pe,"id","transformers.FNetConfig"),m(Pe,"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"),m(Pe,"href","#transformers.FNetConfig"),m(me,"class","relative group"),m(ln,"href","/docs/transformers/main/en/model_doc/fnet#transformers.FNetModel"),m(Vt,"href","https://huggingface.co/google/fnet-base"),m(Vt,"rel","nofollow"),m(cn,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),m(dn,"href","/docs/transformers/main/en/main_classes/configuration#transformers.PretrainedConfig"),m(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Ge,"id","transformers.FNetTokenizer"),m(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"),m(Ge,"href","#transformers.FNetTokenizer"),m(ue,"class","relative group"),m(pn,"href","/docs/transformers/main/en/model_doc/albert#transformers.AlbertTokenizer"),m(Dt,"href","https://github.com/google/sentencepiece"),m(Dt,"rel","nofollow"),m(mn,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),m(re,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(un,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(j,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Qe,"id","transformers.FNetTokenizerFast"),m(Qe,"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"),m(Qe,"href","#transformers.FNetTokenizerFast"),m(_e,"class","relative group"),m(gn,"href","/docs/transformers/main/en/model_doc/albert#transformers.AlbertTokenizerFast"),m(so,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=unigram#models"),m(so,"rel","nofollow"),m(_n,"href","/docs/transformers/main/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),m(ae,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(R,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(x,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(De,"id","transformers.FNetModel"),m(De,"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"),m(De,"href","#transformers.FNetModel"),m(be,"class","relative group"),m(mo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(mo,"rel","nofollow"),m(fo,"href","https://arxiv.org/abs/2105.03824"),m(fo,"rel","nofollow"),m(wn,"href","/docs/transformers/main/en/model_doc/fnet#transformers.FNetModel"),m(G,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(Oe,"id","transformers.FNetForPreTraining"),m(Oe,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),m(Oe,"href","#transformers.FNetForPreTraining"),m(we,"class","relative group"),m(yo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(yo,"rel","nofollow"),m(Tn,"href","/docs/transformers/main/en/model_doc/fnet#transformers.FNetForPreTraining"),m(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(tt,"id","transformers.FNetForMaskedLM"),m(tt,"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"),m(tt,"href","#transformers.FNetForMaskedLM"),m(Me,"class","relative group"),m(Mo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Mo,"rel","nofollow"),m(kn,"href","/docs/transformers/main/en/model_doc/fnet#transformers.FNetForMaskedLM"),m(V,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(oe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(st,"id","transformers.FNetForNextSentencePrediction"),m(st,"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"),m(st,"href","#transformers.FNetForNextSentencePrediction"),m($e,"class","relative group"),m(No,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(No,"rel","nofollow"),m(Mn,"href","/docs/transformers/main/en/model_doc/fnet#transformers.FNetForNextSentencePrediction"),m(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(ne,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(it,"id","transformers.FNetForSequenceClassification"),m(it,"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"),m(it,"href","#transformers.FNetForSequenceClassification"),m(je,"class","relative group"),m(Eo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Eo,"rel","nofollow"),m(vn,"href","/docs/transformers/main/en/model_doc/fnet#transformers.FNetForSequenceClassification"),m(z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(S,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(pt,"id","transformers.FNetForMultipleChoice"),m(pt,"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"),m(pt,"href","#transformers.FNetForMultipleChoice"),m(ze,"class","relative group"),m(qo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(qo,"rel","nofollow"),m(Fn,"href","/docs/transformers/main/en/model_doc/fnet#transformers.FNetForMultipleChoice"),m(L,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(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(ft,"id","transformers.FNetForTokenClassification"),m(ft,"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"),m(ft,"href","#transformers.FNetForTokenClassification"),m(Ie,"class","relative group"),m(Po,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Po,"rel","nofollow"),m($n,"href","/docs/transformers/main/en/model_doc/fnet#transformers.FNetForTokenClassification"),m(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(_t,"id","transformers.FNetForQuestionAnswering"),m(_t,"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"),m(_t,"href","#transformers.FNetForQuestionAnswering"),m(Ce,"class","relative group"),m(Qo,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),m(Qo,"rel","nofollow"),m(Nn,"href","/docs/transformers/main/en/model_doc/fnet#transformers.FNetForQuestionAnswering"),m(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),m(B,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8")},m(t,g){e(document.head,c),b(t,y,g),b(t,u,g),e(u,p),e(p,_),k(n,_,null),e(u,d),e(u,N),e(N,ga),b(t,_r,g),b(t,de,g),e(de,We),e(We,Qn),k(Wt,Qn,null),e(de,_a),e(de,Ln),e(Ln,ba),b(t,br,g),b(t,Ae,g),e(Ae,ya),e(Ae,At),e(At,wa),e(Ae,Ta),b(t,yr,g),b(t,Ko,g),e(Ko,Dn),e(Dn,ka),b(t,wr,g),b(t,en,g),e(en,Ma),b(t,Tr,g),b(t,tn,g),e(tn,Hn),e(Hn,va),b(t,kr,g),b(t,se,g),e(se,Fa),e(se,Bt),e(Bt,$a),e(se,Na),e(se,Pt),e(Pt,Ja),e(se,ja),b(t,Mr,g),b(t,pe,g),e(pe,Be),e(Be,Yn),k(Rt,Yn,null),e(pe,Ua),e(pe,On),e(On,za),b(t,vr,g),b(t,U,g),e(U,Kn),e(Kn,on),e(on,Ea),e(U,Ia),e(U,es),e(es,nn),e(nn,xa),e(U,Ca),e(U,ts),e(ts,sn),e(sn,Za),e(U,qa),e(U,os),e(os,rn),e(rn,Sa),e(U,Wa),e(U,ns),e(ns,an),e(an,Aa),b(t,Fr,g),b(t,me,g),e(me,Pe),e(Pe,ss),k(Gt,ss,null),e(me,Ba),e(me,rs),e(rs,Pa),b(t,$r,g),b(t,I,g),k(Xt,I,null),e(I,Ra),e(I,he),e(he,Ga),e(he,ln),e(ln,Xa),e(he,Va),e(he,Vt),e(Vt,Qa),e(he,La),e(I,Da),e(I,fe),e(fe,Ha),e(fe,cn),e(cn,Ya),e(fe,Oa),e(fe,dn),e(dn,Ka),e(fe,ei),e(I,ti),k(Re,I,null),b(t,Nr,g),b(t,ue,g),e(ue,Ge),e(Ge,as),k(Qt,as,null),e(ue,oi),e(ue,is),e(is,ni),b(t,Jr,g),b(t,j,g),k(Lt,j,null),e(j,si),e(j,te),e(te,ri),e(te,pn),e(pn,ai),e(te,ii),e(te,Dt),e(Dt,li),e(te,ci),e(te,mn),e(mn,di),e(te,pi),e(j,mi),e(j,re),k(Ht,re,null),e(re,hi),e(re,ls),e(ls,fi),e(re,ui),e(re,Yt),e(Yt,hn),e(hn,gi),e(hn,cs),e(cs,_i),e(Yt,bi),e(Yt,fn),e(fn,yi),e(fn,ds),e(ds,wi),e(j,Ti),e(j,Xe),k(Ot,Xe,null),e(Xe,ki),e(Xe,Kt),e(Kt,Mi),e(Kt,ps),e(ps,vi),e(Kt,Fi),e(j,$i),e(j,P),k(eo,P,null),e(P,Ni),e(P,ms),e(ms,Ji),e(P,ji),k(Ve,P,null),e(P,Ui),e(P,ge),e(ge,zi),e(ge,hs),e(hs,Ei),e(ge,Ii),e(ge,fs),e(fs,xi),e(ge,Ci),e(j,Zi),e(j,un),k(to,un,null),b(t,jr,g),b(t,_e,g),e(_e,Qe),e(Qe,us),k(oo,us,null),e(_e,qi),e(_e,gs),e(gs,Si),b(t,Ur,g),b(t,x,g),k(no,x,null),e(x,Wi),e(x,C),e(C,Ai),e(C,_s),e(_s,Bi),e(C,Pi),e(C,gn),e(gn,Ri),e(C,Gi),e(C,so),e(so,Xi),e(C,Vi),e(C,_n),e(_n,Qi),e(C,Li),e(x,Di),e(x,ae),k(ro,ae,null),e(ae,Hi),e(ae,bs),e(bs,Yi),e(ae,Oi),e(ae,ao),e(ao,bn),e(bn,Ki),e(bn,ys),e(ys,el),e(ao,tl),e(ao,yn),e(yn,ol),e(yn,ws),e(ws,nl),e(x,sl),e(x,R),k(io,R,null),e(R,rl),e(R,Ts),e(Ts,al),e(R,il),k(Le,R,null),e(R,ll),e(R,ks),e(ks,cl),b(t,zr,g),b(t,be,g),e(be,De),e(De,Ms),k(lo,Ms,null),e(be,dl),e(be,vs),e(vs,pl),b(t,Er,g),b(t,Z,g),k(co,Z,null),e(Z,ml),e(Z,po),e(po,hl),e(po,mo),e(mo,fl),e(po,ul),e(Z,gl),e(Z,ho),e(ho,_l),e(ho,fo),e(fo,bl),e(ho,yl),e(Z,wl),e(Z,G),k(uo,G,null),e(G,Tl),e(G,ye),e(ye,kl),e(ye,wn),e(wn,Ml),e(ye,vl),e(ye,Fs),e(Fs,Fl),e(ye,$l),e(G,Nl),k(He,G,null),e(G,Jl),k(Ye,G,null),b(t,Ir,g),b(t,we,g),e(we,Oe),e(Oe,$s),k(go,$s,null),e(we,jl),e(we,Ns),e(Ns,Ul),b(t,xr,g),b(t,q,g),k(_o,q,null),e(q,zl),e(q,Te),e(Te,El),e(Te,Js),e(Js,Il),e(Te,xl),e(Te,js),e(js,Cl),e(Te,Zl),e(q,ql),e(q,bo),e(bo,Sl),e(bo,yo),e(yo,Wl),e(bo,Al),e(q,Bl),e(q,X),k(wo,X,null),e(X,Pl),e(X,ke),e(ke,Rl),e(ke,Tn),e(Tn,Gl),e(ke,Xl),e(ke,Us),e(Us,Vl),e(ke,Ql),e(X,Ll),k(Ke,X,null),e(X,Dl),k(et,X,null),b(t,Cr,g),b(t,Me,g),e(Me,tt),e(tt,zs),k(To,zs,null),e(Me,Hl),e(Me,Es),e(Es,Yl),b(t,Zr,g),b(t,oe,g),k(ko,oe,null),e(oe,Ol),e(oe,ve),e(ve,Kl),e(ve,Is),e(Is,ec),e(ve,tc),e(ve,Mo),e(Mo,oc),e(ve,nc),e(oe,sc),e(oe,V),k(vo,V,null),e(V,rc),e(V,Fe),e(Fe,ac),e(Fe,kn),e(kn,ic),e(Fe,lc),e(Fe,xs),e(xs,cc),e(Fe,dc),e(V,pc),k(ot,V,null),e(V,mc),k(nt,V,null),b(t,qr,g),b(t,$e,g),e($e,st),e(st,Cs),k(Fo,Cs,null),e($e,hc),e($e,Zs),e(Zs,fc),b(t,Sr,g),b(t,ne,g),k($o,ne,null),e(ne,uc),e(ne,Ne),e(Ne,gc),e(Ne,qs),e(qs,_c),e(Ne,bc),e(Ne,No),e(No,yc),e(Ne,wc),e(ne,Tc),e(ne,Q),k(Jo,Q,null),e(Q,kc),e(Q,Je),e(Je,Mc),e(Je,Mn),e(Mn,vc),e(Je,Fc),e(Je,Ss),e(Ss,$c),e(Je,Nc),e(Q,Jc),k(rt,Q,null),e(Q,jc),k(at,Q,null),b(t,Wr,g),b(t,je,g),e(je,it),e(it,Ws),k(jo,Ws,null),e(je,Uc),e(je,As),e(As,zc),b(t,Ar,g),b(t,S,g),k(Uo,S,null),e(S,Ec),e(S,Bs),e(Bs,Ic),e(S,xc),e(S,zo),e(zo,Cc),e(zo,Eo),e(Eo,Zc),e(zo,qc),e(S,Sc),e(S,z),k(Io,z,null),e(z,Wc),e(z,Ue),e(Ue,Ac),e(Ue,vn),e(vn,Bc),e(Ue,Pc),e(Ue,Ps),e(Ps,Rc),e(Ue,Gc),e(z,Xc),k(lt,z,null),e(z,Vc),k(ct,z,null),e(z,Qc),k(dt,z,null),b(t,Br,g),b(t,ze,g),e(ze,pt),e(pt,Rs),k(xo,Rs,null),e(ze,Lc),e(ze,Gs),e(Gs,Dc),b(t,Pr,g),b(t,W,g),k(Co,W,null),e(W,Hc),e(W,Xs),e(Xs,Yc),e(W,Oc),e(W,Zo),e(Zo,Kc),e(Zo,qo),e(qo,ed),e(Zo,td),e(W,od),e(W,L),k(So,L,null),e(L,nd),e(L,Ee),e(Ee,sd),e(Ee,Fn),e(Fn,rd),e(Ee,ad),e(Ee,Vs),e(Vs,id),e(Ee,ld),e(L,cd),k(mt,L,null),e(L,dd),k(ht,L,null),b(t,Rr,g),b(t,Ie,g),e(Ie,ft),e(ft,Qs),k(Wo,Qs,null),e(Ie,pd),e(Ie,Ls),e(Ls,md),b(t,Gr,g),b(t,A,g),k(Ao,A,null),e(A,hd),e(A,Ds),e(Ds,fd),e(A,ud),e(A,Bo),e(Bo,gd),e(Bo,Po),e(Po,_d),e(Bo,bd),e(A,yd),e(A,D),k(Ro,D,null),e(D,wd),e(D,xe),e(xe,Td),e(xe,$n),e($n,kd),e(xe,Md),e(xe,Hs),e(Hs,vd),e(xe,Fd),e(D,$d),k(ut,D,null),e(D,Nd),k(gt,D,null),b(t,Xr,g),b(t,Ce,g),e(Ce,_t),e(_t,Ys),k(Go,Ys,null),e(Ce,Jd),e(Ce,Os),e(Os,jd),b(t,Vr,g),b(t,B,g),k(Xo,B,null),e(B,Ud),e(B,Ze),e(Ze,zd),e(Ze,Ks),e(Ks,Ed),e(Ze,Id),e(Ze,er),e(er,xd),e(Ze,Cd),e(B,Zd),e(B,Vo),e(Vo,qd),e(Vo,Qo),e(Qo,Sd),e(Vo,Wd),e(B,Ad),e(B,H),k(Lo,H,null),e(H,Bd),e(H,qe),e(qe,Pd),e(qe,Nn),e(Nn,Rd),e(qe,Gd),e(qe,tr),e(tr,Xd),e(qe,Vd),e(H,Qd),k(bt,H,null),e(H,Ld),k(yt,H,null),Qr=!0},p(t,[g]){const Do={};g&2&&(Do.$$scope={dirty:g,ctx:t}),Re.$set(Do);const or={};g&2&&(or.$$scope={dirty:g,ctx:t}),Ve.$set(or);const nr={};g&2&&(nr.$$scope={dirty:g,ctx:t}),Le.$set(nr);const sr={};g&2&&(sr.$$scope={dirty:g,ctx:t}),He.$set(sr);const Ho={};g&2&&(Ho.$$scope={dirty:g,ctx:t}),Ye.$set(Ho);const rr={};g&2&&(rr.$$scope={dirty:g,ctx:t}),Ke.$set(rr);const ar={};g&2&&(ar.$$scope={dirty:g,ctx:t}),et.$set(ar);const ir={};g&2&&(ir.$$scope={dirty:g,ctx:t}),ot.$set(ir);const Yo={};g&2&&(Yo.$$scope={dirty:g,ctx:t}),nt.$set(Yo);const lr={};g&2&&(lr.$$scope={dirty:g,ctx:t}),rt.$set(lr);const cr={};g&2&&(cr.$$scope={dirty:g,ctx:t}),at.$set(cr);const dr={};g&2&&(dr.$$scope={dirty:g,ctx:t}),lt.$set(dr);const pr={};g&2&&(pr.$$scope={dirty:g,ctx:t}),ct.$set(pr);const mr={};g&2&&(mr.$$scope={dirty:g,ctx:t}),dt.$set(mr);const hr={};g&2&&(hr.$$scope={dirty:g,ctx:t}),mt.$set(hr);const Se={};g&2&&(Se.$$scope={dirty:g,ctx:t}),ht.$set(Se);const fr={};g&2&&(fr.$$scope={dirty:g,ctx:t}),ut.$set(fr);const ur={};g&2&&(ur.$$scope={dirty:g,ctx:t}),gt.$set(ur);const Oo={};g&2&&(Oo.$$scope={dirty:g,ctx:t}),bt.$set(Oo);const gr={};g&2&&(gr.$$scope={dirty:g,ctx:t}),yt.$set(gr)},i(t){Qr||(M(n.$$.fragment,t),M(Wt.$$.fragment,t),M(Rt.$$.fragment,t),M(Gt.$$.fragment,t),M(Xt.$$.fragment,t),M(Re.$$.fragment,t),M(Qt.$$.fragment,t),M(Lt.$$.fragment,t),M(Ht.$$.fragment,t),M(Ot.$$.fragment,t),M(eo.$$.fragment,t),M(Ve.$$.fragment,t),M(to.$$.fragment,t),M(oo.$$.fragment,t),M(no.$$.fragment,t),M(ro.$$.fragment,t),M(io.$$.fragment,t),M(Le.$$.fragment,t),M(lo.$$.fragment,t),M(co.$$.fragment,t),M(uo.$$.fragment,t),M(He.$$.fragment,t),M(Ye.$$.fragment,t),M(go.$$.fragment,t),M(_o.$$.fragment,t),M(wo.$$.fragment,t),M(Ke.$$.fragment,t),M(et.$$.fragment,t),M(To.$$.fragment,t),M(ko.$$.fragment,t),M(vo.$$.fragment,t),M(ot.$$.fragment,t),M(nt.$$.fragment,t),M(Fo.$$.fragment,t),M($o.$$.fragment,t),M(Jo.$$.fragment,t),M(rt.$$.fragment,t),M(at.$$.fragment,t),M(jo.$$.fragment,t),M(Uo.$$.fragment,t),M(Io.$$.fragment,t),M(lt.$$.fragment,t),M(ct.$$.fragment,t),M(dt.$$.fragment,t),M(xo.$$.fragment,t),M(Co.$$.fragment,t),M(So.$$.fragment,t),M(mt.$$.fragment,t),M(ht.$$.fragment,t),M(Wo.$$.fragment,t),M(Ao.$$.fragment,t),M(Ro.$$.fragment,t),M(ut.$$.fragment,t),M(gt.$$.fragment,t),M(Go.$$.fragment,t),M(Xo.$$.fragment,t),M(Lo.$$.fragment,t),M(bt.$$.fragment,t),M(yt.$$.fragment,t),Qr=!0)},o(t){v(n.$$.fragment,t),v(Wt.$$.fragment,t),v(Rt.$$.fragment,t),v(Gt.$$.fragment,t),v(Xt.$$.fragment,t),v(Re.$$.fragment,t),v(Qt.$$.fragment,t),v(Lt.$$.fragment,t),v(Ht.$$.fragment,t),v(Ot.$$.fragment,t),v(eo.$$.fragment,t),v(Ve.$$.fragment,t),v(to.$$.fragment,t),v(oo.$$.fragment,t),v(no.$$.fragment,t),v(ro.$$.fragment,t),v(io.$$.fragment,t),v(Le.$$.fragment,t),v(lo.$$.fragment,t),v(co.$$.fragment,t),v(uo.$$.fragment,t),v(He.$$.fragment,t),v(Ye.$$.fragment,t),v(go.$$.fragment,t),v(_o.$$.fragment,t),v(wo.$$.fragment,t),v(Ke.$$.fragment,t),v(et.$$.fragment,t),v(To.$$.fragment,t),v(ko.$$.fragment,t),v(vo.$$.fragment,t),v(ot.$$.fragment,t),v(nt.$$.fragment,t),v(Fo.$$.fragment,t),v($o.$$.fragment,t),v(Jo.$$.fragment,t),v(rt.$$.fragment,t),v(at.$$.fragment,t),v(jo.$$.fragment,t),v(Uo.$$.fragment,t),v(Io.$$.fragment,t),v(lt.$$.fragment,t),v(ct.$$.fragment,t),v(dt.$$.fragment,t),v(xo.$$.fragment,t),v(Co.$$.fragment,t),v(So.$$.fragment,t),v(mt.$$.fragment,t),v(ht.$$.fragment,t),v(Wo.$$.fragment,t),v(Ao.$$.fragment,t),v(Ro.$$.fragment,t),v(ut.$$.fragment,t),v(gt.$$.fragment,t),v(Go.$$.fragment,t),v(Xo.$$.fragment,t),v(Lo.$$.fragment,t),v(bt.$$.fragment,t),v(yt.$$.fragment,t),Qr=!1},d(t){o(c),t&&o(y),t&&o(u),F(n),t&&o(_r),t&&o(de),F(Wt),t&&o(br),t&&o(Ae),t&&o(yr),t&&o(Ko),t&&o(wr),t&&o(en),t&&o(Tr),t&&o(tn),t&&o(kr),t&&o(se),t&&o(Mr),t&&o(pe),F(Rt),t&&o(vr),t&&o(U),t&&o(Fr),t&&o(me),F(Gt),t&&o($r),t&&o(I),F(Xt),F(Re),t&&o(Nr),t&&o(ue),F(Qt),t&&o(Jr),t&&o(j),F(Lt),F(Ht),F(Ot),F(eo),F(Ve),F(to),t&&o(jr),t&&o(_e),F(oo),t&&o(Ur),t&&o(x),F(no),F(ro),F(io),F(Le),t&&o(zr),t&&o(be),F(lo),t&&o(Er),t&&o(Z),F(co),F(uo),F(He),F(Ye),t&&o(Ir),t&&o(we),F(go),t&&o(xr),t&&o(q),F(_o),F(wo),F(Ke),F(et),t&&o(Cr),t&&o(Me),F(To),t&&o(Zr),t&&o(oe),F(ko),F(vo),F(ot),F(nt),t&&o(qr),t&&o($e),F(Fo),t&&o(Sr),t&&o(ne),F($o),F(Jo),F(rt),F(at),t&&o(Wr),t&&o(je),F(jo),t&&o(Ar),t&&o(S),F(Uo),F(Io),F(lt),F(ct),F(dt),t&&o(Br),t&&o(ze),F(xo),t&&o(Pr),t&&o(W),F(Co),F(So),F(mt),F(ht),t&&o(Rr),t&&o(Ie),F(Wo),t&&o(Gr),t&&o(A),F(Ao),F(Ro),F(ut),F(gt),t&&o(Xr),t&&o(Ce),F(Go),t&&o(Vr),t&&o(B),F(Xo),F(Lo),F(bt),F(yt)}}}const wh={local:"fnet",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.FNetConfig",title:"FNetConfig"},{local:"transformers.FNetTokenizer",title:"FNetTokenizer"},{local:"transformers.FNetTokenizerFast",title:"FNetTokenizerFast"},{local:"transformers.FNetModel",title:"FNetModel"},{local:"transformers.FNetForPreTraining",title:"FNetForPreTraining"},{local:"transformers.FNetForMaskedLM",title:"FNetForMaskedLM"},{local:"transformers.FNetForNextSentencePrediction",title:"FNetForNextSentencePrediction"},{local:"transformers.FNetForSequenceClassification",title:"FNetForSequenceClassification"},{local:"transformers.FNetForMultipleChoice",title:"FNetForMultipleChoice"},{local:"transformers.FNetForTokenClassification",title:"FNetForTokenClassification"},{local:"transformers.FNetForQuestionAnswering",title:"FNetForQuestionAnswering"}],title:"FNet"};function Th($){return Om(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Jh extends Lm{constructor(c){super();Dm(this,c,Th,yh,Hm,{})}}export{Jh as default,wh as metadata};
