import{S as V1,i as X1,s as Q1,e as n,k as p,w as v,t as r,M as O1,c as s,d as t,m as h,a,x as k,h as i,b as c,G as e,g as y,y as B,q as T,o as w,B as M,v as D1,L as z}from"../../chunks/vendor-hf-doc-builder.js";import{T as V}from"../../chunks/Tip-hf-doc-builder.js";import{D as x}from"../../chunks/Docstring-hf-doc-builder.js";import{C as J}from"../../chunks/CodeBlock-hf-doc-builder.js";import{I as E}from"../../chunks/IconCopyLink-hf-doc-builder.js";import{E as j}from"../../chunks/ExampleCodeBlock-hf-doc-builder.js";function H1($){let d,b,u,f,_;return f=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEJpZ0JpcmRDb25maWclMkMlMjBCaWdCaXJkTW9kZWwlMEElMEElMjMlMjBJbml0aWFsaXppbmclMjBhJTIwQmlnQmlyZCUyMGdvb2dsZSUyRmJpZ2JpcmQtcm9iZXJ0YS1iYXNlJTIwc3R5bGUlMjBjb25maWd1cmF0aW9uJTBBY29uZmlndXJhdGlvbiUyMCUzRCUyMEJpZ0JpcmRDb25maWcoKSUwQSUwQSUyMyUyMEluaXRpYWxpemluZyUyMGElMjBtb2RlbCUyMCh3aXRoJTIwcmFuZG9tJTIwd2VpZ2h0cyklMjBmcm9tJTIwdGhlJTIwZ29vZ2xlJTJGYmlnYmlyZC1yb2JlcnRhLWJhc2UlMjBzdHlsZSUyMGNvbmZpZ3VyYXRpb24lMEFtb2RlbCUyMCUzRCUyMEJpZ0JpcmRNb2RlbChjb25maWd1cmF0aW9uKSUwQSUwQSUyMyUyMEFjY2Vzc2luZyUyMHRoZSUyMG1vZGVsJTIwY29uZmlndXJhdGlvbiUwQWNvbmZpZ3VyYXRpb24lMjAlM0QlMjBtb2RlbC5jb25maWc=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> BigBirdConfig, BigBirdModel

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a BigBird google/bigbird-roberta-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = BigBirdConfig()

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Initializing a model (with random weights) from the google/bigbird-roberta-base style configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BigBirdModel(configuration)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># Accessing the model configuration</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>configuration = model.config`}}),{c(){d=n("p"),b=r("Example:"),u=p(),v(f.$$.fragment)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Example:"),m.forEach(t),u=h(l),k(f.$$.fragment,l)},m(l,m){y(l,d,m),e(d,b),y(l,u,m),B(f,l,m),_=!0},p:z,i(l){_||(T(f.$$.fragment,l),_=!0)},o(l){w(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),M(f,l)}}}function Y1($){let d,b,u,f,_;return f=new J({props:{code:"MCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAwJTIwMCUyMDAlMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMjAxJTIwMSUyMDElMEElN0MlMjBmaXJzdCUyMHNlcXVlbmNlJTIwJTIwJTIwJTIwJTdDJTIwc2Vjb25kJTIwc2VxdWVuY2UlMjAlN0M=",highlighted:`0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 0 </span>0<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1<span class="hljs-number"> 1 </span>1 1
| first sequence    | second sequence |`}}),{c(){d=n("p"),b=r("sequence pair mask has the following format:"),u=p(),v(f.$$.fragment)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"sequence pair mask has the following format:"),m.forEach(t),u=h(l),k(f.$$.fragment,l)},m(l,m){y(l,d,m),e(d,b),y(l,u,m),B(f,l,m),_=!0},p:z,i(l){_||(T(f.$$.fragment,l),_=!0)},o(l){w(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),M(f,l)}}}function K1($){let d,b,u,f,_;return{c(){d=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var F=a(u);f=i(F,"Module"),F.forEach(t),_=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){y(l,d,m),e(d,b),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function e0($){let d,b,u,f,_;return f=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCaWdCaXJkTW9kZWwlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmJpZ2JpcmQtcm9iZXJ0YS1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmlnQmlyZE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZiaWdiaXJkLXJvYmVydGEtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWxhc3RfaGlkZGVuX3N0YXRlcyUyMCUzRCUyMG91dHB1dHMubGFzdF9oaWRkZW5fc3RhdGU=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BigBirdModel
<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/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BigBirdModel.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-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(){d=n("p"),b=r("Example:"),u=p(),v(f.$$.fragment)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Example:"),m.forEach(t),u=h(l),k(f.$$.fragment,l)},m(l,m){y(l,d,m),e(d,b),y(l,u,m),B(f,l,m),_=!0},p:z,i(l){_||(T(f.$$.fragment,l),_=!0)},o(l){w(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),M(f,l)}}}function t0($){let d,b,u,f,_;return{c(){d=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var F=a(u);f=i(F,"Module"),F.forEach(t),_=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){y(l,d,m),e(d,b),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function o0($){let d,b,u,f,_;return f=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCaWdCaXJkRm9yUHJlVHJhaW5pbmclMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmJpZ2JpcmQtcm9iZXJ0YS1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmlnQmlyZEZvclByZVRyYWluaW5nLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZiaWdiaXJkLXJvYmVydGEtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQXByZWRpY3Rpb25fbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5wcmVkaWN0aW9uX2xvZ2l0cyUwQXNlcV9yZWxhdGlvbnNoaXBfbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5zZXFfcmVsYXRpb25zaGlwX2xvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BigBirdForPreTraining
<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/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BigBirdForPreTraining.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-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(){d=n("p"),b=r("Example:"),u=p(),v(f.$$.fragment)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Example:"),m.forEach(t),u=h(l),k(f.$$.fragment,l)},m(l,m){y(l,d,m),e(d,b),y(l,u,m),B(f,l,m),_=!0},p:z,i(l){_||(T(f.$$.fragment,l),_=!0)},o(l){w(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),M(f,l)}}}function n0($){let d,b,u,f,_;return{c(){d=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var F=a(u);f=i(F,"Module"),F.forEach(t),_=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){y(l,d,m),e(d,b),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function s0($){let d,b,u,f,_;return f=new J({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEJpZ0JpcmRGb3JDYXVzYWxMTSUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmJpZ2JpcmQtcm9iZXJ0YS1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmlnQmlyZEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZiaWdiaXJkLXJvYmVydGEtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEaW5wdXRzJTVCJTIyaW5wdXRfaWRzJTIyJTVEKSUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3MlMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",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, BigBirdForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BigBirdForCausalLM.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-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, labels=inputs[<span class="hljs-string">&quot;input_ids&quot;</span>])
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = outputs.loss
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=n("p"),b=r("Example:"),u=p(),v(f.$$.fragment)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Example:"),m.forEach(t),u=h(l),k(f.$$.fragment,l)},m(l,m){y(l,d,m),e(d,b),y(l,u,m),B(f,l,m),_=!0},p:z,i(l){_||(T(f.$$.fragment,l),_=!0)},o(l){w(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),M(f,l)}}}function a0($){let d,b,u,f,_;return{c(){d=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var F=a(u);f=i(F,"Module"),F.forEach(t),_=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){y(l,d,m),e(d,b),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function r0($){let d,b,u,f,_;return f=new J({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEJpZ0JpcmRGb3JNYXNrZWRMTSUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmJpZ2JpcmQtcm9iZXJ0YS1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmlnQmlyZEZvck1hc2tlZExNLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZiaWdiaXJkLXJvYmVydGEtYmFzZSUyMiklMEFzcXVhZF9kcyUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJzcXVhZF92MiUyMiUyQyUyMHNwbGl0JTNEJTIydHJhaW4lMjIpJTBBJTIzJTIwc2VsZWN0JTIwcmFuZG9tJTIwbG9uZyUyMGFydGljbGUlMEFMT05HX0FSVElDTEVfVEFSR0VUJTIwJTNEJTIwc3F1YWRfZHMlNUI4MTUxNCU1RCU1QiUyMmNvbnRleHQlMjIlNUQlMEElMjMlMjBzZWxlY3QlMjByYW5kb20lMjBzZW50ZW5jZSUwQUxPTkdfQVJUSUNMRV9UQVJHRVQlNUIzMzIlM0EzOTglNUQlMEElMEElMjMlMjBhZGQlMjBtYXNrX3Rva2VuJTBBTE9OR19BUlRJQ0xFX1RPX01BU0slMjAlM0QlMjBMT05HX0FSVElDTEVfVEFSR0VULnJlcGxhY2UoJTIybWF4aW11bSUyMiUyQyUyMCUyMiU1Qk1BU0slNUQlMjIpJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKExPTkdfQVJUSUNMRV9UT19NQVNLJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMjMlMjBsb25nJTIwYXJ0aWNsZSUyMGlucHV0JTBBbGlzdChpbnB1dHMlNUIlMjJpbnB1dF9pZHMlMjIlNUQuc2hhcGUpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMjMlMjByZXRyaWV2ZSUyMGluZGV4JTIwb2YlMjAlNUJNQVNLJTVEJTBBbWFza190b2tlbl9pbmRleCUyMCUzRCUyMChpbnB1dHMuaW5wdXRfaWRzJTIwJTNEJTNEJTIwdG9rZW5pemVyLm1hc2tfdG9rZW5faWQpJTVCMCU1RC5ub256ZXJvKGFzX3R1cGxlJTNEVHJ1ZSklNUIwJTVEJTBBcHJlZGljdGVkX3Rva2VuX2lkJTIwJTNEJTIwbG9naXRzJTVCMCUyQyUyMG1hc2tfdG9rZW5faW5kZXglNUQuYXJnbWF4KGF4aXMlM0QtMSklMEF0b2tlbml6ZXIuZGVjb2RlKHByZWRpY3RlZF90b2tlbl9pZCk=",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, BigBirdForMaskedLM
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BigBirdForMaskedLM.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>squad_ds = load_dataset(<span class="hljs-string">&quot;squad_v2&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># select random long article</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>LONG_ARTICLE_TARGET = squad_ds[<span class="hljs-number">81514</span>][<span class="hljs-string">&quot;context&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># select random sentence</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>LONG_ARTICLE_TARGET[<span class="hljs-number">332</span>:<span class="hljs-number">398</span>]
<span class="hljs-string">&#x27;the highest values are very close to the theoretical maximum value&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># add mask_token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>LONG_ARTICLE_TO_MASK = LONG_ARTICLE_TARGET.replace(<span class="hljs-string">&quot;maximum&quot;</span>, <span class="hljs-string">&quot;[MASK]&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(LONG_ARTICLE_TO_MASK, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># long article input</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(inputs[<span class="hljs-string">&quot;input_ids&quot;</span>].shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">919</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>tokenizer.decode(predicted_token_id)
<span class="hljs-string">&#x27;maximum&#x27;</span>`}}),{c(){d=n("p"),b=r("Example:"),u=p(),v(f.$$.fragment)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Example:"),m.forEach(t),u=h(l),k(f.$$.fragment,l)},m(l,m){y(l,d,m),e(d,b),y(l,u,m),B(f,l,m),_=!0},p:z,i(l){_||(T(f.$$.fragment,l),_=!0)},o(l){w(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),M(f,l)}}}function i0($){let d,b;return d=new J({props:{code:"bGFiZWxzJTIwJTNEJTIwdG9rZW5pemVyKExPTkdfQVJUSUNMRV9UQVJHRVQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyKSU1QiUyMmlucHV0X2lkcyUyMiU1RCUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLndoZXJlKGlucHV0cy5pbnB1dF9pZHMlMjAlM0QlM0QlMjB0b2tlbml6ZXIubWFza190b2tlbl9pZCUyQyUyMGxhYmVscyUyQyUyMC0xMDApJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzJTJDJTIwbGFiZWxzJTNEbGFiZWxzKSUwQXJvdW5kKG91dHB1dHMubG9zcy5pdGVtKCklMkMlMjAyKQ==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>labels = tokenizer(LONG_ARTICLE_TARGET, 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>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)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(outputs.loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">1.99</span>`}}),{c(){v(d.$$.fragment)},l(u){k(d.$$.fragment,u)},m(u,f){B(d,u,f),b=!0},p:z,i(u){b||(T(d.$$.fragment,u),b=!0)},o(u){w(d.$$.fragment,u),b=!1},d(u){M(d,u)}}}function l0($){let d,b,u,f,_;return{c(){d=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var F=a(u);f=i(F,"Module"),F.forEach(t),_=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){y(l,d,m),e(d,b),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function d0($){let d,b,u,f,_;return f=new J({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEJpZ0JpcmRGb3JTZXF1ZW5jZUNsYXNzaWZpY2F0aW9uJTBBZnJvbSUyMGRhdGFzZXRzJTIwaW1wb3J0JTIwbG9hZF9kYXRhc2V0JTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIybC15b2hhaSUyRmJpZ2JpcmQtcm9iZXJ0YS1iYXNlLW1ubGklMjIpJTBBbW9kZWwlMjAlM0QlMjBCaWdCaXJkRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIybC15b2hhaSUyRmJpZ2JpcmQtcm9iZXJ0YS1iYXNlLW1ubGklMjIpJTBBc3F1YWRfZHMlMjAlM0QlMjBsb2FkX2RhdGFzZXQoJTIyc3F1YWRfdjIlMjIlMkMlMjBzcGxpdCUzRCUyMnRyYWluJTIyKSUwQUxPTkdfQVJUSUNMRSUyMCUzRCUyMHNxdWFkX2RzJTVCODE1MTQlNUQlNUIlMjJjb250ZXh0JTIyJTVEJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKExPTkdfQVJUSUNMRSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIpJTBBJTIzJTIwbG9uZyUyMGlucHV0JTIwYXJ0aWNsZSUwQWxpc3QoaW5wdXRzJTVCJTIyaW5wdXRfaWRzJTIyJTVELnNoYXBlKSUwQSUwQXdpdGglMjB0b3JjaC5ub19ncmFkKCklM0ElMEElMjAlMjAlMjAlMjBsb2dpdHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cykubG9naXRzJTBBcHJlZGljdGVkX2NsYXNzX2lkJTIwJTNEJTIwbG9naXRzLmFyZ21heCgpLml0ZW0oKSUwQW1vZGVsLmNvbmZpZy5pZDJsYWJlbCU1QnByZWRpY3RlZF9jbGFzc19pZCU1RA==",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, BigBirdForSequenceClassification
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;l-yohai/bigbird-roberta-base-mnli&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BigBirdForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;l-yohai/bigbird-roberta-base-mnli&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>squad_ds = load_dataset(<span class="hljs-string">&quot;squad_v2&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>LONG_ARTICLE = squad_ds[<span class="hljs-number">81514</span>][<span class="hljs-string">&quot;context&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(LONG_ARTICLE, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># long input article</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(inputs[<span class="hljs-string">&quot;input_ids&quot;</span>].shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">919</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>model.config.id2label[predicted_class_id]
<span class="hljs-string">&#x27;LABEL_0&#x27;</span>`}}),{c(){d=n("p"),b=r("Example:"),u=p(),v(f.$$.fragment)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Example:"),m.forEach(t),u=h(l),k(f.$$.fragment,l)},m(l,m){y(l,d,m),e(d,b),y(l,u,m),B(f,l,m),_=!0},p:z,i(l){_||(T(f.$$.fragment,l),_=!0)},o(l){w(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),M(f,l)}}}function c0($){let d,b;return d=new J({props:{code:"bnVtX2xhYmVscyUyMCUzRCUyMGxlbihtb2RlbC5jb25maWcuaWQybGFiZWwpJTBBbW9kZWwlMjAlM0QlMjBCaWdCaXJkRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTBBJTIwJTIwJTIwJTIwJTIybC15b2hhaSUyRmJpZ2JpcmQtcm9iZXJ0YS1iYXNlLW1ubGklMjIlMkMlMjBudW1fbGFiZWxzJTNEbnVtX2xhYmVscyUwQSklMEFsYWJlbHMlMjAlM0QlMjB0b3JjaC50ZW5zb3IoMSklMEFsb3NzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpLmxvc3MlMEFyb3VuZChsb3NzLml0ZW0oKSUyQyUyMDIp",highlighted:`<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 = BigBirdForSequenceClassification.from_pretrained(
<span class="hljs-meta">... </span>    <span class="hljs-string">&quot;l-yohai/bigbird-roberta-base-mnli&quot;</span>, num_labels=num_labels
<span class="hljs-meta">... </span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>labels = torch.tensor(<span class="hljs-number">1</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>loss = model(**inputs, labels=labels).loss
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">round</span>(loss.item(), <span class="hljs-number">2</span>)
<span class="hljs-number">1.13</span>`}}),{c(){v(d.$$.fragment)},l(u){k(d.$$.fragment,u)},m(u,f){B(d,u,f),b=!0},p:z,i(u){b||(T(d.$$.fragment,u),b=!0)},o(u){w(d.$$.fragment,u),b=!1},d(u){M(d,u)}}}function p0($){let d,b,u,f,_;return{c(){d=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var F=a(u);f=i(F,"Module"),F.forEach(t),_=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){y(l,d,m),e(d,b),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function h0($){let d,b,u,f,_;return f=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCaWdCaXJkRm9yTXVsdGlwbGVDaG9pY2UlMEFpbXBvcnQlMjB0b3JjaCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmJpZ2JpcmQtcm9iZXJ0YS1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmlnQmlyZEZvck11bHRpcGxlQ2hvaWNlLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZiaWdiaXJkLXJvYmVydGEtYmFzZSUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJJbiUyMEl0YWx5JTJDJTIwcGl6emElMjBzZXJ2ZWQlMjBpbiUyMGZvcm1hbCUyMHNldHRpbmdzJTJDJTIwc3VjaCUyMGFzJTIwYXQlMjBhJTIwcmVzdGF1cmFudCUyQyUyMGlzJTIwcHJlc2VudGVkJTIwdW5zbGljZWQuJTIyJTBBY2hvaWNlMCUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdpdGglMjBhJTIwZm9yayUyMGFuZCUyMGElMjBrbmlmZS4lMjIlMEFjaG9pY2UxJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2hpbGUlMjBoZWxkJTIwaW4lMjB0aGUlMjBoYW5kLiUyMiUwQWxhYmVscyUyMCUzRCUyMHRvcmNoLnRlbnNvcigwKS51bnNxdWVlemUoMCklMjAlMjAlMjMlMjBjaG9pY2UwJTIwaXMlMjBjb3JyZWN0JTIwKGFjY29yZGluZyUyMHRvJTIwV2lraXBlZGlhJTIwJTNCKSklMkMlMjBiYXRjaCUyMHNpemUlMjAxJTBBJTBBZW5jb2RpbmclMjAlM0QlMjB0b2tlbml6ZXIoJTVCcHJvbXB0JTJDJTIwcHJvbXB0JTVEJTJDJTIwJTVCY2hvaWNlMCUyQyUyMGNob2ljZTElNUQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMnB0JTIyJTJDJTIwcGFkZGluZyUzRFRydWUpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqJTdCayUzQSUyMHYudW5zcXVlZXplKDApJTIwZm9yJTIwayUyQyUyMHYlMjBpbiUyMGVuY29kaW5nLml0ZW1zKCklN0QlMkMlMjBsYWJlbHMlM0RsYWJlbHMpJTIwJTIwJTIzJTIwYmF0Y2glMjBzaXplJTIwaXMlMjAxJTBBJTBBJTIzJTIwdGhlJTIwbGluZWFyJTIwY2xhc3NpZmllciUyMHN0aWxsJTIwbmVlZHMlMjB0byUyMGJlJTIwdHJhaW5lZCUwQWxvc3MlMjAlM0QlMjBvdXRwdXRzLmxvc3MlMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BigBirdForMultipleChoice
<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/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BigBirdForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-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(){d=n("p"),b=r("Example:"),u=p(),v(f.$$.fragment)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Example:"),m.forEach(t),u=h(l),k(f.$$.fragment,l)},m(l,m){y(l,d,m),e(d,b),y(l,u,m),B(f,l,m),_=!0},p:z,i(l){_||(T(f.$$.fragment,l),_=!0)},o(l){w(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),M(f,l)}}}function m0($){let d,b,u,f,_;return{c(){d=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var F=a(u);f=i(F,"Module"),F.forEach(t),_=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){y(l,d,m),e(d,b),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function u0($){let d,b,u,f,_;return f=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBCaWdCaXJkRm9yVG9rZW5DbGFzc2lmaWNhdGlvbiUwQWltcG9ydCUyMHRvcmNoJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGYmlnYmlyZC1yb2JlcnRhLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBCaWdCaXJkRm9yVG9rZW5DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGYmlnYmlyZC1yb2JlcnRhLWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUwQSUyMCUyMCUyMCUyMCUyMkh1Z2dpbmdGYWNlJTIwaXMlMjBhJTIwY29tcGFueSUyMGJhc2VkJTIwaW4lMjBQYXJpcyUyMGFuZCUyME5ldyUyMFlvcmslMjIlMkMlMjBhZGRfc3BlY2lhbF90b2tlbnMlM0RGYWxzZSUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIycHQlMjIlMEEpJTBBJTBBd2l0aCUyMHRvcmNoLm5vX2dyYWQoKSUzQSUwQSUyMCUyMCUyMCUyMGxvZ2l0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKS5sb2dpdHMlMEElMEFwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTIwJTNEJTIwbG9naXRzLmFyZ21heCgtMSklMEElMEElMjMlMjBOb3RlJTIwdGhhdCUyMHRva2VucyUyMGFyZSUyMGNsYXNzaWZpZWQlMjByYXRoZXIlMjB0aGVuJTIwaW5wdXQlMjB3b3JkcyUyMHdoaWNoJTIwbWVhbnMlMjB0aGF0JTBBJTIzJTIwdGhlcmUlMjBtaWdodCUyMGJlJTIwbW9yZSUyMHByZWRpY3RlZCUyMHRva2VuJTIwY2xhc3NlcyUyMHRoYW4lMjB3b3Jkcy4lMEElMjMlMjBNdWx0aXBsZSUyMHRva2VuJTIwY2xhc3NlcyUyMG1pZ2h0JTIwYWNjb3VudCUyMGZvciUyMHRoZSUyMHNhbWUlMjB3b3JkJTBBcHJlZGljdGVkX3Rva2Vuc19jbGFzc2VzJTIwJTNEJTIwJTVCbW9kZWwuY29uZmlnLmlkMmxhYmVsJTVCdC5pdGVtKCklNUQlMjBmb3IlMjB0JTIwaW4lMjBwcmVkaWN0ZWRfdG9rZW5fY2xhc3NfaWRzJTVCMCU1RCU1RCUwQSUwQWxhYmVscyUyMCUzRCUyMHByZWRpY3RlZF90b2tlbl9jbGFzc19pZHMlMEFsb3NzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBsYWJlbHMlM0RsYWJlbHMpLmxvc3M=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, BigBirdForTokenClassification
<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/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BigBirdForTokenClassification.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-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(){d=n("p"),b=r("Example:"),u=p(),v(f.$$.fragment)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Example:"),m.forEach(t),u=h(l),k(f.$$.fragment,l)},m(l,m){y(l,d,m),e(d,b),y(l,u,m),B(f,l,m),_=!0},p:z,i(l){_||(T(f.$$.fragment,l),_=!0)},o(l){w(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),M(f,l)}}}function f0($){let d,b,u,f,_;return{c(){d=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var F=a(u);f=i(F,"Module"),F.forEach(t),_=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){y(l,d,m),e(d,b),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function g0($){let d,b,u,f,_;return f=new J({props:{code:"aW1wb3J0JTIwdG9yY2glMEFmcm9tJTIwdHJhbnNmb3JtZXJzJTIwaW1wb3J0JTIwQXV0b1Rva2VuaXplciUyQyUyMEJpZ0JpcmRGb3JRdWVzdGlvbkFuc3dlcmluZyUwQWZyb20lMjBkYXRhc2V0cyUyMGltcG9ydCUyMGxvYWRfZGF0YXNldCUwQSUwQXRva2VuaXplciUyMCUzRCUyMEF1dG9Ub2tlbml6ZXIuZnJvbV9wcmV0cmFpbmVkKCUyMmdvb2dsZSUyRmJpZ2JpcmQtcm9iZXJ0YS1iYXNlJTIyKSUwQW1vZGVsJTIwJTNEJTIwQmlnQmlyZEZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZiaWdiaXJkLXJvYmVydGEtYmFzZSUyMiklMEFzcXVhZF9kcyUyMCUzRCUyMGxvYWRfZGF0YXNldCglMjJzcXVhZF92MiUyMiUyQyUyMHNwbGl0JTNEJTIydHJhaW4lMjIpJTBBJTIzJTIwc2VsZWN0JTIwcmFuZG9tJTIwYXJ0aWNsZSUyMGFuZCUyMHF1ZXN0aW9uJTBBTE9OR19BUlRJQ0xFJTIwJTNEJTIwc3F1YWRfZHMlNUI4MTUxNCU1RCU1QiUyMmNvbnRleHQlMjIlNUQlMEFRVUVTVElPTiUyMCUzRCUyMHNxdWFkX2RzJTVCODE1MTQlNUQlNUIlMjJxdWVzdGlvbiUyMiU1RCUwQVFVRVNUSU9OJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKFFVRVNUSU9OJTJDJTIwTE9OR19BUlRJQ0xFJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJwdCUyMiklMEElMjMlMjBsb25nJTIwYXJ0aWNsZSUyMGFuZCUyMHF1ZXN0aW9uJTIwaW5wdXQlMEFsaXN0KGlucHV0cyU1QiUyMmlucHV0X2lkcyUyMiU1RC5zaGFwZSklMEElMEF3aXRoJTIwdG9yY2gubm9fZ3JhZCgpJTNBJTBBJTIwJTIwJTIwJTIwb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQWFuc3dlcl9zdGFydF9pbmRleCUyMCUzRCUyMG91dHB1dHMuc3RhcnRfbG9naXRzLmFyZ21heCgpJTBBYW5zd2VyX2VuZF9pbmRleCUyMCUzRCUyMG91dHB1dHMuZW5kX2xvZ2l0cy5hcmdtYXgoKSUwQXByZWRpY3RfYW5zd2VyX3Rva2VuX2lkcyUyMCUzRCUyMGlucHV0cy5pbnB1dF9pZHMlNUIwJTJDJTIwYW5zd2VyX3N0YXJ0X2luZGV4JTIwJTNBJTIwYW5zd2VyX2VuZF9pbmRleCUyMCUyQiUyMDElNUQlMEFwcmVkaWN0X2Fuc3dlcl90b2tlbiUyMCUzRCUyMHRva2VuaXplci5kZWNvZGUocHJlZGljdF9hbnN3ZXJfdG9rZW5faWRzKQ==",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, BigBirdForQuestionAnswering
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = BigBirdForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>squad_ds = load_dataset(<span class="hljs-string">&quot;squad_v2&quot;</span>, split=<span class="hljs-string">&quot;train&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># select random article and question</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>LONG_ARTICLE = squad_ds[<span class="hljs-number">81514</span>][<span class="hljs-string">&quot;context&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>QUESTION = squad_ds[<span class="hljs-number">81514</span>][<span class="hljs-string">&quot;question&quot;</span>]
<span class="hljs-meta">&gt;&gt;&gt; </span>QUESTION
<span class="hljs-string">&#x27;During daytime how high can the temperatures reach?&#x27;</span>

<span class="hljs-meta">&gt;&gt;&gt; </span>inputs = tokenizer(QUESTION, LONG_ARTICLE, return_tensors=<span class="hljs-string">&quot;pt&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># long article and question input</span>
<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-built_in">list</span>(inputs[<span class="hljs-string">&quot;input_ids&quot;</span>].shape)
[<span class="hljs-number">1</span>, <span class="hljs-number">929</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_token_ids = 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>predict_answer_token = tokenizer.decode(predict_answer_token_ids)`}}),{c(){d=n("p"),b=r("Example:"),u=p(),v(f.$$.fragment)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Example:"),m.forEach(t),u=h(l),k(f.$$.fragment,l)},m(l,m){y(l,d,m),e(d,b),y(l,u,m),B(f,l,m),_=!0},p:z,i(l){_||(T(f.$$.fragment,l),_=!0)},o(l){w(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),M(f,l)}}}function _0($){let d,b;return d=new J({props:{code:"dGFyZ2V0X3N0YXJ0X2luZGV4JTJDJTIwdGFyZ2V0X2VuZF9pbmRleCUyMCUzRCUyMHRvcmNoLnRlbnNvciglNUIxMzAlNUQpJTJDJTIwdG9yY2gudGVuc29yKCU1QjEzMiU1RCklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMlMkMlMjBzdGFydF9wb3NpdGlvbnMlM0R0YXJnZXRfc3RhcnRfaW5kZXglMkMlMjBlbmRfcG9zaXRpb25zJTNEdGFyZ2V0X2VuZF9pbmRleCklMEFsb3NzJTIwJTNEJTIwb3V0cHV0cy5sb3Nz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span>target_start_index, target_end_index = torch.tensor([<span class="hljs-number">130</span>]), torch.tensor([<span class="hljs-number">132</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(){v(d.$$.fragment)},l(u){k(d.$$.fragment,u)},m(u,f){B(d,u,f),b=!0},p:z,i(u){b||(T(d.$$.fragment,u),b=!0)},o(u){w(d.$$.fragment,u),b=!1},d(u){M(d,u)}}}function b0($){let d,b,u,f,_;return{c(){d=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var F=a(u);f=i(F,"Module"),F.forEach(t),_=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){y(l,d,m),e(d,b),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function y0($){let d,b,u,f,_;return f=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmlnQmlyZE1vZGVsJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGYmlnYmlyZC1yb2JlcnRhLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmlnQmlyZE1vZGVsLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZiaWdiaXJkLXJvYmVydGEtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEElMEFsYXN0X2hpZGRlbl9zdGF0ZXMlMjAlM0QlMjBvdXRwdXRzLmxhc3RfaGlkZGVuX3N0YXRl",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBigBirdModel

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBigBirdModel.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-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;jax&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span>last_hidden_states = outputs.last_hidden_state`}}),{c(){d=n("p"),b=r("Example:"),u=p(),v(f.$$.fragment)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Example:"),m.forEach(t),u=h(l),k(f.$$.fragment,l)},m(l,m){y(l,d,m),e(d,b),y(l,u,m),B(f,l,m),_=!0},p:z,i(l){_||(T(f.$$.fragment,l),_=!0)},o(l){w(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),M(f,l)}}}function v0($){let d,b,u,f,_;return{c(){d=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var F=a(u);f=i(F,"Module"),F.forEach(t),_=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){y(l,d,m),e(d,b),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function k0($){let d,b,u,f,_;return f=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmlnQmlyZEZvclByZVRyYWluaW5nJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGYmlnYmlyZC1yb2JlcnRhLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmlnQmlyZEZvclByZVRyYWluaW5nLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZiaWdiaXJkLXJvYmVydGEtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQXByZWRpY3Rpb25fbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5wcmVkaWN0aW9uX2xvZ2l0cyUwQXNlcV9yZWxhdGlvbnNoaXBfbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5zZXFfcmVsYXRpb25zaGlwX2xvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBigBirdForPreTraining

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBigBirdForPreTraining.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-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;np&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(){d=n("p"),b=r("Example:"),u=p(),v(f.$$.fragment)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Example:"),m.forEach(t),u=h(l),k(f.$$.fragment,l)},m(l,m){y(l,d,m),e(d,b),y(l,u,m),B(f,l,m),_=!0},p:z,i(l){_||(T(f.$$.fragment,l),_=!0)},o(l){w(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),M(f,l)}}}function B0($){let d,b,u,f,_;return{c(){d=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var F=a(u);f=i(F,"Module"),F.forEach(t),_=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){y(l,d,m),e(d,b),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function T0($){let d,b,u,f,_;return f=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmlnQmlyZEZvckNhdXNhbExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGYmlnYmlyZC1yb2JlcnRhLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmlnQmlyZEZvckNhdXNhbExNLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZiaWdiaXJkLXJvYmVydGEtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIySGVsbG8lMkMlMjBteSUyMGRvZyUyMGlzJTIwY3V0ZSUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIybnAlMjIpJTBBb3V0cHV0cyUyMCUzRCUyMG1vZGVsKCoqaW5wdXRzKSUwQSUwQSUyMyUyMHJldHJpZXZlJTIwbG9ndHMlMjBmb3IlMjBuZXh0JTIwdG9rZW4lMEFuZXh0X3Rva2VuX2xvZ2l0cyUyMCUzRCUyMG91dHB1dHMubG9naXRzJTVCJTNBJTJDJTIwLTElNUQ=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBigBirdForCausalLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBigBirdForCausalLM.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-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;np&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)

<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-comment"># retrieve logts for next token</span>
<span class="hljs-meta">&gt;&gt;&gt; </span>next_token_logits = outputs.logits[:, -<span class="hljs-number">1</span>]`}}),{c(){d=n("p"),b=r("Example:"),u=p(),v(f.$$.fragment)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Example:"),m.forEach(t),u=h(l),k(f.$$.fragment,l)},m(l,m){y(l,d,m),e(d,b),y(l,u,m),B(f,l,m),_=!0},p:z,i(l){_||(T(f.$$.fragment,l),_=!0)},o(l){w(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),M(f,l)}}}function w0($){let d,b,u,f,_;return{c(){d=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var F=a(u);f=i(F,"Module"),F.forEach(t),_=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){y(l,d,m),e(d,b),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function M0($){let d,b,u,f,_;return f=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmlnQmlyZEZvck1hc2tlZExNJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGYmlnYmlyZC1yb2JlcnRhLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmlnQmlyZEZvck1hc2tlZExNLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZiaWdiaXJkLXJvYmVydGEtYmFzZSUyMiklMEElMEFpbnB1dHMlMjAlM0QlMjB0b2tlbml6ZXIoJTIyVGhlJTIwY2FwaXRhbCUyMG9mJTIwRnJhbmNlJTIwaXMlMjAlNUJNQVNLJTVELiUyMiUyQyUyMHJldHVybl90ZW5zb3JzJTNEJTIyamF4JTIyKSUwQSUwQW91dHB1dHMlMjAlM0QlMjBtb2RlbCgqKmlucHV0cyklMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBigBirdForMaskedLM

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBigBirdForMaskedLM.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-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;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=n("p"),b=r("Example:"),u=p(),v(f.$$.fragment)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Example:"),m.forEach(t),u=h(l),k(f.$$.fragment,l)},m(l,m){y(l,d,m),e(d,b),y(l,u,m),B(f,l,m),_=!0},p:z,i(l){_||(T(f.$$.fragment,l),_=!0)},o(l){w(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),M(f,l)}}}function $0($){let d,b,u,f,_;return{c(){d=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var F=a(u);f=i(F,"Module"),F.forEach(t),_=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){y(l,d,m),e(d,b),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function F0($){let d,b,u,f,_;return f=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmlnQmlyZEZvclNlcXVlbmNlQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZiaWdiaXJkLXJvYmVydGEtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhCaWdCaXJkRm9yU2VxdWVuY2VDbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGYmlnYmlyZC1yb2JlcnRhLWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBigBirdForSequenceClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBigBirdForSequenceClassification.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-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;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=n("p"),b=r("Example:"),u=p(),v(f.$$.fragment)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Example:"),m.forEach(t),u=h(l),k(f.$$.fragment,l)},m(l,m){y(l,d,m),e(d,b),y(l,u,m),B(f,l,m),_=!0},p:z,i(l){_||(T(f.$$.fragment,l),_=!0)},o(l){w(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),M(f,l)}}}function x0($){let d,b,u,f,_;return{c(){d=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var F=a(u);f=i(F,"Module"),F.forEach(t),_=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){y(l,d,m),e(d,b),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function E0($){let d,b,u,f,_;return f=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmlnQmlyZEZvck11bHRpcGxlQ2hvaWNlJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGYmlnYmlyZC1yb2JlcnRhLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmlnQmlyZEZvck11bHRpcGxlQ2hvaWNlLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZiaWdiaXJkLXJvYmVydGEtYmFzZSUyMiklMEElMEFwcm9tcHQlMjAlM0QlMjAlMjJJbiUyMEl0YWx5JTJDJTIwcGl6emElMjBzZXJ2ZWQlMjBpbiUyMGZvcm1hbCUyMHNldHRpbmdzJTJDJTIwc3VjaCUyMGFzJTIwYXQlMjBhJTIwcmVzdGF1cmFudCUyQyUyMGlzJTIwcHJlc2VudGVkJTIwdW5zbGljZWQuJTIyJTBBY2hvaWNlMCUyMCUzRCUyMCUyMkl0JTIwaXMlMjBlYXRlbiUyMHdpdGglMjBhJTIwZm9yayUyMGFuZCUyMGElMjBrbmlmZS4lMjIlMEFjaG9pY2UxJTIwJTNEJTIwJTIySXQlMjBpcyUyMGVhdGVuJTIwd2hpbGUlMjBoZWxkJTIwaW4lMjB0aGUlMjBoYW5kLiUyMiUwQSUwQWVuY29kaW5nJTIwJTNEJTIwdG9rZW5pemVyKCU1QnByb21wdCUyQyUyMHByb21wdCU1RCUyQyUyMCU1QmNob2ljZTAlMkMlMjBjaG9pY2UxJTVEJTJDJTIwcmV0dXJuX3RlbnNvcnMlM0QlMjJqYXglMjIlMkMlMjBwYWRkaW5nJTNEVHJ1ZSklMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKiolN0JrJTNBJTIwdiU1Qk5vbmUlMkMlMjAlM0ElNUQlMjBmb3IlMjBrJTJDJTIwdiUyMGluJTIwZW5jb2RpbmcuaXRlbXMoKSU3RCklMEElMEFsb2dpdHMlMjAlM0QlMjBvdXRwdXRzLmxvZ2l0cw==",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBigBirdForMultipleChoice

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBigBirdForMultipleChoice.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-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>encoding = tokenizer([prompt, prompt], [choice0, choice1], return_tensors=<span class="hljs-string">&quot;jax&quot;</span>, padding=<span class="hljs-literal">True</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**{k: v[<span class="hljs-literal">None</span>, :] <span class="hljs-keyword">for</span> k, v <span class="hljs-keyword">in</span> encoding.items()})

<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=n("p"),b=r("Example:"),u=p(),v(f.$$.fragment)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Example:"),m.forEach(t),u=h(l),k(f.$$.fragment,l)},m(l,m){y(l,d,m),e(d,b),y(l,u,m),B(f,l,m),_=!0},p:z,i(l){_||(T(f.$$.fragment,l),_=!0)},o(l){w(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),M(f,l)}}}function j0($){let d,b,u,f,_;return{c(){d=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var F=a(u);f=i(F,"Module"),F.forEach(t),_=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){y(l,d,m),e(d,b),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function z0($){let d,b,u,f,_;return f=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmlnQmlyZEZvclRva2VuQ2xhc3NpZmljYXRpb24lMEElMEF0b2tlbml6ZXIlMjAlM0QlMjBBdXRvVG9rZW5pemVyLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZiaWdiaXJkLXJvYmVydGEtYmFzZSUyMiklMEFtb2RlbCUyMCUzRCUyMEZsYXhCaWdCaXJkRm9yVG9rZW5DbGFzc2lmaWNhdGlvbi5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGYmlnYmlyZC1yb2JlcnRhLWJhc2UlMjIpJTBBJTBBaW5wdXRzJTIwJTNEJTIwdG9rZW5pemVyKCUyMkhlbGxvJTJDJTIwbXklMjBkb2clMjBpcyUyMGN1dGUlMjIlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBbG9naXRzJTIwJTNEJTIwb3V0cHV0cy5sb2dpdHM=",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBigBirdForTokenClassification

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBigBirdForTokenClassification.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-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;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>logits = outputs.logits`}}),{c(){d=n("p"),b=r("Example:"),u=p(),v(f.$$.fragment)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Example:"),m.forEach(t),u=h(l),k(f.$$.fragment,l)},m(l,m){y(l,d,m),e(d,b),y(l,u,m),B(f,l,m),_=!0},p:z,i(l){_||(T(f.$$.fragment,l),_=!0)},o(l){w(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),M(f,l)}}}function J0($){let d,b,u,f,_;return{c(){d=n("p"),b=r("Although the recipe for forward pass needs to be defined within this function, one should call the "),u=n("code"),f=r("Module"),_=r(`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Although the recipe for forward pass needs to be defined within this function, one should call the "),u=s(m,"CODE",{});var F=a(u);f=i(F,"Module"),F.forEach(t),_=i(m,`
instance afterwards instead of this since the former takes care of running the pre and post processing steps while
the latter silently ignores them.`),m.forEach(t)},m(l,m){y(l,d,m),e(d,b),e(d,u),e(u,f),e(d,_)},d(l){l&&t(d)}}}function C0($){let d,b,u,f,_;return f=new J({props:{code:"ZnJvbSUyMHRyYW5zZm9ybWVycyUyMGltcG9ydCUyMEF1dG9Ub2tlbml6ZXIlMkMlMjBGbGF4QmlnQmlyZEZvclF1ZXN0aW9uQW5zd2VyaW5nJTBBJTBBdG9rZW5pemVyJTIwJTNEJTIwQXV0b1Rva2VuaXplci5mcm9tX3ByZXRyYWluZWQoJTIyZ29vZ2xlJTJGYmlnYmlyZC1yb2JlcnRhLWJhc2UlMjIpJTBBbW9kZWwlMjAlM0QlMjBGbGF4QmlnQmlyZEZvclF1ZXN0aW9uQW5zd2VyaW5nLmZyb21fcHJldHJhaW5lZCglMjJnb29nbGUlMkZiaWdiaXJkLXJvYmVydGEtYmFzZSUyMiklMEElMEFxdWVzdGlvbiUyQyUyMHRleHQlMjAlM0QlMjAlMjJXaG8lMjB3YXMlMjBKaW0lMjBIZW5zb24lM0YlMjIlMkMlMjAlMjJKaW0lMjBIZW5zb24lMjB3YXMlMjBhJTIwbmljZSUyMHB1cHBldCUyMiUwQWlucHV0cyUyMCUzRCUyMHRva2VuaXplcihxdWVzdGlvbiUyQyUyMHRleHQlMkMlMjByZXR1cm5fdGVuc29ycyUzRCUyMmpheCUyMiklMEElMEFvdXRwdXRzJTIwJTNEJTIwbW9kZWwoKippbnB1dHMpJTBBc3RhcnRfc2NvcmVzJTIwJTNEJTIwb3V0cHV0cy5zdGFydF9sb2dpdHMlMEFlbmRfc2NvcmVzJTIwJTNEJTIwb3V0cHV0cy5lbmRfbG9naXRz",highlighted:`<span class="hljs-meta">&gt;&gt;&gt; </span><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoTokenizer, FlaxBigBirdForQuestionAnswering

<span class="hljs-meta">&gt;&gt;&gt; </span>tokenizer = AutoTokenizer.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-base&quot;</span>)
<span class="hljs-meta">&gt;&gt;&gt; </span>model = FlaxBigBirdForQuestionAnswering.from_pretrained(<span class="hljs-string">&quot;google/bigbird-roberta-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;jax&quot;</span>)

<span class="hljs-meta">&gt;&gt;&gt; </span>outputs = model(**inputs)
<span class="hljs-meta">&gt;&gt;&gt; </span>start_scores = outputs.start_logits
<span class="hljs-meta">&gt;&gt;&gt; </span>end_scores = outputs.end_logits`}}),{c(){d=n("p"),b=r("Example:"),u=p(),v(f.$$.fragment)},l(l){d=s(l,"P",{});var m=a(d);b=i(m,"Example:"),m.forEach(t),u=h(l),k(f.$$.fragment,l)},m(l,m){y(l,d,m),e(d,b),y(l,u,m),B(f,l,m),_=!0},p:z,i(l){_||(T(f.$$.fragment,l),_=!0)},o(l){w(f.$$.fragment,l),_=!1},d(l){l&&t(d),l&&t(u),M(f,l)}}}function I0($){let d,b,u,f,_,l,m,F,sm,ip,Oe,St,Pi,En,am,Zi,rm,lp,Rt,im,jn,lm,dm,dp,Mr,cm,cp,$r,Ai,pm,pp,Fr,hm,hp,G,zn,mm,Jn,um,fm,gm,de,_m,Wi,bm,ym,Gi,vm,km,Li,Bm,Tm,Si,wm,Mm,$m,Ri,Fm,xm,Vi,Em,jm,Cn,zm,Xi,Jm,Cm,Im,xr,Um,Qi,qm,Nm,Oi,Pm,mp,We,Zm,In,Am,Wm,Un,Gm,Lm,up,De,Vt,Di,qn,Sm,Hi,Rm,fp,R,Yi,Er,Vm,Xm,Ki,jr,Qm,Om,el,zr,Dm,Hm,tl,Jr,Ym,Km,ol,Cr,eu,tu,nl,Ir,ou,gp,He,Xt,sl,Nn,nu,al,su,_p,ce,Pn,au,Ye,ru,Ur,iu,lu,Zn,du,cu,pu,Ke,hu,qr,mu,uu,Nr,fu,gu,_u,Qt,bp,et,Ot,rl,An,bu,il,yu,yp,C,Wn,vu,Gn,ku,Ln,Bu,Tu,wu,Sn,Mu,Pr,$u,Fu,xu,Ge,Rn,Eu,ll,ju,zu,Vn,Zr,Ju,dl,Cu,Iu,Ar,Uu,cl,qu,Nu,Dt,Xn,Pu,Qn,Zu,pl,Au,Wu,Gu,Ht,On,Lu,tt,Su,hl,Ru,Vu,ml,Xu,Qu,Ou,Wr,Dn,vp,ot,Yt,ul,Hn,Du,fl,Hu,kp,X,Yn,Yu,je,Ku,gl,ef,tf,Kn,of,nf,Gr,sf,af,rf,Le,es,lf,_l,df,cf,ts,Lr,pf,bl,hf,mf,Sr,uf,yl,ff,gf,ge,os,_f,vl,bf,yf,Kt,vf,kl,kf,Bf,eo,ns,Tf,ss,wf,Bl,Mf,$f,Bp,nt,to,Tl,as,Ff,wl,xf,Tp,st,rs,Ef,is,jf,Rr,zf,Jf,wp,at,oo,Ml,ls,Cf,$l,If,Mp,Q,ds,Uf,cs,qf,ps,Nf,Pf,Zf,hs,Af,ms,Wf,Gf,Lf,L,Sf,Fl,Rf,Vf,xl,Xf,Qf,El,Of,Df,jl,Hf,Yf,zl,Kf,eg,Jl,tg,og,ng,_e,us,sg,rt,ag,Vr,rg,ig,Cl,lg,dg,cg,no,pg,so,$p,it,ao,Il,fs,hg,Ul,mg,Fp,lt,gs,ug,be,_s,fg,dt,gg,Xr,_g,bg,ql,yg,vg,kg,ro,Bg,io,xp,ct,lo,Nl,bs,Tg,Pl,wg,Ep,ze,ys,Mg,pt,$g,Zl,Fg,xg,vs,Eg,jg,zg,ye,ks,Jg,ht,Cg,Qr,Ig,Ug,Al,qg,Ng,Pg,co,Zg,po,jp,mt,ho,Wl,Bs,Ag,Gl,Wg,zp,Je,Ts,Gg,ut,Lg,Ll,Sg,Rg,ws,Vg,Xg,Qg,D,Ms,Og,ft,Dg,Or,Hg,Yg,Sl,Kg,e_,t_,mo,o_,uo,n_,fo,Jp,gt,go,Rl,$s,s_,Vl,a_,Cp,pe,Fs,r_,Xl,i_,l_,xs,d_,Es,c_,p_,h_,H,js,m_,_t,u_,Dr,f_,g_,Ql,__,b_,y_,_o,v_,bo,k_,yo,Ip,bt,vo,Ol,zs,B_,Dl,T_,Up,he,Js,w_,Hl,M_,$_,Cs,F_,Is,x_,E_,j_,ve,Us,z_,yt,J_,Hr,C_,I_,Yl,U_,q_,N_,ko,P_,Bo,qp,vt,To,Kl,qs,Z_,ed,A_,Np,me,Ns,W_,td,G_,L_,Ps,S_,Zs,R_,V_,X_,ke,As,Q_,kt,O_,Yr,D_,H_,od,Y_,K_,eb,wo,tb,Mo,Pp,Bt,$o,nd,Ws,ob,sd,nb,Zp,ue,Gs,sb,Tt,ab,ad,rb,ib,rd,lb,db,cb,Ls,pb,Ss,hb,mb,ub,Y,Rs,fb,wt,gb,Kr,_b,bb,id,yb,vb,kb,Fo,Bb,xo,Tb,Eo,Ap,Mt,jo,ld,Vs,wb,dd,Mb,Wp,I,Xs,$b,cd,Fb,xb,Qs,Eb,ei,jb,zb,Jb,Os,Cb,Ds,Ib,Ub,qb,pd,Nb,Pb,Ce,hd,Hs,Zb,Ab,md,Ys,Wb,Gb,ud,Ks,Lb,Sb,fd,ea,Rb,Vb,Be,ta,Xb,$t,Qb,gd,Ob,Db,_d,Hb,Yb,Kb,zo,ey,Jo,Gp,Ft,Co,bd,oa,ty,yd,oy,Lp,U,na,ny,xt,sy,vd,ay,ry,kd,iy,ly,dy,sa,cy,ti,py,hy,my,aa,uy,ra,fy,gy,_y,Bd,by,yy,Ie,Td,ia,vy,ky,wd,la,By,Ty,Md,da,wy,My,$d,ca,$y,Fy,Te,pa,xy,Et,Ey,Fd,jy,zy,xd,Jy,Cy,Iy,Io,Uy,Uo,Sp,jt,qo,Ed,ha,qy,jd,Ny,Rp,q,ma,Py,zd,Zy,Ay,ua,Wy,oi,Gy,Ly,Sy,fa,Ry,ga,Vy,Xy,Qy,Jd,Oy,Dy,Ue,Cd,_a,Hy,Yy,Id,ba,Ky,ev,Ud,ya,tv,ov,qd,va,nv,sv,we,ka,av,zt,rv,Nd,iv,lv,Pd,dv,cv,pv,No,hv,Po,Vp,Jt,Zo,Zd,Ba,mv,Ad,uv,Xp,N,Ta,fv,wa,gv,Wd,_v,bv,yv,Ma,vv,ni,kv,Bv,Tv,$a,wv,Fa,Mv,$v,Fv,Gd,xv,Ev,qe,Ld,xa,jv,zv,Sd,Ea,Jv,Cv,Rd,ja,Iv,Uv,Vd,za,qv,Nv,Me,Ja,Pv,Ct,Zv,Xd,Av,Wv,Qd,Gv,Lv,Sv,Ao,Rv,Wo,Qp,It,Go,Od,Ca,Vv,Dd,Xv,Op,P,Ia,Qv,Hd,Ov,Dv,Ua,Hv,si,Yv,Kv,ek,qa,tk,Na,ok,nk,sk,Yd,ak,rk,Ne,Kd,Pa,ik,lk,ec,Za,dk,ck,tc,Aa,pk,hk,oc,Wa,mk,uk,$e,Ga,fk,Ut,gk,nc,_k,bk,sc,yk,vk,kk,Lo,Bk,So,Dp,qt,Ro,ac,La,Tk,rc,wk,Hp,Z,Sa,Mk,ic,$k,Fk,Ra,xk,ai,Ek,jk,zk,Va,Jk,Xa,Ck,Ik,Uk,lc,qk,Nk,Pe,dc,Qa,Pk,Zk,cc,Oa,Ak,Wk,pc,Da,Gk,Lk,hc,Ha,Sk,Rk,Fe,Ya,Vk,Nt,Xk,mc,Qk,Ok,uc,Dk,Hk,Yk,Vo,Kk,Xo,Yp,Pt,Qo,fc,Ka,eB,gc,tB,Kp,A,er,oB,_c,nB,sB,tr,aB,ri,rB,iB,lB,or,dB,nr,cB,pB,hB,bc,mB,uB,Ze,yc,sr,fB,gB,vc,ar,_B,bB,kc,rr,yB,vB,Bc,ir,kB,BB,xe,lr,TB,Zt,wB,Tc,MB,$B,wc,FB,xB,EB,Oo,jB,Do,eh,At,Ho,Mc,dr,zB,$c,JB,th,W,cr,CB,Wt,IB,Fc,UB,qB,xc,NB,PB,ZB,pr,AB,ii,WB,GB,LB,hr,SB,mr,RB,VB,XB,Ec,QB,OB,Ae,jc,ur,DB,HB,zc,fr,YB,KB,Jc,gr,eT,tT,Cc,_r,oT,nT,Ee,br,sT,Gt,aT,li,rT,iT,Ic,lT,dT,cT,Yo,pT,Ko,oh;return l=new E({}),En=new E({}),qn=new E({}),Nn=new E({}),Pn=new x({props:{name:"class transformers.BigBirdConfig",anchor:"transformers.BigBirdConfig",parameters:[{name:"vocab_size",val:" = 50358"},{name:"hidden_size",val:" = 768"},{name:"num_hidden_layers",val:" = 12"},{name:"num_attention_heads",val:" = 12"},{name:"intermediate_size",val:" = 3072"},{name:"hidden_act",val:" = 'gelu_new'"},{name:"hidden_dropout_prob",val:" = 0.1"},{name:"attention_probs_dropout_prob",val:" = 0.1"},{name:"max_position_embeddings",val:" = 4096"},{name:"type_vocab_size",val:" = 2"},{name:"initializer_range",val:" = 0.02"},{name:"layer_norm_eps",val:" = 1e-12"},{name:"use_cache",val:" = True"},{name:"pad_token_id",val:" = 0"},{name:"bos_token_id",val:" = 1"},{name:"eos_token_id",val:" = 2"},{name:"sep_token_id",val:" = 66"},{name:"attention_type",val:" = 'block_sparse'"},{name:"use_bias",val:" = True"},{name:"rescale_embeddings",val:" = False"},{name:"block_size",val:" = 64"},{name:"num_random_blocks",val:" = 3"},{name:"classifier_dropout",val:" = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BigBirdConfig.vocab_size",description:`<strong>vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 50358) &#x2014;
Vocabulary size of the BigBird model. Defines the number of different tokens that can be represented by the
<code>inputs_ids</code> passed when calling <a href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdModel">BigBirdModel</a>.`,name:"vocab_size"},{anchor:"transformers.BigBirdConfig.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.BigBirdConfig.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.BigBirdConfig.num_attention_heads",description:`<strong>num_attention_heads</strong> (<code>int</code>, <em>optional</em>, defaults to 12) &#x2014;
Number of attention heads for each attention layer in the Transformer encoder.`,name:"num_attention_heads"},{anchor:"transformers.BigBirdConfig.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.BigBirdConfig.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.BigBirdConfig.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.BigBirdConfig.attention_probs_dropout_prob",description:`<strong>attention_probs_dropout_prob</strong> (<code>float</code>, <em>optional</em>, defaults to 0.1) &#x2014;
The dropout ratio for the attention probabilities.`,name:"attention_probs_dropout_prob"},{anchor:"transformers.BigBirdConfig.max_position_embeddings",description:`<strong>max_position_embeddings</strong> (<code>int</code>, <em>optional</em>, defaults to 4096) &#x2014;
The maximum sequence length that this model might ever be used with. Typically set this to something large
just in case (e.g., 1024 or 2048 or 4096).`,name:"max_position_embeddings"},{anchor:"transformers.BigBirdConfig.type_vocab_size",description:`<strong>type_vocab_size</strong> (<code>int</code>, <em>optional</em>, defaults to 2) &#x2014;
The vocabulary size of the <code>token_type_ids</code> passed when calling <a href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdModel">BigBirdModel</a>.`,name:"type_vocab_size"},{anchor:"transformers.BigBirdConfig.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.BigBirdConfig.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.BigBirdConfig.is_decoder",description:`<strong>is_decoder</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether the model is used as a decoder or not. If <code>False</code>, the model is used as an encoder.`,name:"is_decoder"},{anchor:"transformers.BigBirdConfig.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether or not the model should return the last key/values attentions (not used by all models). Only
relevant if <code>config.is_decoder=True</code>.`,name:"use_cache"},{anchor:"transformers.BigBirdConfig.attention_type",description:`<strong>attention_type</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;block_sparse&quot;</code>) &#x2014;
Whether to use block sparse attention (with n complexity) as introduced in paper or original attention
layer (with n^2 complexity). Possible values are <code>&quot;original_full&quot;</code> and <code>&quot;block_sparse&quot;</code>.`,name:"attention_type"},{anchor:"transformers.BigBirdConfig.use_bias",description:`<strong>use_bias</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>True</code>) &#x2014;
Whether to use bias in query, key, value.`,name:"use_bias"},{anchor:"transformers.BigBirdConfig.rescale_embeddings",description:`<strong>rescale_embeddings</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether to rescale embeddings with (hidden_size ** 0.5).`,name:"rescale_embeddings"},{anchor:"transformers.BigBirdConfig.block_size",description:`<strong>block_size</strong> (<code>int</code>, <em>optional</em>, defaults to 64) &#x2014;
Size of each block. Useful only when <code>attention_type == &quot;block_sparse&quot;</code>.`,name:"block_size"},{anchor:"transformers.BigBirdConfig.num_random_blocks",description:`<strong>num_random_blocks</strong> (<code>int</code>, <em>optional</em>, defaults to 3) &#x2014;
Each query is going to attend these many number of random blocks. Useful only when <code>attention_type == &quot;block_sparse&quot;</code>.`,name:"num_random_blocks"},{anchor:"transformers.BigBirdConfig.classifier_dropout",description:`<strong>classifier_dropout</strong> (<code>float</code>, <em>optional</em>) &#x2014;
The dropout ratio for the classification head.`,name:"classifier_dropout"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/configuration_big_bird.py#L34"}}),Qt=new j({props:{anchor:"transformers.BigBirdConfig.example",$$slots:{default:[H1]},$$scope:{ctx:$}}}),An=new E({}),Wn=new x({props:{name:"class transformers.BigBirdTokenizer",anchor:"transformers.BigBirdTokenizer",parameters:[{name:"vocab_file",val:""},{name:"unk_token",val:" = '<unk>'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"pad_token",val:" = '<pad>'"},{name:"sep_token",val:" = '[SEP]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"sp_model_kwargs",val:": typing.Union[typing.Dict[str, typing.Any], NoneType] = None"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BigBirdTokenizer.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.BigBirdTokenizer.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token.`,name:"eos_token"},{anchor:"transformers.BigBirdTokenizer.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The begin of sequence token.`,name:"bos_token"},{anchor:"transformers.BigBirdTokenizer.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.BigBirdTokenizer.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.BigBirdTokenizer.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.BigBirdTokenizer.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.BigBirdTokenizer.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.BigBirdTokenizer.sp_model_kwargs",description:`<strong>sp_model_kwargs</strong> (<code>dict</code>, <em>optional</em>) &#x2014;
Will be passed to the <code>SentencePieceProcessor.__init__()</code> method. The <a href="https://github.com/google/sentencepiece/tree/master/python" rel="nofollow">Python wrapper for
SentencePiece</a> can be used, among other things,
to set:</p>
<ul>
<li>
<p><code>enable_sampling</code>: Enable subword regularization.</p>
</li>
<li>
<p><code>nbest_size</code>: Sampling parameters for unigram. Invalid for BPE-Dropout.</p>
<ul>
<li><code>nbest_size = {0,1}</code>: No sampling is performed.</li>
<li><code>nbest_size &gt; 1</code>: samples from the nbest_size results.</li>
<li><code>nbest_size &lt; 0</code>: assuming that nbest_size is infinite and samples from the all hypothesis (lattice)
using forward-filtering-and-backward-sampling algorithm.</li>
</ul>
</li>
<li>
<p><code>alpha</code>: Smoothing parameter for unigram sampling, and dropout probability of merge operations for
BPE-dropout.</p>
</li>
</ul>`,name:"sp_model_kwargs"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/tokenization_big_bird.py#L52"}}),Rn=new x({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.BigBirdTokenizer.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.BigBirdTokenizer.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.BigBirdTokenizer.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/tokenization_big_bird.py#L268",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>
`}}),Xn=new x({props:{name:"get_special_tokens_mask",anchor:"transformers.BigBirdTokenizer.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.BigBirdTokenizer.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.BigBirdTokenizer.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.BigBirdTokenizer.get_special_tokens_mask.already_has_special_tokens",description:`<strong>already_has_special_tokens</strong> (<code>bool</code>, <em>optional</em>, defaults to <code>False</code>) &#x2014;
Whether or not the token list is already formatted with special tokens for the model.`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/tokenization_big_bird.py#L293",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>
`}}),On=new x({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.BigBirdTokenizer.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.BigBirdTokenizer.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.BigBirdTokenizer.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/tokenization_big_bird.py#L320",returnDescription:`
<p>List of <a href="../glossary#token-type-ids">token type IDs</a> according to the given sequence(s).</p>
`,returnType:`
<p><code>List[int]</code></p>
`}}),Dn=new x({props:{name:"save_vocabulary",anchor:"transformers.BigBirdTokenizer.save_vocabulary",parameters:[{name:"save_directory",val:": str"},{name:"filename_prefix",val:": typing.Optional[str] = None"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/tokenization_big_bird.py#L251"}}),Hn=new E({}),Yn=new x({props:{name:"class transformers.BigBirdTokenizerFast",anchor:"transformers.BigBirdTokenizerFast",parameters:[{name:"vocab_file",val:" = None"},{name:"tokenizer_file",val:" = None"},{name:"unk_token",val:" = '<unk>'"},{name:"bos_token",val:" = '<s>'"},{name:"eos_token",val:" = '</s>'"},{name:"pad_token",val:" = '<pad>'"},{name:"sep_token",val:" = '[SEP]'"},{name:"mask_token",val:" = '[MASK]'"},{name:"cls_token",val:" = '[CLS]'"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.BigBirdTokenizerFast.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.BigBirdTokenizerFast.bos_token",description:`<strong>bos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;s&gt;&quot;</code>) &#x2014;
The beginning of sequence token that was used during pretraining. Can be used a sequence classifier token.</p>
<div class="course-tip  bg-gradient-to-br dark:bg-gradient-to-r before:border-green-500 dark:before:border-green-800 from-green-50 dark:from-gray-900 to-white dark:to-gray-950 border border-green-50 text-green-700 dark:text-gray-400">
						
<p>When building a sequence using special tokens, this is not the token that is used for the beginning of
sequence. The token used is the <code>cls_token</code>.</p>

					</div>`,name:"bos_token"},{anchor:"transformers.BigBirdTokenizerFast.eos_token",description:`<strong>eos_token</strong> (<code>str</code>, <em>optional</em>, defaults to <code>&quot;&lt;/s&gt;&quot;</code>) &#x2014;
The end of sequence token. .. note:: When building a sequence using special tokens, this is not the token
that is used for the end of sequence. The token used is the <code>sep_token</code>.`,name:"eos_token"},{anchor:"transformers.BigBirdTokenizerFast.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.BigBirdTokenizerFast.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.BigBirdTokenizerFast.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.BigBirdTokenizerFast.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.BigBirdTokenizerFast.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/v4.32.0/src/transformers/models/big_bird/tokenization_big_bird_fast.py#L68"}}),es=new x({props:{name:"build_inputs_with_special_tokens",anchor:"transformers.BigBirdTokenizerFast.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.BigBirdTokenizerFast.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.BigBirdTokenizerFast.build_inputs_with_special_tokens.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/tokenization_big_bird_fast.py#L155",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>
`}}),os=new x({props:{name:"create_token_type_ids_from_sequences",anchor:"transformers.BigBirdTokenizerFast.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.BigBirdTokenizerFast.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.BigBirdTokenizerFast.create_token_type_ids_from_sequences.token_ids_1",description:`<strong>token_ids_1</strong> (<code>List[int]</code>, <em>optional</em>) &#x2014;
Optional second list of IDs for sequence pairs.`,name:"token_ids_1"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/tokenization_big_bird_fast.py#L211",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>
`}}),Kt=new j({props:{anchor:"transformers.BigBirdTokenizerFast.create_token_type_ids_from_sequences.example",$$slots:{default:[Y1]},$$scope:{ctx:$}}}),ns=new x({props:{name:"get_special_tokens_mask",anchor:"transformers.BigBirdTokenizerFast.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.BigBirdTokenizerFast.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.BigBirdTokenizerFast.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.BigBirdTokenizerFast.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;
Set to True if the token list is already formatted with special tokens for the model`,name:"already_has_special_tokens"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/tokenization_big_bird_fast.py#L180",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>
`}}),as=new E({}),rs=new x({props:{name:"class transformers.models.big_bird.modeling_big_bird.BigBirdForPreTrainingOutput",anchor:"transformers.models.big_bird.modeling_big_bird.BigBirdForPreTrainingOutput",parameters:[{name:"loss",val:": typing.Optional[torch.FloatTensor] = None"},{name:"prediction_logits",val:": FloatTensor = None"},{name:"seq_relationship_logits",val:": FloatTensor = None"},{name:"hidden_states",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"},{name:"attentions",val:": typing.Optional[typing.Tuple[torch.FloatTensor]] = None"}],parametersDescription:[{anchor:"transformers.models.big_bird.modeling_big_bird.BigBirdForPreTrainingOutput.loss",description:`<strong>loss</strong> (<em>optional</em>, returned when <code>labels</code> is provided, <code>torch.FloatTensor</code> of shape <code>(1,)</code>) &#x2014;
Total loss as the sum of the masked language modeling loss and the next sequence prediction
(classification) loss.`,name:"loss"},{anchor:"transformers.models.big_bird.modeling_big_bird.BigBirdForPreTrainingOutput.prediction_logits",description:`<strong>prediction_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) &#x2014;
Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).`,name:"prediction_logits"},{anchor:"transformers.models.big_bird.modeling_big_bird.BigBirdForPreTrainingOutput.seq_relationship_logits",description:`<strong>seq_relationship_logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, 2)</code>) &#x2014;
Prediction scores of the next sequence prediction (classification) head (scores of True/False continuation
before SoftMax).`,name:"seq_relationship_logits"},{anchor:"transformers.models.big_bird.modeling_big_bird.BigBirdForPreTrainingOutput.hidden_states",description:`<strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.`,name:"hidden_states"},{anchor:"transformers.models.big_bird.modeling_big_bird.BigBirdForPreTrainingOutput.attentions",description:`<strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) &#x2014;
Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.`,name:"attentions"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_big_bird.py#L1854"}}),ls=new E({}),ds=new x({props:{name:"class transformers.BigBirdModel",anchor:"transformers.BigBirdModel",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = True"}],parametersDescription:[{anchor:"transformers.BigBirdModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig">BigBirdConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_big_bird.py#L1926"}}),us=new x({props:{name:"forward",anchor:"transformers.BigBirdModel.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BigBirdModel.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BigBirdModel.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BigBirdModel.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.BigBirdModel.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.BigBirdModel.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BigBirdModel.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.BigBirdModel.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BigBirdModel.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.BigBirdModel.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BigBirdModel.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.BigBirdModel.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.BigBirdModel.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.BigBirdModel.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_big_bird.py#L1983",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig"
>BigBirdConfig</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>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) after further processing
through the layers used for the auxiliary pretraining task. E.g. for BERT-family of models, this returns
the classification token after processing through a linear layer and a tanh activation function. The linear
layer weights are trained from the next sentence prediction (classification) objective during pretraining.</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>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> and <code>config.add_cross_attention=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 of the decoder\u2019s cross-attention layer, after the attention softmax, used to compute the
weighted average in the cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>tuple(torch.FloatTensor)</code> of length <code>config.n_layers</code>, with each tuple having 2 tensors of shape
<code>(batch_size, num_heads, sequence_length, embed_size_per_head)</code>) and optionally if
<code>config.is_encoder_decoder=True</code> 2 additional tensors of shape <code>(batch_size, num_heads, encoder_sequence_length, embed_size_per_head)</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the self-attention blocks and optionally if
<code>config.is_encoder_decoder=True</code> in the cross-attention blocks) that can be used (see <code>past_key_values</code>
input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions"
>transformers.modeling_outputs.BaseModelOutputWithPoolingAndCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),no=new V({props:{$$slots:{default:[K1]},$$scope:{ctx:$}}}),so=new j({props:{anchor:"transformers.BigBirdModel.forward.example",$$slots:{default:[e0]},$$scope:{ctx:$}}}),fs=new E({}),gs=new x({props:{name:"class transformers.BigBirdForPreTraining",anchor:"transformers.BigBirdForPreTraining",parameters:[{name:"config",val:""}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_big_bird.py#L2265"}}),_s=new x({props:{name:"forward",anchor:"transformers.BigBirdForPreTraining.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.FloatTensor] = None"},{name:"next_sentence_label",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BigBirdForPreTraining.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BigBirdForPreTraining.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BigBirdForPreTraining.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.BigBirdForPreTraining.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.BigBirdForPreTraining.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BigBirdForPreTraining.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.BigBirdForPreTraining.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BigBirdForPreTraining.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.BigBirdForPreTraining.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BigBirdForPreTraining.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.BigBirdForPreTraining.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. If specified, nsp loss will be
added to masked_lm 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.BigBirdForPreTraining.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/v4.32.0/src/transformers/models/big_bird/modeling_big_bird.py#L2283",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.models.big_bird.modeling_big_bird.BigBirdForPreTrainingOutput"
>transformers.models.big_bird.modeling_big_bird.BigBirdForPreTrainingOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig"
>BigBirdConfig</a>) and inputs.</p>
<ul>
<li>
<p><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.</p>
</li>
<li>
<p><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).</p>
</li>
<li>
<p><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).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.models.big_bird.modeling_big_bird.BigBirdForPreTrainingOutput"
>transformers.models.big_bird.modeling_big_bird.BigBirdForPreTrainingOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ro=new V({props:{$$slots:{default:[t0]},$$scope:{ctx:$}}}),io=new j({props:{anchor:"transformers.BigBirdForPreTraining.forward.example",$$slots:{default:[o0]},$$scope:{ctx:$}}}),bs=new E({}),ys=new x({props:{name:"class transformers.BigBirdForCausalLM",anchor:"transformers.BigBirdForCausalLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BigBirdForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig">BigBirdConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_big_bird.py#L2515"}}),ks=new x({props:{name:"forward",anchor:"transformers.BigBirdForCausalLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"past_key_values",val:": typing.Optional[typing.Tuple[typing.Tuple[torch.FloatTensor]]] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"use_cache",val:": typing.Optional[bool] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BigBirdForCausalLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BigBirdForCausalLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BigBirdForCausalLM.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.BigBirdForCausalLM.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.BigBirdForCausalLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BigBirdForCausalLM.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.BigBirdForCausalLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BigBirdForCausalLM.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.BigBirdForCausalLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BigBirdForCausalLM.forward.encoder_hidden_states",description:`<strong>encoder_hidden_states</strong>  (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, hidden_size)</code>, <em>optional</em>) &#x2014;
Sequence of hidden-states at the output of the last layer of the encoder. Used in the cross-attention if
the model is configured as a decoder.`,name:"encoder_hidden_states"},{anchor:"transformers.BigBirdForCausalLM.forward.encoder_attention_mask",description:`<strong>encoder_attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on the padding token indices of the encoder input. This mask is used in
the cross-attention if the model is configured as a decoder. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>`,name:"encoder_attention_mask"},{anchor:"transformers.BigBirdForCausalLM.forward.past_key_values",description:`<strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code> of length <code>config.n_layers</code> with each tuple having 4 tensors of shape <code>(batch_size, num_heads, sequence_length - 1, embed_size_per_head)</code>) &#x2014;
Contains precomputed key and value hidden states of the attention blocks. Can be used to speed up decoding.
If <code>past_key_values</code> are used, the user can optionally input only the last <code>decoder_input_ids</code> (those that
don&#x2019;t have their past key value states given to this model) of shape <code>(batch_size, 1)</code> instead of all
<code>decoder_input_ids</code> of shape <code>(batch_size, sequence_length)</code>.`,name:"past_key_values"},{anchor:"transformers.BigBirdForCausalLM.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 left-to-right language modeling loss (next word prediction). 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 n <code>[0, ..., config.vocab_size]</code>.`,name:"labels"},{anchor:"transformers.BigBirdForCausalLM.forward.use_cache",description:`<strong>use_cache</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
If set to <code>True</code>, <code>past_key_values</code> key value states are returned and can be used to speed up decoding (see
<code>past_key_values</code>).`,name:"use_cache"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_big_bird.py#L2536",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig"
>BigBirdConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Language modeling loss (for next-token prediction).</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_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>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(torch.FloatTensor))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key,
value states of the self-attention and the cross-attention layers if model is used in encoder-decoder
setting. Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.CausalLMOutputWithCrossAttentions"
>transformers.modeling_outputs.CausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),co=new V({props:{$$slots:{default:[n0]},$$scope:{ctx:$}}}),po=new j({props:{anchor:"transformers.BigBirdForCausalLM.forward.example",$$slots:{default:[s0]},$$scope:{ctx:$}}}),Bs=new E({}),Ts=new x({props:{name:"class transformers.BigBirdForMaskedLM",anchor:"transformers.BigBirdForMaskedLM",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BigBirdForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig">BigBirdConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_big_bird.py#L2371"}}),Ms=new x({props:{name:"forward",anchor:"transformers.BigBirdForMaskedLM.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_hidden_states",val:": typing.Optional[torch.FloatTensor] = None"},{name:"encoder_attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BigBirdForMaskedLM.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BigBirdForMaskedLM.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BigBirdForMaskedLM.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.BigBirdForMaskedLM.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.BigBirdForMaskedLM.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BigBirdForMaskedLM.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.BigBirdForMaskedLM.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BigBirdForMaskedLM.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.BigBirdForMaskedLM.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BigBirdForMaskedLM.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/v4.32.0/src/transformers/models/big_bird/modeling_big_bird.py#L2395",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig"
>BigBirdConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Masked language modeling (MLM) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length, config.vocab_size)</code>) \u2014 Prediction scores of the language modeling head (scores for each vocabulary token before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.MaskedLMOutput"
>transformers.modeling_outputs.MaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),mo=new V({props:{$$slots:{default:[a0]},$$scope:{ctx:$}}}),uo=new j({props:{anchor:"transformers.BigBirdForMaskedLM.forward.example",$$slots:{default:[r0]},$$scope:{ctx:$}}}),fo=new j({props:{anchor:"transformers.BigBirdForMaskedLM.forward.example-2",$$slots:{default:[i0]},$$scope:{ctx:$}}}),$s=new E({}),Fs=new x({props:{name:"class transformers.BigBirdForSequenceClassification",anchor:"transformers.BigBirdForSequenceClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BigBirdForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig">BigBirdConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_big_bird.py#L2677"}}),js=new x({props:{name:"forward",anchor:"transformers.BigBirdForSequenceClassification.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BigBirdForSequenceClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BigBirdForSequenceClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BigBirdForSequenceClassification.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.BigBirdForSequenceClassification.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.BigBirdForSequenceClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BigBirdForSequenceClassification.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.BigBirdForSequenceClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BigBirdForSequenceClassification.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.BigBirdForSequenceClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BigBirdForSequenceClassification.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the sequence classification/regression loss. Indices should be in <code>[0, ..., config.num_labels - 1]</code>. If <code>config.num_labels == 1</code> a regression loss is computed (Mean-Square loss), If
<code>config.num_labels &gt; 1</code> a classification loss is computed (Cross-Entropy).`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_big_bird.py#L2688",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig"
>BigBirdConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>loss</strong> (<code>torch.FloatTensor</code> of shape <code>(1,)</code>, <em>optional</em>, returned when <code>labels</code> is provided) \u2014 Classification (or regression if config.num_labels==1) loss.</p>
</li>
<li>
<p><strong>logits</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, config.num_labels)</code>) \u2014 Classification (or regression if config.num_labels==1) scores (before SoftMax).</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings, if the model has an embedding layer, +
one for the output of each layer) of shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the optional initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_outputs.SequenceClassifierOutput"
>transformers.modeling_outputs.SequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),_o=new V({props:{$$slots:{default:[l0]},$$scope:{ctx:$}}}),bo=new j({props:{anchor:"transformers.BigBirdForSequenceClassification.forward.example",$$slots:{default:[d0]},$$scope:{ctx:$}}}),yo=new j({props:{anchor:"transformers.BigBirdForSequenceClassification.forward.example-2",$$slots:{default:[c0]},$$scope:{ctx:$}}}),zs=new E({}),Js=new x({props:{name:"class transformers.BigBirdForMultipleChoice",anchor:"transformers.BigBirdForMultipleChoice",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BigBirdForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig">BigBirdConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_big_bird.py#L2805"}}),Us=new x({props:{name:"forward",anchor:"transformers.BigBirdForMultipleChoice.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BigBirdForMultipleChoice.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BigBirdForMultipleChoice.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BigBirdForMultipleChoice.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.BigBirdForMultipleChoice.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.BigBirdForMultipleChoice.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BigBirdForMultipleChoice.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.BigBirdForMultipleChoice.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BigBirdForMultipleChoice.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.BigBirdForMultipleChoice.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BigBirdForMultipleChoice.forward.labels",description:`<strong>labels</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for computing the multiple choice classification loss. Indices should be in <code>[0, ..., num_choices-1]</code> where <code>num_choices</code> is the size of the second dimension of the input tensors. (See
<code>input_ids</code> above)`,name:"labels"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_big_bird.py#L2816",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig"
>BigBirdConfig</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/v4.32.0/en/main_classes/output#transformers.modeling_outputs.MultipleChoiceModelOutput"
>transformers.modeling_outputs.MultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),ko=new V({props:{$$slots:{default:[p0]},$$scope:{ctx:$}}}),Bo=new j({props:{anchor:"transformers.BigBirdForMultipleChoice.forward.example",$$slots:{default:[h0]},$$scope:{ctx:$}}}),qs=new E({}),Ns=new x({props:{name:"class transformers.BigBirdForTokenClassification",anchor:"transformers.BigBirdForTokenClassification",parameters:[{name:"config",val:""}],parametersDescription:[{anchor:"transformers.BigBirdForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig">BigBirdConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_big_bird.py#L2898"}}),As=new x({props:{name:"forward",anchor:"transformers.BigBirdForTokenClassification.forward",parameters:[{name:"input_ids",val:": LongTensor = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"labels",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BigBirdForTokenClassification.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BigBirdForTokenClassification.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BigBirdForTokenClassification.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.BigBirdForTokenClassification.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.BigBirdForTokenClassification.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BigBirdForTokenClassification.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.BigBirdForTokenClassification.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BigBirdForTokenClassification.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.BigBirdForTokenClassification.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BigBirdForTokenClassification.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/v4.32.0/src/transformers/models/big_bird/modeling_big_bird.py#L2913",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/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/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig"
>BigBirdConfig</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/v4.32.0/en/main_classes/output#transformers.modeling_outputs.TokenClassifierOutput"
>transformers.modeling_outputs.TokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),wo=new V({props:{$$slots:{default:[m0]},$$scope:{ctx:$}}}),Mo=new j({props:{anchor:"transformers.BigBirdForTokenClassification.forward.example",$$slots:{default:[u0]},$$scope:{ctx:$}}}),Ws=new E({}),Gs=new x({props:{name:"class transformers.BigBirdForQuestionAnswering",anchor:"transformers.BigBirdForQuestionAnswering",parameters:[{name:"config",val:""},{name:"add_pooling_layer",val:" = False"}],parametersDescription:[{anchor:"transformers.BigBirdForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig">BigBirdConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.PreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_big_bird.py#L2997"}}),Rs=new x({props:{name:"forward",anchor:"transformers.BigBirdForQuestionAnswering.forward",parameters:[{name:"input_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"attention_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"question_lengths",val:": typing.Optional[torch.Tensor] = None"},{name:"token_type_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"position_ids",val:": typing.Optional[torch.LongTensor] = None"},{name:"head_mask",val:": typing.Optional[torch.FloatTensor] = None"},{name:"inputs_embeds",val:": typing.Optional[torch.FloatTensor] = None"},{name:"start_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"end_positions",val:": typing.Optional[torch.LongTensor] = None"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.BigBirdForQuestionAnswering.forward.input_ids",description:`<strong>input_ids</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.BigBirdForQuestionAnswering.forward.attention_mask",description:`<strong>attention_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.BigBirdForQuestionAnswering.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.BigBirdForQuestionAnswering.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.BigBirdForQuestionAnswering.forward.head_mask",description:`<strong>head_mask</strong> (<code>torch.FloatTensor</code> of shape <code>(num_heads,)</code> or <code>(num_layers, num_heads)</code>, <em>optional</em>) &#x2014;
Mask to nullify selected heads of the self-attention modules. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.BigBirdForQuestionAnswering.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.BigBirdForQuestionAnswering.forward.output_attentions",description:`<strong>output_attentions</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return the attentions tensors of all attention layers. See <code>attentions</code> under returned
tensors for more detail.`,name:"output_attentions"},{anchor:"transformers.BigBirdForQuestionAnswering.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.BigBirdForQuestionAnswering.forward.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"},{anchor:"transformers.BigBirdForQuestionAnswering.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.BigBirdForQuestionAnswering.forward.end_positions",description:`<strong>end_positions</strong> (<code>torch.LongTensor</code> of shape <code>(batch_size,)</code>, <em>optional</em>) &#x2014;
Labels for position (index) of the end of the labelled span for computing the token classification loss.
Positions are clamped to the length of the sequence (<code>sequence_length</code>). Position outside of the sequence
are not taken into account for computing the loss.`,name:"end_positions"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_big_bird.py#L3011",returnDescription:`
<p>A <code>transformers.models.big_bird.modeling_big_bird.BigBirdForQuestionAnsweringModelOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig"
>BigBirdConfig</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>pooler_output</strong> (<code>torch.FloatTensor</code> of shape <code>(batch_size, 1)</code>) \u2014 pooler output from BigBigModel</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_hidden_states=True</code> is passed or when <code>config.output_hidden_states=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for the output of the embeddings + one for the output of each layer) of
shape <code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(torch.FloatTensor)</code>, <em>optional</em>, returned when <code>output_attentions=True</code> is passed or when <code>config.output_attentions=True</code>) \u2014 Tuple of <code>torch.FloatTensor</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.models.big_bird.modeling_big_bird.BigBirdForQuestionAnsweringModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Fo=new V({props:{$$slots:{default:[f0]},$$scope:{ctx:$}}}),xo=new j({props:{anchor:"transformers.BigBirdForQuestionAnswering.forward.example",$$slots:{default:[g0]},$$scope:{ctx:$}}}),Eo=new j({props:{anchor:"transformers.BigBirdForQuestionAnswering.forward.example-2",$$slots:{default:[_0]},$$scope:{ctx:$}}}),Vs=new E({}),Xs=new x({props:{name:"class transformers.FlaxBigBirdModel",anchor:"transformers.FlaxBigBirdModel",parameters:[{name:"config",val:": BigBirdConfig"},{name:"input_shape",val:": typing.Optional[tuple] = None"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBigBirdModel.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig">BigBirdConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBigBirdModel.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1890"}}),ta=new x({props:{name:"__call__",anchor:"transformers.FlaxBigBirdModel.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": typing.Optional[PRNGKey] = None"},{name:"indices_rng",val:": typing.Optional[PRNGKey] = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxBigBirdModel.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxBigBirdModel.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxBigBirdModel.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxBigBirdModel.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxBigBirdModel.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxBigBirdModel.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1717",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig"
>BigBirdConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>last_hidden_state</strong> (<code>jnp.ndarray</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>pooler_output</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 Last layer hidden-state of the first token of the sequence (classification token) further processed by a
Linear layer and a Tanh activation function. The Linear layer weights are trained from the next sentence
prediction (classification) objective during pretraining.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling"
>transformers.modeling_flax_outputs.FlaxBaseModelOutputWithPooling</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),zo=new V({props:{$$slots:{default:[b0]},$$scope:{ctx:$}}}),Jo=new j({props:{anchor:"transformers.FlaxBigBirdModel.__call__.example",$$slots:{default:[y0]},$$scope:{ctx:$}}}),oa=new E({}),na=new x({props:{name:"class transformers.FlaxBigBirdForPreTraining",anchor:"transformers.FlaxBigBirdForPreTraining",parameters:[{name:"config",val:": BigBirdConfig"},{name:"input_shape",val:": typing.Optional[tuple] = None"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBigBirdForPreTraining.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig">BigBirdConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBigBirdForPreTraining.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1967"}}),pa=new x({props:{name:"__call__",anchor:"transformers.FlaxBigBirdForPreTraining.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": typing.Optional[PRNGKey] = None"},{name:"indices_rng",val:": typing.Optional[PRNGKey] = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxBigBirdForPreTraining.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxBigBirdForPreTraining.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxBigBirdForPreTraining.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxBigBirdForPreTraining.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxBigBirdForPreTraining.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxBigBirdForPreTraining.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1717",returnDescription:`
<p>A <code>transformers.models.big_bird.modeling_flax_big_bird.FlaxBigBirdForPreTrainingOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig"
>BigBirdConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>prediction_logits</strong> (<code>jnp.ndarray</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>seq_relationship_logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.models.big_bird.modeling_flax_big_bird.FlaxBigBirdForPreTrainingOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Io=new V({props:{$$slots:{default:[v0]},$$scope:{ctx:$}}}),Uo=new j({props:{anchor:"transformers.FlaxBigBirdForPreTraining.__call__.example",$$slots:{default:[k0]},$$scope:{ctx:$}}}),ha=new E({}),ma=new x({props:{name:"class transformers.FlaxBigBirdForCausalLM",anchor:"transformers.FlaxBigBirdForCausalLM",parameters:[{name:"config",val:": BigBirdConfig"},{name:"input_shape",val:": typing.Optional[tuple] = None"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBigBirdForCausalLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig">BigBirdConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBigBirdForCausalLM.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_flax_big_bird.py#L2599"}}),ka=new x({props:{name:"__call__",anchor:"transformers.FlaxBigBirdForCausalLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": typing.Optional[PRNGKey] = None"},{name:"indices_rng",val:": typing.Optional[PRNGKey] = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxBigBirdForCausalLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxBigBirdForCausalLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxBigBirdForCausalLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxBigBirdForCausalLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxBigBirdForCausalLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxBigBirdForCausalLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1717",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig"
>BigBirdConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
<li>
<p><strong>cross_attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Cross attentions weights after the attention softmax, used to compute the weighted average in the
cross-attention heads.</p>
</li>
<li>
<p><strong>past_key_values</strong> (<code>tuple(tuple(jnp.ndarray))</code>, <em>optional</em>, returned when <code>use_cache=True</code> is passed or when <code>config.use_cache=True</code>) \u2014 Tuple of <code>jnp.ndarray</code> tuples of length <code>config.n_layers</code>, with each tuple containing the cached key, value
states of the self-attention and the cross-attention layers if model is used in encoder-decoder setting.
Only relevant if <code>config.is_decoder = True</code>.</p>
<p>Contains pre-computed hidden-states (key and values in the attention blocks) that can be used (see
<code>past_key_values</code> input) to speed up sequential decoding.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions"
>transformers.modeling_flax_outputs.FlaxCausalLMOutputWithCrossAttentions</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),No=new V({props:{$$slots:{default:[B0]},$$scope:{ctx:$}}}),Po=new j({props:{anchor:"transformers.FlaxBigBirdForCausalLM.__call__.example",$$slots:{default:[T0]},$$scope:{ctx:$}}}),Ba=new E({}),Ta=new x({props:{name:"class transformers.FlaxBigBirdForMaskedLM",anchor:"transformers.FlaxBigBirdForMaskedLM",parameters:[{name:"config",val:": BigBirdConfig"},{name:"input_shape",val:": typing.Optional[tuple] = None"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBigBirdForMaskedLM.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig">BigBirdConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBigBirdForMaskedLM.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_flax_big_bird.py#L2060"}}),Ja=new x({props:{name:"__call__",anchor:"transformers.FlaxBigBirdForMaskedLM.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": typing.Optional[PRNGKey] = None"},{name:"indices_rng",val:": typing.Optional[PRNGKey] = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxBigBirdForMaskedLM.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxBigBirdForMaskedLM.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxBigBirdForMaskedLM.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxBigBirdForMaskedLM.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxBigBirdForMaskedLM.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxBigBirdForMaskedLM.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1717",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig"
>BigBirdConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMaskedLMOutput"
>transformers.modeling_flax_outputs.FlaxMaskedLMOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Ao=new V({props:{$$slots:{default:[w0]},$$scope:{ctx:$}}}),Wo=new j({props:{anchor:"transformers.FlaxBigBirdForMaskedLM.__call__.example",$$slots:{default:[M0]},$$scope:{ctx:$}}}),Ca=new E({}),Ia=new x({props:{name:"class transformers.FlaxBigBirdForSequenceClassification",anchor:"transformers.FlaxBigBirdForSequenceClassification",parameters:[{name:"config",val:": BigBirdConfig"},{name:"input_shape",val:": typing.Optional[tuple] = None"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBigBirdForSequenceClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig">BigBirdConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBigBirdForSequenceClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_flax_big_bird.py#L2150"}}),Ga=new x({props:{name:"__call__",anchor:"transformers.FlaxBigBirdForSequenceClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": typing.Optional[PRNGKey] = None"},{name:"indices_rng",val:": typing.Optional[PRNGKey] = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxBigBirdForSequenceClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxBigBirdForSequenceClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxBigBirdForSequenceClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxBigBirdForSequenceClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxBigBirdForSequenceClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxBigBirdForSequenceClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1717",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig"
>BigBirdConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput"
>transformers.modeling_flax_outputs.FlaxSequenceClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Lo=new V({props:{$$slots:{default:[$0]},$$scope:{ctx:$}}}),So=new j({props:{anchor:"transformers.FlaxBigBirdForSequenceClassification.__call__.example",$$slots:{default:[F0]},$$scope:{ctx:$}}}),La=new E({}),Sa=new x({props:{name:"class transformers.FlaxBigBirdForMultipleChoice",anchor:"transformers.FlaxBigBirdForMultipleChoice",parameters:[{name:"config",val:": BigBirdConfig"},{name:"input_shape",val:": typing.Optional[tuple] = None"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBigBirdForMultipleChoice.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig">BigBirdConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBigBirdForMultipleChoice.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_flax_big_bird.py#L2231"}}),Ya=new x({props:{name:"__call__",anchor:"transformers.FlaxBigBirdForMultipleChoice.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": typing.Optional[PRNGKey] = None"},{name:"indices_rng",val:": typing.Optional[PRNGKey] = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxBigBirdForMultipleChoice.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxBigBirdForMultipleChoice.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxBigBirdForMultipleChoice.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxBigBirdForMultipleChoice.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxBigBirdForMultipleChoice.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, num_choices, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxBigBirdForMultipleChoice.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1717",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig"
>BigBirdConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput"
>transformers.modeling_flax_outputs.FlaxMultipleChoiceModelOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Vo=new V({props:{$$slots:{default:[x0]},$$scope:{ctx:$}}}),Xo=new j({props:{anchor:"transformers.FlaxBigBirdForMultipleChoice.__call__.example",$$slots:{default:[E0]},$$scope:{ctx:$}}}),Ka=new E({}),er=new x({props:{name:"class transformers.FlaxBigBirdForTokenClassification",anchor:"transformers.FlaxBigBirdForTokenClassification",parameters:[{name:"config",val:": BigBirdConfig"},{name:"input_shape",val:": typing.Optional[tuple] = None"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBigBirdForTokenClassification.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig">BigBirdConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBigBirdForTokenClassification.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_flax_big_bird.py#L2329"}}),lr=new x({props:{name:"__call__",anchor:"transformers.FlaxBigBirdForTokenClassification.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"encoder_hidden_states",val:" = None"},{name:"encoder_attention_mask",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": typing.Optional[PRNGKey] = None"},{name:"indices_rng",val:": typing.Optional[PRNGKey] = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"},{name:"past_key_values",val:": dict = None"}],parametersDescription:[{anchor:"transformers.FlaxBigBirdForTokenClassification.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxBigBirdForTokenClassification.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxBigBirdForTokenClassification.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxBigBirdForTokenClassification.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxBigBirdForTokenClassification.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxBigBirdForTokenClassification.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_flax_big_bird.py#L1717",returnDescription:`
<p>A <a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig"
>BigBirdConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>logits</strong> (<code>jnp.ndarray</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(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><a
  href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.modeling_flax_outputs.FlaxTokenClassifierOutput"
>transformers.modeling_flax_outputs.FlaxTokenClassifierOutput</a> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Oo=new V({props:{$$slots:{default:[j0]},$$scope:{ctx:$}}}),Do=new j({props:{anchor:"transformers.FlaxBigBirdForTokenClassification.__call__.example",$$slots:{default:[z0]},$$scope:{ctx:$}}}),dr=new E({}),cr=new x({props:{name:"class transformers.FlaxBigBirdForQuestionAnswering",anchor:"transformers.FlaxBigBirdForQuestionAnswering",parameters:[{name:"config",val:": BigBirdConfig"},{name:"input_shape",val:": typing.Optional[tuple] = None"},{name:"seed",val:": int = 0"},{name:"dtype",val:": dtype = <class 'jax.numpy.float32'>"},{name:"_do_init",val:": bool = True"},{name:"gradient_checkpointing",val:": bool = False"},{name:"**kwargs",val:""}],parametersDescription:[{anchor:"transformers.FlaxBigBirdForQuestionAnswering.config",description:`<strong>config</strong> (<a href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig">BigBirdConfig</a>) &#x2014; Model configuration class with all the parameters of the model.
Initializing with a config file does not load the weights associated with the model, only the
configuration. Check out the <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.from_pretrained">from_pretrained()</a> method to load the model weights.`,name:"config"},{anchor:"transformers.FlaxBigBirdForQuestionAnswering.dtype",description:`<strong>dtype</strong> (<code>jax.numpy.dtype</code>, <em>optional</em>, defaults to <code>jax.numpy.float32</code>) &#x2014;
The data type of the computation. Can be one of <code>jax.numpy.float32</code>, <code>jax.numpy.float16</code> (on GPUs) and
<code>jax.numpy.bfloat16</code> (on TPUs).</p>
<p>This can be used to enable mixed-precision training or half-precision inference on GPUs or TPUs. If
specified all the computation will be performed with the given <code>dtype</code>.</p>
<p><strong>Note that this only specifies the dtype of the computation and does not influence the dtype of model
parameters.</strong></p>
<p>If you wish to change the dtype of the model parameters, see <a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_fp16">to_fp16()</a> and
<a href="/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel.to_bf16">to_bf16()</a>.`,name:"dtype"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_flax_big_bird.py#L2432"}}),br=new x({props:{name:"__call__",anchor:"transformers.FlaxBigBirdForQuestionAnswering.__call__",parameters:[{name:"input_ids",val:""},{name:"attention_mask",val:" = None"},{name:"token_type_ids",val:" = None"},{name:"position_ids",val:" = None"},{name:"head_mask",val:" = None"},{name:"question_lengths",val:" = None"},{name:"params",val:": dict = None"},{name:"dropout_rng",val:": typing.Optional[PRNGKey] = None"},{name:"indices_rng",val:": typing.Optional[PRNGKey] = None"},{name:"train",val:": bool = False"},{name:"output_attentions",val:": typing.Optional[bool] = None"},{name:"output_hidden_states",val:": typing.Optional[bool] = None"},{name:"return_dict",val:": typing.Optional[bool] = None"}],parametersDescription:[{anchor:"transformers.FlaxBigBirdForQuestionAnswering.__call__.input_ids",description:`<strong>input_ids</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) &#x2014;
Indices of input sequence tokens in the vocabulary.</p>
<p>Indices can be obtained using <a href="/docs/transformers/v4.32.0/en/model_doc/auto#transformers.AutoTokenizer">AutoTokenizer</a>. See <a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.encode">PreTrainedTokenizer.encode()</a> and
<a href="/docs/transformers/v4.32.0/en/internal/tokenization_utils#transformers.PreTrainedTokenizerBase.__call__">PreTrainedTokenizer.<strong>call</strong>()</a> for details.</p>
<p><a href="../glossary#input-ids">What are input IDs?</a>`,name:"input_ids"},{anchor:"transformers.FlaxBigBirdForQuestionAnswering.__call__.attention_mask",description:`<strong>attention_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <em>optional</em>) &#x2014;
Mask to avoid performing attention on padding token indices. Mask values selected in <code>[0, 1]</code>:</p>
<ul>
<li>1 for tokens that are <strong>not masked</strong>,</li>
<li>0 for tokens that are <strong>masked</strong>.</li>
</ul>
<p><a href="../glossary#attention-mask">What are attention masks?</a>`,name:"attention_mask"},{anchor:"transformers.FlaxBigBirdForQuestionAnswering.__call__.token_type_ids",description:`<strong>token_type_ids</strong> (<code>numpy.ndarray</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.FlaxBigBirdForQuestionAnswering.__call__.position_ids",description:`<strong>position_ids</strong> (<code>numpy.ndarray</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>.`,name:"position_ids"},{anchor:"transformers.FlaxBigBirdForQuestionAnswering.__call__.head_mask",description:`<strong>head_mask</strong> (<code>numpy.ndarray</code> of shape <code>(batch_size, sequence_length)</code>, <code>optional) -- Mask to nullify selected heads of the attention modules. Mask values selected in </code>[0, 1]\`:</p>
<ul>
<li>1 indicates the head is <strong>not masked</strong>,</li>
<li>0 indicates the head is <strong>masked</strong>.</li>
</ul>`,name:"head_mask"},{anchor:"transformers.FlaxBigBirdForQuestionAnswering.__call__.return_dict",description:`<strong>return_dict</strong> (<code>bool</code>, <em>optional</em>) &#x2014;
Whether or not to return a <a href="/docs/transformers/v4.32.0/en/main_classes/output#transformers.utils.ModelOutput">ModelOutput</a> instead of a plain tuple.`,name:"return_dict"}],source:"https://github.com/huggingface/transformers/blob/v4.32.0/src/transformers/models/big_bird/modeling_flax_big_bird.py#L2435",returnDescription:`
<p>A <code>transformers.models.big_bird.modeling_flax_big_bird.FlaxBigBirdForQuestionAnsweringModelOutput</code> or a tuple of
<code>torch.FloatTensor</code> (if <code>return_dict=False</code> is passed or when <code>config.return_dict=False</code>) comprising various
elements depending on the configuration (<a
  href="/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdConfig"
>BigBirdConfig</a>) and inputs.</p>
<ul>
<li>
<p><strong>start_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-start scores (before SoftMax).</p>
</li>
<li>
<p><strong>end_logits</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, sequence_length)</code>) \u2014 Span-end scores (before SoftMax).</p>
</li>
<li>
<p><strong>pooled_output</strong> (<code>jnp.ndarray</code> of shape <code>(batch_size, hidden_size)</code>) \u2014 pooled_output returned by FlaxBigBirdModel.</p>
</li>
<li>
<p><strong>hidden_states</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for the output of the embeddings + one for the output of each layer) of shape
<code>(batch_size, sequence_length, hidden_size)</code>.</p>
<p>Hidden-states of the model at the output of each layer plus the initial embedding outputs.</p>
</li>
<li>
<p><strong>attentions</strong> (<code>tuple(jnp.ndarray)</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>jnp.ndarray</code> (one for each layer) of shape <code>(batch_size, num_heads, sequence_length, sequence_length)</code>.</p>
<p>Attentions weights after the attention softmax, used to compute the weighted average in the self-attention
heads.</p>
</li>
</ul>
`,returnType:`
<p><code>transformers.models.big_bird.modeling_flax_big_bird.FlaxBigBirdForQuestionAnsweringModelOutput</code> or <code>tuple(torch.FloatTensor)</code></p>
`}}),Yo=new V({props:{$$slots:{default:[J0]},$$scope:{ctx:$}}}),Ko=new j({props:{anchor:"transformers.FlaxBigBirdForQuestionAnswering.__call__.example",$$slots:{default:[C0]},$$scope:{ctx:$}}}),{c(){d=n("meta"),b=p(),u=n("h1"),f=n("a"),_=n("span"),v(l.$$.fragment),m=p(),F=n("span"),sm=r("BigBird"),ip=p(),Oe=n("h2"),St=n("a"),Pi=n("span"),v(En.$$.fragment),am=p(),Zi=n("span"),rm=r("Overview"),lp=p(),Rt=n("p"),im=r("The BigBird model was proposed in "),jn=n("a"),lm=r("Big Bird: Transformers for Longer Sequences"),dm=r(` by
Zaheer, Manzil and Guruganesh, Guru and Dubey, Kumar Avinava and Ainslie, Joshua and Alberti, Chris and Ontanon,
Santiago and Pham, Philip and Ravula, Anirudh and Wang, Qifan and Yang, Li and others. BigBird, is a sparse-attention
based transformer which extends Transformer based models, such as BERT to much longer sequences. In addition to sparse
attention, BigBird also applies global attention as well as random attention to the input sequence. Theoretically, it
has been shown that applying sparse, global, and random attention approximates full attention, while being
computationally much more efficient for longer sequences. As a consequence of the capability to handle longer context,
BigBird has shown improved performance on various long document NLP tasks, such as question answering and
summarization, compared to BERT or RoBERTa.`),dp=p(),Mr=n("p"),cm=r("The abstract from the paper is the following:"),cp=p(),$r=n("p"),Ai=n("em"),pm=r(`Transformers-based models, such as BERT, have been one of the most successful deep learning models for NLP.
Unfortunately, one of their core limitations is the quadratic dependency (mainly in terms of memory) on the sequence
length due to their full attention mechanism. To remedy this, we propose, BigBird, a sparse attention mechanism that
reduces this quadratic dependency to linear. We show that BigBird is a universal approximator of sequence functions and
is Turing complete, thereby preserving these properties of the quadratic, full attention model. Along the way, our
theoretical analysis reveals some of the benefits of having O(1) global tokens (such as CLS), that attend to the entire
sequence as part of the sparse attention mechanism. The proposed sparse attention can handle sequences of length up to
8x of what was previously possible using similar hardware. As a consequence of the capability to handle longer context,
BigBird drastically improves performance on various NLP tasks such as question answering and summarization. We also
propose novel applications to genomics data.`),pp=p(),Fr=n("p"),hm=r("Tips:"),hp=p(),G=n("ul"),zn=n("li"),mm=r("For an in-detail explanation on how BigBird\u2019s attention works, see "),Jn=n("a"),um=r("this blog post"),fm=r("."),gm=p(),de=n("li"),_m=r("BigBird comes with 2 implementations: "),Wi=n("strong"),bm=r("original_full"),ym=r(" & "),Gi=n("strong"),vm=r("block_sparse"),km=r(`. For the sequence length < 1024, using
`),Li=n("strong"),Bm=r("original_full"),Tm=r(" is advised as there is no benefit in using "),Si=n("strong"),wm=r("block_sparse"),Mm=r(" attention."),$m=p(),Ri=n("li"),Fm=r("The code currently uses window size of 3 blocks and 2 global blocks."),xm=p(),Vi=n("li"),Em=r("Sequence length must be divisible by block size."),jm=p(),Cn=n("li"),zm=r("Current implementation supports only "),Xi=n("strong"),Jm=r("ITC"),Cm=r("."),Im=p(),xr=n("li"),Um=r("Current implementation doesn\u2019t support "),Qi=n("strong"),qm=r("num_random_blocks = 0"),Nm=p(),Oi=n("li"),Pm=r(`BigBird is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather than
the left.`),mp=p(),We=n("p"),Zm=r("This model was contributed by "),In=n("a"),Am=r("vasudevgupta"),Wm=r(`. The original code can be found
`),Un=n("a"),Gm=r("here"),Lm=r("."),up=p(),De=n("h2"),Vt=n("a"),Di=n("span"),v(qn.$$.fragment),Sm=p(),Hi=n("span"),Rm=r("Documentation resources"),fp=p(),R=n("ul"),Yi=n("li"),Er=n("a"),Vm=r("Text classification task guide"),Xm=p(),Ki=n("li"),jr=n("a"),Qm=r("Token classification task guide"),Om=p(),el=n("li"),zr=n("a"),Dm=r("Question answering task guide"),Hm=p(),tl=n("li"),Jr=n("a"),Ym=r("Causal language modeling task guide"),Km=p(),ol=n("li"),Cr=n("a"),eu=r("Masked language modeling task guide"),tu=p(),nl=n("li"),Ir=n("a"),ou=r("Multiple choice task guide"),gp=p(),He=n("h2"),Xt=n("a"),sl=n("span"),v(Nn.$$.fragment),nu=p(),al=n("span"),su=r("BigBirdConfig"),_p=p(),ce=n("div"),v(Pn.$$.fragment),au=p(),Ye=n("p"),ru=r("This is the configuration class to store the configuration of a "),Ur=n("a"),iu=r("BigBirdModel"),lu=r(`. It is used to instantiate an
BigBird 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 BigBird
`),Zn=n("a"),du=r("google/bigbird-roberta-base"),cu=r(" architecture."),pu=p(),Ke=n("p"),hu=r("Configuration objects inherit from "),qr=n("a"),mu=r("PretrainedConfig"),uu=r(` and can be used to control the model outputs. Read the
documentation from `),Nr=n("a"),fu=r("PretrainedConfig"),gu=r(" for more information."),_u=p(),v(Qt.$$.fragment),bp=p(),et=n("h2"),Ot=n("a"),rl=n("span"),v(An.$$.fragment),bu=p(),il=n("span"),yu=r("BigBirdTokenizer"),yp=p(),C=n("div"),v(Wn.$$.fragment),vu=p(),Gn=n("p"),ku=r("Construct a BigBird tokenizer. Based on "),Ln=n("a"),Bu=r("SentencePiece"),Tu=r("."),wu=p(),Sn=n("p"),Mu=r("This tokenizer inherits from "),Pr=n("a"),$u=r("PreTrainedTokenizer"),Fu=r(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),xu=p(),Ge=n("div"),v(Rn.$$.fragment),Eu=p(),ll=n("p"),ju=r(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Big Bird sequence has the following format:`),zu=p(),Vn=n("ul"),Zr=n("li"),Ju=r("single sequence: "),dl=n("code"),Cu=r("[CLS] X [SEP]"),Iu=p(),Ar=n("li"),Uu=r("pair of sequences: "),cl=n("code"),qu=r("[CLS] A [SEP] B [SEP]"),Nu=p(),Dt=n("div"),v(Xn.$$.fragment),Pu=p(),Qn=n("p"),Zu=r(`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),pl=n("code"),Au=r("prepare_for_model"),Wu=r(" method."),Gu=p(),Ht=n("div"),v(On.$$.fragment),Lu=p(),tt=n("p"),Su=r(`Create a mask from the two sequences passed to be used in a sequence-pair classification task. A BERT sequence
pair mask has the following format: :: 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 | first sequence | second
sequence | If `),hl=n("code"),Ru=r("token_ids_1"),Vu=r(" is "),ml=n("code"),Xu=r("None"),Qu=r(", this method only returns the first portion of the mask (0s)."),Ou=p(),Wr=n("div"),v(Dn.$$.fragment),vp=p(),ot=n("h2"),Yt=n("a"),ul=n("span"),v(Hn.$$.fragment),Du=p(),fl=n("span"),Hu=r("BigBirdTokenizerFast"),kp=p(),X=n("div"),v(Yn.$$.fragment),Yu=p(),je=n("p"),Ku=r("Construct a \u201Cfast\u201D BigBird tokenizer (backed by HuggingFace\u2019s "),gl=n("em"),ef=r("tokenizers"),tf=r(` library). Based on
`),Kn=n("a"),of=r("Unigram"),nf=r(`. This
tokenizer inherits from `),Gr=n("a"),sf=r("PreTrainedTokenizerFast"),af=r(` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods`),rf=p(),Le=n("div"),v(es.$$.fragment),lf=p(),_l=n("p"),df=r(`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An BigBird sequence has the following format:`),cf=p(),ts=n("ul"),Lr=n("li"),pf=r("single sequence: "),bl=n("code"),hf=r("[CLS] X [SEP]"),mf=p(),Sr=n("li"),uf=r("pair of sequences: "),yl=n("code"),ff=r("[CLS] A [SEP] B [SEP]"),gf=p(),ge=n("div"),v(os.$$.fragment),_f=p(),vl=n("p"),bf=r("Creates a mask from the two sequences passed to be used in a sequence-pair classification task. An ALBERT"),yf=p(),v(Kt.$$.fragment),vf=p(),kl=n("p"),kf=r("if token_ids_1 is None, only returns the first portion of the mask (0s)."),Bf=p(),eo=n("div"),v(ns.$$.fragment),Tf=p(),ss=n("p"),wf=r(`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Bl=n("code"),Mf=r("prepare_for_model"),$f=r(" method."),Bp=p(),nt=n("h2"),to=n("a"),Tl=n("span"),v(as.$$.fragment),Ff=p(),wl=n("span"),xf=r("BigBird specific outputs"),Tp=p(),st=n("div"),v(rs.$$.fragment),Ef=p(),is=n("p"),jf=r("Output type of "),Rr=n("a"),zf=r("BigBirdForPreTraining"),Jf=r("."),wp=p(),at=n("h2"),oo=n("a"),Ml=n("span"),v(ls.$$.fragment),Cf=p(),$l=n("span"),If=r("BigBirdModel"),Mp=p(),Q=n("div"),v(ds.$$.fragment),Uf=p(),cs=n("p"),qf=r(`The bare BigBird Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),ps=n("a"),Nf=r("torch.nn.Module"),Pf=r(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Zf=p(),hs=n("p"),Af=r(`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),ms=n("a"),Wf=r(`Attention is
all you need`),Gf=r(` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),Lf=p(),L=n("p"),Sf=r("To behave as an decoder the model needs to be initialized with the "),Fl=n("code"),Rf=r("is_decoder"),Vf=r(` argument of the configuration set
to `),xl=n("code"),Xf=r("True"),Qf=r(". To be used in a Seq2Seq model, the model needs to initialized with both "),El=n("code"),Of=r("is_decoder"),Df=r(` argument and
`),jl=n("code"),Hf=r("add_cross_attention"),Yf=r(" set to "),zl=n("code"),Kf=r("True"),eg=r("; an "),Jl=n("code"),tg=r("encoder_hidden_states"),og=r(" is then expected as an input to the forward pass."),ng=p(),_e=n("div"),v(us.$$.fragment),sg=p(),rt=n("p"),ag=r("The "),Vr=n("a"),rg=r("BigBirdModel"),ig=r(" forward method, overrides the "),Cl=n("code"),lg=r("__call__"),dg=r(" special method."),cg=p(),v(no.$$.fragment),pg=p(),v(so.$$.fragment),$p=p(),it=n("h2"),ao=n("a"),Il=n("span"),v(fs.$$.fragment),hg=p(),Ul=n("span"),mg=r("BigBirdForPreTraining"),Fp=p(),lt=n("div"),v(gs.$$.fragment),ug=p(),be=n("div"),v(_s.$$.fragment),fg=p(),dt=n("p"),gg=r("The "),Xr=n("a"),_g=r("BigBirdForPreTraining"),bg=r(" forward method, overrides the "),ql=n("code"),yg=r("__call__"),vg=r(" special method."),kg=p(),v(ro.$$.fragment),Bg=p(),v(io.$$.fragment),xp=p(),ct=n("h2"),lo=n("a"),Nl=n("span"),v(bs.$$.fragment),Tg=p(),Pl=n("span"),wg=r("BigBirdForCausalLM"),Ep=p(),ze=n("div"),v(ys.$$.fragment),Mg=p(),pt=n("p"),$g=r("BigBird Model with a "),Zl=n("code"),Fg=r("language modeling"),xg=r(` head on top for CLM fine-tuning.
This model is a PyTorch `),vs=n("a"),Eg=r("torch.nn.Module"),jg=r(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),zg=p(),ye=n("div"),v(ks.$$.fragment),Jg=p(),ht=n("p"),Cg=r("The "),Qr=n("a"),Ig=r("BigBirdForCausalLM"),Ug=r(" forward method, overrides the "),Al=n("code"),qg=r("__call__"),Ng=r(" special method."),Pg=p(),v(co.$$.fragment),Zg=p(),v(po.$$.fragment),jp=p(),mt=n("h2"),ho=n("a"),Wl=n("span"),v(Bs.$$.fragment),Ag=p(),Gl=n("span"),Wg=r("BigBirdForMaskedLM"),zp=p(),Je=n("div"),v(Ts.$$.fragment),Gg=p(),ut=n("p"),Lg=r("BigBird Model with a "),Ll=n("code"),Sg=r("language modeling"),Rg=r(` head on top.
This model is a PyTorch `),ws=n("a"),Vg=r("torch.nn.Module"),Xg=r(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Qg=p(),D=n("div"),v(Ms.$$.fragment),Og=p(),ft=n("p"),Dg=r("The "),Or=n("a"),Hg=r("BigBirdForMaskedLM"),Yg=r(" forward method, overrides the "),Sl=n("code"),Kg=r("__call__"),e_=r(" special method."),t_=p(),v(mo.$$.fragment),o_=p(),v(uo.$$.fragment),n_=p(),v(fo.$$.fragment),Jp=p(),gt=n("h2"),go=n("a"),Rl=n("span"),v($s.$$.fragment),s_=p(),Vl=n("span"),a_=r("BigBirdForSequenceClassification"),Cp=p(),pe=n("div"),v(Fs.$$.fragment),r_=p(),Xl=n("p"),i_=r(`BigBird Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),l_=p(),xs=n("p"),d_=r("This model is a PyTorch "),Es=n("a"),c_=r("torch.nn.Module"),p_=r(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),h_=p(),H=n("div"),v(js.$$.fragment),m_=p(),_t=n("p"),u_=r("The "),Dr=n("a"),f_=r("BigBirdForSequenceClassification"),g_=r(" forward method, overrides the "),Ql=n("code"),__=r("__call__"),b_=r(" special method."),y_=p(),v(_o.$$.fragment),v_=p(),v(bo.$$.fragment),k_=p(),v(yo.$$.fragment),Ip=p(),bt=n("h2"),vo=n("a"),Ol=n("span"),v(zs.$$.fragment),B_=p(),Dl=n("span"),T_=r("BigBirdForMultipleChoice"),Up=p(),he=n("div"),v(Js.$$.fragment),w_=p(),Hl=n("p"),M_=r(`BigBird 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.`),$_=p(),Cs=n("p"),F_=r("This model is a PyTorch "),Is=n("a"),x_=r("torch.nn.Module"),E_=r(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),j_=p(),ve=n("div"),v(Us.$$.fragment),z_=p(),yt=n("p"),J_=r("The "),Hr=n("a"),C_=r("BigBirdForMultipleChoice"),I_=r(" forward method, overrides the "),Yl=n("code"),U_=r("__call__"),q_=r(" special method."),N_=p(),v(ko.$$.fragment),P_=p(),v(Bo.$$.fragment),qp=p(),vt=n("h2"),To=n("a"),Kl=n("span"),v(qs.$$.fragment),Z_=p(),ed=n("span"),A_=r("BigBirdForTokenClassification"),Np=p(),me=n("div"),v(Ns.$$.fragment),W_=p(),td=n("p"),G_=r(`BigBird 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.`),L_=p(),Ps=n("p"),S_=r("This model is a PyTorch "),Zs=n("a"),R_=r("torch.nn.Module"),V_=r(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),X_=p(),ke=n("div"),v(As.$$.fragment),Q_=p(),kt=n("p"),O_=r("The "),Yr=n("a"),D_=r("BigBirdForTokenClassification"),H_=r(" forward method, overrides the "),od=n("code"),Y_=r("__call__"),K_=r(" special method."),eb=p(),v(wo.$$.fragment),tb=p(),v(Mo.$$.fragment),Pp=p(),Bt=n("h2"),$o=n("a"),nd=n("span"),v(Ws.$$.fragment),ob=p(),sd=n("span"),nb=r("BigBirdForQuestionAnswering"),Zp=p(),ue=n("div"),v(Gs.$$.fragment),sb=p(),Tt=n("p"),ab=r(`BigBird 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 `),ad=n("code"),rb=r("span start logits"),ib=r(" and "),rd=n("code"),lb=r("span end logits"),db=r(")."),cb=p(),Ls=n("p"),pb=r("This model is a PyTorch "),Ss=n("a"),hb=r("torch.nn.Module"),mb=r(` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ub=p(),Y=n("div"),v(Rs.$$.fragment),fb=p(),wt=n("p"),gb=r("The "),Kr=n("a"),_b=r("BigBirdForQuestionAnswering"),bb=r(" forward method, overrides the "),id=n("code"),yb=r("__call__"),vb=r(" special method."),kb=p(),v(Fo.$$.fragment),Bb=p(),v(xo.$$.fragment),Tb=p(),v(Eo.$$.fragment),Ap=p(),Mt=n("h2"),jo=n("a"),ld=n("span"),v(Vs.$$.fragment),wb=p(),dd=n("span"),Mb=r("FlaxBigBirdModel"),Wp=p(),I=n("div"),v(Xs.$$.fragment),$b=p(),cd=n("p"),Fb=r("The bare BigBird Model transformer outputting raw hidden-states without any specific head on top."),xb=p(),Qs=n("p"),Eb=r("This model inherits from "),ei=n("a"),jb=r("FlaxPreTrainedModel"),zb=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Jb=p(),Os=n("p"),Cb=r("This model is also a Flax Linen "),Ds=n("a"),Ib=r("flax.linen.Module"),Ub=r(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),qb=p(),pd=n("p"),Nb=r("Finally, this model supports inherent JAX features such as:"),Pb=p(),Ce=n("ul"),hd=n("li"),Hs=n("a"),Zb=r("Just-In-Time (JIT) compilation"),Ab=p(),md=n("li"),Ys=n("a"),Wb=r("Automatic Differentiation"),Gb=p(),ud=n("li"),Ks=n("a"),Lb=r("Vectorization"),Sb=p(),fd=n("li"),ea=n("a"),Rb=r("Parallelization"),Vb=p(),Be=n("div"),v(ta.$$.fragment),Xb=p(),$t=n("p"),Qb=r("The "),gd=n("code"),Ob=r("FlaxBigBirdPreTrainedModel"),Db=r(" forward method, overrides the "),_d=n("code"),Hb=r("__call__"),Yb=r(" special method."),Kb=p(),v(zo.$$.fragment),ey=p(),v(Jo.$$.fragment),Gp=p(),Ft=n("h2"),Co=n("a"),bd=n("span"),v(oa.$$.fragment),ty=p(),yd=n("span"),oy=r("FlaxBigBirdForPreTraining"),Lp=p(),U=n("div"),v(na.$$.fragment),ny=p(),xt=n("p"),sy=r("BigBird Model with two heads on top as done during the pretraining: a "),vd=n("code"),ay=r("masked language modeling"),ry=r(" head and a "),kd=n("code"),iy=r("next sentence prediction (classification)"),ly=r(" head."),dy=p(),sa=n("p"),cy=r("This model inherits from "),ti=n("a"),py=r("FlaxPreTrainedModel"),hy=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),my=p(),aa=n("p"),uy=r("This model is also a Flax Linen "),ra=n("a"),fy=r("flax.linen.Module"),gy=r(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),_y=p(),Bd=n("p"),by=r("Finally, this model supports inherent JAX features such as:"),yy=p(),Ie=n("ul"),Td=n("li"),ia=n("a"),vy=r("Just-In-Time (JIT) compilation"),ky=p(),wd=n("li"),la=n("a"),By=r("Automatic Differentiation"),Ty=p(),Md=n("li"),da=n("a"),wy=r("Vectorization"),My=p(),$d=n("li"),ca=n("a"),$y=r("Parallelization"),Fy=p(),Te=n("div"),v(pa.$$.fragment),xy=p(),Et=n("p"),Ey=r("The "),Fd=n("code"),jy=r("FlaxBigBirdPreTrainedModel"),zy=r(" forward method, overrides the "),xd=n("code"),Jy=r("__call__"),Cy=r(" special method."),Iy=p(),v(Io.$$.fragment),Uy=p(),v(Uo.$$.fragment),Sp=p(),jt=n("h2"),qo=n("a"),Ed=n("span"),v(ha.$$.fragment),qy=p(),jd=n("span"),Ny=r("FlaxBigBirdForCausalLM"),Rp=p(),q=n("div"),v(ma.$$.fragment),Py=p(),zd=n("p"),Zy=r(`BigBird Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),Ay=p(),ua=n("p"),Wy=r("This model inherits from "),oi=n("a"),Gy=r("FlaxPreTrainedModel"),Ly=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Sy=p(),fa=n("p"),Ry=r("This model is also a Flax Linen "),ga=n("a"),Vy=r("flax.linen.Module"),Xy=r(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Qy=p(),Jd=n("p"),Oy=r("Finally, this model supports inherent JAX features such as:"),Dy=p(),Ue=n("ul"),Cd=n("li"),_a=n("a"),Hy=r("Just-In-Time (JIT) compilation"),Yy=p(),Id=n("li"),ba=n("a"),Ky=r("Automatic Differentiation"),ev=p(),Ud=n("li"),ya=n("a"),tv=r("Vectorization"),ov=p(),qd=n("li"),va=n("a"),nv=r("Parallelization"),sv=p(),we=n("div"),v(ka.$$.fragment),av=p(),zt=n("p"),rv=r("The "),Nd=n("code"),iv=r("FlaxBigBirdPreTrainedModel"),lv=r(" forward method, overrides the "),Pd=n("code"),dv=r("__call__"),cv=r(" special method."),pv=p(),v(No.$$.fragment),hv=p(),v(Po.$$.fragment),Vp=p(),Jt=n("h2"),Zo=n("a"),Zd=n("span"),v(Ba.$$.fragment),mv=p(),Ad=n("span"),uv=r("FlaxBigBirdForMaskedLM"),Xp=p(),N=n("div"),v(Ta.$$.fragment),fv=p(),wa=n("p"),gv=r("BigBird Model with a "),Wd=n("code"),_v=r("language modeling"),bv=r(" head on top."),yv=p(),Ma=n("p"),vv=r("This model inherits from "),ni=n("a"),kv=r("FlaxPreTrainedModel"),Bv=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Tv=p(),$a=n("p"),wv=r("This model is also a Flax Linen "),Fa=n("a"),Mv=r("flax.linen.Module"),$v=r(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Fv=p(),Gd=n("p"),xv=r("Finally, this model supports inherent JAX features such as:"),Ev=p(),qe=n("ul"),Ld=n("li"),xa=n("a"),jv=r("Just-In-Time (JIT) compilation"),zv=p(),Sd=n("li"),Ea=n("a"),Jv=r("Automatic Differentiation"),Cv=p(),Rd=n("li"),ja=n("a"),Iv=r("Vectorization"),Uv=p(),Vd=n("li"),za=n("a"),qv=r("Parallelization"),Nv=p(),Me=n("div"),v(Ja.$$.fragment),Pv=p(),Ct=n("p"),Zv=r("The "),Xd=n("code"),Av=r("FlaxBigBirdPreTrainedModel"),Wv=r(" forward method, overrides the "),Qd=n("code"),Gv=r("__call__"),Lv=r(" special method."),Sv=p(),v(Ao.$$.fragment),Rv=p(),v(Wo.$$.fragment),Qp=p(),It=n("h2"),Go=n("a"),Od=n("span"),v(Ca.$$.fragment),Vv=p(),Dd=n("span"),Xv=r("FlaxBigBirdForSequenceClassification"),Op=p(),P=n("div"),v(Ia.$$.fragment),Qv=p(),Hd=n("p"),Ov=r(`BigBird Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Dv=p(),Ua=n("p"),Hv=r("This model inherits from "),si=n("a"),Yv=r("FlaxPreTrainedModel"),Kv=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),ek=p(),qa=n("p"),tk=r("This model is also a Flax Linen "),Na=n("a"),ok=r("flax.linen.Module"),nk=r(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),sk=p(),Yd=n("p"),ak=r("Finally, this model supports inherent JAX features such as:"),rk=p(),Ne=n("ul"),Kd=n("li"),Pa=n("a"),ik=r("Just-In-Time (JIT) compilation"),lk=p(),ec=n("li"),Za=n("a"),dk=r("Automatic Differentiation"),ck=p(),tc=n("li"),Aa=n("a"),pk=r("Vectorization"),hk=p(),oc=n("li"),Wa=n("a"),mk=r("Parallelization"),uk=p(),$e=n("div"),v(Ga.$$.fragment),fk=p(),Ut=n("p"),gk=r("The "),nc=n("code"),_k=r("FlaxBigBirdPreTrainedModel"),bk=r(" forward method, overrides the "),sc=n("code"),yk=r("__call__"),vk=r(" special method."),kk=p(),v(Lo.$$.fragment),Bk=p(),v(So.$$.fragment),Dp=p(),qt=n("h2"),Ro=n("a"),ac=n("span"),v(La.$$.fragment),Tk=p(),rc=n("span"),wk=r("FlaxBigBirdForMultipleChoice"),Hp=p(),Z=n("div"),v(Sa.$$.fragment),Mk=p(),ic=n("p"),$k=r(`BigBird 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.`),Fk=p(),Ra=n("p"),xk=r("This model inherits from "),ai=n("a"),Ek=r("FlaxPreTrainedModel"),jk=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),zk=p(),Va=n("p"),Jk=r("This model is also a Flax Linen "),Xa=n("a"),Ck=r("flax.linen.Module"),Ik=r(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Uk=p(),lc=n("p"),qk=r("Finally, this model supports inherent JAX features such as:"),Nk=p(),Pe=n("ul"),dc=n("li"),Qa=n("a"),Pk=r("Just-In-Time (JIT) compilation"),Zk=p(),cc=n("li"),Oa=n("a"),Ak=r("Automatic Differentiation"),Wk=p(),pc=n("li"),Da=n("a"),Gk=r("Vectorization"),Lk=p(),hc=n("li"),Ha=n("a"),Sk=r("Parallelization"),Rk=p(),Fe=n("div"),v(Ya.$$.fragment),Vk=p(),Nt=n("p"),Xk=r("The "),mc=n("code"),Qk=r("FlaxBigBirdPreTrainedModel"),Ok=r(" forward method, overrides the "),uc=n("code"),Dk=r("__call__"),Hk=r(" special method."),Yk=p(),v(Vo.$$.fragment),Kk=p(),v(Xo.$$.fragment),Yp=p(),Pt=n("h2"),Qo=n("a"),fc=n("span"),v(Ka.$$.fragment),eB=p(),gc=n("span"),tB=r("FlaxBigBirdForTokenClassification"),Kp=p(),A=n("div"),v(er.$$.fragment),oB=p(),_c=n("p"),nB=r(`BigBird 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.`),sB=p(),tr=n("p"),aB=r("This model inherits from "),ri=n("a"),rB=r("FlaxPreTrainedModel"),iB=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),lB=p(),or=n("p"),dB=r("This model is also a Flax Linen "),nr=n("a"),cB=r("flax.linen.Module"),pB=r(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),hB=p(),bc=n("p"),mB=r("Finally, this model supports inherent JAX features such as:"),uB=p(),Ze=n("ul"),yc=n("li"),sr=n("a"),fB=r("Just-In-Time (JIT) compilation"),gB=p(),vc=n("li"),ar=n("a"),_B=r("Automatic Differentiation"),bB=p(),kc=n("li"),rr=n("a"),yB=r("Vectorization"),vB=p(),Bc=n("li"),ir=n("a"),kB=r("Parallelization"),BB=p(),xe=n("div"),v(lr.$$.fragment),TB=p(),Zt=n("p"),wB=r("The "),Tc=n("code"),MB=r("FlaxBigBirdPreTrainedModel"),$B=r(" forward method, overrides the "),wc=n("code"),FB=r("__call__"),xB=r(" special method."),EB=p(),v(Oo.$$.fragment),jB=p(),v(Do.$$.fragment),eh=p(),At=n("h2"),Ho=n("a"),Mc=n("span"),v(dr.$$.fragment),zB=p(),$c=n("span"),JB=r("FlaxBigBirdForQuestionAnswering"),th=p(),W=n("div"),v(cr.$$.fragment),CB=p(),Wt=n("p"),IB=r(`BigBird 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 `),Fc=n("code"),UB=r("span start logits"),qB=r(" and "),xc=n("code"),NB=r("span end logits"),PB=r(")."),ZB=p(),pr=n("p"),AB=r("This model inherits from "),ii=n("a"),WB=r("FlaxPreTrainedModel"),GB=r(`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),LB=p(),hr=n("p"),SB=r("This model is also a Flax Linen "),mr=n("a"),RB=r("flax.linen.Module"),VB=r(`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),XB=p(),Ec=n("p"),QB=r("Finally, this model supports inherent JAX features such as:"),OB=p(),Ae=n("ul"),jc=n("li"),ur=n("a"),DB=r("Just-In-Time (JIT) compilation"),HB=p(),zc=n("li"),fr=n("a"),YB=r("Automatic Differentiation"),KB=p(),Jc=n("li"),gr=n("a"),eT=r("Vectorization"),tT=p(),Cc=n("li"),_r=n("a"),oT=r("Parallelization"),nT=p(),Ee=n("div"),v(br.$$.fragment),sT=p(),Gt=n("p"),aT=r("The "),li=n("a"),rT=r("FlaxBigBirdForQuestionAnswering"),iT=r(" forward method, overrides the "),Ic=n("code"),lT=r("__call__"),dT=r(" special method."),cT=p(),v(Yo.$$.fragment),pT=p(),v(Ko.$$.fragment),this.h()},l(o){const g=O1('[data-svelte="svelte-1phssyn"]',document.head);d=s(g,"META",{name:!0,content:!0}),g.forEach(t),b=h(o),u=s(o,"H1",{class:!0});var yr=a(u);f=s(yr,"A",{id:!0,class:!0,href:!0});var Uc=a(f);_=s(Uc,"SPAN",{});var qc=a(_);k(l.$$.fragment,qc),qc.forEach(t),Uc.forEach(t),m=h(yr),F=s(yr,"SPAN",{});var Nc=a(F);sm=i(Nc,"BigBird"),Nc.forEach(t),yr.forEach(t),ip=h(o),Oe=s(o,"H2",{class:!0});var vr=a(Oe);St=s(vr,"A",{id:!0,class:!0,href:!0});var Pc=a(St);Pi=s(Pc,"SPAN",{});var Zc=a(Pi);k(En.$$.fragment,Zc),Zc.forEach(t),Pc.forEach(t),am=h(vr),Zi=s(vr,"SPAN",{});var Ac=a(Zi);rm=i(Ac,"Overview"),Ac.forEach(t),vr.forEach(t),lp=h(o),Rt=s(o,"P",{});var kr=a(Rt);im=i(kr,"The BigBird model was proposed in "),jn=s(kr,"A",{href:!0,rel:!0});var Wc=a(jn);lm=i(Wc,"Big Bird: Transformers for Longer Sequences"),Wc.forEach(t),dm=i(kr,` by
Zaheer, Manzil and Guruganesh, Guru and Dubey, Kumar Avinava and Ainslie, Joshua and Alberti, Chris and Ontanon,
Santiago and Pham, Philip and Ravula, Anirudh and Wang, Qifan and Yang, Li and others. BigBird, is a sparse-attention
based transformer which extends Transformer based models, such as BERT to much longer sequences. In addition to sparse
attention, BigBird also applies global attention as well as random attention to the input sequence. Theoretically, it
has been shown that applying sparse, global, and random attention approximates full attention, while being
computationally much more efficient for longer sequences. As a consequence of the capability to handle longer context,
BigBird has shown improved performance on various long document NLP tasks, such as question answering and
summarization, compared to BERT or RoBERTa.`),kr.forEach(t),dp=h(o),Mr=s(o,"P",{});var Gc=a(Mr);cm=i(Gc,"The abstract from the paper is the following:"),Gc.forEach(t),cp=h(o),$r=s(o,"P",{});var Lc=a($r);Ai=s(Lc,"EM",{});var Sc=a(Ai);pm=i(Sc,`Transformers-based models, such as BERT, have been one of the most successful deep learning models for NLP.
Unfortunately, one of their core limitations is the quadratic dependency (mainly in terms of memory) on the sequence
length due to their full attention mechanism. To remedy this, we propose, BigBird, a sparse attention mechanism that
reduces this quadratic dependency to linear. We show that BigBird is a universal approximator of sequence functions and
is Turing complete, thereby preserving these properties of the quadratic, full attention model. Along the way, our
theoretical analysis reveals some of the benefits of having O(1) global tokens (such as CLS), that attend to the entire
sequence as part of the sparse attention mechanism. The proposed sparse attention can handle sequences of length up to
8x of what was previously possible using similar hardware. As a consequence of the capability to handle longer context,
BigBird drastically improves performance on various NLP tasks such as question answering and summarization. We also
propose novel applications to genomics data.`),Sc.forEach(t),Lc.forEach(t),pp=h(o),Fr=s(o,"P",{});var Rc=a(Fr);hm=i(Rc,"Tips:"),Rc.forEach(t),hp=h(o),G=s(o,"UL",{});var S=a(G);zn=s(S,"LI",{});var Br=a(zn);mm=i(Br,"For an in-detail explanation on how BigBird\u2019s attention works, see "),Jn=s(Br,"A",{href:!0,rel:!0});var Vc=a(Jn);um=i(Vc,"this blog post"),Vc.forEach(t),fm=i(Br,"."),Br.forEach(t),gm=h(S),de=s(S,"LI",{});var fe=a(de);_m=i(fe,"BigBird comes with 2 implementations: "),Wi=s(fe,"STRONG",{});var Xc=a(Wi);bm=i(Xc,"original_full"),Xc.forEach(t),ym=i(fe," & "),Gi=s(fe,"STRONG",{});var Qc=a(Gi);vm=i(Qc,"block_sparse"),Qc.forEach(t),km=i(fe,`. For the sequence length < 1024, using
`),Li=s(fe,"STRONG",{});var Oc=a(Li);Bm=i(Oc,"original_full"),Oc.forEach(t),Tm=i(fe," is advised as there is no benefit in using "),Si=s(fe,"STRONG",{});var Dc=a(Si);wm=i(Dc,"block_sparse"),Dc.forEach(t),Mm=i(fe," attention."),fe.forEach(t),$m=h(S),Ri=s(S,"LI",{});var Hc=a(Ri);Fm=i(Hc,"The code currently uses window size of 3 blocks and 2 global blocks."),Hc.forEach(t),xm=h(S),Vi=s(S,"LI",{});var Yc=a(Vi);Em=i(Yc,"Sequence length must be divisible by block size."),Yc.forEach(t),jm=h(S),Cn=s(S,"LI",{});var Tr=a(Cn);zm=i(Tr,"Current implementation supports only "),Xi=s(Tr,"STRONG",{});var Kc=a(Xi);Jm=i(Kc,"ITC"),Kc.forEach(t),Cm=i(Tr,"."),Tr.forEach(t),Im=h(S),xr=s(S,"LI",{});var di=a(xr);Um=i(di,"Current implementation doesn\u2019t support "),Qi=s(di,"STRONG",{});var ep=a(Qi);qm=i(ep,"num_random_blocks = 0"),ep.forEach(t),di.forEach(t),Nm=h(S),Oi=s(S,"LI",{});var tp=a(Oi);Pm=i(tp,`BigBird is a model with absolute position embeddings so it\u2019s usually advised to pad the inputs on the right rather than
the left.`),tp.forEach(t),S.forEach(t),mp=h(o),We=s(o,"P",{});var Lt=a(We);Zm=i(Lt,"This model was contributed by "),In=s(Lt,"A",{href:!0,rel:!0});var op=a(In);Am=i(op,"vasudevgupta"),op.forEach(t),Wm=i(Lt,`. The original code can be found
`),Un=s(Lt,"A",{href:!0,rel:!0});var np=a(Un);Gm=i(np,"here"),np.forEach(t),Lm=i(Lt,"."),Lt.forEach(t),up=h(o),De=s(o,"H2",{class:!0});var wr=a(De);Vt=s(wr,"A",{id:!0,class:!0,href:!0});var sp=a(Vt);Di=s(sp,"SPAN",{});var ap=a(Di);k(qn.$$.fragment,ap),ap.forEach(t),sp.forEach(t),Sm=h(wr),Hi=s(wr,"SPAN",{});var rp=a(Hi);Rm=i(rp,"Documentation resources"),rp.forEach(t),wr.forEach(t),fp=h(o),R=s(o,"UL",{});var O=a(R);Yi=s(O,"LI",{});var gT=a(Yi);Er=s(gT,"A",{href:!0});var _T=a(Er);Vm=i(_T,"Text classification task guide"),_T.forEach(t),gT.forEach(t),Xm=h(O),Ki=s(O,"LI",{});var bT=a(Ki);jr=s(bT,"A",{href:!0});var yT=a(jr);Qm=i(yT,"Token classification task guide"),yT.forEach(t),bT.forEach(t),Om=h(O),el=s(O,"LI",{});var vT=a(el);zr=s(vT,"A",{href:!0});var kT=a(zr);Dm=i(kT,"Question answering task guide"),kT.forEach(t),vT.forEach(t),Hm=h(O),tl=s(O,"LI",{});var BT=a(tl);Jr=s(BT,"A",{href:!0});var TT=a(Jr);Ym=i(TT,"Causal language modeling task guide"),TT.forEach(t),BT.forEach(t),Km=h(O),ol=s(O,"LI",{});var wT=a(ol);Cr=s(wT,"A",{href:!0});var MT=a(Cr);eu=i(MT,"Masked language modeling task guide"),MT.forEach(t),wT.forEach(t),tu=h(O),nl=s(O,"LI",{});var $T=a(nl);Ir=s($T,"A",{href:!0});var FT=a(Ir);ou=i(FT,"Multiple choice task guide"),FT.forEach(t),$T.forEach(t),O.forEach(t),gp=h(o),He=s(o,"H2",{class:!0});var nh=a(He);Xt=s(nh,"A",{id:!0,class:!0,href:!0});var xT=a(Xt);sl=s(xT,"SPAN",{});var ET=a(sl);k(Nn.$$.fragment,ET),ET.forEach(t),xT.forEach(t),nu=h(nh),al=s(nh,"SPAN",{});var jT=a(al);su=i(jT,"BigBirdConfig"),jT.forEach(t),nh.forEach(t),_p=h(o),ce=s(o,"DIV",{class:!0});var en=a(ce);k(Pn.$$.fragment,en),au=h(en),Ye=s(en,"P",{});var ci=a(Ye);ru=i(ci,"This is the configuration class to store the configuration of a "),Ur=s(ci,"A",{href:!0});var zT=a(Ur);iu=i(zT,"BigBirdModel"),zT.forEach(t),lu=i(ci,`. It is used to instantiate an
BigBird 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 BigBird
`),Zn=s(ci,"A",{href:!0,rel:!0});var JT=a(Zn);du=i(JT,"google/bigbird-roberta-base"),JT.forEach(t),cu=i(ci," architecture."),ci.forEach(t),pu=h(en),Ke=s(en,"P",{});var pi=a(Ke);hu=i(pi,"Configuration objects inherit from "),qr=s(pi,"A",{href:!0});var CT=a(qr);mu=i(CT,"PretrainedConfig"),CT.forEach(t),uu=i(pi,` and can be used to control the model outputs. Read the
documentation from `),Nr=s(pi,"A",{href:!0});var IT=a(Nr);fu=i(IT,"PretrainedConfig"),IT.forEach(t),gu=i(pi," for more information."),pi.forEach(t),_u=h(en),k(Qt.$$.fragment,en),en.forEach(t),bp=h(o),et=s(o,"H2",{class:!0});var sh=a(et);Ot=s(sh,"A",{id:!0,class:!0,href:!0});var UT=a(Ot);rl=s(UT,"SPAN",{});var qT=a(rl);k(An.$$.fragment,qT),qT.forEach(t),UT.forEach(t),bu=h(sh),il=s(sh,"SPAN",{});var NT=a(il);yu=i(NT,"BigBirdTokenizer"),NT.forEach(t),sh.forEach(t),yp=h(o),C=s(o,"DIV",{class:!0});var K=a(C);k(Wn.$$.fragment,K),vu=h(K),Gn=s(K,"P",{});var ah=a(Gn);ku=i(ah,"Construct a BigBird tokenizer. Based on "),Ln=s(ah,"A",{href:!0,rel:!0});var PT=a(Ln);Bu=i(PT,"SentencePiece"),PT.forEach(t),Tu=i(ah,"."),ah.forEach(t),wu=h(K),Sn=s(K,"P",{});var rh=a(Sn);Mu=i(rh,"This tokenizer inherits from "),Pr=s(rh,"A",{href:!0});var ZT=a(Pr);$u=i(ZT,"PreTrainedTokenizer"),ZT.forEach(t),Fu=i(rh,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods.`),rh.forEach(t),xu=h(K),Ge=s(K,"DIV",{class:!0});var hi=a(Ge);k(Rn.$$.fragment,hi),Eu=h(hi),ll=s(hi,"P",{});var AT=a(ll);ju=i(AT,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. A Big Bird sequence has the following format:`),AT.forEach(t),zu=h(hi),Vn=s(hi,"UL",{});var ih=a(Vn);Zr=s(ih,"LI",{});var hT=a(Zr);Ju=i(hT,"single sequence: "),dl=s(hT,"CODE",{});var WT=a(dl);Cu=i(WT,"[CLS] X [SEP]"),WT.forEach(t),hT.forEach(t),Iu=h(ih),Ar=s(ih,"LI",{});var mT=a(Ar);Uu=i(mT,"pair of sequences: "),cl=s(mT,"CODE",{});var GT=a(cl);qu=i(GT,"[CLS] A [SEP] B [SEP]"),GT.forEach(t),mT.forEach(t),ih.forEach(t),hi.forEach(t),Nu=h(K),Dt=s(K,"DIV",{class:!0});var lh=a(Dt);k(Xn.$$.fragment,lh),Pu=h(lh),Qn=s(lh,"P",{});var dh=a(Qn);Zu=i(dh,`Retrieve sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),pl=s(dh,"CODE",{});var LT=a(pl);Au=i(LT,"prepare_for_model"),LT.forEach(t),Wu=i(dh," method."),dh.forEach(t),lh.forEach(t),Gu=h(K),Ht=s(K,"DIV",{class:!0});var ch=a(Ht);k(On.$$.fragment,ch),Lu=h(ch),tt=s(ch,"P",{});var mi=a(tt);Su=i(mi,`Create a mask from the two sequences passed to be used in a sequence-pair classification task. A BERT sequence
pair mask has the following format: :: 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 | first sequence | second
sequence | If `),hl=s(mi,"CODE",{});var ST=a(hl);Ru=i(ST,"token_ids_1"),ST.forEach(t),Vu=i(mi," is "),ml=s(mi,"CODE",{});var RT=a(ml);Xu=i(RT,"None"),RT.forEach(t),Qu=i(mi,", this method only returns the first portion of the mask (0s)."),mi.forEach(t),ch.forEach(t),Ou=h(K),Wr=s(K,"DIV",{class:!0});var VT=a(Wr);k(Dn.$$.fragment,VT),VT.forEach(t),K.forEach(t),vp=h(o),ot=s(o,"H2",{class:!0});var ph=a(ot);Yt=s(ph,"A",{id:!0,class:!0,href:!0});var XT=a(Yt);ul=s(XT,"SPAN",{});var QT=a(ul);k(Hn.$$.fragment,QT),QT.forEach(t),XT.forEach(t),Du=h(ph),fl=s(ph,"SPAN",{});var OT=a(fl);Hu=i(OT,"BigBirdTokenizerFast"),OT.forEach(t),ph.forEach(t),kp=h(o),X=s(o,"DIV",{class:!0});var Se=a(X);k(Yn.$$.fragment,Se),Yu=h(Se),je=s(Se,"P",{});var tn=a(je);Ku=i(tn,"Construct a \u201Cfast\u201D BigBird tokenizer (backed by HuggingFace\u2019s "),gl=s(tn,"EM",{});var DT=a(gl);ef=i(DT,"tokenizers"),DT.forEach(t),tf=i(tn,` library). Based on
`),Kn=s(tn,"A",{href:!0,rel:!0});var HT=a(Kn);of=i(HT,"Unigram"),HT.forEach(t),nf=i(tn,`. This
tokenizer inherits from `),Gr=s(tn,"A",{href:!0});var YT=a(Gr);sf=i(YT,"PreTrainedTokenizerFast"),YT.forEach(t),af=i(tn,` which contains most of the main methods. Users should refer to
this superclass for more information regarding those methods`),tn.forEach(t),rf=h(Se),Le=s(Se,"DIV",{class:!0});var ui=a(Le);k(es.$$.fragment,ui),lf=h(ui),_l=s(ui,"P",{});var KT=a(_l);df=i(KT,`Build model inputs from a sequence or a pair of sequence for sequence classification tasks by concatenating and
adding special tokens. An BigBird sequence has the following format:`),KT.forEach(t),cf=h(ui),ts=s(ui,"UL",{});var hh=a(ts);Lr=s(hh,"LI",{});var uT=a(Lr);pf=i(uT,"single sequence: "),bl=s(uT,"CODE",{});var ew=a(bl);hf=i(ew,"[CLS] X [SEP]"),ew.forEach(t),uT.forEach(t),mf=h(hh),Sr=s(hh,"LI",{});var fT=a(Sr);uf=i(fT,"pair of sequences: "),yl=s(fT,"CODE",{});var tw=a(yl);ff=i(tw,"[CLS] A [SEP] B [SEP]"),tw.forEach(t),fT.forEach(t),hh.forEach(t),ui.forEach(t),gf=h(Se),ge=s(Se,"DIV",{class:!0});var on=a(ge);k(os.$$.fragment,on),_f=h(on),vl=s(on,"P",{});var ow=a(vl);bf=i(ow,"Creates a mask from the two sequences passed to be used in a sequence-pair classification task. An ALBERT"),ow.forEach(t),yf=h(on),k(Kt.$$.fragment,on),vf=h(on),kl=s(on,"P",{});var nw=a(kl);kf=i(nw,"if token_ids_1 is None, only returns the first portion of the mask (0s)."),nw.forEach(t),on.forEach(t),Bf=h(Se),eo=s(Se,"DIV",{class:!0});var mh=a(eo);k(ns.$$.fragment,mh),Tf=h(mh),ss=s(mh,"P",{});var uh=a(ss);wf=i(uh,`Retrieves sequence ids from a token list that has no special tokens added. This method is called when adding
special tokens using the tokenizer `),Bl=s(uh,"CODE",{});var sw=a(Bl);Mf=i(sw,"prepare_for_model"),sw.forEach(t),$f=i(uh," method."),uh.forEach(t),mh.forEach(t),Se.forEach(t),Bp=h(o),nt=s(o,"H2",{class:!0});var fh=a(nt);to=s(fh,"A",{id:!0,class:!0,href:!0});var aw=a(to);Tl=s(aw,"SPAN",{});var rw=a(Tl);k(as.$$.fragment,rw),rw.forEach(t),aw.forEach(t),Ff=h(fh),wl=s(fh,"SPAN",{});var iw=a(wl);xf=i(iw,"BigBird specific outputs"),iw.forEach(t),fh.forEach(t),Tp=h(o),st=s(o,"DIV",{class:!0});var gh=a(st);k(rs.$$.fragment,gh),Ef=h(gh),is=s(gh,"P",{});var _h=a(is);jf=i(_h,"Output type of "),Rr=s(_h,"A",{href:!0});var lw=a(Rr);zf=i(lw,"BigBirdForPreTraining"),lw.forEach(t),Jf=i(_h,"."),_h.forEach(t),gh.forEach(t),wp=h(o),at=s(o,"H2",{class:!0});var bh=a(at);oo=s(bh,"A",{id:!0,class:!0,href:!0});var dw=a(oo);Ml=s(dw,"SPAN",{});var cw=a(Ml);k(ls.$$.fragment,cw),cw.forEach(t),dw.forEach(t),Cf=h(bh),$l=s(bh,"SPAN",{});var pw=a($l);If=i(pw,"BigBirdModel"),pw.forEach(t),bh.forEach(t),Mp=h(o),Q=s(o,"DIV",{class:!0});var Re=a(Q);k(ds.$$.fragment,Re),Uf=h(Re),cs=s(Re,"P",{});var yh=a(cs);qf=i(yh,`The bare BigBird Model transformer outputting raw hidden-states without any specific head on top.
This model is a PyTorch `),ps=s(yh,"A",{href:!0,rel:!0});var hw=a(ps);Nf=i(hw,"torch.nn.Module"),hw.forEach(t),Pf=i(yh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),yh.forEach(t),Zf=h(Re),hs=s(Re,"P",{});var vh=a(hs);Af=i(vh,`The model can behave as an encoder (with only self-attention) as well as a decoder, in which case a layer of
cross-attention is added between the self-attention layers, following the architecture described in `),ms=s(vh,"A",{href:!0,rel:!0});var mw=a(ms);Wf=i(mw,`Attention is
all you need`),mw.forEach(t),Gf=i(vh,` by Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit,
Llion Jones, Aidan N. Gomez, Lukasz Kaiser and Illia Polosukhin.`),vh.forEach(t),Lf=h(Re),L=s(Re,"P",{});var ee=a(L);Sf=i(ee,"To behave as an decoder the model needs to be initialized with the "),Fl=s(ee,"CODE",{});var uw=a(Fl);Rf=i(uw,"is_decoder"),uw.forEach(t),Vf=i(ee,` argument of the configuration set
to `),xl=s(ee,"CODE",{});var fw=a(xl);Xf=i(fw,"True"),fw.forEach(t),Qf=i(ee,". To be used in a Seq2Seq model, the model needs to initialized with both "),El=s(ee,"CODE",{});var gw=a(El);Of=i(gw,"is_decoder"),gw.forEach(t),Df=i(ee,` argument and
`),jl=s(ee,"CODE",{});var _w=a(jl);Hf=i(_w,"add_cross_attention"),_w.forEach(t),Yf=i(ee," set to "),zl=s(ee,"CODE",{});var bw=a(zl);Kf=i(bw,"True"),bw.forEach(t),eg=i(ee,"; an "),Jl=s(ee,"CODE",{});var yw=a(Jl);tg=i(yw,"encoder_hidden_states"),yw.forEach(t),og=i(ee," is then expected as an input to the forward pass."),ee.forEach(t),ng=h(Re),_e=s(Re,"DIV",{class:!0});var nn=a(_e);k(us.$$.fragment,nn),sg=h(nn),rt=s(nn,"P",{});var fi=a(rt);ag=i(fi,"The "),Vr=s(fi,"A",{href:!0});var vw=a(Vr);rg=i(vw,"BigBirdModel"),vw.forEach(t),ig=i(fi," forward method, overrides the "),Cl=s(fi,"CODE",{});var kw=a(Cl);lg=i(kw,"__call__"),kw.forEach(t),dg=i(fi," special method."),fi.forEach(t),cg=h(nn),k(no.$$.fragment,nn),pg=h(nn),k(so.$$.fragment,nn),nn.forEach(t),Re.forEach(t),$p=h(o),it=s(o,"H2",{class:!0});var kh=a(it);ao=s(kh,"A",{id:!0,class:!0,href:!0});var Bw=a(ao);Il=s(Bw,"SPAN",{});var Tw=a(Il);k(fs.$$.fragment,Tw),Tw.forEach(t),Bw.forEach(t),hg=h(kh),Ul=s(kh,"SPAN",{});var ww=a(Ul);mg=i(ww,"BigBirdForPreTraining"),ww.forEach(t),kh.forEach(t),Fp=h(o),lt=s(o,"DIV",{class:!0});var Bh=a(lt);k(gs.$$.fragment,Bh),ug=h(Bh),be=s(Bh,"DIV",{class:!0});var sn=a(be);k(_s.$$.fragment,sn),fg=h(sn),dt=s(sn,"P",{});var gi=a(dt);gg=i(gi,"The "),Xr=s(gi,"A",{href:!0});var Mw=a(Xr);_g=i(Mw,"BigBirdForPreTraining"),Mw.forEach(t),bg=i(gi," forward method, overrides the "),ql=s(gi,"CODE",{});var $w=a(ql);yg=i($w,"__call__"),$w.forEach(t),vg=i(gi," special method."),gi.forEach(t),kg=h(sn),k(ro.$$.fragment,sn),Bg=h(sn),k(io.$$.fragment,sn),sn.forEach(t),Bh.forEach(t),xp=h(o),ct=s(o,"H2",{class:!0});var Th=a(ct);lo=s(Th,"A",{id:!0,class:!0,href:!0});var Fw=a(lo);Nl=s(Fw,"SPAN",{});var xw=a(Nl);k(bs.$$.fragment,xw),xw.forEach(t),Fw.forEach(t),Tg=h(Th),Pl=s(Th,"SPAN",{});var Ew=a(Pl);wg=i(Ew,"BigBirdForCausalLM"),Ew.forEach(t),Th.forEach(t),Ep=h(o),ze=s(o,"DIV",{class:!0});var _i=a(ze);k(ys.$$.fragment,_i),Mg=h(_i),pt=s(_i,"P",{});var bi=a(pt);$g=i(bi,"BigBird Model with a "),Zl=s(bi,"CODE",{});var jw=a(Zl);Fg=i(jw,"language modeling"),jw.forEach(t),xg=i(bi,` head on top for CLM fine-tuning.
This model is a PyTorch `),vs=s(bi,"A",{href:!0,rel:!0});var zw=a(vs);Eg=i(zw,"torch.nn.Module"),zw.forEach(t),jg=i(bi,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),bi.forEach(t),zg=h(_i),ye=s(_i,"DIV",{class:!0});var an=a(ye);k(ks.$$.fragment,an),Jg=h(an),ht=s(an,"P",{});var yi=a(ht);Cg=i(yi,"The "),Qr=s(yi,"A",{href:!0});var Jw=a(Qr);Ig=i(Jw,"BigBirdForCausalLM"),Jw.forEach(t),Ug=i(yi," forward method, overrides the "),Al=s(yi,"CODE",{});var Cw=a(Al);qg=i(Cw,"__call__"),Cw.forEach(t),Ng=i(yi," special method."),yi.forEach(t),Pg=h(an),k(co.$$.fragment,an),Zg=h(an),k(po.$$.fragment,an),an.forEach(t),_i.forEach(t),jp=h(o),mt=s(o,"H2",{class:!0});var wh=a(mt);ho=s(wh,"A",{id:!0,class:!0,href:!0});var Iw=a(ho);Wl=s(Iw,"SPAN",{});var Uw=a(Wl);k(Bs.$$.fragment,Uw),Uw.forEach(t),Iw.forEach(t),Ag=h(wh),Gl=s(wh,"SPAN",{});var qw=a(Gl);Wg=i(qw,"BigBirdForMaskedLM"),qw.forEach(t),wh.forEach(t),zp=h(o),Je=s(o,"DIV",{class:!0});var vi=a(Je);k(Ts.$$.fragment,vi),Gg=h(vi),ut=s(vi,"P",{});var ki=a(ut);Lg=i(ki,"BigBird Model with a "),Ll=s(ki,"CODE",{});var Nw=a(Ll);Sg=i(Nw,"language modeling"),Nw.forEach(t),Rg=i(ki,` head on top.
This model is a PyTorch `),ws=s(ki,"A",{href:!0,rel:!0});var Pw=a(ws);Vg=i(Pw,"torch.nn.Module"),Pw.forEach(t),Xg=i(ki,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),ki.forEach(t),Qg=h(vi),D=s(vi,"DIV",{class:!0});var Ve=a(D);k(Ms.$$.fragment,Ve),Og=h(Ve),ft=s(Ve,"P",{});var Bi=a(ft);Dg=i(Bi,"The "),Or=s(Bi,"A",{href:!0});var Zw=a(Or);Hg=i(Zw,"BigBirdForMaskedLM"),Zw.forEach(t),Yg=i(Bi," forward method, overrides the "),Sl=s(Bi,"CODE",{});var Aw=a(Sl);Kg=i(Aw,"__call__"),Aw.forEach(t),e_=i(Bi," special method."),Bi.forEach(t),t_=h(Ve),k(mo.$$.fragment,Ve),o_=h(Ve),k(uo.$$.fragment,Ve),n_=h(Ve),k(fo.$$.fragment,Ve),Ve.forEach(t),vi.forEach(t),Jp=h(o),gt=s(o,"H2",{class:!0});var Mh=a(gt);go=s(Mh,"A",{id:!0,class:!0,href:!0});var Ww=a(go);Rl=s(Ww,"SPAN",{});var Gw=a(Rl);k($s.$$.fragment,Gw),Gw.forEach(t),Ww.forEach(t),s_=h(Mh),Vl=s(Mh,"SPAN",{});var Lw=a(Vl);a_=i(Lw,"BigBirdForSequenceClassification"),Lw.forEach(t),Mh.forEach(t),Cp=h(o),pe=s(o,"DIV",{class:!0});var rn=a(pe);k(Fs.$$.fragment,rn),r_=h(rn),Xl=s(rn,"P",{});var Sw=a(Xl);i_=i(Sw,`BigBird Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),Sw.forEach(t),l_=h(rn),xs=s(rn,"P",{});var $h=a(xs);d_=i($h,"This model is a PyTorch "),Es=s($h,"A",{href:!0,rel:!0});var Rw=a(Es);c_=i(Rw,"torch.nn.Module"),Rw.forEach(t),p_=i($h,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),$h.forEach(t),h_=h(rn),H=s(rn,"DIV",{class:!0});var Xe=a(H);k(js.$$.fragment,Xe),m_=h(Xe),_t=s(Xe,"P",{});var Ti=a(_t);u_=i(Ti,"The "),Dr=s(Ti,"A",{href:!0});var Vw=a(Dr);f_=i(Vw,"BigBirdForSequenceClassification"),Vw.forEach(t),g_=i(Ti," forward method, overrides the "),Ql=s(Ti,"CODE",{});var Xw=a(Ql);__=i(Xw,"__call__"),Xw.forEach(t),b_=i(Ti," special method."),Ti.forEach(t),y_=h(Xe),k(_o.$$.fragment,Xe),v_=h(Xe),k(bo.$$.fragment,Xe),k_=h(Xe),k(yo.$$.fragment,Xe),Xe.forEach(t),rn.forEach(t),Ip=h(o),bt=s(o,"H2",{class:!0});var Fh=a(bt);vo=s(Fh,"A",{id:!0,class:!0,href:!0});var Qw=a(vo);Ol=s(Qw,"SPAN",{});var Ow=a(Ol);k(zs.$$.fragment,Ow),Ow.forEach(t),Qw.forEach(t),B_=h(Fh),Dl=s(Fh,"SPAN",{});var Dw=a(Dl);T_=i(Dw,"BigBirdForMultipleChoice"),Dw.forEach(t),Fh.forEach(t),Up=h(o),he=s(o,"DIV",{class:!0});var ln=a(he);k(Js.$$.fragment,ln),w_=h(ln),Hl=s(ln,"P",{});var Hw=a(Hl);M_=i(Hw,`BigBird 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.`),Hw.forEach(t),$_=h(ln),Cs=s(ln,"P",{});var xh=a(Cs);F_=i(xh,"This model is a PyTorch "),Is=s(xh,"A",{href:!0,rel:!0});var Yw=a(Is);x_=i(Yw,"torch.nn.Module"),Yw.forEach(t),E_=i(xh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),xh.forEach(t),j_=h(ln),ve=s(ln,"DIV",{class:!0});var dn=a(ve);k(Us.$$.fragment,dn),z_=h(dn),yt=s(dn,"P",{});var wi=a(yt);J_=i(wi,"The "),Hr=s(wi,"A",{href:!0});var Kw=a(Hr);C_=i(Kw,"BigBirdForMultipleChoice"),Kw.forEach(t),I_=i(wi," forward method, overrides the "),Yl=s(wi,"CODE",{});var e2=a(Yl);U_=i(e2,"__call__"),e2.forEach(t),q_=i(wi," special method."),wi.forEach(t),N_=h(dn),k(ko.$$.fragment,dn),P_=h(dn),k(Bo.$$.fragment,dn),dn.forEach(t),ln.forEach(t),qp=h(o),vt=s(o,"H2",{class:!0});var Eh=a(vt);To=s(Eh,"A",{id:!0,class:!0,href:!0});var t2=a(To);Kl=s(t2,"SPAN",{});var o2=a(Kl);k(qs.$$.fragment,o2),o2.forEach(t),t2.forEach(t),Z_=h(Eh),ed=s(Eh,"SPAN",{});var n2=a(ed);A_=i(n2,"BigBirdForTokenClassification"),n2.forEach(t),Eh.forEach(t),Np=h(o),me=s(o,"DIV",{class:!0});var cn=a(me);k(Ns.$$.fragment,cn),W_=h(cn),td=s(cn,"P",{});var s2=a(td);G_=i(s2,`BigBird 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.`),s2.forEach(t),L_=h(cn),Ps=s(cn,"P",{});var jh=a(Ps);S_=i(jh,"This model is a PyTorch "),Zs=s(jh,"A",{href:!0,rel:!0});var a2=a(Zs);R_=i(a2,"torch.nn.Module"),a2.forEach(t),V_=i(jh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),jh.forEach(t),X_=h(cn),ke=s(cn,"DIV",{class:!0});var pn=a(ke);k(As.$$.fragment,pn),Q_=h(pn),kt=s(pn,"P",{});var Mi=a(kt);O_=i(Mi,"The "),Yr=s(Mi,"A",{href:!0});var r2=a(Yr);D_=i(r2,"BigBirdForTokenClassification"),r2.forEach(t),H_=i(Mi," forward method, overrides the "),od=s(Mi,"CODE",{});var i2=a(od);Y_=i(i2,"__call__"),i2.forEach(t),K_=i(Mi," special method."),Mi.forEach(t),eb=h(pn),k(wo.$$.fragment,pn),tb=h(pn),k(Mo.$$.fragment,pn),pn.forEach(t),cn.forEach(t),Pp=h(o),Bt=s(o,"H2",{class:!0});var zh=a(Bt);$o=s(zh,"A",{id:!0,class:!0,href:!0});var l2=a($o);nd=s(l2,"SPAN",{});var d2=a(nd);k(Ws.$$.fragment,d2),d2.forEach(t),l2.forEach(t),ob=h(zh),sd=s(zh,"SPAN",{});var c2=a(sd);nb=i(c2,"BigBirdForQuestionAnswering"),c2.forEach(t),zh.forEach(t),Zp=h(o),ue=s(o,"DIV",{class:!0});var hn=a(ue);k(Gs.$$.fragment,hn),sb=h(hn),Tt=s(hn,"P",{});var $i=a(Tt);ab=i($i,`BigBird 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 `),ad=s($i,"CODE",{});var p2=a(ad);rb=i(p2,"span start logits"),p2.forEach(t),ib=i($i," and "),rd=s($i,"CODE",{});var h2=a(rd);lb=i(h2,"span end logits"),h2.forEach(t),db=i($i,")."),$i.forEach(t),cb=h(hn),Ls=s(hn,"P",{});var Jh=a(Ls);pb=i(Jh,"This model is a PyTorch "),Ss=s(Jh,"A",{href:!0,rel:!0});var m2=a(Ss);hb=i(m2,"torch.nn.Module"),m2.forEach(t),mb=i(Jh,` sub-class. Use
it as a regular PyTorch Module and refer to the PyTorch documentation for all matter related to general usage and
behavior.`),Jh.forEach(t),ub=h(hn),Y=s(hn,"DIV",{class:!0});var Qe=a(Y);k(Rs.$$.fragment,Qe),fb=h(Qe),wt=s(Qe,"P",{});var Fi=a(wt);gb=i(Fi,"The "),Kr=s(Fi,"A",{href:!0});var u2=a(Kr);_b=i(u2,"BigBirdForQuestionAnswering"),u2.forEach(t),bb=i(Fi," forward method, overrides the "),id=s(Fi,"CODE",{});var f2=a(id);yb=i(f2,"__call__"),f2.forEach(t),vb=i(Fi," special method."),Fi.forEach(t),kb=h(Qe),k(Fo.$$.fragment,Qe),Bb=h(Qe),k(xo.$$.fragment,Qe),Tb=h(Qe),k(Eo.$$.fragment,Qe),Qe.forEach(t),hn.forEach(t),Ap=h(o),Mt=s(o,"H2",{class:!0});var Ch=a(Mt);jo=s(Ch,"A",{id:!0,class:!0,href:!0});var g2=a(jo);ld=s(g2,"SPAN",{});var _2=a(ld);k(Vs.$$.fragment,_2),_2.forEach(t),g2.forEach(t),wb=h(Ch),dd=s(Ch,"SPAN",{});var b2=a(dd);Mb=i(b2,"FlaxBigBirdModel"),b2.forEach(t),Ch.forEach(t),Wp=h(o),I=s(o,"DIV",{class:!0});var te=a(I);k(Xs.$$.fragment,te),$b=h(te),cd=s(te,"P",{});var y2=a(cd);Fb=i(y2,"The bare BigBird Model transformer outputting raw hidden-states without any specific head on top."),y2.forEach(t),xb=h(te),Qs=s(te,"P",{});var Ih=a(Qs);Eb=i(Ih,"This model inherits from "),ei=s(Ih,"A",{href:!0});var v2=a(ei);jb=i(v2,"FlaxPreTrainedModel"),v2.forEach(t),zb=i(Ih,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Ih.forEach(t),Jb=h(te),Os=s(te,"P",{});var Uh=a(Os);Cb=i(Uh,"This model is also a Flax Linen "),Ds=s(Uh,"A",{href:!0,rel:!0});var k2=a(Ds);Ib=i(k2,"flax.linen.Module"),k2.forEach(t),Ub=i(Uh,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Uh.forEach(t),qb=h(te),pd=s(te,"P",{});var B2=a(pd);Nb=i(B2,"Finally, this model supports inherent JAX features such as:"),B2.forEach(t),Pb=h(te),Ce=s(te,"UL",{});var mn=a(Ce);hd=s(mn,"LI",{});var T2=a(hd);Hs=s(T2,"A",{href:!0,rel:!0});var w2=a(Hs);Zb=i(w2,"Just-In-Time (JIT) compilation"),w2.forEach(t),T2.forEach(t),Ab=h(mn),md=s(mn,"LI",{});var M2=a(md);Ys=s(M2,"A",{href:!0,rel:!0});var $2=a(Ys);Wb=i($2,"Automatic Differentiation"),$2.forEach(t),M2.forEach(t),Gb=h(mn),ud=s(mn,"LI",{});var F2=a(ud);Ks=s(F2,"A",{href:!0,rel:!0});var x2=a(Ks);Lb=i(x2,"Vectorization"),x2.forEach(t),F2.forEach(t),Sb=h(mn),fd=s(mn,"LI",{});var E2=a(fd);ea=s(E2,"A",{href:!0,rel:!0});var j2=a(ea);Rb=i(j2,"Parallelization"),j2.forEach(t),E2.forEach(t),mn.forEach(t),Vb=h(te),Be=s(te,"DIV",{class:!0});var un=a(Be);k(ta.$$.fragment,un),Xb=h(un),$t=s(un,"P",{});var xi=a($t);Qb=i(xi,"The "),gd=s(xi,"CODE",{});var z2=a(gd);Ob=i(z2,"FlaxBigBirdPreTrainedModel"),z2.forEach(t),Db=i(xi," forward method, overrides the "),_d=s(xi,"CODE",{});var J2=a(_d);Hb=i(J2,"__call__"),J2.forEach(t),Yb=i(xi," special method."),xi.forEach(t),Kb=h(un),k(zo.$$.fragment,un),ey=h(un),k(Jo.$$.fragment,un),un.forEach(t),te.forEach(t),Gp=h(o),Ft=s(o,"H2",{class:!0});var qh=a(Ft);Co=s(qh,"A",{id:!0,class:!0,href:!0});var C2=a(Co);bd=s(C2,"SPAN",{});var I2=a(bd);k(oa.$$.fragment,I2),I2.forEach(t),C2.forEach(t),ty=h(qh),yd=s(qh,"SPAN",{});var U2=a(yd);oy=i(U2,"FlaxBigBirdForPreTraining"),U2.forEach(t),qh.forEach(t),Lp=h(o),U=s(o,"DIV",{class:!0});var oe=a(U);k(na.$$.fragment,oe),ny=h(oe),xt=s(oe,"P",{});var Ei=a(xt);sy=i(Ei,"BigBird Model with two heads on top as done during the pretraining: a "),vd=s(Ei,"CODE",{});var q2=a(vd);ay=i(q2,"masked language modeling"),q2.forEach(t),ry=i(Ei," head and a "),kd=s(Ei,"CODE",{});var N2=a(kd);iy=i(N2,"next sentence prediction (classification)"),N2.forEach(t),ly=i(Ei," head."),Ei.forEach(t),dy=h(oe),sa=s(oe,"P",{});var Nh=a(sa);cy=i(Nh,"This model inherits from "),ti=s(Nh,"A",{href:!0});var P2=a(ti);py=i(P2,"FlaxPreTrainedModel"),P2.forEach(t),hy=i(Nh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Nh.forEach(t),my=h(oe),aa=s(oe,"P",{});var Ph=a(aa);uy=i(Ph,"This model is also a Flax Linen "),ra=s(Ph,"A",{href:!0,rel:!0});var Z2=a(ra);fy=i(Z2,"flax.linen.Module"),Z2.forEach(t),gy=i(Ph,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Ph.forEach(t),_y=h(oe),Bd=s(oe,"P",{});var A2=a(Bd);by=i(A2,"Finally, this model supports inherent JAX features such as:"),A2.forEach(t),yy=h(oe),Ie=s(oe,"UL",{});var fn=a(Ie);Td=s(fn,"LI",{});var W2=a(Td);ia=s(W2,"A",{href:!0,rel:!0});var G2=a(ia);vy=i(G2,"Just-In-Time (JIT) compilation"),G2.forEach(t),W2.forEach(t),ky=h(fn),wd=s(fn,"LI",{});var L2=a(wd);la=s(L2,"A",{href:!0,rel:!0});var S2=a(la);By=i(S2,"Automatic Differentiation"),S2.forEach(t),L2.forEach(t),Ty=h(fn),Md=s(fn,"LI",{});var R2=a(Md);da=s(R2,"A",{href:!0,rel:!0});var V2=a(da);wy=i(V2,"Vectorization"),V2.forEach(t),R2.forEach(t),My=h(fn),$d=s(fn,"LI",{});var X2=a($d);ca=s(X2,"A",{href:!0,rel:!0});var Q2=a(ca);$y=i(Q2,"Parallelization"),Q2.forEach(t),X2.forEach(t),fn.forEach(t),Fy=h(oe),Te=s(oe,"DIV",{class:!0});var gn=a(Te);k(pa.$$.fragment,gn),xy=h(gn),Et=s(gn,"P",{});var ji=a(Et);Ey=i(ji,"The "),Fd=s(ji,"CODE",{});var O2=a(Fd);jy=i(O2,"FlaxBigBirdPreTrainedModel"),O2.forEach(t),zy=i(ji," forward method, overrides the "),xd=s(ji,"CODE",{});var D2=a(xd);Jy=i(D2,"__call__"),D2.forEach(t),Cy=i(ji," special method."),ji.forEach(t),Iy=h(gn),k(Io.$$.fragment,gn),Uy=h(gn),k(Uo.$$.fragment,gn),gn.forEach(t),oe.forEach(t),Sp=h(o),jt=s(o,"H2",{class:!0});var Zh=a(jt);qo=s(Zh,"A",{id:!0,class:!0,href:!0});var H2=a(qo);Ed=s(H2,"SPAN",{});var Y2=a(Ed);k(ha.$$.fragment,Y2),Y2.forEach(t),H2.forEach(t),qy=h(Zh),jd=s(Zh,"SPAN",{});var K2=a(jd);Ny=i(K2,"FlaxBigBirdForCausalLM"),K2.forEach(t),Zh.forEach(t),Rp=h(o),q=s(o,"DIV",{class:!0});var ne=a(q);k(ma.$$.fragment,ne),Py=h(ne),zd=s(ne,"P",{});var eM=a(zd);Zy=i(eM,`BigBird Model with a language modeling head on top (a linear layer on top of the hidden-states output) e.g for
autoregressive tasks.`),eM.forEach(t),Ay=h(ne),ua=s(ne,"P",{});var Ah=a(ua);Wy=i(Ah,"This model inherits from "),oi=s(Ah,"A",{href:!0});var tM=a(oi);Gy=i(tM,"FlaxPreTrainedModel"),tM.forEach(t),Ly=i(Ah,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Ah.forEach(t),Sy=h(ne),fa=s(ne,"P",{});var Wh=a(fa);Ry=i(Wh,"This model is also a Flax Linen "),ga=s(Wh,"A",{href:!0,rel:!0});var oM=a(ga);Vy=i(oM,"flax.linen.Module"),oM.forEach(t),Xy=i(Wh,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Wh.forEach(t),Qy=h(ne),Jd=s(ne,"P",{});var nM=a(Jd);Oy=i(nM,"Finally, this model supports inherent JAX features such as:"),nM.forEach(t),Dy=h(ne),Ue=s(ne,"UL",{});var _n=a(Ue);Cd=s(_n,"LI",{});var sM=a(Cd);_a=s(sM,"A",{href:!0,rel:!0});var aM=a(_a);Hy=i(aM,"Just-In-Time (JIT) compilation"),aM.forEach(t),sM.forEach(t),Yy=h(_n),Id=s(_n,"LI",{});var rM=a(Id);ba=s(rM,"A",{href:!0,rel:!0});var iM=a(ba);Ky=i(iM,"Automatic Differentiation"),iM.forEach(t),rM.forEach(t),ev=h(_n),Ud=s(_n,"LI",{});var lM=a(Ud);ya=s(lM,"A",{href:!0,rel:!0});var dM=a(ya);tv=i(dM,"Vectorization"),dM.forEach(t),lM.forEach(t),ov=h(_n),qd=s(_n,"LI",{});var cM=a(qd);va=s(cM,"A",{href:!0,rel:!0});var pM=a(va);nv=i(pM,"Parallelization"),pM.forEach(t),cM.forEach(t),_n.forEach(t),sv=h(ne),we=s(ne,"DIV",{class:!0});var bn=a(we);k(ka.$$.fragment,bn),av=h(bn),zt=s(bn,"P",{});var zi=a(zt);rv=i(zi,"The "),Nd=s(zi,"CODE",{});var hM=a(Nd);iv=i(hM,"FlaxBigBirdPreTrainedModel"),hM.forEach(t),lv=i(zi," forward method, overrides the "),Pd=s(zi,"CODE",{});var mM=a(Pd);dv=i(mM,"__call__"),mM.forEach(t),cv=i(zi," special method."),zi.forEach(t),pv=h(bn),k(No.$$.fragment,bn),hv=h(bn),k(Po.$$.fragment,bn),bn.forEach(t),ne.forEach(t),Vp=h(o),Jt=s(o,"H2",{class:!0});var Gh=a(Jt);Zo=s(Gh,"A",{id:!0,class:!0,href:!0});var uM=a(Zo);Zd=s(uM,"SPAN",{});var fM=a(Zd);k(Ba.$$.fragment,fM),fM.forEach(t),uM.forEach(t),mv=h(Gh),Ad=s(Gh,"SPAN",{});var gM=a(Ad);uv=i(gM,"FlaxBigBirdForMaskedLM"),gM.forEach(t),Gh.forEach(t),Xp=h(o),N=s(o,"DIV",{class:!0});var se=a(N);k(Ta.$$.fragment,se),fv=h(se),wa=s(se,"P",{});var Lh=a(wa);gv=i(Lh,"BigBird Model with a "),Wd=s(Lh,"CODE",{});var _M=a(Wd);_v=i(_M,"language modeling"),_M.forEach(t),bv=i(Lh," head on top."),Lh.forEach(t),yv=h(se),Ma=s(se,"P",{});var Sh=a(Ma);vv=i(Sh,"This model inherits from "),ni=s(Sh,"A",{href:!0});var bM=a(ni);kv=i(bM,"FlaxPreTrainedModel"),bM.forEach(t),Bv=i(Sh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Sh.forEach(t),Tv=h(se),$a=s(se,"P",{});var Rh=a($a);wv=i(Rh,"This model is also a Flax Linen "),Fa=s(Rh,"A",{href:!0,rel:!0});var yM=a(Fa);Mv=i(yM,"flax.linen.Module"),yM.forEach(t),$v=i(Rh,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Rh.forEach(t),Fv=h(se),Gd=s(se,"P",{});var vM=a(Gd);xv=i(vM,"Finally, this model supports inherent JAX features such as:"),vM.forEach(t),Ev=h(se),qe=s(se,"UL",{});var yn=a(qe);Ld=s(yn,"LI",{});var kM=a(Ld);xa=s(kM,"A",{href:!0,rel:!0});var BM=a(xa);jv=i(BM,"Just-In-Time (JIT) compilation"),BM.forEach(t),kM.forEach(t),zv=h(yn),Sd=s(yn,"LI",{});var TM=a(Sd);Ea=s(TM,"A",{href:!0,rel:!0});var wM=a(Ea);Jv=i(wM,"Automatic Differentiation"),wM.forEach(t),TM.forEach(t),Cv=h(yn),Rd=s(yn,"LI",{});var MM=a(Rd);ja=s(MM,"A",{href:!0,rel:!0});var $M=a(ja);Iv=i($M,"Vectorization"),$M.forEach(t),MM.forEach(t),Uv=h(yn),Vd=s(yn,"LI",{});var FM=a(Vd);za=s(FM,"A",{href:!0,rel:!0});var xM=a(za);qv=i(xM,"Parallelization"),xM.forEach(t),FM.forEach(t),yn.forEach(t),Nv=h(se),Me=s(se,"DIV",{class:!0});var vn=a(Me);k(Ja.$$.fragment,vn),Pv=h(vn),Ct=s(vn,"P",{});var Ji=a(Ct);Zv=i(Ji,"The "),Xd=s(Ji,"CODE",{});var EM=a(Xd);Av=i(EM,"FlaxBigBirdPreTrainedModel"),EM.forEach(t),Wv=i(Ji," forward method, overrides the "),Qd=s(Ji,"CODE",{});var jM=a(Qd);Gv=i(jM,"__call__"),jM.forEach(t),Lv=i(Ji," special method."),Ji.forEach(t),Sv=h(vn),k(Ao.$$.fragment,vn),Rv=h(vn),k(Wo.$$.fragment,vn),vn.forEach(t),se.forEach(t),Qp=h(o),It=s(o,"H2",{class:!0});var Vh=a(It);Go=s(Vh,"A",{id:!0,class:!0,href:!0});var zM=a(Go);Od=s(zM,"SPAN",{});var JM=a(Od);k(Ca.$$.fragment,JM),JM.forEach(t),zM.forEach(t),Vv=h(Vh),Dd=s(Vh,"SPAN",{});var CM=a(Dd);Xv=i(CM,"FlaxBigBirdForSequenceClassification"),CM.forEach(t),Vh.forEach(t),Op=h(o),P=s(o,"DIV",{class:!0});var ae=a(P);k(Ia.$$.fragment,ae),Qv=h(ae),Hd=s(ae,"P",{});var IM=a(Hd);Ov=i(IM,`BigBird Model transformer with a sequence classification/regression head on top (a linear layer on top of the
pooled output) e.g. for GLUE tasks.`),IM.forEach(t),Dv=h(ae),Ua=s(ae,"P",{});var Xh=a(Ua);Hv=i(Xh,"This model inherits from "),si=s(Xh,"A",{href:!0});var UM=a(si);Yv=i(UM,"FlaxPreTrainedModel"),UM.forEach(t),Kv=i(Xh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Xh.forEach(t),ek=h(ae),qa=s(ae,"P",{});var Qh=a(qa);tk=i(Qh,"This model is also a Flax Linen "),Na=s(Qh,"A",{href:!0,rel:!0});var qM=a(Na);ok=i(qM,"flax.linen.Module"),qM.forEach(t),nk=i(Qh,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Qh.forEach(t),sk=h(ae),Yd=s(ae,"P",{});var NM=a(Yd);ak=i(NM,"Finally, this model supports inherent JAX features such as:"),NM.forEach(t),rk=h(ae),Ne=s(ae,"UL",{});var kn=a(Ne);Kd=s(kn,"LI",{});var PM=a(Kd);Pa=s(PM,"A",{href:!0,rel:!0});var ZM=a(Pa);ik=i(ZM,"Just-In-Time (JIT) compilation"),ZM.forEach(t),PM.forEach(t),lk=h(kn),ec=s(kn,"LI",{});var AM=a(ec);Za=s(AM,"A",{href:!0,rel:!0});var WM=a(Za);dk=i(WM,"Automatic Differentiation"),WM.forEach(t),AM.forEach(t),ck=h(kn),tc=s(kn,"LI",{});var GM=a(tc);Aa=s(GM,"A",{href:!0,rel:!0});var LM=a(Aa);pk=i(LM,"Vectorization"),LM.forEach(t),GM.forEach(t),hk=h(kn),oc=s(kn,"LI",{});var SM=a(oc);Wa=s(SM,"A",{href:!0,rel:!0});var RM=a(Wa);mk=i(RM,"Parallelization"),RM.forEach(t),SM.forEach(t),kn.forEach(t),uk=h(ae),$e=s(ae,"DIV",{class:!0});var Bn=a($e);k(Ga.$$.fragment,Bn),fk=h(Bn),Ut=s(Bn,"P",{});var Ci=a(Ut);gk=i(Ci,"The "),nc=s(Ci,"CODE",{});var VM=a(nc);_k=i(VM,"FlaxBigBirdPreTrainedModel"),VM.forEach(t),bk=i(Ci," forward method, overrides the "),sc=s(Ci,"CODE",{});var XM=a(sc);yk=i(XM,"__call__"),XM.forEach(t),vk=i(Ci," special method."),Ci.forEach(t),kk=h(Bn),k(Lo.$$.fragment,Bn),Bk=h(Bn),k(So.$$.fragment,Bn),Bn.forEach(t),ae.forEach(t),Dp=h(o),qt=s(o,"H2",{class:!0});var Oh=a(qt);Ro=s(Oh,"A",{id:!0,class:!0,href:!0});var QM=a(Ro);ac=s(QM,"SPAN",{});var OM=a(ac);k(La.$$.fragment,OM),OM.forEach(t),QM.forEach(t),Tk=h(Oh),rc=s(Oh,"SPAN",{});var DM=a(rc);wk=i(DM,"FlaxBigBirdForMultipleChoice"),DM.forEach(t),Oh.forEach(t),Hp=h(o),Z=s(o,"DIV",{class:!0});var re=a(Z);k(Sa.$$.fragment,re),Mk=h(re),ic=s(re,"P",{});var HM=a(ic);$k=i(HM,`BigBird 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.`),HM.forEach(t),Fk=h(re),Ra=s(re,"P",{});var Dh=a(Ra);xk=i(Dh,"This model inherits from "),ai=s(Dh,"A",{href:!0});var YM=a(ai);Ek=i(YM,"FlaxPreTrainedModel"),YM.forEach(t),jk=i(Dh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Dh.forEach(t),zk=h(re),Va=s(re,"P",{});var Hh=a(Va);Jk=i(Hh,"This model is also a Flax Linen "),Xa=s(Hh,"A",{href:!0,rel:!0});var KM=a(Xa);Ck=i(KM,"flax.linen.Module"),KM.forEach(t),Ik=i(Hh,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),Hh.forEach(t),Uk=h(re),lc=s(re,"P",{});var e1=a(lc);qk=i(e1,"Finally, this model supports inherent JAX features such as:"),e1.forEach(t),Nk=h(re),Pe=s(re,"UL",{});var Tn=a(Pe);dc=s(Tn,"LI",{});var t1=a(dc);Qa=s(t1,"A",{href:!0,rel:!0});var o1=a(Qa);Pk=i(o1,"Just-In-Time (JIT) compilation"),o1.forEach(t),t1.forEach(t),Zk=h(Tn),cc=s(Tn,"LI",{});var n1=a(cc);Oa=s(n1,"A",{href:!0,rel:!0});var s1=a(Oa);Ak=i(s1,"Automatic Differentiation"),s1.forEach(t),n1.forEach(t),Wk=h(Tn),pc=s(Tn,"LI",{});var a1=a(pc);Da=s(a1,"A",{href:!0,rel:!0});var r1=a(Da);Gk=i(r1,"Vectorization"),r1.forEach(t),a1.forEach(t),Lk=h(Tn),hc=s(Tn,"LI",{});var i1=a(hc);Ha=s(i1,"A",{href:!0,rel:!0});var l1=a(Ha);Sk=i(l1,"Parallelization"),l1.forEach(t),i1.forEach(t),Tn.forEach(t),Rk=h(re),Fe=s(re,"DIV",{class:!0});var wn=a(Fe);k(Ya.$$.fragment,wn),Vk=h(wn),Nt=s(wn,"P",{});var Ii=a(Nt);Xk=i(Ii,"The "),mc=s(Ii,"CODE",{});var d1=a(mc);Qk=i(d1,"FlaxBigBirdPreTrainedModel"),d1.forEach(t),Ok=i(Ii," forward method, overrides the "),uc=s(Ii,"CODE",{});var c1=a(uc);Dk=i(c1,"__call__"),c1.forEach(t),Hk=i(Ii," special method."),Ii.forEach(t),Yk=h(wn),k(Vo.$$.fragment,wn),Kk=h(wn),k(Xo.$$.fragment,wn),wn.forEach(t),re.forEach(t),Yp=h(o),Pt=s(o,"H2",{class:!0});var Yh=a(Pt);Qo=s(Yh,"A",{id:!0,class:!0,href:!0});var p1=a(Qo);fc=s(p1,"SPAN",{});var h1=a(fc);k(Ka.$$.fragment,h1),h1.forEach(t),p1.forEach(t),eB=h(Yh),gc=s(Yh,"SPAN",{});var m1=a(gc);tB=i(m1,"FlaxBigBirdForTokenClassification"),m1.forEach(t),Yh.forEach(t),Kp=h(o),A=s(o,"DIV",{class:!0});var ie=a(A);k(er.$$.fragment,ie),oB=h(ie),_c=s(ie,"P",{});var u1=a(_c);nB=i(u1,`BigBird 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.`),u1.forEach(t),sB=h(ie),tr=s(ie,"P",{});var Kh=a(tr);aB=i(Kh,"This model inherits from "),ri=s(Kh,"A",{href:!0});var f1=a(ri);rB=i(f1,"FlaxPreTrainedModel"),f1.forEach(t),iB=i(Kh,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),Kh.forEach(t),lB=h(ie),or=s(ie,"P",{});var em=a(or);dB=i(em,"This model is also a Flax Linen "),nr=s(em,"A",{href:!0,rel:!0});var g1=a(nr);cB=i(g1,"flax.linen.Module"),g1.forEach(t),pB=i(em,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),em.forEach(t),hB=h(ie),bc=s(ie,"P",{});var _1=a(bc);mB=i(_1,"Finally, this model supports inherent JAX features such as:"),_1.forEach(t),uB=h(ie),Ze=s(ie,"UL",{});var Mn=a(Ze);yc=s(Mn,"LI",{});var b1=a(yc);sr=s(b1,"A",{href:!0,rel:!0});var y1=a(sr);fB=i(y1,"Just-In-Time (JIT) compilation"),y1.forEach(t),b1.forEach(t),gB=h(Mn),vc=s(Mn,"LI",{});var v1=a(vc);ar=s(v1,"A",{href:!0,rel:!0});var k1=a(ar);_B=i(k1,"Automatic Differentiation"),k1.forEach(t),v1.forEach(t),bB=h(Mn),kc=s(Mn,"LI",{});var B1=a(kc);rr=s(B1,"A",{href:!0,rel:!0});var T1=a(rr);yB=i(T1,"Vectorization"),T1.forEach(t),B1.forEach(t),vB=h(Mn),Bc=s(Mn,"LI",{});var w1=a(Bc);ir=s(w1,"A",{href:!0,rel:!0});var M1=a(ir);kB=i(M1,"Parallelization"),M1.forEach(t),w1.forEach(t),Mn.forEach(t),BB=h(ie),xe=s(ie,"DIV",{class:!0});var $n=a(xe);k(lr.$$.fragment,$n),TB=h($n),Zt=s($n,"P",{});var Ui=a(Zt);wB=i(Ui,"The "),Tc=s(Ui,"CODE",{});var $1=a(Tc);MB=i($1,"FlaxBigBirdPreTrainedModel"),$1.forEach(t),$B=i(Ui," forward method, overrides the "),wc=s(Ui,"CODE",{});var F1=a(wc);FB=i(F1,"__call__"),F1.forEach(t),xB=i(Ui," special method."),Ui.forEach(t),EB=h($n),k(Oo.$$.fragment,$n),jB=h($n),k(Do.$$.fragment,$n),$n.forEach(t),ie.forEach(t),eh=h(o),At=s(o,"H2",{class:!0});var tm=a(At);Ho=s(tm,"A",{id:!0,class:!0,href:!0});var x1=a(Ho);Mc=s(x1,"SPAN",{});var E1=a(Mc);k(dr.$$.fragment,E1),E1.forEach(t),x1.forEach(t),zB=h(tm),$c=s(tm,"SPAN",{});var j1=a($c);JB=i(j1,"FlaxBigBirdForQuestionAnswering"),j1.forEach(t),tm.forEach(t),th=h(o),W=s(o,"DIV",{class:!0});var le=a(W);k(cr.$$.fragment,le),CB=h(le),Wt=s(le,"P",{});var qi=a(Wt);IB=i(qi,`BigBird 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 `),Fc=s(qi,"CODE",{});var z1=a(Fc);UB=i(z1,"span start logits"),z1.forEach(t),qB=i(qi," and "),xc=s(qi,"CODE",{});var J1=a(xc);NB=i(J1,"span end logits"),J1.forEach(t),PB=i(qi,")."),qi.forEach(t),ZB=h(le),pr=s(le,"P",{});var om=a(pr);AB=i(om,"This model inherits from "),ii=s(om,"A",{href:!0});var C1=a(ii);WB=i(C1,"FlaxPreTrainedModel"),C1.forEach(t),GB=i(om,`. Check the superclass documentation for the generic methods the
library implements for all its model (such as downloading, saving and converting weights from PyTorch models)`),om.forEach(t),LB=h(le),hr=s(le,"P",{});var nm=a(hr);SB=i(nm,"This model is also a Flax Linen "),mr=s(nm,"A",{href:!0,rel:!0});var I1=a(mr);RB=i(I1,"flax.linen.Module"),I1.forEach(t),VB=i(nm,`
subclass. Use it as a regular Flax linen Module and refer to the Flax documentation for all matter related to
general usage and behavior.`),nm.forEach(t),XB=h(le),Ec=s(le,"P",{});var U1=a(Ec);QB=i(U1,"Finally, this model supports inherent JAX features such as:"),U1.forEach(t),OB=h(le),Ae=s(le,"UL",{});var Fn=a(Ae);jc=s(Fn,"LI",{});var q1=a(jc);ur=s(q1,"A",{href:!0,rel:!0});var N1=a(ur);DB=i(N1,"Just-In-Time (JIT) compilation"),N1.forEach(t),q1.forEach(t),HB=h(Fn),zc=s(Fn,"LI",{});var P1=a(zc);fr=s(P1,"A",{href:!0,rel:!0});var Z1=a(fr);YB=i(Z1,"Automatic Differentiation"),Z1.forEach(t),P1.forEach(t),KB=h(Fn),Jc=s(Fn,"LI",{});var A1=a(Jc);gr=s(A1,"A",{href:!0,rel:!0});var W1=a(gr);eT=i(W1,"Vectorization"),W1.forEach(t),A1.forEach(t),tT=h(Fn),Cc=s(Fn,"LI",{});var G1=a(Cc);_r=s(G1,"A",{href:!0,rel:!0});var L1=a(_r);oT=i(L1,"Parallelization"),L1.forEach(t),G1.forEach(t),Fn.forEach(t),nT=h(le),Ee=s(le,"DIV",{class:!0});var xn=a(Ee);k(br.$$.fragment,xn),sT=h(xn),Gt=s(xn,"P",{});var Ni=a(Gt);aT=i(Ni,"The "),li=s(Ni,"A",{href:!0});var S1=a(li);rT=i(S1,"FlaxBigBirdForQuestionAnswering"),S1.forEach(t),iT=i(Ni," forward method, overrides the "),Ic=s(Ni,"CODE",{});var R1=a(Ic);lT=i(R1,"__call__"),R1.forEach(t),dT=i(Ni," special method."),Ni.forEach(t),cT=h(xn),k(Yo.$$.fragment,xn),pT=h(xn),k(Ko.$$.fragment,xn),xn.forEach(t),le.forEach(t),this.h()},h(){c(d,"name","hf:doc:metadata"),c(d,"content",JSON.stringify(U0)),c(f,"id","bigbird"),c(f,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(f,"href","#bigbird"),c(u,"class","relative group"),c(St,"id","overview"),c(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"),c(St,"href","#overview"),c(Oe,"class","relative group"),c(jn,"href","https://arxiv.org/abs/2007.14062"),c(jn,"rel","nofollow"),c(Jn,"href","https://huggingface.co/blog/big-bird"),c(Jn,"rel","nofollow"),c(In,"href","https://huggingface.co/vasudevgupta"),c(In,"rel","nofollow"),c(Un,"href","https://github.com/google-research/bigbird"),c(Un,"rel","nofollow"),c(Vt,"id","documentation-resources"),c(Vt,"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"),c(Vt,"href","#documentation-resources"),c(De,"class","relative group"),c(Er,"href","../tasks/sequence_classification"),c(jr,"href","../tasks/token_classification"),c(zr,"href","../tasks/question_answering"),c(Jr,"href","../tasks/language_modeling"),c(Cr,"href","../tasks/masked_language_modeling"),c(Ir,"href","../tasks/multiple_choice"),c(Xt,"id","transformers.BigBirdConfig"),c(Xt,"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"),c(Xt,"href","#transformers.BigBirdConfig"),c(He,"class","relative group"),c(Ur,"href","/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdModel"),c(Zn,"href","https://huggingface.co/google/bigbird-roberta-base"),c(Zn,"rel","nofollow"),c(qr,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(Nr,"href","/docs/transformers/v4.32.0/en/main_classes/configuration#transformers.PretrainedConfig"),c(ce,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ot,"id","transformers.BigBirdTokenizer"),c(Ot,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Ot,"href","#transformers.BigBirdTokenizer"),c(et,"class","relative group"),c(Ln,"href","https://github.com/google/sentencepiece"),c(Ln,"rel","nofollow"),c(Pr,"href","/docs/transformers/v4.32.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizer"),c(Ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Dt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ht,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Wr,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(C,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Yt,"id","transformers.BigBirdTokenizerFast"),c(Yt,"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"),c(Yt,"href","#transformers.BigBirdTokenizerFast"),c(ot,"class","relative group"),c(Kn,"href","https://huggingface.co/docs/tokenizers/python/latest/components.html?highlight=unigram#models"),c(Kn,"rel","nofollow"),c(Gr,"href","/docs/transformers/v4.32.0/en/main_classes/tokenizer#transformers.PreTrainedTokenizerFast"),c(Le,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ge,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(eo,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(X,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(to,"id","transformers.models.big_bird.modeling_big_bird.BigBirdForPreTrainingOutput"),c(to,"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"),c(to,"href","#transformers.models.big_bird.modeling_big_bird.BigBirdForPreTrainingOutput"),c(nt,"class","relative group"),c(Rr,"href","/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdForPreTraining"),c(st,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(oo,"id","transformers.BigBirdModel"),c(oo,"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"),c(oo,"href","#transformers.BigBirdModel"),c(at,"class","relative group"),c(ps,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(ps,"rel","nofollow"),c(ms,"href","https://arxiv.org/abs/1706.03762"),c(ms,"rel","nofollow"),c(Vr,"href","/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdModel"),c(_e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ao,"id","transformers.BigBirdForPreTraining"),c(ao,"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"),c(ao,"href","#transformers.BigBirdForPreTraining"),c(it,"class","relative group"),c(Xr,"href","/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdForPreTraining"),c(be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(lt,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(lo,"id","transformers.BigBirdForCausalLM"),c(lo,"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"),c(lo,"href","#transformers.BigBirdForCausalLM"),c(ct,"class","relative group"),c(vs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(vs,"rel","nofollow"),c(Qr,"href","/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdForCausalLM"),c(ye,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ze,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ho,"id","transformers.BigBirdForMaskedLM"),c(ho,"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"),c(ho,"href","#transformers.BigBirdForMaskedLM"),c(mt,"class","relative group"),c(ws,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(ws,"rel","nofollow"),c(Or,"href","/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdForMaskedLM"),c(D,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Je,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(go,"id","transformers.BigBirdForSequenceClassification"),c(go,"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"),c(go,"href","#transformers.BigBirdForSequenceClassification"),c(gt,"class","relative group"),c(Es,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Es,"rel","nofollow"),c(Dr,"href","/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdForSequenceClassification"),c(H,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(pe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(vo,"id","transformers.BigBirdForMultipleChoice"),c(vo,"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"),c(vo,"href","#transformers.BigBirdForMultipleChoice"),c(bt,"class","relative group"),c(Is,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Is,"rel","nofollow"),c(Hr,"href","/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdForMultipleChoice"),c(ve,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(he,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(To,"id","transformers.BigBirdForTokenClassification"),c(To,"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"),c(To,"href","#transformers.BigBirdForTokenClassification"),c(vt,"class","relative group"),c(Zs,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Zs,"rel","nofollow"),c(Yr,"href","/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdForTokenClassification"),c(ke,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c($o,"id","transformers.BigBirdForQuestionAnswering"),c($o,"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"),c($o,"href","#transformers.BigBirdForQuestionAnswering"),c(Bt,"class","relative group"),c(Ss,"href","https://pytorch.org/docs/stable/nn.html#torch.nn.Module"),c(Ss,"rel","nofollow"),c(Kr,"href","/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.BigBirdForQuestionAnswering"),c(Y,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(ue,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(jo,"id","transformers.FlaxBigBirdModel"),c(jo,"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"),c(jo,"href","#transformers.FlaxBigBirdModel"),c(Mt,"class","relative group"),c(ei,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Ds,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(Ds,"rel","nofollow"),c(Hs,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Hs,"rel","nofollow"),c(Ys,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Ys,"rel","nofollow"),c(Ks,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Ks,"rel","nofollow"),c(ea,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(ea,"rel","nofollow"),c(Be,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(I,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Co,"id","transformers.FlaxBigBirdForPreTraining"),c(Co,"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"),c(Co,"href","#transformers.FlaxBigBirdForPreTraining"),c(Ft,"class","relative group"),c(ti,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(ra,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(ra,"rel","nofollow"),c(ia,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(ia,"rel","nofollow"),c(la,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(la,"rel","nofollow"),c(da,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(da,"rel","nofollow"),c(ca,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(ca,"rel","nofollow"),c(Te,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(U,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(qo,"id","transformers.FlaxBigBirdForCausalLM"),c(qo,"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"),c(qo,"href","#transformers.FlaxBigBirdForCausalLM"),c(jt,"class","relative group"),c(oi,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(ga,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(ga,"rel","nofollow"),c(_a,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(_a,"rel","nofollow"),c(ba,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(ba,"rel","nofollow"),c(ya,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(ya,"rel","nofollow"),c(va,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(va,"rel","nofollow"),c(we,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(q,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Zo,"id","transformers.FlaxBigBirdForMaskedLM"),c(Zo,"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"),c(Zo,"href","#transformers.FlaxBigBirdForMaskedLM"),c(Jt,"class","relative group"),c(ni,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Fa,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(Fa,"rel","nofollow"),c(xa,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(xa,"rel","nofollow"),c(Ea,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Ea,"rel","nofollow"),c(ja,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(ja,"rel","nofollow"),c(za,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(za,"rel","nofollow"),c(Me,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(N,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Go,"id","transformers.FlaxBigBirdForSequenceClassification"),c(Go,"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"),c(Go,"href","#transformers.FlaxBigBirdForSequenceClassification"),c(It,"class","relative group"),c(si,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Na,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(Na,"rel","nofollow"),c(Pa,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Pa,"rel","nofollow"),c(Za,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Za,"rel","nofollow"),c(Aa,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Aa,"rel","nofollow"),c(Wa,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(Wa,"rel","nofollow"),c($e,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(P,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ro,"id","transformers.FlaxBigBirdForMultipleChoice"),c(Ro,"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"),c(Ro,"href","#transformers.FlaxBigBirdForMultipleChoice"),c(qt,"class","relative group"),c(ai,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(Xa,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(Xa,"rel","nofollow"),c(Qa,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(Qa,"rel","nofollow"),c(Oa,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(Oa,"rel","nofollow"),c(Da,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(Da,"rel","nofollow"),c(Ha,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(Ha,"rel","nofollow"),c(Fe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Z,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Qo,"id","transformers.FlaxBigBirdForTokenClassification"),c(Qo,"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"),c(Qo,"href","#transformers.FlaxBigBirdForTokenClassification"),c(Pt,"class","relative group"),c(ri,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(nr,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(nr,"rel","nofollow"),c(sr,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(sr,"rel","nofollow"),c(ar,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(ar,"rel","nofollow"),c(rr,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(rr,"rel","nofollow"),c(ir,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(ir,"rel","nofollow"),c(xe,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(A,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(Ho,"id","transformers.FlaxBigBirdForQuestionAnswering"),c(Ho,"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"),c(Ho,"href","#transformers.FlaxBigBirdForQuestionAnswering"),c(At,"class","relative group"),c(ii,"href","/docs/transformers/v4.32.0/en/main_classes/model#transformers.FlaxPreTrainedModel"),c(mr,"href","https://flax.readthedocs.io/en/latest/flax.linen.html#module"),c(mr,"rel","nofollow"),c(ur,"href","https://jax.readthedocs.io/en/latest/jax.html#just-in-time-compilation-jit"),c(ur,"rel","nofollow"),c(fr,"href","https://jax.readthedocs.io/en/latest/jax.html#automatic-differentiation"),c(fr,"rel","nofollow"),c(gr,"href","https://jax.readthedocs.io/en/latest/jax.html#vectorization-vmap"),c(gr,"rel","nofollow"),c(_r,"href","https://jax.readthedocs.io/en/latest/jax.html#parallelization-pmap"),c(_r,"rel","nofollow"),c(li,"href","/docs/transformers/v4.32.0/en/model_doc/big_bird#transformers.FlaxBigBirdForQuestionAnswering"),c(Ee,"class","docstring border-l-2 border-t-2 pl-4 pt-3.5 border-gray-100 rounded-tl-xl mb-6 mt-8"),c(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(o,g){e(document.head,d),y(o,b,g),y(o,u,g),e(u,f),e(f,_),B(l,_,null),e(u,m),e(u,F),e(F,sm),y(o,ip,g),y(o,Oe,g),e(Oe,St),e(St,Pi),B(En,Pi,null),e(Oe,am),e(Oe,Zi),e(Zi,rm),y(o,lp,g),y(o,Rt,g),e(Rt,im),e(Rt,jn),e(jn,lm),e(Rt,dm),y(o,dp,g),y(o,Mr,g),e(Mr,cm),y(o,cp,g),y(o,$r,g),e($r,Ai),e(Ai,pm),y(o,pp,g),y(o,Fr,g),e(Fr,hm),y(o,hp,g),y(o,G,g),e(G,zn),e(zn,mm),e(zn,Jn),e(Jn,um),e(zn,fm),e(G,gm),e(G,de),e(de,_m),e(de,Wi),e(Wi,bm),e(de,ym),e(de,Gi),e(Gi,vm),e(de,km),e(de,Li),e(Li,Bm),e(de,Tm),e(de,Si),e(Si,wm),e(de,Mm),e(G,$m),e(G,Ri),e(Ri,Fm),e(G,xm),e(G,Vi),e(Vi,Em),e(G,jm),e(G,Cn),e(Cn,zm),e(Cn,Xi),e(Xi,Jm),e(Cn,Cm),e(G,Im),e(G,xr),e(xr,Um),e(xr,Qi),e(Qi,qm),e(G,Nm),e(G,Oi),e(Oi,Pm),y(o,mp,g),y(o,We,g),e(We,Zm),e(We,In),e(In,Am),e(We,Wm),e(We,Un),e(Un,Gm),e(We,Lm),y(o,up,g),y(o,De,g),e(De,Vt),e(Vt,Di),B(qn,Di,null),e(De,Sm),e(De,Hi),e(Hi,Rm),y(o,fp,g),y(o,R,g),e(R,Yi),e(Yi,Er),e(Er,Vm),e(R,Xm),e(R,Ki),e(Ki,jr),e(jr,Qm),e(R,Om),e(R,el),e(el,zr),e(zr,Dm),e(R,Hm),e(R,tl),e(tl,Jr),e(Jr,Ym),e(R,Km),e(R,ol),e(ol,Cr),e(Cr,eu),e(R,tu),e(R,nl),e(nl,Ir),e(Ir,ou),y(o,gp,g),y(o,He,g),e(He,Xt),e(Xt,sl),B(Nn,sl,null),e(He,nu),e(He,al),e(al,su),y(o,_p,g),y(o,ce,g),B(Pn,ce,null),e(ce,au),e(ce,Ye),e(Ye,ru),e(Ye,Ur),e(Ur,iu),e(Ye,lu),e(Ye,Zn),e(Zn,du),e(Ye,cu),e(ce,pu),e(ce,Ke),e(Ke,hu),e(Ke,qr),e(qr,mu),e(Ke,uu),e(Ke,Nr),e(Nr,fu),e(Ke,gu),e(ce,_u),B(Qt,ce,null),y(o,bp,g),y(o,et,g),e(et,Ot),e(Ot,rl),B(An,rl,null),e(et,bu),e(et,il),e(il,yu),y(o,yp,g),y(o,C,g),B(Wn,C,null),e(C,vu),e(C,Gn),e(Gn,ku),e(Gn,Ln),e(Ln,Bu),e(Gn,Tu),e(C,wu),e(C,Sn),e(Sn,Mu),e(Sn,Pr),e(Pr,$u),e(Sn,Fu),e(C,xu),e(C,Ge),B(Rn,Ge,null),e(Ge,Eu),e(Ge,ll),e(ll,ju),e(Ge,zu),e(Ge,Vn),e(Vn,Zr),e(Zr,Ju),e(Zr,dl),e(dl,Cu),e(Vn,Iu),e(Vn,Ar),e(Ar,Uu),e(Ar,cl),e(cl,qu),e(C,Nu),e(C,Dt),B(Xn,Dt,null),e(Dt,Pu),e(Dt,Qn),e(Qn,Zu),e(Qn,pl),e(pl,Au),e(Qn,Wu),e(C,Gu),e(C,Ht),B(On,Ht,null),e(Ht,Lu),e(Ht,tt),e(tt,Su),e(tt,hl),e(hl,Ru),e(tt,Vu),e(tt,ml),e(ml,Xu),e(tt,Qu),e(C,Ou),e(C,Wr),B(Dn,Wr,null),y(o,vp,g),y(o,ot,g),e(ot,Yt),e(Yt,ul),B(Hn,ul,null),e(ot,Du),e(ot,fl),e(fl,Hu),y(o,kp,g),y(o,X,g),B(Yn,X,null),e(X,Yu),e(X,je),e(je,Ku),e(je,gl),e(gl,ef),e(je,tf),e(je,Kn),e(Kn,of),e(je,nf),e(je,Gr),e(Gr,sf),e(je,af),e(X,rf),e(X,Le),B(es,Le,null),e(Le,lf),e(Le,_l),e(_l,df),e(Le,cf),e(Le,ts),e(ts,Lr),e(Lr,pf),e(Lr,bl),e(bl,hf),e(ts,mf),e(ts,Sr),e(Sr,uf),e(Sr,yl),e(yl,ff),e(X,gf),e(X,ge),B(os,ge,null),e(ge,_f),e(ge,vl),e(vl,bf),e(ge,yf),B(Kt,ge,null),e(ge,vf),e(ge,kl),e(kl,kf),e(X,Bf),e(X,eo),B(ns,eo,null),e(eo,Tf),e(eo,ss),e(ss,wf),e(ss,Bl),e(Bl,Mf),e(ss,$f),y(o,Bp,g),y(o,nt,g),e(nt,to),e(to,Tl),B(as,Tl,null),e(nt,Ff),e(nt,wl),e(wl,xf),y(o,Tp,g),y(o,st,g),B(rs,st,null),e(st,Ef),e(st,is),e(is,jf),e(is,Rr),e(Rr,zf),e(is,Jf),y(o,wp,g),y(o,at,g),e(at,oo),e(oo,Ml),B(ls,Ml,null),e(at,Cf),e(at,$l),e($l,If),y(o,Mp,g),y(o,Q,g),B(ds,Q,null),e(Q,Uf),e(Q,cs),e(cs,qf),e(cs,ps),e(ps,Nf),e(cs,Pf),e(Q,Zf),e(Q,hs),e(hs,Af),e(hs,ms),e(ms,Wf),e(hs,Gf),e(Q,Lf),e(Q,L),e(L,Sf),e(L,Fl),e(Fl,Rf),e(L,Vf),e(L,xl),e(xl,Xf),e(L,Qf),e(L,El),e(El,Of),e(L,Df),e(L,jl),e(jl,Hf),e(L,Yf),e(L,zl),e(zl,Kf),e(L,eg),e(L,Jl),e(Jl,tg),e(L,og),e(Q,ng),e(Q,_e),B(us,_e,null),e(_e,sg),e(_e,rt),e(rt,ag),e(rt,Vr),e(Vr,rg),e(rt,ig),e(rt,Cl),e(Cl,lg),e(rt,dg),e(_e,cg),B(no,_e,null),e(_e,pg),B(so,_e,null),y(o,$p,g),y(o,it,g),e(it,ao),e(ao,Il),B(fs,Il,null),e(it,hg),e(it,Ul),e(Ul,mg),y(o,Fp,g),y(o,lt,g),B(gs,lt,null),e(lt,ug),e(lt,be),B(_s,be,null),e(be,fg),e(be,dt),e(dt,gg),e(dt,Xr),e(Xr,_g),e(dt,bg),e(dt,ql),e(ql,yg),e(dt,vg),e(be,kg),B(ro,be,null),e(be,Bg),B(io,be,null),y(o,xp,g),y(o,ct,g),e(ct,lo),e(lo,Nl),B(bs,Nl,null),e(ct,Tg),e(ct,Pl),e(Pl,wg),y(o,Ep,g),y(o,ze,g),B(ys,ze,null),e(ze,Mg),e(ze,pt),e(pt,$g),e(pt,Zl),e(Zl,Fg),e(pt,xg),e(pt,vs),e(vs,Eg),e(pt,jg),e(ze,zg),e(ze,ye),B(ks,ye,null),e(ye,Jg),e(ye,ht),e(ht,Cg),e(ht,Qr),e(Qr,Ig),e(ht,Ug),e(ht,Al),e(Al,qg),e(ht,Ng),e(ye,Pg),B(co,ye,null),e(ye,Zg),B(po,ye,null),y(o,jp,g),y(o,mt,g),e(mt,ho),e(ho,Wl),B(Bs,Wl,null),e(mt,Ag),e(mt,Gl),e(Gl,Wg),y(o,zp,g),y(o,Je,g),B(Ts,Je,null),e(Je,Gg),e(Je,ut),e(ut,Lg),e(ut,Ll),e(Ll,Sg),e(ut,Rg),e(ut,ws),e(ws,Vg),e(ut,Xg),e(Je,Qg),e(Je,D),B(Ms,D,null),e(D,Og),e(D,ft),e(ft,Dg),e(ft,Or),e(Or,Hg),e(ft,Yg),e(ft,Sl),e(Sl,Kg),e(ft,e_),e(D,t_),B(mo,D,null),e(D,o_),B(uo,D,null),e(D,n_),B(fo,D,null),y(o,Jp,g),y(o,gt,g),e(gt,go),e(go,Rl),B($s,Rl,null),e(gt,s_),e(gt,Vl),e(Vl,a_),y(o,Cp,g),y(o,pe,g),B(Fs,pe,null),e(pe,r_),e(pe,Xl),e(Xl,i_),e(pe,l_),e(pe,xs),e(xs,d_),e(xs,Es),e(Es,c_),e(xs,p_),e(pe,h_),e(pe,H),B(js,H,null),e(H,m_),e(H,_t),e(_t,u_),e(_t,Dr),e(Dr,f_),e(_t,g_),e(_t,Ql),e(Ql,__),e(_t,b_),e(H,y_),B(_o,H,null),e(H,v_),B(bo,H,null),e(H,k_),B(yo,H,null),y(o,Ip,g),y(o,bt,g),e(bt,vo),e(vo,Ol),B(zs,Ol,null),e(bt,B_),e(bt,Dl),e(Dl,T_),y(o,Up,g),y(o,he,g),B(Js,he,null),e(he,w_),e(he,Hl),e(Hl,M_),e(he,$_),e(he,Cs),e(Cs,F_),e(Cs,Is),e(Is,x_),e(Cs,E_),e(he,j_),e(he,ve),B(Us,ve,null),e(ve,z_),e(ve,yt),e(yt,J_),e(yt,Hr),e(Hr,C_),e(yt,I_),e(yt,Yl),e(Yl,U_),e(yt,q_),e(ve,N_),B(ko,ve,null),e(ve,P_),B(Bo,ve,null),y(o,qp,g),y(o,vt,g),e(vt,To),e(To,Kl),B(qs,Kl,null),e(vt,Z_),e(vt,ed),e(ed,A_),y(o,Np,g),y(o,me,g),B(Ns,me,null),e(me,W_),e(me,td),e(td,G_),e(me,L_),e(me,Ps),e(Ps,S_),e(Ps,Zs),e(Zs,R_),e(Ps,V_),e(me,X_),e(me,ke),B(As,ke,null),e(ke,Q_),e(ke,kt),e(kt,O_),e(kt,Yr),e(Yr,D_),e(kt,H_),e(kt,od),e(od,Y_),e(kt,K_),e(ke,eb),B(wo,ke,null),e(ke,tb),B(Mo,ke,null),y(o,Pp,g),y(o,Bt,g),e(Bt,$o),e($o,nd),B(Ws,nd,null),e(Bt,ob),e(Bt,sd),e(sd,nb),y(o,Zp,g),y(o,ue,g),B(Gs,ue,null),e(ue,sb),e(ue,Tt),e(Tt,ab),e(Tt,ad),e(ad,rb),e(Tt,ib),e(Tt,rd),e(rd,lb),e(Tt,db),e(ue,cb),e(ue,Ls),e(Ls,pb),e(Ls,Ss),e(Ss,hb),e(Ls,mb),e(ue,ub),e(ue,Y),B(Rs,Y,null),e(Y,fb),e(Y,wt),e(wt,gb),e(wt,Kr),e(Kr,_b),e(wt,bb),e(wt,id),e(id,yb),e(wt,vb),e(Y,kb),B(Fo,Y,null),e(Y,Bb),B(xo,Y,null),e(Y,Tb),B(Eo,Y,null),y(o,Ap,g),y(o,Mt,g),e(Mt,jo),e(jo,ld),B(Vs,ld,null),e(Mt,wb),e(Mt,dd),e(dd,Mb),y(o,Wp,g),y(o,I,g),B(Xs,I,null),e(I,$b),e(I,cd),e(cd,Fb),e(I,xb),e(I,Qs),e(Qs,Eb),e(Qs,ei),e(ei,jb),e(Qs,zb),e(I,Jb),e(I,Os),e(Os,Cb),e(Os,Ds),e(Ds,Ib),e(Os,Ub),e(I,qb),e(I,pd),e(pd,Nb),e(I,Pb),e(I,Ce),e(Ce,hd),e(hd,Hs),e(Hs,Zb),e(Ce,Ab),e(Ce,md),e(md,Ys),e(Ys,Wb),e(Ce,Gb),e(Ce,ud),e(ud,Ks),e(Ks,Lb),e(Ce,Sb),e(Ce,fd),e(fd,ea),e(ea,Rb),e(I,Vb),e(I,Be),B(ta,Be,null),e(Be,Xb),e(Be,$t),e($t,Qb),e($t,gd),e(gd,Ob),e($t,Db),e($t,_d),e(_d,Hb),e($t,Yb),e(Be,Kb),B(zo,Be,null),e(Be,ey),B(Jo,Be,null),y(o,Gp,g),y(o,Ft,g),e(Ft,Co),e(Co,bd),B(oa,bd,null),e(Ft,ty),e(Ft,yd),e(yd,oy),y(o,Lp,g),y(o,U,g),B(na,U,null),e(U,ny),e(U,xt),e(xt,sy),e(xt,vd),e(vd,ay),e(xt,ry),e(xt,kd),e(kd,iy),e(xt,ly),e(U,dy),e(U,sa),e(sa,cy),e(sa,ti),e(ti,py),e(sa,hy),e(U,my),e(U,aa),e(aa,uy),e(aa,ra),e(ra,fy),e(aa,gy),e(U,_y),e(U,Bd),e(Bd,by),e(U,yy),e(U,Ie),e(Ie,Td),e(Td,ia),e(ia,vy),e(Ie,ky),e(Ie,wd),e(wd,la),e(la,By),e(Ie,Ty),e(Ie,Md),e(Md,da),e(da,wy),e(Ie,My),e(Ie,$d),e($d,ca),e(ca,$y),e(U,Fy),e(U,Te),B(pa,Te,null),e(Te,xy),e(Te,Et),e(Et,Ey),e(Et,Fd),e(Fd,jy),e(Et,zy),e(Et,xd),e(xd,Jy),e(Et,Cy),e(Te,Iy),B(Io,Te,null),e(Te,Uy),B(Uo,Te,null),y(o,Sp,g),y(o,jt,g),e(jt,qo),e(qo,Ed),B(ha,Ed,null),e(jt,qy),e(jt,jd),e(jd,Ny),y(o,Rp,g),y(o,q,g),B(ma,q,null),e(q,Py),e(q,zd),e(zd,Zy),e(q,Ay),e(q,ua),e(ua,Wy),e(ua,oi),e(oi,Gy),e(ua,Ly),e(q,Sy),e(q,fa),e(fa,Ry),e(fa,ga),e(ga,Vy),e(fa,Xy),e(q,Qy),e(q,Jd),e(Jd,Oy),e(q,Dy),e(q,Ue),e(Ue,Cd),e(Cd,_a),e(_a,Hy),e(Ue,Yy),e(Ue,Id),e(Id,ba),e(ba,Ky),e(Ue,ev),e(Ue,Ud),e(Ud,ya),e(ya,tv),e(Ue,ov),e(Ue,qd),e(qd,va),e(va,nv),e(q,sv),e(q,we),B(ka,we,null),e(we,av),e(we,zt),e(zt,rv),e(zt,Nd),e(Nd,iv),e(zt,lv),e(zt,Pd),e(Pd,dv),e(zt,cv),e(we,pv),B(No,we,null),e(we,hv),B(Po,we,null),y(o,Vp,g),y(o,Jt,g),e(Jt,Zo),e(Zo,Zd),B(Ba,Zd,null),e(Jt,mv),e(Jt,Ad),e(Ad,uv),y(o,Xp,g),y(o,N,g),B(Ta,N,null),e(N,fv),e(N,wa),e(wa,gv),e(wa,Wd),e(Wd,_v),e(wa,bv),e(N,yv),e(N,Ma),e(Ma,vv),e(Ma,ni),e(ni,kv),e(Ma,Bv),e(N,Tv),e(N,$a),e($a,wv),e($a,Fa),e(Fa,Mv),e($a,$v),e(N,Fv),e(N,Gd),e(Gd,xv),e(N,Ev),e(N,qe),e(qe,Ld),e(Ld,xa),e(xa,jv),e(qe,zv),e(qe,Sd),e(Sd,Ea),e(Ea,Jv),e(qe,Cv),e(qe,Rd),e(Rd,ja),e(ja,Iv),e(qe,Uv),e(qe,Vd),e(Vd,za),e(za,qv),e(N,Nv),e(N,Me),B(Ja,Me,null),e(Me,Pv),e(Me,Ct),e(Ct,Zv),e(Ct,Xd),e(Xd,Av),e(Ct,Wv),e(Ct,Qd),e(Qd,Gv),e(Ct,Lv),e(Me,Sv),B(Ao,Me,null),e(Me,Rv),B(Wo,Me,null),y(o,Qp,g),y(o,It,g),e(It,Go),e(Go,Od),B(Ca,Od,null),e(It,Vv),e(It,Dd),e(Dd,Xv),y(o,Op,g),y(o,P,g),B(Ia,P,null),e(P,Qv),e(P,Hd),e(Hd,Ov),e(P,Dv),e(P,Ua),e(Ua,Hv),e(Ua,si),e(si,Yv),e(Ua,Kv),e(P,ek),e(P,qa),e(qa,tk),e(qa,Na),e(Na,ok),e(qa,nk),e(P,sk),e(P,Yd),e(Yd,ak),e(P,rk),e(P,Ne),e(Ne,Kd),e(Kd,Pa),e(Pa,ik),e(Ne,lk),e(Ne,ec),e(ec,Za),e(Za,dk),e(Ne,ck),e(Ne,tc),e(tc,Aa),e(Aa,pk),e(Ne,hk),e(Ne,oc),e(oc,Wa),e(Wa,mk),e(P,uk),e(P,$e),B(Ga,$e,null),e($e,fk),e($e,Ut),e(Ut,gk),e(Ut,nc),e(nc,_k),e(Ut,bk),e(Ut,sc),e(sc,yk),e(Ut,vk),e($e,kk),B(Lo,$e,null),e($e,Bk),B(So,$e,null),y(o,Dp,g),y(o,qt,g),e(qt,Ro),e(Ro,ac),B(La,ac,null),e(qt,Tk),e(qt,rc),e(rc,wk),y(o,Hp,g),y(o,Z,g),B(Sa,Z,null),e(Z,Mk),e(Z,ic),e(ic,$k),e(Z,Fk),e(Z,Ra),e(Ra,xk),e(Ra,ai),e(ai,Ek),e(Ra,jk),e(Z,zk),e(Z,Va),e(Va,Jk),e(Va,Xa),e(Xa,Ck),e(Va,Ik),e(Z,Uk),e(Z,lc),e(lc,qk),e(Z,Nk),e(Z,Pe),e(Pe,dc),e(dc,Qa),e(Qa,Pk),e(Pe,Zk),e(Pe,cc),e(cc,Oa),e(Oa,Ak),e(Pe,Wk),e(Pe,pc),e(pc,Da),e(Da,Gk),e(Pe,Lk),e(Pe,hc),e(hc,Ha),e(Ha,Sk),e(Z,Rk),e(Z,Fe),B(Ya,Fe,null),e(Fe,Vk),e(Fe,Nt),e(Nt,Xk),e(Nt,mc),e(mc,Qk),e(Nt,Ok),e(Nt,uc),e(uc,Dk),e(Nt,Hk),e(Fe,Yk),B(Vo,Fe,null),e(Fe,Kk),B(Xo,Fe,null),y(o,Yp,g),y(o,Pt,g),e(Pt,Qo),e(Qo,fc),B(Ka,fc,null),e(Pt,eB),e(Pt,gc),e(gc,tB),y(o,Kp,g),y(o,A,g),B(er,A,null),e(A,oB),e(A,_c),e(_c,nB),e(A,sB),e(A,tr),e(tr,aB),e(tr,ri),e(ri,rB),e(tr,iB),e(A,lB),e(A,or),e(or,dB),e(or,nr),e(nr,cB),e(or,pB),e(A,hB),e(A,bc),e(bc,mB),e(A,uB),e(A,Ze),e(Ze,yc),e(yc,sr),e(sr,fB),e(Ze,gB),e(Ze,vc),e(vc,ar),e(ar,_B),e(Ze,bB),e(Ze,kc),e(kc,rr),e(rr,yB),e(Ze,vB),e(Ze,Bc),e(Bc,ir),e(ir,kB),e(A,BB),e(A,xe),B(lr,xe,null),e(xe,TB),e(xe,Zt),e(Zt,wB),e(Zt,Tc),e(Tc,MB),e(Zt,$B),e(Zt,wc),e(wc,FB),e(Zt,xB),e(xe,EB),B(Oo,xe,null),e(xe,jB),B(Do,xe,null),y(o,eh,g),y(o,At,g),e(At,Ho),e(Ho,Mc),B(dr,Mc,null),e(At,zB),e(At,$c),e($c,JB),y(o,th,g),y(o,W,g),B(cr,W,null),e(W,CB),e(W,Wt),e(Wt,IB),e(Wt,Fc),e(Fc,UB),e(Wt,qB),e(Wt,xc),e(xc,NB),e(Wt,PB),e(W,ZB),e(W,pr),e(pr,AB),e(pr,ii),e(ii,WB),e(pr,GB),e(W,LB),e(W,hr),e(hr,SB),e(hr,mr),e(mr,RB),e(hr,VB),e(W,XB),e(W,Ec),e(Ec,QB),e(W,OB),e(W,Ae),e(Ae,jc),e(jc,ur),e(ur,DB),e(Ae,HB),e(Ae,zc),e(zc,fr),e(fr,YB),e(Ae,KB),e(Ae,Jc),e(Jc,gr),e(gr,eT),e(Ae,tT),e(Ae,Cc),e(Cc,_r),e(_r,oT),e(W,nT),e(W,Ee),B(br,Ee,null),e(Ee,sT),e(Ee,Gt),e(Gt,aT),e(Gt,li),e(li,rT),e(Gt,iT),e(Gt,Ic),e(Ic,lT),e(Gt,dT),e(Ee,cT),B(Yo,Ee,null),e(Ee,pT),B(Ko,Ee,null),oh=!0},p(o,[g]){const yr={};g&2&&(yr.$$scope={dirty:g,ctx:o}),Qt.$set(yr);const Uc={};g&2&&(Uc.$$scope={dirty:g,ctx:o}),Kt.$set(Uc);const qc={};g&2&&(qc.$$scope={dirty:g,ctx:o}),no.$set(qc);const Nc={};g&2&&(Nc.$$scope={dirty:g,ctx:o}),so.$set(Nc);const vr={};g&2&&(vr.$$scope={dirty:g,ctx:o}),ro.$set(vr);const Pc={};g&2&&(Pc.$$scope={dirty:g,ctx:o}),io.$set(Pc);const Zc={};g&2&&(Zc.$$scope={dirty:g,ctx:o}),co.$set(Zc);const Ac={};g&2&&(Ac.$$scope={dirty:g,ctx:o}),po.$set(Ac);const kr={};g&2&&(kr.$$scope={dirty:g,ctx:o}),mo.$set(kr);const Wc={};g&2&&(Wc.$$scope={dirty:g,ctx:o}),uo.$set(Wc);const Gc={};g&2&&(Gc.$$scope={dirty:g,ctx:o}),fo.$set(Gc);const Lc={};g&2&&(Lc.$$scope={dirty:g,ctx:o}),_o.$set(Lc);const Sc={};g&2&&(Sc.$$scope={dirty:g,ctx:o}),bo.$set(Sc);const Rc={};g&2&&(Rc.$$scope={dirty:g,ctx:o}),yo.$set(Rc);const S={};g&2&&(S.$$scope={dirty:g,ctx:o}),ko.$set(S);const Br={};g&2&&(Br.$$scope={dirty:g,ctx:o}),Bo.$set(Br);const Vc={};g&2&&(Vc.$$scope={dirty:g,ctx:o}),wo.$set(Vc);const fe={};g&2&&(fe.$$scope={dirty:g,ctx:o}),Mo.$set(fe);const Xc={};g&2&&(Xc.$$scope={dirty:g,ctx:o}),Fo.$set(Xc);const Qc={};g&2&&(Qc.$$scope={dirty:g,ctx:o}),xo.$set(Qc);const Oc={};g&2&&(Oc.$$scope={dirty:g,ctx:o}),Eo.$set(Oc);const Dc={};g&2&&(Dc.$$scope={dirty:g,ctx:o}),zo.$set(Dc);const Hc={};g&2&&(Hc.$$scope={dirty:g,ctx:o}),Jo.$set(Hc);const Yc={};g&2&&(Yc.$$scope={dirty:g,ctx:o}),Io.$set(Yc);const Tr={};g&2&&(Tr.$$scope={dirty:g,ctx:o}),Uo.$set(Tr);const Kc={};g&2&&(Kc.$$scope={dirty:g,ctx:o}),No.$set(Kc);const di={};g&2&&(di.$$scope={dirty:g,ctx:o}),Po.$set(di);const ep={};g&2&&(ep.$$scope={dirty:g,ctx:o}),Ao.$set(ep);const tp={};g&2&&(tp.$$scope={dirty:g,ctx:o}),Wo.$set(tp);const Lt={};g&2&&(Lt.$$scope={dirty:g,ctx:o}),Lo.$set(Lt);const op={};g&2&&(op.$$scope={dirty:g,ctx:o}),So.$set(op);const np={};g&2&&(np.$$scope={dirty:g,ctx:o}),Vo.$set(np);const wr={};g&2&&(wr.$$scope={dirty:g,ctx:o}),Xo.$set(wr);const sp={};g&2&&(sp.$$scope={dirty:g,ctx:o}),Oo.$set(sp);const ap={};g&2&&(ap.$$scope={dirty:g,ctx:o}),Do.$set(ap);const rp={};g&2&&(rp.$$scope={dirty:g,ctx:o}),Yo.$set(rp);const O={};g&2&&(O.$$scope={dirty:g,ctx:o}),Ko.$set(O)},i(o){oh||(T(l.$$.fragment,o),T(En.$$.fragment,o),T(qn.$$.fragment,o),T(Nn.$$.fragment,o),T(Pn.$$.fragment,o),T(Qt.$$.fragment,o),T(An.$$.fragment,o),T(Wn.$$.fragment,o),T(Rn.$$.fragment,o),T(Xn.$$.fragment,o),T(On.$$.fragment,o),T(Dn.$$.fragment,o),T(Hn.$$.fragment,o),T(Yn.$$.fragment,o),T(es.$$.fragment,o),T(os.$$.fragment,o),T(Kt.$$.fragment,o),T(ns.$$.fragment,o),T(as.$$.fragment,o),T(rs.$$.fragment,o),T(ls.$$.fragment,o),T(ds.$$.fragment,o),T(us.$$.fragment,o),T(no.$$.fragment,o),T(so.$$.fragment,o),T(fs.$$.fragment,o),T(gs.$$.fragment,o),T(_s.$$.fragment,o),T(ro.$$.fragment,o),T(io.$$.fragment,o),T(bs.$$.fragment,o),T(ys.$$.fragment,o),T(ks.$$.fragment,o),T(co.$$.fragment,o),T(po.$$.fragment,o),T(Bs.$$.fragment,o),T(Ts.$$.fragment,o),T(Ms.$$.fragment,o),T(mo.$$.fragment,o),T(uo.$$.fragment,o),T(fo.$$.fragment,o),T($s.$$.fragment,o),T(Fs.$$.fragment,o),T(js.$$.fragment,o),T(_o.$$.fragment,o),T(bo.$$.fragment,o),T(yo.$$.fragment,o),T(zs.$$.fragment,o),T(Js.$$.fragment,o),T(Us.$$.fragment,o),T(ko.$$.fragment,o),T(Bo.$$.fragment,o),T(qs.$$.fragment,o),T(Ns.$$.fragment,o),T(As.$$.fragment,o),T(wo.$$.fragment,o),T(Mo.$$.fragment,o),T(Ws.$$.fragment,o),T(Gs.$$.fragment,o),T(Rs.$$.fragment,o),T(Fo.$$.fragment,o),T(xo.$$.fragment,o),T(Eo.$$.fragment,o),T(Vs.$$.fragment,o),T(Xs.$$.fragment,o),T(ta.$$.fragment,o),T(zo.$$.fragment,o),T(Jo.$$.fragment,o),T(oa.$$.fragment,o),T(na.$$.fragment,o),T(pa.$$.fragment,o),T(Io.$$.fragment,o),T(Uo.$$.fragment,o),T(ha.$$.fragment,o),T(ma.$$.fragment,o),T(ka.$$.fragment,o),T(No.$$.fragment,o),T(Po.$$.fragment,o),T(Ba.$$.fragment,o),T(Ta.$$.fragment,o),T(Ja.$$.fragment,o),T(Ao.$$.fragment,o),T(Wo.$$.fragment,o),T(Ca.$$.fragment,o),T(Ia.$$.fragment,o),T(Ga.$$.fragment,o),T(Lo.$$.fragment,o),T(So.$$.fragment,o),T(La.$$.fragment,o),T(Sa.$$.fragment,o),T(Ya.$$.fragment,o),T(Vo.$$.fragment,o),T(Xo.$$.fragment,o),T(Ka.$$.fragment,o),T(er.$$.fragment,o),T(lr.$$.fragment,o),T(Oo.$$.fragment,o),T(Do.$$.fragment,o),T(dr.$$.fragment,o),T(cr.$$.fragment,o),T(br.$$.fragment,o),T(Yo.$$.fragment,o),T(Ko.$$.fragment,o),oh=!0)},o(o){w(l.$$.fragment,o),w(En.$$.fragment,o),w(qn.$$.fragment,o),w(Nn.$$.fragment,o),w(Pn.$$.fragment,o),w(Qt.$$.fragment,o),w(An.$$.fragment,o),w(Wn.$$.fragment,o),w(Rn.$$.fragment,o),w(Xn.$$.fragment,o),w(On.$$.fragment,o),w(Dn.$$.fragment,o),w(Hn.$$.fragment,o),w(Yn.$$.fragment,o),w(es.$$.fragment,o),w(os.$$.fragment,o),w(Kt.$$.fragment,o),w(ns.$$.fragment,o),w(as.$$.fragment,o),w(rs.$$.fragment,o),w(ls.$$.fragment,o),w(ds.$$.fragment,o),w(us.$$.fragment,o),w(no.$$.fragment,o),w(so.$$.fragment,o),w(fs.$$.fragment,o),w(gs.$$.fragment,o),w(_s.$$.fragment,o),w(ro.$$.fragment,o),w(io.$$.fragment,o),w(bs.$$.fragment,o),w(ys.$$.fragment,o),w(ks.$$.fragment,o),w(co.$$.fragment,o),w(po.$$.fragment,o),w(Bs.$$.fragment,o),w(Ts.$$.fragment,o),w(Ms.$$.fragment,o),w(mo.$$.fragment,o),w(uo.$$.fragment,o),w(fo.$$.fragment,o),w($s.$$.fragment,o),w(Fs.$$.fragment,o),w(js.$$.fragment,o),w(_o.$$.fragment,o),w(bo.$$.fragment,o),w(yo.$$.fragment,o),w(zs.$$.fragment,o),w(Js.$$.fragment,o),w(Us.$$.fragment,o),w(ko.$$.fragment,o),w(Bo.$$.fragment,o),w(qs.$$.fragment,o),w(Ns.$$.fragment,o),w(As.$$.fragment,o),w(wo.$$.fragment,o),w(Mo.$$.fragment,o),w(Ws.$$.fragment,o),w(Gs.$$.fragment,o),w(Rs.$$.fragment,o),w(Fo.$$.fragment,o),w(xo.$$.fragment,o),w(Eo.$$.fragment,o),w(Vs.$$.fragment,o),w(Xs.$$.fragment,o),w(ta.$$.fragment,o),w(zo.$$.fragment,o),w(Jo.$$.fragment,o),w(oa.$$.fragment,o),w(na.$$.fragment,o),w(pa.$$.fragment,o),w(Io.$$.fragment,o),w(Uo.$$.fragment,o),w(ha.$$.fragment,o),w(ma.$$.fragment,o),w(ka.$$.fragment,o),w(No.$$.fragment,o),w(Po.$$.fragment,o),w(Ba.$$.fragment,o),w(Ta.$$.fragment,o),w(Ja.$$.fragment,o),w(Ao.$$.fragment,o),w(Wo.$$.fragment,o),w(Ca.$$.fragment,o),w(Ia.$$.fragment,o),w(Ga.$$.fragment,o),w(Lo.$$.fragment,o),w(So.$$.fragment,o),w(La.$$.fragment,o),w(Sa.$$.fragment,o),w(Ya.$$.fragment,o),w(Vo.$$.fragment,o),w(Xo.$$.fragment,o),w(Ka.$$.fragment,o),w(er.$$.fragment,o),w(lr.$$.fragment,o),w(Oo.$$.fragment,o),w(Do.$$.fragment,o),w(dr.$$.fragment,o),w(cr.$$.fragment,o),w(br.$$.fragment,o),w(Yo.$$.fragment,o),w(Ko.$$.fragment,o),oh=!1},d(o){t(d),o&&t(b),o&&t(u),M(l),o&&t(ip),o&&t(Oe),M(En),o&&t(lp),o&&t(Rt),o&&t(dp),o&&t(Mr),o&&t(cp),o&&t($r),o&&t(pp),o&&t(Fr),o&&t(hp),o&&t(G),o&&t(mp),o&&t(We),o&&t(up),o&&t(De),M(qn),o&&t(fp),o&&t(R),o&&t(gp),o&&t(He),M(Nn),o&&t(_p),o&&t(ce),M(Pn),M(Qt),o&&t(bp),o&&t(et),M(An),o&&t(yp),o&&t(C),M(Wn),M(Rn),M(Xn),M(On),M(Dn),o&&t(vp),o&&t(ot),M(Hn),o&&t(kp),o&&t(X),M(Yn),M(es),M(os),M(Kt),M(ns),o&&t(Bp),o&&t(nt),M(as),o&&t(Tp),o&&t(st),M(rs),o&&t(wp),o&&t(at),M(ls),o&&t(Mp),o&&t(Q),M(ds),M(us),M(no),M(so),o&&t($p),o&&t(it),M(fs),o&&t(Fp),o&&t(lt),M(gs),M(_s),M(ro),M(io),o&&t(xp),o&&t(ct),M(bs),o&&t(Ep),o&&t(ze),M(ys),M(ks),M(co),M(po),o&&t(jp),o&&t(mt),M(Bs),o&&t(zp),o&&t(Je),M(Ts),M(Ms),M(mo),M(uo),M(fo),o&&t(Jp),o&&t(gt),M($s),o&&t(Cp),o&&t(pe),M(Fs),M(js),M(_o),M(bo),M(yo),o&&t(Ip),o&&t(bt),M(zs),o&&t(Up),o&&t(he),M(Js),M(Us),M(ko),M(Bo),o&&t(qp),o&&t(vt),M(qs),o&&t(Np),o&&t(me),M(Ns),M(As),M(wo),M(Mo),o&&t(Pp),o&&t(Bt),M(Ws),o&&t(Zp),o&&t(ue),M(Gs),M(Rs),M(Fo),M(xo),M(Eo),o&&t(Ap),o&&t(Mt),M(Vs),o&&t(Wp),o&&t(I),M(Xs),M(ta),M(zo),M(Jo),o&&t(Gp),o&&t(Ft),M(oa),o&&t(Lp),o&&t(U),M(na),M(pa),M(Io),M(Uo),o&&t(Sp),o&&t(jt),M(ha),o&&t(Rp),o&&t(q),M(ma),M(ka),M(No),M(Po),o&&t(Vp),o&&t(Jt),M(Ba),o&&t(Xp),o&&t(N),M(Ta),M(Ja),M(Ao),M(Wo),o&&t(Qp),o&&t(It),M(Ca),o&&t(Op),o&&t(P),M(Ia),M(Ga),M(Lo),M(So),o&&t(Dp),o&&t(qt),M(La),o&&t(Hp),o&&t(Z),M(Sa),M(Ya),M(Vo),M(Xo),o&&t(Yp),o&&t(Pt),M(Ka),o&&t(Kp),o&&t(A),M(er),M(lr),M(Oo),M(Do),o&&t(eh),o&&t(At),M(dr),o&&t(th),o&&t(W),M(cr),M(br),M(Yo),M(Ko)}}}const U0={local:"bigbird",sections:[{local:"overview",title:"Overview"},{local:"documentation-resources",title:"Documentation resources"},{local:"transformers.BigBirdConfig",title:"BigBirdConfig"},{local:"transformers.BigBirdTokenizer",title:"BigBirdTokenizer"},{local:"transformers.BigBirdTokenizerFast",title:"BigBirdTokenizerFast"},{local:"transformers.models.big_bird.modeling_big_bird.BigBirdForPreTrainingOutput",title:"BigBird specific outputs"},{local:"transformers.BigBirdModel",title:"BigBirdModel"},{local:"transformers.BigBirdForPreTraining",title:"BigBirdForPreTraining"},{local:"transformers.BigBirdForCausalLM",title:"BigBirdForCausalLM"},{local:"transformers.BigBirdForMaskedLM",title:"BigBirdForMaskedLM"},{local:"transformers.BigBirdForSequenceClassification",title:"BigBirdForSequenceClassification"},{local:"transformers.BigBirdForMultipleChoice",title:"BigBirdForMultipleChoice"},{local:"transformers.BigBirdForTokenClassification",title:"BigBirdForTokenClassification"},{local:"transformers.BigBirdForQuestionAnswering",title:"BigBirdForQuestionAnswering"},{local:"transformers.FlaxBigBirdModel",title:"FlaxBigBirdModel"},{local:"transformers.FlaxBigBirdForPreTraining",title:"FlaxBigBirdForPreTraining"},{local:"transformers.FlaxBigBirdForCausalLM",title:"FlaxBigBirdForCausalLM"},{local:"transformers.FlaxBigBirdForMaskedLM",title:"FlaxBigBirdForMaskedLM"},{local:"transformers.FlaxBigBirdForSequenceClassification",title:"FlaxBigBirdForSequenceClassification"},{local:"transformers.FlaxBigBirdForMultipleChoice",title:"FlaxBigBirdForMultipleChoice"},{local:"transformers.FlaxBigBirdForTokenClassification",title:"FlaxBigBirdForTokenClassification"},{local:"transformers.FlaxBigBirdForQuestionAnswering",title:"FlaxBigBirdForQuestionAnswering"}],title:"BigBird"};function q0($){return D1(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class L0 extends V1{constructor(d){super();X1(this,d,q0,I0,Q1,{})}}export{L0 as default,U0 as metadata};
